summaryrefslogtreecommitdiff
path: root/world/map/npc/027-6/general_krukan.txt
diff options
context:
space:
mode:
authorwushin <pasekei@gmail.com>2014-04-16 13:09:51 -0500
committerwushin <pasekei@gmail.com>2014-04-16 13:09:51 -0500
commite04e9eb0065caa6adf12ef36efbd3c5a3c5c3652 (patch)
treec57506b8665c9acc305bc6c85064bb4a7ab1fbc5 /world/map/npc/027-6/general_krukan.txt
parent566297bd2b1467cf23e88bb2c0ad210b7d5a2ffa (diff)
parentc84e27e10b0f6ed56ae0ee1b0ec4fe7e9d0fd507 (diff)
downloadserverdata-2014.4.16.tar.gz
serverdata-2014.4.16.tar.bz2
serverdata-2014.4.16.tar.xz
serverdata-2014.4.16.zip
Merge pull request #79 from wushin/Tile-Fixes-Map-Travelv2014.4.16
Tile map fixes sprite travel
Diffstat (limited to 'world/map/npc/027-6/general_krukan.txt')
-rw-r--r--world/map/npc/027-6/general_krukan.txt231
1 files changed, 231 insertions, 0 deletions
diff --git a/world/map/npc/027-6/general_krukan.txt b/world/map/npc/027-6/general_krukan.txt
new file mode 100644
index 00000000..67213b49
--- /dev/null
+++ b/world/map/npc/027-6/general_krukan.txt
@@ -0,0 +1,231 @@
+// author: Jenalya, wushin
+// Based off Cindy Fight
+// General Krukan Fight
+
+027-6.gat,39,25,0|script|General Krukan|400,
+{
+ if ($@CRYPT_FIGHT1 != 0)
+ end;
+
+ set @KRUKAN_SOUL_REQ, 1;
+ set @KRUKAN_SKULL_REQ, 5;
+ set @KRUKAN_DARK_CRYSTAL_REQ, 5;
+ set @KRUKAN_BONE_REQ, 5;
+ set @minlevel, 60;
+
+ mes "[Tome]";
+ mes "The Tome is open to a page about a summon ritual that can be performed in this chamber.";
+ next;
+ goto L_TomeMain;
+
+L_TomeMain:
+ mes "What do you want to do?";
+ menu
+ "Read reagent List.", L_SummonReagents,
+ "Perform Ritual.", L_Ritual,
+ "Nothing.", L_Close;
+
+L_SummonReagents:
+ mes "Says we need " + @KRUKAN_SOUL_REQ + " Souls, " + @KRUKAN_SKULL_REQ + " Diseased Hearts, " + @KRUKAN_DARK_CRYSTAL_REQ + " Undead Eyes, and " + @KRUKAN_BONE_REQ + " Undead Ears to perform the ritual.";
+ next;
+ goto L_TomeMain;
+
+L_MissingReagents:
+ mes "It appears we are missing something, lets check the reagent list again.";
+ next;
+ goto L_SummonReagents;
+
+L_Ritual:
+ if (BaseLevel < @minlevel)
+ goto L_ToWeak;
+ if ( (countitem("Soul") < @KRUKAN_SOUL_REQ)
+ || (countitem("Skull") < @KRUKAN_SKULL_REQ)
+ || (countitem("DarkCrystal") < @KRUKAN_DARK_CRYSTAL_REQ)
+ || (countitem("Bone") < @KRUKAN_BONE_REQ) )
+ goto L_MissingReagents;
+ delitem "Soul", @KRUKAN_SOUL_REQ;
+ delitem "Skull", @KRUKAN_SKULL_REQ;
+ delitem "DarkCrystal", @KRUKAN_DARK_CRYSTAL_REQ;
+ delitem "Bone", @KRUKAN_BONE_REQ;
+ mes "As you perform the ritual you can feel the energy amass.";
+ next;
+ mes "A cold shiver runs down your spine as you feel something manifesting out of the void.";
+ if ($@CRYPT_FIGHT1 != 0)
+ goto L_Close;
+
+ // initialize fight
+ set $@CRYPT_FIGHT1, 1;
+ set $@CRYPT_FIGHT1_WAVE, 0;
+ set $@CRYPT_FIGHT1_SUMMONS_COUNT, 2;
+ set $@CRYPT_FIGHT1_PLAYER_COUNT, getmapusers("027-6.gat");
+ areamonster "027-6.gat", 0, 0, 79, 84, "", 1043, 1, "General Krukan::OnPetDeath";
+ areamonster "027-6.gat", 0, 0, 79, 84, "", 1044, 1, "General Krukan::OnPetDeath";
+
+ initnpctimer;
+ goto L_Announce;
+
+L_ToWeak:
+ mes "You try to perform the ritual but nothing happens. You don't seem experienced enough.";
+ goto L_Close;
+
+L_Close:
+ set @bonus, 0;
+ set @minlevel, 0;
+ set @KRUKAN_SOUL_REQ, 0;
+ set @KRUKAN_SKULL_REQ, 0;
+ set @KRUKAN_DARK_CRYSTAL_REQ, 0;
+ set @KRUKAN_BONE_REQ, 0;
+ close;
+
+// Fight logic attached to npc
+OnTimer5000:
+ setnpctimer 0;
+ if ($@CRYPT_FIGHT1 != 0)
+ goto L_CryptLogic;
+ goto L_Return_1;
+
+L_Return_1:
+ set $@CRYPT_FIGHT1_PLAYER_COUNT, 0;
+ areatimer "027-6.gat", 0, 0, 79, 84, 10, "General Krukan::OnTick";
+ end;
+
+L_CryptLogic:
+ set $@CRYPT_FIGHT1_ROUND_PEN, $@CRYPT_FIGHT1_PLAYER_COUNT;
+ if ($@CRYPT_FIGHT1_ROUND_PEN > 60)
+ set $@CRYPT_FIGHT1_ROUND_PEN, 60;
+ if ($@CRYPT_FIGHT1_PLAYER_COUNT <= 0)
+ goto L_CleanUpLosers;
+ set $@CRYPT_FIGHT1_SUMMONS_ROUND_TIMER, $@CRYPT_FIGHT1_SUMMONS_ROUND_TIMER + 5; // Advance 5 seconds
+ if (mobcount("027-6.gat", "General Krukan::OnPetDeath") < 0)
+ goto L_NextWave;
+ if ($@CRYPT_FIGHT1_SUMMONS_ROUND_TIMER + $@CRYPT_FIGHT1_ROUND_PEN >= 120)
+ goto L_NextWave;
+ goto L_Return_1;
+
+L_NextWave:
+ set $@CRYPT_FIGHT1_SUMMONS_ROUND_TIMER, 0;
+ set $@CRYPT_FIGHT1_WAVE, $@CRYPT_FIGHT1_WAVE + 1;
+ if ( ($@CRYPT_FIGHT1_WAVE > 10) && ($@CRYPT_FIGHT1_SUMMONS_COUNT == 0) )
+ goto L_CleanUp;
+ if ( ($@CRYPT_FIGHT1_WAVE > 10) && ($@CRYPT_FIGHT1_WAVE < 22) )
+ goto L_Return_1;
+ if ($@CRYPT_FIGHT1_WAVE > 22)
+ goto L_SummonNuke;
+ if ($@CRYPT_FIGHT1_WAVE < 5)
+ goto L_WeakSummons;
+ if ( ($@CRYPT_FIGHT1_WAVE < 10) && ($@CRYPT_FIGHT1_WAVE >= 5) )
+ goto L_StrongSummons;
+ if ($@CRYPT_FIGHT1_WAVE == 10)
+ goto L_BossSummons;
+ goto L_SummonNuke;
+
+L_SummonNuke:
+ set $@CRYPT_FIGHT1_SUMMONS_COUNT, $@CRYPT_FIGHT1_SUMMONS_COUNT + $@CRYPT_FIGHT1_WAVE*2 + $@CRYPT_FIGHT1_PLAYER_COUNT*4;
+ areamonster "027-6.gat", 0, 0, 79, 84, "", 1043, $@CRYPT_FIGHT1_WAVE*2 + $@CRYPT_FIGHT1_PLAYER_COUNT*4, "General Krukan::OnPetDeath";
+ goto L_Announce;
+
+L_WeakSummons:
+ set $@CRYPT_FIGHT1_SUMMONS_NUMBER, (5 + (1 * $@CRYPT_FIGHT1_WAVE) + (2 * $@CRYPT_FIGHT1_PLAYER_COUNT))/2;
+ set $@CRYPT_FIGHT1_SUMMONS_COUNT, $@CRYPT_FIGHT1_SUMMONS_COUNT + ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2) + ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2);
+
+ areamonster "027-6.gat", 0, 0, 79, 84, "", 1043, ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2), "General Krukan::OnPetDeath";
+ areamonster "027-6.gat", 0, 0, 79, 84, "", 1044, ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2), "General Krukan::OnPetDeath";
+ goto L_Announce;
+
+L_StrongSummons:
+ set $@CRYPT_FIGHT1_SUMMONS_NUMBER, (5 + (1 * $@CRYPT_FIGHT1_WAVE) + (2 * $@CRYPT_FIGHT1_PLAYER_COUNT))/2;
+ set $@CRYPT_FIGHT1_SUMMONS_COUNT, $@CRYPT_FIGHT1_SUMMONS_COUNT + ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2) + ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2);
+
+ areamonster "027-6.gat", 0, 0, 79, 84, "", 1036, ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2), "General Krukan::OnPetDeath";
+ areamonster "027-6.gat", 0, 0, 79, 84, "", 1045, ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2), "General Krukan::OnPetDeath";
+ goto L_Announce;
+
+L_BossSummons:
+ set $@CRYPT_FIGHT1_SUMMONS_NUMBER, (5 + (1 * $@CRYPT_FIGHT1_WAVE) + (2 * $@CRYPT_FIGHT1_PLAYER_COUNT))/2;
+ set $@CRYPT_FIGHT1_SUMMONS_COUNT, $@CRYPT_FIGHT1_SUMMONS_COUNT + ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2) + ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2);
+ areamonster "027-6.gat", 0, 0, 79, 84, "", 1036, ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2), "General Krukan::OnPetDeath";
+ areamonster "027-6.gat", 0, 0, 79, 84, "", 1045, ($@CRYPT_FIGHT1_SUMMONS_NUMBER/2), "General Krukan::OnPetDeath";
+ areamonster "027-6.gat", 0, 0, 79, 84, "", 1127, 1, "General Krukan::OnPetDeath";
+ set $@CRYPT_FIGHT1_SUMMONS_COUNT, $@CRYPT_FIGHT1_SUMMONS_COUNT + 1;
+ goto L_Announce;
+
+L_Announce:
+ set $@msg$, $@CRYPT_FIGHT1_MESSAGES$[$@CRYPT_FIGHT1_WAVE];
+ if ($@msg$ == "")
+ goto L_Return_1;
+ mapannounce "027-6.gat", $@msg$, 0;
+ mapannounce "027-3.gat", $@msg$, 0;
+ set $@msg$, "";
+ goto L_Return_1;
+
+// Called on each player once every 5 seconds
+OnTick:
+ if (isdead()) end;
+ set $@CRYPT_FIGHT1_PLAYER_COUNT, $@CRYPT_FIGHT1_PLAYER_COUNT + 1;
+ end;
+
+OnPetDeath:
+ set $@CRYPT_FIGHT1_SUMMONS_COUNT, $@CRYPT_FIGHT1_SUMMONS_COUNT - 1;
+ end;
+
+L_CleanUpLosers:
+ set $@CRYPT_FIGHT1, 0;
+ set $@CRYPT_FIGHT1_PLAYER_COUNT, 0;
+ set $@CRYPT_FIGHT1_WAVE, 0;
+ set $@CRYPT_FIGHT1_SUMMONS_ROUND_TIMER, 0;
+ set $@CRYPT_FIGHT1_SUMMONS_COUNT, 0;
+ set $@CRYPT_FIGHT1_ROUND_PEN, 0;
+ set $@CRYPT_FIGHT1_SUMMONS_NUMBER, 0;
+ killmonster "027-6.gat", "General Krukan::OnPetDeath";
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
+L_CleanUp:
+ areatimer "027-6.gat", 0, 0, 79, 84, 10, "General Krukan::OnReward";
+ set $@CRYPT_FIGHT1, 0;
+ set $@CRYPT_FIGHT1_PLAYER_COUNT, 0;
+ set $@CRYPT_FIGHT1_WAVE, 0;
+ set $@CRYPT_FIGHT1_SUMMONS_ROUND_TIMER, 0;
+ set $@CRYPT_FIGHT1_SUMMONS_COUNT, 0;
+ set $@CRYPT_FIGHT1_ROUND_PEN, 0;
+ set $@CRYPT_FIGHT1_SUMMONS_NUMBER, 0;
+ killmonster "027-6.gat", "General Krukan::OnPetDeath";
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
+OnReward:
+ if (isdead()) end;
+ set @bonus, (BaseLevel/4);
+ set DailyQuestBonus, DailyQuestBonus + @bonus;
+ message strcharinfo(0), "You feel a temporary rush of power and zest for action. " + @bonus + " daily bonus gained." ;
+ set BOSS_POINTS, BOSS_POINTS + 25;
+ message strcharinfo(0), "You gain 20 Boss Points giving you a total of " + BOSS_POINTS + ".";
+ goto L_End;
+
+L_End:
+ set @bonus, 0;
+ set @minlevel, 0;
+ set @KRUKAN_SOUL_REQ, 0;
+ set @KRUKAN_SKULL_REQ, 0;
+ set @KRUKAN_DARK_CRYSTAL_REQ, 0;
+ set @KRUKAN_BONE_REQ, 0;
+ end;
+
+OnInit:
+ setarray $@CRYPT_FIGHT1_MESSAGES$,
+ "General Krukan : Haha, Thank you mortal. You have released me from my prison. To show my graditude you can die swiftly at my hands and become part of my undead army. MUhahahahaha! Minions, Dispose of these Adventurers!",
+ "General Krukan : Ha, Looks like your tougher then I thought.",
+ "General Krukan : and here I thought I wasn't going to enjoy this.",
+ "General Krukan : More of them are coming!",
+ "General Krukan : Minions! Kill them already!",
+ "General Krukan : *facepalm* I knew I should have hired better help.",
+ "General Krukan : Well at least you will make a good addition to my army.",
+ "General Krukan : To the Abyss with you already!",
+ "General Krukan : How about you try a different approach and kill them already!",
+ "General Krukan : Minions! Last chance or it's back to being part of an ossuary for you!",
+ "General Krukan : Looks like if you want something done right you have to do it yourself.",
+ "General Krukan : Charge!.";
+ end;
+}