CheckItemDura » 历史记录 » 版本 2
yangdefeng, 2023-08-09 13:32
1 | 1 | machenhe | _*%{color:green}checkItemDura%*_ |
---|---|---|---|
2 | 检测指定装备位的装备持久,是否满足条件 |
||
3 | |||
4 | 2 | yangdefeng | 标签:命令定义|checkItemDura>checkItemDura |
5 | 1 | machenhe | |
6 | *格式* |
||
7 | |_.命令名 |_.参数1 |_.参数2|_.参数3|_.参数4 | |
||
8 | 2 | yangdefeng | |checkItemDura |装备位id |比较符 |比较值 |检测对象 | |
9 | 1 | machenhe | |
10 | *说明* |
||
11 | * 参数1: 装备位id |
||
12 | ** 0-16 指定id装备位中的道具 |
||
13 | 参见 *[[装备位置|装备位id说明]]* |
||
14 | ** -1 |
||
15 | 当前打开的自定义道具栏中的道具 |
||
16 | 当前拾取道具 |
||
17 | |||
18 | 2 | yangdefeng | * 参数2: 比较符(> < =) |
19 | 1 | machenhe | |
20 | 2 | yangdefeng | * 参数3: 比较值(整数) |
21 | 1 | machenhe | |
22 | * 参数4: 检测对象 |
||
23 | ** 0,检测当前持久 |
||
24 | ** 1,检测最大持久 |
||
25 | |||
26 | - |
||
27 | - |
||
28 | |||
29 | *%{color:deepskyblue}特戒引擎脚本示例:%* |
||
30 | |||
31 | bq. [<notextile>@</notextile>main] |
||
32 | #if |
||
33 | equal <$weapon> |
||
34 | #act |
||
35 | messageBox 请拿上武器后再来测试! |
||
36 | break |
||
37 | |
||
38 | #if |
||
39 | #say |
||
40 | <修改身上武器持久/<notextile>@@</notextile>inputInteger0(请输入设定的持久上限,1000=1)>\\ \\ |
||
41 | <检测身上武器最大持久/<notextile>@@</notextile>inputInteger1(请输入检测持久上限,1000=1)>\\ \\ |
||
42 | <检测身上武器当前持久/<notextile>@@</notextile>inputInteger2(请输入检测当前持久,1000=1)>\\ \\ \\ |
||
43 | <装备tips显示持久值=向下取整(实际值/1000)>\\ \\ |
||
44 | <即设定10000点持久,显示持久为10>\\ \\ |
||
45 | |
||
46 | [<notextile>@</notextile>inputInteger0] |
||
47 | #if |
||
48 | #act |
||
49 | [[changeItemDura]] 1 = <$str(n0)> 0 |
||
50 | [[getFloat]] <$str(n0)> 1000 0 s0 |
||
51 | [[messageBox]] 身上武器持久被设定为<$str(s0)>\\点击武器图标可查看 |
||
52 | [[openSysUi]] 1 0 |
||
53 | |
||
54 | [<notextile>@</notextile>inputInteger1] |
||
55 | #if |
||
56 | *{color:green}checkItemDura* 1 = <$str(n1)> 1 |
||
57 | #act |
||
58 | messageBox 武器持久上限--等于<$str(n1)> |
||
59 | |
||
60 | #if |
||
61 | checkItemDura 1 > <$str(n1)> 1 |
||
62 | #act |
||
63 | messageBox 武器持久上限--大于<$str(n1)> |
||
64 | |
||
65 | #if |
||
66 | checkItemDura 1 < <$str(n1)> 1 |
||
67 | #act |
||
68 | messageBox 武器持久上限--小于<$str(n1)> |
||
69 | |
||
70 | [<notextile>@</notextile>inputInteger2] |
||
71 | #if |
||
72 | checkItemDura 1 = <$str(n2)> 0 |
||
73 | #act |
||
74 | messageBox 武器当前持久--等于<$str(n2)> |
||
75 | |
||
76 | #if |
||
77 | checkItemDura 1 > <$str(n2)> 0 |
||
78 | #act |
||
79 | messageBox 武器当前持久--大于<$str(n2)> |
||
80 | |
||
81 | #if |
||
82 | checkItemDura 1 < <$str(n2)> 0 |
||
83 | #act |
||
84 | messageBox 武器当前持久--小于<$str(n2)> |