QUOTE (Vlad @ Sep 16 2009, 07:40 AM)

I could be wrong but timers isn't the best thing to use due to the fact that balance could come at any time due to lag and timers could miss it and not work or hit it but not at the optimal time. The balance thing is exactly what I want/need and that I can do but not sure how best to do it. How do you put it in a queue without having a ton of if statements? You said TODO queue. Is there any tutorials on that? I see a #ADDITEM thing so I might have a look at that and see if I can do something with that.
I made several systems based on this todo stuff, it is how most curing systems work aswell.
Make a database which contains defences which need no equilibrium/balance to put up, and make a database which contains the one which DO need balance/equlibrium. These databases will also contain the command which needs to be executed to get the defence:
bal_equi_defs
cloak - touch cloak
mindseye - touch mindseye
deathsight - deathsight
free_defs
insomnia - insomnia
... - ...
Make an empty variable defqueue
Next is to make a triggers for the def up line for each defence, and make that trigger do #delitem defqueue -defence-
Next make a prompt trigger, which looks up the defqueue variable, and executes the defs which are stored in it, the free ones whenever, and the bal/equi ones whenever you have bal/equi.
Then you use #additem defqueue -defence- to add a certain defence to the queue.
Next you can add several checks/ifs to avoid spamming when you receive lots of prompts, but that's secondary.