项目

一般

简介

装备强星 » 历史记录 » 版本 2

yangdefeng, 2022-06-10 10:32

1 2 yangdefeng
h4. %{color:green}装备强星%
2 1 yangdefeng
3
标签:模块示例|装备强星
4
5
*模块说明*
6
根据条件,筛选出装备列表
7
自定义对话框指定位置,生成上述装备列表
8
点击装备列表某个单元,将选中单元放入自定义装备位
9
10
*相关命令*
11
|设置装备列表模板			|[[setModule]]			|
12
|将指定实例化装备,放入指定itemBox	|[[putinBox]]			|
13
|根据筛选条件,取出装备列表		|[[getEquipList]]		|
14
|取出装备列表中第1件装备的实例化id	|[[getEquipListFirst]]		|
15
|\2.							|
16
|装备列表模板定义项			|[[dlg_itemInsId_|<itemInsId:]]	|
17
|装备列表模板定义项			|[[dlg_itemBoxEx_|<itemBoxEx:]]	|
18
|自定义对话框中显示装备列表的属性配置	|[[dlg_equipList_|<equipList:]]	|
19
20
*注意事项*
21
#say命令中出现以下命令时,
22
<temList:
23
<itemGrid:
24
<equipList:
25
%{color:deepPink}#say中<>模块必须以“\”结尾%
26
参见以下脚本示例
27
28
-
29
-
30
31 2 yangdefeng
h4. *%{color:deepskyblue}特戒引擎脚本示例:%*
32 1 yangdefeng
33
*使用前提1*
34
请开启配置开关\"isUseCustomOKPanel\"
35
|配置文件|...\Mir200\Tejieconfig\Tejieconfig.txt	|
36
|配置节点|[tjconfig]					|
37
|配置项  |isUseCustomOkPanel=1				|
38
39
40
*使用前提2*
41
请配置补丁资源\"lc\",即找到以下配置项,加入 %{color:deeppink}lc%
42
|配置文件|...\Mir200\Tejieconfig\Tejieconfig.txt	|
43
|配置节点|[tjconfig]					|
44
|配置项  |patch=aa,bb,lc				|
45
46
47
*使用前提3*
48
配置装备类型名称与显示序号
49
|配置文件|...\Mir200\Tejieconfig\Tejieconfig.txt	|
50
|配置节点|[[upGradeItem|[upGradeItem]]]			|
51
52
配置举例
53
[upGradeItem]
54
5 1 武器
55
10 2 衣服[男]
56
11 3 衣服[女]
57
15 4 头盔
58
19 5 项链
59
26 6 手镯
60
22 7 戒指
61
64 8 腰带
62
62 9 鞋子
63
64
-
65
-
66
67
bq. [<notextile>@</notextile>main]
68
#act
69
%{color:lightGrey};--设置装备列表模板%
70
[[mov]] s$module (<[[dlg_itemSize_|itemSize]]:400:150:index> %{color:lightGrey};定义装备列表单元宽高%
71
[[inc]] s$module <[[dlg_itemToggle_|itemToggle]]:huishouwupin_xuanzhongkuang:denglu_liebiao_weixuanzhong/<notextile>@</notextile>装备列表点击> %{color:lightGrey};定义装备列表单元选中与未选中图片%
72
inc s$module <[[dlg_itemInsId_|itemInsId]]:instanceId> %{color:lightGrey};道具实例id:程序项,无须定义%
73
inc s$module <[[dlg_itemBoxEx_|itemBoxEx]]:itemId:instanceId:sourceType:equipplace:20:20:wupinkuang:looks:effectname:animation> %{color:lightGrey};定义道具图标在装备列表单元中的坐标%
74
inc s$module <[[dlg_text_|text]]:itemName{scolor=168}:140:30> %{color:lightGrey};定义道具名称在装备列表单元中的文本属性%
75
inc s$module <text:itemType{scolor=25}:160:90>) %{color:lightGrey};定义道具部位名称在装备列表单元中的文本属性%
76
*[[setModule]]* s$module
77
&nbsp;
78
%{color:lightGrey};--设定"身上"与"背包"切换按钮%
79
mov s$切换按钮 (
80
inc s$切换按钮 <[[dlg_itemIndex_|itemIndex]]:1>
81
inc s$切换按钮 <itemToggle:lc_shijieliaotian_xuanzhong:lc_shijieliaotian_weixuanzhong/<notextile>@</notextile>身背切换(1)>
82
inc s$切换按钮 <text:身上装备{scolor=150}:75:50>
83
inc s$切换按钮 )
84
&nbsp;
85
inc s$切换按钮 (
86
inc s$切换按钮 <itemIndex:2>
87
inc s$切换按钮 <itemToggle:lc_shijieliaotian_xuanzhong:lc_shijieliaotian_weixuanzhong/<notextile>@</notextile>身背切换(2)>
88
inc s$切换按钮 <text:背包装备{scolor=150}:75:50>
89
inc s$切换按钮 )
90
&nbsp;
91
mov s$激活列表 1
92
goto <notextile>@</notextile>获取装备列表
93
&nbsp;
94
[<notextile>@</notextile>获取装备列表]
95
#act
96
*[[getEquipList]]* 1 <$str(s$激活列表)> s$装备列表
97
*[[getEquipListFirst]]* s$装备列表
98
goto <notextile>@</notextile>星数刷新
99
goto <notextile>@</notextile>显示界面
100
goto <notextile>@</notextile>装备列表点击
101
&nbsp;
102
[<notextile>@</notextile>星数刷新]
103
#act
104
%{color:lightGrey};--获取itemBox中道具星数%
105
[[getItemStarNum]] -1 n$星星数
106
&nbsp;
107
mov s$item1 (<itemsize:500:100>
108
inc s$item1 <text:星星数<$str(n$星星数)>:150:0>)
109
mov s$itemList <$str(s$item1)>
110
&nbsp;
111
[[refreshItem]] 星数刷新 1 s$item1 0
112
&nbsp;
113
[<notextile>@</notextile>装备强星]
114
#act
115
[[changeItemUpgradeCount]] -1 + 1
116
goto <notextile>@</notextile>装备列表点击 %{color:lightGrey};刷新box中的道具tips%
117
&nbsp;
118
[<notextile>@</notextile>装备列表点击]
119
#act
120
%{color:lightGrey};--putinBox 物品唯一id itemBox编号 1身上,2背包%
121
[[putinBox]] <$str(s0)> 0 <$str(s$激活列表)>
122
goto <notextile>@</notextile>星数刷新
123
&nbsp;
124
[<notextile>@</notextile>显示界面]
125
#act
126
[[openMerchantBigDlg]] lc_chuangti 4 0 0 1 0 0
127
#say
128
<[[dlg_panelSize_|panelSize]]:700:600>\
129
<[[dlg_itemGrid_|itemGrid]]:<$str(s$切换按钮)>:切换按钮,<$str(s$激活列表)>,0,1:10:70:220,85:1,2,90,0:1>\
130
<[[dlg_equipList_|equipList]]:<$str(s$装备列表)>:装备强星,1:20:160:1,715,1:0>\
131
&nbsp;
132
#if
133
not [[equal]] <$str(s$装备列表)>
134
#say
135
<[[dlg_itemBox_|itemBox]]:0:-100001:0:875:400:50:50:*:251>\
136
<[[dlg_itemList_|itemList]]:<$str(s$itemList)>:星数刷新:700:500:1,50,0:5>\
137
<[[dlg_imgButton_|imgButton]]:lc_anniu01:845:715:装备强星/<notextile>@</notextile>装备强星>\
138
#elseSay
139
<text:没有可装备列表:900:300>
140
&nbsp;
141
[<notextile>@</notextile>身背切换]
142
#if
143
not equal s$激活列表 [[checkScriptParam|<$scriptParam1>]]
144
#act
145
mov s$激活列表 <$scriptParam1>
146
goto <notextile>@</notextile>获取装备列表