Page 1 of 1
Orion Spell Timer Loop
Posted: Tue Nov 08, 2022 1:35 am
by Alibaster
I'm very green when it comes to scripting. I'm looking for a timer so I can loop a spell like Consecrate Weapon. I have the basic script to cast the spell but it only does it once. How do I look it every 10 seconds or so?
Re: Orion Spell Timer Loop
Posted: Thu Nov 10, 2022 11:14 pm
by davethemage
Something like this should work. (note Orion.Wait(1000) is approx 1 second)
while (!Player.Dead() )
{
//do whatever you want
Orion.Wait(10000);
}
Re: Orion Spell Timer Loop
Posted: Fri Nov 11, 2022 2:23 am
by Alibaster
Thanks but I'm lost on how to apply the time so the spell will loop every 10 seconds. this is what I am working with. Where do i add the timer?
function Consecrate(){
Orion.Cast('203');{
Orion.Wait(500);
}
}
Fairly basic script and it will fire off the spell one time and stop. I need to put it on a 10 second loop. Sorry for being so dense.
Update: I figured it out:
function Consecrate(){
while (!Player.Dead() ){
Orion.Cast('203');{
Orion.Wait(10000);
}
}
}
Thank you for the help. This is great!!
Re: Orion Spell Timer Loop
Posted: Fri Nov 11, 2022 4:57 am
by davethemage
ok great you got it figured out! just one of many functions to do i'm sure.