Orion Spell Timer Loop

Discussion about the technical aspects of scripting. Ask about all issues involving your freelance projects here.
Post Reply
scroft391
Elder Scribe
Posts: 110
Joined: Wed Nov 16, 2016 11:02 am

Orion Spell Timer Loop

Post by scroft391 »

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?
Alibaster in game!!
davethemage
Master Scribe
Posts: 68
Joined: Sun Aug 09, 2020 2:13 pm

Re: Orion Spell Timer Loop

Post 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);
}
IGN: Edwin Roach
scroft391
Elder Scribe
Posts: 110
Joined: Wed Nov 16, 2016 11:02 am

Re: Orion Spell Timer Loop

Post by scroft391 »

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!!
Alibaster in game!!
davethemage
Master Scribe
Posts: 68
Joined: Sun Aug 09, 2020 2:13 pm

Re: Orion Spell Timer Loop

Post by davethemage »

ok great you got it figured out! just one of many functions to do i'm sure.
IGN: Edwin Roach
Post Reply