Need help running MacroQuest2? Ask your questions about how to get things to work on your computer.
Moderator: MacroQuest Developers
-
Arangar
- orc pawn

- Posts: 14
- Joined: Tue Aug 26, 2003 3:59 pm
Post
by Arangar » Thu Nov 25, 2004 5:29 pm
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?
-
aChallenged1
- a grimling bloodguard

- Posts: 1804
- Joined: Mon Jun 28, 2004 10:12 pm
Post
by aChallenged1 » Thu Nov 25, 2004 7:33 pm
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.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!
-
TheWarden
- a hill giant

- Posts: 253
- Joined: Sat Dec 27, 2003 3:51 pm
- Location: In your bushes...
Post
by TheWarden » Thu Nov 25, 2004 9:52 pm
Post the entire macro... Can't really help ya otherwise.
[img]http://img.photobucket.com/albums/v629/Deevious/SigPics/KristinKreukSig01.jpg[/img]
-
dont_know_at_all
- Developer

- Posts: 5450
- Joined: Sun Dec 01, 2002 4:15 am
- Location: Florida, USA
-
Contact:
Post
by dont_know_at_all » Fri Nov 26, 2004 12:34 am
It's a wonder you didn't get disconnected. You might want to give some processor time to eq by using /delay statements.
-
Arangar
- orc pawn

- Posts: 14
- Joined: Tue Aug 26, 2003 3:59 pm
Post
by Arangar » Fri Nov 26, 2004 4:13 am
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.
-
Arangar
- orc pawn

- Posts: 14
- Joined: Tue Aug 26, 2003 3:59 pm
Post
by Arangar » Fri Nov 26, 2004 4:16 am
btw, tired adding just /delay 1s and that didnt do anything (that is, it just ran through again, not looping)
-
p$
- decaying skeleton

- Posts: 8
- Joined: Sat Oct 16, 2004 10:59 pm
Post
by p$ » Fri Nov 26, 2004 5:33 am
are you sure its not actually running, and the "macro has ended" message you are seeing coming from ending the previous macro?
-
Arangar
- orc pawn

- Posts: 14
- Joined: Tue Aug 26, 2003 3:59 pm
Post
by Arangar » Fri Nov 26, 2004 1:12 pm
yes, i do a /echo something to "see where the last one ended"
-
Chill
- Contributing Member

- Posts: 435
- Joined: Fri May 07, 2004 5:06 pm
- Location: Erie, PA
Post
by Chill » Fri Nov 26, 2004 1:44 pm
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