Deprecated Server Script Functions - po-devs/pokemon-online GitHub Wiki
Scripting/Server/Functions/Deprecated
These functions are old and shouldn't be used, but they are kept so old scripts continues to work.
Deprecated timer functions
sys.setTimer
, sys.unsetTimer
, and sys.unsetAllTimers
do everything this massive conglomerate of functions did.
sys.callLater(script, seconds)
runs the script given in parameter seconds later.sys.callQuickly(script, milliseconds)
works likecallLater()
but accepts milliseconds as parameter instead of seconds. Don't overdo it.sys.delayedCall(func, seconds)
works likecallLater()
but accepts a function without arguments as a first parameter instead of a string.sys.quickCall
sys.intervalTimer
sys.intervalCall
sys.stopTimer
Deprecated settings functions
On windows, storing things in the registry is not a good idea, all servers on a username share this namespace! At least on other operating system's it's stored in a file, but this isn't guaranteed!
The current, non-deprecated functions all start with a new argument filename
which is the file used to store the configuration settings.
sys.getVal(key)
returns the variable stored in the registry with that key.sys.saveVal(key, value)
saves a variable in the registry so it'll still be there after a server restart.sys.getValKeys()
returns an array of keys stored (without values) in the registry.sys.removeVal(key)
deletes the variable in the registry.
Duplicate functions
Functions that for some reason already exist under another name.
sys.getServerPlugins()
sys.addPlugin(const QString &path)