summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-10 12:10:43 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-10 12:10:43 -0300
commitf0c670be3c6cca5533b842d9b626711bc5d3bf05 (patch)
tree5536fdae50184abff494bc542ea68a71f32cb2db
parent0d5f143b54821ab61430788186647ca60e562600 (diff)
downloadserverdata-f0c670be3c6cca5533b842d9b626711bc5d3bf05.tar.gz
serverdata-f0c670be3c6cca5533b842d9b626711bc5d3bf05.tar.bz2
serverdata-f0c670be3c6cca5533b842d9b626711bc5d3bf05.tar.xz
serverdata-f0c670be3c6cca5533b842d9b626711bc5d3bf05.zip
Add @exprate/@droprate - And drop the legacy stoneboard
-rw-r--r--npc/commands/numa.txt7
-rw-r--r--npc/commands/rate-management.txt231
-rw-r--r--npc/commands/scheduled-broadcasts.txt227
-rw-r--r--npc/functions/announcements.txt177
-rw-r--r--npc/functions/global_event_handler.txt3
-rw-r--r--npc/scripts.conf3
6 files changed, 466 insertions, 182 deletions
diff --git a/npc/commands/numa.txt b/npc/commands/numa.txt
index b8b0a924..da3948b1 100644
--- a/npc/commands/numa.txt
+++ b/npc/commands/numa.txt
@@ -41,21 +41,25 @@ L_Holiday:
"Halloween.", L_HalloweenDebug,
"Easter.", L_EasterDebug;
+// FIXME
L_XmasDebug:
gmlog strcharinfo(0) + " accessed the Xmas debug.";
callfunc "XmasDebug";
goto L_close;
+// FIXME
L_HalloweenDebug:
gmlog strcharinfo(0) + " accessed the Halloween debug.";
callfunc "HalloweenDebug";
goto L_close;
+// FIXME
L_EasterDebug:
gmlog strcharinfo(0) + " accessed the Easter debug.";
callfunc "Easter Debug";
goto L_close;
+// FIXME
L_Event:
if (GM < EVT_DEBUG && GM < G_EVENT) goto L_GM;
gmlog strcharinfo(0) + " accessed the GM event debug.";
@@ -64,9 +68,10 @@ L_Event:
L_StoneBoard:
if (GM < DBG_SCHEDULED && GM < G_SYSOP) goto L_GM;
- callfunc "SBConfig";
+ callfunc "StoneBoard";
goto L_close;
+// FIXME?
L_MOTD:
if (GM < DBG_MOTD && GM < G_SYSOP) goto L_GM;
callfunc "MOTDConfig";
diff --git a/npc/commands/rate-management.txt b/npc/commands/rate-management.txt
new file mode 100644
index 00000000..273ce9ba
--- /dev/null
+++ b/npc/commands/rate-management.txt
@@ -0,0 +1,231 @@
+// Authors: Gumi, Jesusalva
+- script @exprate 32767,{
+ end;
+
+ function rateCleanUp {
+ stopnpctimer;
+ .hours = 0;
+ .max_hours = 0;
+ .current_rate = .original_exp_rate;
+ setbattleflag("base_exp_rate", .original_exp_rate);
+ setbattleflag("quest_exp_rate", .original_quest_rate);
+ charcommand("@reloadmobdb"); // this is on purpose (callable without RID)
+ charcommand("@reloadquestdb");
+ }
+
+ function remainingTime {
+ .@total_seconds = (3600 * .max_hours);
+ .@seconds_elapsed = (3600 * .hours) + (getnpctimer(0) / 1000);
+ .@seconds_remaining = max(1, .@total_seconds - .@seconds_elapsed);
+ return FuzzyTime(time_from_seconds(.@seconds_remaining), 2, 2);
+ }
+
+OnCall:
+ if (!is_evtc())
+ {
+ end;
+ }
+
+ .@special$ = strip(.@atcmd_parameters$[0]); // special value
+ .@new_rate = min(atoi(.@special$), 1000); // or just a regular integer
+ .@hours = min(0x7FFFFFFE, max(1, atoi(strip(.@atcmd_parameters$[1])))); // number of hours
+
+ if (.@new_rate > 0)
+ {
+ // set new exp rate
+ .hours = 0;
+ .max_hours = .@hours;
+ .current_rate = .@new_rate;
+ setbattleflag("base_exp_rate", .@new_rate);
+ setbattleflag("quest_exp_rate", .@new_rate);
+ charcommand("@reloadmobdb");
+ charcommand("@reloadquestdb");
+ initnpctimer; // start counting
+
+ dispbottom l("You successfully set the exp rate to @@%. It will reset to @@% (default value) in @@.",
+ .@new_rate, .original_exp_rate, FuzzyTime(time_from_hours(.max_hours), 2, 2));
+ dispbottom l("You can also manually stop it at any time with: @exprate default");
+ }
+
+ else if (.@new_rate == 0 && .@special$ == "")
+ {
+ // get current exp rate
+ if (.current_rate == .original_exp_rate)
+ {
+ dispbottom l("Current exp rate is set to @@% (default value).", .current_rate);
+ }
+
+ else
+ {
+ dispbottom l("Current exp rate is set to @@%, and will reset to @@% (default value) in @@.",
+ .current_rate, .original_exp_rate, remainingTime());
+
+ dispbottom l("If you meant to reset the exp rate to its default value: @exprate default");
+ }
+ }
+
+ else
+ {
+ // reset
+ rateCleanUp;
+ dispbottom l("Exp rate has been reset to @@% (default value).",
+ .original_exp_rate);
+ }
+
+ end;
+
+OnTimer3600000:
+ // runs every hour
+ if (++.hours == .max_hours)
+ {
+ rateCleanUp;
+ end;
+ }
+ initnpctimer;
+ end;
+
+OnPCLoginEvent:
+ if (.max_hours > 0)
+ {
+ dispbottom col(l("Exp rate is set to @@% for the next @@.",
+ .current_rate, remainingTime()), 6);
+ }
+ end;
+
+OnInit:
+ bindatcmd "exprate", "@exprate::OnCall", 0, 99, 1; // change exp rate
+
+ // WARNING: using @reloadscript will change the "original" value
+ .original_exp_rate = getbattleflag("base_exp_rate");
+ .original_quest_rate = getbattleflag("quest_exp_rate");
+ .current_rate = .original_exp_rate;
+
+ // XXX: maybe in the future:
+ //.original_job_rate = getbattleflag("base_job_rate");
+ //.original_pk_mode = getbattleflag("pk_mode");
+ //.original_death_penalty = getbattleflag("death_penalty_type");
+ end;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////////
+- script @droprate 32767,{
+ end;
+
+ function dropRateReal {
+ return 100; // getbattleflag("item_rate_common") ?
+ }
+
+ function dropRecalc {
+ .@val=getarg(0);
+ return .@val;
+ }
+
+ function rateCleanUp {
+ stopnpctimer;
+ .hours = 0;
+ .max_hours = 0;
+ .current_rate = getbattleflag("item_rate_common");
+ setbattleflag("item_rate_common", dropRateReal());
+ setbattleflag("item_rate_common_boss", dropRateReal());
+ setbattleflag("item_rate_heal", dropRateReal());
+ setbattleflag("item_rate_heal_boss", dropRateReal());
+ setbattleflag("item_rate_use", dropRateReal());
+ setbattleflag("item_rate_use_boss", dropRateReal());
+ setbattleflag("item_rate_equip", dropRateReal());
+ setbattleflag("item_rate_equip_boss", dropRateReal());
+ setbattleflag("item_rate_card", dropRateReal());
+ setbattleflag("item_rate_card_boss", dropRateReal());
+ charcommand("@reloadmobdb"); // this is on purpose (callable without RID) - no idea what is the purpose
+ channelmes("#world", "The Drop Rate Bonus is now over.");
+ }
+
+ function remainingTime {
+ .@total_seconds = (3600 * .max_hours);
+ .@seconds_elapsed = (3600 * .hours) + (getnpctimer(0) / 1000);
+ .@seconds_remaining = max(1, .@total_seconds - .@seconds_elapsed);
+ return FuzzyTime(time_from_seconds(.@seconds_remaining), 2, 2);
+ }
+
+OnCall:
+ if (!is_evtc()) {
+ end;
+ }
+
+ .@special$ = strip(.@atcmd_parameters$[0]); // special value
+ .@new_rate = min(atoi(.@special$), 1000); // or just a regular integer
+ .@hours = min(0x7FFFFFFE, max(1, atoi(strip(.@atcmd_parameters$[1])))); // number of hours
+
+ if (.@new_rate > 0)
+ {
+ // set new exp rate
+ .hours = 0;
+ .max_hours = .@hours;
+ .current_rate = .@new_rate;
+ setbattleflag("item_rate_common", dropRecalc(.@new_rate));
+ setbattleflag("item_rate_common_boss", dropRecalc(.@new_rate));
+ setbattleflag("item_rate_heal", dropRecalc(.@new_rate));
+ setbattleflag("item_rate_heal_boss", dropRecalc(.@new_rate));
+ setbattleflag("item_rate_use", dropRecalc(.@new_rate));
+ setbattleflag("item_rate_use_boss", dropRecalc(.@new_rate));
+ setbattleflag("item_rate_equip", dropRecalc(.@new_rate));
+ setbattleflag("item_rate_equip_boss", dropRecalc(.@new_rate));
+ setbattleflag("item_rate_card", dropRecalc(.@new_rate));
+ setbattleflag("item_rate_card_boss", dropRecalc(.@new_rate));
+ charcommand("@reloadmobdb");
+ initnpctimer; // start counting
+
+ .@msg$=strcharinfo(0)+" modified drop rates to "+str(.@new_rate)+"%. It will only last "+str(FuzzyTime(time_from_hours(.max_hours), 2, 2))+"!";
+
+ announce .@msg$, bc_all;
+ channelmes("#world", .@msg$);
+
+ //dispbottom l("You successfully set the drop rate to @@%. It will reset to @@% (default value) in @@.",
+ // .@new_rate, dropRateReal(), FuzzyTime(time_from_hours(.max_hours), 2, 2));
+ dispbottom l("You can also manually stop it at any time with: @droprate default");
+ } else if (.@new_rate == 0 && .@special$ == "") {
+ // get current exp rate
+ if (.current_rate == dropRateReal()) {
+ atcommand("@rates");
+ dispbottom col(l("Usage of @exprate without argument is deprecated, please use \"@rates\" instead."), 1);
+ } else {
+ dispbottom l("Current drop rate is set to @@%, and will reset to @@% (default value) in @@.",
+ .current_rate, dropRateReal(), remainingTime());
+ dispbottom l("If you meant to reset the drop rate to its default value: @droprate default");
+ }
+ }
+
+ else
+ {
+ // reset
+ rateCleanUp;
+ dispbottom l("Drop rate has been reset to @@% (default value).",
+ dropRateReal());
+ }
+
+ end;
+
+OnTimer3600000:
+ // runs every hour
+ if (++.hours == .max_hours) {
+ rateCleanUp;
+ end;
+ }
+ initnpctimer;
+ end;
+
+OnPCLoginEvent:
+ if (.max_hours > 0) {
+ dispbottom col(l("Drop rate is set to @@% for the next @@.",
+ .current_rate, remainingTime()), 6);
+ }
+ end;
+
+OnInit:
+ bindatcmd "droprate", "@droprate::OnCall", 80, 80, 1; // change drop rate
+
+ // WARNING: using @reloadscript will change the "original" value, use @reloadbattleconf before!
+ .current_rate = getbattleflag("item_rate_common");
+ //force_refreshall();
+ end;
+}
diff --git a/npc/commands/scheduled-broadcasts.txt b/npc/commands/scheduled-broadcasts.txt
new file mode 100644
index 00000000..1801663a
--- /dev/null
+++ b/npc/commands/scheduled-broadcasts.txt
@@ -0,0 +1,227 @@
+// Evol Script
+// Authors: Gumi
+function script StoneBoard {
+
+ function setMessage {
+ do
+ {
+ clear;
+ mes l("Please enter the message:");
+ next;
+ input .@msg$;
+ .@msg$ = strip(.@msg$);
+ if (.@msg$ != "") {
+ return .@msg$;
+ }
+ mes l("The message cannot be empty");
+ next;
+ } while (1);
+ }
+
+ function setInterval {
+ clear;
+ mes l("Please select the interval:");
+ next;
+ menuint
+ l("Every 1 hour"), 1,
+ l("Every 3 hours"), 3,
+ l("Every 5 hours"), 5,
+ l("Every 6 hours"), 6,
+ l("Every 12 hours"), 12,
+ l("Every 24 hours"), 24,
+ l("Never (only on login)"), 0;
+
+ return @menuret;
+ }
+
+ function setMaxRep {
+ if (getarg(0,0) == 0) {
+ return 0;
+ }
+ clear;
+ mes l("Repeat how many times?");
+ next;
+ menuint
+ l("Send only once"), 1,
+ l("Send 2 times"), 2,
+ l("Send 3 times"), 3,
+ l("Send 5 times"), 5,
+ l("Send 10 times"), 10,
+ l("Send 20 times"), 20,
+ l("Send indefinitely"), 0;
+
+ return @menuret;
+ }
+
+ function setOnLogin {
+ if (getarg(0,0) == 0)
+ {
+ return 1;
+ }
+ clear;
+ mes l("Send this message also on login?");
+ next;
+ select
+ l("No"),
+ l("Yes");
+
+ return (@menu - 1);
+ }
+
+ function newBroadcast {
+ do
+ {
+ setnpcdialogtitle l("Scheduled broadcasts - Create new");
+
+ // go through all steps
+ .@msg$ = setMessage();
+ .@int = setInterval();
+ .@max = setMaxRep(.@int);
+ .@login = setOnLogin(.@int);
+
+ // recap
+ clear;
+ mes l("Message:");
+ mes "---";
+ mes .@msg$;
+ mes "---";
+ if (.@int)
+ {
+ mes l("Interval: every @@ hour(s)", .@int);
+ mes l("Repeat: @@ times", .@max ? .@max : "∞");
+ mes l("Sent on login: @@", .@login ? l("yes") : l("no"));
+ }
+ else
+ {
+ mes l("Interval: (none, only sent on login)");
+ mes l("Sent on login: yes");
+ }
+
+ next;
+ select
+ menuimage("actions/cancel", l("Discard")),
+ menuimage("actions/edit", l("Start over")),
+ menuimage("actions/test", l("Start broadcasting")),
+ menuimage("actions/test", l("Start broadcasting, and make an extra broadcast right now"));
+
+ switch (@menu)
+ {
+ case 3:
+ case 4:
+ stopnpctimer "@sched";
+ $@SCHED_Opt[0] = .@login;
+ $@SCHED_Opt[1] = .@int;
+ $@SCHED_Opt[2] = 0;
+ $@SCHED_Opt[3] = .@max;
+ $@SCHED_Opt[4] = 0;
+ $@SCHED_Msg$ = .@msg$;
+ if (.@int)
+ {
+ initnpctimer "@sched";
+ }
+ if (@menu == 4)
+ {
+ announce $@SCHED_Msg$, bc_all;
+ }
+ logmes "Scheduled Broadcast: A new broadcast was added", LOGMES_ATCOMMAND;
+ case 1: return;
+ }
+
+ } while(1);
+ }
+
+ do
+ {
+ clear;
+ setnpcdialogtitle l("Scheduled broadcasts");
+ mes l("This menu allows you to set the scheduled broadcast that is sent to all players at a specific interval.");
+ mes "";
+
+ .@a = $@SCHED_Msg$ != ""; // any active broadcast?
+ mes "---";
+ mes .@a ? $@SCHED_Msg$ : "(" + l("no active broadcast") +")";
+ mes "---";
+ if (.@a)
+ {
+ mes l("Sent on login: @@", ($@SCHED_Opt[0] ? l("yes") : l("no")));
+ if ($@SCHED_Opt[1])
+ {
+ .@next = max(1, ((3600000 * ($@SCHED_Opt[1] - $@SCHED_Opt[4])) - getnpctimer(0, "@sched")));
+ mes l("Interval: every @@ hour(s)", $@SCHED_Opt[1]);
+ mes l("Next broadcast: @@", FuzzyTime(time_from_ms(.@next)));
+ }
+ else
+ {
+ mes l("Interval: (none, only sent on login)");
+ mes l("Next broadcast: (never)");
+ }
+ mes l("Sent: @@ times out of @@", $@SCHED_Opt[2], ($@SCHED_Opt[3] ? $@SCHED_Opt[3] : "∞"));
+ }
+ next;
+
+ select
+ menuimage("actions/abort", l("Abort")),
+ rif(.@a, menuimage("actions/test", l("Manually trigger the current broadcast"))),
+ rif(.@a, menuimage("actions/remove", l("Stop broadcasting"))),
+ rif(!(.@a), menuimage("actions/add", l("Set a new broadcast"))),
+ rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu")));
+
+ switch (@menu)
+ {
+ case 2: announce $@SCHED_Msg$, bc_all; break;
+ case 3: $@SCHED_Msg$ = ""; break;
+ case 4: newBroadcast; break;
+ default: return;
+ }
+ } while (1);
+}
+
+
+
+- script @sched 32767,{
+ end;
+
+OnTimer3600000:
+ if ($@SCHED_Msg$ == "")
+ {
+ stopnpctimer;
+ end;
+ }
+
+ ++$@SCHED_Opt[4]; // increase hours counter
+ if ($@SCHED_Opt[4] == $@SCHED_Opt[1])
+ {
+ stopnpctimer;
+ ++$@SCHED_Opt[2]; // increase total counter
+ announce $@SCHED_Msg$, bc_all;
+ $@SCHED_Opt[4] = 0; // reset hours counter
+ if ($@SCHED_Opt[2] >= $@SCHED_Opt[3] && $@SCHED_Opt[3] > 0)
+ {
+ $@SCHED_Msg$ = ""; // reset message
+ end;
+ }
+ }
+ initnpctimer;
+ end;
+
+OnCall:
+ if (!is_gm())
+ {
+ end;
+ }
+
+ StoneBoard;
+ closedialog;
+ end;
+
+OnInit:
+ bindatcmd "sched", "@sched::OnCall", 80, 99, 1;
+}
+
+function script StoneBoardRead {
+ if ($@SCHED_Opt[0] && $@SCHED_Msg$ != "")
+ {
+ announce $@SCHED_Msg$, bc_self;
+ }
+ return;
+}
diff --git a/npc/functions/announcements.txt b/npc/functions/announcements.txt
deleted file mode 100644
index d346a431..00000000
--- a/npc/functions/announcements.txt
+++ /dev/null
@@ -1,177 +0,0 @@
-
-
-function script SBConfig {
- if ($@GMSA_STATUS)
- goto L_InfoBroadcast;
- goto L_PrepareBroadcast;
-
-L_InfoBroadcast:
- @ms = (3600000*($@GMSA_TICK - $@GMSA_CURRENT_TICK) - getnpctimer(0, "Stone Board"));
- if (@ms < 0) set @ms, 0; // FIXME: find out WHY this can happen
- 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;
-
- @next_broadcast_ts = 0;
- @next_broadcast_h = 0;
- @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;
- $@GMSA_STATUS = 1;
- $@GMSA_NAME$ = strcharinfo(0);
- $@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 NPC32767,{
- end;
-
-OnStopBroadcast:
- goto L_Stop;
-
-L_Stop:
- stopnpctimer "Stone Board";
- setnpctimer 0, "Stone Board";
- $@GMSA_STATUS = 0;
- $@GMSA_NAME$ = "";
- $@GMSA_MSG$ = "";
- $@GMSA_TICK = 0;
- $@GMSA_MAX = 0;
- $@GMSA_CURRENT_TICK = 0;
- end;
-
-OnTimer3600000:
- $@GMSA_CURRENT_TICK = $@GMSA_CURRENT_TICK + 1;
- setnpctimer 0, "Stone Board";
- if ($@GMSA_CURRENT_TICK != $@GMSA_TICK)
- end;
- announce $@GMSA_MSG$, 0;
- $@GMSA_CURRENT_TICK = 0;
- $@GMSA_MAX = $@GMSA_MAX - 1;
- if ($@GMSA_MAX != 0)
- end;
- goto L_Stop;
-}
-
-function script getBroadcast {
- if (getmapname() == "029-2" && getx() == 22 && gety() == 24) goto L_NewPlayer;
- goto L_ReturningPlayer;
-
-L_NewPlayer:
- // todo: show game rules on login
- // FIXME: needs to spawn a 32767 puppet
- 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/npc/functions/global_event_handler.txt b/npc/functions/global_event_handler.txt
index 460694f3..80a0643c 100644
--- a/npc/functions/global_event_handler.txt
+++ b/npc/functions/global_event_handler.txt
@@ -3,16 +3,13 @@
end;
OnPCLoginEvent:
- debugmes "PCLOGIN";
@login_event = 1;
//callfunc "fixHeadStyles"; // convert headstyles
//callfunc "ClearVariables"; // removes / converts old variables
callfunc "DisplayMOTD"; // send the motd to the client, if enabled
- //callfunc "getBroadcast"; // get the scheduled broadcast, if any
//addtimer 0, "Magic Timer::OnLogin"; // prevent cast rate abuse
// add more here
@login_event = 2;
- debugmes "PCLOGIN OK";
end;
OnPCKillEvent:
diff --git a/npc/scripts.conf b/npc/scripts.conf
index 5f1d6335..7c1520e0 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -35,7 +35,6 @@
"npc/functions/time.txt",
"npc/functions/water_bottle.txt",
"npc/functions/evil_obelisk.txt",
-"npc/functions/announcements.txt",
"npc/functions/lockpicking.txt",
"npc/functions/default_npc_checks.txt",
"npc/functions/undead_debug.txt",
@@ -72,7 +71,9 @@
"npc/commands/language.txt",
"npc/commands/numa.txt",
"npc/commands/python.txt",
+"npc/commands/rate-management.txt",
"npc/commands/resync.txt",
+"npc/commands/scheduled-broadcasts.txt",
// Events
"npc/functions/gm_island.txt",