Cornwallis
Member
- Joined
- Jan 3, 2010
- Messages
- 480
- Reaction score
- 16
Is there a way that you can make a script to close the ot and then run it again at the same time everyday?
function onThink(cid,interval)
doSetGameState(GAMESTATE_SHUTDOWN)
return false
end
<globalevent name="shutdown" time="21:00" event="script" value="my_script.lua"/>
LUA:function onThink(cid,interval) doSetGameState(GAMESTATE_SHUTDOWN) return false end
LUA:<globalevent name="shutdown" time="21:00" event="script" value="my_script.lua"/>
function onThink(cid,interval)
return doSetGameState(GAMESTATE_SHUTDOWN)
end
LUA:function onThink(cid,interval) return doSetGameState(GAMESTATE_SHUTDOWN) end
ye but shorter thats all I meant manz![]()
function onThink(cid,interval)
return false doSetGameState(GAMESTATE_SHUTDOWN)
end
function onThink(cid, interval) //creaturescripts
its not 5 words shorter since your return is TRUE, the opposite of FALSE.
it would beLUA:function onThink(cid,interval) return false doSetGameState(GAMESTATE_SHUTDOWN) end
that's 1 enter shorter, to be precise.
I think a script would be better because then i can make it so it gives a fair warning that there will be a server shutdown, but ill see what i can do.
function onThink(cid,interval)
doBroadcastMessage('shutdown in 5 minutes.')
return addEvent(onShutdown,5*60*1000)
end
function onShutdown()
return false doSetGameState(GAMESTATE_SHUTDOWN)
end