采集 » 历史记录 » 版本 4
chenjun, 2022-06-06 09:24
| 1 | 1 | chenjun | h4. %{color:green}采集% |
|---|---|---|---|
| 2 | |||
| 3 | |||
| 4 | 2 | chenjun | 标签:模块示例|采集 |
| 5 | |||
| 6 | *模块说明* |
||
| 7 | 3 | chenjun | 人物靠近可采集资源时,屏幕中间会出现采集按钮 |
| 8 | 4 | chenjun | 点击采集按钮,进度条走完可获得采集奖励,采集资源消失(怪物被杀死) |
| 9 | 采集过程中,人物移动或被攻击将中断采集 |
||
| 10 | 2 | chenjun | |
| 11 | 3 | chenjun | |
| 12 | *相关配置* |
||
| 13 | 1 | chenjun | 可采集资源通过在地图刷新怪物实现 |
| 14 | ..\Mir200\Envir\MonGen.txt |
||
| 15 | 4 | chenjun | * 第18个参数 |
| 16 | ** 2-可采集怪(带墓碑效果,如天书,采集完了有墓碑) |
||
| 17 | ** 3-可采集怪(无墓碑效果,如宝箱,采集完了没有墓碑) |
||
| 18 | 3 | chenjun | |
| 19 | 4 | chenjun | 采集奖励通过配置怪物掉落,配合采集时杀死怪物的命令[[nearKillMon]]实现 |
| 20 | 3 | chenjun | ..\Mir200\Envir\MonItems\ |
| 21 | |||
| 22 | 4 | chenjun | |
| 23 | 1 | chenjun | - |
| 24 | - |
||
| 25 | |||
| 26 | h4. *%{color:deepskyblue}特戒引擎脚本示例:%* |
||
| 27 | |||
| 28 | - |
||
| 29 | - |
||
| 30 | |||
| 31 | 4 | chenjun | bq. %{color:lightGrey};..\scripts\Mir200\Envir\QuestDiary\采集\采集.txt% |
| 32 | [<notextile>@</notextile>main] |
||
| 33 | #if |
||
| 34 | %{color:lightGrey};检测人物附近有没有可采集物% |
||
| 35 | *{color:green}[[checkRangeMonCountEX]]* 神龙山庄 高级神物 <$X> <$Y> 3 > 0 |
||
| 36 | #act |
||
| 37 | mov S$采集怪物名字 高级神物 |
||
| 38 | goto <notextile>@</notextile>采集按钮显示 |
||
| 39 | break |
||
| 40 | |
||
| 41 | #if |
||
| 42 | %{color:lightGrey};检测人物附近有没有可采集物% |
||
| 43 | checkRangeMonCountEX 神龙山庄 低级神物 <$X> <$Y> 3 > 0 |
||
| 44 | #act |
||
| 45 | mov S$采集怪物名字 低级神物 |
||
| 46 | goto <notextile>@</notextile>采集按钮显示 |
||
| 47 | break |
||
| 48 | #elseact |
||
| 49 | goto <notextile>@</notextile>采集按钮隐藏 |
||
| 50 | |
||
| 51 | |
||
| 52 | [<notextile>@</notextile>采集按钮显示] |
||
| 53 | #if |
||
| 54 | check [3007] 0 |
||
| 55 | #act |
||
| 56 | set [3007] 1 |
||
| 57 | goto <notextile>@</notextile>采集中 |
||
| 58 | |
||
| 59 | |
||
| 60 | [<notextile>@</notextile>采集按钮隐藏] |
||
| 61 | #if |
||
| 62 | check [3007] 1 |
||
| 63 | #act |
||
| 64 | set [3007] 0 |
||
| 65 | *{color:green}[[delMainCenterBtn]]* 采集中按钮 |
||
| 66 | |
||
| 67 | |
||
| 68 | [<notextile>@</notextile>采集中] |
||
| 69 | #if |
||
| 70 | %{color:lightGrey};检测人物体力值是否满足采集消耗% |
||
| 71 | large U80 14 |
||
| 72 | #act |
||
| 73 | *{color:green}[[addMainCenterBtn]]* 采集中按钮 2 lc_wajue,lc_caiji_jishi2,5000,采集中 0,-100 可采集 250 32 0,-183 lc_wajue_di <$X>,<$Y>,7,1 采集中,采集进度条走完 |
||
| 74 | #elseact |
||
| 75 | addMainCenterBtn 采集中按钮 1 lc_wajue 0,-100 可采集 250 32 0,-183 lc_wajue_di 0,0,0,1 体力不足 |
||
| 76 | |
||
| 77 | |
||
| 78 | [<notextile>@</notextile>体力不足] |
||
| 79 | #if |
||
| 80 | #act |
||
| 81 | sendTipsMSG 体力不足:15 |
||
| 82 | |
||
| 83 | |
||
| 84 | [<notextile>@</notextile>采集进度条走完] |
||
| 85 | #if |
||
| 86 | #act |
||
| 87 | delMainCenterBtn 采集中按钮 |
||
| 88 | %{color:lightGrey};杀死采集资源怪并获取掉落% |
||
| 89 | *{color:green}[[nearKillMon]]* 3 <$STR(S$采集怪物名字)> 1 |
||
| 90 | dec U80 15 |
||
| 91 | sendTipsMSG 采集成功 |
||
| 92 | #call [\采集\采集.txt] <notextile>@</notextile>神龙山庄侧边栏 |
||
| 93 | #elseact |
||
| 94 | sendTipsMSG 采集失败 |
||
| 95 | |
||
| 96 | |
||
| 97 | %{color:lightGrey};QFunction-0.txt的触发器会调用这里% |
||
| 98 | [<notextile>@</notextile>采集失败] |
||
| 99 | #if |
||
| 100 | check [3007] 1 |
||
| 101 | #act |
||
| 102 | set [3007] 0 |
||
| 103 | delMainCenterBtn 采集中按钮 |
||
| 104 | |
||
| 105 | |
||
| 106 | %{color:lightGrey};位于采集地图时任务侧边栏的显示% |
||
| 107 | [<notextile>@</notextile>神龙山庄侧边栏] |
||
| 108 | #if |
||
| 109 | #act |
||
| 110 | mov U3036 1 |
||
| 111 | |
||
| 112 | #if |
||
| 113 | #act |
||
| 114 | mov N3015 0 |
||
| 115 | *{color:green}[[getRangeMonCount]]* 神龙山庄 90 88 500 N3007 神魔矿工首领 |
||
| 116 | getRangeMonCount 神龙山庄 90 88 500 N3008 神魔骑兵首领 |
||
| 117 | getRangeMonCount 神龙山庄 90 88 500 N3009 神魔刀兵首领 |
||
| 118 | getRangeMonCount 神龙山庄 90 88 500 N3010 神魔力士首领 |
||
| 119 | inc N3015 N3007 |
||
| 120 | inc N3015 N3008 |
||
| 121 | inc N3015 N3009 |
||
| 122 | inc N3015 N3010 |
||
| 123 | getRangeMonCount 神龙山庄 90 88 500 N3011 低级神物 |
||
| 124 | getRangeMonCount 神龙山庄 90 88 500 N3012 高级神物 |
||
| 125 | mov N3016 0 |
||
| 126 | getRangeMonCount 神龙山庄 90 88 500 N3013 魔神半兽人 |
||
| 127 | getRangeMonCount 神龙山庄 90 88 500 N3014 魔神兽人 |
||
| 128 | inc N3016 N3013 |
||
| 129 | inc N3016 N3014 |
||
| 130 | |
||
| 131 | #if |
||
| 132 | isOnMap 神龙山庄 |
||
| 133 | #act |
||
| 134 | mov s$sideInfo3 |
||
| 135 | inc s$sideInfo3 <text:当前体力剩余:<$str(U80)>{fcolor=250}:10:0> |
||
| 136 | inc s$sideInfo3 <text:山庄魔神消耗:30{fcolor=161}:10:40> |
||
| 137 | inc s$sideInfo3 <text:山庄首领消耗:5{fcolor=161}:10:80> |
||
| 138 | inc s$sideInfo3 <text:山庄圣物消耗:15{scolor=161}:10:120> |
||
| 139 | inc s$sideInfo3 <text:魔神剩余数量:<$str(N3016)>{scolor=251}:10:160> |
||
| 140 | inc s$sideInfo3 <text:首领剩余数量:<$str(N3015)>{scolor=251}:10:200> |
||
| 141 | inc s$sideInfo3 <text:高级神物数量:<$str(N3012)>{scolor=251}:10:240> |
||
| 142 | inc s$sideInfo3 <text:低级神物数量:<$str(N3011)>{scolor=161}:10:280> |
||
| 143 | |
||
| 144 | mov s$sideInfo4 |
||
| 145 | inc s$sideInfo4 <text:当前体力剩余:<$str(U80)>{fcolor=250}:0:0:150:10:16> |
||
| 146 | inc s$sideInfo4 <text:山庄魔神消耗:30{fcolor=161}:0:30:150:10:16> |
||
| 147 | inc s$sideInfo4 <text:山庄首领消耗:5{fcolor=161}:0:60:150:10:16> |
||
| 148 | inc s$sideInfo4 <text:山庄圣物消耗:15{scolor=161}:0:90:150:10:16> |
||
| 149 | inc s$sideInfo4 <text:魔神剩余数量:<$str(N3016)>{scolor=251}:0:120:150:10:16> |
||
| 150 | inc s$sideInfo4 <text:首领剩余数量:<$str(N3015)>{scolor=251}:0:150:150:10:16> |
||
| 151 | inc s$sideInfo4 <text:高级神物数量:<$str(N3012)>{scolor=251}:0:180:150:10:16> |
||
| 152 | inc s$sideInfo4 <text:低级神物数量:<$str(N3011)>{scolor=161}:0:210:150:10:16> |
||
| 153 | |
||
| 154 | mov s$setPic main_task_geren_02,main_task_geren_01,main_task_hanghui_02,main_task_hanghui_01 |
||
| 155 | |
||
| 156 | #if |
||
| 157 | isOnMap 神龙山庄 |
||
| 158 | #act |
||
| 159 | ;手机端处理 |
||
| 160 | *{color:green}[[addDlg]]* 1 dlg:<$str(s$sideInfo3)>dlg: 1 <$str(s$setPic)> 0 |
||
| 161 | ;pc端处理 |
||
| 162 | addDlg 1 dlg:<$str(s$sideInfo4)>dlg: 2 <$str(s$setPic)> 0 |
||
| 163 | |||
| 164 | |||
| 165 | - |
||
| 166 | - |
||
| 167 | |||
| 168 | |||
| 169 | bq. %{color:lightGrey};..\Mir200\Envir\Market_Def\QFunction-0.txt% |
||
| 170 | ;被法术攻击时触发 |
||
| 171 | [<notextile>@</notextile>MagicStruck] |
||
| 172 | ;打断采集进度条,采集失败 |
||
| 173 | #if |
||
| 174 | isOnMap 神龙山庄 |
||
| 175 | #act |
||
| 176 | #call [\采集\采集.txt] <notextile>@</notextile>采集失败 |
||
| 177 | |
||
| 178 | ;被攻击时触发 |
||
| 179 | [<notextile>@</notextile>Struck] |
||
| 180 | ;打断采集进度条,采集失败 |
||
| 181 | #if |
||
| 182 | isOnMap 神龙山庄 |
||
| 183 | #act |
||
| 184 | #call [\采集\采集.txt] <notextile>@</notextile>采集失败 |
||
| 185 | |
||
| 186 | ;跑触发 |
||
| 187 | [<notextile>@</notextile>run] |
||
| 188 | ;打断采集进度条,采集失败 |
||
| 189 | #if |
||
| 190 | isOnMap 神龙山庄 |
||
| 191 | #act |
||
| 192 | #call [\采集\采集.txt] <notextile>@</notextile>采集失败 |
||
| 193 | |
||
| 194 | ;走触发 |
||
| 195 | [<notextile>@</notextile>walk] |
||
| 196 | ;打断采集进度条,采集失败 |
||
| 197 | #if |
||
| 198 | isOnMap 神龙山庄 |
||
| 199 | #act |
||
| 200 | #call [\采集\采集.txt] <notextile>@</notextile>采集失败 |