马上注册 立即下载
您需要 登录 才可以下载或查看,没有账号?立即注册
x
[LEG引擎]自定义变量功能,不再受固定几个变量限制
功能:
自定义变量功能,不再受固定几个变量限制
使用方法:
三个步骤:
1、首先要声明变量
2、读取变量
3、保存变量
该变量支持增加、减少、脚本查看、检查大小等功能.该功能的开发突破了变量使用受限制.利用该变量可制作出超强功能脚本.
脚本示例:
[@varcontrol]
<声明变量/@newvarInteger> \
<查看变量/@viewvarInteger>\
<读取变量/@loadvarInteger> \
<保存变量/@savevarInteger> \
<增加变量/@calcvarinc>\
<减少变量/@calcvardec>\
<检查变量是否大于5/@checklarage5>\
<检查变量是否小于5/@checksmall5>\
<检查变量是否等于5/@checkequal5>
[@calcvarinc]
#If
#Act
Calcvar HUMAN QQQQ + 5
Goto @varcontrol
[@calcvardec]
#If
#Act
Calcvar HUMAN QQQQ - 5
Goto @varcontrol
[@checkequal5]
#If
CHECKVAR HUMAN QQQQ = 5
#Act
SendMSG 7 等于5
Goto @varcontrol
#ElseAct
SendMSG 7 不等于5
Goto @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)> |