项目

一般

简介

装备强星 » 历史记录 » 修订 2

修订 1 (yangdefeng, 2022-05-07 17:48) → 修订 2/3 (yangdefeng, 2022-06-10 10:32)

h4. %{color:green}装备强星% 

 
 标签:模块示例|装备强星 

 *模块说明* 
 根据条件,筛选出装备列表 
 自定义对话框指定位置,生成上述装备列表 
 点击装备列表某个单元,将选中单元放入自定义装备位 

 *相关命令* 
 |设置装备列表模板 			 |[[setModule]] 			 | 
 |将指定实例化装备,放入指定itemBox 	 |[[putinBox]] 			 | 
 |根据筛选条件,取出装备列表 		 |[[getEquipList]] 		 | 
 |取出装备列表中第1件装备的实例化id 	 |[[getEquipListFirst]] 		 | 
 |\2. 							 | 
 |装备列表模板定义项 			 |[[dlg_itemInsId_|<itemInsId:]] 	 | 
 |装备列表模板定义项 			 |[[dlg_itemBoxEx_|<itemBoxEx:]] 	 | 
 |自定义对话框中显示装备列表的属性配置 	 |[[dlg_equipList_|<equipList:]] 	 | 

 *注意事项* 
 #say命令中出现以下命令时, 
 <temList: 
 <itemGrid: 
 <equipList: 
 %{color:deepPink}#say中<>模块必须以“\”结尾% 
 参见以下脚本示例 

 - 
 - 

 h4. *%{color:deepskyblue}特戒引擎脚本示例:%* 

 *使用前提1* 
 请开启配置开关\"isUseCustomOKPanel\" 
 |配置文件|...\Mir200\Tejieconfig\Tejieconfig.txt 	 | 
 |配置节点|[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 鞋子 

 - 
 - 

 bq. [<notextile>@</notextile>main] 
 #act 
 %{color:lightGrey};--设置装备列表模板% 
 [[mov]] s$module (<[[dlg_itemSize_|itemSize]]:400:150:index> %{color:lightGrey};定义装备列表单元宽高% 
 [[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 
 &nbsp; 
 %{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$切换按钮 ) 
 &nbsp; 
 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$切换按钮 ) 
 &nbsp; 
 mov s$激活列表 1 
 goto <notextile>@</notextile>获取装备列表 
 &nbsp; 
 [<notextile>@</notextile>获取装备列表] 
 #act 
 *[[getEquipList]]* 1 <$str(s$激活列表)> s$装备列表 
 *[[getEquipListFirst]]* s$装备列表 
 goto <notextile>@</notextile>星数刷新 
 goto <notextile>@</notextile>显示界面 
 goto <notextile>@</notextile>装备列表点击 
 &nbsp; 
 [<notextile>@</notextile>星数刷新] 
 #act 
 %{color:lightGrey};--获取itemBox中道具星数% 
 [[getItemStarNum]] -1 n$星星数 
 &nbsp; 
 mov s$item1 (<itemsize:500:100> 
 inc s$item1 <text:星星数<$str(n$星星数)>:150:0>) 
 mov s$itemList <$str(s$item1)> 
 &nbsp; 
 [[refreshItem]] 星数刷新 1 s$item1 0 
 &nbsp; 
 [<notextile>@</notextile>装备强星] 
 #act 
 [[changeItemUpgradeCount]] -1 + 1 
 goto <notextile>@</notextile>装备列表点击 %{color:lightGrey};刷新box中的道具tips% 
 &nbsp; 
 [<notextile>@</notextile>装备列表点击] 
 #act 
 %{color:lightGrey};--putinBox 物品唯一id itemBox编号 1身上,2背包% 
 [[putinBox]] <$str(s0)> 0 <$str(s$激活列表)> 
 goto <notextile>@</notextile>星数刷新 
 &nbsp; 
 [<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>\ 
 &nbsp; 
 #if 
 not [[equal]] <$str(s$装备列表)> 
 #say 
 <[[dlg_itemBox_|itemBox]]:0:-100001:0:875:400:50:50:*:251>\ 
 <[[dlg_itemList_|itemList]]:<$str(s$itemList)>:星数刷新:700:500:1,50,0:5>\ 
 <[[dlg_imgButton_|imgButton]]:lc_anniu01:845:715:装备强星/<notextile>@</notextile>装备强星>\ 
 #elseSay 
 <text:没有可装备列表:900:300> 
 &nbsp; 
 [<notextile>@</notextile>身背切换] 
 #if 
 not equal s$激活列表 [[checkScriptParam|<$scriptParam1>]] 
 #act 
 mov s$激活列表 <$scriptParam1> 
 goto <notextile>@</notextile>获取装备列表