summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-11 15:11:22 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-11 15:11:22 -0300
commit356d9693d69c43f2a66f7e60aa10483803b50951 (patch)
treeb99644d9eee85c07bf2d9c3dd6d9697af97fe419
parent4432d9c535e827ce47e4e06e2afa1dcbc6d6daa6 (diff)
downloadserverdata-356d9693d69c43f2a66f7e60aa10483803b50951.tar.gz
serverdata-356d9693d69c43f2a66f7e60aa10483803b50951.tar.bz2
serverdata-356d9693d69c43f2a66f7e60aa10483803b50951.tar.xz
serverdata-356d9693d69c43f2a66f7e60aa10483803b50951.zip
Add several changes from 2018 which had been excluded by accident =/
-rw-r--r--db/constants.conf15
-rw-r--r--npc/006-1/miriam.txt31
-rw-r--r--npc/006-1/pachua.txt9
-rw-r--r--npc/006-1/spirit.txt4
-rw-r--r--npc/013-2/notes.txt13
-rw-r--r--npc/033-1/yerrnk.txt27
-rw-r--r--npc/annuals/check_time.txt2
-rw-r--r--npc/functions/banker.txt17
-rw-r--r--npc/functions/ghost.txt36
-rw-r--r--npc/functions/global_event_handler.txt1
-rw-r--r--npc/functions/main.txt3
-rw-r--r--npc/functions/miriam.txt17
-rw-r--r--npc/functions/travelers.txt8
-rw-r--r--npc/items/warpTowels.txt16
-rw-r--r--npc/scripts.conf2
15 files changed, 141 insertions, 60 deletions
diff --git a/db/constants.conf b/db/constants.conf
index dc9eaab9..9c2d99ed 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -5612,13 +5612,14 @@ more than one separator can be used in a row (so 12_3___456 is illegal).
BATTLE_CAVE7:64
BATTLE_CAVE8:128
BATTLE_CAVE9:256
- OPT_STORAGE_CLOSE:1
- OPT_BANK_CLOSE:2
- MAX_HIGH_SCORES:4
- AMMO_NONE:0
- AMMO_BOW:1
- AMMO_SLING:2
- AMMO_WAND:3
+ OPT_STORAGE_CLOSE: 1
+ OPT_BANK_CLOSE: 2
+ OPT_BANK_GOTSHADE: 4
+ MAX_HIGH_SCORES: 4
+ AMMO_NONE: 0
+ AMMO_BOW: 1
+ AMMO_SLING: 2
+ AMMO_WAND: 3
// tmw npcs
NPC45:45
diff --git a/npc/006-1/miriam.txt b/npc/006-1/miriam.txt
index 58242451..fdbbdf1c 100644
--- a/npc/006-1/miriam.txt
+++ b/npc/006-1/miriam.txt
@@ -11,8 +11,8 @@
if (QUEST_MIRIAM == 2) goto L_Ask2;
if (QUEST_MIRIAM == 3) goto L_Teach;
if (QUEST_MIRIAM == 4) goto L_testoffer;
- if (QUEST_MIRIAM_run != 0) goto L_checktime;
- if (QUEST_MIRIAM_start != 0) goto L_wasting;
+ if (QUEST_MIRIAM_run < 0) goto L_checktime;
+ if (QUEST_MIRIAM_run > 0) goto L_wasting;
if (QUEST_MIRIAM == 5) goto L_testoffer;
goto L_Intro;
@@ -221,8 +221,7 @@ L_LetsDoThis:
warp "032-1",55,21;
npctalk strnpcinfo(0), "Run " +strcharinfo(0)+ ", run!";
QUEST_MIRIAM = 5;
- QUEST_MIRIAM_start = gettimetick(2);
- QUEST_MIRIAM_cheat = 0;
+ QUEST_MIRIAM_run = gettimetick(2);
end;
L_Naked:
@@ -260,8 +259,8 @@ L_close:
L_warning:
mes "[Miriam]";
mes "\"I know very well what you tried to do. I will not teach you the speed skill if you keep trying this kind of trick!\"";
- next;
- goto L_testoffer;
+ QUEST_MIRIAM_run = 0;
+ close;
L_stretch:
mes "[Miriam]";
@@ -274,22 +273,31 @@ L_wasting:
mes "\"Don't waste your time talking to me! RUN and talk to Pachua!\"";
close;
+L_expired:
+ mes "[Miriam]";
+ mes "\"You could not reach Pachua in time. Try again some other time.\"";
+ QUEST_MIRIAM_run = 0;
+ close;
+
L_checktime:
- if (QUEST_MIRIAM_cheat != 0)
+ @miriam_run_secs = 0 - (QUEST_MIRIAM_run);
+ if (@miriam_run_secs == 1)
goto L_warning;
- if (QUEST_MIRIAM_run <= 210)
+ if (@miriam_run_secs <= 10)
+ goto L_expired;
+ if (@miriam_run_secs <= 210)
goto L_Goodjob;
goto L_tryagain;
L_tryagain:
mes "[Miriam]";
- mes "\"You needed " + QUEST_MIRIAM_run + " seconds to reach Pachua. It is not enough.\"";
+ mes "\"You needed " + @miriam_run_secs + " seconds to reach Pachua. It is not enough.\"";
QUEST_MIRIAM_run = 0;
close;
L_Goodjob:
mes "[Miriam]";
- mes "\"Great job! You needed " + QUEST_MIRIAM_run + " seconds to reach Pachua. Very impressive for a person like you.\"";
+ mes "\"Great job! You needed " + @miriam_run_secs + " seconds to reach Pachua. Very impressive for a person like you.\"";
next;
mes "\"Now I need you to relax. Do NOT move. This teaching process can be painful sometimes.\"";
next;
@@ -299,20 +307,17 @@ L_Goodjob:
close2;
warp "032-1",55,22;
// free all used player variables. This can be done, since there is a conditional on the speedskill at the beginning.
- QUEST_MIRIAM_start = 0;
QUEST_MIRIAM_run = 0;
QUEST_MIRIAM = 0;
message strcharinfo(0), "[You gain 2500 experience points]";
message strcharinfo(0), "[You learned Speed Skill]";
updateskill SKILL_SPEED, 1;
getexp 2500, 0;
- set QUEST_MIRIAM_cheat, 0; // reset just in case it is still set.
close;
L_fast:
mes "[Miriam]";
mes "\"I hope you make a good use of your new skill... Take care!\"";
- set QUEST_MIRIAM_cheat, 0; // reset just in case it is still set.
close;
}
diff --git a/npc/006-1/pachua.txt b/npc/006-1/pachua.txt
index 4d3c2be1..f62d8c04 100644
--- a/npc/006-1/pachua.txt
+++ b/npc/006-1/pachua.txt
@@ -8,8 +8,8 @@
@LEATHER_PATCH_PRICE = 300;
@wants_leather_patch = QUEST_Forestbow_state & NIBBLE_4_MASK;
- if (QUEST_MIRIAM_cheat != 0) goto L_Warp2_cheat;
- if (QUEST_MIRIAM_start != 0) goto L_smoke;
+ if (QUEST_MIRIAM_run == -1) goto L_Warp2_cheat;
+ if (QUEST_MIRIAM_run) goto L_smoke;
goto L_Begin;
L_Begin:
@@ -228,13 +228,10 @@ L_TooMany:
L_smoke:
message strcharinfo(0), "Pachua quickly inhales from his pipe and releases a ring of smoke towards the sky!";
- QUEST_MIRIAM_run = gettimetick(2) - QUEST_MIRIAM_start;
- QUEST_MIRIAM_start = 0;
+ callfunc "MiriamGoal";
end;
L_Warp2_cheat:
- if (@warp_cheat == 1) goto L_Begin;
message strcharinfo(0), "Pachua releases a ring of smoke towards the sky! But, by the look on his face, you can tell he is suspicious about your methods...";
- @warp_cheat = 1;
end;
}
diff --git a/npc/006-1/spirit.txt b/npc/006-1/spirit.txt
index 4bbcb14a..896033fc 100644
--- a/npc/006-1/spirit.txt
+++ b/npc/006-1/spirit.txt
@@ -281,12 +281,12 @@ S_Update_Var:
return;
}
-006-1,63,79,0 script #EarthImp0#_M NPC400,{
+006-1,67,68,0 script #EarthImp0#_M NPC400,{
callfunc "EarthImpTouch";
close;
}
-006-1,64,79,0 script #EarthImp1#_M NPC400,{
+006-1,68,68,0 script #EarthImp1#_M NPC400,{
callfunc "EarthImpTouch";
close;
}
diff --git a/npc/013-2/notes.txt b/npc/013-2/notes.txt
index 3a5bb9a6..92ded429 100644
--- a/npc/013-2/notes.txt
+++ b/npc/013-2/notes.txt
@@ -63,18 +63,7 @@ L_close:
next;
mes "You feel the floor disappear below your feet...";
next;
- if (QUEST_MIRIAM_start != 0)
- goto L_Cheat;
- goto L_Warp;
-
-L_Cheat:
- QUEST_MIRIAM_cheat = 1;
- QUEST_MIRIAM_run = gettimetick(2) - QUEST_MIRIAM_start;
- QUEST_MIRIAM_start = 0;
- message strcharinfo(0), "You were supposed to actually run to this place. You are not sure if this is going to work for Miriam...";
- goto L_Warp;
-
-L_Warp:
+ callfunc "MiriamCheat";
@dest = rand(BaseLevel);
if (@dest < 10)
goto L_PlaceOne;
diff --git a/npc/033-1/yerrnk.txt b/npc/033-1/yerrnk.txt
index 0e83a759..a4f6f5e2 100644
--- a/npc/033-1/yerrnk.txt
+++ b/npc/033-1/yerrnk.txt
@@ -3,7 +3,7 @@
@yeti_level = 70;
- if (@state == 9) goto L_Done;
+ if (@state >= 9) goto L_Done;
if (@state == 8) goto L_Yeti_Success;
if (@state == 7) goto L_Hunt_Yeti;
if (@state == 6) goto L_Warrior;
@@ -159,6 +159,7 @@ L_Yeti_Success:
goto L_close;
L_Done:
+ if (countitem("Antlers") > 0 && @state < 10) goto L_AntlerHat;
mes "Yerrnk smiles at you.";
mes "[Yerrnk]";
mes "\"Welcome back, great warrior.\"";
@@ -167,6 +168,30 @@ L_Done:
"Can you explain the raging ability to me?",L_Skill,
"(Leave)",L_close;
+L_AntlerHat:
+ mes "Yerrnk grins.";
+ next;
+ mes "[Yerrnk]";
+ mes "\"Welcome back, great warrior.\"";
+ next;
+ mes "\"I could turn your " + getitemlink("Antlers") + " into a " + getitemlink("AntlerHat") + " for the modest price of 5,000,000 GP.\"";
+ if (Zeny >= 5000000)
+ menu
+ "Please do!", L_AntlerHat_Proceed;
+ menu
+ "Sorry, I'm broke", L_close;
+
+L_AntlerHat_Proceed:
+ mes "[Yerrnk]";
+ mes "\"There you go.\"";
+ @state = 10;
+ callsub S_Update_Mask;
+ delitem "Antlers", 1;
+ if (Zeny < 5000000) goto L_close;
+ Zeny = Zeny - 5000000;
+ getitem "AntlerHat", 1;
+ goto L_close;
+
L_close:
@state = 0;
@yeti_level = 0;
diff --git a/npc/annuals/check_time.txt b/npc/annuals/check_time.txt
index 74980e9c..5d229e4c 100644
--- a/npc/annuals/check_time.txt
+++ b/npc/annuals/check_time.txt
@@ -28,7 +28,7 @@ L_YearWrap:
|| !($@reward_start_month == $@end_month)))
|| ($@month < $@end_month && $@month > $@reward_start_month))
goto L_RewardTime;
- if(($@month >= $@start_month) || ($@month <= $@end_month && $@day <= $@reward_start_day))
+ if (($@month >= $@start_month && $@day >= $@start_day) || ($@month <= $@end_month && $@day <= $@end_day))
goto L_EventTime;
goto L_NoEventTime;
diff --git a/npc/functions/banker.txt b/npc/functions/banker.txt
index 254b4822..4bfe9f9a 100644
--- a/npc/functions/banker.txt
+++ b/npc/functions/banker.txt
@@ -210,9 +210,26 @@ L_Balance:
mes "[" + @npcname$ + "]";
mes "\"Your current bank balance is:";
mes #BankAccount + " GP\"";
+ if (!(#BankOptions & OPT_BANK_CLOSE) || (#BankAccount >= 10000000 &&
+ BaseLevel >= 85 && !(#BankOptions & OPT_BANK_GOTSHADE))) next;
+ if (#BankAccount >= 10000000 && BaseLevel >= 85 && !(#BankOptions & OPT_BANK_GOTSHADE))
+ goto L_GiveShade;
if (#BankOptions & OPT_BANK_CLOSE) goto L_Return;
goto L_Start;
+L_GiveShade:
+ mes "\"Oh\"";
+ next;
+ mes "\"It seems you managed to amass quite a fortune!\"";
+ next;
+ mes "\"Thank you for using our services. Please accept this little gift.\"";
+ #BankOptions = #BankOptions | OPT_BANK_GOTSHADE;
+ getitem "CashiersShade", 1;
+ if (#BankOptions & OPT_BANK_CLOSE) goto L_Return;
+ next;
+ npcaction 9; // clear npc dialog
+ goto L_Start;
+
L_Nev:
mes "[" + @npcname$ + "]";
mes "\"Goodbye then.\"";
diff --git a/npc/functions/ghost.txt b/npc/functions/ghost.txt
new file mode 100644
index 00000000..1325525b
--- /dev/null
+++ b/npc/functions/ghost.txt
@@ -0,0 +1,36 @@
+function script SpawnGhost {
+ if ($GHOSTS_DISABLED)
+ goto L_Return;
+
+ if (BaseLevel >= 40 &&
+ (getmapname() == "026-1" ||
+ getmapname() == "027-1" ||
+ getmapname() == "027-2" ||
+ getmapname() == "027-3" ||
+ getmapname() == "027-4" ||
+ getmapname() == "027-5"))
+ goto L_Spawn;
+ return;
+
+L_Spawn:
+ .@x = POS_X;
+ .@y = POS_Y;
+
+ if (!(iscollision(getmapname(), .@x, .@y - 1))) set .@y, .@y - 1; // up
+ else if (!(iscollision(getmapname(), .@x, .@y + 1))) set .@y, .@y + 1; // down
+ else if (!(iscollision(getmapname(), .@x - 1, .@y))) set .@x, .@x - 1; // left
+ else if (!(iscollision(getmapname(), .@x + 1, .@y))) set .@x, .@x + 1; // right
+ // else on the player
+
+ // FIXME (Is this a valid event label??)
+ if (@GHOST_MAP$ != "")
+ killmonster @GHOST_MAP$, "~GH~" + getcharid(0);
+
+ @GHOST_MAP$ = getmapname();
+ specialeffect(39, SELF, getcharid(3));
+ monster getmapname(), .@x, .@y, strcharinfo(0), 1136, 1, "~GH~" + getcharid(0);
+ return;
+
+L_Return:
+ return;
+}
diff --git a/npc/functions/global_event_handler.txt b/npc/functions/global_event_handler.txt
index 8e1116dc..33723786 100644
--- a/npc/functions/global_event_handler.txt
+++ b/npc/functions/global_event_handler.txt
@@ -22,6 +22,7 @@ OnMobKillEvent:
OnPCDieEvent:
@necromancer = 0;
+ callfunc "SpawnGhost";
set @killerrid, 0; // reset killer rid
end;
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index 1bc4c37b..450d7a39 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -507,6 +507,9 @@ function script destroy {
function script npcaction {
debugmes "Deprecated unitaction (did you mean npcsit; or whatever?)";
+ .@a=getarg(0, 0);
+ if (.@a == 9)
+ clear;
return;
}
diff --git a/npc/functions/miriam.txt b/npc/functions/miriam.txt
new file mode 100644
index 00000000..e59b736b
--- /dev/null
+++ b/npc/functions/miriam.txt
@@ -0,0 +1,17 @@
+function script MiriamGoal {
+ if (QUEST_MIRIAM_run > 0)
+ QUEST_MIRIAM_run = 0 - (gettimetick(2) - QUEST_MIRIAM_run);
+ return;
+}
+
+function script MiriamExpire {
+ if (QUEST_MIRIAM_run > 0)
+ set QUEST_MIRIAM_run, 0 - 2; // force failute (expired)
+ return;
+}
+
+function script MiriamCheat {
+ if (QUEST_MIRIAM_run > 0)
+ set QUEST_MIRIAM_run, 0 - 1; // force failure (cheating)
+ return;
+}
diff --git a/npc/functions/travelers.txt b/npc/functions/travelers.txt
index d7bd7ba7..e76d2130 100644
--- a/npc/functions/travelers.txt
+++ b/npc/functions/travelers.txt
@@ -172,13 +172,7 @@ L_TravelPachua:
@NextLocationMap$ = "006-1";
@NextLocationX = 28;
@NextLocationY = 97;
- if(QUEST_MIRIAM_start != 0) goto L_Cheat;
- goto L_TravelChecks;
-
-L_Cheat:
- QUEST_MIRIAM_cheat = 1;
- QUEST_MIRIAM_run = gettimetick(2) - QUEST_MIRIAM_start;
- QUEST_MIRIAM_start = 0;
+ callfunc "MiriamCheat";
goto L_TravelChecks;
L_TravelBarbarians:
diff --git a/npc/items/warpTowels.txt b/npc/items/warpTowels.txt
index 0ed9a91c..35c7d55b 100644
--- a/npc/items/warpTowels.txt
+++ b/npc/items/warpTowels.txt
@@ -1,6 +1,6 @@
function script WarpTowel {
@seconds = TowelLastUsed - (gettimetick(2) - 1200);
- if (@seconds > 0)
+ if (@seconds > 0 && GM < 1)
goto L_DontPanic;
if (isin("botcheck",25,27,51,47))
goto L_Prison;
@@ -61,9 +61,9 @@ L_Blue:
L_Yellow:
// Tulimshar Mines
- @NextLocationMap$ = "002-2";
- @NextLocationX = 27;
- @NextLocationY = 28;
+ @NextLocationMap$ = "002-1";
+ @NextLocationX = 113;
+ @NextLocationY = 117;
goto L_WarpPlayer;
L_Purple:
@@ -99,13 +99,7 @@ L_Lime:
@NextLocationMap$ = "006-1";
@NextLocationX = 28;
@NextLocationY = 97;
- if(QUEST_MIRIAM_start != 0) goto L_Cheat;
- goto L_WarpPlayer;
-
-L_Cheat:
- QUEST_MIRIAM_cheat = 1;
- QUEST_MIRIAM_run = gettimetick(2) - QUEST_MIRIAM_start;
- QUEST_MIRIAM_start = 0;
+ callfunc "MiriamCheat";
goto L_WarpPlayer;
L_Save:
diff --git a/npc/scripts.conf b/npc/scripts.conf
index 4d409088..5d6d995d 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -45,6 +45,8 @@
"npc/functions/DyeConfig.txt",
"npc/functions/motd.txt",
"npc/functions/motdconfig.txt",
+"npc/functions/miriam.txt",
+"npc/functions/ghost.txt",
// Items
"npc/items/purification_potion.txt",