summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJessica Tölke <jtoelke@mail.upb.de>2010-12-30 19:45:20 +0100
committerJessica Tölke <jtoelke@mail.upb.de>2010-12-30 19:45:20 +0100
commitf8aa82ea38ad1f699bcd8a33bb3b84c08b0791b2 (patch)
tree5fb1d40d5d6470e22cfc7652e3ac62a2217a7fc1
parentba51eb01c31f1fa0e23f3a94565973928584d575 (diff)
downloadserverdata-f8aa82ea38ad1f699bcd8a33bb3b84c08b0791b2.tar.gz
serverdata-f8aa82ea38ad1f699bcd8a33bb3b84c08b0791b2.tar.bz2
serverdata-f8aa82ea38ad1f699bcd8a33bb3b84c08b0791b2.tar.xz
serverdata-f8aa82ea38ad1f699bcd8a33bb3b84c08b0791b2.zip
Adding Yeti fight in rescue Cindy quest, also some other fixes and debug possibilites
setting Yeti stats, needs to be determined, if they are good YETI FIGHT NEEDS TO BE TESTED NOW
-rw-r--r--db/mob_db.txt2
-rw-r--r--npc/031-1_NivalisPort/angelaOutside.txt67
-rw-r--r--npc/031-1_NivalisPort/house.txt2
-rw-r--r--npc/031-3_Cave/cindyCave.txt95
4 files changed, 149 insertions, 17 deletions
diff --git a/db/mob_db.txt b/db/mob_db.txt
index eb29e711..c619b968 100644
--- a/db/mob_db.txt
+++ b/db/mob_db.txt
@@ -69,4 +69,4 @@
1069, Scythe, Scythe, 40, 3000, 0, 0, 500, 1, 200, 350, 30, 10, 100, 250, 1, 1, 150, 90, 1, 50, 1, 0, 40, 133, 220, 700, 672, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, , , , , , , 0, 0
1070, BallLightning, Ball Lightning, 40, 50, 0, 0, 10, 1, 5, 10, 40, 65, 1, 200, 1, 1, 1, 1, 1, 50, 1, 0, 47, 133, 110, 1500, 672, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, , , , , , , 0, 0
1071, IceElement, Ice Element, 20, 1000, 0, 0, 200, 2, 60, 60, 0, 20, 15, 25, 15, 15, 20, 50, 1, 1, 1, 0, 41, 135, 330, 740, 672, 400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, , , , , , , 2, 20
-1072, Yeti, Yeti, 35, 3000, 0, 0, 300, 2, 50, 150, 40, 0, 70, 5, 20, 15, 5, 15, 1, 1, 1, 0, 61, 135, 400, 1500, 672, 900, 0, 800, 0, 800, 0, 800, 0, 800, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, , , , , , , 2, 30
+1072, Yeti, Yeti, 35,8500, 0, 0, 300, 2,100,400,60,15,60, 5,45, 15,40,32, 1, 1, 1, 0, 61, 135,220, 1500, 672, 900, 0, 800, 0, 800, 0, 800, 0, 800, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, , , , , , , 2, 30
diff --git a/npc/031-1_NivalisPort/angelaOutside.txt b/npc/031-1_NivalisPort/angelaOutside.txt
index 3c10df46..7bb02d71 100644
--- a/npc/031-1_NivalisPort/angelaOutside.txt
+++ b/npc/031-1_NivalisPort/angelaOutside.txt
@@ -13,16 +13,6 @@
set @rescue_Cindy, ((QUEST_Nivalis_state & @Q_Nivalis_state_MASK) >> @Q_Nivalis_state_SHIFT);
-//TODO: remove DEBUG
- mes "This menu is for debugging and will be removed";
- menu
- "normal", L_normal,
- "reset quest", -;
- set @rescue_Cindy, 0;
- callsub S_Update_Mask;
-
-L_normal:
-//////////////////////////////////
if (@rescue_Cindy > 3) goto L_Please_Visit_Again;
if (@rescue_Cindy > 1) goto L_Please_Visit;
if (@rescue_Cindy == 1) goto L_Please_Help;
@@ -74,7 +64,7 @@ L_Menu_Potion:
L_Calm_Down:
if (countitem("ConcentrationPotion") == 0) goto L_No_Potion;
delitem "ConcentrationPotion", 1;
- mes "She drinks the concentration potions and calm down.";
+ mes "She drinks the concentration potions and calms down.";
mes "[Angela]";
mes "\"Thank you, this was helpful.\"";
next;
@@ -121,11 +111,64 @@ S_Update_Mask:
return;
}
+031-1.gat,80,25,0 script Debug 154, {
+//TODO: remove DEBUG
+ 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);
+
+ mes "This menu is for debugging and will be removed";
+ menu
+ "close", L_close,
+ "reset quest", -,
+ "magic", magic;
+ set @rescue_Cindy, 0;
+ callsub S_Update_Mask;
+ mes "quest variable is now " + @rescue_Cindy;
+ close;
+L_close:
+ close;
-
+magic:
+ // Set up SkillUp function general magic
+ set @SUP_id, SKILL_MAGIC;
+ set @SUP_name$, "Magic";
+
+ set @SUP_xp, 5000;
+ set @SUP_lvl, 2;
+ callfunc "SkillUp";
+
+ // Set up SkillUp function war magic
+ set @SUP_id, SKILL_MAGIC_WAR;
+ set @SUP_name$, "War Magic";
+
+ set @SUP_xp, 5000;
+ set @SUP_lvl, 2;
+ callfunc "SkillUp";
+
+ // Set up SkillUp function life magic
+ set @SUP_id, SKILL_MAGIC_LIFE;
+ set @SUP_name$, "Life Magic";
+
+ set @SUP_xp, 5000;
+ set @SUP_lvl, 2;
+ callfunc "SkillUp";
+
+ mes "Lightning invocation: " + getspellinvocation("lightning-strike");
+ mes "Flare-dart invocation: " + getspellinvocation("flare-dart");
+ mes "Lesser-heal invocation: " + getspellinvocation("lesser-heal");
+ mes "Lay-on-hands invocation: " + getspellinvocation("lay-on-hands");
+ close;
+
+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-1_NivalisPort/house.txt b/npc/031-1_NivalisPort/house.txt
index c81185d3..d9714ef5 100644
--- a/npc/031-1_NivalisPort/house.txt
+++ b/npc/031-1_NivalisPort/house.txt
@@ -9,7 +9,7 @@
set @rescue_Cindy, ((QUEST_Nivalis_state & @Q_Nivalis_state_MASK) >> @Q_Nivalis_state_SHIFT);
if (@rescue_Cindy > 2) goto L_Warp;
- mes "The door is locked.";
+ message strcharinfo(0), "The door is locked.";
close;
L_Warp:
diff --git a/npc/031-3_Cave/cindyCave.txt b/npc/031-3_Cave/cindyCave.txt
index 738868d6..77046422 100644
--- a/npc/031-3_Cave/cindyCave.txt
+++ b/npc/031-3_Cave/cindyCave.txt
@@ -7,6 +7,8 @@
//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;
@@ -52,12 +54,33 @@ L_Try_Cage:
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, 1;
+ set $@FIGHT_YETI_PLAYER_COUNT, getareausers("031-3.gat", 80, 20, 160, 90);
+
+ startnpctimer;
+ goto L_Exit;
+
+//TODO: remove
//TODO: start the battle and set state2 in case of success
mes "DEBUG: ADD YETIFIGHT HERE, QUEST VARIABLE INCREASED";
set @rescue_Cindy, 2;
callsub S_Update_Mask;
close;
-
+
+//TODO: why close and end?
+L_Exit:
+ close;
+ end;
+
+L_Yeti:
+ mes "[Cindy]";
+ mes "\"Watch out, the Yetis!\"";
+ close;
+
L_Reward:
mes "[Cindy]";
mes "\"You are a hero! All this strong monsters!\"";
@@ -70,8 +93,8 @@ L_Reward:
set @reward, rand(1);
if (@reward == 1) goto L_Wizard_Hat;
//TODO: set right, when quarterstaff is in item_db
- //getitem "QuarterStaff", 1;
- mes "DEBUG: GET ACORN INSTEAD OF QUARTERSTAFF";
+ //getitem "WoodenStaff", 1;
+ mes "DEBUG: GET ACORN INSTEAD OF WOODENSTAFF";
getitem "acorn", 1;
goto L_Visit;
@@ -102,6 +125,72 @@ 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
+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) goto L_CleanUp;
+//TODO: adjust number of yetis spawned
+ set $@FIGHT_YETI_NUMBER, $@FIGHT_YETI_WAVE + $@FIGHT_YETI_WAVE * $@FIGHT_YETI_PLAYER_COUNT/30;
+
+ set $@YETI_SUMMON, 0;
+
+ areamonster "031-3.gat", 80, 20, 160, 90, "", 1072, $@FIGHT_YETI_NUMBER, "Cindy::onPetDeath";
+ 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:
+ 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 + 100;
+//TODO: check, if two messages for the player works
+ message strcharinfo(0), "You gain 100 Boss Points giving you a total of " + BOSS_POINTS;
+ set @rescue_Cindy, 2;
+ callsub S_Update_Mask;
+ message strcharinfo(0), "Cindy looks relieved and as if she wants to talk with you.";
+ end;
+
+/////////
S_Update_Mask:
set QUEST_Nivalis_state,
(QUEST_Nivalis_state & ~(@Q_Nivalis_state_MASK))