项目

一般

简介

GetBoxItemNum » 历史记录 » 版本 2

yangdefeng, 2022-05-20 17:33

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
bq. <text:获取0:0:300/<notextile>@</notextile>获取0>
24
<text:获取1:200:300/<notextile>@</notextile>获取1>
25
26
bq. [<notextile>@</notextile>获取0]
27
#act
28
getBoxItemNum 0 p0
29
sendmsg 6 数量:<$str(p0)>
30
31
bq. [<notextile>@</notextile>获取1]
32
#act
33
getBoxItemNum 1 p1
34
sendmsg 6 数量:<$str(p1)>