EQBC and Events
Just curious, if this happens to be posted somewhere i am sorry for a re post on this topic. i have not seemed to find it thou.
I am wondering, will a #event include EQBC/MQ2 chat box?
so lets say i have
#event XXX "/Echo chat here"
and i have
Sub Event_XXX
do these
/return
Will that actually work? And, can it read a /popup as a event as well?
Or, is there a easier way of doing it? I wondering mostly cause "/g" "/rsay" "/t" chat type of events i find that (maybe just me and a bit of lag) sometimes they are not read. and so the "event" never happens.
Also, im wondering how i could have a heal script look at raid members not just group members.
Is it possible to have it determine if your "target" is in a melee.combat state? IE. Target my tank. is the tank attacking? if so... do this, if not do this... kinda deal.
Does anyone know what the "state" of a looting player is?
i know i have seen it somewhere. but what is the best way to see if a group member is in zone with you? IE... Healing script trying to heal a player that is not in zone. so it count. cast heal. Vs it seeing that char is not in zone to bypass it, or even during "Targeting events" if sender is not in the same zone then to ignore that cmd to target said thing.
Much thanks for any help on these questions and others that i have had.
Wed May 21, 2014 9:00 am
#Event looks in any chat box, including the MQ2 chat box and any other chat boxes.
I don't think #event looks at a popup but I can't say for sure. If you have the power to send a popup to that character, you can send an /echo which is the better method (fewer false positives and false negatives if properly written).
#Events can be tricksy when you first work with them. Little things can make a big difference. Post the #event line and Sub Event_XXX. Also, your macro must be written properly to catch all #events that occur. There is a time limit between when a trigger hits the chat box and when a /doevents must run or else the event fizzles. Do you have enough /doevents in your macro?
Proper format to look in your MQ2 chat box:
#event myevent "[MQ2] blahblahblah"
Use NetBots to look at the HP of raid members. Assuming they are your bots. If they are other players/characters, then you have to target each one manually, wait for the HP to refresh, then decide whether or not to heal.
NetBots can let your cleric know when the tank is in combat. It should. I seem to remember someone having an issue with it in the past.
Looting is the same graphic as ducking. I think. And/or bind wound. To check, loot something then /echo ${Me.State}
There are lots of ways. Which way works best depends on what you are trying to do. In general, try to find the spawn ID of the entity in question. If you have the spawn ID (non-null and non-zero number), they are in the same zone as you. Or use NetBots.
${Group.Member[X].Spawn.ID}
${Raid.Member[X].Spawn.ID}
${Spawn[=name].ID}
${NetBots[name].InZone}
I don't think #event looks at a popup but I can't say for sure. If you have the power to send a popup to that character, you can send an /echo which is the better method (fewer false positives and false negatives if properly written).
#Events can be tricksy when you first work with them. Little things can make a big difference. Post the #event line and Sub Event_XXX. Also, your macro must be written properly to catch all #events that occur. There is a time limit between when a trigger hits the chat box and when a /doevents must run or else the event fizzles. Do you have enough /doevents in your macro?
Proper format to look in your MQ2 chat box:
#event myevent "[MQ2] blahblahblah"
Use NetBots to look at the HP of raid members. Assuming they are your bots. If they are other players/characters, then you have to target each one manually, wait for the HP to refresh, then decide whether or not to heal.
NetBots can let your cleric know when the tank is in combat. It should. I seem to remember someone having an issue with it in the past.
Looting is the same graphic as ducking. I think. And/or bind wound. To check, loot something then /echo ${Me.State}
i know i have seen it somewhere. but what is the best way to see if a group member is in zone with you? IE... Healing script trying to heal a player that is not in zone. so it count. cast heal. Vs it seeing that char is not in zone to bypass it, or even during "Targeting events" if sender is not in the same zone then to ignore that cmd to target said thing.
There are lots of ways. Which way works best depends on what you are trying to do. In general, try to find the spawn ID of the entity in question. If you have the spawn ID (non-null and non-zero number), they are in the same zone as you. Or use NetBots.
${Group.Member[X].Spawn.ID}
${Raid.Member[X].Spawn.ID}
${Spawn[=name].ID}
${NetBots[name].InZone}
Wed May 21, 2014 5:44 pm
Senior Project Member
Wow. Thanks for all the useful info.
Yes. "[MQ2] insert the /echo line" for a #event Working Great.
I had them set up as each event in a "/g" event1 of Event X, "/t" event2 of Event X, and "/rsay" as event3 of Event X. and that's what I think was happening, It was running through to many events and "fizzling" them due to time out factor (roughly 10 events, in 3x ways, so roughly 30 events it was looking for).
I have 4 different area's where it is calling the /doevents cmd.
once in Idle (awaiting further cmds), once before it enters combat, during combat, and once while in "Paused" (free action) mode.
here is a quick look at the /call to heals that i have setup. i have not tested. but in theory they should work, right?
sub healgroup
/for count_grp 0 to ${Group}
/if (${Group.Member[${count_grp}].PctHPs} == 0) /next count_grp
/if (${Group.Member[${count_grp}].PctHPs} < 60) {
/target ${Spawn[pc ${Group.Member[${count_grp}].Name}]}
/delay 2
/Casting "InputSpellName" Gem1 -maxtries|3
}
/next count_grp
/return
sub healraid
/for count_Rd 0 to ${Raid}
/if (${Group.Member[${count_Rd}].PctHPs} == 0) /next count_grp
/if (${Group.Member[${count_Rd}].PctHPs} < 60) {
/target ${Spawn[pc ${Raid.Member[${count_rd}].Name}]}
/delay 2
/Casting "InputSpellName" Gem2 -maxtries|3
}
/next count_Rd
/return
quick look at a event
#Event Report "[MQ2] #*#report#*#"
Sub Event_Report
/bct ${AssistCleanName} //Echo ${Me.PctHPs}
/bct ${AssistCleanName} //Echo ${Zone}
/return
That event is working Great for me. thanks for the heads up on that.
i will have to look into the NetBots for healing if that above /call doesnt do the job. Will also try the ${Me.State} to see what it returns.
will also play around with the technique i need for determining the "InZone" aspect of targeting. Always worried about a guy that is in another zone taken to /target "something" and run to it. and die along the way when all i wanted is the main guys to hail a buff NPC lol.
Again, thanks for helpful info and will count to learn more as i post up more.
Yes. "[MQ2] insert the /echo line" for a #event Working Great.
I had them set up as each event in a "/g" event1 of Event X, "/t" event2 of Event X, and "/rsay" as event3 of Event X. and that's what I think was happening, It was running through to many events and "fizzling" them due to time out factor (roughly 10 events, in 3x ways, so roughly 30 events it was looking for).
I have 4 different area's where it is calling the /doevents cmd.
once in Idle (awaiting further cmds), once before it enters combat, during combat, and once while in "Paused" (free action) mode.
here is a quick look at the /call to heals that i have setup. i have not tested. but in theory they should work, right?
sub healgroup
/for count_grp 0 to ${Group}
/if (${Group.Member[${count_grp}].PctHPs} == 0) /next count_grp
/if (${Group.Member[${count_grp}].PctHPs} < 60) {
/target ${Spawn[pc ${Group.Member[${count_grp}].Name}]}
/delay 2
/Casting "InputSpellName" Gem1 -maxtries|3
}
/next count_grp
/return
sub healraid
/for count_Rd 0 to ${Raid}
/if (${Group.Member[${count_Rd}].PctHPs} == 0) /next count_grp
/if (${Group.Member[${count_Rd}].PctHPs} < 60) {
/target ${Spawn[pc ${Raid.Member[${count_rd}].Name}]}
/delay 2
/Casting "InputSpellName" Gem2 -maxtries|3
}
/next count_Rd
/return
quick look at a event
#Event Report "[MQ2] #*#report#*#"
Sub Event_Report
/bct ${AssistCleanName} //Echo ${Me.PctHPs}
/bct ${AssistCleanName} //Echo ${Zone}
/return
That event is working Great for me. thanks for the heads up on that.
i will have to look into the NetBots for healing if that above /call doesnt do the job. Will also try the ${Me.State} to see what it returns.
will also play around with the technique i need for determining the "InZone" aspect of targeting. Always worried about a guy that is in another zone taken to /target "something" and run to it. and die along the way when all i wanted is the main guys to hail a buff NPC lol.
Again, thanks for helpful info and will count to learn more as i post up more.
Wed May 21, 2014 9:21 pm
If you use /casting, you don't need to pre-target (which means you also get to eliminate the following /delay as well). Use the -targetid option.
You're raid healing sub won't work correctly. You're using a raid index number to find group members. If 7 players are in the raid, the sub will eventually try to find the 7th group member. And fail. You can't use Group.Member for raid stuff.
You're raid healing sub won't work correctly. You're using a raid index number to find group members. If 7 players are in the raid, the sub will eventually try to find the 7th group member. And fail. You can't use Group.Member for raid stuff.
Thu May 22, 2014 9:11 pm
Senior Project Member
Yes, Noticed that as well with the error in the raid healing and corrected.
Can a Variable be passed through a event? it seems to lose the value of the variable when passed into a event
Like this,
Sub Event_Death
/bct ${AssistCleanName} //Echo ${Me.CleanName} I have Died.
/return
the varible is declared inside the MainLoop
/Declare AssistCleanName str outer ${Target.CleanName}
the varaible is working fine in the main loop but when passed to a Event it seems to not have a value and so the Event fails to work properly.
Also, been doing some trials on Memorizing spell sets after death. With no luck. And im wondering if there was just a way to check to see if a spell gem was ready to cast. but i cant seem to get
/if (!${SpellGem[9].Ready}) /loadspell R
Yes, All my casters have spell gem 9 as a spell IF the spells sets are memorized
is there some other way to see if there spells are memorized?
Can a Variable be passed through a event? it seems to lose the value of the variable when passed into a event
Like this,
Sub Event_Death
/bct ${AssistCleanName} //Echo ${Me.CleanName} I have Died.
/return
the varible is declared inside the MainLoop
/Declare AssistCleanName str outer ${Target.CleanName}
the varaible is working fine in the main loop but when passed to a Event it seems to not have a value and so the Event fails to work properly.
Also, been doing some trials on Memorizing spell sets after death. With no luck. And im wondering if there was just a way to check to see if a spell gem was ready to cast. but i cant seem to get
/if (!${SpellGem[9].Ready}) /loadspell R
Yes, All my casters have spell gem 9 as a spell IF the spells sets are memorized
is there some other way to see if there spells are memorized?
Mon Jun 02, 2014 10:11 am
Yes, variables can be used in events (what your code is doing). Yes, variables can be passed to events (what you asked but not what your code is doing).
If it seems to lose a value, find out where.
Sub Event_Death
/bca //echo AssistCleanName=${AssistCleanName}
/bct ${AssistCleanName} //Echo ${Me.CleanName} I have Died.
/bca //echo ${Me.CleanName} I have Died.
/return
Use the /bca lines in your mainloop as well and look for differences.
You didn't post your #event blahblahblah line so I'm assuming it's correct.
The MQ2Cast plugin has it's own checks for spell ready. MQ2Cast also has ${Cast.Status} which can return lots of info such as casting, memorizing, waiting for items to swap, or idling and awaiting a cast command.
Be aware that if you are using custom spells on a custom server, none of the commonly known methods may work for you. Try a generic spell common to all servers (gate).
While you may not be able to detect Cast.Ready, you should still be able to look at the spell name/ID of any spell in any spellgem slot: ${Me.Gem[9].ID}.
If it seems to lose a value, find out where.
Sub Event_Death
/bca //echo AssistCleanName=${AssistCleanName}
/bct ${AssistCleanName} //Echo ${Me.CleanName} I have Died.
/bca //echo ${Me.CleanName} I have Died.
/return
Use the /bca lines in your mainloop as well and look for differences.
You didn't post your #event blahblahblah line so I'm assuming it's correct.
Also, been doing some trials on Memorizing spell sets after death. With no luck. And im wondering if there was just a way to check to see if a spell gem was ready to cast. but i cant seem to get
/if (!${SpellGem[9].Ready}) /loadspell R
Yes, All my casters have spell gem 9 as a spell IF the spells sets are memorized
is there some other way to see if there spells are memorized?
The MQ2Cast plugin has it's own checks for spell ready. MQ2Cast also has ${Cast.Status} which can return lots of info such as casting, memorizing, waiting for items to swap, or idling and awaiting a cast command.
Be aware that if you are using custom spells on a custom server, none of the commonly known methods may work for you. Try a generic spell common to all servers (gate).
While you may not be able to detect Cast.Ready, you should still be able to look at the spell name/ID of any spell in any spellgem slot: ${Me.Gem[9].ID}.
Mon Jun 02, 2014 8:37 pm
Senior Project Member
Sorry was not in front of the script when posting it. So, was taken it off memory.
here is the full event
#Event Dead "#*#Returning to home point#*#"
Sub Event_Dead
/Varset Pause TRUE
/Varset Combat FALSE
/Varset CombatDone TRUE
/Varset Enragepause FALSE
/delay 1s
/bct ${AssistCleanName} //Echo ${Me.CleanName} Down!!
/return
the values of the /varsets are being passed back to mainloop correctly
But, The ${AssistCleanName} variable is not maken it to the event.
I will post the Full macro in the GOLD members area so u can see the entirty of it. Posting the questions in public so that others may benifit from the conversation. would like to keep the actual macro to the GOLD members if thats alright with everyone.
Link to mac
http://mqemulator.net/forum2/viewtopic.php?p=6173#6173
here is the full event
#Event Dead "#*#Returning to home point#*#"
Sub Event_Dead
/Varset Pause TRUE
/Varset Combat FALSE
/Varset CombatDone TRUE
/Varset Enragepause FALSE
/delay 1s
/bct ${AssistCleanName} //Echo ${Me.CleanName} Down!!
/return
the values of the /varsets are being passed back to mainloop correctly
But, The ${AssistCleanName} variable is not maken it to the event.
I will post the Full macro in the GOLD members area so u can see the entirty of it. Posting the questions in public so that others may benifit from the conversation. would like to keep the actual macro to the GOLD members if thats alright with everyone.
Link to mac
http://mqemulator.net/forum2/viewtopic.php?p=6173#6173
Wed Jun 04, 2014 1:09 am
My previous reply still stands. Add extra debugging /echos to Event_Dead and show the results.
Wed Jun 04, 2014 1:58 pm
Senior Project Member
Ok, so after much testing, Including... but not limited to...
1. Tried to add a long delay inside the event to make the char already be loaded into the new zone before trying to send the info to the ${AssistCleanName} - FAILED
2. Rechecked that that ${AssistCleanName} variable IS being set right. Inside the Paused/Unpaused states of the main loop. - Success
3. Redid WHAT the event would look at. made it just look for
#Event Dead "#*#Returning to#*#"
This also failed.
4. Tied the event into another Event labeled the same #Event Dead
but also made it look at "#*#You have been knocked unconscious#*#" -- FAILED
5. Did the /Echo ${AssistCleanName} inside the Event, Came up as NULL values.
also, added a /echo before and after the /DoEvents inside the loops. they ARE correct.
This is Truely baffling to me...
Could it be that if the char is in a zone action that things just dont pass right for anything that was called while zoneing? Could my /varsets actually be passed throu the event of NewZone? And that is why it behaves as thou it is working as intended?
Sub Event_NewZone
/Varset Pause TRUE
/Varset Combat FALSE
/Varset CombatDone TRUE
/Varset Enragepause FALSE
/bct ${AssistCleanName} //Echo New Zone Detected "${Zone}"
/Squelch /Attack Off
/return
since, both are passing the same values for the /varset?
also, if i put a name of say my tank in there. Who usually is set as the ${AssistCleanName} it works fine. But, i want to be able to make this versatile and not have to edit it every time i want to change my main assist...
Also, Is there a way to have one char (say my tank) tell a char to reply with a variable set? instead of haveing in a macro? say, in a hotkey? something like, but i know this doesnt work (but, may jsut get the point of what im looking for across) /bct VariblecharName //Bct MainCharsName //Echo This is what ${VARIBLEX} is?
Stuff like this makes me want to retry Modbot, but i just dont like it!!!
And Yes, i have it running fine if i remove all The ${AssistCleanName} and replace with CHARNAME i want it to respond to. but like i said. i dont want to edit it if i want to have someone else as the assist. Just Getting my goat with why it is not behaving right. and my mind cant seem to get off why it will not work right lol. sorry for the lengthy/wondering post. is late and have been scratching the head a lot LoL.
Thanks Again for all the help Much appreciated
1. Tried to add a long delay inside the event to make the char already be loaded into the new zone before trying to send the info to the ${AssistCleanName} - FAILED
2. Rechecked that that ${AssistCleanName} variable IS being set right. Inside the Paused/Unpaused states of the main loop. - Success
3. Redid WHAT the event would look at. made it just look for
#Event Dead "#*#Returning to#*#"
This also failed.
4. Tied the event into another Event labeled the same #Event Dead
but also made it look at "#*#You have been knocked unconscious#*#" -- FAILED
5. Did the /Echo ${AssistCleanName} inside the Event, Came up as NULL values.
also, added a /echo before and after the /DoEvents inside the loops. they ARE correct.
This is Truely baffling to me...
Could it be that if the char is in a zone action that things just dont pass right for anything that was called while zoneing? Could my /varsets actually be passed throu the event of NewZone? And that is why it behaves as thou it is working as intended?
Sub Event_NewZone
/Varset Pause TRUE
/Varset Combat FALSE
/Varset CombatDone TRUE
/Varset Enragepause FALSE
/bct ${AssistCleanName} //Echo New Zone Detected "${Zone}"
/Squelch /Attack Off
/return
since, both are passing the same values for the /varset?
also, if i put a name of say my tank in there. Who usually is set as the ${AssistCleanName} it works fine. But, i want to be able to make this versatile and not have to edit it every time i want to change my main assist...
Also, Is there a way to have one char (say my tank) tell a char to reply with a variable set? instead of haveing in a macro? say, in a hotkey? something like, but i know this doesnt work (but, may jsut get the point of what im looking for across) /bct VariblecharName //Bct MainCharsName //Echo This is what ${VARIBLEX} is?
Stuff like this makes me want to retry Modbot, but i just dont like it!!!
And Yes, i have it running fine if i remove all The ${AssistCleanName} and replace with CHARNAME i want it to respond to. but like i said. i dont want to edit it if i want to have someone else as the assist. Just Getting my goat with why it is not behaving right. and my mind cant seem to get off why it will not work right lol. sorry for the lengthy/wondering post. is late and have been scratching the head a lot LoL.
Thanks Again for all the help Much appreciated
Wed Jun 04, 2014 10:36 pm
Make sure you can /echo a variable from inside a Sub Event. Any variable. Any event.
Quite easily. It's part of the "I'm assuming it's correct" response regarding the trigger phrase. A character death will trigger 3 separate events (Dead, Zoned, NewZone). Comment out every event except Event_Dead and test it by itself.
/alias or MQ2Events can both report stuff with a hotkey. If you want this to work for all characters and a wide range of stuff, a macro is still best.
This is Truely baffling to me...
Could it be that if the char is in a zone action that things just dont pass right for anything that was called while zoneing? Could my /varsets actually be passed throu the event of NewZone? And that is why it behaves as thou it is working as intended?
Quite easily. It's part of the "I'm assuming it's correct" response regarding the trigger phrase. A character death will trigger 3 separate events (Dead, Zoned, NewZone). Comment out every event except Event_Dead and test it by itself.
Also, Is there a way to have one char (say my tank) tell a char to reply with a variable set? instead of haveing in a macro? say, in a hotkey? something like, but i know this doesnt work (but, may jsut get the point of what im looking for across) /bct VariblecharName //Bct MainCharsName //Echo This is what ${VARIBLEX} is?
/alias or MQ2Events can both report stuff with a hotkey. If you want this to work for all characters and a wide range of stuff, a macro is still best.
Thu Jun 05, 2014 11:16 pm
Senior Project Member