装备改造 » 历史记录 » 修订 4
修订 3 (yangdefeng, 2022-05-23 09:32) → 修订 4/7 (yangdefeng, 2022-05-23 09:32)
h4. %{color:green}装备改造%
标签:模块示例|装备改造
*模块说明*
* 根据条件,筛选出装备列表
* 自定义对话框指定位置,生成上述装备列表
* 点击装备列表某个单元,
** 选中单元对应装备放入自定义装备位1
** 改造后的装备会出现在自定义装备位2
** 改造后 *[[自定义装备属性]]* 效果会显示在装备tips中,替换原有自定义装备属性
-
-
*相关命令*
|设置装备列表模板 |[[setModule]] |
|将指定实例化装备,放入指定itemBox |[[putinBox]] |
|根据筛选条件,取出装备列表 |[[getEquipList]] |
|取出装备列表中第1件装备的实例化id |[[getEquipListFirst]] |
|设置装备自定义属性tips显示名称 |[[changeCustomItemText]] |
|设置装备自定义属性tips显示属性文本 |[[changeCustomItemabil]] |
|设置装备自定义属性数值 |[[changeCustomItemValue]] |
|\2. |
|装备列表模板定义项 |[[dlg_itemInsId_|<itemInsId:]] |
|装备列表模板定义项 |[[dlg_itemBoxEx_|<itemBoxEx:]] |
|自定义对话框中显示装备列表的属性配置 |[[dlg_equipList_|<equipList:]] |
|预览装备tips中自定义装备属性文本设定 |[[dlg_tipsPreview_|<tipsPreview:]] |
-
-
*注意事项*
#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]
%{color:lightGrey};--设置装备列表模板,可配置部件坐标信息.--%
#act
[[mov]] s$module (<[[dlg_itemSize_|itemSize]]:400:150:index>
[[inc]] s$module <[[dlg_itemToggle_|itemToggle]]:huishouwupin_xuanzhongkuang: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$切换按钮 <[[dlg_itemIndex_|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
goto <notextile>@</notextile>获取装备列表
[<notextile>@</notextile>获取装备列表]
#act
*[[getEquipList]]* 1 <$str(s$激活列表)> s$装备列表
*[[getEquipListFirst]]* s$装备列表
goto <notextile>@</notextile>右侧刷新
goto <notextile>@</notextile>显示界面
goto <notextile>@</notextile>装备列表点击
%{color:lightGrey};-----------------------------------------------------------------------------%
%{color:lightGrey};--右侧改造界面显示数据处理--%
%{color:lightGrey};--此处为固定显示示例,真实应用请根据业务实例做相应改造--%
%{color:lightGrey};--参考装备自定义属性相关命令--%
%{color:lightGrey};-----------------------------------------------------------------------------%
[<notextile>@</notextile>右侧刷新]
#if
[[equal]] [[自定义道具栏返回变量|<notextile><$boxItem[0].name></notextile>]]
#act
mov s$改造属性1 [改造属性]+0
#elseAct
mov s$改造属性1 <$boxItem<notextile>[0]</notextile>.customText>
#if
#act
mov s$改造属性2 [改造属性]+23
mov s$item1 (<itemsize:500:325>
inc s$item1 <text:<$str(s$改造属性1)>:45:10>
inc s$item1 <text:<$str(s$改造属性2)>:275:10>
inc s$item1 <text:生命值:0:50:100>
inc s$item1 \"<text:魔 防:0-0:50:150>\"
inc s$item1 \"<text:防 御:0-0:50:200>)\"
mov s$itemList <$str(s$item1)>
%{color:lightGrey};--定义预览tips显示块--%
%{color:lightGrey};--原始装备tips内容中自定义属性,替换为以下文本内容--%
mov s$改造属性2 [改造属性]+23
mov s$item2 (<itemsize:500:325>
inc s$item2 <[[dlg_tipsPreview_|tipsPreview]]:1:<$str(s$改造属性2)>>
inc s$item2 <text:生命值:49342{scolor=250}:200:100>
inc s$item2 \"<text:魔 防:444-1035{scolor=250}:200:150>\"
inc s$item2 \"<text:防 御:1147-2677{scolor=250}:200:200>)\"
mov s$itemList2 <$str(s$item2)>
[[refreshItem]] 当前属性 1 s$item1 0
refreshItem 预览属性 1 s$item2 0
[<notextile>@</notextile>装备列表点击]
#if
not [[equal]] <$str(s$装备列表)>
#act
%{color:lightGrey};--putinBox 物品唯一id itemBox编号 位置类型(1身上,2背包)--%
*[[putinBox]]* <$str(s0)> 0 <$str(s$激活列表)>
putinBox <$str(s0)> 1 <$str(s$激活列表)>
goto <notextile>@</notextile>右侧刷新
#elseAct
[[returnBoxItem]] 0
returnBoxItem 1
[<notextile>@</notextile>显示界面]
#act
[[openMerchantBigDlg]] lc_chuangti 4 0 0 1 0 0
#say
<[[dlg_panelsize_|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_itemBox_|itemBox]]:0:-100001:0:780:120:50:50:*:251>\
<itemBox:1:-100001:0:1000:120:50:50:*:251>\
<[[dlg_imgButton_|imgButton]]:lc_anniu01:750:720:装备改造/<notextile>@</notextile>装备改造>\
#if
not equal <$str(s$装备列表)>
#say
<[[dlg_itemList_|itemList]]:<$str(s$itemList2)>:预览属性:800:200:1,300,0:5>\
<itemList:<$str(s$itemList)>:当前属性:700:200:1,310,0:5>\
#elseSay
<text:没有可改造装备:840:300>
[<notextile>@</notextile>身背切换]
#if
not equal s$激活列表 [[checkScriptParam|<$scriptParam1>]]
#act
mov s$激活列表 <$scriptParam1>
goto <notextile>@</notextile>获取装备列表
%{color:lightGrey};-----------------------------------------------------------------------------%
%{color:lightGrey};--改造逻辑处理--%
%{color:lightGrey};--只支持changeCustomItem系列命令--%
%{color:lightGrey};--此处为固定显示示例,真实应用请根据业务实例做相应改造--%
%{color:lightGrey};-----------------------------------------------------------------------------%
[<notextile>@</notextile>装备改造]
#act
[[changeCustomItemText]] -1 [改造属性]+1
[[changeCustomItemabil]] -1 0 1 1
changeCustomItemabil -1 1 1 2
changeCustomItemabil -1 5 1 6
changeCustomItemabil -1 0 0 255
changeCustomItemabil -1 1 0 255
changeCustomItemabil -1 5 0 255
[[changeCustomItemValue]] -1 0 = 10
changeCustomItemValue -1 1 = 10
changeCustomItemValue -1 5 = 100
goto <notextile>@</notextile>装备列表点击 %{color:lightGrey};<notextile>--刷新box中的道具tips--</notextile>%