summaryrefslogtreecommitdiff
path: root/npc/031-3_Cave
diff options
context:
space:
mode:
Diffstat (limited to 'npc/031-3_Cave')
-rw-r--r--npc/031-3_Cave/_import.txt5
-rw-r--r--npc/031-3_Cave/_mobs.txt65
-rw-r--r--npc/031-3_Cave/_warps.txt3
-rw-r--r--npc/031-3_Cave/cindyCave.txt209
-rwxr-xr-xnpc/031-3_Cave/labyrinth.txt281
5 files changed, 563 insertions, 0 deletions
diff --git a/npc/031-3_Cave/_import.txt b/npc/031-3_Cave/_import.txt
new file mode 100644
index 00000000..44ec9310
--- /dev/null
+++ b/npc/031-3_Cave/_import.txt
@@ -0,0 +1,5 @@
+map: 031-3.gat
+npc: npc/031-3_Cave/_mobs.txt
+npc: npc/031-3_Cave/_warps.txt
+npc: npc/031-3_Cave/cindyCave.txt
+npc: npc/031-3_Cave/labyrinth.txt
diff --git a/npc/031-3_Cave/_mobs.txt b/npc/031-3_Cave/_mobs.txt
new file mode 100644
index 00000000..d82ae5ed
--- /dev/null
+++ b/npc/031-3_Cave/_mobs.txt
@@ -0,0 +1,65 @@
+// 031-3 Cave mobs
+
+031-3.gat,38,50,52,75 monster Moggun 1061,5,100000,30000,Mob031-3::On1061
+031-3.gat,213,57,66,59 monster Santa Slime 1015,5,100000,30000,Mob031-3::On1015
+031-3.gat,39,144,52,75 monster Moggun 1061,5,100000,30000,Mob031-3::On1061
+031-3.gat,39,212,52,75 monster Moggun 1061,5,100000,30000,Mob031-3::On1061
+031-3.gat,282,142,52,75 monster Moggun 1061,5,100000,30000,Mob031-3::On1061
+031-3.gat,284,222,52,75 monster Moggun 1061,5,100000,30000,Mob031-3::On1061
+031-3.gat,99,271,52,75 monster Moggun 1061,5,100000,30000,Mob031-3::On1061
+031-3.gat,281,58,52,75 monster Moggun 1061,5,100000,30000,Mob031-3::On1061
+031-3.gat,37,47,61,62 monster Ice Goblin 1058,5,100000,30000,Mob031-3::On1058
+031-3.gat,117,140,83,61 monster Ice Goblin 1058,5,100000,30000,Mob031-3::On1058
+031-3.gat,212,142,83,61 monster Ice Goblin 1058,5,100000,30000,Mob031-3::On1058
+031-3.gat,211,276,83,61 monster Ice Goblin 1058,5,100000,30000,Mob031-3::On1058
+031-3.gat,117,207,83,61 monster Ice Goblin 1058,5,100000,30000,Mob031-3::On1058
+031-3.gat,231,213,83,61 monster Ice Goblin 1058,5,100000,30000,Mob031-3::On1058
+031-3.gat,261,265,83,61 monster Ice Goblin 1058,5,100000,30000,Mob031-3::On1058
+031-3.gat,280,56,66,59 monster Santa Slime 1015,5,100000,30000,Mob031-3::On1015
+031-3.gat,120,143,66,59 monster Santa Slime 1015,5,100000,30000,Mob031-3::On1015
+031-3.gat,218,215,66,59 monster Santa Slime 1015,5,100000,30000,Mob031-3::On1015
+031-3.gat,285,216,66,59 monster Santa Slime 1015,5,100000,30000,Mob031-3::On1015
+031-3.gat,128,272,66,59 monster Santa Slime 1015,5,100000,30000,Mob031-3::On1015
+031-3.gat,212,279,66,59 monster Santa Slime 1015,5,100000,30000,Mob031-3::On1015
+031-3.gat,141,229,40,9 monster yeti 1072,3,100000,30000,Mob031-3::On1072
+031-3.gat,34,288,10,13 monster yeti 1072,3,100000,30000,Mob031-3::On1072
+031-3.gat,25,166,10,13 monster yeti 1072,3,100000,30000,Mob031-3::On1072
+031-3.gat,132,160,10,13 monster yeti 1072,3,100000,30000,Mob031-3::On1072
+031-3.gat,228,37,10,13 monster yeti 1072,3,100000,30000,Mob031-3::On1072
+031-3.gat,44,73,33,11 monster yeti 1072,1,100000,30000,Mob031-3::On1072
+031-3.gat,37,277,66,59 monster Bat 1017,10,100000,30000,Mob031-3::On1017
+031-3.gat,85,176,154,95 monster Bat 1017,10,100000,30000,Mob031-3::On1017
+031-3.gat,121,279,66,59 monster Bat 1017,10,100000,30000,Mob031-3::On1017
+031-3.gat,242,245,144,131 monster Bat 1017,10,100000,30000,Mob031-3::On1017
+031-3.gat,242,87,144,131 monster Bat 1017,10,100000,30000,Mob031-3::On1017
+031-3.gat,40,50,66,59 monster Bat 1017,10,100000,30000,Mob031-3::On1017
+
+
+031-3.gat,0,0,0 script Mob031-3 -1,{
+On1015:
+ set @mobID, 1015;
+ callfunc "MobPoints";
+ break;
+
+On1017:
+ set @mobID, 1017;
+ callfunc "MobPoints";
+ break;
+
+On1058:
+ set @mobID, 1058;
+ callfunc "MobPoints";
+ break;
+
+On1061:
+ set @mobID, 1061;
+ callfunc "MobPoints";
+ break;
+
+On1072:
+ set @mobID, 1072;
+ callfunc "MobPoints";
+ break;
+
+ end;
+}
diff --git a/npc/031-3_Cave/_warps.txt b/npc/031-3_Cave/_warps.txt
new file mode 100644
index 00000000..13bb0b34
--- /dev/null
+++ b/npc/031-3_Cave/_warps.txt
@@ -0,0 +1,3 @@
+// 031-3 Cave warps
+
+031-3.gat,212,300 warp toOutside -1,-1,031-1.gat,76,26
diff --git a/npc/031-3_Cave/cindyCave.txt b/npc/031-3_Cave/cindyCave.txt
new file mode 100644
index 00000000..131db3c8
--- /dev/null
+++ b/npc/031-3_Cave/cindyCave.txt
@@ -0,0 +1,209 @@
+// author: Jenalya
+// reviewed by:
+// state0: Cindy is totally scared and does nothing helpful
+// state1: you are able to open the cage
+// state2 and greater: Cindy is saved, she asks you to visit them
+//
+
+//TODO: picture
+031-3.gat,122,51,0 script Cindy 114, {
+ if ($@FIGHT_YETI_STATUS != 0) goto L_Yeti;
+
+ set @KEYS_AMOUNT, 10;
+
+ set @Q_Nivalis_state_MASK, NIBBLE_5_MASK;
+ set @Q_Nivalis_state_SHIFT, NIBBLE_5_SHIFT;
+
+ set @rescue_Cindy, ((QUEST_Nivalis_state & @Q_Nivalis_state_MASK) >> @Q_Nivalis_state_SHIFT);
+
+ if (Sex == 0) set @title$, "Misses";
+ if (Sex == 1) set @title$, "Mister";
+
+ if (@rescue_Cindy >= 3) goto L_Please_Visit;
+ if (@rescue_Cindy == 2) goto L_Reward;
+ if (@rescue_Cindy == 1) goto L_Please_Help;
+
+ mes "There is a little girl in a cage. As you come near, she starts to shiver and back off from you as far as she can in that small cage.";
+ next;
+ mes "You don't know, what to do.";
+ close;
+
+L_Please_Help:
+ mes "There is a little girl in a cage. As you come near, she starts to shiver and back off from you as far as she can in that small cage.";
+ next;
+ menu
+ "Hello Cindy, I'm here to save you.", - ;
+ mes "Cindy doesn't look so scared anymore.";
+ next;
+ mes "[Cindy]";
+ mes "\"Hello, dear " + @title$ + " adventurer. Did my mother send you?\"";
+ next;
+ mes "\"It's so cold in here! Can you please open the cage?\"";
+ next;
+ mes "\"But be careful, if the Yetis hear you, they will come!\"";
+ menu
+ "Try to open the cage", L_Try_Cage,
+ "Leave", -;
+ close;
+
+L_Try_Cage:
+ if (baselevel < 65) goto L_To_Weak;
+ if (countitem("TreasureKey") < @KEYS_AMOUNT) goto L_Not_Enough_Keys;
+ delitem "TreasureKey", @KEYS_AMOUNT;
+ mes "As you try to open the door of the cage, there is a loudly squeaking noise.";
+ next;
+ mes "You get an uncomfortable feeling and Cindy starts to shiver.";
+ next;
+ mes "\"Oh no, the Yetis...\"";
+ if ($@FIGHT_YETI_STATUS != 0) goto L_Yeti;
+
+ // initialize fight
+ set $@FIGHT_YETI_STATUS, 1;
+ set $@FIGHT_YETI_WAVE, 0;
+ set $@YETI_COUNT, 0;
+ set $@FIGHT_YETI_PLAYER_COUNT, getareausers("031-3.gat", 80, 20, 160, 90);
+
+ startnpctimer;
+ goto L_Exit;
+
+L_Exit:
+ close;
+
+L_Yeti:
+ mes "[Cindy]";
+ mes "\"Watch out, the Yetis!\"";
+ close;
+
+L_Reward:
+ mes "[Cindy]";
+ mes "\"You are a hero! All this strong monsters!\"";
+ next;
+ mes "\"I've found this thing in the cave - it looks valuable. I want you to have it.\"";
+ next;
+ getinventorylist;
+ if (@inventorylist_count == 100) goto L_Full_Inv;
+
+ set @reward, rand(15);
+ if (@reward < 10) goto L_Wizard_Hat;
+ getitem "WoodenStaff", 1;
+ set @rescue_Cindy, 3;
+ callsub S_Update_Mask;
+ goto L_Visit;
+
+L_Wizard_Hat:
+ // get a wizard hat in one of the ten colors - no white
+ setarray @wizardhats[0], 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209;
+ getitem @wizardhats[@reward], 1;
+ set @rescue_Cindy, 3;
+ callsub S_Update_Mask;
+
+L_Visit:
+ mes "\"Thank you so much, please come to my home. It's the house at the beach.\"";
+ next;
+ mes "\"I'm sure, my mother want to thank you as well.\"";
+ close;
+
+L_Please_Visit:
+ mes "[Cindy]";
+ mes "\"Thank you, thank you! You're a hero! Please come home with me to our house at the beach!\"";
+ close;
+
+L_To_Weak:
+ mes "You try to open the cage, but it's stuck. It seems, you're too weak!";
+ close;
+
+L_Not_Enough_Keys:
+ mes "You don't have enough keys to open the cage.";
+ close;
+
+L_Full_Inv:
+ mes "\"Oh, it seems you carry so much stuff - I will keep it for you until you can take it.\"";
+ close;
+
+// Fight logic attached to npc
+OnTimer5000:
+ setnpctimer 0;
+ if ($@FIGHT_YETI_STATUS != 0) goto L_CaveLogic;
+L_Return_1:
+ set $@FIGHT_YETI_PLAYER_COUNT, 0;
+ areatimer "031-3.gat", 80, 20, 160, 90, 10, "Cindy::onTick";
+ end;
+
+L_CaveLogic:
+ set $@FIGHT_YETI_ROUND_PEN, $@FIGHT_YETI_PLAYER_COUNT;
+ if ($@FIGHT_YETI_ROUND_PEN > 60) set $@FIGHT_YETI_ROUND_PEN, 60;
+ if ($@FIGHT_YETI_PLAYER_COUNT <= 0) goto L_CleanUp;
+ set $@FIGHT_YETI_ROUND_TIMER, $@FIGHT_YETI_ROUND_TIMER + 5; // Advance 5 seconds
+ if (mobcount("031-3.gat", "Cindy::onPetDeath") <= 0) goto L_NextWave;
+ if ($@FIGHT_YETI_ROUND_TIMER + $@FIGHT_YETI_ROUND_PEN >= 120) goto L_NextWave;
+ goto L_Return_1;
+
+L_NextWave:
+ set $@FIGHT_YETI_ROUND_TIMER, 0;
+
+ set $@FIGHT_YETI_WAVE, $@FIGHT_YETI_WAVE + 1;
+ if ($@FIGHT_YETI_WAVE > 10 && $@YETI_COUNT == 0) goto L_CleanUp;
+ if ($@FIGHT_YETI_WAVE > 10) goto L_Return_1;
+ set $@FIGHT_YETI_NUMBER, (1 + (1 * $@FIGHT_YETI_WAVE) + (2 * $@FIGHT_YETI_PLAYER_COUNT))/4;
+ set $@YETI_COUNT, $@YETI_COUNT + $@FIGHT_YETI_NUMBER;
+
+ areamonster "031-3.gat", 80, 20, 160, 90, "", 1072, $@FIGHT_YETI_NUMBER, "Cindy::onPetDeath";
+// mapannounce "031-3.gat", "WAVE: " + $@FIGHT_YETI_WAVE + " NUMBER OF YETIS SPAWNED: " + $@FIGHT_YETI_NUMBER + " TOTAL YETIS: " + $@YETI_COUNT, 0;
+ goto L_Return_1;
+
+// Called on each player once every 5 seconds
+onTick:
+ if (isdead(0)) end;
+ set $@FIGHT_YETI_PLAYER_COUNT, $@FIGHT_YETI_PLAYER_COUNT + 1;
+ end;
+
+onPetDeath:
+ set $@YETI_COUNT, $@YETI_COUNT - 1;
+ end;
+
+onInit:
+ initnpctimer;
+ stopnpctimer;
+L_CleanUp:
+ areatimer "031-3.gat", 80, 20, 160, 90, 10, "Cindy::onReward";
+ set $@FIGHT_YETI_STATUS, 0;
+ set $@FIGHT_YETI_PLAYER_COUNT, 0;
+ set $@FIGHT_YETI_WAVE, 1;
+ set $@FIGHT_YETI_ROUND_TIMER, 0;
+ killmonster "031-3.gat", "Cindy::onPetDeath";
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
+onReward:
+ if (isdead(0)) end;
+//TODO: determine, if and how many boss points should be added
+ set BOSS_POINTS, BOSS_POINTS + 10;
+ message strcharinfo(0), "You gain 10 Boss Points giving you a total of " + BOSS_POINTS;
+ if (@rescue_Cindy < 1) goto L_No_Progress;
+ set @rescue_Cindy, 2;
+ callsub S_Update_Mask;
+ message strcharinfo(0), "Cindy looks relieved and as if she wants to talk with you.";
+L_No_Progress:
+ end;
+
+/////////
+S_Update_Mask:
+ set QUEST_Nivalis_state,
+ (QUEST_Nivalis_state & ~(@Q_Nivalis_state_MASK))
+ | (@rescue_Cindy << @Q_Nivalis_state_SHIFT);
+ return;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/npc/031-3_Cave/labyrinth.txt b/npc/031-3_Cave/labyrinth.txt
new file mode 100755
index 00000000..a73085e3
--- /dev/null
+++ b/npc/031-3_Cave/labyrinth.txt
@@ -0,0 +1,281 @@
+//#################################################################################
+//#
+//# Warps for the labyrinth on christmas 2010
+//#
+//# Authors: alastrim, PjotrOrial
+//#
+//# reviewed by:
+//#
+//# This is a labyrinth, having lots of warps in there.
+//# These warps are activated on different days.
+//# For each way there are 2 warps: one way and its way back.
+//#
+//#################################################################################
+
+
+031-3.gat,205,264,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 149, 261;
+ end;
+}
+
+031-3.gat,149,259,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 205, 266;
+ end;
+}
+
+// If Donated > 1M < 1.5M - Maze=2
+
+031-3.gat,225,282,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 274, 299;
+ end;
+}
+
+031-3.gat,274,300,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 225, 283;
+ end;
+}
+
+// Second Warp
+
+031-3.gat,283,271,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 269, 244;
+ end;
+}
+
+031-3.gat,269,245,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 283, 272;
+ end;
+}
+
+031-3.gat,148,150,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 128, 134;
+ end;
+}
+
+// Third Warp
+031-3.gat,139,258,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 155, 196;
+ end;
+}
+
+031-3.gat,155,195,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 139, 259;
+ end;
+}
+
+// First Warp
+031-3.gat,142,301,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 97, 298;
+ end;
+}
+
+031-3.gat,97,301,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 142, 298;
+ end;
+}
+
+// Second Warp
+031-3.gat,135,196,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 106, 231;
+ end;
+}
+
+031-3.gat,106,232,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 135, 197;
+ end;
+}
+
+// Third Warp
+031-3.gat,286,190,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 227, 241;
+ end;
+}
+
+031-3.gat,227,242,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 286, 191;
+ end;
+}
+
+// Fourth Warp
+
+031-3.gat,236,211,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 187, 227;
+ end;
+}
+
+031-3.gat,187,228,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 236, 212;
+ end;
+}
+
+
+
+// First Warp
+031-3.gat,94,254,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 54, 253;
+ end;
+}
+
+031-3.gat,54,250,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 94, 257;
+ end;
+}
+
+// Second Warp
+
+031-3.gat,103,199,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 52, 175;
+ end;
+}
+
+031-3.gat,52,177,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 103, 201;
+ end;
+}
+
+// Third Warp
+
+031-3.gat,212,193,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 207, 165;
+ end;
+}
+
+031-3.gat,207,168,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 212, 195;
+ end;
+}
+
+// Fourth Warp
+
+031-3.gat,235,167,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 195, 124;
+ end;
+}
+
+031-3.gat,195,122,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 235, 165;
+ end;
+}
+
+// If Donated > 2.5M < 3M - Maze=5
+// first warp
+
+031-3.gat,296,97,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 292, 125;
+ end;
+}
+031-3.gat,292,123,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 296, 95;
+ end;
+}
+// second warp
+031-3.gat,289,164,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 228, 123;
+ end;
+}
+031-3.gat,228,121,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 289, 162;
+ end;
+}
+// third warp
+031-3.gat,24,157,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 31, 142;
+ end;
+}
+031-3.gat,31,144,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 24, 159;
+ end;
+}
+// forth warp
+031-3.gat,36,249,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 35, 224;
+ end;
+}
+
+031-3.gat,35,226,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 36, 251;
+ end;
+}
+
+// first warp
+031-3.gat,34,25,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 281, 25;
+ end;
+}
+031-3.gat,281,22,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 34, 28;
+ end;
+}
+// # second warp
+031-3.gat,283,48,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 275, 74;
+ end;
+}
+031-3.gat,275,73,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 283, 47;
+ end;
+}
+// # third warp
+031-3.gat,26,178,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 36, 202;
+ end;
+}
+031-3.gat,36,200,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 26, 176;
+ end;
+}
+
+// first warp
+031-3.gat,91,125,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 36, 78;
+ end;
+}
+031-3.gat,36,80,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 91, 127;
+ end;
+}
+// # second warp
+031-3.gat,52,78,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 192, 72;
+ end;
+}
+
+031-3.gat,192,70,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 52, 76;
+ end;
+}
+
+
+// If Donated > 4M < 5M - Maze=8
+// first warp
+031-3.gat,128,135,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 148, 152;
+ end;
+}
+
+// # second warp
+031-3.gat,232,93,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 200, 47;
+ end;
+}
+031-3.gat,200,50,0 script #ChristmasBarrier 127,1,1,{
+ warp "031-3.gat", 232, 90;
+ end;
+}
+
+031-3.gat,120,81,0 script #ChristmasBarrier 127,1,1,{
+ if ($@FIGHT_YETI_STATUS == 1) goto L_Block;
+ warp "031-3.gat", 46, 27;
+ end;
+L_Block:
+ message strcharinfo(0), "Some force seems to be blocking you from exiting.";
+ end;
+}
+031-3.gat,46,24,0 script #ChristmasBarrier 127,1,1,{
+if ($@FIGHT_YETI_STATUS == 1) goto L_Blocked;
+ warp "031-3.gat", 120, 79;
+ end;
+L_Blocked:
+ message strcharinfo(0), "Some force seems to be blocking you from entering.";
+ end;
+}