diff options
author | wushin <pasekei@gmail.com> | 2014-01-30 15:04:29 -0800 |
---|---|---|
committer | wushin <pasekei@gmail.com> | 2014-01-30 15:04:29 -0800 |
commit | 9387e32fffe53279316c2596fd0f17f786506d81 (patch) | |
tree | bc832fea3cf1aae93f86a8a3256e912f3a7ed5cf /world/map/npc/030-4/mana_battery.txt | |
parent | 447f80120e31b97abb935e38bc2fee9e0ec9809e (diff) | |
parent | 049b7e2e0023bd8b36fbb66d3fbb8c8da2a2baaa (diff) | |
download | serverdata-9387e32fffe53279316c2596fd0f17f786506d81.tar.gz serverdata-9387e32fffe53279316c2596fd0f17f786506d81.tar.bz2 serverdata-9387e32fffe53279316c2596fd0f17f786506d81.tar.xz serverdata-9387e32fffe53279316c2596fd0f17f786506d81.zip |
Merge pull request #70 from CandyCurt/XmasFix
Xmas fix
Diffstat (limited to 'world/map/npc/030-4/mana_battery.txt')
-rw-r--r-- | world/map/npc/030-4/mana_battery.txt | 90 |
1 files changed, 74 insertions, 16 deletions
diff --git a/world/map/npc/030-4/mana_battery.txt b/world/map/npc/030-4/mana_battery.txt index 7a6977e8..a86dd527 100644 --- a/world/map/npc/030-4/mana_battery.txt +++ b/world/map/npc/030-4/mana_battery.txt @@ -18,7 +18,6 @@ // player gets state set to finished for winning the battle once and mode bit set on easy/hard accordingly // every player *is* allowed to restart the quest ONCE himself if he hasnt started it himself yet -//TODO Balance mobs for level 50/candor (with assistance, i dont care if a speed archer cant solo that thing) //TODO Add an icreasing particle effect to the chest, move it half a tile right // and make it one of those lab tables from the slime quests @@ -27,6 +26,8 @@ set $@XmasBattleStatusClone, 0; callfunc "XmasStates"; set @xmas_battle_side, 0; + if ($@XmasBattleCoolDown) + goto L_CoolDown; if (@xmas_side) set @xmas_battle_side, 1; if ($@XmasBattleStatus) @@ -83,7 +84,7 @@ L_BattleGood: L_StartGood: if ($@XmasBattleStatus) goto L_BattleInProgress; - set $@XmasBattleStatus, 1; + set @xmas_battle_status, 1; goto L_Start; goto L_Close; @@ -93,13 +94,13 @@ L_StartGoodHard: callsub S_CheckHardReq; delitem $@xmas_boss_req$[ @xmas_battle_side ], $@xmas_boss_amount[ @xmas_battle_side ]; mes "You pour a handfull of " + $@xmas_boss_req$[@xmas_battle_side] + " over the Mana Battery."; - set $@XmasBattleStatus, 2; + set @xmas_battle_status, 2; goto L_Start; L_StartBad: if ($@XmasBattleStatus) goto L_BattleInProgress; - set $@XmasBattleStatus, 3; + set @xmas_battle_status, 3; goto L_Start; L_StartBadHard: @@ -108,7 +109,7 @@ L_StartBadHard: callsub S_CheckHardReq; delitem $@xmas_boss_req$[ @xmas_battle_side ], $@xmas_boss_amount[ @xmas_battle_side ]; mes "You pour a handfull of " + $@xmas_boss_req$[@xmas_battle_side] + " over the Mana Battery."; - set $@XmasBattleStatus, 4; + set @xmas_battle_status, 4; goto L_Start; L_Start: @@ -121,6 +122,9 @@ L_Start: mes "it seems like this will not turn out as planned, Look this Guard of Honour is going crazy!"; next; npctalk "The Guards are out of control!"; + if ($@XmasBattleStatus) + goto L_BattleAlreadyStarted; + set $@XmasBattleStatus, @xmas_battle_status; set $@XmasBattleStatusClone, $@XmasBattleStatus; set $@XmasBossRound, 0; set $@XmasBossPlayerCount, getmapusers("030-4.gat"); @@ -131,8 +135,8 @@ L_Start: L_ThrowOut: // if the player didnt get a bomb yet mes "This looks dangerous. Come back when you are prepared"; - warp "030-2",151,25; next; + warp "030-2",151,25; goto L_Close; L_Coward: @@ -154,19 +158,32 @@ L_Helper: L_Repeat: //Player wants to try again on hard mode again + if ($@XmasBattleStatus) + goto L_BattleInProgress; callsub S_CheckHardReq; delitem $@xmas_boss_req$[ @xmas_battle_side ], $@xmas_boss_amount[ @xmas_battle_side ]; - set $@XmasBattleStatus, (2 * (@xmas_battle_side)) + 2; + set @xmas_battle_status, (2 * (@xmas_battle_side)) + 2; goto L_Start; L_Quit: warp "030-2",151,25; goto L_Close; +L_CoolDown: + mes "The AniManOMat is too hot to handle right now, you should wait a bit to try a new battery."; + menu + "No I prefer to leave now, get me out of here.", L_Quit, + "Ughhh, but I'm certain this time the battery will work!", -; + goto L_Close; + L_BattleInProgress: mes "The mana battery looks like it is about to explode. You better take cover!"; goto L_Close; +L_BattleAlreadyStarted: + mes "Seems like someone was faster than you."; + goto L_Close; + L_Close: callsub S_ClearVariables; close; @@ -174,7 +191,9 @@ L_Close: // per NPC logic OnTimer5000: setnpctimer 0; - if ($@XmasBattleStatus) goto L_CaveLogic; + if ($@XmasBattleStatus) + goto L_CaveLogic; + goto L_CleanUp; L_Return_1: set $@XmasBossPlayerCount, 0; @@ -185,7 +204,7 @@ L_CaveLogic: if ($@XmasBossPlayerCount < 1) goto L_AllDead; set $@BombTimer, $@BombTimer + 5; // Advance 5 seconds - if (mobcount("030-4.gat", "AniManOMat::OnGuardDeath") <= 0) + if ((mobcount("030-4.gat", "AniManOMat::OnGuardDeath") + 1) == 0) goto L_NextWave; if ($@BombTimer >= 120) goto L_NextWave; @@ -193,14 +212,15 @@ L_CaveLogic: L_NextWave: set $@BombTimer, 0; + set $@DangerCellNumber, rand(8); set $@XmasBossRound, $@XmasBossRound + 1; - if (($@XmasBossRound > 10) && (mobcount("030-4.gat", "AniManOMat::OnGuardDeath") < 0)) + if (($@XmasBossRound > 10) && ((mobcount("030-4.gat", "AniManOMat::OnGuardDeath") + 1) == 0)) goto L_Finished; // Break/LastChance(s) - if (($@XmasBossRound > 10) && ($@XmasBossRound <= 12)) + if (($@XmasBossRound > 10) && ($@XmasBossRound <= 16)) goto L_Return_1; //KillerWaves - if ($@XmasBossRound > 12) + if ($@XmasBossRound > 16) areamonster "030-4.gat", 0, 0, 50, 50, "", 1114, $@XmasBossRound*2 + $@XmasBossPlayerCount*3, "AniManOMat::OnGuardDeath"; //Normal Waves 1 to 10 // Guard Amount doubles if on hard mode @@ -250,6 +270,14 @@ L_NextWave: OnTick: if (isdead()) end; set $@XmasBossPlayerCount, $@XmasBossPlayerCount + 1; + if(isin("030-4.gat", $@DangerCellX1[$@DangerCellNumber], $@DangerCellY1[$@DangerCellNumber], $@DangerCellX2[$@DangerCellNumber], $@DangerCellY2[$@DangerCellNumber])) + goto L_DangerCell; + end; + +L_DangerCell: + message strcharinfo(0), "Target Aquired. Locking on Now."; + misceffect 10001, strcharinfo(0); + percentheal -20, 0; end; OnGuardDeath: @@ -267,7 +295,6 @@ L_Finished: L_CleanUp: areatimer "030-4.gat", 0, 0, 50, 50, 10, "AniManOMat::OnReward"; - set $@XmasBattleStatus, 0; set $@XmasBossPlayerCount, 0; set $@XmasBossRound, 0; set $@BombTimer, 0; @@ -275,7 +302,7 @@ L_CleanUp: set $@SkullAmount, 0; killmonster "030-4.gat", "AniManOMat::OnGuardDeath"; stopnpctimer; - setnpctimer 0; + cmdothernpc "#XmasChamberCooler", "CoolDown"; end; OnReward: @@ -333,7 +360,7 @@ L_Restart: "", // unused "Scrrreeeeeeeeeeeeeeeeeeeeeaaaaaaaaaaaaaaaaaaaaatch", "Scrrreeeeeeeeeeeeeeeeeeeeeaaaaaaaaaaaaaaaaaaaaatch", - "Avalia: Oh ooooh...", + "Avalia: I am getting a weird sensation ... ", "Orums Homunculus : I think they know what we are up to!", "Avalia : Oh no! This is going to blow up", "Orums Homunculus : The Door is locked you idiot, fight for your life.", @@ -347,7 +374,7 @@ L_Restart: "Orums Homunculus : Strange they are getting more and not less.", "Avalia : Oh no, they are too powerful. Fight my warriors, Fight for the spirit of Christmas.", "Orums Homunculus : If I was smart enough to stop talking, it would have happened already..", - "Avalia : I cannot believe it, this is makeing them stronger. More and more of them are comeing.", + "Avalia : I cannot believe it, this is making them stronger. More and more of them are coming.", "Orums Homunculus : I think we are almost done, the bomb should explode any second.", "Avalia : Those poor creatures. Just kill them all.", "Orums Homunculus : A N Y S E C O N D.", @@ -361,9 +388,24 @@ L_Restart: "Orum's Homunculus : Boy are you lame. So what now? The battery is still not placed! Go try again!", "Avalia : W00t you actually made it through. I think now that the manabattery lost some of its abundant power this seems to have given those nutcrackers that didn't go crazy a good boost of life energy. Thank you for your help all and come see me for a reward.", "Orum's Homunculus : Good. They are dead. Now GET OUT OF THERE, this bomb is dangerous!"; + // Danger Cells to attack sitters + // 0: 19,20,29,29 + // 1: 30,20,40,29 + // 2: 41,20,50,29 + // 3: 19,31,29,40 + // 4: 30,31,40,40 + // 5: 41,31,50,40 + // 6: 19,42,29,50 + // 7: 30,42,40,50 + // 8: 41,42,50,50 + setarray $@DangerCellX1, 19, 30, 41, 19, 30, 41, 19, 30, 41; + setarray $@DangerCellY1, 20, 20, 20, 31, 31, 31, 42, 42, 42; + setarray $@DangerCellX2, 29, 40, 50, 29, 40, 50, 29, 40, 50; + setarray $@DangerCellY2, 29, 29, 29, 40, 40, 40, 50, 50, 50; end; S_Announce: + mapannounce "030-4.gat", "Danger Cell Activated. Zone " + $@DangerCellNumber + " activated.", 0; mapannounce "030-4.gat", $@msg$, 0; mapannounce "030-2.gat", $@msg$, 0; set $@msg$, ""; @@ -391,6 +433,22 @@ S_ClearVariables: set @xmas_battle_side, 0; set @bonus, 0; set @xmas_state, 0; + set @xmas_battle_status, 0; set @karma_bonus, 0; return; } + +030-4.gat,0,0,0|script|#XmasChamberCooler|-1, +{ + end; +OnCommandCoolDown: + set $@XmasBattleStatus, 0; + set $@XmasBattleCoolDown, 1; + initnpctimer; + end; + +OnTimer120000: + set $@XmasBattleCoolDown, 0; + stopnpctimer; + end; +} |