• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Npc Rashid

xshaggyx

New Member
Joined
Feb 20, 2016
Messages
42
Reaction score
2
I have a question
About npc rashid I can not make it change according to the day I can help
 
Solution
It's not pretty, but it's simple and works. 0.3.7 scripting style/code.
Code:
function onStartUp()
    if os.date('%A') == "Sunday" then
        doCreateNpc("Rashid", {x = 11111, y = 11111, z = 11})
    elseif os.date('%A') == "Monday" then
        doCreateNpc("Rashid", {x = 22222, y = 22222, z = 22})
    elseif os.date('%A') == "Tuesday" then
        doCreateNpc("Rashid", {x = 33333, y = 33333, z = 33})
    elseif os.date('%A') == "Wednesday" then
        doCreateNpc("Rashid", {x = 44444, y = 44444, z = 44})
    elseif os.date('%A') == "Thursday" then
        doCreateNpc("Rashid", {x = 55555, y = 55555, z = 55})
    elseif os.date('%A') == "Friday" then
        doCreateNpc("Rashid", {x = 66666, y = 66666, z = 66})
    elseif os.date('%A')...
Working all ? I have a problem.
My Rashid not change position. Yesterday stay on pos=1 and now stay pos=1.
Whats wrong?
Works fine for me. However I do close and open server every day when server is saving. I do not think it will change position without actually restarting server? I could be wrong.
 
Works fine for me. However I do close and open server every day when server is saving. I do not think it will change position without actually restarting server? I could be wrong.

Ok, but i need no when i restart server. My server no have shutdown everyday, only on Saturday.
I need script when Rashid change position on time 23:59...
 
Ok, but i need no when i restart server. My server no have shutdown everyday, only on Saturday.
I need script when Rashid change position on time 23:59...
The script already do a check every 5 minutes, so, just wait 23:55~00:10 to see the script changing npc pos.

If you want a specif hour, just change the script to work with onTime
 
Back
Top