Page 1 of 1
Help with code...
Posted: Fri Oct 22, 2004 2:19 pm
by SirCheese
im having problems with this code.. im trying to make im check if he has focus. If not he checks to see if there is a shaman near if there is he ask for focus if not he cast his own buff
Code: Select all
/if (!${Me.Buff[Khura's Focusing].ID} && !${Me.Buff[Focus of Soul].ID} && !${Me.Buff[Focus of the Seventh].ID} && !${Me.Buff[Talisman of Kragg].ID} && !${Me.Buff[Wunshi's Focusing].ID} && !${Me.Buff[Talisman of Wunshi].ID}) {
/if (${focusbeg}==0) {
/if (${NearestSpawn[PC shaman].Distance}<=100) {
/tell ${NearestSpawn[PC shaman]} focus
/timed 300 /varset focusbeg 0
/varset focusbeg 1
}
}
}
any advice / suggestions would be appraciated
Thanks
Posted: Fri Oct 22, 2004 4:05 pm
by p$
which part doesnt work?
Posted: Fri Oct 22, 2004 4:10 pm
by SirCheese
/varset focusbeg 1
i get an error when it comes to this point.. will post error when i get home. work is teh suck.
Posted: Fri Oct 22, 2004 4:13 pm
by p$
Posted: Fri Oct 22, 2004 4:18 pm
by Chill
Code: Select all
/declare c int outer 0
/declare focusbeg timer outer 0
...
/for c 1 to 20
/if (${Me.Buff[${c}].Name.Find["focus"]}) /goto :focused
/next c
/if (!${focusbeg} && ${NearestSpawn[pc shaman].Distance}<=100) {
/tell ${NearestSpawn[pc shaman].Name} focus please
/varset focusbeg 300
}
:focused
Posted: Fri Oct 22, 2004 8:10 pm
by Fluffy
Chill wrote:Code: Select all
/declare c int outer 0
/declare focusbeg timer outer 0
...
/for c 1 to 20
/if (${Me.Buff[${c}].Name.Find["focus"]}) /goto :focused
/next c
/if (!${focusbeg} && ${NearestSpawn[pc shaman].Distance}<=100) {
/tell ${NearestSpawn[pc shaman].Name} focus please
/varset focusbeg 300
}
:focused
Wouldnt it be better to use the built in information of time for a timer varible? Example
Posted: Fri Oct 22, 2004 9:02 pm
by fearless
They both do the same thing.
EDIT: Should say "they accomplish the same thing, they are both measurements of time."
Posted: Fri Oct 22, 2004 9:57 pm
by Chill
I left the timer at what Cheese set it at because its a fairly trivial detail that he should be able to edit himself to whatever he wants.
But since you bring it up Fluffy, I believe timers are in 10ths of a second, so 300 = 30s, not 3m. You might have assumed it was seconds, but 300 seconds would be 5 min. I guess you could have thought they were in ticks, but 300 ticks would be 30min, so Im not sure where you are getting the 3min from /boggle. At any rate it is not the same thing.
Anyway its fairly irrelevant to the rest of the code so not gonna dwell any longer.
Posted: Sun Oct 24, 2004 1:59 am
by Dark_Lord_X
you can set timers to tenths of a second, seconds, or minutes.