ChangeItemDura » 历史记录 » 修订 2
修订 1 (machenhe, 2022-05-11 13:46) → 修订 2/3 (yangdefeng, 2023-08-03 15:08)
_*%{color:green}changeItemDura%*_
修改指定位置装备的当前最大持久
标签:命令定义|changeItemDura
*格式*
|_.命令名 |_.参数1 |_.参数2|_.参数3|_.参数4 |
|changeItemDura |装备位id |操作符 |操作值 |是否改变当前持久 |是否变量当前持久 |
*说明*
* 参数1: 装备位id
** 0-16 指定id装备位中的道具
参见 *[[装备位置|装备位id说明]]*
** -1
当前打开的自定义道具栏中的道具
当前拾取道具
* 参数2: 操作符(+ - =)
* 参数3: 操作值(整数)
* 参数4: 当前持久大于最大持久时,是否改变当前持久
** 0,不改变
** 1,改变为最大持久相同值
-
-
*%{color:deepskyblue}特戒引擎脚本示例:%*
bq. [<notextile>@</notextile>main]
#if
equal <$weapon>
#act
messageBox 请拿上武器后再来测试!
break
#if
#say
<修改身上武器持久/<notextile>@@</notextile>inputInteger0(请输入设定的持久上限,1000=1)>\\ \\
<检测身上武器最大持久/<notextile>@@</notextile>inputInteger1(请输入检测持久上限,1000=1)>\\ \\
<检测身上武器当前持久/<notextile>@@</notextile>inputInteger2(请输入检测当前持久,1000=1)>\\ \\ \\
<装备tips显示持久值=向下取整(实际值/1000)>\\ \\
<即设定10000点持久,显示持久为10>\\ \\
[<notextile>@</notextile>inputInteger0]
#if
#act
*{color:green}changeItemDura* 1 = <$str(n0)> 0
[[getFloat]] <$str(n0)> 1000 0 s0
[[messageBox]] 身上武器持久被设定为<$str(s0)>\\点击武器图标可查看
[[openSysUi]] 1 0
[<notextile>@</notextile>inputInteger1]
#if
[[checkItemDura]] 1 = <$str(n1)> 1
#act
messageBox 武器持久上限--等于<$str(n1)>
#if
checkItemDura 1 > <$str(n1)> 1
#act
messageBox 武器持久上限--大于<$str(n1)>
#if
checkItemDura 1 < <$str(n1)> 1
#act
messageBox 武器持久上限--小于<$str(n1)>
[<notextile>@</notextile>inputInteger2]
#if
checkItemDura 1 = <$str(n2)> 0
#act
messageBox 武器当前持久--等于<$str(n2)>
#if
checkItemDura 1 > <$str(n2)> 0
#act
messageBox 武器当前持久--大于<$str(n2)>
#if
checkItemDura 1 < <$str(n2)> 0
#act
messageBox 武器当前持久--小于<$str(n2)>