summaryrefslogtreecommitdiff
path: root/world/map
diff options
context:
space:
mode:
Diffstat (limited to 'world/map')
-rw-r--r--world/map/conf/magic-quickdebug.sex4
-rw-r--r--world/map/data/017-9.wlkbin2707 -> 2707 bytes
-rw-r--r--world/map/npc/002-1/elanore.txt5
-rw-r--r--world/map/npc/004-5/chest.txt1
-rw-r--r--world/map/npc/006-1/miriam.txt1
-rw-r--r--world/map/npc/006-1/pachua.txt1
-rw-r--r--world/map/npc/008-1/annualeaster.txt6
-rw-r--r--world/map/npc/009-4/barriers.txt4
-rw-r--r--world/map/npc/009-4/torches.txt44
-rw-r--r--world/map/npc/009-7/core.txt2
-rw-r--r--world/map/npc/011-1/oscar.txt7
-rw-r--r--world/map/npc/017-9/_import.txt5
-rw-r--r--world/map/npc/017-9/_mobs.txt2
-rw-r--r--world/map/npc/017-9/_warps.txt10
-rw-r--r--world/map/npc/017-9/announcements.txt175
-rw-r--r--world/map/npc/017-9/npcs.txt45
-rw-r--r--world/map/npc/017-9/secret.txt39
-rw-r--r--world/map/npc/027-1/graves.txt12
-rw-r--r--world/map/npc/029-1/aahna.txt6
-rw-r--r--world/map/npc/029-1/hasan.txt3
-rw-r--r--world/map/npc/029-1/kaan.txt1
-rw-r--r--world/map/npc/029-1/liana.txt1
-rw-r--r--world/map/npc/029-1/valon.txt2
-rw-r--r--world/map/npc/029-1/zegas.txt1
-rw-r--r--world/map/npc/029-2/barrels_config.txt1
-rw-r--r--world/map/npc/029-2/morgan.txt2
-rw-r--r--world/map/npc/029-2/sorfina.txt1
-rw-r--r--world/map/npc/029-2/stat_reset.txt2
-rw-r--r--world/map/npc/029-2/tanisha.txt1
-rw-r--r--world/map/npc/052-1/channelling.txt7
-rw-r--r--world/map/npc/annuals/fathertime.txt20
-rw-r--r--world/map/npc/functions/announcements.txt197
-rw-r--r--world/map/npc/functions/banker.txt2
-rwxr-xr-xworld/map/npc/functions/debug.txt2
-rw-r--r--world/map/npc/functions/default_npc_checks.txt5
-rw-r--r--world/map/npc/functions/ferry.txt2
-rw-r--r--world/map/npc/functions/global_event_handler.txt3
-rw-r--r--world/map/npc/functions/gm_island.txt15
-rw-r--r--world/map/npc/functions/mob_points.txt11
-rw-r--r--world/map/npc/functions/motdconfig.txt40
-rw-r--r--world/map/npc/functions/superdebug.txt61
-rw-r--r--world/map/npc/items/scissors.txt4
-rw-r--r--world/map/npc/items/shock_sweet.txt4
-rw-r--r--world/map/npc/items/warpTowels.txt2
-rw-r--r--world/map/npc/scripts.conf4
45 files changed, 424 insertions, 339 deletions
diff --git a/world/map/conf/magic-quickdebug.sex b/world/map/conf/magic-quickdebug.sex
index c1d4ff72..1b5f582c 100644
--- a/world/map/conf/magic-quickdebug.sex
+++ b/world/map/conf/magic-quickdebug.sex
@@ -4,3 +4,7 @@
(SPELL (NONMAGIC SILENT) debug0 "#debug" ()
(EFFECT
(SCRIPT "{if(!debug&&(getgmlevel()<99))end;callfunc \"Debug\";}")))
+
+(SPELL (NONMAGIC SILENT) debug1 "#numa" ()
+ (EFFECT
+ (SCRIPT "{if(!debug&&(getgmlevel()<99))end;callfunc \"SuperDebug\";}")))
diff --git a/world/map/data/017-9.wlk b/world/map/data/017-9.wlk
index e83f810b..16fcf306 100644
--- a/world/map/data/017-9.wlk
+++ b/world/map/data/017-9.wlk
Binary files differ
diff --git a/world/map/npc/002-1/elanore.txt b/world/map/npc/002-1/elanore.txt
index b6cdde5a..ea3b78bf 100644
--- a/world/map/npc/002-1/elanore.txt
+++ b/world/map/npc/002-1/elanore.txt
@@ -20,7 +20,7 @@ function|script|ElanoreFix
function|script|elanore_decrease_exp
{
if (attachrid(@killerrid) == 0)
- end;
+ goto L_Return;
set @Q_heal_exp, MAGIC_EXPERIENCE >> 24;
if (@Q_heal_exp < 8) goto L_OnPcKillWipe;
set @Q_heal_exp, @Q_heal_exp - 8;
@@ -32,6 +32,9 @@ L_OnPcKillWipe:
L_OnPcKillFinish:
set MAGIC_EXPERIENCE, (MAGIC_EXPERIENCE & ~(255 << 24)) | (@Q_heal_exp << 24);
+ goto L_Return;
+
+L_Return:
return;
}
diff --git a/world/map/npc/004-5/chest.txt b/world/map/npc/004-5/chest.txt
index 2b815aa3..92b55e6c 100644
--- a/world/map/npc/004-5/chest.txt
+++ b/world/map/npc/004-5/chest.txt
@@ -2,6 +2,7 @@
{
set @npc_distance, 1;
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
set @spants_state, ((QUEST_WG_state & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
if(@spants_state > 5) goto L_Looted;
if(@spants_state != 5) goto L_Unknown;
diff --git a/world/map/npc/006-1/miriam.txt b/world/map/npc/006-1/miriam.txt
index f2c454fd..edcb5b63 100644
--- a/world/map/npc/006-1/miriam.txt
+++ b/world/map/npc/006-1/miriam.txt
@@ -22,6 +22,7 @@
{
set @npc_distance, 2;
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
if (getskilllv(SKILL_SPEED)) goto L_fast;
if (getequipid(equip_torso) < 0) goto L_naked;
diff --git a/world/map/npc/006-1/pachua.txt b/world/map/npc/006-1/pachua.txt
index 905ffcb4..f0230a7a 100644
--- a/world/map/npc/006-1/pachua.txt
+++ b/world/map/npc/006-1/pachua.txt
@@ -1,6 +1,7 @@
006-1,24,113,0|script|Pachua|143
{
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
set @halloween_npc_id, $@halloween_npc_pachua;
callfunc "TrickOrTreat";
diff --git a/world/map/npc/008-1/annualeaster.txt b/world/map/npc/008-1/annualeaster.txt
index a9ba5963..d0898823 100644
--- a/world/map/npc/008-1/annualeaster.txt
+++ b/world/map/npc/008-1/annualeaster.txt
@@ -225,14 +225,14 @@ S_disableEggs:
S_relocateEasterEgg:
if ($@peopleFoundEggs[$@EggID] < $@AEASTER_mapcount)
- goto L_Return;
+ goto S_Return;
set $@peopleFoundEggs[$@EggID], 0;
set $@eastereggPos, rand(getarraysize($@easteregg_posx));
npcwarp $@easteregg_posx[$@eastereggPos], $@easteregg_posy[$@eastereggPos], "#TestEgg" + $@EggID;
- goto L_Return;
+ goto S_Return;
-L_Return:
+S_Return:
return;
}
diff --git a/world/map/npc/009-4/barriers.txt b/world/map/npc/009-4/barriers.txt
index f629722f..f82df12f 100644
--- a/world/map/npc/009-4/barriers.txt
+++ b/world/map/npc/009-4/barriers.txt
@@ -269,12 +269,12 @@ L_Deny_Final_Passage:
L_Allow_Final_Passage:
if (OrumQuest < 11) goto L_Advance_Quest;
- close;
+ end;
L_Advance_Quest:
message strcharinfo(0), "The torches dim as you enter. At last you finally have access!";
set OrumQuest, 11;
- close;
+ end;
}
009-4,48,38,0|script|#OrumCaveEndBarrier|32767,0,0
diff --git a/world/map/npc/009-4/torches.txt b/world/map/npc/009-4/torches.txt
index 558e17c8..0164acd4 100644
--- a/world/map/npc/009-4/torches.txt
+++ b/world/map/npc/009-4/torches.txt
@@ -94,41 +94,6 @@ L_Return:
return;
}
-// To make sure in range of torches
-function|script|InRangeTorch1
-{
- if (isin("009-4",67,20,69,25))
- goto L_Return;
- mes "You're too far away to do anything with that torch.";
- close2;
- goto L_Return;
-
-L_Return:
- return;
-}
-function|script|InRangeTorch2
-{
- if (isin("009-4",65,41,69,46))
- goto L_Return;
- mes "You're too far away to do anything with that torch.";
- close2;
- goto L_Return;
-
-L_Return:
- return;
-}
-function|script|InRangeTorch3
-{
- if (isin("009-4",33,84,37,88))
- goto L_Return;
- mes "You're too far away to do anything with that torch.";
- close2;
- goto L_Return;
-
-L_Return:
- return;
-}
-
function|script|TorchLoop
{
// Variables used here:
@@ -297,7 +262,8 @@ L_Failed:
// First Torch
009-4,68,21,0|script|Torch#1|400
{
- callfunc "InRangeTorch1";
+ callfunc "PCtoNPCRange";
+ if(@npc_check) end;
callfunc "DoneWithTorches";
set @Torch, 0;
@@ -309,7 +275,8 @@ L_Failed:
// Second Torch
009-4,67,42,0|script|Torch#2|400
{
- callfunc "InRangeTorch2";
+ callfunc "PCtoNPCRange";
+ if(@npc_check) end;
callfunc "DoneWithTorches";
set @Torch, 1;
@@ -321,7 +288,8 @@ L_Failed:
// Third Torch
009-4,33,86,0|script|Torch#3|400
{
- callfunc "InRangeTorch3";
+ callfunc "PCtoNPCRange";
+ if(@npc_check) end;
callfunc "DoneWithTorches";
set @Torch, 2;
diff --git a/world/map/npc/009-7/core.txt b/world/map/npc/009-7/core.txt
index 528642c2..e1f0b58d 100644
--- a/world/map/npc/009-7/core.txt
+++ b/world/map/npc/009-7/core.txt
@@ -58,7 +58,7 @@ L_Proceed:
goto L_Missing;
L_Missing:
- end;
+ return;
L_Proceed2:
set $@fightclub_myself, 0;
diff --git a/world/map/npc/011-1/oscar.txt b/world/map/npc/011-1/oscar.txt
index 157dc0c9..7240f2d0 100644
--- a/world/map/npc/011-1/oscar.txt
+++ b/world/map/npc/011-1/oscar.txt
@@ -31,10 +31,13 @@
function|script|HalloweenQuestWaterPumpkins
{
if (Quest_Halloween != 5 || $@HalloweenQuest_PumpkinHunter$ != "")
- end;
+ goto L_Return;
set $@HalloweenQuest_PumpkinHunter$, strcharinfo(0);
donpcevent "Oscar::OnCommandSpg";
- end;
+ goto L_Return;
+
+L_Return:
+ return;
}
011-1,94,38,0|script|Oscar|142
diff --git a/world/map/npc/017-9/_import.txt b/world/map/npc/017-9/_import.txt
index 74718fa7..55b1495e 100644
--- a/world/map/npc/017-9/_import.txt
+++ b/world/map/npc/017-9/_import.txt
@@ -1,8 +1,7 @@
-// Map 017-9: Backstage
+// Map 017-9: GM Lounge
// This file is generated automatically. All manually added changes will be removed when running the Converter.
map: 017-9
npc: npc/017-9/_mobs.txt
npc: npc/017-9/_warps.txt
-npc: npc/017-9/announcements.txt
npc: npc/017-9/mapflags.txt
-npc: npc/017-9/secret.txt
+npc: npc/017-9/npcs.txt
diff --git a/world/map/npc/017-9/_mobs.txt b/world/map/npc/017-9/_mobs.txt
index 64e6dd7e..9f351648 100644
--- a/world/map/npc/017-9/_mobs.txt
+++ b/world/map/npc/017-9/_mobs.txt
@@ -1,5 +1,5 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
-// Backstage mobs
+// GM Lounge mobs
diff --git a/world/map/npc/017-9/_warps.txt b/world/map/npc/017-9/_warps.txt
index 439dea5e..5c7d4fe1 100644
--- a/world/map/npc/017-9/_warps.txt
+++ b/world/map/npc/017-9/_warps.txt
@@ -1,8 +1,8 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
-// Backstage warps
+// GM Lounge warps
-017-9,22,20|warp|To Nivalis#017-90|-1,-1,020-1,60,75
+017-9,29,20|warp|To Nivalis#017-90|-1,-1,020-1,60,75
017-9,26,21|warp|To Hurnscald#017-91|-1,-1,009-1,43,45
-017-9,30,20|warp|To Tumlishar#017-92|-1,-1,001-1,55,118
-017-9,26,28|warp|To second warpz#017-93|-1,-1,017-2,26,23
-017-9,31,28|warp|To Crypt#017-94|-1,-1,027-2,118,109
+017-9,21,20|warp|To Tumlishar#017-92|-1,-1,001-1,54,118
+017-9,31,20|warp|To Crypt#017-93|-1,-1,027-2,118,109
+017-9,23,20|warp|To Candor#017-94|-1,-1,029-1,34,95
diff --git a/world/map/npc/017-9/announcements.txt b/world/map/npc/017-9/announcements.txt
deleted file mode 100644
index aa6df918..00000000
--- a/world/map/npc/017-9/announcements.txt
+++ /dev/null
@@ -1,175 +0,0 @@
-//############################################################################
-//# #
-//# GM scheduled broadcasts #
-//# #
-//############################################################################
-
-// $@GMSA_STATUS values:
-// 0: Broadcasts not running
-// 1: Broadcasts running
-// $@GMSA_NAME$: the GM/Admin who created the broadcast, if any
-// $@GMSA_MSG$: the message to be broadcasted
-// $@GMSA_MAX: the number of times the broadcast will be performed, if > 0
-// $@GMSA_TICK: broadcast the message every $@GMSA_TICK hours
-// $@GMSA_CURRENT_TICK: internal counter incremented every hour
-
-017-9,26,24,0|script|Stone Board|145
-{
- if (getgmlevel() < 30)
- goto L_Close;
-
- if ($@GMSA_STATUS)
- goto L_InfoBroadcast;
- goto L_PrepareBroadcast;
-
-L_InfoBroadcast:
- set @next_broadcast_ts, (3600000*($@GMSA_TICK - $@GMSA_CURRENT_TICK) - getnpctimer(0))/1000;
- set @next_broadcast_h, @next_broadcast_ts/3600;
- set @next_broadcast_m, (@next_broadcast_ts - @next_broadcast_h*3600)/60;
-
- mes "[GM Scheduled Broadcasts Board]";
- mes $@GMSA_NAME$ + " scheduled the current message, every " + $@GMSA_TICK + " hour(s):";
- mes $@GMSA_MSG$;
- next;
- if (@next_broadcast_h > 0)
- mes "The next broadcast will happen in " + @next_broadcast_h + " hour(s) and " + @next_broadcast_m + " minute(s).";
- if (@next_broadcast_h == 0)
- mes "The next broadcast will happen in " + @next_broadcast_m + " minute(s).";
- next;
-
- set @next_broadcast_ts, 0;
- set @next_broadcast_h, 0;
- set @next_broadcast_m, 0;
-
- mes "What do you want to do?";
- menu
- "Nothing.", L_Close,
- "Nothing but... what is this?", L_Help,
- "Stop broadcasting.", L_StopBroadcast,
- "Trigger manually the current broadcast.", L_ManualBroadcast;
-
-L_PrepareBroadcast:
- callsub S_Help;
- next;
- mes "There is no broadcast scheduled.";
- mes "Do you want to create one?";
- menu
- "No.", L_Close,
- "Yes.", L_CreateBroadcast;
-
-L_CreateBroadcast:
- mes "[GM Scheduled Broadcasts Board]";
- mes "Enter the message to broadcast:";
- input $@GMSA_MSG$;
- if ($@GMSA_MSG$ == "")
- goto L_InvalidBMsg;
-
- next;
- mes "[GM Scheduled Broadcasts Board]";
- mes "The message will be broadcasted every X hour(s). Enter X:";
- input $@GMSA_TICK;
- if ($@GMSA_TICK < 1)
- goto L_InvalidBroadcastTick;
-
- next;
- mes "[GM Scheduled Broadcasts Board]";
- mes "If you want the message to be broadcasted a limited number of times, enter its value. Keep 0 otherwise:";
- input $@GMSA_MAX;
-
- next;
- mes "[GM Scheduled Broadcasts Board]";
- if ($@GMSA_MAX == 0)
- mes "The current message will be broadcasted every " + $@GMSA_TICK + " hour(s):";
- if ($@GMSA_MAX > 0)
- mes "The current message will be broadcasted every " + $@GMSA_TICK + " hour(s), up to " + $@GMSA_MAX + " times:";
- mes $@GMSA_MSG$;
- next;
- mes "Is this correct?";
- menu
- "No. I'll retry.", L_CreateBroadcast,
- "No", L_Close,
- "Yes. Broadcast this. (the first broadcast will happen in " + $@GMSA_TICK + " hour(s).)", L_StartBroadcast,
- "Yes. Broadcast this, and make an extra broadcast right now.", L_StartBroadcast2;
-
-L_InvalidBMsg:
- mes "[GM Scheduled Broadcasts Board]";
- mes "The message can't be empty. Please retry.";
- goto L_CreateBroadcast;
-
-L_InvalidBroadcastTick:
- mes "[GM Scheduled Broadcasts Board]";
- mes "You obviously can't repeat a message every 0 hours. Please retry.";
- goto L_CreateBroadcast;
-
-L_Help:
- callsub S_Help;
- goto L_Close;
-
-S_Help:
- mes "[GM Scheduled Broadcasts Board]";
- mes "This board allows a GM to schedule a message to be broadcast every X hours.";
- mes "Only one broadcast can be scheduled at a time.";
- return;
-
-S_PerformBroadcast:
- announce $@GMSA_MSG$, 0;
- return;
-
-L_ManualBroadcast:
- callsub S_PerformBroadcast;
- mes "Done.";
- goto L_Close;
-
-L_StopBroadcast:
- callsub S_StopBroadcast;
- mes "Done.";
- goto L_Close;
-
-S_StopBroadcast:
- stopnpctimer;
- setnpctimer 0;
- set $@GMSA_STATUS, 0;
- set $@GMSA_NAME$, "";
- set $@GMSA_MSG$, "";
- set $@GMSA_TICK, 0;
- set $@GMSA_MAX, 0;
- set $@GMSA_CURRENT_TICK, 0;
- return;
-
-L_StartBroadcast2:
- if ($@GMSA_STATUS == 1)
- goto L_Abort;
- callsub S_PerformBroadcast;
- goto L_StartBroadcast;
-
-L_StartBroadcast:
- if ($@GMSA_STATUS == 1)
- goto L_Abort;
- set $@GMSA_STATUS, 1;
- set $@GMSA_NAME$, strcharinfo(0);
- set $@GMSA_CURRENT_TICK, 0;
- initnpctimer;
- mes "Done.";
- goto L_Close;
-
-L_Abort:
- mes "[GM Scheduled Broadcasts Board]";
- mes $@GMSA_NAME$ + " has created a scheduled broadcast just before you, hence yours will abort.";
- goto L_Close;
-
-L_Close:
- close;
-
-OnTimer3600000:
- set $@GMSA_CURRENT_TICK, $@GMSA_CURRENT_TICK + 1;
- setnpctimer 0;
- if ($@GMSA_CURRENT_TICK != $@GMSA_TICK)
- end;
- callsub S_PerformBroadcast;
- set $@GMSA_CURRENT_TICK, 0;
- set $@GMSA_MAX, $@GMSA_MAX - 1;
- if ($@GMSA_MAX != 0)
- end;
- callsub S_StopBroadcast;
- end;
-}
diff --git a/world/map/npc/017-9/npcs.txt b/world/map/npc/017-9/npcs.txt
new file mode 100644
index 00000000..c9f9aedb
--- /dev/null
+++ b/world/map/npc/017-9/npcs.txt
@@ -0,0 +1,45 @@
+009-1,42,43,0|script|#SecretDoor|32767,0,0
+{
+ if (getgmlevel() < 20 && !debug) end;
+ gmlog "@warp 017-9";
+ warp "017-9", 27, 23;
+ end;
+}
+
+020-1,60,76,0|script|#SecretDoor2|32767,0,0
+{
+ if (getgmlevel() < 20 && !debug) end;
+ gmlog "@warp 017-9";
+ warp "017-9", 29, 21;
+ end;
+}
+
+001-1,54,118,0|script|#SecretDoor3|32767,0,0
+{
+ if (getgmlevel() < 20 && !debug) end;
+ gmlog "@warp 017-9";
+ warp "017-9", 21, 21;
+ end;
+}
+
+027-2,118,111,0|script|#SecretDoor4|32767,0,0
+{
+ if (getgmlevel() < 20 && !debug) end;
+ gmlog "@warp 017-9";
+ warp "017-9", 31, 21;
+ end;
+}
+
+029-1,34,96,0|script|#SecretDoor5|32767,0,0
+{
+ if (getgmlevel() < 20 && !debug) end;
+ gmlog "@warp 017-9";
+ warp "017-9", 23, 21;
+ end;
+}
+
+017-9,30,28,0|script|Numa|393
+{
+ callfunc "SuperDebug";
+ end;
+}
diff --git a/world/map/npc/017-9/secret.txt b/world/map/npc/017-9/secret.txt
deleted file mode 100644
index 4c48f0f7..00000000
--- a/world/map/npc/017-9/secret.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-009-1,42,43,0|script|#SecretDoor|32767,0,0
-{
- if (getgmlevel() < 40 && !debug) goto L_close;
- warp "017-9", 26, 25;
- goto L_close;
-
-L_close:
- close;
-}
-
-020-1,60,76,0|script|#SecretDoor2|32767,0,0
-{
- if (getgmlevel() < 40 && !debug) goto L_close;
- warp "017-9", 22, 22;
- goto L_close;
-
-L_close:
- close;
-}
-
-001-1,54,118,0|script|#SecretDoor3|32767,0,0
-{
- if (getgmlevel() < 40 && !debug) goto L_close;
- warp "017-9", 30, 22;
- goto L_close;
-
-L_close:
- close;
-}
-
-027-2,118,111,0|script|#SecretDoor4|32767,0,0
-{
- if (getgmlevel() < 40 && !debug) goto L_close;
- warp "017-9", 30, 29;
- goto L_close;
-
-L_close:
- close;
-}
diff --git a/world/map/npc/027-1/graves.txt b/world/map/npc/027-1/graves.txt
index a5c56049..d10c3309 100644
--- a/world/map/npc/027-1/graves.txt
+++ b/world/map/npc/027-1/graves.txt
@@ -4,6 +4,7 @@
{
set @npc_distance, 1;
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
mes "~ FotherJ ~";
mes "The mad sprite making genius who made all the creepy undead monster graphics.";
close;
@@ -13,6 +14,7 @@
{
set @npc_distance, 1;
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
mes "~ Yosuhara ~";
mes "Contributed some of the tombstones.";
close;
@@ -22,6 +24,7 @@
{
set @npc_distance, 1;
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
mes "~ Feline Monstrosity ~";
mes "Made the background music you are hearing.";
close;
@@ -31,6 +34,7 @@
{
set @npc_distance, 1;
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
mes "~ Superkoop ~";
mes "Mapped the swamp to the south.";
close;
@@ -40,6 +44,7 @@
{
set @npc_distance, 1;
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
mes "~ Aroleon ~";
mes "Mapped the swamp to the southeast.";
close;
@@ -49,6 +54,7 @@
{
set @npc_distance, 1;
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
mes "~ John P ~";
mes "Wrote the graveyard backstory and the dialog for the caretaker quest.";
close;
@@ -58,6 +64,7 @@
{
set @npc_distance, 1;
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
mes "~ Spit23 ~";
mes "Made those freakin awesome cemetery gates.";
close;
@@ -67,6 +74,7 @@
{
set @npc_distance, 1;
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
mes "~ Black Don ~";
mes "Contributed those cool gargoyle statues.";
close;
@@ -76,6 +84,7 @@
{
set @npc_distance, 1;
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
mes "~ Jaxad0127 ~";
mes "Did all the scripting work for the graveyard. Made Caretaker's house.";
close;
@@ -85,6 +94,7 @@
{
set @npc_distance, 1;
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
mes "~ Ces Vargavind ~";
mes "Scripted caretaker's daughter.";
close;
@@ -94,6 +104,7 @@
{
set @npc_distance, 1;
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
mes "~ Crush ~";
mes "Organizer of the whole graveyard project, graveyard fence graphics, mapping of the graveyard itself.";
close;
@@ -103,6 +114,7 @@
{
set @npc_distance, 1;
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
mes "~ Freeyorp ~";
mes "Planned out monster stats and placements.";
close;
diff --git a/world/map/npc/029-1/aahna.txt b/world/map/npc/029-1/aahna.txt
index 92f7ff6b..453774a9 100644
--- a/world/map/npc/029-1/aahna.txt
+++ b/world/map/npc/029-1/aahna.txt
@@ -5,13 +5,9 @@
{
set @npc_distance, 3;
callfunc "PCtoNPCRange";
- goto L_Meet;
+ if(@npc_check) end;
-L_Meet:
mes "[Aahna]";
mes "\"Hello, What a lovely day for a stroll.\"";
- goto L_Close;
-
-L_Close:
close;
}
diff --git a/world/map/npc/029-1/hasan.txt b/world/map/npc/029-1/hasan.txt
index eef3eb64..626c5570 100644
--- a/world/map/npc/029-1/hasan.txt
+++ b/world/map/npc/029-1/hasan.txt
@@ -9,6 +9,8 @@
029-1,35,33,0|script|Scared Man|160
{
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
+
if (QL_BEGIN >= 13)
goto L_TutDone;
message strcharinfo(0), "He looks too afraid to say anything.";
@@ -24,6 +26,7 @@ L_End:
029-1,33,33,0|script|Hasan|189,3,3
{
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
goto L_Main;
L_Main:
diff --git a/world/map/npc/029-1/kaan.txt b/world/map/npc/029-1/kaan.txt
index 297849fa..1133744c 100644
--- a/world/map/npc/029-1/kaan.txt
+++ b/world/map/npc/029-1/kaan.txt
@@ -4,6 +4,7 @@
029-1,46,95,0|script|Kaan|160
{
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
set @kaan_talked, (STARTAREA & $@SpokeToKaan);
if (!(@kaan_talked)) goto L_Tanisha;
diff --git a/world/map/npc/029-1/liana.txt b/world/map/npc/029-1/liana.txt
index 4cde049b..e3ffe889 100644
--- a/world/map/npc/029-1/liana.txt
+++ b/world/map/npc/029-1/liana.txt
@@ -3,6 +3,7 @@
029-1,62,96,0|script|Liana|205
{
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
goto L_Talk;
L_Talk:
diff --git a/world/map/npc/029-1/valon.txt b/world/map/npc/029-1/valon.txt
index e7a276c8..20cbbcf8 100644
--- a/world/map/npc/029-1/valon.txt
+++ b/world/map/npc/029-1/valon.txt
@@ -65,6 +65,8 @@ OnInit:
029-1,72,86,0|script|Valon|156
{
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
+
callfunc "ValonCount";
if (QL_VALON >= 6)
goto L_QuestComplete;
diff --git a/world/map/npc/029-1/zegas.txt b/world/map/npc/029-1/zegas.txt
index a350447d..b25bd6c9 100644
--- a/world/map/npc/029-1/zegas.txt
+++ b/world/map/npc/029-1/zegas.txt
@@ -5,6 +5,7 @@
{
set @npc_distance, 2;
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
if (QL_ZEGAS == 1)
goto L_Find;
diff --git a/world/map/npc/029-2/barrels_config.txt b/world/map/npc/029-2/barrels_config.txt
index b2e340a6..8ad1cfd5 100644
--- a/world/map/npc/029-2/barrels_config.txt
+++ b/world/map/npc/029-2/barrels_config.txt
@@ -42,6 +42,7 @@ function|script|CheckBarrel
{
set @npc_distance, 2;
callfunc "PCtoNPCRange";
+ if(@npc_check) goto L_Return;
if (!(QL_ZEGAS == 2))
goto L_NoI;
if (STARTAREA & $@BarrelBits[@barrel])
diff --git a/world/map/npc/029-2/morgan.txt b/world/map/npc/029-2/morgan.txt
index 3f7d3e1e..20000a11 100644
--- a/world/map/npc/029-2/morgan.txt
+++ b/world/map/npc/029-2/morgan.txt
@@ -26,6 +26,8 @@ OnInit:
029-2,101,57,0|script|Morgan#_M|355
{
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
+
if (Int >= 5)
goto L_Learn;
goto L_NotMagic;
diff --git a/world/map/npc/029-2/sorfina.txt b/world/map/npc/029-2/sorfina.txt
index 984312cf..181a2589 100644
--- a/world/map/npc/029-2/sorfina.txt
+++ b/world/map/npc/029-2/sorfina.txt
@@ -4,6 +4,7 @@
{
set @npc_distance, 2;
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
goto L_Main;
L_Main:
diff --git a/world/map/npc/029-2/stat_reset.txt b/world/map/npc/029-2/stat_reset.txt
index c1dafd7b..6123f632 100644
--- a/world/map/npc/029-2/stat_reset.txt
+++ b/world/map/npc/029-2/stat_reset.txt
@@ -3,6 +3,8 @@
029-2,98,92,0|script|Jessie|159
{
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
+
if (BaseLevel >= 10)
goto L_Sorry;
diff --git a/world/map/npc/029-2/tanisha.txt b/world/map/npc/029-2/tanisha.txt
index 9a7ee081..0a594410 100644
--- a/world/map/npc/029-2/tanisha.txt
+++ b/world/map/npc/029-2/tanisha.txt
@@ -5,6 +5,7 @@
029-2,110,88,0|script|Tanisha|114
{
callfunc "PCtoNPCRange";
+ if(@npc_check) end;
if (isin("029-2", 98, 84, 106, 89))
goto L_Fighting;
diff --git a/world/map/npc/052-1/channelling.txt b/world/map/npc/052-1/channelling.txt
index 4474a2ce..565f96fd 100644
--- a/world/map/npc/052-1/channelling.txt
+++ b/world/map/npc/052-1/channelling.txt
@@ -95,9 +95,9 @@ L_SuggestChannelling:
function|script|StartChannelling
{
if (isat("052-1",53,38) == 0)
- end;
+ goto L_Return;
if ($@illia_level_4_progress > 0)
- end;
+ goto L_Return;
set $@illia_level_4_progress, 1;
set $@illia_char_channelling$, strcharinfo(0);
@@ -126,6 +126,9 @@ function|script|StartChannelling
message strcharinfo(0), "Ok, let's stay focused now!";
donpcevent "#Power Circle::OnCommandSt";
+ goto L_Return;
+
+L_Return:
return;
}
diff --git a/world/map/npc/annuals/fathertime.txt b/world/map/npc/annuals/fathertime.txt
index 852b0025..6d61f446 100644
--- a/world/map/npc/annuals/fathertime.txt
+++ b/world/map/npc/annuals/fathertime.txt
@@ -20,23 +20,3 @@ OnTimer20000:
initnpctimer;
end;
}
-017-9,31,24,0|script|HolidayDebug#1|105
-{
- if(getgmlevel() < 40)
- goto L_End;
-
- menu
- "Xmas.", L_XmasDebug,
- "Halloween.", L_HalloweenDebug;
-
-L_XmasDebug:
- callfunc "XmasDebug";
- goto L_End;
-
-L_HalloweenDebug:
- callfunc "HalloweenDebug";
- goto L_End;
-
-L_End:
- end;
-}
diff --git a/world/map/npc/functions/announcements.txt b/world/map/npc/functions/announcements.txt
index cd4e3b80..dd56eadc 100644
--- a/world/map/npc/functions/announcements.txt
+++ b/world/map/npc/functions/announcements.txt
@@ -1,13 +1,192 @@
-function|script|DisplayMOTD
+//############################################################################
+//# #
+//# GM scheduled broadcasts #
+//# #
+//############################################################################
+
+// $@GMSA_STATUS values:
+// 0: Broadcasts not running
+// 1: Broadcasts running
+// $@GMSA_NAME$: the GM/Admin who created the broadcast, if any
+// $@GMSA_MSG$: the message to be broadcasted
+// $@GMSA_MAX: the number of times the broadcast will be performed, if > 0
+// $@GMSA_TICK: broadcast the message every $@GMSA_TICK hours
+// $@GMSA_CURRENT_TICK: internal counter incremented every hour
+
+function|script|SBConfig
{
- if($@MOTD_Disabled || $@MOTD$[0] == "") goto L_Return;
- goto L_MOTD;
-
-L_MOTD:
- message strcharinfo(0), "##7Server : " + $@MOTD$[@motd_index];
- set @motd_index, @motd_index + 1;
- if($@MOTD$[@motd_index] == "") goto L_Return;
- goto L_MOTD;
+ if ($@GMSA_STATUS)
+ goto L_InfoBroadcast;
+ goto L_PrepareBroadcast;
+
+L_InfoBroadcast:
+ set @ms, (3600000*($@GMSA_TICK - $@GMSA_CURRENT_TICK) - getnpctimer(0, "Stone Board"));
+ callfunc "HumanTime";
+
+ mes "[GM Scheduled Broadcasts Board]";
+ mes $@GMSA_NAME$ + " scheduled the current message, every " + $@GMSA_TICK + " hour(s):";
+ mes $@GMSA_MSG$;
+ next;
+ mes "The next broadcast will happen in " + @time$ + ".";
+ next;
+
+ set @next_broadcast_ts, 0;
+ set @next_broadcast_h, 0;
+ set @next_broadcast_m, 0;
+
+ mes "What do you want to do?";
+ menu
+ "Nothing.", L_Close,
+ "Nothing but... what is this?", L_Help,
+ "Stop broadcasting.", L_StopBroadcast,
+ "Trigger manually the current broadcast.", L_ManualBroadcast;
+
+L_PrepareBroadcast:
+ callsub S_Help;
+ next;
+ mes "There is no broadcast scheduled.";
+ mes "Do you want to create one?";
+ menu
+ "No.", L_Close,
+ "Yes.", L_CreateBroadcast;
+
+L_CreateBroadcast:
+ mes "[GM Scheduled Broadcasts Board]";
+ mes "Enter the message to broadcast:";
+ input $@GMSA_MSG$;
+ if ($@GMSA_MSG$ == "")
+ goto L_InvalidBMsg;
+
+ next;
+ mes "[GM Scheduled Broadcasts Board]";
+ mes "The message will be broadcasted every X hour(s). Enter X:";
+ input $@GMSA_TICK;
+ if ($@GMSA_TICK < 1 || $@GMSA_TICK > 24)
+ goto L_InvalidBroadcastTick;
+
+ next;
+ mes "[GM Scheduled Broadcasts Board]";
+ mes "If you want the message to be broadcasted a limited number of times, enter its value. Keep 0 otherwise:";
+ input $@GMSA_MAX;
+
+ next;
+ mes "[GM Scheduled Broadcasts Board]";
+ if ($@GMSA_MAX == 0)
+ mes "The current message will be broadcasted every " + $@GMSA_TICK + " hour(s):";
+ if ($@GMSA_MAX > 0)
+ mes "The current message will be broadcasted every " + $@GMSA_TICK + " hour(s), up to " + $@GMSA_MAX + " times:";
+ mes $@GMSA_MSG$;
+ next;
+ mes "Is this correct?";
+ menu
+ "No. I'll retry.", L_CreateBroadcast,
+ "No", L_Close,
+ "Yes. Broadcast this. (the first broadcast will happen in " + $@GMSA_TICK + " hour(s).)", L_StartBroadcast,
+ "Yes. Broadcast this, and make an extra broadcast right now.", L_StartBroadcast2;
+
+L_InvalidBMsg:
+ mes "[GM Scheduled Broadcasts Board]";
+ mes "The message can't be empty. Please retry.";
+ goto L_CreateBroadcast;
+
+L_InvalidBroadcastTick:
+ mes "[GM Scheduled Broadcasts Board]";
+ mes "You obviously can't repeat a message every 0 hours. Please retry.";
+ goto L_CreateBroadcast;
+
+L_Help:
+ callsub S_Help;
+ goto L_Close;
+
+S_Help:
+ mes "[GM Scheduled Broadcasts Board]";
+ mes "This board allows a GM to schedule a message to be broadcast every X hours.";
+ mes "Only one broadcast can be scheduled at a time.";
+ return;
+
+L_ManualBroadcast:
+ announce $@GMSA_MSG$, 0;
+ mes "Done.";
+ goto L_Close;
+
+L_StopBroadcast:
+ donpcevent "Stone Board::OnStopBroadcast";
+ mes "Done.";
+ goto L_Close;
+
+L_StartBroadcast2:
+ if ($@GMSA_STATUS == 1)
+ goto L_Abort;
+ announce $@GMSA_MSG$, 0;
+ goto L_StartBroadcast;
+
+L_StartBroadcast:
+ if ($@GMSA_STATUS == 1)
+ goto L_Abort;
+ set $@GMSA_STATUS, 1;
+ set $@GMSA_NAME$, strcharinfo(0);
+ set $@GMSA_CURRENT_TICK, 0;
+ initnpctimer "Stone Board";
+ mes "Done.";
+ gmlog strcharinfo(0) + " modified the scheduled broadcast.";
+ goto L_Close;
+
+L_Abort:
+ mes "[GM Scheduled Broadcasts Board]";
+ mes $@GMSA_NAME$ + " has created a scheduled broadcast just before you, hence yours will abort.";
+ goto L_Close;
+
+L_Close:
+ return;
+}
+
+
+017-9,26,28,0|script|Stone Board|32767
+{
+ end;
+
+OnStopBroadcast:
+ goto L_Stop;
+
+L_Stop:
+ stopnpctimer "Stone Board";
+ setnpctimer 0, "Stone Board";
+ set $@GMSA_STATUS, 0;
+ set $@GMSA_NAME$, "";
+ set $@GMSA_MSG$, "";
+ set $@GMSA_TICK, 0;
+ set $@GMSA_MAX, 0;
+ set $@GMSA_CURRENT_TICK, 0;
+ end;
+
+OnTimer3600000:
+ set $@GMSA_CURRENT_TICK, $@GMSA_CURRENT_TICK + 1;
+ setnpctimer 0, "Stone Board";
+ if ($@GMSA_CURRENT_TICK != $@GMSA_TICK)
+ end;
+ announce $@GMSA_MSG$, 0;
+ set $@GMSA_CURRENT_TICK, 0;
+ set $@GMSA_MAX, $@GMSA_MAX - 1;
+ if ($@GMSA_MAX != 0)
+ end;
+ goto L_Stop;
+}
+
+function|script|getBroadcast
+{
+ if (getmap() == "029-2" && getx() == 22 && gety() == 24) goto L_NewPlayer;
+ goto L_ReturningPlayer;
+
+L_NewPlayer:
+ // todo: show game rules on login (in another PR)
+ // ... does not look like it work.. the `menu`
+ // builtin behaves weirdly when on login
+ goto L_Return;
+
+L_ReturningPlayer:
+ if ($@GMSA_STATUS < 1) goto L_Return;
+ announce $@GMSA_MSG$, 3;
+ goto L_Return;
L_Return:
return;
diff --git a/world/map/npc/functions/banker.txt b/world/map/npc/functions/banker.txt
index 2caa2ad0..5650c5ed 100644
--- a/world/map/npc/functions/banker.txt
+++ b/world/map/npc/functions/banker.txt
@@ -25,7 +25,7 @@ L_Start:
L_Storage:
if (#BankOptions & OPT_STORAGE_CLOSE) close2;
openstorage;
- if (#BankOptions & OPT_STORAGE_CLOSE) end;
+ if (#BankOptions & OPT_STORAGE_CLOSE) goto L_Return;
goto L_Start;
L_Dep:
diff --git a/world/map/npc/functions/debug.txt b/world/map/npc/functions/debug.txt
index f20d27b8..44af4d40 100755
--- a/world/map/npc/functions/debug.txt
+++ b/world/map/npc/functions/debug.txt
@@ -7,7 +7,7 @@ function|script|Debug
mes "";
mes "%%E ##a"+ getspellinvocation("debug0") +"##0";
set @debug_npc, 0;
- close;
+ goto L_Close;
L_Begin:
set @debug_mask, 65535;
diff --git a/world/map/npc/functions/default_npc_checks.txt b/world/map/npc/functions/default_npc_checks.txt
index d20ed187..c714c931 100644
--- a/world/map/npc/functions/default_npc_checks.txt
+++ b/world/map/npc/functions/default_npc_checks.txt
@@ -21,13 +21,12 @@ function|script|PCtoNPCRange
if(@distance_handler) goto L_Return;
set @dnpc_name$, strnpcinfo(1);
if(@dnpc_name$ != "") goto L_Named;
- mes "You need to move closer to interact with this npc.";
- close2;
+ message strcharinfo(0), "##3Server : ##BYou need to move closer to interact with this npc.";
goto L_Return;
L_Named:
message strcharinfo(0), "##3"+@dnpc_name$+" : ##BPlease move closer.";
- end;
+ goto L_Return;
L_Return:
set @dnpc_name$, "";
diff --git a/world/map/npc/functions/ferry.txt b/world/map/npc/functions/ferry.txt
index 9d1a9ba8..eb7196d1 100644
--- a/world/map/npc/functions/ferry.txt
+++ b/world/map/npc/functions/ferry.txt
@@ -135,6 +135,7 @@ function|script|BoardFerry
"No.", L_Return;
L_Board:
+ close2;
warp "035-2",39,29;
goto L_Return;
@@ -150,6 +151,7 @@ function|script|BoardCandorFerry
"No.", L_Return;
L_Board:
+ close2;
warp "036-2",39,29;
goto L_Return;
diff --git a/world/map/npc/functions/global_event_handler.txt b/world/map/npc/functions/global_event_handler.txt
index 04f89159..7d380b0c 100644
--- a/world/map/npc/functions/global_event_handler.txt
+++ b/world/map/npc/functions/global_event_handler.txt
@@ -12,6 +12,7 @@ OnPCLoginEvent:
callfunc "getHeadStyles"; // converts class, color and hair
callfunc "ClearVariables"; // removes / converts old variables
callfunc "DisplayMOTD"; // send the motd to the client, if enabled
+ callfunc "getBroadcast"; // get the scheduled broadcast, if any
// add more here
set @login_event, 2;
end;
@@ -29,7 +30,7 @@ OnPCDieEvent:
callfunc "fightclub_event_die"; // this is used by the 1v1 arena
end;
-OnInit: //fixme: change to OnInterIfInit
+OnInit:
callfunc "ClearGlobalVars";
callfunc "MOTD"; // set the MOTD array
end;
diff --git a/world/map/npc/functions/gm_island.txt b/world/map/npc/functions/gm_island.txt
index 94c745a7..89c0790a 100644
--- a/world/map/npc/functions/gm_island.txt
+++ b/world/map/npc/functions/gm_island.txt
@@ -16,11 +16,6 @@ function|script|GmWarp
}
function|script|GmDebug
{
- if (getgmlevel() < 60)
- goto L_Return;
- goto L_Main;
-
-L_Main:
mes "[Gm Debug]";
mes "What do you want to do?";
menu
@@ -31,22 +26,14 @@ L_GmStart:
enablenpc "Gm Event#1";
enablenpc "Gm Event#2";
enablenpc "Gm Event#3";
- goto L_Return;
+ return;
L_GmStop:
disablenpc "Gm Event#1";
disablenpc "Gm Event#2";
disablenpc "Gm Event#3";
- goto L_Return;
-
-L_Return:
return;
}
-017-9,32,21,0|script|Gm Event Debug|368
-{
- callfunc "GmDebug";
- close;
-}
001-1,49,68,0|script|Gm Event#1|368,0,0
{
callfunc "GmWarp";
diff --git a/world/map/npc/functions/mob_points.txt b/world/map/npc/functions/mob_points.txt
index ba2910b1..d60c68b6 100644
--- a/world/map/npc/functions/mob_points.txt
+++ b/world/map/npc/functions/mob_points.txt
@@ -184,20 +184,17 @@ L_NatureKarma:
set @value, 3;
if (@value == 0)
- goto L_end;
+ goto L_Return;
callfunc "QuestSagathaAnnoy";
- goto L_end;
+ goto L_Return;
L_good:
set @value, 1;
callfunc "QuestSagathaHappy";
- goto L_end;
-
-L_end:
- set @value, 0;
- end;
+ goto L_Return;
L_Return:
+ set @value, 0;
return;
}
diff --git a/world/map/npc/functions/motdconfig.txt b/world/map/npc/functions/motdconfig.txt
new file mode 100644
index 00000000..9ad2b43f
--- /dev/null
+++ b/world/map/npc/functions/motdconfig.txt
@@ -0,0 +1,40 @@
+function|script|MOTDConfig
+{
+ mes "[MOTD]";
+ mes "lines:";
+ mes "---";
+ set @line, 0;
+ callsub S_Lines;
+ mes "---";
+ mes "Enabled: " + !($@MOTD_Disabled);
+ next;
+ menu
+ "toggle|Toggle MOTD", L_Toggle;
+
+L_Toggle:
+ gmlog strcharinfo(0) + " enabled or disabled the MOTD.";
+ set $@MOTD_Disabled, !$@MOTD_Disabled;
+ close2;
+ return;
+
+S_Lines:
+ mes @line + ": "+ $@MOTD$[@line];
+ set @line, @line + 1;
+ if(@line != getarraysize($@MOTD$)) goto S_Lines;
+ return;
+}
+
+function|script|DisplayMOTD
+{
+ if($@MOTD_Disabled || $@MOTD$[0] == "") goto L_Return;
+ goto L_MOTD;
+
+L_MOTD:
+ message strcharinfo(0), "##7Server : " + $@MOTD$[@motd_index];
+ set @motd_index, @motd_index + 1;
+ if($@MOTD$[@motd_index] == "") goto L_Return;
+ goto L_MOTD;
+
+L_Return:
+ return;
+}
diff --git a/world/map/npc/functions/superdebug.txt b/world/map/npc/functions/superdebug.txt
new file mode 100644
index 00000000..b9f067de
--- /dev/null
+++ b/world/map/npc/functions/superdebug.txt
@@ -0,0 +1,61 @@
+// all-in-one debug
+// author: meko
+
+function|script|SuperDebug
+{
+ goto L_Main;
+
+L_Main:
+ mes "[Numa]";
+ mes "How may I help you?";
+ next;
+ menu
+ "Announcements", L_StoneBoard,
+ "MOTD", L_MOTD,
+ "Holiday debug", L_Holiday,
+ "Event debug", L_Event;
+ // todo: generic npcs (in a future PR)
+ // todo: map list (in a future PR)
+ // todo: quest log debug (in a future PR)
+
+L_Holiday:
+ if(getgmlevel() < 40) goto L_GM;
+ mes "[Numa]";
+ mes "What holiday do you want to debug?";
+ next;
+ menu
+ "Xmas.", L_XmasDebug,
+ "Halloween.", L_HalloweenDebug;
+
+L_XmasDebug:
+ gmlog strcharinfo(0) + " accessed the Xmas debug.";
+ callfunc "XmasDebug";
+ end;
+
+L_HalloweenDebug:
+ gmlog strcharinfo(0) + " accessed the Halloween debug.";
+ callfunc "HalloweenDebug";
+ end;
+
+L_Event:
+ if(getgmlevel() < 60) goto L_GM;
+ gmlog strcharinfo(0) + " accessed the GM event debug.";
+ callfunc "GmDebug";
+ close;
+
+L_StoneBoard:
+ if (getgmlevel() < 30) goto L_GM;
+ callfunc "SBConfig";
+ close;
+
+L_MOTD:
+ if (getgmlevel() < 40) goto L_GM;
+ callfunc "MOTDConfig";
+ close;
+
+L_GM:
+ mes "[Numa]";
+ mes "I'm awfully sorry.";
+ mes "You do not have the required GM level to perform this action.";
+ close;
+}
diff --git a/world/map/npc/items/scissors.txt b/world/map/npc/items/scissors.txt
index 44dbbac8..640cc1c5 100644
--- a/world/map/npc/items/scissors.txt
+++ b/world/map/npc/items/scissors.txt
@@ -5,10 +5,10 @@ function|script|useScissors
message strcharinfo(0), "Whoops!";
heal -20 - rand(Hp >> 1), 0;
getitem "Scissors", 1;
- end;
+ return;
L_Change:
setlook LOOK_HAIR_STYLE, rand(20);
getitem "Scissors", 1;
- end;
+ return;
}
diff --git a/world/map/npc/items/shock_sweet.txt b/world/map/npc/items/shock_sweet.txt
index 1ae787e3..4de758d1 100644
--- a/world/map/npc/items/shock_sweet.txt
+++ b/world/map/npc/items/shock_sweet.txt
@@ -4,12 +4,12 @@ function|script|useShockSweet
goto L_Change;
message strcharinfo(0), "Yuck, this tastes like earwax!";
heal -20 - (Hp >> 2), 0;
- end;
+ return;
L_Change:
setlook LOOK_HAIR_COLOR, HC_WHITE;
message strcharinfo(0), "Gah! That was some strong stuff!";
sc_start sc_poison, 1, 20;
misceffect 15, strcharinfo(0);
- end;
+ return;
}
diff --git a/world/map/npc/items/warpTowels.txt b/world/map/npc/items/warpTowels.txt
index f586ed99..8e9ef4ac 100644
--- a/world/map/npc/items/warpTowels.txt
+++ b/world/map/npc/items/warpTowels.txt
@@ -152,7 +152,7 @@ L_End:
set @NextLocationX, 0;
set @NextLocationY, 0;
set @warpTowelName$, "";
- end;
+ return;
}
function|script|MultiWarpTowel
diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf
index 39ad7d92..e2603c8e 100644
--- a/world/map/npc/scripts.conf
+++ b/world/map/npc/scripts.conf
@@ -19,6 +19,8 @@ npc: npc/functions/time.txt
npc: npc/functions/water_bottle.txt
npc: npc/functions/evil_obelisk.txt
npc: npc/functions/debug.txt
+npc: npc/functions/superdebug.txt
+npc: npc/functions/announcements.txt
npc: npc/functions/lockpicking.txt
npc: npc/functions/default_npc_checks.txt
npc: npc/functions/undead_debug.txt
@@ -28,8 +30,8 @@ npc: npc/functions/stat_reset.txt
npc: npc/functions/quiz.txt
npc: npc/functions/dynamic_menu.txt
npc: npc/functions/DyeConfig.txt
-npc: npc/functions/announcements.txt
npc: npc/functions/motd.txt
+npc: npc/functions/motdconfig.txt
// Item Functions
npc: npc/items/magic_gm_top_hat.txt