Goto » 历史记录 » 修订 2
修订 1 (machenhe, 2022-04-21 17:12) → 修订 2/9 (yangdefeng, 2023-09-11 17:48)
_*%{color:green}goto%*_
同一脚本文件内@块跳转
标签:命令定义|goto>goto
标签:命令定义|goto
*格式*
|命令名 |参数1 |
|goto |跳转标签 |
*说明*
* 参数1:跳转标签 参数1
跳转标签
以@开头的任意字符串
%{color:deepPink}支持<$str()>变量取值%
支持传参
-
-
h4. *%{color:deepskyblue}特戒引擎脚本示例:%* *%{color:deepskyblue}脚本示例:%*
bq. [@main]
#if
#act
[[sendMsg]] sendMsg 6 我是@main
*{color:green}goto* goto @1
%{color:lightgrey};--跳至@1%
[@1]
#if
#act
[[sendMsg]] sendMsg 6 我是@1
*{color:green}goto* goto @2
%{color:lightgrey};--跳至@2%
[@2]
#if
#act
[[sendMsg]] sendMsg 6 我是@2
-
-
bq. %{color:lightgrey};--goto 跳转标签支持变量%
[<notextile>@</notextile>main]
%{color:lightgrey};
;--设置跳转标签1的条件%
#if
#act
[[mov]] mov n1 1
*{color:green}goto* goto <notextile>@</notextile><$str(n1)>
%{color:lightgrey};
;--设置跳转标签2的条件%
#if
#act
[[mov]] mov n1 2
*{color:green}goto* goto <notextile>@</notextile><$str(n1)>
%{color:lightgrey};
;--设置跳转标签3的条件%
#if
#act
[[mov]] mov n1 3
*{color:green}goto* goto <notextile>@</notextile><$str(n1)>
%{color:lightgrey};
;标签1执行%
[@1]
#act
[[sendMsg]] sendMsg 6 特戒初次问候
%{color:lightgrey};
;标签2执行%
[@2]
#act
[[sendMsg]] sendMsg 6 特戒再次问候
%{color:lightgrey};
;标签3执行%
[@3]
#act
[[sendMsg]] sendMsg 6 特戒三次问候