• 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!

2 function requests...

Colandus

Advanced OT User
Senator
Joined
Jun 6, 2007
Messages
2,434
Solutions
19
Reaction score
219
Location
Sweden
Heylo, I'd like these functions:

Edit: Only one function necessary ^.-

setLoginStatus(access) -- if access = nil, then NOBODY can login, if it's not nil, only players with that access and above may login. If this script is executed while the server is online, the players under that access will be kicked!

example:
PHP:
broadcastMessage("Server will close in 5 minutes, and open again after 10 minutes.")
addEvent(close, 5*60*1000, nil)

function close()
    setLoginStatus()
    addEvent(open, 5*60*1000, nil)
end
function open()
    setLoginStatus(0)
end


wierd name of function but w/e
 
Just make a luaFunction which set the GAME_STATE to CLOSED and other to NORMAL

closeServer() and openServer()
 
Just make a luaFunction which set the GAME_STATE to CLOSED and other to NORMAL

closeServer() and openServer()
Or better, the setGameState() itself on Lua, just be sure to run it under the dispatcher thread.
 
The access param won't do any big difference right now, mainly because it's a boolean. However this will be changed in 0.3 where we will dump the account type system now that accounts has group_ids which we will make use of, so it's possible that we will introduce something similar to your idea in the 0.3 release if we find it useful.
 
It's not a boolean, it's well... "Group Id", then!

Read my whole post ;>
 
Back
Top Bottom