项目

一般

简介

装备改造 » 历史记录 » 版本 7

tejie, 2024-05-28 13:33

1 3 yangdefeng
h4. %{color:green}装备改造%
2 2 yangdefeng
3
标签:模块示例|装备改造
4 1 yangdefeng
5
*模块说明*
6
* 根据条件,筛选出装备列表
7
* 自定义对话框指定位置,生成上述装备列表
8
* 点击装备列表某个单元,
9
** 选中单元对应装备放入自定义装备位1
10
** 改造后的装备会出现在自定义装备位2
11
** 改造后 *[[自定义装备属性]]* 效果会显示在装备tips中,替换原有自定义装备属性
12
13
-
14
-
15
16
*相关命令*
17
|设置装备列表模板			|[[setModule]]				|
18
|将指定实例化装备,放入指定itemBox	|[[putinBox]]				|
19
|根据筛选条件,取出装备列表		|[[getEquipList]]			|
20
|取出装备列表中第1件装备的实例化id	|[[getEquipListFirst]]			|
21
|设置装备自定义属性tips显示名称		|[[changeCustomItemText]]		|
22
|设置装备自定义属性tips显示属性文本	|[[changeCustomItemabil]]		|
23
|设置装备自定义属性数值			|[[changeCustomItemValue]]		|
24
|\2.										|
25
|装备列表模板定义项			|[[dlg_itemInsId_|<itemInsId:]]		|
26
|装备列表模板定义项			|[[dlg_itemBoxEx_|<itemBoxEx:]]		|
27
|自定义对话框中显示装备列表的属性配置	|[[dlg_equipList_|<equipList:]]		|
28
|预览装备tips中自定义装备属性文本设定	|[[dlg_tipsPreview_|<tipsPreview:]]	|
29
30
-
31
-
32
33
*注意事项*
34
#say命令中出现以下命令时,
35
<temList:
36
<itemGrid:
37
<equipList:
38
%{color:deepPink}#say中<>模块必须以“\”结尾%
39
参见以下脚本示例
40
41
42
-
43
-
44
45 3 yangdefeng
h4. *%{color:deepskyblue}特戒引擎脚本示例:%*
46 1 yangdefeng
47
48
*使用前提1*
49
请开启配置开关\"isUseCustomOKPanel\"
50
|配置文件|...\Mir200\Tejieconfig\Tejieconfig.txt	|
51
|配置节点|[[tjconfig|[tjconfig]]]			|
52
|配置项  |isUseCustomOkPanel=1				|
53
54
55
*使用前提2*
56
请配置补丁资源\"lc\",即找到以下配置项,加入 %{color:deeppink}lc%
57
|配置文件|...\Mir200\Tejieconfig\Tejieconfig.txt	|
58
|配置节点|[tjconfig]					|
59
|配置项  |patch=aa,bb,lc				|
60
61
62
*使用前提3*
63
配置装备类型名称与显示序号
64
|配置文件|...\Mir200\Tejieconfig\Tejieconfig.txt	|
65
|配置节点|[[upGradeItem|[upGradeItem]]]			|
66
67
配置举例
68
[upGradeItem]
69
5 1 武器
70
10 2 衣服[男]
71
11 3 衣服[女]
72
15 4 头盔
73
19 5 项链
74
26 6 手镯
75
22 7 戒指
76
64 8 腰带
77
62 9 鞋子
78
79
-
80
-
81 3 yangdefeng
82 6 yangdefeng
h4. &nbsp;
83 1 yangdefeng
84
bq. [<notextile>@</notextile>main]
85
%{color:lightGrey};--设置装备列表模板,可配置部件坐标信息.--%
86
#act
87
[[mov]] s$module (<[[dlg_itemSize_|itemSize]]:400:150:index>
88
[[inc]]	s$module <[[dlg_itemToggle_|itemToggle]]:huishouwupin_xuanzhongkuang:denglu_liebiao_weixuanzhong/<notextile>@</notextile>装备列表点击> %{color:lightGrey};--定义装备列表单元选中与未选中图片--%
89
inc	s$module <[[dlg_itemInsId_|itemInsId]]:instanceId> %{color:lightGrey};--道具实例id:程序项,无须定义--%
90
inc s$module <[[dlg_itemBoxEx_|itemBoxEx]]:itemId:instanceId:sourceType:equipplace:20:20:wupinkuang:looks:effectname:animation> %{color:lightGrey};--定义道具图标在装备列表单元中的坐标--%
91
inc s$module <[[dlg_text_|text]]:itemName{scolor=168}:140:30> %{color:lightGrey};--定义道具名称在装备列表单元中的文本属性--%
92
inc s$module <text:itemType{scolor=25}:160:90>) %{color:lightGrey};--定义道具部位名称在装备列表单元中的文本属性--%
93
*[[setModule]]* s$module
94
&nbsp;
95
%{color:lightGrey};--设定\"身上\"与\"背包\"切换按钮--%
96
mov s$切换按钮 (
97
inc s$切换按钮 <[[dlg_itemIndex_|itemIndex]]:1>
98
inc s$切换按钮 <itemToggle:lc_shijieliaotian_xuanzhong:lc_shijieliaotian_weixuanzhong/<notextile>@</notextile>身背切换(1)>
99
inc s$切换按钮 <text:身上装备{scolor=150}:75:50>
100
inc s$切换按钮 )
101
&nbsp;
102
inc s$切换按钮 (
103
inc s$切换按钮 <itemIndex:2>
104
inc s$切换按钮 <itemToggle:lc_shijieliaotian_xuanzhong:lc_shijieliaotian_weixuanzhong/<notextile>@</notextile>身背切换(2)>
105
inc s$切换按钮 <text:背包装备{scolor=150}:75:50>
106
inc s$切换按钮 )
107
&nbsp;
108
mov s$激活列表 1
109
goto <notextile>@</notextile>获取装备列表
110
&nbsp;
111
[<notextile>@</notextile>获取装备列表]
112
#act
113
*[[getEquipList]]* 1 <$str(s$激活列表)> s$装备列表
114
*[[getEquipListFirst]]* s$装备列表
115
goto <notextile>@</notextile>右侧刷新
116
goto <notextile>@</notextile>显示界面
117
goto <notextile>@</notextile>装备列表点击
118
&nbsp;
119
%{color:lightGrey};-----------------------------------------------------------------------------%
120
%{color:lightGrey};--右侧改造界面显示数据处理--%
121
%{color:lightGrey};--此处为固定显示示例,真实应用请根据业务实例做相应改造--%
122
%{color:lightGrey};--参考装备自定义属性相关命令--%
123
%{color:lightGrey};-----------------------------------------------------------------------------%
124
[<notextile>@</notextile>右侧刷新]
125
#if
126
[[equal]] [[自定义道具栏返回变量|<notextile><$boxItem[0].name></notextile>]]
127
#act
128
mov s$改造属性1 [改造属性]+0
129
#elseAct
130
mov s$改造属性1 <$boxItem<notextile>[0]</notextile>.customText>
131
&nbsp;
132
#if
133
#act
134
mov s$改造属性2 [改造属性]+23
135
&nbsp;
136
mov s$item1 (<itemsize:500:325>
137
inc s$item1 <text:<$str(s$改造属性1)>:45:10>
138
inc s$item1 <text:<$str(s$改造属性2)>:275:10>
139
inc s$item1 <text:生命值:0:50:100>    
140
inc s$item1 \"<text:魔  防:0-0:50:150>\"
141
inc s$item1 \"<text:防  御:0-0:50:200>)\"
142
&nbsp;
143
mov s$itemList <$str(s$item1)>
144
&nbsp;
145
%{color:lightGrey};--定义预览tips显示块--%
146
%{color:lightGrey};--原始装备tips内容中自定义属性,替换为以下文本内容--%
147
mov s$改造属性2 [改造属性]+23
148
mov s$item2 (<itemsize:500:325>	
149
inc s$item2 <[[dlg_tipsPreview_|tipsPreview]]:1:<$str(s$改造属性2)>>
150
inc s$item2 <text:生命值:49342{scolor=250}:200:100>    
151
inc s$item2 \"<text:魔  防:444-1035{scolor=250}:200:150>\"
152
inc s$item2 \"<text:防  御:1147-2677{scolor=250}:200:200>)\"
153
&nbsp;
154
mov s$itemList2 <$str(s$item2)>
155
&nbsp;
156
[[refreshItem]] 当前属性 1 s$item1 0
157
refreshItem 预览属性 1 s$item2 0
158
&nbsp;
159
[<notextile>@</notextile>装备列表点击]
160
#if
161
not [[equal]] <$str(s$装备列表)>
162
#act
163
%{color:lightGrey};--putinBox 物品唯一id itemBox编号 位置类型(1身上,2背包)--%
164
*[[putinBox]]* <$str(s0)>  0 <$str(s$激活列表)>
165
putinBox <$str(s0)>  1 <$str(s$激活列表)>
166
goto <notextile>@</notextile>右侧刷新
167
#elseAct
168
[[returnBoxItem]] 0
169
returnBoxItem 1
170
&nbsp;
171
[<notextile>@</notextile>显示界面]
172
#act
173
[[openMerchantBigDlg]] lc_chuangti 4 0 0 1 0 0
174
#say 
175 7 tejie
<[[dlg_panelsize_|panelsize2]]:700:600>\
176 1 yangdefeng
<[[dlg_itemGrid_|itemGrid]]:<$str(s$切换按钮)>:切换按钮,<$str(s$激活列表)>,0,1:10:70:220,85:1,2,90,0:1>\
177
<[[dlg_equipList_|equipList]]:<$str(s$装备列表)>:身上装备改造,1:20:160:1,715,1:0> \
178
&nbsp;
179
<[[dlg_itemBox_|itemBox]]:0:-100001:0:780:120:50:50:*:251>\
180
<itemBox:1:-100001:0:1000:120:50:50:*:251>\
181
<[[dlg_imgButton_|imgButton]]:lc_anniu01:750:720:装备改造/<notextile>@</notextile>装备改造>\
182
&nbsp;
183
#if
184
not equal <$str(s$装备列表)>
185
#say
186
<[[dlg_itemList_|itemList]]:<$str(s$itemList2)>:预览属性:800:200:1,300,0:5>\
187
<itemList:<$str(s$itemList)>:当前属性:700:200:1,310,0:5>\
188
#elseSay
189
<text:没有可改造装备:840:300>
190
&nbsp;
191
[<notextile>@</notextile>身背切换]
192
#if
193
not equal s$激活列表 [[checkScriptParam|<$scriptParam1>]]
194
#act
195
mov s$激活列表 <$scriptParam1>
196
goto <notextile>@</notextile>获取装备列表
197
&nbsp;
198
%{color:lightGrey};-----------------------------------------------------------------------------%
199
%{color:lightGrey};--改造逻辑处理--%
200
%{color:lightGrey};--只支持changeCustomItem系列命令--%
201
%{color:lightGrey};--此处为固定显示示例,真实应用请根据业务实例做相应改造--%
202
%{color:lightGrey};-----------------------------------------------------------------------------%
203
[<notextile>@</notextile>装备改造]
204
#act
205
[[changeCustomItemText]] -1 [改造属性]+1
206
&nbsp;
207
[[changeCustomItemabil]] -1 0 1 1
208
changeCustomItemabil -1 1 1 2
209
changeCustomItemabil -1 5 1 6
210
&nbsp;
211
changeCustomItemabil -1 0 0 255
212
changeCustomItemabil -1 1 0 255
213
changeCustomItemabil -1 5 0 255
214
&nbsp;
215
[[changeCustomItemValue]] -1 0 = 10
216
changeCustomItemValue -1 1 = 10
217
changeCustomItemValue -1 5 = 100
218
&nbsp;
219
goto <notextile>@</notextile>装备列表点击 %{color:lightGrey};<notextile>--刷新box中的道具tips--</notextile>%