装备属性转移 » 历史记录 » 修订 3
修订 2 (yangdefeng, 2022-05-25 11:18) → 修订 3/4 (yangdefeng, 2022-05-26 20:06)
h4. _*{color:green}装备属性转移*_
标签:模块示例|装备属性转移
*模块说明*
* 根据条件,筛选出装备列表
* 自定义对话框指定位置,生成上述装备列表
* 点击装备列表某个单元
** 选中单元放入原始装备栏
** 装备列表中对应装备消失
* 再次点击装备列表某个单元
** 选中单元放入目标装备栏
** 装备列表中对应装备消失
** 继承预览栏显示目标装备
* 选中要转移的属性,继承预览栏中道具tips会出现相应内容
* 点击原始装备栏的道具图标,会重置原始装备栏、目标装备栏、继承预览栏
* 点击目标装备栏的道具图标,会重置目标装备栏、继承预览栏
-
-
*相关命令*
|设置装备列表模板 |[[setModule]] |
|将指定实例化装备,放入指定itemBox |[[putinBox]] |
|根据筛选条件,取出装备列表 |[[getEquipList]] |
|检测是否有可转移的指定属性 |[[checkTransAtt]] |
|生成属性转移预览道具tips |[[putinBoxPreview]] |
|转移指定装备的指定属性 |[[transAtt]] |
|\2. |
|装备列表模板定义项 |[[dlg_itemInsId_|<itemInsId:]] |
|装备列表模板定义项 |[[dlg_itemBoxEx_|<itemBoxEx:]] |
|自定义对话框中显示装备列表的属性配置 |[[dlg_equipList_|<equipList:]] |
|设定itemBoxId预览装备属性转移tips |[[dlg_tipsMergePreview_|<tipsMergePreview:]] |
-
-
*注意事项*
#say命令中出现以下命令时,
<temList:
<itemGrid:
<equipList:
%{color:deepPink}#say中<>模块必须以“\”结尾%
参见以下脚本示例
-
-
h4. *%{color:deepskyblue}特戒引擎脚本示例:%*
*使用前提1*
请开启配置开关\"isUseCustomOKPanel\"
|配置文件|...\Mir200\Tejieconfig\Tejieconfig.txt |
|配置节点|[[tjconfig|[tjconfig]]] |
|配置项 |isUseCustomOkPanel=1 |
*使用前提2*
请配置补丁资源\"lc\",即找到以下配置项,加入 %{color:deeppink}lc%
|配置文件|...\Mir200\Tejieconfig\Tejieconfig.txt |
|配置节点|[tjconfig] |
|配置项 |patch=aa,bb,lc |
*使用前提3*
配置装备类型名称与显示序号
|配置文件|...\Mir200\Tejieconfig\Tejieconfig.txt |
|配置节点|[[upGradeItem|[upGradeItem]]] |
配置举例
[upGradeItem]
5 1 武器
10 2 衣服[男]
11 3 衣服[女]
15 4 头盔
19 5 项链
26 6 手镯
22 7 戒指
64 8 腰带
62 9 鞋子
-
-
h4.
bq. [<notextile>@</notextile>main]
#act
%{color:lightGrey};--设置装备列表模板--%
[[mov]] s$module (<[[dlg_itemSize_|itemSize]]:400:150:index>
[[inc]] s$module <[[dlg_itemToggle_|itemToggle]]:lc_alpha0:denglu_liebiao_weixuanzhong/<notextile>@</notextile>装备列表点击> %{color:lightGrey};--定义装备列表单元选中与未选中图片--%
inc s$module <[[dlg_itemInsId_|itemInsId]]:instanceId> %{color:lightGrey};--道具实例id:程序项,无须定义--%
inc s$module <[[dlg_itemboxex_|itemboxex]]:itemId:instanceId:sourceType:equipplace:20:20:wupinkuang:looks:effectname:animation> %{color:lightGrey};--定义道具图标在装备列表单元中的坐标--%
inc s$module <[[dlg_text_|text]]:itemname{scolor=168}:140:30> %{color:lightGrey};--定义道具名称在装备列表单元中的文本属性--%
inc s$module <text:itemType{scolor=25}:160:90>) %{color:lightGrey};--定义道具部位名称在装备列表单元中的文本属性--%
*[[setModule]]* s$module
%{color:lightGrey};--设定\"身上\"与\"背包\"切换按钮--%
mov s$切换按钮 (
inc s$切换按钮 <itemIndex:1>
inc s$切换按钮 <itemToggle:lc_shijieliaotian_xuanzhong:lc_shijieliaotian_weixuanzhong/<notextile>@</notextile>身背切换(1)>
inc s$切换按钮 <text:身上装备{scolor=150}:75:50>
inc s$切换按钮 )
inc s$切换按钮 (
inc s$切换按钮 <itemIndex:2>
inc s$切换按钮 <itemToggle:lc_shijieliaotian_xuanzhong:lc_shijieliaotian_weixuanzhong/<notextile>@</notextile>身背切换(2)>
inc s$切换按钮 <text:背包装备{scolor=150}:75:50>
inc s$切换按钮 )
mov s$激活列表 1 %{color:lightGrey};--设定初始选中\"身上\"页签--%
goto <notextile>@</notextile>勾选重置
goto <notextile>@</notextile>获取装备列表
goto <notextile>@</notextile>刷新非文字
goto <notextile>@</notextile>刷新文字
goto <notextile>@</notextile>显示界面
[<notextile>@</notextile>勾选重置]
#act
mov n$颜色1 255
mov n$颜色2 255
mov n$颜色3 255
mov n$勾选1预制 0
mov n$勾选2预制 0
[<notextile>@</notextile>身背切换]
#if
not [[equal]] s$激活列表 [[checkScriptParam|<$scriptParam1>]]
#act
mov s$激活列表 [[checkScriptParam|<$scriptParam1>]]
goto <notextile>@</notextile>获取装备列表
goto <notextile>@</notextile>刷新非文字
goto <notextile>@</notextile>刷新文字
goto <notextile>@</notextile>显示界面
[<notextile>@</notextile>获取装备列表]
#if
equal [[自定义道具栏返回变量|<notextile><$boxItem[0].name></notextile>]]
#act
*[[getEquipList]]* 1 <$str(s$激活列表)> s$装备列表 <notextile>-1 -1 -1</notextile> %{color:lightGrey};--原始装备列表--%
#if
not equal [[自定义道具栏返回变量|<notextile><$boxItem[0].name></notextile>]]
equal <notextile><$boxItem[1].name></notextile>
#act
getEquipList 1 <$str(s$激活列表)> s$装备列表 <notextile>-1</notextile> <$str(s$原始类别)> <$str(s$原始insId)>, %{color:lightGrey};--目标装备列表(过滤原始装备)--%
#if
not equal <notextile><$boxItem[0].name></notextile>
not equal <notextile><$boxItem[1].name></notextile>
#act
getEquipList 1 <$str(s$激活列表)> s$装备列表 <notextile>-1</notextile> <$str(s$原始类别)> <$str(s$原始insId)>,<$str(s$目标insId)>, %{color:lightGrey};--其它装备列表(过滤原始和目标装备)--%
[<notextile>@</notextile>刷新非文字]
#act
mov s$item1 (<[[dlg_itemsize_|itemsize]]:500:325>
inc s$item1 <[[dlg_itemBox_|itemBox]]:0:-100001:0:80:0:50:50:*:251> %{color:lightGrey};--原始装备--%
inc s$item1 <[[dlg_img_|img]]:lc_alpha0:80:0:1:1/<notextile>@</notextile>清空box0>
inc s$item1 <[[dlg_imgButton_|imgButton]]:lc_anniu01:200:670:属性转移/<notextile>@</notextile>属性转移>
inc s$item1 <text:原始装备:75:110>
inc s$item1 <[[dlg_itemBox_|itemBox]]:1:-100001:0:300:0:50:50:*:251> %{color:lightGrey};--目标装备--%
inc s$item1 <img:lc_alpha0:300:0:1:1/<notextile>@</notextile>清空box1>
inc s$item1 <itemBox:2:-100001:0:205:200:50:50:*:251> %{color:lightGrey};--预览装备--%
inc s$item1 <[[dlg_checkBox_|checkBox]]:1:settings_markbg:settings_mark:<$str(n$勾选1预制)>:50:400/<notextile>@</notextile>勾选1>
inc s$item1 <checkBox:2:settings_markbg:settings_mark:<$str(n$勾选2预制)>:50:475/<notextile>@</notextile>勾选2>
inc s$item1 *<[[dlg_tipsMergePreview_|tipsMergePreview]]:2>*
inc s$item1 <text:目标装备:285:110>
inc s$item1 <text:继承预览:200:300>)
mov s$itemList <$str(s$item1)>
[<notextile>@</notextile>刷新文字]
%{color:lightGrey};--此处文字为示意固定值,请根据真实情况补充文字取值逻辑--%
#act
mov s$item2 (<itemsize:500:325>
inc s$item2 <itemToggle:pic:pic>
inc s$item2 \"<text:[改造属性]+10 消耗9999{scolor=<$str(n$颜色1)>}:120:400>\"
inc s$item2 \"<text:[额外属性] 消耗9999{scolor=<$str(n$颜色2)>}:120:475>)\"
mov s$itemList2 <$str(s$item2)>
[<notextile>@</notextile>显示界面]
#act
[[openMerchantBigDlg]] lc_chuangti 4 0 0 1 0 0
#say
<panelsize:700:600>\
<[[dlg_itemGrid_|itemGrid]]:<$str(s$切换按钮)>:切换按钮,<$str(s$激活列表)>,0,1:10:70:220,85:1,2,90,0:1>\
<[[dlg_equipList_|equipList]]:<$str(s$装备列表)>:身上装备强星,1:20:160:1,715,1:0> \
<[[dlg_itemList_|itemList]]:<$str(s$itemList2)>:刷新文字:700:100:1,750,0:5>\
<itemList:<$str(s$itemList)>:刷新非文字:700:100:1,750,0:5>\
#if
equal <$str(s$装备列表)>
#say
<text:没有可转移的装备{scolor=159}:100:300>
[<notextile>@</notextile>装备列表点击]
%{color:lightGrey};--放置目标装备--%
#if
<notextile>not equal <$boxItem[0].name></notextile>
<notextile>equal <$boxItem[1].name></notextile>
#act
mov s$目标insId <$str(s0)>
mov s$预览激活 <$str(s$激活列表)>
*[[putinBox]]* <$str(s$目标insId)> 1 <$str(s$激活列表)>
goto <notextile>@</notextile>获取装备列表
goto <notextile>@</notextile>刷新非文字
goto <notextile>@</notextile>显示界面
goto <notextile>@</notextile>目标放置预览框
%{color:lightGrey};--放置原始装备--%
#if
<notextile>equal <$boxItem[0].name></notextile>
#act
mov s$原始insId <$str(s0)>
putinBox <$str(s$原始insId)> 0 <$str(s$激活列表)>
<notextile>mov s$原始类别 <$boxItem[0].stdMode></notextile>
goto <notextile>@</notextile>获取装备列表
goto <notextile>@</notextile>刷新非文字
goto <notextile>@</notextile>显示界面
[<notextile>@</notextile>清空box0]
#act
returnboxItem 0
goto <notextile>@</notextile>勾选重置
goto <notextile>@</notextile>刷新文字
goto <notextile>@</notextile>清空box1
[<notextile>@</notextile>清空box1]
#act
[[returnboxItem]] 1
returnboxItem 2
goto <notextile>@</notextile>获取装备列表
goto <notextile>@</notextile>刷新非文字
goto <notextile>@</notextile>显示界面
%{color:lightGrey};--------------------------------------------------------------------------%
%{color:lightGrey};--勾选处理--%
%{color:lightGrey};--------------------------------------------------------------------------%
[<notextile>@</notextile>转移属性检测]
#if
<notextile>equal <$boxItem[0].name></notextile> %{color:lightGrey};--原始装备栏为空时,无转移勾选可用--%
#act
mov n$可用 0
break
#if
#act
mov n$chkVar <$str(n$勾选idx)> %{color:lightGrey};--勾选idx=1,检测类型2是否可用;勾选idx=2,检测类型3是否可用;--%
inc n$chkVar 1
#if
*[[checkTransAtt]]* <$str(s$原始insId)> <$str(n$chkVar)>
#act
mov n$可用 1
#elseAct
mov n$可用 0
[<notextile>@</notextile>勾选1]
#act
mov n$勾选idx 1
goto <notextile>@</notextile>勾选逻辑
[<notextile>@</notextile>勾选2]
#act
mov n$勾选idx 2
goto <notextile>@</notextile>勾选逻辑
[<notextile>@</notextile>勾选逻辑]
#act
goto <notextile>@</notextile>转移属性检测
#if
equal <$str(n$可用)> 0
#act
[[messageBox]] 没有可转移的改造属性
*[[setCheckBox]]* checkBox<$str(n$勾选idx)> 0
mov n$勾选<$str(n$勾选idx)>预制 0
goto <notextile>@</notextile>刷新非文字
goto <notextile>@</notextile>显示界面
#elseAct
mov s$勾选状态 <$checkbox<$str(n$勾选idx)>>
goto <notextile>@</notextile>字色刷新
[<notextile>@</notextile>字色刷新]
#if
equal <$str(s$勾选状态)> 1
#act
mov n$颜色<$str(n$勾选idx)> 250
mov n$勾选<$str(n$勾选idx)>预制 1
#if
equal <$str(s$勾选状态)> 0
#act
mov n$颜色<$str(n$勾选idx)> 255
mov n$勾选<$str(n$勾选idx)>预制 0
#if
#act
goto <notextile>@</notextile>刷新文字
*[[refreshItem]]* 刷新文字 1 <$str(s$item2)> 0
goto <notextile>@</notextile>目标放置预览框
[<notextile>@</notextile>目标放置预览框]
#if
<notextile>not equal <$boxItem[1].name></notextile>
#act
putinBox <$str(s$目标insId)> 2 <$str(s$预览激活)>
*[[putinBoxPreview]]* 0,<$str(n$勾选1预制)>,<$str(n$勾选2预制)> 0 1
%{color:lightGrey};--------------------------------------------------------------------------%
%{color:lightGrey};--执行属性转移操作,请自行补充花费处理逻辑--%
%{color:lightGrey};--------------------------------------------------------------------------%
[<notextile>@</notextile>属性转移]
#if
equal <$str(n$勾选1预制)> 0
equal <$str(n$勾选2预制)> 0
#act
messageBox 未选择任何可转移的属性
#if
#act
*[[transAtt]]* 0,<$str(n$勾选1预制)>,<$str(n$勾选2预制)> 0 1