auto rebuff snippet
Posted: Sat Apr 22, 2006 1:30 pm
First off a little explanation: been running my shambot mac for a while and got tired of constantly hotkeying in group or chat channel for rebuffing. My first thought was to set up timers on each spell previously cast on my tank/controller in array format; but then I remembered they are now sending messages when spells wear off. So after a couple days reading wiki/boards/manual I came up with this:
----------------------------------------------------------------
|place the following line in amongst your other events
#Event Sprebuf "Your #1# spell has worn off of #2#."
|place the following line in amongst you other sub events
| ############### Rebuff spells worn off of players
Sub Event_Sprebuf(string TXTtotalstuff, string wornoffbuff, string WOMember)
/if (${Spell[${wornoffbuff}].Mana} > ${Me.CurrentMana}) /return
/target pc ${WOMember}
/delay 3
/echo *** Hang on ! Rebuffing ${wornoffbuff} to ${WOMember}
/call cast ${wornoffbuff} gem5 5s
/return
-----------------------------------------------------------------
With all appearances it is basic and should work correctly; except when run it tells you it is casting the worn off buff on the target, but never mems the spell in the gem slot. The error recieve always tends to cut out the first word in the spell name and says there is no such spell
------------------------------------------------------------------
IE......
message:
Your Spirit of Alacrity spell has worn off Picaname.
--shammy targets Picaname--
echo:
*** Hang on ! Rebuffing Spirit of Alacrity to Picaname.
echo:
You do not have Spell:Spirit
---nothing memmed for cast---
Hope this might help someone else out there as I am still working on some kind of fix for it.
Destructor of code.
--------------------------------------------------------
After most of the day working with it. a couple new things have come to my attention. #1 if the spell is already in a different spell slot then the macro fails and ends completely #2 an unexpected side effect is in long fights if say a debuff or dot wears off the mac also attempts recast on the mob it was on (at least the closest one with that name anyway) still having problems with the string wornoffbuff not loading the spell. i will edit with more as I can.
Destructor of code.
----------------------------------------------------------------
|place the following line in amongst your other events
#Event Sprebuf "Your #1# spell has worn off of #2#."
|place the following line in amongst you other sub events
| ############### Rebuff spells worn off of players
Sub Event_Sprebuf(string TXTtotalstuff, string wornoffbuff, string WOMember)
/if (${Spell[${wornoffbuff}].Mana} > ${Me.CurrentMana}) /return
/target pc ${WOMember}
/delay 3
/echo *** Hang on ! Rebuffing ${wornoffbuff} to ${WOMember}
/call cast ${wornoffbuff} gem5 5s
/return
-----------------------------------------------------------------
With all appearances it is basic and should work correctly; except when run it tells you it is casting the worn off buff on the target, but never mems the spell in the gem slot. The error recieve always tends to cut out the first word in the spell name and says there is no such spell
------------------------------------------------------------------
IE......
message:
Your Spirit of Alacrity spell has worn off Picaname.
--shammy targets Picaname--
echo:
*** Hang on ! Rebuffing Spirit of Alacrity to Picaname.
echo:
You do not have Spell:Spirit
---nothing memmed for cast---
Hope this might help someone else out there as I am still working on some kind of fix for it.
Destructor of code.
--------------------------------------------------------
After most of the day working with it. a couple new things have come to my attention. #1 if the spell is already in a different spell slot then the macro fails and ends completely #2 an unexpected side effect is in long fights if say a debuff or dot wears off the mac also attempts recast on the mob it was on (at least the closest one with that name anyway) still having problems with the string wornoffbuff not loading the spell. i will edit with more as I can.
Destructor of code.