Global Functions and Variables
This document details all of the global functions and variables built into the buscript engine.
Global Functions
runWhenOnline
void runWhenOnline(String script, String target)
- This function will run the given script on the given target either immediately, if they are online, or as soon as they first come online.
- usage: runWhenOnline("reward.txt", "%target%")
Global Variables
Generally, these variables allow for much more advanced scripts to be created.
username
username
- This variable will contain the username of the person who voted. This works similarly to the target variable.
- This may be used in a string as %username%.
- This will have to be used in place of "%username%" for everything outside of the functions listed above.
address
address
- This variable will contain the address of the person who voted.
- This may be used in a string as %address%.
- This will have to be used in place of "%address%" for everything outside of the functions listed above.
service
service
- This variable will contain the name of the service the person voted through. (Minestatus for instance)
- This may be used in a string as %service%.
- This will have to be used in place of "%service%" for everything outside of the functions listed above.
timestamp
timestamp
- This variable will contain the timestamp for the time the person voted.
- This may be used in a string as %timestamp%.
- This will have to be used in place of "%timestamp%" for everything outside of the functions listed above.
Does runWhenOnline even work because it says to me: runWhenOnline is not defined
@Samistine
Same, although I am running a 1.5.2 server and a 1.7.10 server. On the 1.5.2 server (same votifier and scripts) it works fine but on 1.7.10 it gives an error about it not being defined.