From fb0f0a7f9c1604e90b6fdc4b80a6fef1596e5bc2 Mon Sep 17 00:00:00 2001 From: jesusalva Date: Thu, 1 Mar 2018 16:02:54 -0300 Subject: Daily login bonus --- npc/commands/motd.txt | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'npc/commands/motd.txt') diff --git a/npc/commands/motd.txt b/npc/commands/motd.txt index 3867c8513..6052656cc 100644 --- a/npc/commands/motd.txt +++ b/npc/commands/motd.txt @@ -27,7 +27,7 @@ function script MOTDConfig { function toggleMOTD { $MOTD_Disabled = !($MOTD_Disabled); - // FIXME: log to GM log + logmes "MOTD modified: toogled: enable/disable", LOGMES_ATCOMMAND; } function addNewLine { @@ -41,7 +41,6 @@ function script MOTDConfig { $MOTD_Messages$[.@size] = .@s$; set getvariableofnpc(.size, "@motd"), getarraysize($MOTD_Messages$); logmes "MOTD modified: line added", LOGMES_ATCOMMAND; - // FIXME: log to GM log } } @@ -53,7 +52,6 @@ function script MOTDConfig { mes l("Line @@ has been removed.", .@l); set getvariableofnpc(.size, "@motd"), getarraysize($MOTD_Messages$); logmes "MOTD modified: line removed", LOGMES_ATCOMMAND; - // FIXME: log to GM log } function moveUp { @@ -86,7 +84,6 @@ function script MOTDConfig { { $MOTD_Messages$[.@l] = .@s$; logmes "MOTD modified: line edited", LOGMES_ATCOMMAND; - // FIXME: log to GM log } } @@ -186,9 +183,31 @@ OnPCLoginEvent: { dispbottom "##7<<##B @@help://test-server|" + col(l("Click here for instructions on how to use the test server."),6) + "@@ ##7>>"; } + + // Handle daily login bonus + if (#LOGIN_DAY != .login_ref) { + #LOGIN_DAY = .login_ref; + if (.login_ref % 3 == 0) { + getitem StrangeCoin, 1; + dispbottom l("##2Daily login bonus: ##B1x @@##b", getitemlink(StrangeCoin)); + } else if (.login_ref % 3 == 1) { + set Zeny, Zeny+20; + dispbottom l("##2Daily login bonus: ##B20 GP##b"); + } else { + getexp 0, 5; + dispbottom l("##2Daily login bonus: ##B5 Job Exp.##b"); + } + } + + end; + +OnClock0000: + .login_ref=gettime(5); // Day of moth end; OnInit: + .login_ref=gettime(5); + .daylength=(60*60*24); MOTD_debug_text; .size = getarraysize($MOTD_Messages$); .dsize = getarraysize($@Debug_Messages$); -- cgit v1.2.3-70-g09d2