项目

一般

简介

SetItemExValue » 历史记录 » 修订 2

修订 1 (yangdefeng, 2022-06-16 08:17) → 修订 2/4 (yangdefeng, 2023-07-19 17:01)

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

 给指定装备添加扩展属性 

 标签:命令定义|setItemExValue 

 *格式* 
 |命令名          |参数1     |参数2       |参数3     | 
 |setItemExValue|装备位id|扩展属性id|字符串值| 

 *说明* 
 * 参数1: 装备位id 
 ** 0-16 指定id装备位中的道具 
 参见 *[[装备位置|装备位id说明]]* 
 ** -1 
 当前打开的自定义道具栏中的道具 
 当前获得的道具(比如拾取) 

 * 参数2: 扩展属性id,[1-10] 

 * 参数3: 上述扩展属性id,对应保存的字符串值 

 * 该装备赋值的扩展属性,会保存在服务器 



 - 
 - 

 

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

 - 
 - 

 bq. [@main] 
 #if 
 [[equal]] [[脚本变量|<$weapon>]] 
 #act 
 [[messageBox]] 请穿戴武器后测试 
 break 
 &nbsp; 
 #if 
 #act 
 [[mov]] s0 1|2|3 
 *{color:green}setItemExValue* 1 1 <$str(s0)> 
 &nbsp; 
 %{color:lightGrey};--;--获取指定装备位,指定扩展属性--% 
 [[getItemExValue]] 1 1 s0 
 print 该装备扩展属性1效果列表--><$str(s0)> 
 &nbsp; 
 %{color:lightGrey};--;--遍历效果值--% 
 [[array|#if array]] <$str(s0)> s$效果id 
 #act 
 %{color:lightGrey};--;--控制台输出3次结果--% 
 [[print]] print 该装备扩展属性1-->效果<$str(s$效果id)> 
 &nbsp; 
 %{color:lightGrey};--;--检测是否包含指定效果值--% 
 #if 
 [[array_in]] <$str(s0)> 1 
 #act 
 [[print]] print 该装备包含效果1 
 #elseAct 
 [[print]] print 该装备不包含效果1