Need help with a macro you are writing? Ask here!
Moderator: MacroQuest Developers
-
SirCheese
- orc pawn

- Posts: 13
- Joined: Tue Sep 28, 2004 8:02 pm
- Location: Washington DC
Post
by SirCheese » Fri Oct 22, 2004 2:19 pm
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
-
p$
- decaying skeleton

- Posts: 8
- Joined: Sat Oct 16, 2004 10:59 pm
Post
by p$ » Fri Oct 22, 2004 4:05 pm
which part doesnt work?
-
SirCheese
- orc pawn

- Posts: 13
- Joined: Tue Sep 28, 2004 8:02 pm
- Location: Washington DC
Post
by SirCheese » Fri Oct 22, 2004 4:10 pm
/varset focusbeg 1
i get an error when it comes to this point.. will post error when i get home. work is teh suck.
-
p$
- decaying skeleton

- Posts: 8
- Joined: Sat Oct 16, 2004 10:59 pm
Post
by p$ » Fri Oct 22, 2004 4:13 pm
-
Chill
- Contributing Member

- Posts: 435
- Joined: Fri May 07, 2004 5:06 pm
- Location: Erie, PA
Post
by Chill » Fri Oct 22, 2004 4:18 pm
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
-
Fluffy
- a ghoul

- Posts: 81
- Joined: Sun Aug 22, 2004 5:08 pm
Post
by Fluffy » Fri Oct 22, 2004 8:10 pm
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
-
fearless
- Not a Psychic
- Posts: 2684
- Joined: Wed Mar 10, 2004 3:52 pm
Post
by fearless » Fri Oct 22, 2004 9:02 pm
They both do the same thing.
EDIT: Should say "they accomplish the same thing, they are both measurements of time."
Last edited by
fearless on Fri Oct 22, 2004 10:28 pm, edited 1 time in total.
Reading . . . it's not just for me.
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]
-
Chill
- Contributing Member

- Posts: 435
- Joined: Fri May 07, 2004 5:06 pm
- Location: Erie, PA
Post
by Chill » Fri Oct 22, 2004 9:57 pm
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.
-
Dark_Lord_X
- orc pawn

- Posts: 16
- Joined: Fri Oct 01, 2004 5:42 pm
Post
by Dark_Lord_X » Sun Oct 24, 2004 1:59 am
you can set timers to tenths of a second, seconds, or minutes.