Page 1 of 5
hmm, goto not processing if no commands in loop
Posted: Thu Nov 25, 2004 5:29 pm
by Arangar
I want a simple macro, that all it does is respond to tells...so all my code pretty much is in the Event_Chat()...
...now this code:
Code: Select all
Sub Main
...
| main loop just process events
:Main_loop
/doevents
/goto :Main_loop
/return
Now, when I /macro this in EQ, I immidiatly get a macro has unloaded message, instead of the loop I expect...some experimenting leads me to that I need to add some commands in there to make it work:
Code: Select all
Sub Main
....
| main loop just process events
:Main_loop
/doevents
/target playerchar1
/target playerchar2
/doevents chat
/goto :Main_loop
/return
Now, this one does run my chat processing...however the selecting creates some anoying blinking that I really dont want in there....anyone got any ideas?
Posted: Thu Nov 25, 2004 7:33 pm
by aChallenged1
no includes, no events described... I just don't know what the problem could be.
Never expect helpful answers if you don't give enough information.
Posted: Thu Nov 25, 2004 9:52 pm
by TheWarden
Post the entire macro... Can't really help ya otherwise.
Posted: Fri Nov 26, 2004 12:34 am
by dont_know_at_all
It's a wonder you didn't get disconnected. You might want to give some processor time to eq by using /delay statements.
Posted: Fri Nov 26, 2004 4:13 am
by Arangar
that is pretty much the entire macro, but ok, here we go:
Code: Select all
| Healer and Buffer auto responder
#Chat Tell
#Chat chat
Sub Main
| declare spell names
/declare SpellCHeal outer "Complete Healing"
/declare SpellQHeal outer "Supernal Light"
/declare SpellDHeal outer "Supernal Elixir"
/declare SpellBuffAego outer "Virtue"
/declare SpellNuke outer "Order"
/declare SpellRDS outer "Mark of the Righteous"
/declare SpellSetBuffs outer "heal+buff"
/declare SpellSetNukes outer "heal+nuke"
| main loop just process events
:Main_loop
/doevents
/goto :Main_loop
/return
Sub Event_Chat(string ChatType,string ChatSender,string ChatText)
/echo ChatType
/echo ChatSender
/echo ChatText
| ignore non tells and non group messages
/if (!${ChatType.Equal[GROUP]} && !${ChatType.Equal[TELL]}) /return
| do a compete heal
/if (${ChatText.Equal[cheal]} || ${ChatText.Equal[cheal me]}) {
/target pc ${ChatSender}
/if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) {
/tell ${ChatSender} ${SpellCHeal} is incomming !!
/call cast ${SpellCHeal}
}
/return
}
| do a quick heal
/if (${ChatText.Equal[qheal]} || ${ChatText.Equal[qheal me]}) {
/target pc ${ChatSender}
/if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) {
/tell ${ChatSender} ${SpellQHeal} is incomming !!
/call cast ${SpellQHeal}
}
/return
}
| do a dot heal
/if (${ChatText.Equal[dheal]} || ${ChatText.Equal[dheal me]}) {
/target pc ${ChatSender}
/if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) {
/tell ${ChatSender} ${SpellDHeal} is incomming !!
/call cast ${SpellDHeal}
}
/return
}
| switch to buffs
/if (${ChatText.Equal[membuffs]}) {
/memspellset ${SpellSetBuffs}
/return
}
| switch to nukes
/if (${ChatText.Equal[memnukes]}) {
/memspellset ${SpellSetNukes}
/return
}
| buff
/if (${ChatText.Equal[buff]}) {
/target pc ${ChatSender}
/if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) {
/tell ${ChatSender} Buffs are incomming !!
/call cast ${SpellBuffAego}
}
/return
}
| nuke
/if (${ChatText.Equal[nuke]}) {
/assist ${ChatSender}
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=100) {
/call cast ${SpellNuke}
/tell ${ChatSender} %T is beeing nuked with ${SpellNuke} !!
}
/return
}
| DS / reverse DS
/if (${ChatText.Equal[ds]}) {
/assist ${ChatSender}
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=100) {
/call cast ${SpellRDS}
/tell ${ChatSender} %T is beeing reverse DS:ed with ${SpellRDS} !!
}
/return
}
/return
Yes, I know that it wont cast the spells as it is now (need to include that functionallity)...but if I had the above target code, it works fine (until it tries to cast a spell

)...but the above code just runs to end.
Posted: Fri Nov 26, 2004 4:16 am
by Arangar
btw, tired adding just /delay 1s and that didnt do anything (that is, it just ran through again, not looping)
Posted: Fri Nov 26, 2004 5:33 am
by p$
are you sure its not actually running, and the "macro has ended" message you are seeing coming from ending the previous macro?
Posted: Fri Nov 26, 2004 1:12 pm
by Arangar
yes, i do a /echo something to "see where the last one ended"
Posted: Fri Nov 26, 2004 1:44 pm
by Chill
Okay, add the delay to your loop; people have found problems with loops that run too fast. Add variable types. You dont need quotes when you declare a string variable with a default value, but you do need them when you /call cast "some spell". #include a spell cast inc if youre going to /call cast spells. And, double check this logic:
Code: Select all
/if (!${ChatType.Equal[GROUP]} && !${ChatType.Equal[TELL]}) /return
Try this:
Code: Select all
| Healer and Buffer auto responder
#Chat Tell
#Chat chat
#include Spell_Routines.inc
Sub Main
| declare spell names
/declare SpellCHeal string outer Complete Healing
/declare SpellQHeal string outer Supernal Light
/declare SpellDHeal string outer Supernal Elixir
/declare SpellBuffAego string outer Virtue
/declare SpellNuke string outer Order
/declare SpellRDS string outer Mark of the Righteous
/declare SpellSetBuffs string outer heal+buff
/declare SpellSetNukes string outer heal+nuke
| main loop just process events
:MainLoop
/doevents
/delay 1
/goto :MainLoop
/return
Sub Event_Chat(string ChatType,string ChatSender,string ChatText)
/echo ChatType
/echo ChatSender
/echo ChatText
| ignore non tells and non group messages
/if (${ChatType.NotEqual[GROUP]} && ${ChatType.NotEqual[TELL]}) /return
| do a compete heal
/if (${ChatText.Find[cheal]}) {
/target pc ${ChatSender}
/if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) {
/tell ${ChatSender} ${SpellCHeal} is incomming !!
/call cast "${SpellCHeal}"
}
/return
}
| do a quick heal
/if (${ChatText.Find[qheal]}) {
/target pc ${ChatSender}
/if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) {
/tell ${ChatSender} ${SpellQHeal} is incomming !!
/call cast "${SpellQHeal}"
}
/return
}
| do a dot heal
/if (${ChatText.Find[dheal]}) {
/target pc ${ChatSender}
/if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) {
/tell ${ChatSender} ${SpellDHeal} is incomming !!
/call cast "${SpellDHeal}"
}
/return
}
| switch to buffs
/if (${ChatText.Find[membuffs]}) {
/memspellset "${SpellSetBuffs}"
/return
}
| switch to nukes
/if (${ChatText.Find[memnukes]}) {
/memspellset "${SpellSetNukes}"
/return
}
| buff
/if (${ChatText.Find[dobuffs]}) {
/target pc ${ChatSender}
/if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) {
/tell ${ChatSender} Buffs are incomming !!
/call cast "${SpellBuffAego}"
}
/return
}
| nuke
/if (${ChatText.Find[nukethis]}) {
/assist ${ChatSender}
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=100) {
/call cast "${SpellNuke}"
/tell ${ChatSender} " %T is beeing nuked with ${SpellNuke} !!"
}
/return
}
| DS / reverse DS
/if (${ChatText.Find[rds]}) {
/assist ${ChatSender}
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=100) {
/call cast "${SpellRDS}"
/tell ${ChatSender} " %T is beeing reverse DS:ed with ${SpellRDS} !!"
}
/return
}
/return
Re: hmm, goto not processing if no commands in loop
Posted: Mon Mar 03, 2025 11:55 pm
by xyilla
Re: hmm, goto not processing if no commands in loop
Posted: Mon Mar 03, 2025 11:56 pm
by xyilla
Re: hmm, goto not processing if no commands in loop
Posted: Mon Mar 03, 2025 11:58 pm
by xyilla
Re: hmm, goto not processing if no commands in loop
Posted: Mon Mar 03, 2025 11:59 pm
by xyilla
Re: hmm, goto not processing if no commands in loop
Posted: Tue Mar 04, 2025 12:00 am
by xyilla
Re: hmm, goto not processing if no commands in loop
Posted: Tue Mar 04, 2025 12:01 am
by xyilla