Events
Posted: Sat Nov 12, 2011 1:25 pm
I have read the /doevents on wiki and understand what it does just not the best use of it.
My resent rewrite of my Enchanter's macro makes it obvious that I don't completely understant "Events" or the /doevents completely.
Though I have had success with custom events, I have also run into some problems with them that I have played with and played with and just don't understand.
Fist I will give you what I have written for my enchanter then explain the problem I'm having:
1st.
The events where working correctly untill I just rewrote it. I have added things in the Sub Main that assists the Main Tank and so she keeps the Tank targeted majority of the time and besides the spell upgrades and some of the things in the Sub Main, I haven't touched the #events / Sub Event_(s).
2nd.
The problem is- Before I rewrote most of the Sub Main the #events where working corrctly. My wife, with her toon, could call commands as well as I and they would work for either one of us. It would trigger the event and target/assist the person triggering the event. No though it seems I'm having problems with it all of a sudden.
The problem to me specific, now after the rewrite, My wife say in group "mez" it keeps me targeted and either tried to mez me or what I have targeted like if I said it (I play the Main Tank).
This worked before and now it's not. I do:
and it returns
which is correct. But for some reason I use /target or /assist it stay on me.
NOW ... with that said... I can replace ${Targ} with her name exactly and it will /assist her and do what it is suppose to but then only SHE can use the event. (wierd and I don't understand this)
Next problem....
The "rune" event.. worked fine before I rewrote (again didn't touch ANY of the #events or Sub Event_(s) when I rewrote the macro) but now when my wife or I say "rune" in group chat it keeps me targeted both times and continuosly casts rune. The error I'm getting is:
Now I did notice one mistake I had made when I first start that for some reason kept the events from working at all. That was the /doevents at the top of the Sub Main in my sit/med section of my macro. For some reason since I forgot that (which I include it in all my macros there for medding for any caster macros, usualy just copy/paste) the events wouldn't work at all. With in there they started working but that was when I noticed these other problems.
Again have no idea why I'm having these problems now and after spending a few hours trying to fix I'm not sure how. It was working.. "someone" in the group triggers the event and it targets/assists the person saying it and does the event. but now it's not.
My resent rewrite of my Enchanter's macro makes it obvious that I don't completely understant "Events" or the /doevents completely.
Though I have had success with custom events, I have also run into some problems with them that I have played with and played with and just don't understand.
Fist I will give you what I have written for my enchanter then explain the problem I'm having:
Code: Select all
#include Spell_routines.inc
#turbo 40
#chat group
#chat tell
#event mezthis "#1# tells the group, 'mez'"
#event runeme "#1# tells the group, 'rune'"
#event mindcandyall "#1# tells the group, 'mindcandy all'"
#event givemindcandy "#1# tells the group, 'mindcandy'"
#event helpcommands "#1# tells the group, 'Pandorica'"
Sub Main
/declare Mez string outer Entrance
/declare Dot string outer Suffocate
/declare Nuke string outer Anarchy
/declare haste string outer Alacrity
/declare rune string outer Rune II
/declare MindCandySpell string outer Clarity
/declare dotimer timer outer
/declare nuketimer timer outer
/declare hastetimer timer outer
/declare MTank string outer (Name of my Tank)
/declare x int local
|*****Med Loop*****|
:start
/if ((!${Me.Casting.ID}) && (${Me.State.Equal[STAND]}) & (${Me.PctMana}<98)) /sit
/doevents
/delay 10
/if (${Me.PctMana}>30) /goto :next
/goto :start
:next
/doevents
/assist ${MTank}
/delay 1s
/if (${Target.PctHPs}<75 && ${Me.PctMana}>65 && ${Target.Type.NotEqual[CORPSE]} && ${Target.Type.Equal["NPC"]} && ${dotimer}==0) {
/call cast "${Dot}" gem1 3s
/varset dotimer 1m
}
/goto :nuking
:nuking
/assist &{MTank}
/delay 1s
/if (${Target.PctHPs}<75 && ${Me.PctMana}>65 && ${Target.Type.NotEqual[CORPSE]} && ${Target.Type.Equal["NPC"]} && ${nuketimer}==0) {
/call cast "${nuke}" gem2 3s
/varset nuketimer 10s
}
/goto :hastetank
:hastetank
/assist ${MTank}
/delay 1s
/if (${Target.PctHPs}<98 && ${Target.Type.Equal["NPC"]} && ${hastetimer}==0) {
/target ${MTank}
/delay 1s
/call cast "{haste}" gem 4 3s
/varset hastetimer 8m
}
/goto :start
/return
|-----------------------------------------------------|
| CHAT COMMANDS type Help in channel for commands |
|-----------------------------------------------------|
Sub Event_mezthis(Targ)
/assist ${Targ}
/delay 1s
/g Mezzing ==> [ %t ]
/call Cast "${Mez}" gem5 3s
/if (${Macro.Return.Equal[CAST_SUCCESS]}) /goto :mezsuccess
/if (${Macro.Return.Equal[CAST_IMMUNE]}) /goto :mezimmune
:mezsuccess
/g [ %t ] <== is mezzed, you break it you buy it!
/return
:mezimmune
/g [ %t ] <== sorry, it's immune to my wildly charms...
/return
Sub Event_runeme(Targ)
/target ${Targ}
/call cast "${rune}" gem7 3s
/return
Sub Event_givemindcandy(Line,Targ)
/assist ${Targ}
/delay 1s
:gmc
/call cast "${MindCandySpell}" gem8 3s
/if (${Macro.Return.Equal[CAST_SUCCESS]}) /goto :givemindcandysuccess
/goto :gmc
:givemindcandysuccess
/g enjoy the ${MindCandySpell} [ %t ], some one was thinking of you...
/return
Sub Event_helpcommands(Line)
/g mez - I will mez your target master!
/delay 1s
/g mindcandy all - will give everyone that needs it my mindcandy
/delay 1s
/g mindcandy - I will give peace to you or someone that is close to you.
/return
Sub Event_mindcandyall(Line)
/g One Moment Plz Giving Everyone Mindcandy!
/declare g int local
/for g 0 to ${Group}
/if (${Group.Member[${g}].Type.NotEqual[CORPSE]}) /call castingmindcandy ${Group.Member[${g}].CleanName}
/next g
/return
Sub castingmindcandy(Targ)
/target ${Targ}
/delay 1s
/if (${Target.ID} && ${Select[${Target.Class.ShortName},SHD,PAL,RNG,BST,SHM,CLR,DRU,WIZ,MAG,ENC,NEC]}) /call cast "${MindCandySpell}" gem8 3s
/return
The events where working correctly untill I just rewrote it. I have added things in the Sub Main that assists the Main Tank and so she keeps the Tank targeted majority of the time and besides the spell upgrades and some of the things in the Sub Main, I haven't touched the #events / Sub Event_(s).
2nd.
The problem is- Before I rewrote most of the Sub Main the #events where working corrctly. My wife, with her toon, could call commands as well as I and they would work for either one of us. It would trigger the event and target/assist the person triggering the event. No though it seems I'm having problems with it all of a sudden.
The problem to me specific, now after the rewrite, My wife say in group "mez" it keeps me targeted and either tried to mez me or what I have targeted like if I said it (I play the Main Tank).
Code: Select all
Sub Event_mezthis(Targ)
/assist ${Targ}
Code: Select all
/echo ${Targ}
Code: Select all
[MQ2] (name of wife's toon)
NOW ... with that said... I can replace ${Targ} with her name exactly and it will /assist her and do what it is suppose to but then only SHE can use the event. (wierd and I don't understand this)
Next problem....
The "rune" event.. worked fine before I rewrote (again didn't touch ANY of the #events or Sub Event_(s) when I rewrote the macro) but now when my wife or I say "rune" in group chat it keeps me targeted both times and continuosly casts rune. The error I'm getting is:
Code: Select all
There are no spawns matching: (0-100) any there are no spawns matching:(0-100) there are no spawn matching:(0-100) (name of my tank or my wife's toons name depending on who called rune) tells the group, 'rune'
Again have no idea why I'm having these problems now and after spending a few hours trying to fix I'm not sure how. It was working.. "someone" in the group triggers the event and it targets/assists the person saying it and does the event. but now it's not.