summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/003-3/malindou.txt18
-rw-r--r--npc/commands/motd.txt35
-rw-r--r--npc/commands/scheduled-broadcasts.txt12
-rw-r--r--npc/functions/daily.txt13
4 files changed, 55 insertions, 23 deletions
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt
index 20d38d5f1..697bf85ea 100644
--- a/npc/003-3/malindou.txt
+++ b/npc/003-3/malindou.txt
@@ -337,12 +337,28 @@ OnInit:
//htput($@CONTRIBUTORS, "", 1);
end;
+// This control all PC Login events
+// Position matters!
OnPCLoginEvent:
- checkclientversion;
+ // Vault override
if (#MerchantBank) {
BankVault += max(0, #MerchantBank);
#MerchantBank = 0;
}
+
+ // Message of the Day have priority
+ MOTDHandler();
+
+ // Scheduled Announces
+ StoneBoardRead();
+
+ // TODO: npc/commands/rate-management.txt
+
+ // Main update handler
+ checkclientversion();
+
+ // Daily rewards (always the last)
+ daily_login_bonus_handler();
end;
}
diff --git a/npc/commands/motd.txt b/npc/commands/motd.txt
index d63a3771a..aad93fc5e 100644
--- a/npc/commands/motd.txt
+++ b/npc/commands/motd.txt
@@ -166,22 +166,6 @@ OnCall:
closedialog;
end;
-OnPCLoginEvent:
- // Handle events
- if ($@GM_EVENT)
- dispbottom l("An event is happening at Aeros! Hurry up!");
- if ($EVENT$ != "")
- dispbottom l("It's @@ (day)!", $EVENT$);
-
- // Handle MOTD
- if (!$MOTD_Disabled)
- displayMOTD;
- if (debug)
- dispbottom "##7<<##B @@help://test-server|" + col(l("Click here for instructions on how to use the test server."),6) + "@@ ##7>>";
-
- daily_login_bonus_handler();
- end;
-
OnClock0003:
// Reset TMW2 Login Bonus on February and April
if (!$@TMW2_357GDQST) {
@@ -202,3 +186,22 @@ OnInit:
.dsize = getarraysize($@Debug_Messages$);
bindatcmd "motd", "@motd::OnCall", 99, 99, 1;
}
+
+
+
+
+function script MOTDHandler {
+ // Handle events
+ if ($@GM_EVENT)
+ dispbottom l("An event is happening at Aeros! Hurry up!");
+ if ($EVENT$ != "")
+ dispbottom l("It's @@ (day)!", $EVENT$);
+
+ // Handle MOTD
+ if (!$MOTD_Disabled)
+ displayMOTD;
+ if (debug)
+ dispbottom "##7<<##B @@help://test-server|" + col(l("Click here for instructions on how to use the test server."),6) + "@@ ##7>>";
+ return;
+}
+
diff --git a/npc/commands/scheduled-broadcasts.txt b/npc/commands/scheduled-broadcasts.txt
index 4503c7b23..1801663a7 100644
--- a/npc/commands/scheduled-broadcasts.txt
+++ b/npc/commands/scheduled-broadcasts.txt
@@ -1,3 +1,4 @@
+// Evol Script
// Authors: Gumi
function script StoneBoard {
@@ -213,13 +214,14 @@ OnCall:
closedialog;
end;
-OnPCLoginEvent:
+OnInit:
+ bindatcmd "sched", "@sched::OnCall", 80, 99, 1;
+}
+
+function script StoneBoardRead {
if ($@SCHED_Opt[0] && $@SCHED_Msg$ != "")
{
announce $@SCHED_Msg$, bc_self;
}
- end;
-
-OnInit:
- bindatcmd "sched", "@sched::OnCall", 80, 99, 1;
+ return;
}
diff --git a/npc/functions/daily.txt b/npc/functions/daily.txt
index 7bf8f24fa..4a8ad63b8 100644
--- a/npc/functions/daily.txt
+++ b/npc/functions/daily.txt
@@ -128,7 +128,18 @@ function script daily_login_bonus_handler {
dispbottom "##B##2"+l("Merry Christmas!")+" "+l("You have gained a special login bonus!")+"##b##0";
}
}
- // We're done with daily logins
+ // We're almost done with daily logins, just the optional User Interface
+ if (!GSET_DAILYREWARD_SILENT) {
+ setnpcdialogtitle l("Daily Login Rewards");
+ setskin "daily_"+#LOGIN_STREAK;
+ mes "This is a debug message. Your manaplus version is wrong.";
+ mes "You should not be reading this. I'll call you a cheater.";
+ mes "I hope you report this (if a bug). Reading source code?";
+ mes "4144 will hear about this. You are NOT amazing by the way.";
+ select("Ok");
+ setskin "";
+ closeclientdialog;
+ }
}
//debugmes "[DLBH] Finished: "+#LOGIN_DAY+" ok";