装备属性转移 » 历史记录 » 版本 3
yangdefeng, 2022-05-26 20:06
| 1 | 2 | yangdefeng | h4. _*{color:green}装备属性转移*_ |
|---|---|---|---|
| 2 | 1 | yangdefeng | |
| 3 | 标签:模块示例|装备属性转移 |
||
| 4 | |||
| 5 | *模块说明* |
||
| 6 | * 根据条件,筛选出装备列表 |
||
| 7 | * 自定义对话框指定位置,生成上述装备列表 |
||
| 8 | * 点击装备列表某个单元 |
||
| 9 | ** 选中单元放入原始装备栏 |
||
| 10 | ** 装备列表中对应装备消失 |
||
| 11 | * 再次点击装备列表某个单元 |
||
| 12 | ** 选中单元放入目标装备栏 |
||
| 13 | ** 装备列表中对应装备消失 |
||
| 14 | ** 继承预览栏显示目标装备 |
||
| 15 | * 选中要转移的属性,继承预览栏中道具tips会出现相应内容 |
||
| 16 | * 点击原始装备栏的道具图标,会重置原始装备栏、目标装备栏、继承预览栏 |
||
| 17 | * 点击目标装备栏的道具图标,会重置目标装备栏、继承预览栏 |
||
| 18 | |||
| 19 | |||
| 20 | - |
||
| 21 | - |
||
| 22 | |||
| 23 | *相关命令* |
||
| 24 | |设置装备列表模板 |[[setModule]] | |
||
| 25 | |将指定实例化装备,放入指定itemBox |[[putinBox]] | |
||
| 26 | |根据筛选条件,取出装备列表 |[[getEquipList]] | |
||
| 27 | |检测是否有可转移的指定属性 |[[checkTransAtt]] | |
||
| 28 | |生成属性转移预览道具tips |[[putinBoxPreview]] | |
||
| 29 | |转移指定装备的指定属性 |[[transAtt]] | |
||
| 30 | |\2. | |
||
| 31 | |装备列表模板定义项 |[[dlg_itemInsId_|<itemInsId:]] | |
||
| 32 | |装备列表模板定义项 |[[dlg_itemBoxEx_|<itemBoxEx:]] | |
||
| 33 | |自定义对话框中显示装备列表的属性配置 |[[dlg_equipList_|<equipList:]] | |
||
| 34 | |设定itemBoxId预览装备属性转移tips |[[dlg_tipsMergePreview_|<tipsMergePreview:]] | |
||
| 35 | |||
| 36 | - |
||
| 37 | - |
||
| 38 | |||
| 39 | *注意事项* |
||
| 40 | #say命令中出现以下命令时, |
||
| 41 | <temList: |
||
| 42 | <itemGrid: |
||
| 43 | <equipList: |
||
| 44 | %{color:deepPink}#say中<>模块必须以“\”结尾% |
||
| 45 | 参见以下脚本示例 |
||
| 46 | |||
| 47 | |||
| 48 | |||
| 49 | |||
| 50 | - |
||
| 51 | - |
||
| 52 | |||
| 53 | 2 | yangdefeng | h4. *%{color:deepskyblue}特戒引擎脚本示例:%* |
| 54 | 1 | yangdefeng | |
| 55 | |||
| 56 | *使用前提1* |
||
| 57 | 请开启配置开关\"isUseCustomOKPanel\" |
||
| 58 | |配置文件|...\Mir200\Tejieconfig\Tejieconfig.txt | |
||
| 59 | |配置节点|[[tjconfig|[tjconfig]]] | |
||
| 60 | |配置项 |isUseCustomOkPanel=1 | |
||
| 61 | |||
| 62 | |||
| 63 | *使用前提2* |
||
| 64 | 请配置补丁资源\"lc\",即找到以下配置项,加入 %{color:deeppink}lc% |
||
| 65 | |配置文件|...\Mir200\Tejieconfig\Tejieconfig.txt | |
||
| 66 | |配置节点|[tjconfig] | |
||
| 67 | |配置项 |patch=aa,bb,lc | |
||
| 68 | |||
| 69 | |||
| 70 | *使用前提3* |
||
| 71 | 配置装备类型名称与显示序号 |
||
| 72 | |配置文件|...\Mir200\Tejieconfig\Tejieconfig.txt | |
||
| 73 | |配置节点|[[upGradeItem|[upGradeItem]]] | |
||
| 74 | |||
| 75 | 配置举例 |
||
| 76 | [upGradeItem] |
||
| 77 | 5 1 武器 |
||
| 78 | 10 2 衣服[男] |
||
| 79 | 11 3 衣服[女] |
||
| 80 | 15 4 头盔 |
||
| 81 | 19 5 项链 |
||
| 82 | 26 6 手镯 |
||
| 83 | 22 7 戒指 |
||
| 84 | 64 8 腰带 |
||
| 85 | 62 9 鞋子 |
||
| 86 | |||
| 87 | - |
||
| 88 | - |
||
| 89 | 2 | yangdefeng | h4. |
| 90 | 1 | yangdefeng | |
| 91 | bq. [<notextile>@</notextile>main] |
||
| 92 | #act |
||
| 93 | %{color:lightGrey};--设置装备列表模板--% |
||
| 94 | [[mov]] s$module (<[[dlg_itemSize_|itemSize]]:400:150:index> |
||
| 95 | [[inc]] s$module <[[dlg_itemToggle_|itemToggle]]:lc_alpha0:denglu_liebiao_weixuanzhong/<notextile>@</notextile>装备列表点击> %{color:lightGrey};--定义装备列表单元选中与未选中图片--% |
||
| 96 | inc s$module <[[dlg_itemInsId_|itemInsId]]:instanceId> %{color:lightGrey};--道具实例id:程序项,无须定义--% |
||
| 97 | inc s$module <[[dlg_itemboxex_|itemboxex]]:itemId:instanceId:sourceType:equipplace:20:20:wupinkuang:looks:effectname:animation> %{color:lightGrey};--定义道具图标在装备列表单元中的坐标--% |
||
| 98 | inc s$module <[[dlg_text_|text]]:itemname{scolor=168}:140:30> %{color:lightGrey};--定义道具名称在装备列表单元中的文本属性--% |
||
| 99 | inc s$module <text:itemType{scolor=25}:160:90>) %{color:lightGrey};--定义道具部位名称在装备列表单元中的文本属性--% |
||
| 100 | *[[setModule]]* s$module |
||
| 101 | |
||
| 102 | %{color:lightGrey};--设定\"身上\"与\"背包\"切换按钮--% |
||
| 103 | mov s$切换按钮 ( |
||
| 104 | inc s$切换按钮 <itemIndex:1> |
||
| 105 | inc s$切换按钮 <itemToggle:lc_shijieliaotian_xuanzhong:lc_shijieliaotian_weixuanzhong/<notextile>@</notextile>身背切换(1)> |
||
| 106 | inc s$切换按钮 <text:身上装备{scolor=150}:75:50> |
||
| 107 | inc s$切换按钮 ) |
||
| 108 | inc s$切换按钮 ( |
||
| 109 | inc s$切换按钮 <itemIndex:2> |
||
| 110 | inc s$切换按钮 <itemToggle:lc_shijieliaotian_xuanzhong:lc_shijieliaotian_weixuanzhong/<notextile>@</notextile>身背切换(2)> |
||
| 111 | inc s$切换按钮 <text:背包装备{scolor=150}:75:50> |
||
| 112 | inc s$切换按钮 ) |
||
| 113 | |
||
| 114 | mov s$激活列表 1 %{color:lightGrey};--设定初始选中\"身上\"页签--% |
||
| 115 | |
||
| 116 | goto <notextile>@</notextile>勾选重置 |
||
| 117 | goto <notextile>@</notextile>获取装备列表 |
||
| 118 | goto <notextile>@</notextile>刷新非文字 |
||
| 119 | goto <notextile>@</notextile>刷新文字 |
||
| 120 | goto <notextile>@</notextile>显示界面 |
||
| 121 | |
||
| 122 | [<notextile>@</notextile>勾选重置] |
||
| 123 | #act |
||
| 124 | mov n$颜色1 255 |
||
| 125 | mov n$颜色2 255 |
||
| 126 | mov n$颜色3 255 |
||
| 127 | |
||
| 128 | mov n$勾选1预制 0 |
||
| 129 | mov n$勾选2预制 0 |
||
| 130 | |
||
| 131 | [<notextile>@</notextile>身背切换] |
||
| 132 | #if |
||
| 133 | 2 | yangdefeng | not [[equal]] s$激活列表 [[checkScriptParam|<$scriptParam1>]] |
| 134 | 1 | yangdefeng | #act |
| 135 | 2 | yangdefeng | mov s$激活列表 [[checkScriptParam|<$scriptParam1>]] |
| 136 | 1 | yangdefeng | goto <notextile>@</notextile>获取装备列表 |
| 137 | goto <notextile>@</notextile>刷新非文字 |
||
| 138 | goto <notextile>@</notextile>刷新文字 |
||
| 139 | goto <notextile>@</notextile>显示界面 |
||
| 140 | |
||
| 141 | [<notextile>@</notextile>获取装备列表] |
||
| 142 | #if |
||
| 143 | equal [[自定义道具栏返回变量|<notextile><$boxItem[0].name></notextile>]] |
||
| 144 | #act |
||
| 145 | *[[getEquipList]]* 1 <$str(s$激活列表)> s$装备列表 <notextile>-1 -1 -1</notextile> %{color:lightGrey};--原始装备列表--% |
||
| 146 | |
||
| 147 | #if |
||
| 148 | not equal [[自定义道具栏返回变量|<notextile><$boxItem[0].name></notextile>]] |
||
| 149 | equal <notextile><$boxItem[1].name></notextile> |
||
| 150 | #act |
||
| 151 | getEquipList 1 <$str(s$激活列表)> s$装备列表 <notextile>-1</notextile> <$str(s$原始类别)> <$str(s$原始insId)>, %{color:lightGrey};--目标装备列表(过滤原始装备)--% |
||
| 152 | |
||
| 153 | #if |
||
| 154 | not equal <notextile><$boxItem[0].name></notextile> |
||
| 155 | not equal <notextile><$boxItem[1].name></notextile> |
||
| 156 | #act |
||
| 157 | getEquipList 1 <$str(s$激活列表)> s$装备列表 <notextile>-1</notextile> <$str(s$原始类别)> <$str(s$原始insId)>,<$str(s$目标insId)>, %{color:lightGrey};--其它装备列表(过滤原始和目标装备)--% |
||
| 158 | |
||
| 159 | [<notextile>@</notextile>刷新非文字] |
||
| 160 | #act |
||
| 161 | mov s$item1 (<[[dlg_itemsize_|itemsize]]:500:325> |
||
| 162 | inc s$item1 <[[dlg_itemBox_|itemBox]]:0:-100001:0:80:0:50:50:*:251> %{color:lightGrey};--原始装备--% |
||
| 163 | inc s$item1 <[[dlg_img_|img]]:lc_alpha0:80:0:1:1/<notextile>@</notextile>清空box0> |
||
| 164 | inc s$item1 <[[dlg_imgButton_|imgButton]]:lc_anniu01:200:670:属性转移/<notextile>@</notextile>属性转移> |
||
| 165 | inc s$item1 <text:原始装备:75:110> |
||
| 166 | inc s$item1 <[[dlg_itemBox_|itemBox]]:1:-100001:0:300:0:50:50:*:251> %{color:lightGrey};--目标装备--% |
||
| 167 | inc s$item1 <img:lc_alpha0:300:0:1:1/<notextile>@</notextile>清空box1> |
||
| 168 | inc s$item1 <itemBox:2:-100001:0:205:200:50:50:*:251> %{color:lightGrey};--预览装备--% |
||
| 169 | inc s$item1 <[[dlg_checkBox_|checkBox]]:1:settings_markbg:settings_mark:<$str(n$勾选1预制)>:50:400/<notextile>@</notextile>勾选1> |
||
| 170 | inc s$item1 <checkBox:2:settings_markbg:settings_mark:<$str(n$勾选2预制)>:50:475/<notextile>@</notextile>勾选2> |
||
| 171 | inc s$item1 *<[[dlg_tipsMergePreview_|tipsMergePreview]]:2>* |
||
| 172 | inc s$item1 <text:目标装备:285:110> |
||
| 173 | inc s$item1 <text:继承预览:200:300>) |
||
| 174 | mov s$itemList <$str(s$item1)> |
||
| 175 | |
||
| 176 | [<notextile>@</notextile>刷新文字] |
||
| 177 | %{color:lightGrey};--此处文字为示意固定值,请根据真实情况补充文字取值逻辑--% |
||
| 178 | #act |
||
| 179 | mov s$item2 (<itemsize:500:325> |
||
| 180 | inc s$item2 <itemToggle:pic:pic> |
||
| 181 | inc s$item2 \"<text:[改造属性]+10 消耗9999{scolor=<$str(n$颜色1)>}:120:400>\" |
||
| 182 | inc s$item2 \"<text:[额外属性] 消耗9999{scolor=<$str(n$颜色2)>}:120:475>)\" |
||
| 183 | mov s$itemList2 <$str(s$item2)> |
||
| 184 | |
||
| 185 | [<notextile>@</notextile>显示界面] |
||
| 186 | #act |
||
| 187 | [[openMerchantBigDlg]] lc_chuangti 4 0 0 1 0 0 |
||
| 188 | #say |
||
| 189 | <panelsize:700:600>\ |
||
| 190 | <[[dlg_itemGrid_|itemGrid]]:<$str(s$切换按钮)>:切换按钮,<$str(s$激活列表)>,0,1:10:70:220,85:1,2,90,0:1>\ |
||
| 191 | <[[dlg_equipList_|equipList]]:<$str(s$装备列表)>:身上装备强星,1:20:160:1,715,1:0> \ |
||
| 192 | <[[dlg_itemList_|itemList]]:<$str(s$itemList2)>:刷新文字:700:100:1,750,0:5>\ |
||
| 193 | <itemList:<$str(s$itemList)>:刷新非文字:700:100:1,750,0:5>\ |
||
| 194 | |
||
| 195 | #if |
||
| 196 | equal <$str(s$装备列表)> |
||
| 197 | #say |
||
| 198 | <text:没有可转移的装备{scolor=159}:100:300> |
||
| 199 | |
||
| 200 | |
||
| 201 | |
||
| 202 | |
||
| 203 | [<notextile>@</notextile>装备列表点击] |
||
| 204 | %{color:lightGrey};--放置目标装备--% |
||
| 205 | #if |
||
| 206 | <notextile>not equal <$boxItem[0].name></notextile> |
||
| 207 | <notextile>equal <$boxItem[1].name></notextile> |
||
| 208 | #act |
||
| 209 | mov s$目标insId <$str(s0)> |
||
| 210 | mov s$预览激活 <$str(s$激活列表)> |
||
| 211 | *[[putinBox]]* <$str(s$目标insId)> 1 <$str(s$激活列表)> |
||
| 212 | goto <notextile>@</notextile>获取装备列表 |
||
| 213 | goto <notextile>@</notextile>刷新非文字 |
||
| 214 | goto <notextile>@</notextile>显示界面 |
||
| 215 | goto <notextile>@</notextile>目标放置预览框 |
||
| 216 | |
||
| 217 | %{color:lightGrey};--放置原始装备--% |
||
| 218 | #if |
||
| 219 | <notextile>equal <$boxItem[0].name></notextile> |
||
| 220 | #act |
||
| 221 | mov s$原始insId <$str(s0)> |
||
| 222 | putinBox <$str(s$原始insId)> 0 <$str(s$激活列表)> |
||
| 223 | <notextile>mov s$原始类别 <$boxItem[0].stdMode></notextile> |
||
| 224 | goto <notextile>@</notextile>获取装备列表 |
||
| 225 | goto <notextile>@</notextile>刷新非文字 |
||
| 226 | goto <notextile>@</notextile>显示界面 |
||
| 227 | |
||
| 228 | |
||
| 229 | |
||
| 230 | |
||
| 231 | [<notextile>@</notextile>清空box0] |
||
| 232 | #act |
||
| 233 | returnboxItem 0 |
||
| 234 | goto <notextile>@</notextile>勾选重置 |
||
| 235 | goto <notextile>@</notextile>刷新文字 |
||
| 236 | goto <notextile>@</notextile>清空box1 |
||
| 237 | |
||
| 238 | [<notextile>@</notextile>清空box1] |
||
| 239 | #act |
||
| 240 | [[returnboxItem]] 1 |
||
| 241 | returnboxItem 2 |
||
| 242 | goto <notextile>@</notextile>获取装备列表 |
||
| 243 | goto <notextile>@</notextile>刷新非文字 |
||
| 244 | goto <notextile>@</notextile>显示界面 |
||
| 245 | |
||
| 246 | |
||
| 247 | |
||
| 248 | |
||
| 249 | %{color:lightGrey};--------------------------------------------------------------------------% |
||
| 250 | %{color:lightGrey};--勾选处理--% |
||
| 251 | %{color:lightGrey};--------------------------------------------------------------------------% |
||
| 252 | [<notextile>@</notextile>转移属性检测] |
||
| 253 | #if |
||
| 254 | <notextile>equal <$boxItem[0].name></notextile> %{color:lightGrey};--原始装备栏为空时,无转移勾选可用--% |
||
| 255 | #act |
||
| 256 | mov n$可用 0 |
||
| 257 | break |
||
| 258 | |
||
| 259 | #if |
||
| 260 | #act |
||
| 261 | mov n$chkVar <$str(n$勾选idx)> %{color:lightGrey};--勾选idx=1,检测类型2是否可用;勾选idx=2,检测类型3是否可用;--% |
||
| 262 | inc n$chkVar 1 |
||
| 263 | |
||
| 264 | #if |
||
| 265 | *[[checkTransAtt]]* <$str(s$原始insId)> <$str(n$chkVar)> |
||
| 266 | #act |
||
| 267 | mov n$可用 1 |
||
| 268 | #elseAct |
||
| 269 | mov n$可用 0 |
||
| 270 | |
||
| 271 | [<notextile>@</notextile>勾选1] |
||
| 272 | #act |
||
| 273 | mov n$勾选idx 1 |
||
| 274 | goto <notextile>@</notextile>勾选逻辑 |
||
| 275 | |
||
| 276 | [<notextile>@</notextile>勾选2] |
||
| 277 | #act |
||
| 278 | mov n$勾选idx 2 |
||
| 279 | goto <notextile>@</notextile>勾选逻辑 |
||
| 280 | |
||
| 281 | [<notextile>@</notextile>勾选逻辑] |
||
| 282 | #act |
||
| 283 | goto <notextile>@</notextile>转移属性检测 |
||
| 284 | |
||
| 285 | #if |
||
| 286 | equal <$str(n$可用)> 0 |
||
| 287 | #act |
||
| 288 | [[messageBox]] 没有可转移的改造属性 |
||
| 289 | *[[setCheckBox]]* checkBox<$str(n$勾选idx)> 0 |
||
| 290 | mov n$勾选<$str(n$勾选idx)>预制 0 |
||
| 291 | goto <notextile>@</notextile>刷新非文字 |
||
| 292 | goto <notextile>@</notextile>显示界面 |
||
| 293 | #elseAct |
||
| 294 | mov s$勾选状态 <$checkbox<$str(n$勾选idx)>> |
||
| 295 | goto <notextile>@</notextile>字色刷新 |
||
| 296 | |
||
| 297 | [<notextile>@</notextile>字色刷新] |
||
| 298 | #if |
||
| 299 | equal <$str(s$勾选状态)> 1 |
||
| 300 | #act |
||
| 301 | mov n$颜色<$str(n$勾选idx)> 250 |
||
| 302 | mov n$勾选<$str(n$勾选idx)>预制 1 |
||
| 303 | |
||
| 304 | #if |
||
| 305 | equal <$str(s$勾选状态)> 0 |
||
| 306 | #act |
||
| 307 | mov n$颜色<$str(n$勾选idx)> 255 |
||
| 308 | mov n$勾选<$str(n$勾选idx)>预制 0 |
||
| 309 | |
||
| 310 | #if |
||
| 311 | #act |
||
| 312 | goto <notextile>@</notextile>刷新文字 |
||
| 313 | *[[refreshItem]]* 刷新文字 1 <$str(s$item2)> 0 |
||
| 314 | goto <notextile>@</notextile>目标放置预览框 |
||
| 315 | |
||
| 316 | [<notextile>@</notextile>目标放置预览框] |
||
| 317 | #if |
||
| 318 | <notextile>not equal <$boxItem[1].name></notextile> |
||
| 319 | #act |
||
| 320 | putinBox <$str(s$目标insId)> 2 <$str(s$预览激活)> |
||
| 321 | *[[putinBoxPreview]]* 0,<$str(n$勾选1预制)>,<$str(n$勾选2预制)> 0 1 |
||
| 322 | |
||
| 323 | |
||
| 324 | |
||
| 325 | |
||
| 326 | %{color:lightGrey};--------------------------------------------------------------------------% |
||
| 327 | %{color:lightGrey};--执行属性转移操作,请自行补充花费处理逻辑--% |
||
| 328 | %{color:lightGrey};--------------------------------------------------------------------------% |
||
| 329 | [<notextile>@</notextile>属性转移] |
||
| 330 | #if |
||
| 331 | equal <$str(n$勾选1预制)> 0 |
||
| 332 | equal <$str(n$勾选2预制)> 0 |
||
| 333 | #act |
||
| 334 | messageBox 未选择任何可转移的属性 |
||
| 335 | |
||
| 336 | #if |
||
| 337 | #act |
||
| 338 | *[[transAtt]]* 0,<$str(n$勾选1预制)>,<$str(n$勾选2预制)> 0 1 |