ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: kdzhii on June 05, 2013, 11:38:26 PM

Title: timer.
Post by: kdzhii on June 05, 2013, 11:38:26 PM
hey guys. whats a nice way to create a script based on a timer?
i`m playing the old sphere and a nice way to farm money with a mage is by killing monsters in polymorph form. After its casted, it lasts about 10 minutes, so i need to create a timer. I`m planning that script will include a couple of things like 2 healing methods to keep myself alive, drinking refresh potions, invisibility potions if HP gets low. I just don`t know how to still update a timer constantly besides fighting monsters and healing myself ;<
thankss.
Title: Re: timer.
Post by: Crome969 on June 06, 2013, 12:58:31 AM
hey guys. whats a nice way to create a script based on a timer?
i`m playing the old sphere and a nice way to farm money with a mage is by killing monsters in polymorph form. After its casted, it lasts about 10 minutes, so i need to create a timer. I`m planning that script will include a couple of things like 2 healing methods to keep myself alive, drinking refresh potions, invisibility potions if HP gets low. I just don`t know how to still update a timer constantly besides fighting monsters and healing myself ;<
thankss.

Normal i would say use Datetime.Now + delay. In easyuo you could use http://wiki.easyuo.com/index.php?title=SCnt2 or http://wiki.easyuo.com/index.php?title=SCnt and then add 10 * 60 * 10 for scnt2 or 10*60 for scnt to the current represented value. So you will have a value in future wich will step in after 10 Minutes. Script sided you can just run your script and check in some intervals if #scnt or #scnt2 got bigger than your saved value ( this would mean you reached 10 Minutes ).
Title: Re: timer.
Post by: kdzhii on June 06, 2013, 03:19:28 AM
thanks. did as u say. works :)
Title: Re: timer.
Post by: Crome969 on June 06, 2013, 04:47:10 AM
thanks. did as u say. works :)

No Problem. Thats how a community works :-) Give and take..
Title: Re: timer.
Post by: Alpha on June 06, 2013, 05:02:08 AM
A Timer is a good way to go, but if there are any other "differences" that the new polymorph form gives your character you could watch for those & Re-cast if you don't find what you like.   I know wraith form changes your resistance values for an example so I could just check those values and when they aren't what they should be for wraith form you know the your human again etc.
Title: Re: timer.
Post by: Crome969 on June 06, 2013, 06:05:21 AM