Update:
Thanks to Scarlet Ayleid and Summ who build a certain day of the week exprate script.
Globalevent to set exprate player who is online:
Creaturescript to set exprate player who logs in on double exp day:
Thanks to Scarlet Ayleid and Summ who build a certain day of the week exprate script.
Globalevent to set exprate player who is online:
LUA:
function onTimer()
local message = "test"
local expRate = 1
if (os.date('%A') == 'Wednesday') then
message = "Extra experience day has been started"
expRate = 2
elseif (os.date('%A') ~= 'Wednesday') then
message = "Extra experience day is over"
expRate = 1
else
return true
end
for _, cid in pairs(getPlayersOnline()) do
doPlayerSetRate(cid, SKILL__LEVEL, expRate)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, message)
end
return true
end
Creaturescript to set exprate player who logs in on double exp day:
LUA:
function onLogin(cid)
if (os.date('%A') == 'Wednesday') then
doPlayerSetRate(cid, SKILL__LEVEL, 2)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Today is extra experience day")
end
return true
end
Last edited: