项目

一般

简介

CheckBaItemCountEX » 历史记录 » 修订 6

修订 5 (yangdefeng, 2022-05-20 16:42) → 修订 6/11 (yangdefeng, 2022-05-20 17:20)

h4. _*%{color:green}checkBaItemCountEx%*_ 

 检测背包中物品的数量(排除已放入itemBox中的物品数量)是否满足条件 

 标签:命令定义|checkBaItemCountEx 

 *格式* 
 |命令名 			 |参数1 		 |参数2 		 | 
 |checkBaItemCountEx 	 |物品名称 	 |数量 		 | 

 说明: 
 * 参数1: 物品名称 

 * 参数2: 数量 

 

 h4. *%{color:deepskyblue}特戒引擎脚本示例:%* 

 bq. [<notextile>@</notextile>main] 
 #say 
 <[[dlg_itemBox_|itemBox]]:0:0:0:0:0:40:40:*:tips> 
 <itemBox:1:0:0:200:0:40:40:*:tips> 
 \ \ \ \<左边格子内麻布数量检查/@检查背包0> 
 \ \<右边格子内粗铁数量检查/@检查背包1> 
 &nbsp; 
 

 bq. [<notextile>@</notextile>检查背包0] 
 #if 
 *{color:green}checkBaItemCountEx* 麻布 3 
 #act 
 [[sendMsg]] 6 麻布有3以上 
 #elseAct 
 sendMsg 6 麻布不足3 
 &nbsp; 
 

 bq. [<notextile>@</notextile>检测背包1] 
 #if 
 checkBaItemCountEx 粗铁 5 
 #act 
 sendMsg 6 粗铁有5以上 
 #elseAct 
 sendMsg 6 粗铁不足5