diff options
author | jesusalva <cpntb1@ymail.com> | 2018-03-01 16:02:54 -0300 |
---|---|---|
committer | jesusalva <cpntb1@ymail.com> | 2018-03-01 16:02:54 -0300 |
commit | fb0f0a7f9c1604e90b6fdc4b80a6fef1596e5bc2 (patch) | |
tree | b950408145b48cbfd7ec32f02c53d4edfcaf2842 /npc | |
parent | f11a966ea78d91b6c56983720891b2d81bcf1047 (diff) | |
download | serverdata-fb0f0a7f9c1604e90b6fdc4b80a6fef1596e5bc2.tar.gz serverdata-fb0f0a7f9c1604e90b6fdc4b80a6fef1596e5bc2.tar.bz2 serverdata-fb0f0a7f9c1604e90b6fdc4b80a6fef1596e5bc2.tar.xz serverdata-fb0f0a7f9c1604e90b6fdc4b80a6fef1596e5bc2.zip |
Daily login bonus
Diffstat (limited to 'npc')
-rw-r--r-- | npc/commands/motd.txt | 27 |
1 files changed, 23 insertions, 4 deletions
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$); |