English
Chinese
  yTin Online Help  

  中文主页 | Home (english) | 快快下载 | 实战教程 | 命令帮助 | 实用工具 | 常问问题 | 讨论留言 | 友好泥潭 | 我的程序 | 全球镜像 |
variable

format:            #variable {} {}

Since these are completely new to tintin, and act differently
than anything else, I feel should spend some time on them.
These variables differ from the %0-9 in the fact that you could
specify a full word as a variable name, and they stay in memory for
the full session, unless they are changed, and they can be saved in
the coms file, and can be set to different values if you have 2 or
more sessions running at the same time.   One of the best uses for
variables I think is for spellcasters.

Currently, you would set up a bunch of aliases like the following.

#alias {flame} {cast 'flame strike' %0}
#alias {flash} {cast 'call lightning' %0}
#alias {harm} {cast 'harm' %0}

With the new variables you can do the following:

#alias {targ} {#var target %0}
#alias {flamet} {flame $target}
#alias {flasht} {flash $target}
#alias {harmt} {harm $target}

these aliases will be   defined just as they are written, the variables
are not substituted   for until the   alias is found   in your input   and
executed.

so, if before a battle, you do a:
targ donjonkeeper
then $target is set to donjonkeeper, and any alias you set up with
$target in it will substitute donjonkeeper for every instance of
$target.   Let's say your leader has the following alias set up.

#alias {setttarg} {#var {target} {%0};gt target=%0}

if he did a settarg lich, it would set his $target to lich, and
would send a:

tells your group 'target=lich'

you could then set an action like so.

#action {^%0 tells your group 'target=%1'} {targ %1}

then when your leader executed his alias, it would also set your
variable to the target.

Another use for variables would be to set a variable $buffer to
whoever the current buffer is.   This would be useful in fights
where the mob switches, or where many rescues are needed.   You
could set up healing aliases with $buffer in them, and set the
$buffer variable in an action that is triggered by each switch,
and each rescue, or just rescues, or whatever.   Then in a
confusing battle, you will have a better shot at healing the
right person.