|
功用: 自定义变量功用,不再受固定几个变量约束. 运用方法: 三个过程: 1、首先要声明变量 2、读取变量 3、保留变量 4、一休论坛该变量撑持添加、削减、脚本查看、查看巨细等功用,该功用的开发突破了变量运用受约束,使用该变量可制造出超强功用脚本。 传奇版本脚本样例:=========================================<声明变量[url=]/@newvarInteger[/url]> \ <查看变量[url=]/@viewvarInteger[/url]> [url=]\[/url] <读取变量[url=]/@loadvarInteger[/url]> [url=]\[/url] <保留变量[url=]/@savevarInteger[/url]> [url=]\[/url] <添加变量[url=]/@calcvarinc[/url]> <查看变量是不是大于5/@checklarage5>\ <削减变量[url=]/@calcvardec[/url]> <查看变量是不是小于5/@checksmall5>\ <查看变量是不是等于5/@checkequal5>[@calcvarinc]#IF#ACTCALCVAR HUMAN QQQQ + 5 ;脚本指令CALCVAR撑持对变量进行+ - * / =五种操作 GOTO @varcontrol [@calcvardec]#IF#ACTCALCVAR HUMAN QQQQ - 5GOTO @varcontrol[@checkequal5]#IFCHECKVAR HUMAN QQQQ = 5#ACTSendMsg 7 等于5GOTO @varcontrol#ELSEACTSendMsg 7 不等于5GOTO @varcontrol[@checklarage5]#IF CHECKVAR HUMAN QQQQ > 5#ACT sendmsg 7 大于5 goto @varcontrol#ELSEACT sendmsg 7 小于5 goto @varcontrol[@checksmall5]#IF CHECKVAR HUMAN QQQQ < 5#ACT sendmsg 7 小于5 goto @varcontrol#ELSEACT sendmsg 7 大于5 goto @varcontrol[@decInteger]
#ACT
DEC QQQQ 1
sendmsg 7 <$HUMAN(QQQQ)>
goto @varcontrol
[@addInteger]
#ACT
INC QQQQ 1
sendmsg 7 <$HUMAN(QQQQ)>
goto @varcontrol
[@loadvarInteger]
#IF
#ACT
LOADVAR HUMAN QQQQ VarSave.txt
sendmsg 7 OK
GOTO @varcontrol
[@savevarInteger]
#IF
#ACT
SAVEVAR HUMAN QQQQ VarSave.txt
sendmsg 7 OK
GOTO @varcontrol
[@viewvarInteger]
#ACT
sendmsg 7 <$HUMAN(QQQQ)>
GOTO @varcontrol
[@newvarInteger]
#IF
#ACT
VAR Integer HUMAN QQQQ
sendmsg 7 OK
GOTO @varcontrol
[@viewvarString]
<$HUMAN(QQQS)>
|
|