diff options
author | Wombat <hpwombat@yahoo.com> | 2011-06-06 10:11:14 -0400 |
---|---|---|
committer | Wombat <hpwombat@yahoo.com> | 2011-06-10 04:09:16 -0400 |
commit | 61fdb9e1b375f1c01844a57f7b37d595e684c42a (patch) | |
tree | f7282b3c12ed85c71d120361c0722f461f2aa52f /npc | |
parent | 421cac93f927ad1ddcd2b0d67d981bc425e5d4ca (diff) | |
download | serverdata-61fdb9e1b375f1c01844a57f7b37d595e684c42a.tar.gz serverdata-61fdb9e1b375f1c01844a57f7b37d595e684c42a.tar.bz2 serverdata-61fdb9e1b375f1c01844a57f7b37d595e684c42a.tar.xz serverdata-61fdb9e1b375f1c01844a57f7b37d595e684c42a.zip |
Kage's Bossfight Patch
A Bossfight Kage made, but didn't want to clean up. Needs playtesting.
Diffstat (limited to 'npc')
-rw-r--r-- | npc/005-3/_warps.txt | 1 | ||||
-rw-r--r-- | npc/005-4/_import.txt | 6 | ||||
-rw-r--r-- | npc/005-4/_mobs.txt | 8 | ||||
-rw-r--r-- | npc/005-4/_warps.txt | 4 | ||||
-rw-r--r-- | npc/005-4/bossfight.txt | 208 | ||||
-rw-r--r-- | npc/_import.txt | 1 |
6 files changed, 228 insertions, 0 deletions
diff --git a/npc/005-3/_warps.txt b/npc/005-3/_warps.txt index 09084cc1..3005e84b 100644 --- a/npc/005-3/_warps.txt +++ b/npc/005-3/_warps.txt @@ -3,3 +3,4 @@ 005-3.gat,52,33 warp CaveExit -1,-1,005-1.gat,89,24 005-3.gat,33,82 warp CaveExit -1,-1,005-1.gat,71,75 +005-3.gat,85,49 warp toBossCave -1,-1,005-4.gat,36,35 diff --git a/npc/005-4/_import.txt b/npc/005-4/_import.txt new file mode 100644 index 00000000..946e3c1d --- /dev/null +++ b/npc/005-4/_import.txt @@ -0,0 +1,6 @@ +// Map 005-4: Electricity Boss Cave +// This file is generated automatically. All manually changes will be removed when running the Converter. +map: 005-4.gat +npc: npc/005-4/_mobs.txt +npc: npc/005-4/_warps.txt +npc: npc/005-4/bossfight.txt diff --git a/npc/005-4/_mobs.txt b/npc/005-4/_mobs.txt new file mode 100644 index 00000000..9ab766cd --- /dev/null +++ b/npc/005-4/_mobs.txt @@ -0,0 +1,8 @@ +// This file is generated automatically. All manually changes will be removed when running the Converter. +// Electricity Boss Cave mobs + + + +005-4.gat,0,0,0 script Mob005-4 -1,{ + end; +} diff --git a/npc/005-4/_warps.txt b/npc/005-4/_warps.txt new file mode 100644 index 00000000..18e5e182 --- /dev/null +++ b/npc/005-4/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually changes will be removed when running the Converter. +// Electricity Boss Cave warps + +005-4.gat,37,36 warp toCave 0,-1,005-3.gat,85,50 diff --git a/npc/005-4/bossfight.txt b/npc/005-4/bossfight.txt new file mode 100644 index 00000000..2f040462 --- /dev/null +++ b/npc/005-4/bossfight.txt @@ -0,0 +1,208 @@ +//Author: Kage + +005-4.gat,36,19,0 script Switch#elecave 127,{ + if ($@ELE_CAVE_STATUS != 0) goto L_Enjoy; + + mes "*You see a switch, it is flipped off*"; + menu "No, I am NOT flipping the switch... thats final.", L_Exit, + "Ha! What's the worst that could happen?", -; + + mes "*As you flip the switch, the cave starts to rumble*"; + + if ($@ELE_CAVE_STATUS != 0) goto L_Enjoy; // Prevent from starting level 1 from two different players + + set $@ELE_CAVE_STATUS, 1; + set $@ELE_CAVE_PLAYER_COUNT, getareausers("005-4.gat", 19, 19, 54, 37); + + startnpctimer; + +L_Start_Level_1: + set $@ELE_CAVE_LEVEL, 1; + + mapannounce "005-4.gat", "Level 1 starting", 0; + + // Random colors for everyone! + areatimer "005-4.gat", 19, 19, 54, 37, 10, "Switch#elecave::onChaos"; + + // Two red, two blue. + areamonster "005-4.gat", 19, 19, 54, 37, "", 1080, 2, "Switch#elecave::onBlueDeath"; + areamonster "005-4.gat", 19, 19, 54, 37, "", 1081, 2, "Switch#elecave::onRedDeath"; + goto L_Exit; // This one is triggered on talking to the switch. + +L_Enjoy: + mes "*It seems the switch is stuck in the on position*"; +L_Exit: + close; + end; + +//-----------------------No player talking below this line------------------------------- + +// Fight logic +OnTimer3000: + setnpctimer 0; + + // We stop if no live players are around + if ($@ELE_CAVE_PLAYER_COUNT == 0) goto L_CleanUp; + set $@ELE_CAVE_PLAYER_COUNT, 0; // The onTick refills this with a live count + + // We punish them for having a different count (Aka need kill them at the same time) + set $@ELE_CAVE_RED_COUNT, mobcount("005-4.gat","Switch#elecave::onRedDeath") + 1; + set $@ELE_CAVE_BLUE_COUNT, mobcount("005-4.gat","Switch#elecave::onBlueDeath") + 1; + + set $@ELE_CAVE_DIFF, 0; + if ($@ELE_CAVE_RED_COUNT > $@ELE_CAVE_BLUE_COUNT) goto L_More_Red; + if ($@ELE_CAVE_RED_COUNT < $@ELE_CAVE_BLUE_COUNT) goto L_More_Blue; + goto L_Next_Step; + +L_More_Red: + set $@ELE_CAVE_DIFF, $@ELE_CAVE_RED_COUNT - $@ELE_CAVE_BLUE_COUNT; + mapannounce "005-4.gat", "Their are too many red ions in the air!", 0; + goto L_Next_Step; + +L_More_Blue: + set $@ELE_CAVE_DIFF, $@ELE_CAVE_BLUE_COUNT - $@ELE_CAVE_RED_COUNT; + mapannounce "005-4.gat", "Their are too many blue ions in the air!", 0; + goto L_Next_Step; + +L_Next_Step: + // Basic per player logic + areatimer "005-4.gat", 19, 19, 54, 37, 10, "Switch#elecave::onTick"; + + if ($@ELE_CAVE_RED_COUNT == 0 && $@ELE_CAVE_BLUE_COUNT == 0) goto L_Next_Level; + + end; + +L_Next_Level: + if ($@ELE_CAVE_LEVEL == 1) goto L_Start_Level_2; + if ($@ELE_CAVE_LEVEL == 2) goto L_Start_Level_3; + if ($@ELE_CAVE_LEVEL == 3) goto L_CleanUp; + end; + +L_Start_Level_2: + set $@ELE_CAVE_LEVEL, 2; + + mapannounce "005-4.gat", "Level 2 starting", 0; + + // Random colors for everyone! + areatimer "005-4.gat", 19, 19, 54, 37, 10, "Switch#elecave::onChaos"; + + // four red, four blue. + areamonster "005-4.gat", 19, 19, 54, 37, "", 1080, 4, "Switch#elecave::onBlueDeath"; + areamonster "005-4.gat", 19, 19, 54, 37, "", 1081, 4, "Switch#elecave::onRedDeath"; + end; + +L_Start_Level_3: + set $@ELE_CAVE_LEVEL, 3; + + mapannounce "005-4.gat", "Level 3 starting", 0; + + // Random colors for everyone! + areatimer "005-4.gat", 19, 19, 54, 37, 10, "Switch#elecave::onChaos"; + + // eight red, eight blue. + areamonster "005-4.gat", 19, 19, 54, 37, "", 1080, 8, "Switch#elecave::onBlueDeath"; + areamonster "005-4.gat", 19, 19, 54, 37, "", 1081, 8, "Switch#elecave::onRedDeath"; + end; + +// Being ticks + +onChaos: + if (isdead(0)) end; +L_Set_Color: + message strcharinfo(0), "You feel funny."; + set @ELE_CAVE_COLOR, rand(1, 2); + end; + +onTick: + if (isdead(0)) end; + + // Count this player as alive + set $@ELE_CAVE_PLAYER_COUNT, $@ELE_CAVE_PLAYER_COUNT + 1; + + set @drainamount, MaxHp / -20; + + if ($@ELE_CAVE_DIFF != 0) heal @drainamount * $@ELE_CAVE_DIFF, 0; + + // Make sure they have a color + if (@ELE_CAVE_COLOR == 0) goto L_Set_Color; + + if (@ELE_CAVE_COLOR == 1) goto L_Do_Red; + if (@ELE_CAVE_COLOR == 2) goto L_Do_Blue; + + end; + +L_Do_Red: + specialeffect2 120; // Red effects + + // Punish blue players who stand around a red player + areatimer "005-4.gat", getx(0) - 2, gety(0) - 2, getx(0) + 2, gety(0) + 2, 10, "Switch#elecave::onBlue"; + + if (isin("005-4.gat", 42, 19, 54, 32)) goto L_Heal; + if (isin("005-4.gat", 32, 19, 54, 37)) end; + message strcharinfo(0), "Sparks are flying between you and a piller."; + heal MaxHp / -6, 0; + + end; + +L_Do_Blue: + specialeffect2 121; // Blue effects + + // Punish red players who stand around a blue player + areatimer "005-4.gat", getx(0) - 2, gety(0) - 2, getx(0) + 2, gety(0) + 2, 10, "Switch#elecave::onRed"; + + if (isin("005-4.gat", 19, 19, 31, 32)) goto L_Heal; + if (isin("005-4.gat", 19, 19, 41, 37)) end; + message strcharinfo(0), "Sparks are flying between you and a piller."; + heal MaxHp / -6, 0; + + end; + +L_Heal: + heal MaxHp / 20, 0; + end; + +// Punishment triggers +onRed: + if (@ELE_CAVE_COLOR == 2) end; + message strcharinfo(0), "Sparks are flying between you and the person you are next to!"; + heal MaxHp / -5, 0; + end; + +onBlue: + if (@ELE_CAVE_COLOR == 1) end; + message strcharinfo(0), "Sparks are flying between you and the person you are next to!"; + heal MaxHp / -5, 0; + end; + + +// Death triggers +onBlueDeath: + // Blue players have to kill blue sparks + if (@ELE_CAVE_COLOR == 2) end; + message strcharinfo(0), "The dieing spark reacts explosively with you."; + heal MaxHp / -2, 0; + end; + +onRedDeath: + // Red players have to kill red sparks + if (@ELE_CAVE_COLOR == 1) end; + message strcharinfo(0), "The dieing spark reacts explosively with you."; + heal MaxHp / -2, 0; + end; + +onInit: + initnpctimer; + stopnpctimer; +L_CleanUp: + set $@ELE_CAVE_STATUS, 0; + set $@ELE_CAVE_PLAYER_COUNT, 0; + set $@ELE_CAVE_LEVEL, 0; + set $@ELE_CAVE_ROUND_TIMER, 0; + + killmonster "005-4.gat", "Switch#elecave::onBlueDeath"; + killmonster "005-4.gat", "Switch#elecave::onRedDeath"; + + stopnpctimer; + setnpctimer 0; + end; +} diff --git a/npc/_import.txt b/npc/_import.txt index def46287..893c6dca 100644 --- a/npc/_import.txt +++ b/npc/_import.txt @@ -13,6 +13,7 @@ import: npc/004-1/_import.txt import: npc/004-2/_import.txt import: npc/005-1/_import.txt import: npc/005-3/_import.txt +import: npc/005-4/_import.txt import: npc/006-1/_import.txt import: npc/006-3/_import.txt import: npc/007-1/_import.txt |