[1] | 1 | //===== eAthena Script ======================================= |
---|
| 2 | //= War of Emperium Second Edition |
---|
| 3 | //===== By: ================================================== |
---|
| 4 | //= L0ne_W0lf |
---|
| 5 | //===== Current Version: ===================================== |
---|
| 6 | //= 1.4 |
---|
| 7 | //===== Compatible With: ===================================== |
---|
| 8 | //= eAthena SVN |
---|
| 9 | //===== Description: ========================================= |
---|
| 10 | //= WoE SE Arunafeltz Castle 4 |
---|
| 11 | //===== Additional Comments: ================================= |
---|
| 12 | //= 1.0 First Version [L0ne_W0lf] |
---|
| 13 | //= 1.1 Swaped an end for a close in eco investing. [L0ne_W0lf] |
---|
| 14 | //= 1.2 Fixed double message in defense investing. [L0ne_W0lf] |
---|
| 15 | //= Corrected a minor typo in the guild steward. |
---|
| 16 | //= 1.3 Fixed a guardian spawning NPCs. [L0ne_W0lf] |
---|
| 17 | //= 1.4 Fixed investment period not resetting. [L0ne_W0lf] |
---|
| 18 | //= Made it so treasure won't spawn if castle is empty. |
---|
| 19 | //= Treasure will now be killed before spawning. |
---|
| 20 | //============================================================ |
---|
| 21 | |
---|
| 22 | arug_cas04,1,1,0 script Manager#aru04_02 111,{ |
---|
| 23 | end; |
---|
| 24 | |
---|
| 25 | OnInterIfInitOnce: |
---|
| 26 | GetCastleData "arug_cas04",0,"::OnRecvCastlear04"; |
---|
| 27 | end; |
---|
| 28 | |
---|
| 29 | OnRecvCastlear04: |
---|
| 30 | RequestGuildInfo GetCastleData("arug_cas04",1); |
---|
| 31 | if (GetCastleData("arug_cas04",1) == 0) { |
---|
| 32 | donpcevent "Manager#aru04_02::Onstart"; |
---|
| 33 | } |
---|
| 34 | end; |
---|
| 35 | |
---|
| 36 | OnAgitStart: |
---|
| 37 | if (agitcheck()) { |
---|
| 38 | MapRespawnGuildID "arug_cas04",GetCastleData("arug_cas04",1),2; |
---|
| 39 | GvgOn "arug_cas04"; |
---|
| 40 | donpcevent "Manager#aru04_02::Onstart"; |
---|
| 41 | } |
---|
| 42 | else { |
---|
| 43 | donpcevent "#aru04_RL00::OnDisable"; |
---|
| 44 | donpcevent "#aru04_RL01::OnDisable"; |
---|
| 45 | donpcevent "#aru04_RL02::OnDisable"; |
---|
| 46 | donpcevent "#aru04_RL03::OnDisable"; |
---|
| 47 | } |
---|
| 48 | end; |
---|
| 49 | |
---|
| 50 | OnAgitEnd: |
---|
| 51 | GvgOff "arug_cas04"; |
---|
| 52 | if (GetCastleData("arug_cas04",1)) { |
---|
| 53 | KillMonster "arug_cas04","Steward#aru04::OnStartArena"; |
---|
| 54 | donpcevent "Manager#aru04_02::Onreset"; |
---|
| 55 | donpcevent "Steward#aru04::Onstop"; |
---|
| 56 | } |
---|
| 57 | end; |
---|
| 58 | |
---|
| 59 | Onstart: |
---|
| 60 | // 1st Guardian stone, 2nd Guardian stone, Barrier 1, Barrier 2, Barrier 3, Summon Guardians |
---|
| 61 | // Settings for all but Summon Guardians |
---|
| 62 | // 0 = Okay; 1 = Destroyed; 2 = Repairing |
---|
| 63 | // Summon Guardians |
---|
| 64 | // 0 = Do not Summon; 1 = Summon |
---|
| 65 | if (GetCastleData("arug_cas04",1)) { |
---|
| 66 | setarray $agit_ar04[0],0,0,0,0,0,0; |
---|
| 67 | donpcevent "#aru04_df01::OnEnable"; |
---|
| 68 | donpcevent "#aru04_df02::OnEnable"; |
---|
| 69 | donpcevent "#aru04_RL00::OnEnable"; |
---|
| 70 | donpcevent "#aru04_RL01::OnEnable"; |
---|
| 71 | donpcevent "#aru04_RL02::OnEnable"; |
---|
| 72 | donpcevent "#aru04_RL03::OnEnable"; |
---|
| 73 | } |
---|
| 74 | monster "arug_cas04",141,293,"Emperium",1288,1,"Steward#aru04::OnStartArena"; |
---|
| 75 | end; |
---|
| 76 | |
---|
| 77 | Onreset: |
---|
| 78 | donpcevent "#aru04_df01::OnDisable"; |
---|
| 79 | donpcevent "#aru04_df02::OnDisable"; |
---|
| 80 | donpcevent "#aru04_gard01::Onreset"; |
---|
| 81 | donpcevent "#aru04_gard02::Onreset"; |
---|
| 82 | donpcevent "#aru04_RL00::OnDisable"; |
---|
| 83 | donpcevent "#aru04_RL01::OnDisable"; |
---|
| 84 | donpcevent "#aru04_RL02::OnDisable"; |
---|
| 85 | donpcevent "#aru04_RL03::OnDisable"; |
---|
| 86 | donpcevent "1st Guardian Stone#aru04::OnDisable"; |
---|
| 87 | donpcevent "2nd Guardian Stone#aru04::OnDisable"; |
---|
| 88 | donpcevent "Control Device01#aru04::OnDisable"; |
---|
| 89 | donpcevent "Control Device02#aru04::OnDisable"; |
---|
| 90 | donpcevent "Control Device03#aru04::OnDisable"; |
---|
| 91 | if (agitcheck()) { |
---|
| 92 | setarray $agit_ar04[0],0,0,1,1,1,0; |
---|
| 93 | } |
---|
| 94 | end; |
---|
| 95 | |
---|
| 96 | Onchange: |
---|
| 97 | setarray $agit_ar04[0],2,2,1,1,2,0; |
---|
| 98 | monster "arug_cas04",141,293,"Emperium",1288,1,"Steward#aru04::OnStartArena"; |
---|
| 99 | donpcevent "Control Device03#aru04::OnEnable"; |
---|
| 100 | donpcevent "1st Guardian Stone#aru04::OnEnable"; |
---|
| 101 | donpcevent "2nd Guardian Stone#aru04::OnEnable"; |
---|
| 102 | end; |
---|
| 103 | |
---|
| 104 | OnClock0001: |
---|
| 105 | if (!GetCastleData("arug_cas04",1)) end; |
---|
| 106 | killmonster "arug_cas04","Manager#aru04_02::OnTreasureDied"; |
---|
| 107 | |
---|
| 108 | setcastledata "arug_cas04",4,0; |
---|
| 109 | setcastledata "arug_cas04",5,0; |
---|
| 110 | |
---|
| 111 | set .@Treasure,GetCastleData("arug_cas04",2)/5+4; |
---|
| 112 | if (.@Treasure) { |
---|
| 113 | monster "arug_cas04",291,276,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 114 | monster "arug_cas04",292,276,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 115 | monster "arug_cas04",293,276,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 116 | monster "arug_cas04",294,276,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 117 | if (.@Treasure < 5) end; |
---|
| 118 | monster "arug_cas04",295,276,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 119 | if (.@Treasure < 6) end; |
---|
| 120 | monster "arug_cas04",296,276,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 121 | if (.@Treasure < 7) end; |
---|
| 122 | monster "arug_cas04",293,274,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 123 | if (.@Treasure < 8) end; |
---|
| 124 | monster "arug_cas04",294,274,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 125 | if (.@Treasure < 9) end; |
---|
| 126 | monster "arug_cas04",295,274,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 127 | if (.@Treasure < 10) end; |
---|
| 128 | monster "arug_cas04",296,274,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 129 | if (.@Treasure < 11) end; |
---|
| 130 | monster "arug_cas04",297,274,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 131 | if (.@Treasure < 12) end; |
---|
| 132 | monster "arug_cas04",298,274,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 133 | if (.@Treasure < 13) end; |
---|
| 134 | monster "arug_cas04",291,272,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 135 | if (.@Treasure < 14) end; |
---|
| 136 | monster "arug_cas04",292,272,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 137 | if (.@Treasure < 15) end; |
---|
| 138 | monster "arug_cas04",293,272,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 139 | if (.@Treasure < 16) end; |
---|
| 140 | monster "arug_cas04",294,272,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 141 | if (.@Treasure < 17) end; |
---|
| 142 | monster "arug_cas04",295,272,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 143 | if (.@Treasure < 18) end; |
---|
| 144 | monster "arug_cas04",296,272,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 145 | if (.@Treasure < 19) end; |
---|
| 146 | monster "arug_cas04",293,269,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 147 | if (.@Treasure < 20) end; |
---|
| 148 | monster "arug_cas04",294,269,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 149 | if (.@Treasure < 21) end; |
---|
| 150 | monster "arug_cas04",295,269,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 151 | if (.@Treasure < 22) end; |
---|
| 152 | monster "arug_cas04",296,269,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 153 | if (.@Treasure < 23) end; |
---|
| 154 | monster "arug_cas04",297,269,"Treasure Chest",1946,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 155 | if (.@Treasure < 24) end; |
---|
| 156 | monster "arug_cas04",298,269,"Treasure Chest",1324,1,"Manager#aru04_02::OnTreasureDied"; |
---|
| 157 | } |
---|
| 158 | end; |
---|
| 159 | |
---|
| 160 | OnTreasureDied: |
---|
| 161 | end; |
---|
| 162 | } |
---|
| 163 | |
---|
| 164 | arug_cas04,146,315,3 script Nios#aru04_01 868,{ |
---|
| 165 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 166 | if (.@GID == 0) { |
---|
| 167 | mes "[Nios]"; |
---|
| 168 | mes "Great job. Now, all you"; |
---|
| 169 | mes "need to do is destroy this"; |
---|
| 170 | mes "Emperium to gain ownership"; |
---|
| 171 | mes "over this stronghold."; |
---|
| 172 | close; |
---|
| 173 | } |
---|
| 174 | if (getcharid(2) == .@GID) { |
---|
| 175 | if (strcharinfo(0) != getguildmaster(.@GID)) { |
---|
| 176 | mes "[Nios]"; |
---|
| 177 | mes "As guardian of this"; |
---|
| 178 | mes "stronghold, I answer only"; |
---|
| 179 | mes "to the master of the guild"; |
---|
| 180 | mes "that controls this place."; |
---|
| 181 | close; |
---|
| 182 | } |
---|
| 183 | else { |
---|
| 184 | if (agitcheck() == 0) { |
---|
| 185 | mes "[Nios]"; |
---|
| 186 | mes "I am Nios, guardian of"; |
---|
| 187 | mes "this stronghold. For now,"; |
---|
| 188 | mes "all is quiet in this place."; |
---|
| 189 | next; |
---|
| 190 | switch(select("Converse:Cancel")) { |
---|
| 191 | case 1: |
---|
| 192 | mes "[Nios]"; |
---|
| 193 | mes "Do you have any questions"; |
---|
| 194 | mes "about this stronghold?"; |
---|
| 195 | next; |
---|
| 196 | switch(select("Guardian Stones:Fortress Gates:Link Flags:Battle Strategy:Cancel")) { |
---|
| 197 | case 1: |
---|
| 198 | mes "[Nios]"; |
---|
| 199 | mes "There is one Emperium"; |
---|
| 200 | mes "and two Guardian Stones in"; |
---|
| 201 | mes "each fortress. These stones"; |
---|
| 202 | mes "are the first line of defense,"; |
---|
| 203 | mes "and must be destroyed before"; |
---|
| 204 | mes "enemies can even enter."; |
---|
| 205 | next; |
---|
| 206 | mes "[Nios]"; |
---|
| 207 | mes "The stones are located in"; |
---|
| 208 | mes "^4D4DFFGate Houses^000000 which must be"; |
---|
| 209 | mes "protected to prevent enemies"; |
---|
| 210 | mes "from reaching the Emperium."; |
---|
| 211 | mes "Guardian Stones can ^4D4DFFrecall"; |
---|
| 212 | mes "your Guardians^000000 for protection."; |
---|
| 213 | next; |
---|
| 214 | mes "[Nios]"; |
---|
| 215 | mes "Fortresses with higher levels"; |
---|
| 216 | mes "of defense can summon more"; |
---|
| 217 | mes "Guardians: this is why it is"; |
---|
| 218 | mes "so important for guilds to"; |
---|
| 219 | mes "invest in Defense Growth."; |
---|
| 220 | next; |
---|
| 221 | mes "[Nios]"; |
---|
| 222 | mes "Guardian Stones that have"; |
---|
| 223 | mes "been destroyed can be revived"; |
---|
| 224 | mes "after a certain time, but one of^FFFFFF ^000000 the guild members must give"; |
---|
| 225 | mes "me the order. I can also report^FFFFFF ^000000 the status of the Guardian Stones."; |
---|
| 226 | close; |
---|
| 227 | case 2: |
---|
| 228 | mes "[Nios]"; |
---|
| 229 | mes "^4D4DFFFortress Gates^000000 are the second ^FFFFFF ^000000 line of guild stronghold defense,"; |
---|
| 230 | mes "and are protected by extra barricades activated by the Guardian Stones."; |
---|
| 231 | mes "These gates are located in three different parts of the fortress."; |
---|
| 232 | next; |
---|
| 233 | mes "[Nios]"; |
---|
| 234 | mes "Barricades are protected by"; |
---|
| 235 | mes "Guardian Stones, and are"; |
---|
| 236 | mes "restored when the Guardian"; |
---|
| 237 | mes "Stones are retrieved. However,"; |
---|
| 238 | mes "it is not as easy to restore"; |
---|
| 239 | mes "destroyed Fortress Gates."; |
---|
| 240 | next; |
---|
| 241 | mes "[Nios]"; |
---|
| 242 | mes "Fortress Gates can only be"; |
---|
| 243 | mes "restored when the ^4D4DFFguild"; |
---|
| 244 | mes "master of a stronghold"; |
---|
| 245 | mes "changes^000000, or if ^4D4DFFrestoration"; |
---|
| 246 | mes "is requested by the guild"; |
---|
| 247 | mes "master of the stronghold^000000."; |
---|
| 248 | close; |
---|
| 249 | case 3: |
---|
| 250 | mes "[Nios]"; |
---|
| 251 | mes "Strongholds have many"; |
---|
| 252 | mes "Link Flags that allow you"; |
---|
| 253 | mes "to access vital areas within"; |
---|
| 254 | mes "restrictions placed by the"; |
---|
| 255 | mes "Barricades. Usually, ^4D4DFFFlag 1"; |
---|
| 256 | mes "links to the Gate House^000000."; |
---|
| 257 | next; |
---|
| 258 | mes "[Nios]"; |
---|
| 259 | mes "Many flags link directly to"; |
---|
| 260 | mes "the flag near the Emperium."; |
---|
| 261 | mes "The final numbered flag is"; |
---|
| 262 | mes "linked to the Convenience"; |
---|
| 263 | mes "Facility of the stronghold's"; |
---|
| 264 | mes "owner. Keep this in mind."; |
---|
| 265 | close; |
---|
| 266 | case 4: |
---|
| 267 | mes "[Nios]"; |
---|
| 268 | mes "Strategy? It would be better"; |
---|
| 269 | mes "to develop your battle plan to"; |
---|
| 270 | mes "exploit your guild's advantages"; |
---|
| 271 | mes "and your enemies' weaknesses."; |
---|
| 272 | mes "Use the Gate Houses and Barricades, and rebuild as quickly as you can!"; |
---|
| 273 | close; |
---|
| 274 | case 5: |
---|
| 275 | mes "[Nios]"; |
---|
| 276 | mes "You have no questions"; |
---|
| 277 | mes "to ask of me? Well, I'm"; |
---|
| 278 | mes "here to serve your needs."; |
---|
| 279 | close; |
---|
| 280 | } |
---|
| 281 | case 2: |
---|
| 282 | mes "[Nios]"; |
---|
| 283 | mes "I'm always here, so"; |
---|
| 284 | mes "feel free to request my"; |
---|
| 285 | mes "assistance whenever"; |
---|
| 286 | mes "the need arises."; |
---|
| 287 | close; |
---|
| 288 | } |
---|
| 289 | } |
---|
| 290 | else { |
---|
| 291 | mes "[Nios]"; |
---|
| 292 | mes "Greetings, "+strcharinfo(0)+"."; |
---|
| 293 | mes "What are your orders?"; |
---|
| 294 | next; |
---|
| 295 | switch(select("Increase Stronghold Defense:Situational Briefing:Cancel")) { |
---|
| 296 | case 1: |
---|
| 297 | if ($agit_ar04[5] == 0) { |
---|
| 298 | if (getgdskilllv(.@GID,10002) == 0) { |
---|
| 299 | mes "[Nios]"; |
---|
| 300 | mes "I'm sorry, but the Guardian"; |
---|
| 301 | mes "Stones aren't powerful enough"; |
---|
| 302 | mes "to summon Guardians yet. We"; |
---|
| 303 | mes "need to accumulate more"; |
---|
| 304 | mes "knowledge before they can"; |
---|
| 305 | mes "summon any Guardians."; |
---|
| 306 | close; |
---|
| 307 | } |
---|
| 308 | else { |
---|
| 309 | mes "[Nios]"; |
---|
| 310 | mes "I shall endeavor to summon"; |
---|
| 311 | mes "a Guardian through a Guardian"; |
---|
| 312 | mes "Stone. However, keep in mind"; |
---|
| 313 | mes "that this will not work if the"; |
---|
| 314 | mes "Guardian Stone is destroyed."; |
---|
| 315 | setarray $agit_ar04[5],1; |
---|
| 316 | if ($agit_ar04[0] == 0) { |
---|
| 317 | donpcevent "#aru04_gard01::OnEnable"; |
---|
| 318 | } |
---|
| 319 | if ($agit_ar04[1] == 0) { |
---|
| 320 | donpcevent "#aru04_gard02::OnEnable"; |
---|
| 321 | } |
---|
| 322 | close; |
---|
| 323 | } |
---|
| 324 | } |
---|
| 325 | else { |
---|
| 326 | mes "[Nios]"; |
---|
| 327 | mes "You've already commanded"; |
---|
| 328 | mes "me to summon a Guardian"; |
---|
| 329 | mes "to defend the stronghold."; |
---|
| 330 | close; |
---|
| 331 | } |
---|
| 332 | case 2: |
---|
| 333 | mes "[Nios]"; |
---|
| 334 | mes "Our defense status is..."; |
---|
| 335 | if ($agit_ar04[0] == 1) { |
---|
| 336 | mes "1st Guardian Stone: ^FF0000Destroyed^000000"; |
---|
| 337 | } |
---|
| 338 | else if ($agit_ar04[0] == 2) { |
---|
| 339 | mes "1st Guardian Stone: ^008000Repairing^000000"; |
---|
| 340 | } |
---|
| 341 | else { |
---|
| 342 | mes "1st Guardian Stone: ^4D4DFFOperational^000000"; |
---|
| 343 | } |
---|
| 344 | if ($agit_ar04[1] == 1) { |
---|
| 345 | mes "2nd Guardian Stone: ^FF0000Destroyed^000000"; |
---|
| 346 | } |
---|
| 347 | else if ($agit_ar04[1] == 2) { |
---|
| 348 | mes "2nd Guardian Stone: ^008000Repairing^000000"; |
---|
| 349 | } |
---|
| 350 | else { |
---|
| 351 | mes "2nd Guardian Stone: ^4D4DFFOperational^000000"; |
---|
| 352 | } |
---|
| 353 | if ($agit_ar04[2] == 1) { |
---|
| 354 | mes "1st Fortress Gate: ^FF0000Destroyed^000000"; |
---|
| 355 | } |
---|
| 356 | else if ($agit_ar04[2] == 2) { |
---|
| 357 | mes "1st Fortress Gate: ^008000Repairing^000000"; |
---|
| 358 | } |
---|
| 359 | else { |
---|
| 360 | mes "1st Fortress Gate: ^4D4DFFOperational^000000"; |
---|
| 361 | } |
---|
| 362 | if ($agit_ar04[3] == 1) { |
---|
| 363 | mes "2nd Fortress Gate: ^FF0000Destroyed^000000"; |
---|
| 364 | } |
---|
| 365 | else if ($agit_ar04[3] == 2) { |
---|
| 366 | mes "2nd Fortress Gate: ^008000Repairing^000000"; |
---|
| 367 | } |
---|
| 368 | else { |
---|
| 369 | mes "2nd Fortress Gate: ^4D4DFFOperational^000000"; |
---|
| 370 | } |
---|
| 371 | if ($agit_ar04[4] == 1) { |
---|
| 372 | mes "3rd Fortress Gate: ^FF0000Destroyed^000000"; |
---|
| 373 | } |
---|
| 374 | else if ($agit_ar04[4] == 2) { |
---|
| 375 | mes "3rd Fortress Gate: ^008000Repairing^000000"; |
---|
| 376 | } |
---|
| 377 | else { |
---|
| 378 | mes "3rd Fortress Gate: ^4D4DFFOperational^000000"; |
---|
| 379 | } |
---|
| 380 | close; |
---|
| 381 | case 3: |
---|
| 382 | mes "[Nios]"; |
---|
| 383 | mes "I'll be standing by,"; |
---|
| 384 | mes "awaiting your orders."; |
---|
| 385 | close; |
---|
| 386 | } |
---|
| 387 | } |
---|
| 388 | } |
---|
| 389 | } |
---|
| 390 | else { |
---|
| 391 | mes "[Nios]"; |
---|
| 392 | mes "Who are you? Scoundrel!"; |
---|
| 393 | mes "Leave this stronghold now!"; |
---|
| 394 | close; |
---|
| 395 | } |
---|
| 396 | |
---|
| 397 | OnInit: |
---|
| 398 | setarray $agit_ar04[0],0,0,0,0,0,0; |
---|
| 399 | end; |
---|
| 400 | } |
---|
| 401 | |
---|
| 402 | arug_cas04,1,1,0 script #aru04_gard01 -1,{ |
---|
| 403 | OnEnable: |
---|
| 404 | set .@defence,GetCastleData("arug_cas04",3); |
---|
| 405 | guardian "arug_cas04",130,60,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //0; |
---|
| 406 | if ((.@defence > 10) && (.@defence < 31)) { |
---|
| 407 | set .MyMobCount,2; |
---|
| 408 | guardian "arug_cas04",128,77,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //1; |
---|
| 409 | } |
---|
| 410 | else if ((.@defence > 30) && (.@defence < 51)) { |
---|
| 411 | set .MyMobCount,3; |
---|
| 412 | guardian "arug_cas04",128,77,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //1; |
---|
| 413 | guardian "arug_cas04",128,90,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //2; |
---|
| 414 | } |
---|
| 415 | else if ((.@defence > 50) && (.@defence < 71)) { |
---|
| 416 | set .MyMobCount,4; |
---|
| 417 | guardian "arug_cas04",128,77,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //1; |
---|
| 418 | guardian "arug_cas04",128,90,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //2; |
---|
| 419 | guardian "arug_cas04",128,100,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //3; |
---|
| 420 | } |
---|
| 421 | else if (.@defence > 70) { |
---|
| 422 | set .MyMobCount,5; |
---|
| 423 | guardian "arug_cas04",128,77,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //1; |
---|
| 424 | guardian "arug_cas04",128,90,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //2; |
---|
| 425 | guardian "arug_cas04",128,100,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //3; |
---|
| 426 | guardian "arug_cas04",110,96,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //4; |
---|
| 427 | } |
---|
| 428 | else { |
---|
| 429 | set .MyMobCount,2; |
---|
| 430 | guardian "arug_cas04",66,157,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //1; |
---|
| 431 | } |
---|
| 432 | initnpctimer; |
---|
| 433 | end; |
---|
| 434 | |
---|
| 435 | OnTimer300000: |
---|
| 436 | set .MyMobCount,.MyMobCount+1; |
---|
| 437 | guardian "arug_cas04",91,53,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //5; |
---|
| 438 | mapannounce "arug_cas04","The 1st Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; |
---|
| 439 | end; |
---|
| 440 | |
---|
| 441 | OnTimer900000: |
---|
| 442 | set .MyMobCount,.MyMobCount+1; |
---|
| 443 | guardian "arug_cas04",65,71,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //6; |
---|
| 444 | mapannounce "arug_cas04","The 2nd Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; |
---|
| 445 | end; |
---|
| 446 | |
---|
| 447 | OnTimer1800000: |
---|
| 448 | set .MyMobCount,.MyMobCount+1; |
---|
| 449 | guardian "arug_cas04",65,103,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //7; |
---|
| 450 | mapannounce "arug_cas04","The 3rd Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; |
---|
| 451 | end; |
---|
| 452 | |
---|
| 453 | OnTimer2700000: |
---|
| 454 | set .MyMobCount,.MyMobCount+1; |
---|
| 455 | guardian "arug_cas04",110,96,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //8; |
---|
| 456 | mapannounce "arug_cas04","The 4th Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; |
---|
| 457 | end; |
---|
| 458 | |
---|
| 459 | OnTimer3600000: |
---|
| 460 | set .MyMobCount,.MyMobCount+1; |
---|
| 461 | guardian "arug_cas04",128,100,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //9; |
---|
| 462 | mapannounce "arug_cas04","The 5th Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; |
---|
| 463 | stopnpctimer; |
---|
| 464 | end; |
---|
| 465 | |
---|
| 466 | OnGuardianDied: |
---|
| 467 | set .MyMobCount,.MyMobCount-1; |
---|
| 468 | if (.MyMobCount < 2) { |
---|
| 469 | set .MyMobCount,.MyMobCount+1; |
---|
| 470 | guardian "arug_cas04",128,77,"Guardian",1899,"#aru04_gard01::OnGuardianDied"; //10; |
---|
| 471 | } |
---|
| 472 | end; |
---|
| 473 | |
---|
| 474 | Onreset: |
---|
| 475 | stopnpctimer; |
---|
| 476 | killmonster "arug_cas04","#aru04_gard01::OnGuardianDied"; |
---|
| 477 | end; |
---|
| 478 | } |
---|
| 479 | |
---|
| 480 | arug_cas04,1,2,0 script #aru04_gard02 -1,{ |
---|
| 481 | OnEnable: |
---|
| 482 | set .@defence,GetCastleData("arug_cas04",3); |
---|
| 483 | guardian "arug_cas04",156,101,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //11; |
---|
| 484 | if ((.@defence > 10) && (.@defence < 31)) { |
---|
| 485 | set .MyMobCount,2; |
---|
| 486 | guardian "arug_cas04",172,95,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //12; |
---|
| 487 | } |
---|
| 488 | else if ((.@defence > 30) && (.@defence < 51)) { |
---|
| 489 | set .MyMobCount,3; |
---|
| 490 | guardian "arug_cas04",172,95,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //12; |
---|
| 491 | guardian "arug_cas04",154,90,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //13; |
---|
| 492 | } |
---|
| 493 | else if ((.@defence > 50) && (.@defence < 71)) { |
---|
| 494 | set .MyMobCount,4; |
---|
| 495 | guardian "arug_cas04",172,95,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //12; |
---|
| 496 | guardian "arug_cas04",154,90,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //13; |
---|
| 497 | guardian "arug_cas04",156,77,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //14; |
---|
| 498 | } |
---|
| 499 | else if (.@defence > 70) { |
---|
| 500 | set .MyMobCount,5; |
---|
| 501 | guardian "arug_cas04",172,95,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //12; |
---|
| 502 | guardian "arug_cas04",154,90,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //13; |
---|
| 503 | guardian "arug_cas04",156,77,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //14; |
---|
| 504 | guardian "arug_cas04",155,60,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //15; |
---|
| 505 | } |
---|
| 506 | else { |
---|
| 507 | set .MyMobCount,2; |
---|
| 508 | guardian "arug_cas04",211,159,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //12; |
---|
| 509 | } |
---|
| 510 | initnpctimer; |
---|
| 511 | end; |
---|
| 512 | |
---|
| 513 | OnTimer600000: |
---|
| 514 | set .MyMobCount,.MyMobCount+1; |
---|
| 515 | guardian "arug_cas04",187,54,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //16; |
---|
| 516 | end; |
---|
| 517 | |
---|
| 518 | OnTimer1200000: |
---|
| 519 | set .MyMobCount,.MyMobCount+1; |
---|
| 520 | guardian "arug_cas04",212,67,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //17; |
---|
| 521 | end; |
---|
| 522 | |
---|
| 523 | OnTimer2100000: |
---|
| 524 | set .MyMobCount,.MyMobCount+1; |
---|
| 525 | guardian "arug_cas04",211,105,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //18; |
---|
| 526 | end; |
---|
| 527 | |
---|
| 528 | OnTimer3000000: |
---|
| 529 | set .MyMobCount,.MyMobCount+1; |
---|
| 530 | guardian "arug_cas04",155,60,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //19; |
---|
| 531 | end; |
---|
| 532 | |
---|
| 533 | OnTimer3900000: |
---|
| 534 | set .MyMobCount,.MyMobCount+1; |
---|
| 535 | guardian "arug_cas04",156,77,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //20; |
---|
| 536 | stopnpctimer; |
---|
| 537 | end; |
---|
| 538 | |
---|
| 539 | OnGuardianDied: |
---|
| 540 | set .MyMobCount,.MyMobCount-1; |
---|
| 541 | if (.MyMobCount < 2) { |
---|
| 542 | set .MyMobCount,.MyMobCount+1; |
---|
| 543 | guardian "arug_cas04",172,95,"Guardian",1899,"#aru04_gard02::OnGuardianDied"; //21; |
---|
| 544 | } |
---|
| 545 | end; |
---|
| 546 | |
---|
| 547 | Onreset: |
---|
| 548 | stopnpctimer; |
---|
| 549 | killmonster "arug_cas04","#aru04_gard02::OnGuardianDied"; |
---|
| 550 | end; |
---|
| 551 | } |
---|
| 552 | |
---|
| 553 | arug_cas04,1,3,0 script #aru04_df01 -1,{ |
---|
| 554 | OnEnable: |
---|
| 555 | guardian "arug_cas04",65,171,"1st Guardian Stone",1907,"#aru04_df01::OnGuardianStoneDied"; //22; |
---|
| 556 | end; |
---|
| 557 | |
---|
| 558 | OnDisable: |
---|
| 559 | killmonster "arug_cas04","#aru04_df01::OnGuardianStoneDied"; |
---|
| 560 | setarray $agit_ar04[0],1; //Global Variable |
---|
| 561 | stopnpctimer; |
---|
| 562 | end; |
---|
| 563 | |
---|
| 564 | OnGuardianStoneDied: |
---|
| 565 | // 1st Guardian Stone is Destroyed |
---|
| 566 | setarray $agit_ar04[0],1; |
---|
| 567 | if (($agit_ar04[0] == 1) || ($agit_ar04[0] == 2)) { |
---|
| 568 | set .@destroyed,.@destroyed + 1; |
---|
| 569 | } |
---|
| 570 | if (($agit_ar04[1] == 1) || ($agit_ar04[1] == 2)) { |
---|
| 571 | set .@destroyed,.@destroyed + 1; |
---|
| 572 | } |
---|
| 573 | if (.@destroyed == 2) { |
---|
| 574 | mapannounce "arug_cas04","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00"; |
---|
| 575 | donpcevent "#aru04_RL00::OnDisable"; |
---|
| 576 | donpcevent "#aru04_gard01::Onreset"; |
---|
| 577 | } |
---|
| 578 | else { |
---|
| 579 | mapannounce "arug_cas04","The 1st Guardian Stone has been destroyed!",bc_map,"0x00ff00"; |
---|
| 580 | donpcevent "#aru04_gard01::Onreset"; |
---|
| 581 | } |
---|
| 582 | initnpctimer; |
---|
| 583 | end; |
---|
| 584 | |
---|
| 585 | OnTimer300000: |
---|
| 586 | donpcevent "1st Guardian Stone#aru04::OnGuardian"; |
---|
| 587 | setarray $agit_ar04[0],2; //Global Variable |
---|
| 588 | stopnpctimer; |
---|
| 589 | end; |
---|
| 590 | } |
---|
| 591 | |
---|
| 592 | arug_cas04,65,171,0 script 1st Guardian Stone#aru04 844,{ |
---|
| 593 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 594 | if (getcharid(2) == .@GID) { |
---|
| 595 | mes "^3355FFYou will need the"; |
---|
| 596 | mes "following materials to"; |
---|
| 597 | mes "rebuild a destroyed"; |
---|
| 598 | mes "Guardian Stone.^000000"; |
---|
| 599 | next; |
---|
| 600 | mes "1 Oridecon"; |
---|
| 601 | mes "1 Elunium"; |
---|
| 602 | mes "30 Stones"; |
---|
| 603 | mes "5 Blue Gemstones"; |
---|
| 604 | mes "5 Yellow Gemstones"; |
---|
| 605 | mes "5 Red Gemstones"; |
---|
| 606 | next; |
---|
| 607 | mes "^3355FFDo you want to continue?^000000"; |
---|
| 608 | switch(select("No:Continue")) { |
---|
| 609 | case 1: |
---|
| 610 | mes "^3355FFWork canceled.^000000"; |
---|
| 611 | close; |
---|
| 612 | case 2: |
---|
| 613 | if ((countitem(984) > 0) && (countitem(985) > 0) && (countitem(7049) > 29) && (countitem(717) > 4) && (countitem(715) > 4) && (countitem(716) > 4)) { |
---|
| 614 | mes "^3355FFArrange Stones, Elunium, and"; |
---|
| 615 | mes "Oridecon, in that order, in the"; |
---|
| 616 | mes "center. Then you must arrange"; |
---|
| 617 | mes "the enchanted Gemstones to"; |
---|
| 618 | mes "rebuild the Guardian Stone.^000000"; |
---|
| 619 | next; |
---|
| 620 | switch(select("Elunium:Oridecon:Stone")) { |
---|
| 621 | case 1: |
---|
| 622 | mes "^3355FFElunium has been"; |
---|
| 623 | mes "placed in the center.^000000"; |
---|
| 624 | next; |
---|
| 625 | break; |
---|
| 626 | case 2: |
---|
| 627 | mes "^3355FFOridecon has been"; |
---|
| 628 | mes "placed in the center.^000000"; |
---|
| 629 | next; |
---|
| 630 | break; |
---|
| 631 | case 3: |
---|
| 632 | mes "^3355FFStones have been"; |
---|
| 633 | mes "placed in the center.^000000"; |
---|
| 634 | set .@nice,.@nice+10; |
---|
| 635 | next; |
---|
| 636 | break; |
---|
| 637 | } |
---|
| 638 | switch(select("Elunium:Oridecon:Stone")) { |
---|
| 639 | case 1: |
---|
| 640 | mes "^3355FFYou have lined the"; |
---|
| 641 | mes "outside of the center"; |
---|
| 642 | mes "with some Elunium.^000000"; |
---|
| 643 | set .@nice,.@nice+10; |
---|
| 644 | next; |
---|
| 645 | break; |
---|
| 646 | case 2: |
---|
| 647 | mes "^3355FFYou have lined the"; |
---|
| 648 | mes "outside of the center"; |
---|
| 649 | mes "with some Oridecon.^000000"; |
---|
| 650 | next; |
---|
| 651 | break; |
---|
| 652 | case 3: |
---|
| 653 | mes "^3355FFYou have lined the"; |
---|
| 654 | mes "outside of the center"; |
---|
| 655 | mes "with some Stones.^000000"; |
---|
| 656 | next; |
---|
| 657 | break; |
---|
| 658 | } |
---|
| 659 | switch(select("Elunium:Oridecon:Stone")) { |
---|
| 660 | case 1: |
---|
| 661 | mes "^3355FFYou covered the"; |
---|
| 662 | mes "rest of the materials"; |
---|
| 663 | mes "with some Elunium.^000000"; |
---|
| 664 | next; |
---|
| 665 | break; |
---|
| 666 | case 2: |
---|
| 667 | mes "^3355FFYou covered the"; |
---|
| 668 | mes "rest of the materials"; |
---|
| 669 | mes "with some Oridecon.^000000"; |
---|
| 670 | set .@nice,.@nice+10; |
---|
| 671 | next; |
---|
| 672 | break; |
---|
| 673 | case 3: |
---|
| 674 | mes "^3355FFYou covered the"; |
---|
| 675 | mes "rest of the materials"; |
---|
| 676 | mes "with some Stones.^000000"; |
---|
| 677 | next; |
---|
| 678 | break; |
---|
| 679 | } |
---|
| 680 | mes "^3355FFNow you need to arrange"; |
---|
| 681 | mes "the enchanted Gemstones"; |
---|
| 682 | mes "accordingly. You can identify"; |
---|
| 683 | mes "their Magic properties by"; |
---|
| 684 | mes "their casting effect.^000000"; |
---|
| 685 | next; |
---|
| 686 | while(1) { |
---|
| 687 | if (.@roof0 > 7) { |
---|
| 688 | break; |
---|
| 689 | } |
---|
| 690 | else { |
---|
| 691 | switch(rand(1,3)) { |
---|
| 692 | case 1: |
---|
| 693 | specialeffect 54; //"1st Guardian Stone#aru04" EF_BEGINSPELL2 |
---|
| 694 | mes "^3355FFThe Gemstones must"; |
---|
| 695 | mes "be arranged in the correct"; |
---|
| 696 | mes "order according to their"; |
---|
| 697 | mes "magic properties and power.^000000"; |
---|
| 698 | next; |
---|
| 699 | switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) { |
---|
| 700 | case 1: |
---|
| 701 | mes "^3355FFYou placed the Red Gemstone."; |
---|
| 702 | mes "However, the Guardian Stone"; |
---|
| 703 | mes "Repair System failed because"; |
---|
| 704 | mes "of a magic power conflict.^000000"; |
---|
| 705 | close; |
---|
| 706 | case 2: |
---|
| 707 | mes "^3355FFYou placed the Yellow Gemstone."; |
---|
| 708 | mes "However, the Guardian Stone"; |
---|
| 709 | mes "Repair System failed because"; |
---|
| 710 | mes "of a magic power conflict.^000000"; |
---|
| 711 | close; |
---|
| 712 | case 3: |
---|
| 713 | mes "^3355FFYou placed the Blue Gemstone.^000000"; |
---|
| 714 | set .@nice,.@nice+10; |
---|
| 715 | set .@roof0,.@roof0 + 1; |
---|
| 716 | specialeffect 18; //"1st Guardian Stone#aru04" EF_STEAL |
---|
| 717 | next; |
---|
| 718 | break; |
---|
| 719 | } |
---|
| 720 | break; |
---|
| 721 | case 2: |
---|
| 722 | specialeffect 225; //"1st Guardian Stone#aru04" EF_VOLCANO |
---|
| 723 | mes "^3355FFThe Gemstones must"; |
---|
| 724 | mes "be arranged in the correct"; |
---|
| 725 | mes "order according to their"; |
---|
| 726 | mes "magic properties and power.^000000"; |
---|
| 727 | next; |
---|
| 728 | switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) { |
---|
| 729 | case 1: |
---|
| 730 | mes "^3355FFYou placed the Red Gemstone.^000000"; |
---|
| 731 | set .@nice,.@nice+10; |
---|
| 732 | set .@roof0,.@roof0 + 1; |
---|
| 733 | specialeffect 18; //"1st Guardian Stone#aru04" EF_STEAL |
---|
| 734 | next; |
---|
| 735 | break; |
---|
| 736 | case 2: |
---|
| 737 | mes "^3355FFYou placed the Yellow Gemstone."; |
---|
| 738 | mes "However, the Guardian Stone"; |
---|
| 739 | mes "Repair System failed because"; |
---|
| 740 | mes "of a magic power conflict.^000000"; |
---|
| 741 | close; |
---|
| 742 | case 3: |
---|
| 743 | mes "^3355FFYou placed the Blue Gemstone."; |
---|
| 744 | mes "However, the Guardian Stone"; |
---|
| 745 | mes "Repair System failed because"; |
---|
| 746 | mes "of a magic power conflict.^000000"; |
---|
| 747 | close; |
---|
| 748 | } |
---|
| 749 | break; |
---|
| 750 | case 3: |
---|
| 751 | specialeffect 56; //"1st Guardian Stone#aru04" EF_BEGINSPELL4 |
---|
| 752 | mes "^3355FFThe Gemstones must"; |
---|
| 753 | mes "be arranged in the correct"; |
---|
| 754 | mes "order according to their"; |
---|
| 755 | mes "magic properties and power.^000000"; |
---|
| 756 | next; |
---|
| 757 | switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) { |
---|
| 758 | case 1: |
---|
| 759 | mes "^3355FFYou placed the Red Gemstone."; |
---|
| 760 | mes "However, the Guardian Stone"; |
---|
| 761 | mes "Repair System failed because"; |
---|
| 762 | mes "of a magic power conflict.^000000"; |
---|
| 763 | close; |
---|
| 764 | case 2: |
---|
| 765 | mes "^3355FFYou placed the Yellow Gemstone.^000000"; |
---|
| 766 | set .@nice,.@nice+10; |
---|
| 767 | set .@roof0,.@roof0 + 1; |
---|
| 768 | specialeffect 18; //"1st Guardian Stone#aru04" EF_STEAL |
---|
| 769 | next; |
---|
| 770 | break; |
---|
| 771 | case 3: |
---|
| 772 | mes "^3355FFYou placed the Blue Gemstone."; |
---|
| 773 | mes "However, the Guardian Stone"; |
---|
| 774 | mes "Repair System failed because"; |
---|
| 775 | mes "of a magic power conflict.^000000"; |
---|
| 776 | close; |
---|
| 777 | } |
---|
| 778 | } |
---|
| 779 | } |
---|
| 780 | } |
---|
| 781 | if (.@nice > 90) { |
---|
| 782 | if ($agit_ar04[0] == 0) { |
---|
| 783 | mes "^3355FFThe Guardian Stone"; |
---|
| 784 | mes "Repair System has"; |
---|
| 785 | mes "already completed.^000000"; |
---|
| 786 | close; |
---|
| 787 | } |
---|
| 788 | else { |
---|
| 789 | if (agitcheck() == 0) { |
---|
| 790 | mes "^3355FFIt is impossible to"; |
---|
| 791 | mes "rebuild the Guardian"; |
---|
| 792 | mes "Stone because the"; |
---|
| 793 | mes "Emperium is not present.^000000"; |
---|
| 794 | close; |
---|
| 795 | } |
---|
| 796 | else { |
---|
| 797 | mes "^3355FFThe Gemstones have been"; |
---|
| 798 | mes "arranged, and the Guardian"; |
---|
| 799 | mes "Stone is successfully repaired.^000000"; |
---|
| 800 | delitem 984,1; //Oridecon |
---|
| 801 | delitem 985,1; //Elunium |
---|
| 802 | delitem 7049,30; //Stone |
---|
| 803 | delitem 717,5; //Blue_Gemstone |
---|
| 804 | delitem 715,5; //Yellow_Gemstone |
---|
| 805 | delitem 716,5; //Red_Gemstone |
---|
| 806 | close2; |
---|
| 807 | donpcevent "#aru04_df01::OnEnable"; |
---|
| 808 | specialeffect 135; //"1st Guardian Stone#aru04" EF_ICECRASH |
---|
| 809 | disablenpc "1st Guardian Stone#aru04"; |
---|
| 810 | setarray $agit_ar04[0],0; |
---|
| 811 | set .@df_all,$agit_ar04[0]+$agit_ar04[1]; |
---|
| 812 | if (.@df_all == 0) { |
---|
| 813 | mapannounce "arug_cas04","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00"; |
---|
| 814 | donpcevent "#aru04_RL00::OnEnable"; |
---|
| 815 | } |
---|
| 816 | else { |
---|
| 817 | mapannounce "arug_cas04","The 1st Guardian Stone has been repaired successfully.",bc_map,"0x00ff00"; |
---|
| 818 | } |
---|
| 819 | if ($agit_ar04[5] == 1) { |
---|
| 820 | donpcevent "#aru04_gard01::OnEnable"; |
---|
| 821 | } |
---|
| 822 | end; |
---|
| 823 | } |
---|
| 824 | } |
---|
| 825 | } |
---|
| 826 | else { |
---|
| 827 | mes "^3355FFAfter all of that work..."; |
---|
| 828 | mes "It looks like you failed"; |
---|
| 829 | mes "to fix the Guardian Stone,"; |
---|
| 830 | mes "and lost some materials.^000000"; |
---|
| 831 | delitem 7049,10; //Stone |
---|
| 832 | delitem 717,2; //Blue_Gemstone |
---|
| 833 | delitem 715,2; //Yellow_Gemstone |
---|
| 834 | delitem 716,2; //Red_Gemstone |
---|
| 835 | close; |
---|
| 836 | } |
---|
| 837 | } |
---|
| 838 | else { |
---|
| 839 | mes "^3355FFYou don't have enough"; |
---|
| 840 | mes "materials to repair"; |
---|
| 841 | mes "the Guardian Stone.^000000"; |
---|
| 842 | close; |
---|
| 843 | } |
---|
| 844 | } |
---|
| 845 | } |
---|
| 846 | end; |
---|
| 847 | |
---|
| 848 | OnInit: |
---|
| 849 | disablenpc "1st Guardian Stone#aru04"; |
---|
| 850 | end; |
---|
| 851 | |
---|
| 852 | OnEnable: |
---|
| 853 | enablenpc "1st Guardian Stone#aru04"; |
---|
| 854 | specialeffect 247; //"1st Guardian Stone#aru04" EF_MAPPILLAR2 |
---|
| 855 | end; |
---|
| 856 | |
---|
| 857 | OnDisable: |
---|
| 858 | disablenpc "1st Guardian Stone#aru04"; |
---|
| 859 | end; |
---|
| 860 | } |
---|
| 861 | |
---|
| 862 | arug_cas04,1,4,0 script #aru04_df02 -1,{ |
---|
| 863 | OnEnable: |
---|
| 864 | guardian "arug_cas04",212,149,"2nd Guardian Stone",1908,"#aru04_df02::OnGuardianStoneDied"; //23; |
---|
| 865 | end; |
---|
| 866 | |
---|
| 867 | OnDisable: |
---|
| 868 | killmonster "arug_cas04","#aru04_df02::OnGuardianStoneDied"; |
---|
| 869 | setarray $agit_ar04[1],1; //Global Variable |
---|
| 870 | stopnpctimer; |
---|
| 871 | end; |
---|
| 872 | |
---|
| 873 | OnGuardianStoneDied: |
---|
| 874 | // 2nd Guardian Stone is Destroyed |
---|
| 875 | setarray $agit_ar04[1],1; |
---|
| 876 | if (($agit_ar04[0] == 1) || ($agit_ar04[0] == 2)) { |
---|
| 877 | set .@destroyed,.@destroyed + 1; |
---|
| 878 | } |
---|
| 879 | if (($agit_ar04[1] == 1) || ($agit_ar04[1] == 2)) { |
---|
| 880 | set .@destroyed,.@destroyed + 1; |
---|
| 881 | } |
---|
| 882 | if (.@destroyed == 2) { |
---|
| 883 | mapannounce "arug_cas04","All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00"; |
---|
| 884 | donpcevent "#aru04_RL00::OnDisable"; |
---|
| 885 | donpcevent "#aru04_gard02::Onreset"; |
---|
| 886 | } |
---|
| 887 | else { |
---|
| 888 | mapannounce "arug_cas04","The 2nd Guardian Stone has been destroyed!",bc_map,"0x00ff00"; |
---|
| 889 | donpcevent "#aru04_gard02::Onreset"; |
---|
| 890 | } |
---|
| 891 | initnpctimer; |
---|
| 892 | end; |
---|
| 893 | |
---|
| 894 | OnTimer300000: |
---|
| 895 | donpcevent "2nd Guardian Stone#aru04::OnGuardian"; |
---|
| 896 | setarray $agit_ar04[1],2; //Global Variable |
---|
| 897 | stopnpctimer; |
---|
| 898 | end; |
---|
| 899 | } |
---|
| 900 | |
---|
| 901 | arug_cas04,212,149,0 script 2nd Guardian Stone#aru04 844,{ |
---|
| 902 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 903 | if (getcharid(2) == .@GID) { |
---|
| 904 | mes "^3355FFYou will need the"; |
---|
| 905 | mes "following materials to"; |
---|
| 906 | mes "rebuild a destroyed"; |
---|
| 907 | mes "Guardian Stone.^000000"; |
---|
| 908 | next; |
---|
| 909 | mes "1 Oridecon"; |
---|
| 910 | mes "1 Elunium"; |
---|
| 911 | mes "30 Stones"; |
---|
| 912 | mes "5 Blue Gemstones"; |
---|
| 913 | mes "5 Yellow Gemstones"; |
---|
| 914 | mes "5 Red Gemstones"; |
---|
| 915 | next; |
---|
| 916 | mes "^3355FFDo you want to continue?^000000"; |
---|
| 917 | switch(select("No:Continue")) { |
---|
| 918 | case 1: |
---|
| 919 | mes "^3355FFWork canceled.^000000"; |
---|
| 920 | close; |
---|
| 921 | case 2: |
---|
| 922 | if ((countitem(984) > 0) && (countitem(985) > 0) && (countitem(7049) > 29) && (countitem(717) > 4) && (countitem(715) > 4) && (countitem(716) > 4)) { |
---|
| 923 | mes "^3355FFArrange Stones, Elunium, and"; |
---|
| 924 | mes "Oridecon, in that order, in the"; |
---|
| 925 | mes "center. Then you must arrange"; |
---|
| 926 | mes "the enchanted Gemstones to"; |
---|
| 927 | mes "rebuild the Guardian Stone.^000000"; |
---|
| 928 | next; |
---|
| 929 | switch(select("Elunium:Oridecon:Stone")) { |
---|
| 930 | case 1: |
---|
| 931 | mes "^3355FFElunium has been"; |
---|
| 932 | mes "placed in the center.^000000"; |
---|
| 933 | next; |
---|
| 934 | break; |
---|
| 935 | case 2: |
---|
| 936 | mes "^3355FFOridecon has been"; |
---|
| 937 | mes "placed in the center.^000000"; |
---|
| 938 | next; |
---|
| 939 | break; |
---|
| 940 | case 3: |
---|
| 941 | mes "^3355FFStones have been"; |
---|
| 942 | mes "placed in the center.^000000"; |
---|
| 943 | set .@nice,.@nice+10; |
---|
| 944 | next; |
---|
| 945 | break; |
---|
| 946 | } |
---|
| 947 | switch(select("Elunium:Oridecon:Stone")) { |
---|
| 948 | case 1: |
---|
| 949 | mes "^3355FFYou have lined the"; |
---|
| 950 | mes "outside of the center"; |
---|
| 951 | mes "with some Elunium.^000000"; |
---|
| 952 | set .@nice,.@nice+10; |
---|
| 953 | next; |
---|
| 954 | break; |
---|
| 955 | case 2: |
---|
| 956 | mes "^3355FFYou have lined the"; |
---|
| 957 | mes "outside of the center"; |
---|
| 958 | mes "with some Oridecon.^000000"; |
---|
| 959 | next; |
---|
| 960 | break; |
---|
| 961 | case 3: |
---|
| 962 | mes "^3355FFYou have lined the"; |
---|
| 963 | mes "outside of the center"; |
---|
| 964 | mes "with some Stones.^000000"; |
---|
| 965 | next; |
---|
| 966 | break; |
---|
| 967 | } |
---|
| 968 | switch(select("Elunium:Oridecon:Stone")) { |
---|
| 969 | case 1: |
---|
| 970 | mes "^3355FFYou covered the"; |
---|
| 971 | mes "rest of the materials"; |
---|
| 972 | mes "with some Elunium.^000000"; |
---|
| 973 | next; |
---|
| 974 | break; |
---|
| 975 | case 2: |
---|
| 976 | mes "^3355FFYou covered the"; |
---|
| 977 | mes "rest of the materials"; |
---|
| 978 | mes "with some Oridecon.^000000"; |
---|
| 979 | set .@nice,.@nice+10; |
---|
| 980 | next; |
---|
| 981 | break; |
---|
| 982 | case 3: |
---|
| 983 | mes "^3355FFYou covered the"; |
---|
| 984 | mes "rest of the materials"; |
---|
| 985 | mes "with some Stones.^000000"; |
---|
| 986 | next; |
---|
| 987 | break; |
---|
| 988 | } |
---|
| 989 | mes "^3355FFNow you need to arrange"; |
---|
| 990 | mes "the enchanted Gemstones"; |
---|
| 991 | mes "accordingly. You can identify"; |
---|
| 992 | mes "their Magic properties by"; |
---|
| 993 | mes "their casting effect.^000000"; |
---|
| 994 | next; |
---|
| 995 | while(1) { |
---|
| 996 | if (.@roof0 > 7) { |
---|
| 997 | break; |
---|
| 998 | } |
---|
| 999 | else { |
---|
| 1000 | switch(rand(1,3)) { |
---|
| 1001 | case 1: |
---|
| 1002 | specialeffect 54; //"2nd Guardian Stone#aru04" EF_BEGINSPELL2 |
---|
| 1003 | mes "^3355FFThe Gemstones must"; |
---|
| 1004 | mes "be arranged in the correct"; |
---|
| 1005 | mes "order according to their"; |
---|
| 1006 | mes "magic properties and power.^000000"; |
---|
| 1007 | next; |
---|
| 1008 | switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) { |
---|
| 1009 | case 1: |
---|
| 1010 | mes "^3355FFYou placed the Red Gemstone."; |
---|
| 1011 | mes "However, the Guardian Stone"; |
---|
| 1012 | mes "Repair System failed because"; |
---|
| 1013 | mes "of a magic power conflict.^000000"; |
---|
| 1014 | close; |
---|
| 1015 | case 2: |
---|
| 1016 | mes "^3355FFYou placed the Yellow Gemstone."; |
---|
| 1017 | mes "However, the Guardian Stone"; |
---|
| 1018 | mes "Repair System failed because"; |
---|
| 1019 | mes "of a magic power conflict.^000000"; |
---|
| 1020 | close; |
---|
| 1021 | case 3: |
---|
| 1022 | mes "^3355FFYou placed the Blue Gemstone.^000000"; |
---|
| 1023 | set .@nice,.@nice+10; |
---|
| 1024 | set .@roof0,.@roof0 + 1; |
---|
| 1025 | specialeffect 18; //"2nd Guardian Stone#aru04" EF_STEAL |
---|
| 1026 | next; |
---|
| 1027 | break; |
---|
| 1028 | } |
---|
| 1029 | break; |
---|
| 1030 | case 2: |
---|
| 1031 | specialeffect 225; //"2nd Guardian Stone#aru04" EF_VOLCANO |
---|
| 1032 | mes "^3355FFThe Gemstones must"; |
---|
| 1033 | mes "be arranged in the correct"; |
---|
| 1034 | mes "order according to their"; |
---|
| 1035 | mes "magic properties and power.^000000"; |
---|
| 1036 | next; |
---|
| 1037 | switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) { |
---|
| 1038 | case 1: |
---|
| 1039 | mes "^3355FFYou placed the Red Gemstone.^000000"; |
---|
| 1040 | set .@nice,.@nice+10; |
---|
| 1041 | set .@roof0,.@roof0 + 1; |
---|
| 1042 | specialeffect 18; //"2nd Guardian Stone#aru04" EF_STEAL |
---|
| 1043 | next; |
---|
| 1044 | break; |
---|
| 1045 | case 2: |
---|
| 1046 | mes "^3355FFYou placed the Yellow Gemstone."; |
---|
| 1047 | mes "However, the Guardian Stone"; |
---|
| 1048 | mes "Repair System failed because"; |
---|
| 1049 | mes "of a magic power conflict.^000000"; |
---|
| 1050 | close; |
---|
| 1051 | case 3: |
---|
| 1052 | mes "^3355FFYou placed the Blue Gemstone."; |
---|
| 1053 | mes "However, the Guardian Stone"; |
---|
| 1054 | mes "Repair System failed because"; |
---|
| 1055 | mes "of a magic power conflict.^000000"; |
---|
| 1056 | close; |
---|
| 1057 | } |
---|
| 1058 | break; |
---|
| 1059 | case 3: |
---|
| 1060 | specialeffect 56; //"2nd Guardian Stone#aru04" EF_BEGINSPELL4 |
---|
| 1061 | mes "^3355FFThe Gemstones must"; |
---|
| 1062 | mes "be arranged in the correct"; |
---|
| 1063 | mes "order according to their"; |
---|
| 1064 | mes "magic properties and power.^000000"; |
---|
| 1065 | next; |
---|
| 1066 | switch(select("Red Gemstone:Yellow Gemstone:Blue Gemstone")) { |
---|
| 1067 | case 1: |
---|
| 1068 | mes "^3355FFYou placed the Red Gemstone."; |
---|
| 1069 | mes "However, the Guardian Stone"; |
---|
| 1070 | mes "Repair System failed because"; |
---|
| 1071 | mes "of a magic power conflict.^000000"; |
---|
| 1072 | close; |
---|
| 1073 | case 2: |
---|
| 1074 | mes "^3355FFYou placed the Yellow Gemstone.^000000"; |
---|
| 1075 | set .@nice,.@nice+10; |
---|
| 1076 | set .@roof0,.@roof0 + 1; |
---|
| 1077 | specialeffect 18; //"2nd Guardian Stone#aru04" EF_STEAL |
---|
| 1078 | next; |
---|
| 1079 | break; |
---|
| 1080 | case 3: |
---|
| 1081 | mes "^3355FFYou placed the Blue Gemstone."; |
---|
| 1082 | mes "However, the Guardian Stone"; |
---|
| 1083 | mes "Repair System failed because"; |
---|
| 1084 | mes "of a magic power conflict.^000000"; |
---|
| 1085 | close; |
---|
| 1086 | } |
---|
| 1087 | } |
---|
| 1088 | } |
---|
| 1089 | } |
---|
| 1090 | if (.@nice > 90) { |
---|
| 1091 | if ($agit_ar04[1] == 0) { |
---|
| 1092 | mes "^3355FFThe Guardian Stone"; |
---|
| 1093 | mes "Repair System has"; |
---|
| 1094 | mes "successfully completed.^000000"; |
---|
| 1095 | close; |
---|
| 1096 | } |
---|
| 1097 | else { |
---|
| 1098 | if (agitcheck() == 0) { |
---|
| 1099 | mes "^3355FFIt is impossible to"; |
---|
| 1100 | mes "rebuild the Guardian"; |
---|
| 1101 | mes "Stone because the"; |
---|
| 1102 | mes "Emperium is not present.^000000"; |
---|
| 1103 | close; |
---|
| 1104 | } |
---|
| 1105 | else { |
---|
| 1106 | mes "^3355FFThe Gemstones have been"; |
---|
| 1107 | mes "arranged, and the Guardian"; |
---|
| 1108 | mes "Stone is successfully repaired.^000000"; |
---|
| 1109 | delitem 984,1; //Oridecon |
---|
| 1110 | delitem 985,1; //Elunium |
---|
| 1111 | delitem 7049,30; //Stone |
---|
| 1112 | delitem 717,5; //Blue_Gemstone |
---|
| 1113 | delitem 715,5; //Yellow_Gemstone |
---|
| 1114 | delitem 716,5; //Red_Gemstone |
---|
| 1115 | close2; |
---|
| 1116 | donpcevent "#aru04_df02::OnEnable"; |
---|
| 1117 | specialeffect 135; //"2nd Guardian Stone#aru04" EF_ICECRASH |
---|
| 1118 | disablenpc "2nd Guardian Stone#aru04"; |
---|
| 1119 | setarray $agit_ar04[1],0; |
---|
| 1120 | set .@df_all,$agit_ar04[0]+$agit_ar04[1]; |
---|
| 1121 | if (.@df_all == 0) { |
---|
| 1122 | mapannounce "arug_cas04","Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00"; |
---|
| 1123 | donpcevent "#aru04_RL00::OnEnable"; |
---|
| 1124 | } |
---|
| 1125 | else { |
---|
| 1126 | mapannounce "arug_cas04","The 2nd Guardian Stone has been repaired successfully.",bc_map,"0x00ff00"; |
---|
| 1127 | } |
---|
| 1128 | if ($agit_ar04[5] == 1) { |
---|
| 1129 | donpcevent "#aru04_gard02::OnEnable"; |
---|
| 1130 | } |
---|
| 1131 | end; |
---|
| 1132 | } |
---|
| 1133 | } |
---|
| 1134 | } |
---|
| 1135 | else { |
---|
| 1136 | mes "^3355FFAfter all of that work..."; |
---|
| 1137 | mes "It looks like you failed"; |
---|
| 1138 | mes "to fix the Guardian Stone,"; |
---|
| 1139 | mes "and lost some materials.^000000"; |
---|
| 1140 | delitem 7049,10; //Stone |
---|
| 1141 | delitem 717,2; //Blue_Gemstone |
---|
| 1142 | delitem 715,2; //Yellow_Gemstone |
---|
| 1143 | delitem 716,2; //Red_Gemstone |
---|
| 1144 | close; |
---|
| 1145 | } |
---|
| 1146 | } |
---|
| 1147 | else { |
---|
| 1148 | mes "^3355FFYou don't have enough"; |
---|
| 1149 | mes "materials to repair"; |
---|
| 1150 | mes "the Guardian Stone.^000000"; |
---|
| 1151 | close; |
---|
| 1152 | } |
---|
| 1153 | } |
---|
| 1154 | } |
---|
| 1155 | end; |
---|
| 1156 | |
---|
| 1157 | OnInit: |
---|
| 1158 | disablenpc "2nd Guardian Stone#aru04"; |
---|
| 1159 | end; |
---|
| 1160 | |
---|
| 1161 | OnEnable: |
---|
| 1162 | enablenpc "2nd Guardian Stone#aru04"; |
---|
| 1163 | specialeffect 247; //"2nd Guardian Stone#aru04" EF_MAPPILLAR2 |
---|
| 1164 | end; |
---|
| 1165 | |
---|
| 1166 | OnDisable: |
---|
| 1167 | disablenpc "2nd Guardian Stone#aru04"; |
---|
| 1168 | end; |
---|
| 1169 | } |
---|
| 1170 | |
---|
| 1171 | // Barrier Summoners |
---|
| 1172 | arug_cas04,2,1,0 script #aru04_RL00 -1,{ |
---|
| 1173 | OnEnable: |
---|
| 1174 | setcell "arug_cas04",138,110,145,110,cell_walkable,0; |
---|
| 1175 | setcell "arug_cas04",138,110,145,110,cell_shootable,0; |
---|
| 1176 | guardian "arug_cas04",139,111," ",1905,"#aru04_RL00::OnBarrierDestroyed"; //24; |
---|
| 1177 | guardian "arug_cas04",141,111," ",1905,"#aru04_RL00::OnBarrierDestroyed"; //25; |
---|
| 1178 | guardian "arug_cas04",143,111," ",1905,"#aru04_RL00::OnBarrierDestroyed"; //26; |
---|
| 1179 | guardian "arug_cas04",145,111," ",1905,"#aru04_RL00::OnBarrierDestroyed"; //27; |
---|
| 1180 | end; |
---|
| 1181 | |
---|
| 1182 | OnDisable: |
---|
| 1183 | setcell "arug_cas04",138,136,145,110,cell_walkable,1; |
---|
| 1184 | setcell "arug_cas04",138,110,145,110,cell_shootable,1; |
---|
| 1185 | killmonster "arug_cas04","#aru04_RL00::OnBarrierDestroyed"; |
---|
| 1186 | end; |
---|
| 1187 | |
---|
| 1188 | OnBarrierDestroyed: |
---|
| 1189 | end; |
---|
| 1190 | } |
---|
| 1191 | |
---|
| 1192 | arug_cas04,2,2,0 script #aru04_RL01 -1,{ |
---|
| 1193 | OnEnable: |
---|
| 1194 | set .MyMobCount,6; |
---|
| 1195 | setcell "arug_cas04",139,158,144,158,cell_walkable,0; |
---|
| 1196 | guardian "arug_cas04",140,157," ",1905,"#aru04_RL01::OnBarrierDestroyed"; //28; |
---|
| 1197 | guardian "arug_cas04",142,157," ",1905,"#aru04_RL01::OnBarrierDestroyed"; //29; |
---|
| 1198 | guardian "arug_cas04",144,157," ",1905,"#aru04_RL01::OnBarrierDestroyed"; //30; |
---|
| 1199 | guardian "arug_cas04",139,156," ",1905,"#aru04_RL01::OnBarrierDestroyed"; //31; |
---|
| 1200 | guardian "arug_cas04",141,156," ",1905,"#aru04_RL01::OnBarrierDestroyed"; //32; |
---|
| 1201 | guardian "arug_cas04",143,156," ",1905,"#aru04_RL01::OnBarrierDestroyed"; //33; |
---|
| 1202 | end; |
---|
| 1203 | |
---|
| 1204 | OnBarrierDestroyed: |
---|
| 1205 | set .MyMobCount,.MyMobCount-1; |
---|
| 1206 | if (.MyMobCount == 0) { |
---|
| 1207 | setarray $agit_ar04[2],1; |
---|
| 1208 | mapannounce "arug_cas04","The 1st Fortress Gate is destroyed.",bc_map,"0x00ff00"; |
---|
| 1209 | setcell "arug_cas04",139,158,144,158,cell_walkable,1; |
---|
| 1210 | } |
---|
| 1211 | end; |
---|
| 1212 | |
---|
| 1213 | OnDisable: |
---|
| 1214 | setcell "arug_cas04",139,158,144,158,cell_walkable,1; |
---|
| 1215 | killmonster "arug_cas04","#aru04_RL01::OnBarrierDestroyed"; |
---|
| 1216 | end; |
---|
| 1217 | } |
---|
| 1218 | |
---|
| 1219 | arug_cas04,2,3,0 script #aru04_RL02 -1,{ |
---|
| 1220 | OnEnable: |
---|
| 1221 | set .MyMobCount,6; |
---|
| 1222 | setcell "arug_cas04",138,210,145,210,cell_walkable,0; |
---|
| 1223 | guardian "arug_cas04",140,209," ",1905,"#aru04_RL02::OnBarrierDestroyed"; //34; |
---|
| 1224 | guardian "arug_cas04",142,209," ",1905,"#aru04_RL02::OnBarrierDestroyed"; //35; |
---|
| 1225 | guardian "arug_cas04",144,209," ",1905,"#aru04_RL02::OnBarrierDestroyed"; //36; |
---|
| 1226 | guardian "arug_cas04",139,208," ",1905,"#aru04_RL02::OnBarrierDestroyed"; //37; |
---|
| 1227 | guardian "arug_cas04",141,208," ",1905,"#aru04_RL02::OnBarrierDestroyed"; //38; |
---|
| 1228 | guardian "arug_cas04",143,208," ",1905,"#aru04_RL02::OnBarrierDestroyed"; //39; |
---|
| 1229 | end; |
---|
| 1230 | |
---|
| 1231 | OnBarrierDestroyed: |
---|
| 1232 | set .MyMobCount,.MyMobCount-1; |
---|
| 1233 | if (.MyMobCount == 0) { |
---|
| 1234 | setarray $agit_ar04[3],1; |
---|
| 1235 | mapannounce "arug_cas04","The 2nd Fortress Gate is destroyed.",bc_map,"0x00ff00"; |
---|
| 1236 | setcell "arug_cas04",138,210,145,210,cell_walkable,1; |
---|
| 1237 | } |
---|
| 1238 | end; |
---|
| 1239 | |
---|
| 1240 | OnDisable: |
---|
| 1241 | setcell "arug_cas04",138,210,145,210,cell_walkable,1; |
---|
| 1242 | killmonster "arug_cas04","#aru04_RL02::OnBarrierDestroyed"; |
---|
| 1243 | end; |
---|
| 1244 | } |
---|
| 1245 | |
---|
| 1246 | arug_cas04,2,4,0 script #aru04_RL03 -1,{ |
---|
| 1247 | OnEnable: |
---|
| 1248 | set .MyMobCount,4; |
---|
| 1249 | setcell "arug_cas04",138,263,145,263,cell_walkable,0; |
---|
| 1250 | guardian "arug_cas04",139,262," ",1905,"#aru04_RL03::OnBarrierDestroyed"; //40; |
---|
| 1251 | guardian "arug_cas04",141,262," ",1905,"#aru04_RL03::OnBarrierDestroyed"; //41; |
---|
| 1252 | guardian "arug_cas04",143,262," ",1905,"#aru04_RL03::OnBarrierDestroyed"; //42; |
---|
| 1253 | guardian "arug_cas04",145,262," ",1905,"#aru04_RL03::OnBarrierDestroyed"; //43; |
---|
| 1254 | end; |
---|
| 1255 | |
---|
| 1256 | OnBarrierDestroyed: |
---|
| 1257 | set .MyMobCount,.MyMobCount-1; |
---|
| 1258 | if (.MyMobCount == 0) { |
---|
| 1259 | setarray $agit_ar04[4],1; |
---|
| 1260 | mapannounce "arug_cas04","The 3rd Fortress Gate is destroyed!",bc_map,"0x00ff00"; |
---|
| 1261 | setcell "arug_cas04",138,363,145,263,cell_walkable,1; |
---|
| 1262 | } |
---|
| 1263 | end; |
---|
| 1264 | |
---|
| 1265 | OnDisable: |
---|
| 1266 | setcell "arug_cas04",138,363,145,263,cell_walkable,1; |
---|
| 1267 | killmonster "arug_cas04","#aru04_RL03::OnBarrierDestroyed"; |
---|
| 1268 | end; |
---|
| 1269 | } |
---|
| 1270 | |
---|
| 1271 | arug_cas04,143,158,0 script Control Device01#aru04 111,{ |
---|
| 1272 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 1273 | if (getcharid(2) == .@GID) { |
---|
| 1274 | if (strcharinfo(0) == getguildmaster(.@GID)) { |
---|
| 1275 | if ($agit_ar04[2] == 2) { |
---|
| 1276 | mes "^3355FFDemolished Fortress"; |
---|
| 1277 | mes "Gates can be repaired,"; |
---|
| 1278 | mes "but you will need to gather"; |
---|
| 1279 | mes "the following materials.^000000"; |
---|
| 1280 | next; |
---|
| 1281 | mes "^4D4DFF10 Steel^000000,"; |
---|
| 1282 | mes "^4D4DFF30 Trunks^000000,"; |
---|
| 1283 | mes "^4D4DFF5 Oridecon^000000, and"; |
---|
| 1284 | mes "^4D4DFF10 Emveretarcon^000000."; |
---|
| 1285 | next; |
---|
| 1286 | select("Continue"); |
---|
| 1287 | if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) { |
---|
| 1288 | mes "^3355FFYou will need Trunks to"; |
---|
| 1289 | mes "repair the support frame,"; |
---|
| 1290 | mes "Oridecon to enhance the"; |
---|
| 1291 | mes "gate's endurance, and"; |
---|
| 1292 | mes "Emveretarcon to basically"; |
---|
| 1293 | mes "hold everything together.^000000"; |
---|
| 1294 | next; |
---|
| 1295 | set .@ro_of01,rand(10,15); |
---|
| 1296 | while(1) { |
---|
| 1297 | if (.@ro_of02 == .@ro_of01) { |
---|
| 1298 | break; |
---|
| 1299 | } |
---|
| 1300 | else { |
---|
| 1301 | switch(rand(1,4)) { |
---|
| 1302 | case 1: |
---|
| 1303 | mes "^3355FFThe support frame"; |
---|
| 1304 | mes "is badly damaged:"; |
---|
| 1305 | mes "fixing this part"; |
---|
| 1306 | mes "is a top priority.^000000"; |
---|
| 1307 | next; |
---|
| 1308 | switch(select("Trunk:Steel:Emveretarcon:Oridecon")) { |
---|
| 1309 | case 1: |
---|
| 1310 | mes "^3355FFThe frame has been"; |
---|
| 1311 | mes "reinforced with wood.^000000"; |
---|
| 1312 | set .@rp_temp,.@rp_temp + 1; |
---|
| 1313 | set .@ro_of02,.@ro_of02 + 1; |
---|
| 1314 | specialeffect2 101; // EF_REPAIRWEAPON |
---|
| 1315 | next; |
---|
| 1316 | break; |
---|
| 1317 | case 2: |
---|
| 1318 | mes "^3355FFYou tried using steel,"; |
---|
| 1319 | mes "but it's not working very"; |
---|
| 1320 | mes "well. You'll have to try"; |
---|
| 1321 | mes "something else.^000000"; |
---|
| 1322 | close; |
---|
| 1323 | case 3: |
---|
| 1324 | mes "^3355FFYou tried using emveretarcon"; |
---|
| 1325 | mes "to reinforce the gate, but it's"; |
---|
| 1326 | mes "not working well at all."; |
---|
| 1327 | mes "You'll have to start over.^000000"; |
---|
| 1328 | close; |
---|
| 1329 | case 4: |
---|
| 1330 | mes "^3355FFYou tried using oridecon,"; |
---|
| 1331 | mes "but it's not working very"; |
---|
| 1332 | mes "well. You'll have to try"; |
---|
| 1333 | mes "something else.^000000"; |
---|
| 1334 | close; |
---|
| 1335 | } |
---|
| 1336 | break; |
---|
| 1337 | case 2: |
---|
| 1338 | mes "^3355FFIt looks like the gate's"; |
---|
| 1339 | mes "overall endurance needs to"; |
---|
| 1340 | mes "be reinforced with something.^000000"; |
---|
| 1341 | next; |
---|
| 1342 | switch(select("Trunk:Steel:Emveretarcon:Oridecon")) { |
---|
| 1343 | case 1: |
---|
| 1344 | mes "^3355FFYou tried using wood"; |
---|
| 1345 | mes "to reinforce the gate.^000000"; |
---|
| 1346 | set .@ro_of02,.@ro_of02 + 1; |
---|
| 1347 | next; |
---|
| 1348 | break; |
---|
| 1349 | case 2: |
---|
| 1350 | mes "^3355FFYou tried using steel"; |
---|
| 1351 | mes "to reinforce the gate, but"; |
---|
| 1352 | mes "it's not working well at all."; |
---|
| 1353 | mes "You'll have to start over.^000000"; |
---|
| 1354 | close; |
---|
| 1355 | case 3: |
---|
| 1356 | mes "^3355FFYou tried using emveretarcon"; |
---|
| 1357 | mes "to reinforce the gate, but it's"; |
---|
| 1358 | mes "not working well at all."; |
---|
| 1359 | mes "You'll have to start over.^000000"; |
---|
| 1360 | close; |
---|
| 1361 | case 4: |
---|
| 1362 | mes "^3355FFYou hammered the"; |
---|
| 1363 | mes "oridecon: it looks"; |
---|
| 1364 | mes "like this will work.^000000"; |
---|
| 1365 | set .@rp_temp,.@rp_temp + 1; |
---|
| 1366 | set .@ro_of02,.@ro_of02 + 1; |
---|
| 1367 | specialeffect2 101; // EF_REPAIRWEAPON |
---|
| 1368 | next; |
---|
| 1369 | break; |
---|
| 1370 | } |
---|
| 1371 | break; |
---|
| 1372 | case 3: |
---|
| 1373 | mes "^3355FFThe damage to the gate"; |
---|
| 1374 | mes "has caused all these"; |
---|
| 1375 | mes "cracks. You'll have to"; |
---|
| 1376 | mes "weld them solid somehow.^000000"; |
---|
| 1377 | next; |
---|
| 1378 | switch(select("Trunk:Steel:Emveretarcon:Oridecon")) { |
---|
| 1379 | case 1: |
---|
| 1380 | mes "^3355FFYou tried using wood to fix"; |
---|
| 1381 | mes "this problem, but it seems"; |
---|
| 1382 | mes "to have made it worse."; |
---|
| 1383 | mes "You'll have to start all over.^000000"; |
---|
| 1384 | close; |
---|
| 1385 | case 2: |
---|
| 1386 | mes "^3355FFYou used steel to weld"; |
---|
| 1387 | mes "all the cracks: the gate is"; |
---|
| 1388 | mes "is starting to look more solid.^000000"; |
---|
| 1389 | set .@rp_temp,.@rp_temp + 1; |
---|
| 1390 | set .@ro_of02,.@ro_of02 + 1; |
---|
| 1391 | specialeffect2 101; // EF_REPAIRWEAPON |
---|
| 1392 | next; |
---|
| 1393 | break; |
---|
| 1394 | case 3: |
---|
| 1395 | mes "^3355FFYou tried using emveretarcon"; |
---|
| 1396 | mes "to reinforce the gate, but it's"; |
---|
| 1397 | mes "not working well at all."; |
---|
| 1398 | mes "You'll have to start over.^000000"; |
---|
| 1399 | close; |
---|
| 1400 | case 4: |
---|
| 1401 | mes "^3355FFYou tried using oridecon,"; |
---|
| 1402 | mes "but it's not working very"; |
---|
| 1403 | mes "well. You'll have to try"; |
---|
| 1404 | mes "something else.^000000"; |
---|
| 1405 | close; |
---|
| 1406 | } |
---|
| 1407 | break; |
---|
| 1408 | case 4: |
---|
| 1409 | mes "^3355FFNow you need to make"; |
---|
| 1410 | mes "sure that the gate is held"; |
---|
| 1411 | mes "together pretty solidly.^000000"; |
---|
| 1412 | next; |
---|
| 1413 | switch(select("Trunk:Steel:Emveretarcon:Oridecon")) { |
---|
| 1414 | case 1: |
---|
| 1415 | mes "^3355FFYou tried using wood to fix"; |
---|
| 1416 | mes "this problem, but it seems"; |
---|
| 1417 | mes "to have made it worse."; |
---|
| 1418 | mes "You'll have to start all over.^000000"; |
---|
| 1419 | close; |
---|
| 1420 | case 2: |
---|
| 1421 | mes "^3355FFYou tried using steel,"; |
---|
| 1422 | mes "but it's not working very"; |
---|
| 1423 | mes "well. You'll have to try"; |
---|
| 1424 | mes "something else.^000000"; |
---|
| 1425 | close; |
---|
| 1426 | case 3: |
---|
| 1427 | mes "^3355FFYou successfully used"; |
---|
| 1428 | mes "the emveretarcon to repair"; |
---|
| 1429 | mes "much of the gate's damage.^000000"; |
---|
| 1430 | set .@rp_temp,.@rp_temp + 1; |
---|
| 1431 | set .@ro_of02,.@ro_of02 + 1; |
---|
| 1432 | specialeffect2 101; // EF_REPAIRWEAPON |
---|
| 1433 | next; |
---|
| 1434 | break; |
---|
| 1435 | case 4: |
---|
| 1436 | mes "^3355FFYou tried using oridecon,"; |
---|
| 1437 | mes "but it's not working very"; |
---|
| 1438 | mes "well. You'll have to try"; |
---|
| 1439 | mes "something else.^000000"; |
---|
| 1440 | close; |
---|
| 1441 | } |
---|
| 1442 | } |
---|
| 1443 | } |
---|
| 1444 | } |
---|
| 1445 | mes "^3355FFWell, it looks like"; |
---|
| 1446 | mes "you're just about done"; |
---|
| 1447 | mes "with repairing the gate.^000000"; |
---|
| 1448 | next; |
---|
| 1449 | if (agitcheck() == 0) { |
---|
| 1450 | mes "^3355FFUnfortunately, the Fortress"; |
---|
| 1451 | mes "Gate can't be reconstructed:"; |
---|
| 1452 | mes "the Emperium is no longer here.^000000"; |
---|
| 1453 | close; |
---|
| 1454 | } |
---|
| 1455 | else { |
---|
| 1456 | if (.@rp_temp == .@ro_of01) { |
---|
| 1457 | mes "^3355FFThe Fortress Gate has"; |
---|
| 1458 | mes "been successfully repaired!^000000"; |
---|
| 1459 | delitem 1019,30; //Wooden_Block |
---|
| 1460 | delitem 999,10; //Steel |
---|
| 1461 | delitem 1011,10; //Emveretarcon |
---|
| 1462 | delitem 984,5; //Oridecon |
---|
| 1463 | close2; |
---|
| 1464 | donpcevent "#aru04_RL01::OnEnable"; |
---|
| 1465 | disablenpc "Control Device01#aru04"; |
---|
| 1466 | mapannounce "arug_cas04","The 1st Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; |
---|
| 1467 | setarray $agit_ar01[2],0; |
---|
| 1468 | end; |
---|
| 1469 | } |
---|
| 1470 | else { |
---|
| 1471 | mes "^3355FFThe wall has been breached,"; |
---|
| 1472 | mes "and the attempt to repair the"; |
---|
| 1473 | mes "Fortress Gate has failed."; |
---|
| 1474 | mes "You lost some of your"; |
---|
| 1475 | mes "repair resources...^000000"; |
---|
| 1476 | delitem 984,2; //Oridecon |
---|
| 1477 | delitem 999,4; //Steel |
---|
| 1478 | delitem 1019,14; //Wooden_Block |
---|
| 1479 | delitem 1011,3; //Emveretarcon |
---|
| 1480 | close; |
---|
| 1481 | } |
---|
| 1482 | } |
---|
| 1483 | } |
---|
| 1484 | else { |
---|
| 1485 | mes "^3355FFYou can't attempt to repair"; |
---|
| 1486 | mes "the Fortress Gate if you don't"; |
---|
| 1487 | mes "have all the needed materials.^000000"; |
---|
| 1488 | close; |
---|
| 1489 | } |
---|
| 1490 | } |
---|
| 1491 | } |
---|
| 1492 | } |
---|
| 1493 | end; |
---|
| 1494 | |
---|
| 1495 | OnInit: |
---|
| 1496 | disablenpc "Control Device01#aru04"; |
---|
| 1497 | end; |
---|
| 1498 | |
---|
| 1499 | OnEnable: |
---|
| 1500 | enablenpc "Control Device01#aru04"; |
---|
| 1501 | end; |
---|
| 1502 | |
---|
| 1503 | OnDisable: |
---|
| 1504 | disablenpc "Control Device01#aru04"; |
---|
| 1505 | end; |
---|
| 1506 | } |
---|
| 1507 | |
---|
| 1508 | arug_cas04,135,212,0 script Control Device02#aru04 111,{ |
---|
| 1509 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 1510 | if (getcharid(2) == .@GID) { |
---|
| 1511 | if (strcharinfo(0) == getguildmaster(.@GID)) { |
---|
| 1512 | if ($agit_ar04[3] == 2) { |
---|
| 1513 | mes "^3355FFDemolished Fortress"; |
---|
| 1514 | mes "Gates can be repaired,"; |
---|
| 1515 | mes "but you will need to gather"; |
---|
| 1516 | mes "the following materials.^000000"; |
---|
| 1517 | next; |
---|
| 1518 | mes "^4D4DFF10 Steel^000000,"; |
---|
| 1519 | mes "^4D4DFF30 Trunks^000000,"; |
---|
| 1520 | mes "^4D4DFF5 Oridecon^000000, and"; |
---|
| 1521 | mes "^4D4DFF10 Emveretarcon^000000."; |
---|
| 1522 | next; |
---|
| 1523 | select("Continue"); |
---|
| 1524 | if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) { |
---|
| 1525 | mes "^3355FFYou will need Trunks to"; |
---|
| 1526 | mes "repair the support frame,"; |
---|
| 1527 | mes "Oridecon to enhance the"; |
---|
| 1528 | mes "gate's endurance, and"; |
---|
| 1529 | mes "Emveretarcon to basically"; |
---|
| 1530 | mes "hold everything together.^000000"; |
---|
| 1531 | next; |
---|
| 1532 | set .@ro_of01,rand(10,15); |
---|
| 1533 | while(1) { |
---|
| 1534 | if (.@ro_of02 == .@ro_of01) { |
---|
| 1535 | break; |
---|
| 1536 | } |
---|
| 1537 | else { |
---|
| 1538 | switch(rand(1,4)) { |
---|
| 1539 | case 1: |
---|
| 1540 | mes "^3355FFThe support frame"; |
---|
| 1541 | mes "is badly damaged:"; |
---|
| 1542 | mes "fixing this part"; |
---|
| 1543 | mes "is a top priority.^000000"; |
---|
| 1544 | next; |
---|
| 1545 | switch(select("Trunk:Steel:Emveretarcon:Oridecon")) { |
---|
| 1546 | case 1: |
---|
| 1547 | mes "^3355FFThe frame has been"; |
---|
| 1548 | mes "reinforced with wood.^000000"; |
---|
| 1549 | set .@rp_temp,.@rp_temp + 1; |
---|
| 1550 | set .@ro_of02,.@ro_of02 + 1; |
---|
| 1551 | specialeffect2 101; // EF_REPAIRWEAPON |
---|
| 1552 | next; |
---|
| 1553 | break; |
---|
| 1554 | case 2: |
---|
| 1555 | mes "^3355FFYou tried using steel,"; |
---|
| 1556 | mes "but it's not working very"; |
---|
| 1557 | mes "well. You'll have to try"; |
---|
| 1558 | mes "something else.^000000"; |
---|
| 1559 | close; |
---|
| 1560 | case 3: |
---|
| 1561 | mes "^3355FFYou tried using emveretarcon"; |
---|
| 1562 | mes "to reinforce the gate, but it's"; |
---|
| 1563 | mes "not working well at all."; |
---|
| 1564 | mes "You'll have to start over.^000000"; |
---|
| 1565 | close; |
---|
| 1566 | case 4: |
---|
| 1567 | mes "^3355FFYou tried using oridecon,"; |
---|
| 1568 | mes "but it's not working very"; |
---|
| 1569 | mes "well. You'll have to try"; |
---|
| 1570 | mes "something else.^000000"; |
---|
| 1571 | close; |
---|
| 1572 | } |
---|
| 1573 | break; |
---|
| 1574 | case 2: |
---|
| 1575 | mes "^3355FFIt looks like the gate's"; |
---|
| 1576 | mes "overall endurance needs to"; |
---|
| 1577 | mes "be reinforced with something.^000000"; |
---|
| 1578 | next; |
---|
| 1579 | switch(select("Trunk:Steel:Emveretarcon:Oridecon")) { |
---|
| 1580 | case 1: |
---|
| 1581 | mes "^3355FFYou tried using wood"; |
---|
| 1582 | mes "to reinforce the gate.^000000"; |
---|
| 1583 | set .@ro_of02,.@ro_of02 + 1; |
---|
| 1584 | next; |
---|
| 1585 | break; |
---|
| 1586 | case 2: |
---|
| 1587 | mes "^3355FFYou tried using steel"; |
---|
| 1588 | mes "to reinforce the gate, but"; |
---|
| 1589 | mes "it's not working well at all."; |
---|
| 1590 | mes "You'll have to start over.^000000"; |
---|
| 1591 | close; |
---|
| 1592 | case 3: |
---|
| 1593 | mes "^3355FFYou tried using emveretarcon"; |
---|
| 1594 | mes "to reinforce the gate, but it's"; |
---|
| 1595 | mes "not working well at all."; |
---|
| 1596 | mes "You'll have to start over.^000000"; |
---|
| 1597 | close; |
---|
| 1598 | case 4: |
---|
| 1599 | mes "^3355FFYou hammered the"; |
---|
| 1600 | mes "oridecon: it looks"; |
---|
| 1601 | mes "like this will work.^000000"; |
---|
| 1602 | set .@rp_temp,.@rp_temp + 1; |
---|
| 1603 | set .@ro_of02,.@ro_of02 + 1; |
---|
| 1604 | specialeffect2 101; // EF_REPAIRWEAPON |
---|
| 1605 | next; |
---|
| 1606 | break; |
---|
| 1607 | } |
---|
| 1608 | break; |
---|
| 1609 | case 3: |
---|
| 1610 | mes "^3355FFThe damage to the gate"; |
---|
| 1611 | mes "has caused all these"; |
---|
| 1612 | mes "cracks. You'll have to"; |
---|
| 1613 | mes "weld them solid somehow.^000000"; |
---|
| 1614 | next; |
---|
| 1615 | switch(select("Trunk:Steel:Emveretarcon:Oridecon")) { |
---|
| 1616 | case 1: |
---|
| 1617 | mes "^3355FFYou tried using wood to fix"; |
---|
| 1618 | mes "this problem, but it seems"; |
---|
| 1619 | mes "to have made it worse."; |
---|
| 1620 | mes "You'll have to start all over.^000000"; |
---|
| 1621 | close; |
---|
| 1622 | case 2: |
---|
| 1623 | mes "^3355FFYou used steel to weld"; |
---|
| 1624 | mes "all the cracks: the gate is"; |
---|
| 1625 | mes "is starting to look more solid.^000000"; |
---|
| 1626 | set .@rp_temp,.@rp_temp + 1; |
---|
| 1627 | set .@ro_of02,.@ro_of02 + 1; |
---|
| 1628 | specialeffect2 101; // EF_REPAIRWEAPON |
---|
| 1629 | next; |
---|
| 1630 | break; |
---|
| 1631 | case 3: |
---|
| 1632 | mes "^3355FFYou tried using emveretarcon"; |
---|
| 1633 | mes "to reinforce the gate, but it's"; |
---|
| 1634 | mes "not working well at all."; |
---|
| 1635 | mes "You'll have to start over.^000000"; |
---|
| 1636 | close; |
---|
| 1637 | case 4: |
---|
| 1638 | mes "^3355FFYou tried using oridecon,"; |
---|
| 1639 | mes "but it's not working very"; |
---|
| 1640 | mes "well. You'll have to try"; |
---|
| 1641 | mes "something else.^000000"; |
---|
| 1642 | close; |
---|
| 1643 | } |
---|
| 1644 | break; |
---|
| 1645 | case 4: |
---|
| 1646 | mes "^3355FFNow you need to make"; |
---|
| 1647 | mes "sure that the gate is held"; |
---|
| 1648 | mes "together pretty solidly.^000000"; |
---|
| 1649 | next; |
---|
| 1650 | switch(select("Trunk:Steel:Emveretarcon:Oridecon")) { |
---|
| 1651 | case 1: |
---|
| 1652 | mes "^3355FFYou tried using wood to fix"; |
---|
| 1653 | mes "this problem, but it seems"; |
---|
| 1654 | mes "to have made it worse."; |
---|
| 1655 | mes "You'll have to start all over.^000000"; |
---|
| 1656 | close; |
---|
| 1657 | case 2: |
---|
| 1658 | mes "^3355FFYou tried using steel,"; |
---|
| 1659 | mes "but it's not working very"; |
---|
| 1660 | mes "well. You'll have to try"; |
---|
| 1661 | mes "something else.^000000"; |
---|
| 1662 | close; |
---|
| 1663 | case 3: |
---|
| 1664 | mes "^3355FFYou successfully used"; |
---|
| 1665 | mes "the emveretarcon to repair"; |
---|
| 1666 | mes "much of the gate's damage.^000000"; |
---|
| 1667 | set .@rp_temp,.@rp_temp + 1; |
---|
| 1668 | set .@ro_of02,.@ro_of02 + 1; |
---|
| 1669 | specialeffect2 101; // EF_REPAIRWEAPON |
---|
| 1670 | next; |
---|
| 1671 | break; |
---|
| 1672 | case 4: |
---|
| 1673 | mes "^3355FFYou tried using oridecon,"; |
---|
| 1674 | mes "but it's not working very"; |
---|
| 1675 | mes "well. You'll have to try"; |
---|
| 1676 | mes "something else.^000000"; |
---|
| 1677 | close; |
---|
| 1678 | } |
---|
| 1679 | } |
---|
| 1680 | } |
---|
| 1681 | } |
---|
| 1682 | mes "^3355FFWell, it looks like"; |
---|
| 1683 | mes "you're just about done"; |
---|
| 1684 | mes "with repairing the gate.^000000"; |
---|
| 1685 | next; |
---|
| 1686 | if (agitcheck() == 0) { |
---|
| 1687 | mes "^3355FFUnfortunately, the Fortress"; |
---|
| 1688 | mes "Gate can't be reconstructed:"; |
---|
| 1689 | mes "the Emperium is no longer here.^000000"; |
---|
| 1690 | close; |
---|
| 1691 | } |
---|
| 1692 | else { |
---|
| 1693 | if (.@rp_temp == .@ro_of01) { |
---|
| 1694 | mes "^3355FFThe Fortress Gate has"; |
---|
| 1695 | mes "been successfully repaired!^000000"; |
---|
| 1696 | delitem 1019,30; //Wooden_Block |
---|
| 1697 | delitem 999,10; //Steel |
---|
| 1698 | delitem 1011,10; //Emveretarcon |
---|
| 1699 | delitem 984,5; //Oridecon |
---|
| 1700 | close2; |
---|
| 1701 | donpcevent "#aru04_RL02::OnEnable"; |
---|
| 1702 | disablenpc "Control Device02#aru04"; |
---|
| 1703 | mapannounce "arug_cas04","The 2nd Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; |
---|
| 1704 | setarray $agit_ar04[3],0; //Global Variable |
---|
| 1705 | setarray $agit_ar04[2],2; //Global Variable |
---|
| 1706 | donpcevent "Control Device01#aru04::OnDevice01#aru04_dlrp01"; |
---|
| 1707 | end; |
---|
| 1708 | } |
---|
| 1709 | else { |
---|
| 1710 | mes "^3355FFThe wall has been breached,"; |
---|
| 1711 | mes "and the attempt to repair the"; |
---|
| 1712 | mes "Fortress Gate has failed."; |
---|
| 1713 | mes "You lost some of your"; |
---|
| 1714 | mes "repair resources...^000000"; |
---|
| 1715 | delitem 984,2; //Oridecon |
---|
| 1716 | delitem 999,4; //Steel |
---|
| 1717 | delitem 1019,14; //Wooden_Block |
---|
| 1718 | delitem 1011,3; //Emveretarcon |
---|
| 1719 | close; |
---|
| 1720 | } |
---|
| 1721 | } |
---|
| 1722 | } |
---|
| 1723 | else { |
---|
| 1724 | mes "^3355FFYou can't attempt to repair"; |
---|
| 1725 | mes "the Fortress Gate if you don't"; |
---|
| 1726 | mes "have all the needed materials.^000000"; |
---|
| 1727 | close; |
---|
| 1728 | } |
---|
| 1729 | } |
---|
| 1730 | } |
---|
| 1731 | } |
---|
| 1732 | end; |
---|
| 1733 | |
---|
| 1734 | OnInit: |
---|
| 1735 | disablenpc "Control Device02#aru04"; |
---|
| 1736 | end; |
---|
| 1737 | |
---|
| 1738 | OnEnable: |
---|
| 1739 | enablenpc "Control Device02#aru04"; |
---|
| 1740 | end; |
---|
| 1741 | |
---|
| 1742 | OnDisable: |
---|
| 1743 | disablenpc "Control Device02#aru04"; |
---|
| 1744 | end; |
---|
| 1745 | } |
---|
| 1746 | |
---|
| 1747 | arug_cas04,134,266,0 script Control Device03#aru04 111,{ |
---|
| 1748 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 1749 | if (getcharid(2) == .@GID) { |
---|
| 1750 | if (strcharinfo(0) == getguildmaster(.@GID)) { |
---|
| 1751 | if ($agit_ar04[4] == 2) { |
---|
| 1752 | mes "^3355FFDemolished Fortress"; |
---|
| 1753 | mes "Gates can be repaired,"; |
---|
| 1754 | mes "but you will need to gather"; |
---|
| 1755 | mes "the following materials.^000000"; |
---|
| 1756 | next; |
---|
| 1757 | mes "^4D4DFF10 Steel^000000,"; |
---|
| 1758 | mes "^4D4DFF30 Trunks^000000,"; |
---|
| 1759 | mes "^4D4DFF5 Oridecon^000000, and"; |
---|
| 1760 | mes "^4D4DFF10 Emveretarcon^000000."; |
---|
| 1761 | next; |
---|
| 1762 | select("Continue"); |
---|
| 1763 | if ((countitem(1019) > 29) && (countitem(999) > 9) && (countitem(1011) > 9) && (countitem(984) > 4)) { |
---|
| 1764 | mes "^3355FFYou will need Trunks to"; |
---|
| 1765 | mes "repair the support frame,"; |
---|
| 1766 | mes "Oridecon to enhance the"; |
---|
| 1767 | mes "gate's endurance, and"; |
---|
| 1768 | mes "Emveretarcon to basically"; |
---|
| 1769 | mes "hold everything together.^000000"; |
---|
| 1770 | next; |
---|
| 1771 | set .@ro_of01,rand(10,15); |
---|
| 1772 | while(1) { |
---|
| 1773 | if (.@ro_of02 == .@ro_of01) { |
---|
| 1774 | break; |
---|
| 1775 | } |
---|
| 1776 | else { |
---|
| 1777 | switch(rand(1,4)) { |
---|
| 1778 | case 1: |
---|
| 1779 | mes "^3355FFThe support frame"; |
---|
| 1780 | mes "is badly damaged:"; |
---|
| 1781 | mes "fixing this part"; |
---|
| 1782 | mes "is a top priority.^000000"; |
---|
| 1783 | next; |
---|
| 1784 | switch(select("Trunk:Steel:Emveretarcon:Oridecon")) { |
---|
| 1785 | case 1: |
---|
| 1786 | mes "^3355FFThe frame has been"; |
---|
| 1787 | mes "reinforced with wood.^000000"; |
---|
| 1788 | set .@rp_temp,.@rp_temp + 1; |
---|
| 1789 | set .@ro_of02,.@ro_of02 + 1; |
---|
| 1790 | specialeffect2 101; // EF_REPAIRWEAPON |
---|
| 1791 | next; |
---|
| 1792 | break; |
---|
| 1793 | case 2: |
---|
| 1794 | mes "^3355FFYou tried using steel,"; |
---|
| 1795 | mes "but it's not working very"; |
---|
| 1796 | mes "well. You'll have to try"; |
---|
| 1797 | mes "something else.^000000"; |
---|
| 1798 | close; |
---|
| 1799 | case 3: |
---|
| 1800 | mes "^3355FFYou tried using emveretarcon"; |
---|
| 1801 | mes "to reinforce the gate, but it's"; |
---|
| 1802 | mes "not working well at all."; |
---|
| 1803 | mes "You'll have to start over.^000000"; |
---|
| 1804 | close; |
---|
| 1805 | case 4: |
---|
| 1806 | mes "^3355FFYou tried using oridecon,"; |
---|
| 1807 | mes "but it's not working very"; |
---|
| 1808 | mes "well. You'll have to try"; |
---|
| 1809 | mes "something else.^000000"; |
---|
| 1810 | close; |
---|
| 1811 | } |
---|
| 1812 | break; |
---|
| 1813 | case 2: |
---|
| 1814 | mes "^3355FFIt looks like the gate's"; |
---|
| 1815 | mes "overall endurance needs to"; |
---|
| 1816 | mes "be reinforced with something.^000000"; |
---|
| 1817 | next; |
---|
| 1818 | switch(select("Trunk:Steel:Emveretarcon:Oridecon")) { |
---|
| 1819 | case 1: |
---|
| 1820 | mes "^3355FFYou tried using wood"; |
---|
| 1821 | mes "to reinforce the gate.^000000"; |
---|
| 1822 | set .@ro_of02,.@ro_of02 + 1; |
---|
| 1823 | next; |
---|
| 1824 | break; |
---|
| 1825 | case 2: |
---|
| 1826 | mes "^3355FFYou tried using steel"; |
---|
| 1827 | mes "to reinforce the gate, but"; |
---|
| 1828 | mes "it's not working well at all."; |
---|
| 1829 | mes "You'll have to start over.^000000"; |
---|
| 1830 | close; |
---|
| 1831 | case 3: |
---|
| 1832 | mes "^3355FFYou tried using emveretarcon"; |
---|
| 1833 | mes "to reinforce the gate, but it's"; |
---|
| 1834 | mes "not working well at all."; |
---|
| 1835 | mes "You'll have to start over.^000000"; |
---|
| 1836 | close; |
---|
| 1837 | case 4: |
---|
| 1838 | mes "^3355FFYou hammered the"; |
---|
| 1839 | mes "oridecon: it looks"; |
---|
| 1840 | mes "like this will work.^000000"; |
---|
| 1841 | set .@rp_temp,.@rp_temp + 1; |
---|
| 1842 | set .@ro_of02,.@ro_of02 + 1; |
---|
| 1843 | specialeffect2 101; // EF_REPAIRWEAPON |
---|
| 1844 | next; |
---|
| 1845 | break; |
---|
| 1846 | } |
---|
| 1847 | break; |
---|
| 1848 | case 3: |
---|
| 1849 | mes "^3355FFThe damage to the gate"; |
---|
| 1850 | mes "has caused all these"; |
---|
| 1851 | mes "cracks. You'll have to"; |
---|
| 1852 | mes "weld them solid somehow.^000000"; |
---|
| 1853 | next; |
---|
| 1854 | switch(select("Trunk:Steel:Emveretarcon:Oridecon")) { |
---|
| 1855 | case 1: |
---|
| 1856 | mes "^3355FFYou tried using wood to fix"; |
---|
| 1857 | mes "this problem, but it seems"; |
---|
| 1858 | mes "to have made it worse."; |
---|
| 1859 | mes "You'll have to start all over.^000000"; |
---|
| 1860 | close; |
---|
| 1861 | case 2: |
---|
| 1862 | mes "^3355FFYou used steel to weld"; |
---|
| 1863 | mes "all the cracks: the gate is"; |
---|
| 1864 | mes "is starting to look more solid.^000000"; |
---|
| 1865 | set .@rp_temp,.@rp_temp + 1; |
---|
| 1866 | set .@ro_of02,.@ro_of02 + 1; |
---|
| 1867 | specialeffect2 101; // EF_REPAIRWEAPON |
---|
| 1868 | next; |
---|
| 1869 | break; |
---|
| 1870 | case 3: |
---|
| 1871 | mes "^3355FFYou tried using emveretarcon"; |
---|
| 1872 | mes "to reinforce the gate, but it's"; |
---|
| 1873 | mes "not working well at all."; |
---|
| 1874 | mes "You'll have to start over.^000000"; |
---|
| 1875 | close; |
---|
| 1876 | case 4: |
---|
| 1877 | mes "^3355FFYou tried using oridecon,"; |
---|
| 1878 | mes "but it's not working very"; |
---|
| 1879 | mes "well. You'll have to try"; |
---|
| 1880 | mes "something else.^000000"; |
---|
| 1881 | close; |
---|
| 1882 | } |
---|
| 1883 | break; |
---|
| 1884 | case 4: |
---|
| 1885 | mes "^3355FFNow you need to make"; |
---|
| 1886 | mes "sure that the gate is held"; |
---|
| 1887 | mes "together pretty solidly.^000000"; |
---|
| 1888 | next; |
---|
| 1889 | switch(select("Trunk:Steel:Emveretarcon:Oridecon")) { |
---|
| 1890 | case 1: |
---|
| 1891 | mes "^3355FFYou tried using wood to fix"; |
---|
| 1892 | mes "this problem, but it seems"; |
---|
| 1893 | mes "to have made it worse."; |
---|
| 1894 | mes "You'll have to start all over.^000000"; |
---|
| 1895 | close; |
---|
| 1896 | case 2: |
---|
| 1897 | mes "^3355FFYou tried using steel,"; |
---|
| 1898 | mes "but it's not working very"; |
---|
| 1899 | mes "well. You'll have to try"; |
---|
| 1900 | mes "something else.^000000"; |
---|
| 1901 | close; |
---|
| 1902 | case 3: |
---|
| 1903 | mes "^3355FFYou successfully used"; |
---|
| 1904 | mes "the emveretarcon to repair"; |
---|
| 1905 | mes "much of the gate's damage.^000000"; |
---|
| 1906 | set .@rp_temp,.@rp_temp + 1; |
---|
| 1907 | set .@ro_of02,.@ro_of02 + 1; |
---|
| 1908 | specialeffect2 101; // EF_REPAIRWEAPON |
---|
| 1909 | next; |
---|
| 1910 | break; |
---|
| 1911 | case 4: |
---|
| 1912 | mes "^3355FFYou tried using oridecon,"; |
---|
| 1913 | mes "but it's not working very"; |
---|
| 1914 | mes "well. You'll have to try"; |
---|
| 1915 | mes "something else.^000000"; |
---|
| 1916 | close; |
---|
| 1917 | } |
---|
| 1918 | } |
---|
| 1919 | } |
---|
| 1920 | } |
---|
| 1921 | mes "^3355FFWell, it looks like"; |
---|
| 1922 | mes "you're just about done"; |
---|
| 1923 | mes "with repairing the gate.^000000"; |
---|
| 1924 | next; |
---|
| 1925 | if (agitcheck() == 0) { |
---|
| 1926 | mes "^3355FFUnfortunately, the Fortress"; |
---|
| 1927 | mes "Gate can't be reconstructed:"; |
---|
| 1928 | mes "the Emperium is no longer here.^000000"; |
---|
| 1929 | close; |
---|
| 1930 | } |
---|
| 1931 | else { |
---|
| 1932 | if (.@rp_temp == .@ro_of01) { |
---|
| 1933 | mes "^3355FFThe Fortress Gate has"; |
---|
| 1934 | mes "been successfully repaired!^000000"; |
---|
| 1935 | delitem 1019,30; //Wooden_Block |
---|
| 1936 | delitem 999,10; //Steel |
---|
| 1937 | delitem 1011,10; //Emveretarcon |
---|
| 1938 | delitem 984,5; //Oridecon |
---|
| 1939 | close2; |
---|
| 1940 | donpcevent "#aru04_RL03::OnEnable"; |
---|
| 1941 | disablenpc "Control Device03#aru04"; |
---|
| 1942 | mapannounce "arug_cas04","The 3rd Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; |
---|
| 1943 | setarray $agit_ar04[4],0; |
---|
| 1944 | setarray $agit_ar04[3],2; |
---|
| 1945 | donpcevent "Control Device02#aru04::OnDevice02#aru04_dlrp02"; |
---|
| 1946 | end; |
---|
| 1947 | } |
---|
| 1948 | else { |
---|
| 1949 | mes "^3355FFThe wall has been breached,"; |
---|
| 1950 | mes "and the attempt to repair the"; |
---|
| 1951 | mes "Fortress Gate has failed."; |
---|
| 1952 | mes "You lost some of your"; |
---|
| 1953 | mes "repair resources...^000000"; |
---|
| 1954 | delitem 984,2; //Oridecon |
---|
| 1955 | delitem 999,4; //Steel |
---|
| 1956 | delitem 1019,14; //Wooden_Block |
---|
| 1957 | delitem 1011,3; //Emveretarcon |
---|
| 1958 | close; |
---|
| 1959 | } |
---|
| 1960 | } |
---|
| 1961 | } |
---|
| 1962 | else { |
---|
| 1963 | mes "^3355FFYou can't attempt to repair"; |
---|
| 1964 | mes "the Fortress Gate if you don't"; |
---|
| 1965 | mes "have all the needed materials.^000000"; |
---|
| 1966 | close; |
---|
| 1967 | } |
---|
| 1968 | } |
---|
| 1969 | } |
---|
| 1970 | } |
---|
| 1971 | end; |
---|
| 1972 | |
---|
| 1973 | OnInit: |
---|
| 1974 | disablenpc "Control Device03#aru04"; |
---|
| 1975 | end; |
---|
| 1976 | |
---|
| 1977 | OnEnable: |
---|
| 1978 | enablenpc "Control Device03#aru04"; |
---|
| 1979 | end; |
---|
| 1980 | |
---|
| 1981 | OnDisable: |
---|
| 1982 | disablenpc "Control Device03#aru04"; |
---|
| 1983 | end; |
---|
| 1984 | } |
---|
| 1985 | |
---|
| 1986 | // Link Flags |
---|
| 1987 | arug_cas04,122,314,0 script LF-01#arug_cas04 111,{ |
---|
| 1988 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 1989 | if (getcharid(2) == .@GID) { |
---|
| 1990 | mes "^3355FFThis is the Stronghold"; |
---|
| 1991 | mes "Teleport Service. Please"; |
---|
| 1992 | mes "choose a destination"; |
---|
| 1993 | mes "within the stronghold.^000000"; |
---|
| 1994 | switch(select("First Gate House:Second Gate House:Cancel")) { |
---|
| 1995 | case 1: |
---|
| 1996 | warp "arug_cas04",84,158; |
---|
| 1997 | end; |
---|
| 1998 | case 2: |
---|
| 1999 | warp "arug_cas04",197,136; |
---|
| 2000 | end; |
---|
| 2001 | case 3: |
---|
| 2002 | close; |
---|
| 2003 | } |
---|
| 2004 | } |
---|
| 2005 | end; |
---|
| 2006 | } |
---|
| 2007 | |
---|
| 2008 | arug_cas04,125,314,0 script LF-02#arug_cas04 111,{ |
---|
| 2009 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 2010 | if (getcharid(2) == .@GID) { |
---|
| 2011 | mes "^3355FFThis is the Stronghold"; |
---|
| 2012 | mes "Teleport Service. Please"; |
---|
| 2013 | mes "choose a destination"; |
---|
| 2014 | mes "within the stronghold.^000000"; |
---|
| 2015 | switch(select("Defense Area 1-1:Defense Area 1-2:Cancel")) { |
---|
| 2016 | case 1: |
---|
| 2017 | warp "arug_cas04",65,94; |
---|
| 2018 | end; |
---|
| 2019 | case 2: |
---|
| 2020 | warp "arug_cas04",211,97; |
---|
| 2021 | end; |
---|
| 2022 | case 3: |
---|
| 2023 | close; |
---|
| 2024 | } |
---|
| 2025 | } |
---|
| 2026 | end; |
---|
| 2027 | } |
---|
| 2028 | |
---|
| 2029 | arug_cas04,128,314,0 script LF-03#arug_cas04 111,{ |
---|
| 2030 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 2031 | if (getcharid(2) == .@GID) { |
---|
| 2032 | mes "^3355FFThis is the Stronghold"; |
---|
| 2033 | mes "Teleport Service. Please"; |
---|
| 2034 | mes "choose a destination"; |
---|
| 2035 | mes "within the stronghold.^000000"; |
---|
| 2036 | switch(select("Defense Area 1-3:Defense Area 1-4:Cancel")) { |
---|
| 2037 | case 1: |
---|
| 2038 | warp "arug_cas04",112,73; |
---|
| 2039 | end; |
---|
| 2040 | case 2: |
---|
| 2041 | warp "arug_cas04",171,73; |
---|
| 2042 | end; |
---|
| 2043 | case 3: |
---|
| 2044 | close; |
---|
| 2045 | } |
---|
| 2046 | } |
---|
| 2047 | end; |
---|
| 2048 | } |
---|
| 2049 | |
---|
| 2050 | arug_cas04,131,314,0 script LF-04#arug_cas04 111,{ |
---|
| 2051 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 2052 | if (getcharid(2) == .@GID) { |
---|
| 2053 | mes "^3355FFThis is the Stronghold"; |
---|
| 2054 | mes "Teleport Service. Please"; |
---|
| 2055 | mes "choose a destination"; |
---|
| 2056 | mes "within the stronghold.^000000"; |
---|
| 2057 | switch(select("Defense Area 2-1:Defense Area 2-2:Cancel")) { |
---|
| 2058 | case 1: |
---|
| 2059 | warp "arug_cas04",112,152; |
---|
| 2060 | end; |
---|
| 2061 | case 2: |
---|
| 2062 | warp "arug_cas04",172,152; |
---|
| 2063 | end; |
---|
| 2064 | case 3: |
---|
| 2065 | close; |
---|
| 2066 | } |
---|
| 2067 | } |
---|
| 2068 | end; |
---|
| 2069 | } |
---|
| 2070 | |
---|
| 2071 | arug_cas04,134,314,0 script LF-05#arug_cas04 111,{ |
---|
| 2072 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 2073 | if (getcharid(2) == .@GID) { |
---|
| 2074 | mes "^3355FFThis is the Stronghold"; |
---|
| 2075 | mes "Teleport Service. Please"; |
---|
| 2076 | mes "choose a destination"; |
---|
| 2077 | mes "within the stronghold.^000000"; |
---|
| 2078 | switch(select("Defense Area 2-3:Defense Area 2-4:Cancel")) { |
---|
| 2079 | case 1: |
---|
| 2080 | warp "arug_cas04",120,186; |
---|
| 2081 | end; |
---|
| 2082 | case 2: |
---|
| 2083 | warp "arug_cas04",162,186; |
---|
| 2084 | end; |
---|
| 2085 | case 3: |
---|
| 2086 | close; |
---|
| 2087 | } |
---|
| 2088 | } |
---|
| 2089 | end; |
---|
| 2090 | } |
---|
| 2091 | |
---|
| 2092 | arug_cas04,149,314,0 script LF-06#arug_cas04 111,{ |
---|
| 2093 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 2094 | if (getcharid(2) == .@GID) { |
---|
| 2095 | mes "^3355FFThis is the Stronghold"; |
---|
| 2096 | mes "Teleport Service. Please"; |
---|
| 2097 | mes "choose a destination"; |
---|
| 2098 | mes "within the stronghold.^000000"; |
---|
| 2099 | switch(select("Defense Area 3-1:Defense Area 3-2:Cancel")) { |
---|
| 2100 | case 1: |
---|
| 2101 | warp "arug_cas04",116,235; |
---|
| 2102 | end; |
---|
| 2103 | case 2: |
---|
| 2104 | warp "arug_cas04",164,235; |
---|
| 2105 | end; |
---|
| 2106 | case 3: |
---|
| 2107 | close; |
---|
| 2108 | } |
---|
| 2109 | } |
---|
| 2110 | end; |
---|
| 2111 | } |
---|
| 2112 | |
---|
| 2113 | arug_cas04,152,314,0 script LF-07#arug_cas04 111,{ |
---|
| 2114 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 2115 | if (getcharid(2) == .@GID) { |
---|
| 2116 | mes "^3355FFThis is the Stronghold"; |
---|
| 2117 | mes "Teleport Service. Please"; |
---|
| 2118 | mes "choose a destination"; |
---|
| 2119 | mes "within the stronghold.^000000"; |
---|
| 2120 | switch(select("Defense Area 1-1:Defense Area 2-1:Defense Area 3-1:Cancel")) { |
---|
| 2121 | case 1: |
---|
| 2122 | warp "arug_cas04",65,94; |
---|
| 2123 | end; |
---|
| 2124 | case 2: |
---|
| 2125 | warp "arug_cas04",112,152; |
---|
| 2126 | end; |
---|
| 2127 | case 3: |
---|
| 2128 | warp "arug_cas04",116,235; |
---|
| 2129 | end; |
---|
| 2130 | case 4: |
---|
| 2131 | close; |
---|
| 2132 | } |
---|
| 2133 | } |
---|
| 2134 | end; |
---|
| 2135 | } |
---|
| 2136 | |
---|
| 2137 | arug_cas04,155,314,0 script LF-08#arug_cas04 111,{ |
---|
| 2138 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 2139 | if (getcharid(2) == .@GID) { |
---|
| 2140 | mes "^3355FFThis is the Stronghold"; |
---|
| 2141 | mes "Teleport Service. Please"; |
---|
| 2142 | mes "choose a destination"; |
---|
| 2143 | mes "within the stronghold.^000000"; |
---|
| 2144 | switch(select("Defense Area 1-2:Defense Area 2-2:Defense Area 3-2:Cancel")) { |
---|
| 2145 | case 1: |
---|
| 2146 | warp "arug_cas04",211,97; |
---|
| 2147 | end; |
---|
| 2148 | case 2: |
---|
| 2149 | warp "arug_cas04",172,152; |
---|
| 2150 | end; |
---|
| 2151 | case 3: |
---|
| 2152 | warp "arug_cas04",164,235; |
---|
| 2153 | end; |
---|
| 2154 | case 4: |
---|
| 2155 | close; |
---|
| 2156 | } |
---|
| 2157 | } |
---|
| 2158 | end; |
---|
| 2159 | } |
---|
| 2160 | |
---|
| 2161 | arug_cas04,158,314,0 script LF-09#arug_cas04 111,{ |
---|
| 2162 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 2163 | if (getcharid(2) == .@GID) { |
---|
| 2164 | mes "^3355FFThis is the Stronghold"; |
---|
| 2165 | mes "Teleport Service. Please"; |
---|
| 2166 | mes "choose a destination"; |
---|
| 2167 | mes "within the stronghold.^000000"; |
---|
| 2168 | switch(select("Defense Area 1-4:Defense Area 2-4:Cancel")) { |
---|
| 2169 | case 1: |
---|
| 2170 | warp "arug_cas04",171,73; |
---|
| 2171 | end; |
---|
| 2172 | case 2: |
---|
| 2173 | warp "arug_cas04",162,186; |
---|
| 2174 | end; |
---|
| 2175 | case 3: |
---|
| 2176 | close; |
---|
| 2177 | } |
---|
| 2178 | } |
---|
| 2179 | end; |
---|
| 2180 | } |
---|
| 2181 | |
---|
| 2182 | arug_cas04,161,314,0 script LF-10#arug_cas04 111,{ |
---|
| 2183 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 2184 | if (getcharid(2) == .@GID) { |
---|
| 2185 | mes "^3355FFThis is the Stronghold"; |
---|
| 2186 | mes "Teleport Service. Would"; |
---|
| 2187 | mes "you like to teleport to the"; |
---|
| 2188 | mes "Convenience Facility for"; |
---|
| 2189 | mes "guild members?^000000"; |
---|
| 2190 | switch(select("Go to Convenience Facility:Cancel")) { |
---|
| 2191 | case 1: |
---|
| 2192 | warp "arug_cas04",321,57; |
---|
| 2193 | end; |
---|
| 2194 | case 2: |
---|
| 2195 | close; |
---|
| 2196 | } |
---|
| 2197 | } |
---|
| 2198 | end; |
---|
| 2199 | } |
---|
| 2200 | |
---|
| 2201 | arug_cas04,45,158,0 script Gefn#LF_ar04_01::LF_ar04_01 111,{ |
---|
| 2202 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 2203 | if (getcharid(2) == .@GID) { |
---|
| 2204 | mes "^3355FFThis is the Stronghold"; |
---|
| 2205 | mes "Teleport Service. Would"; |
---|
| 2206 | mes "you like to teleport to"; |
---|
| 2207 | mes "the Emperium Center?^000000"; |
---|
| 2208 | switch(select("Teleport:Cancel")) { |
---|
| 2209 | case 1: |
---|
| 2210 | warp "arug_cas04",121,318; |
---|
| 2211 | end; |
---|
| 2212 | case 2: |
---|
| 2213 | close; |
---|
| 2214 | } |
---|
| 2215 | } |
---|
| 2216 | end; |
---|
| 2217 | } |
---|
| 2218 | |
---|
| 2219 | arug_cas04,226,156,0 duplicate(LF_ar04_01) Gefn#LF_ar04_01 111 |
---|
| 2220 | arug_cas04,134,62,4 duplicate(LF_ar04_01) Gefn#LF_ar04_02 111 |
---|
| 2221 | arug_cas04,149,62,4 duplicate(LF_ar04_01) Gefn#LF_ar04_03 111 |
---|
| 2222 | arug_cas04,123,154,0 duplicate(LF_ar04_01) Gefn#LF_ar04_04 111 |
---|
| 2223 | arug_cas04,160,154,0 duplicate(LF_ar04_01) Gefn#LF_ar04_05 111 |
---|
| 2224 | arug_cas04,135,205,0 duplicate(LF_ar04_01) Gefn#LF_ar04_06 111 |
---|
| 2225 | arug_cas04,148,205,0 duplicate(LF_ar04_01) Gefn#LF_ar04_07 111 |
---|
| 2226 | arug_cas04,134,260,0 duplicate(LF_ar04_01) Gefn#LF_ar04_08 111 |
---|
| 2227 | //arug_cas04,204,142,0 duplicate(LF_ar04_01) Gefn#LF_ar04_09 111 |
---|
| 2228 | |
---|
| 2229 | arug_cas04,148,103,4 script Gefn#LF_ar04_10::LF_ar04_02 722,{ |
---|
| 2230 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 2231 | if (getcharid(2) == .@GID) { |
---|
| 2232 | mes "^3355FFThis is the Stronghold"; |
---|
| 2233 | mes "Teleport Service. Would"; |
---|
| 2234 | mes "you like to teleport to"; |
---|
| 2235 | mes "the Emperium Center?^000000"; |
---|
| 2236 | switch(select("Teleport:Cancel")) { |
---|
| 2237 | case 1: |
---|
| 2238 | warp "arug_cas04",121,318; |
---|
| 2239 | end; |
---|
| 2240 | case 2: |
---|
| 2241 | close; |
---|
| 2242 | } |
---|
| 2243 | } |
---|
| 2244 | end; |
---|
| 2245 | |
---|
| 2246 | OnRecvCastlear04: |
---|
| 2247 | FlagEmblem GetCastleData("arug_cas04",1); |
---|
| 2248 | end; |
---|
| 2249 | } |
---|
| 2250 | |
---|
| 2251 | arug_cas04,135,103,4 duplicate(LF_ar04_02) Gefn#LF_ar04_11 722 |
---|
| 2252 | arug_cas04,63,51,7 duplicate(LF_ar04_02) Gefn#LF_ar04_12 722 |
---|
| 2253 | arug_cas04,214,51,1 duplicate(LF_ar04_02) Gefn#LF_ar04_13 722 |
---|
| 2254 | |
---|
| 2255 | // Guild Manager |
---|
| 2256 | arug_cas04,328,98,3 script Steward#aru04 55,{ |
---|
| 2257 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 2258 | if (.@GID == 0) { |
---|
| 2259 | mes "[ Steward ]"; |
---|
| 2260 | mes "I await for the master"; |
---|
| 2261 | mes "whom destiny will choose"; |
---|
| 2262 | mes "for me. Do you think you"; |
---|
| 2263 | mes "have to courage and strength"; |
---|
| 2264 | mes "to conquer this stronghold?"; |
---|
| 2265 | close; |
---|
| 2266 | } |
---|
| 2267 | if (getcharid(2) != .@GID || strcharinfo(0) != getguildmaster(.@GID)) { |
---|
| 2268 | mes "[ Steward ]"; |
---|
| 2269 | mes "Hmpf. Your threats don't"; |
---|
| 2270 | mes "scare me! Guardians, drive"; |
---|
| 2271 | mes "this infidel away from here!"; |
---|
| 2272 | mes "I will always be loyal to the"; |
---|
| 2273 | mes "master of this stronghold,"; |
---|
| 2274 | mes "the one and only ^FF0000" + getguildmaster(.@GID) + "^000000."; |
---|
| 2275 | close; |
---|
| 2276 | } |
---|
| 2277 | mes "[ Steward ]"; |
---|
| 2278 | mes "Ah, Master ^FF0000" + getguildmaster(.@GID) + "^000000..."; |
---|
| 2279 | mes "How shall I serve you today?"; |
---|
| 2280 | mes "Was there an aspect of this"; |
---|
| 2281 | mes "stronghold's maintenance"; |
---|
| 2282 | mes "you wanted to discuss?"; |
---|
| 2283 | next; |
---|
| 2284 | switch(select("Stronghold Briefing:Invest in Commercial Growth:Invest in Defense growth:Hire/Fire Storage Staff:Go to Master's room")) { |
---|
| 2285 | case 1: |
---|
| 2286 | mes "[ Steward ]"; |
---|
| 2287 | mes "The Commercial Growth"; |
---|
| 2288 | mes "Level of the stronghold is ^0000ff" + GetCastleData("arug_cas04",2) + "."; |
---|
| 2289 | if (GetCastleData("arug_cas04",4) > 0) { |
---|
| 2290 | mes "Last time, you invested in"; |
---|
| 2291 | mes "Commercial Growth " + GetCastleData("arug_cas04",4) + "."; |
---|
| 2292 | } |
---|
| 2293 | next; |
---|
| 2294 | mes "[ Steward ]"; |
---|
| 2295 | mes "Our stronghold's"; |
---|
| 2296 | mes "safeguard level is " + GetCastleData("arug_cas04",3) + "."; |
---|
| 2297 | if (GetCastleData("arug_cas04",5) > 0) { |
---|
| 2298 | mes "Last time, you invested"; |
---|
| 2299 | mes "in defense " + GetCastleData("arug_cas04",5) + " times."; |
---|
| 2300 | } |
---|
| 2301 | mes " "; |
---|
| 2302 | mes "That is all, master."; |
---|
| 2303 | close; |
---|
| 2304 | case 2: |
---|
| 2305 | set .@Economy,GetCastleData("arug_cas04",2); |
---|
| 2306 | if(.@Economy < 8) set .@eco_invest,10000; |
---|
| 2307 | if(.@Economy >= 8) set .@eco_invest,20000; |
---|
| 2308 | if(.@Economy >= 16) set .@eco_invest,40000; |
---|
| 2309 | if(.@Economy >= 25) set .@eco_invest,80000; |
---|
| 2310 | if(.@Economy >= 34) set .@eco_invest,160000; |
---|
| 2311 | if(.@Economy >= 44) set .@eco_invest,320000; |
---|
| 2312 | if(.@Economy >= 54) set .@eco_invest,640000; |
---|
| 2313 | if(.@Economy >= 65) set .@eco_invest,1280000; |
---|
| 2314 | if(.@Economy >= 76) set .@eco_invest,2560000; |
---|
| 2315 | if(.@Economy >= 88) set .@eco_invest,5120000; |
---|
| 2316 | mes "[ Steward ]"; |
---|
| 2317 | mes "Raising the stronghold's"; |
---|
| 2318 | mes "commercial growth will"; |
---|
| 2319 | mes "increase the quantity of"; |
---|
| 2320 | mes "goods produced for the guild."; |
---|
| 2321 | mes "Investing in commercial growth"; |
---|
| 2322 | mes "will help the guild's future."; |
---|
| 2323 | next; |
---|
| 2324 | mes "[ Steward ]"; |
---|
| 2325 | mes "You can make one investment"; |
---|
| 2326 | mes "each day, but if you can make"; |
---|
| 2327 | mes "two investments if you pay"; |
---|
| 2328 | mes "more zeny: this will speed"; |
---|
| 2329 | mes "up commercial development,"; |
---|
| 2330 | mes "but can be quite expensive."; |
---|
| 2331 | next; |
---|
| 2332 | if (.@Economy == 100) { |
---|
| 2333 | mes "[ Steward ]"; |
---|
| 2334 | mes "However, our stronghold's"; |
---|
| 2335 | mes "commerical growth level is"; |
---|
| 2336 | mes "at 100%. It's not possible to"; |
---|
| 2337 | mes "develop commercial growth"; |
---|
| 2338 | mes "any further than that."; |
---|
| 2339 | close; |
---|
| 2340 | } |
---|
| 2341 | if (GetCastleData("arug_cas04",4) == 2) { |
---|
| 2342 | mes "[ Steward ]"; |
---|
| 2343 | mes "You've already made two"; |
---|
| 2344 | mes "investments today, so you'll"; |
---|
| 2345 | mes "have to wait until tomorrow"; |
---|
| 2346 | mes "to make another investment."; |
---|
| 2347 | close; |
---|
| 2348 | } |
---|
| 2349 | if (GetCastleData("arug_cas04",4) == 0) { |
---|
| 2350 | mes "[ Steward ]"; |
---|
| 2351 | mes "You must pay ^FF0000" + .@eco_invest + "^000000 zeny"; |
---|
| 2352 | mes "to make an investment"; |
---|
| 2353 | mes "Will you invest in this"; |
---|
| 2354 | mes "stronghold's commerical"; |
---|
| 2355 | mes "development now?"; |
---|
| 2356 | } |
---|
| 2357 | else { |
---|
| 2358 | mes "[ Steward ]"; |
---|
| 2359 | mes "You must pay ^FF0000" + .@eco_invest + "^000000"; |
---|
| 2360 | mes "more zeny to make a second"; |
---|
| 2361 | mes "investment today. Will you"; |
---|
| 2362 | mes "invest one more time?"; |
---|
| 2363 | } |
---|
| 2364 | next; |
---|
| 2365 | switch(select("Invest in Commercial Growth:Cancel")) { |
---|
| 2366 | case 1: |
---|
| 2367 | if (Zeny < .@eco_invest) { |
---|
| 2368 | mes "[ Steward ]"; |
---|
| 2369 | mes "I'm sorry, Master, but"; |
---|
| 2370 | mes "you do not have enough"; |
---|
| 2371 | mes "zeny to make an investment"; |
---|
| 2372 | mes "for the guild today."; |
---|
| 2373 | close; |
---|
| 2374 | } |
---|
| 2375 | set zeny,zeny-.@eco_invest; |
---|
| 2376 | SetCastleData "arug_cas04",4,GetCastleData("arug_cas04",4)+1; |
---|
| 2377 | SetCastleData "arug_cas04",2,.@Economy + 1 + (.@Economy<99 && rand(2) && getgdskilllv(.@GID,10014)); |
---|
| 2378 | mes "[ Steward ]"; |
---|
| 2379 | mes "A wise use of the guild's"; |
---|
| 2380 | mes "funds, Master. We can expect"; |
---|
| 2381 | mes "to see the results of this"; |
---|
| 2382 | mes "investment by tomorrow."; |
---|
| 2383 | close; |
---|
| 2384 | case 2: |
---|
| 2385 | mes "[ Steward ]"; |
---|
| 2386 | mes "As you command, Master."; |
---|
| 2387 | close; |
---|
| 2388 | } |
---|
| 2389 | case 3: |
---|
| 2390 | set .@Defence,GetCastleData("arug_cas04",3); |
---|
| 2391 | if(.@Defence < 8) set .@def_invest,20000; |
---|
| 2392 | if(.@Defence >= 8) set .@def_invest,40000; |
---|
| 2393 | if(.@Defence >= 16) set .@def_invest,80000; |
---|
| 2394 | if(.@Defence >= 25) set .@def_invest,160000; |
---|
| 2395 | if(.@Defence >= 34) set .@def_invest,320000; |
---|
| 2396 | if(.@Defence >= 44) set .@def_invest,640000; |
---|
| 2397 | if(.@Defence >= 54) set .@def_invest,1280000; |
---|
| 2398 | if(.@Defence >= 65) set .@def_invest,2560000; |
---|
| 2399 | if(.@Defence >= 76) set .@def_invest,5120000; |
---|
| 2400 | if(.@Defence >= 88) set .@def_invest,10240000; |
---|
| 2401 | mes "[ Steward ]"; |
---|
| 2402 | mes "Investing in our stronghold's"; |
---|
| 2403 | mes "defense will enhance the"; |
---|
| 2404 | mes "durability of our Guardians"; |
---|
| 2405 | mes "and the Emperium. We'll need"; |
---|
| 2406 | mes "every advantage to protect"; |
---|
| 2407 | mes "ourselves from our enemies."; |
---|
| 2408 | next; |
---|
| 2409 | mes "[ Steward ]"; |
---|
| 2410 | mes "You can invest in defense"; |
---|
| 2411 | mes "once per day, but if you pay"; |
---|
| 2412 | mes "more zeny, you can invest"; |
---|
| 2413 | mes "a maximum of two times daily."; |
---|
| 2414 | next; |
---|
| 2415 | mes "[ Steward ]"; |
---|
| 2416 | if (GetCastleData("arug_cas04",3) == 100) { |
---|
| 2417 | mes "The Defense Level of this"; |
---|
| 2418 | mes "stronghold is 100%, and"; |
---|
| 2419 | mes "cannot be increased further."; |
---|
| 2420 | close; |
---|
| 2421 | } |
---|
| 2422 | if (GetCastleData("arug_cas04",5) == 2) { |
---|
| 2423 | mes "Master, you've already"; |
---|
| 2424 | mes "invested in Defense twice"; |
---|
| 2425 | mes "today. You'll need to wait"; |
---|
| 2426 | mes "until tomorrow if you really"; |
---|
| 2427 | mes "want to increase our defenses."; |
---|
| 2428 | close; |
---|
| 2429 | } |
---|
| 2430 | if (GetCastleData("arug_cas04",5) == 0) { |
---|
| 2431 | mes "We need ^FF0000" + .@def_invest + "^000000"; |
---|
| 2432 | mes "zeny to invest in our"; |
---|
| 2433 | mes "stronghold's defenses."; |
---|
| 2434 | mes "Will you invest now?"; |
---|
| 2435 | } |
---|
| 2436 | else { |
---|
| 2437 | mes "We need ^FF0000" + .@def_invest + "^000000"; |
---|
| 2438 | mes "zeny to invest in our"; |
---|
| 2439 | mes "stronghold's defenses"; |
---|
| 2440 | mes "a second time today."; |
---|
| 2441 | mes "Will you invest now?"; |
---|
| 2442 | } |
---|
| 2443 | next; |
---|
| 2444 | switch(select("Invest in Defense:Cancel")) { |
---|
| 2445 | case 1: |
---|
| 2446 | if (Zeny < .@def_invest) { |
---|
| 2447 | mes "[ Steward ]"; |
---|
| 2448 | mes "I'm sorry, Master, but"; |
---|
| 2449 | mes "you do not have enough"; |
---|
| 2450 | mes "zeny to make an investment"; |
---|
| 2451 | mes "for the guild today."; |
---|
| 2452 | close; |
---|
| 2453 | } |
---|
| 2454 | set zeny,zeny-.@def_invest; |
---|
| 2455 | SetCastleData "arug_cas04",5,GetCastleData("arug_cas04",5)+1; |
---|
| 2456 | SetCastleData "arug_cas04",3,.@Defence+1; |
---|
| 2457 | mes "[ Steward ]"; |
---|
| 2458 | mes "A wise use of the guild's"; |
---|
| 2459 | mes "funds, Master. Increasing"; |
---|
| 2460 | mes "the frequency of treasure"; |
---|
| 2461 | mes "procured by the guild will"; |
---|
| 2462 | mes "definitely help us all."; |
---|
| 2463 | close; |
---|
| 2464 | case 2: |
---|
| 2465 | mes "[ Steward ]"; |
---|
| 2466 | mes "As you command, Master."; |
---|
| 2467 | close; |
---|
| 2468 | } |
---|
| 2469 | case 4: |
---|
| 2470 | if (GetCastleData("arug_cas04",9) == 1) { |
---|
| 2471 | mes "[ Steward ]"; |
---|
| 2472 | mes "Do you wish to dismiss"; |
---|
| 2473 | mes "the Kafra Employee that"; |
---|
| 2474 | mes "we've hired for the guild?"; |
---|
| 2475 | next; |
---|
| 2476 | switch(select("Dismiss:Cancel")) { |
---|
| 2477 | case 1: |
---|
| 2478 | cutin "kafra_01",2; |
---|
| 2479 | mes "[ Hired Kafra Employee ]"; |
---|
| 2480 | mes "Master, please reconsider!"; |
---|
| 2481 | mes "I've been working very hard"; |
---|
| 2482 | mes "for the success of the guild!"; |
---|
| 2483 | mes "I'll try harder to serve the"; |
---|
| 2484 | mes "guild members of this"; |
---|
| 2485 | mes "stronghold, I promise!"; |
---|
| 2486 | next; |
---|
| 2487 | switch(select("Dismiss:Cancel")) { |
---|
| 2488 | case 1: |
---|
| 2489 | mes "[ Hired Kafra Employee ]"; |
---|
| 2490 | mes "Why?! What have I done"; |
---|
| 2491 | mes "to deserve this? Waaah~!"; |
---|
| 2492 | next; |
---|
| 2493 | cutin "kafra_01",255; |
---|
| 2494 | break; |
---|
| 2495 | case 2: |
---|
| 2496 | mes "[ Hired Kafra Employee ]"; |
---|
| 2497 | mes "Thank you, Master!"; |
---|
| 2498 | mes "I'll obey your every"; |
---|
| 2499 | mes "command as best I can!"; |
---|
| 2500 | mes "You won't regret this!"; |
---|
| 2501 | close; |
---|
| 2502 | } |
---|
| 2503 | break; |
---|
| 2504 | case 2: |
---|
| 2505 | mes "[ Steward ]"; |
---|
| 2506 | mes "She works very hard,"; |
---|
| 2507 | mes "in my opinion. It was in"; |
---|
| 2508 | mes "all of our best interests to"; |
---|
| 2509 | mes "allow her to stay with us."; |
---|
| 2510 | close; |
---|
| 2511 | } |
---|
| 2512 | disablenpc "Kafra Employee#arug_cas04"; |
---|
| 2513 | SetCastleData "arug_cas04",9,0; |
---|
| 2514 | mes "[ Steward ]"; |
---|
| 2515 | mes "That Kafra Employee"; |
---|
| 2516 | mes "has been dismissed."; |
---|
| 2517 | mes "Were really dissatisfied"; |
---|
| 2518 | mes "by the quality of her service?"; |
---|
| 2519 | close; |
---|
| 2520 | } |
---|
| 2521 | else { |
---|
| 2522 | mes "[ Steward ]"; |
---|
| 2523 | mes "Will you hire a"; |
---|
| 2524 | mes "Kafra Employee to serve"; |
---|
| 2525 | mes "our stronghold? You must"; |
---|
| 2526 | mes "pay ^FF000010,000 zeny^000000 to hire one."; |
---|
| 2527 | next; |
---|
| 2528 | switch(select("Hire:Cancel")) { |
---|
| 2529 | case 1: |
---|
| 2530 | if (getgdskilllv(.@GID,10001) == 0) { |
---|
| 2531 | mes "[ Steward ]"; |
---|
| 2532 | mes "Master, we cannot hire a"; |
---|
| 2533 | mes "Kafra Employee because"; |
---|
| 2534 | mes "you have not yet attained"; |
---|
| 2535 | mes "the ^FF0000Contract with Kafra^000000"; |
---|
| 2536 | mes "guild skill."; |
---|
| 2537 | close; |
---|
| 2538 | } |
---|
| 2539 | if (Zeny < 10000) { |
---|
| 2540 | mes "[ Steward ]"; |
---|
| 2541 | mes "Master, we cannot hire a"; |
---|
| 2542 | mes "Kafra Employee because"; |
---|
| 2543 | mes "we do not have enough"; |
---|
| 2544 | mes "funds to pay the contract fee."; |
---|
| 2545 | close; |
---|
| 2546 | } |
---|
| 2547 | set zeny,zeny-10000; |
---|
| 2548 | enablenpc "Kafra Employee#aru04"; |
---|
| 2549 | SetCastleData "arug_cas04",9,1; |
---|
| 2550 | mes "[ Steward ]"; |
---|
| 2551 | mes "Very well. We have formed"; |
---|
| 2552 | mes "a contract with the Kafra"; |
---|
| 2553 | mes "Head Office, and hired a"; |
---|
| 2554 | mes "Kafra Employee for our"; |
---|
| 2555 | mes "stronghold. Here she is~"; |
---|
| 2556 | next; |
---|
| 2557 | cutin "kafra_01",2; |
---|
| 2558 | mes "[ Hired Kafra Employee ]"; |
---|
| 2559 | mes "How do you do? I've"; |
---|
| 2560 | mes "been dispatched by the"; |
---|
| 2561 | mes "Kafra Head Office to"; |
---|
| 2562 | mes "serve your guild's needs."; |
---|
| 2563 | mes "I'll do my best to follow"; |
---|
| 2564 | mes "your every command, Master."; |
---|
| 2565 | next; |
---|
| 2566 | cutin "kafra_01",255; |
---|
| 2567 | mes "[ Steward ]"; |
---|
| 2568 | mes "Our contract will expire"; |
---|
| 2569 | mes "after one month, so we must"; |
---|
| 2570 | mes "pay additional fees to keep"; |
---|
| 2571 | mes "this Kafra Employee in"; |
---|
| 2572 | mes "the service of our guild."; |
---|
| 2573 | close; |
---|
| 2574 | case 2: |
---|
| 2575 | mes "[ Steward ]"; |
---|
| 2576 | mes "As you command, Master."; |
---|
| 2577 | mes "However, I suggest hiring"; |
---|
| 2578 | mes "a Kafra Employee as soon"; |
---|
| 2579 | mes "as possible since our guild"; |
---|
| 2580 | mes "would greatly benefit from"; |
---|
| 2581 | mes "the convenient Kafra services."; |
---|
| 2582 | close; |
---|
| 2583 | } |
---|
| 2584 | } |
---|
| 2585 | case 5: |
---|
| 2586 | mes "[ Steward ]"; |
---|
| 2587 | mes "Do you wish to enter the"; |
---|
| 2588 | mes "Guild Treasure Room?"; |
---|
| 2589 | mes "Only you, the Guild Master,"; |
---|
| 2590 | mes "are permitted to enter."; |
---|
| 2591 | next; |
---|
| 2592 | mes "[ Steward ]"; |
---|
| 2593 | mes "Please remember to open"; |
---|
| 2594 | mes "the Treasure Boxes at the"; |
---|
| 2595 | mes "proper time. Otherwise, the"; |
---|
| 2596 | mes "treasure may disappear if"; |
---|
| 2597 | mes "something unexpected happens."; |
---|
| 2598 | next; |
---|
| 2599 | switch(select("Go to Treasure Room:Cancel")) { |
---|
| 2600 | case 1: |
---|
| 2601 | mes "[ Steward ]"; |
---|
| 2602 | mes "Allow me to guide you"; |
---|
| 2603 | mes "on the secret path to"; |
---|
| 2604 | mes "the Treasure Room."; |
---|
| 2605 | mes "Press the secret switch"; |
---|
| 2606 | mes "when you wish to return here."; |
---|
| 2607 | close2; |
---|
| 2608 | warp "arug_cas04",292,266; |
---|
| 2609 | end; |
---|
| 2610 | case 2: |
---|
| 2611 | mes "[ Steward ]"; |
---|
| 2612 | mes "Items in the Treasure Room"; |
---|
| 2613 | mes "are produced once each day."; |
---|
| 2614 | mes "Therefore, you must obtain"; |
---|
| 2615 | mes "the treasure items everyday."; |
---|
| 2616 | mes "For the sake of the guild,"; |
---|
| 2617 | mes "prioritize treasure harvesting!"; |
---|
| 2618 | close; |
---|
| 2619 | } |
---|
| 2620 | } |
---|
| 2621 | |
---|
| 2622 | Onstop: |
---|
| 2623 | stopnpctimer; |
---|
| 2624 | end; |
---|
| 2625 | |
---|
| 2626 | OnStartArena: |
---|
| 2627 | set .@GID,getcharid(2); |
---|
| 2628 | // Lower castle Economy |
---|
| 2629 | set .@Economy,GetCastleData("arug_cas04",2) - 5; |
---|
| 2630 | if (.@Economy < 0) set .@Economy, 0; |
---|
| 2631 | SetCastleData "arug_cas04", 2, .@Economy; |
---|
| 2632 | // Lower Castle Defence |
---|
| 2633 | set .@Defence,GetCastleData("arug_cas04",3) - 5; |
---|
| 2634 | if (.@Defence < 0) set .@Defence, 0; |
---|
| 2635 | SetCastleData "arug_cas04", 3, .@Defence; |
---|
| 2636 | // Set new owner |
---|
| 2637 | SetCastleData "arug_cas04",1, .@GID; |
---|
| 2638 | // Clear castle's data. |
---|
| 2639 | for( set .@i, 4; .@i <= 9; set .@i, .@i+1 ) |
---|
| 2640 | SetCastleData "arug_cas04", .@i, 0; |
---|
| 2641 | // Disable Kafra |
---|
| 2642 | disablenpc "Kafra Employee#aru04"; |
---|
| 2643 | |
---|
| 2644 | set .msg,2; |
---|
| 2645 | if (.msg == 1) { |
---|
| 2646 | announce "Fortress [" + GetCastleName("arug_cas04") + "]'s 'Valfreyja' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all; |
---|
| 2647 | donpcevent "Manager#aru04_02::Onstart"; |
---|
| 2648 | } |
---|
| 2649 | else if (.msg == 2) { |
---|
| 2650 | announce "The [" + getguildname(.@gid) + "] conquered the [Valfreyja 4] stronghold of "+GetCastleName("arug_cas04"),bc_all; |
---|
| 2651 | mapannounce "arug_cas04","The emperium has been shattered!",bc_map,"0x00FF00"; |
---|
| 2652 | if (agitcheck()) { |
---|
| 2653 | donpcevent "Manager#aru04_02::Onreset"; |
---|
| 2654 | initnpctimer; |
---|
| 2655 | } |
---|
| 2656 | else { |
---|
| 2657 | donpcevent "Manager#aru04_02::Onreset"; |
---|
| 2658 | stopnpctimer; |
---|
| 2659 | } |
---|
| 2660 | } |
---|
| 2661 | else if (.msg == 0) { |
---|
| 2662 | announce "Fortress [" + GetCastleName("arug_cas04") + "]'s 'Valfreyja' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all; |
---|
| 2663 | donpcevent "Manager#aru04_02::Onreset"; |
---|
| 2664 | stopnpctimer; |
---|
| 2665 | end; |
---|
| 2666 | } |
---|
| 2667 | MapRespawnGuildID "arug_cas04",GetCastleData("arug_cas04",1),2; |
---|
| 2668 | GetCastleData "arug_cas04",0,"::OnRecvCastlear04"; |
---|
| 2669 | end; |
---|
| 2670 | |
---|
| 2671 | OnTimer10000: |
---|
| 2672 | donpcevent "Manager#aru04_02::Onchange"; |
---|
| 2673 | mapannounce "arug_cas04","Rebuild this stonghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00"; |
---|
| 2674 | end; |
---|
| 2675 | } |
---|
| 2676 | |
---|
| 2677 | // Guild Kafra |
---|
| 2678 | arug_cas04,315,98,5 script Kafra Employee#aru04 117,{ |
---|
| 2679 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 2680 | if (getcharid(2) == .@GID && getgdskilllv(.@GID,10001)) { |
---|
| 2681 | mes "[Kafra Employee]"; |
---|
| 2682 | mes "Welcome, proud member"; |
---|
| 2683 | mes "of the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild!"; |
---|
| 2684 | mes "The Kafra Corporation is ready"; |
---|
| 2685 | mes "to assist you wherever you go!"; |
---|
| 2686 | next; |
---|
| 2687 | switch(select("Use Storage:Use Warp Service:Rent Pushcart:Cancel")) { |
---|
| 2688 | case 1: |
---|
| 2689 | if (basicskillcheck() && getskilllv("NV_BASIC") < 6) { |
---|
| 2690 | mes "[Kafra Employee]"; |
---|
| 2691 | mes "I'm so sorry, but you must"; |
---|
| 2692 | mes "have at least Novice Skill"; |
---|
| 2693 | mes "Lv.6 to use the Storage."; |
---|
| 2694 | } |
---|
| 2695 | else { |
---|
| 2696 | openstorage; |
---|
| 2697 | } |
---|
| 2698 | break; |
---|
| 2699 | case 2: |
---|
| 2700 | mes "[Kafra Employee]"; |
---|
| 2701 | mes "Please tell me your"; |
---|
| 2702 | mes "Warp destination."; |
---|
| 2703 | next; |
---|
| 2704 | switch(select("Rachel -> 200 z:Cancel")) { |
---|
| 2705 | case 1: |
---|
| 2706 | if (Zeny < 200) { |
---|
| 2707 | mes "[Kafra Employee]"; |
---|
| 2708 | mes "I'm sorry, but you don't"; |
---|
| 2709 | mes "have enough zeny to pay"; |
---|
| 2710 | mes "the warp fee. Would you"; |
---|
| 2711 | mes "please check your funds again?"; |
---|
| 2712 | close2; |
---|
| 2713 | cutin "kafra_01",255; |
---|
| 2714 | end; |
---|
| 2715 | } |
---|
| 2716 | set zeny,zeny-200; |
---|
| 2717 | warp "rachel",115,125; |
---|
| 2718 | end; |
---|
| 2719 | case 2: |
---|
| 2720 | cutin "kafra_01",255; |
---|
| 2721 | } |
---|
| 2722 | break; |
---|
| 2723 | case 3: |
---|
| 2724 | if (BaseClass != Job_Merchant) { |
---|
| 2725 | mes "[Kafra Employee]"; |
---|
| 2726 | mes "I'm sorry, but the Pushcart"; |
---|
| 2727 | mes "rental service can only be"; |
---|
| 2728 | mes "used by Merchant, Blacksmith,"; |
---|
| 2729 | mes "and Alchemist class characters."; |
---|
| 2730 | } |
---|
| 2731 | else if (checkcart() == 1) { |
---|
| 2732 | mes "[Kafra Employee]"; |
---|
| 2733 | mes "Hm? You've already"; |
---|
| 2734 | mes "rented a Pushcart."; |
---|
| 2735 | } |
---|
| 2736 | else { |
---|
| 2737 | mes "[Kafra Employee]"; |
---|
| 2738 | mes "The Pushcart rental fee"; |
---|
| 2739 | mes "is 800 zeny. Would you"; |
---|
| 2740 | mes "like to rent a Pushcart?"; |
---|
| 2741 | next; |
---|
| 2742 | switch(select("Rent Pushcart:Cancel")) { |
---|
| 2743 | case 1: |
---|
| 2744 | if (Zeny < 800) { |
---|
| 2745 | mes "[Kafra Employee]"; |
---|
| 2746 | mes "I'm sorry, but you don't"; |
---|
| 2747 | mes "have enough zeny to rent"; |
---|
| 2748 | mes "one of our Pushcarts."; |
---|
| 2749 | close2; |
---|
| 2750 | cutin "kafra_01",255; |
---|
| 2751 | end; |
---|
| 2752 | } |
---|
| 2753 | set zeny,zeny-800; |
---|
| 2754 | setcart; |
---|
| 2755 | break; |
---|
| 2756 | case 2: |
---|
| 2757 | break; |
---|
| 2758 | } |
---|
| 2759 | } |
---|
| 2760 | break; |
---|
| 2761 | case 4: |
---|
| 2762 | mes "[Kafra Employee]"; |
---|
| 2763 | mes "Thank you for using the"; |
---|
| 2764 | mes "Kafra Service. Wherever"; |
---|
| 2765 | mes "you go, Kafra will be"; |
---|
| 2766 | mes "there to support you!"; |
---|
| 2767 | close2; |
---|
| 2768 | cutin "kafra_01",255; |
---|
| 2769 | end; |
---|
| 2770 | } |
---|
| 2771 | close2; |
---|
| 2772 | cutin "kafra_01",255; |
---|
| 2773 | end; |
---|
| 2774 | } |
---|
| 2775 | else { |
---|
| 2776 | mes "[Kafra Employee]"; |
---|
| 2777 | mes "I'm sorry, but I've been"; |
---|
| 2778 | mes "exclusively contracted"; |
---|
| 2779 | mes "to the members of the"; |
---|
| 2780 | mes "^FF0000" + GetGuildName(.@GID) + "^000000 Guild."; |
---|
| 2781 | mes "You'll have to ask another"; |
---|
| 2782 | mes "Kafra Employee to help you..."; |
---|
| 2783 | close2; |
---|
| 2784 | cutin "kafra_01",255; |
---|
| 2785 | end; |
---|
| 2786 | } |
---|
| 2787 | |
---|
| 2788 | OnRecvCastlear04: |
---|
| 2789 | if (GetCastleData("arug_cas04",1) == 0) { |
---|
| 2790 | monster "arug_cas04",0,0,"Evil Druid",1117,10; |
---|
| 2791 | monster "arug_cas04",0,0,"Khalitzburg",1132,4; |
---|
| 2792 | monster "arug_cas04",0,0,"Abysmal Knight",1219,3; |
---|
| 2793 | monster "arug_cas04",0,0,"Executioner",1205,1; |
---|
| 2794 | monster "arug_cas04",0,0,"Penomena",1216,10; |
---|
| 2795 | monster "arug_cas04",0,0,"Alarm",1193,18; |
---|
| 2796 | monster "arug_cas04",0,0,"Clock",1269,9; |
---|
| 2797 | monster "arug_cas04",0,0,"Raydric Archer",1276,12; |
---|
| 2798 | monster "arug_cas04",0,0,"Wanderer",1208,3; |
---|
| 2799 | monster "arug_cas04",0,0,"Alice",1275,1; |
---|
| 2800 | monster "arug_cas04",0,0,"Bloody Knight",1268,2; |
---|
| 2801 | monster "arug_cas04",0,0,"Dark Lord",1272,2; |
---|
| 2802 | monster "arug_cas04",0,0,"Tower Keeper",1270,4; |
---|
| 2803 | } |
---|
| 2804 | if (GetCastleData("arug_cas04",9) < 1) { |
---|
| 2805 | disablenpc "Kafra Employee#aru04"; |
---|
| 2806 | } |
---|
| 2807 | end; |
---|
| 2808 | } |
---|
| 2809 | |
---|
| 2810 | arug_cas04,299,277,0 script #aru04_switch 111,{ |
---|
| 2811 | mes " "; |
---|
| 2812 | mes "^3355FFWill you pull"; |
---|
| 2813 | mes "this small lever?^000000"; |
---|
| 2814 | next; |
---|
| 2815 | switch(select("Pull Lever:Cancel")) { |
---|
| 2816 | case 1: |
---|
| 2817 | warp "arug_cas04",321,57; |
---|
| 2818 | end; |
---|
| 2819 | case 2: |
---|
| 2820 | close; |
---|
| 2821 | } |
---|
| 2822 | } |
---|
| 2823 | |
---|
| 2824 | aru_gld,306,359,6 script Gefn#flag_ar04_1::ar04_Flag 722,{ |
---|
| 2825 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 2826 | if (.@GID == 0) { |
---|
| 2827 | mes "[ Arunafeltz Royal Edict ]"; |
---|
| 2828 | mes "The Holy Kingdom of"; |
---|
| 2829 | mes "Arunafeltz declares that"; |
---|
| 2830 | mes "one has yet to claim lordship"; |
---|
| 2831 | mes "over this stronghold. The one"; |
---|
| 2832 | mes "that breaks the Emperium will"; |
---|
| 2833 | mes "be recognized as its new owner."; |
---|
| 2834 | close; |
---|
| 2835 | } |
---|
| 2836 | else { |
---|
| 2837 | if (getcharid(2) == .@GID) { |
---|
| 2838 | mes "[ Ringing Voice ]"; |
---|
| 2839 | mes "Courageous one,"; |
---|
| 2840 | mes "do you wish to return"; |
---|
| 2841 | mes "to your stronghold?"; |
---|
| 2842 | next; |
---|
| 2843 | switch(select("Return to the Stronghold:Cancel")) { |
---|
| 2844 | case 1: |
---|
| 2845 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 2846 | if (getcharid(2) == .@GID) { |
---|
| 2847 | warp "arug_cas04",121,318; |
---|
| 2848 | end; |
---|
| 2849 | } |
---|
| 2850 | close; |
---|
| 2851 | case 2: |
---|
| 2852 | close; |
---|
| 2853 | } |
---|
| 2854 | } |
---|
| 2855 | mes "[ Arunafeltz Royal Edict ]"; |
---|
| 2856 | mes "The Holy Kingdom of"; |
---|
| 2857 | mes "Arunafeltz decrees that"; |
---|
| 2858 | mes "this stronghold is owned"; |
---|
| 2859 | mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild."; |
---|
| 2860 | next; |
---|
| 2861 | mes "[ Arunafeltz Royal Edict ]"; |
---|
| 2862 | mes "^FF0000" + GetGuildMaster(.@GID) + "^000000 is"; |
---|
| 2863 | mes "Guild Master of ^FF0000" + GetGuildName(.@GID) + "^000000."; |
---|
| 2864 | mes "Any that object must claim this"; |
---|
| 2865 | mes "stronghold through strength of"; |
---|
| 2866 | mes "steel and magic during the"; |
---|
| 2867 | mes "appointed Guild Siege times."; |
---|
| 2868 | close; |
---|
| 2869 | } |
---|
| 2870 | |
---|
| 2871 | OnRecvCastlear04: |
---|
| 2872 | FlagEmblem GetCastleData("arug_cas04",1); |
---|
| 2873 | end; |
---|
| 2874 | } |
---|
| 2875 | |
---|
| 2876 | aru_gld,306,348,0 duplicate(ar04_Flag) Gefn#flag_ar04_2 722 |
---|
| 2877 | |
---|
| 2878 | aru_gld,301,318,4 script Gefn#flag_ar04_3::ar04_Flag2 722,{ |
---|
| 2879 | set .@GID, GetCastleData("arug_cas04",1); |
---|
| 2880 | if (.@GID == 0) { |
---|
| 2881 | mes "[ Arunafeltz Royal Edict ]"; |
---|
| 2882 | mes "The Holy Kingdom of"; |
---|
| 2883 | mes "Arunafeltz declares that"; |
---|
| 2884 | mes "one has yet to claim lordship"; |
---|
| 2885 | mes "over this stronghold. The one"; |
---|
| 2886 | mes "that breaks the Emperium will"; |
---|
| 2887 | mes "be recognized as its new owner."; |
---|
| 2888 | close; |
---|
| 2889 | } |
---|
| 2890 | else { |
---|
| 2891 | mes "[ Arunafeltz Royal Edict ]"; |
---|
| 2892 | mes "The Holy Kingdom of"; |
---|
| 2893 | mes "Arunafeltz decrees that"; |
---|
| 2894 | mes "this stronghold is owned"; |
---|
| 2895 | mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild."; |
---|
| 2896 | next; |
---|
| 2897 | mes "[ Arunafeltz Royal Edict ]"; |
---|
| 2898 | mes "^FF0000" + GetGuildMaster(.@GID) + "^000000 is"; |
---|
| 2899 | mes "Guild Master of ^FF0000" + GetGuildName(.@GID) + "^000000."; |
---|
| 2900 | mes "Any that object must claim this"; |
---|
| 2901 | mes "stronghold through strength of"; |
---|
| 2902 | mes "steel and magic during the"; |
---|
| 2903 | mes "appointed Guild Siege times."; |
---|
| 2904 | close; |
---|
| 2905 | } |
---|
| 2906 | |
---|
| 2907 | OnRecvCastlear04: |
---|
| 2908 | FlagEmblem GetCastleData("arug_cas04",1); |
---|
| 2909 | end; |
---|
| 2910 | } |
---|
| 2911 | |
---|
| 2912 | aru_gld,306,348,0 duplicate(ar04_Flag2) Gefn#flag_ar04_4 722 |
---|