项目

一般

简介

GetBoxItemNum » 历史记录 » 版本 3

yangdefeng, 2022-05-20 17:34

1 2 yangdefeng
h4. _*%{color:green}getBoxItemNum%*_
2 1 machenhe
3
获取指定itemBox中的物品数量
4
5
标签:命令定义|getBoxItemNum
6
7
*格式*
8
|命令名		|参数1		|参数2			|
9
|getBoxItemNum	|itemBox编号	|获取返回值的变量	|
10
11
说明:
12 2 yangdefeng
* 参数1: itemBox编号
13 1 machenhe
14 2 yangdefeng
* 参数2: 获取返回值的变量
15 1 machenhe
16 2 yangdefeng
h4. *%{color:deepskyblue}特戒引擎脚本示例:%*
17 1 machenhe
18
bq. [<notextile>@</notextile>main]
19
#say
20 2 yangdefeng
<[[dlg_itemBox_|itemBox]]:0:-1:-1:0:0:-1:-1:*:tips>
21
<itemBox:1:-1:-1:200:0:-1:-1:*:tips>
22 1 machenhe
23 3 yangdefeng
bq. <[[dlg_text_|text]]:获取0:0:300/<notextile>@</notextile>获取0>
24 1 machenhe
<text:获取1:200:300/<notextile>@</notextile>获取1>
25
26
bq. [<notextile>@</notextile>获取0]
27
#act
28 3 yangdefeng
*{color:green}getBoxItemNum* 0 p0
29
[[sendMsg]] 6 数量:<$str(p0)>
30 1 machenhe
31
bq. [<notextile>@</notextile>获取1]
32
#act
33
getBoxItemNum 1 p1
34 3 yangdefeng
sendMsg 6 数量:<$str(p1)>