I own made a script for my acc with 4 knights to swap once a day, so it relogs quite a few times to train the characters at the trainers and gets the next character into hunt.
The script is working fine, unless one thing.
To create this script, I used some actions at the Setup, to change the character names and make the relogs, and it is changing basically using the time() and date() functions.
let me an example of what I mean. Lets suppose I come from hunt at 14:40 with CharacterA (first char on the account) and I want to train it, so I train CharacterA, then connect CharacterC and train it. Same with CharacterD. Finally i login on CharacterB to go hunt.
I made a lot of 'if else if else if else if' to put 4 days on it, so it change all the account. (I dont know how to use arrays or loops correctly yet).
if ((time() > '14:40:00') and (date() == '13/02/2014')) or ((time() < '14:40:00') and (date() == '14/02/2014')) then
Char1 = 'CharacterC'
Char2 = 'CharacterD'
Char3 = 'CharacterB'
After depot, i got a Action checking if my name (Current one) is the same as Char3 (the one i should relog to, CharacterB). if it is same name, it goes hunt. if it is different name, it should trigger the trainer waypoints.
All of this works, but with one trouble.
As the change on the names is done in setup, it doesn't refresh the setup along the time, so It doesn't change the name at all, unless I open it, which is the only way it refresh and works.
Is there any way to refresh the Setup? I tried to updateworld() (at Setup, as a independent action at List, at the Waypoints,etc... ) but it doesn't make Setup refresh.)
If that's not possible, can someone help me on it?