its again, ugly code, but it works, and is stable, if you can improve this code, by all means please do so, it would help the emu community out a lot!
here is the code, must have spellcast.inc and spell_routines.inc
Code: Select all
| enchanter.mac
| Chanter buff script by Sirgijoe, and the mq2 community as a whole! buffs targets upon request, keeping people happy!
|
| Please be responsible in using this code, its not my fault if you get banned or anything else bad happens while
| running this macro
| INC files that are needed to run this macro!
#include Spell_Routines.inc
| Comment the chat type out if you don't want to buff from that chat type
#chat group
#chat tell
|#chat chat
|#chat say
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sub Main
| Spell Mem order
| Gem1 = Buffs
| Gem2 = Boon
| Gem3 = Tash
| Gem4 = Slow
| Gem5 = Nuke or Dot or Stun
| Gem6 = Mez
| Gem7 = Pacify
| Gem8 = gate
| Gem9 = whatever when you get the extra AA gem slot
/echo enchbuff macro has started
/cleanup
/delay 1s
/declare SitAt int outer 99
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Spell list here, update as needed!
/declare SpellBOON outer "Boon of the Garou"
/declare SpellCHA outer "Radiant Visage"
/declare SpellC2 outer "Clarity II"
/declare SpellDOT outer "Gasping Embrace"
/declare SpellEB outer "Enduring Breath"
/declare SpellGATE outer "Gate"
/declare SpellHASTE outer "Wonderous Rapidity"
/declare SpellINVIS outer "Invisibility"
/declare SpellLEV outer "Levitate"
/declare SpellMEZ outer "Dazzle"
/declare SpellMR outer "Group Resist Magic"
/declare SpellNUKE outer "Discordant Mind"
/declare SpellPACI outer "Pacify"
/declare SpellPET outer ""
/declare SpellRUNE outer ""
/declare SpellSEE outer "See Invisible"
/declare SpellSHIELD outer "Shield of the Magi"
/declare SpellSLOW outer "Shiftless Deeds"
/declare SpellSTUN outer "Color Skew"
/declare SpellTASH outer "Tashanian"
/call MemSpells
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Don't mess with anything below.
:Mainloop
| Self buff section
/doevents
/goto :Mainloop
/return
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sub MemSpells
/echo Memming spells. Hang on.
/if ( !${Me.Gem[${SpellC2}]} ) {
/memspell 1 ${SpellC2}
/delay 30
}
/if ( !${Me.Gem[${SpellBOON}]} ) {
/memspell 2 ${SpellBOON}
/delay 30
}
/if ( !${Me.Gem[${SpellTASH}]} ) {
/memspell 3 ${SpellTASH}
/delay 30
}
/if ( !${Me.Gem[${SpellSLOW}]} ) {
/memspell 4 ${SpellSLOW}
/delay 30
}
/if ( !${Me.Gem[${SpellNUKE}]} ) {
/memspell 5 ${SpellNUKE}
/delay 30
}
/if ( !${Me.Gem[${SpellMEZ}]} ) {
/memspell 6 ${SpellMEZ}
/delay 30
}
/if ( !${Me.Gem[${SpellPACI}]} ) {
/memspell 7 ${SpellPACI}
/delay 30
}
/if ( !${Me.Gem[${SpellGATE}]} ) {
/memspell 8 ${SpellGATE}
/delay 30
}
/echo Spells are memmed.
/return
Sub Event_Chat(ChatType,Sender,ChatText)
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Help me tells! send the person a tell with what commands are available, in case they forget.
/if (${ChatText.Equal[buff]} || ${ChatText.Equal[buffs]} || ${ChatText.Equal[help]}) {
/target ${Sender}
/delay 1s
/ttell Available buffs are cha, haste, c2, boon, rune, lev, eb, mr, invis, see.
/delay 1s
}
| how we assist the target to debuff, nuke, dot, mez and so on
/if (${ChatText.Equal[debuff]}) {
/target ${Sender}
/delay 1s
/ttell Casting ${SpellTASH} and ${SpellSLOW} on your target
/assist
/delay 1s
/attack off
/delay 1s
/call cast ${SpellTASH} gem3 5s
/call cast ${SpellSLOW} gem4 5s
/delay 50s
/sit
}
/if (${ChatText.Equal[tash]}) {
/target ${Sender}
/delay 1s
/ttell casting ${SpellTASH}
/delay 1s
/assist
/delay 1s
/attack off
/delay 1s
/pet attack
/call cast ${SpellTASH} gem3 5s
/sit
}
/if (${ChatText.Equal[slow]}) {
/target ${Sender}
/delay 1s
/ttell casting ${SpellSLOW}
/delay 1s
/assist
/delay 1s
/attack off
/delay 1s
/pet attack
/call cast ${SpellSLOW} gem4 5s
/sit
}
/if (${ChatText.Equal[nuke]}) {
/target ${Sender}
/delay 1s
/ttell casting ${SpellNUKE}
/delay 1s
/assist
/delay 1s
/attack off
/delay 1s
/pet attack
/call cast ${SpellNUKE} gem5 5s
/sit
}
/if (${ChatText.Equal[dot]}) {
/target ${Sender}
/delay 1s
/ttell casting ${SpellDOT}
/delay 1s
/assist
/delay 1s
/attack off
/delay 1s
/pet attack
/call cast ${SpellDOT} gem5 5s
/sit
}
/if (${ChatText.Equal[stun]}) {
/target ${Sender}
/delay 1s
/ttell casting ${SpellSTUN}
/delay 1s
/assist
/delay 1s
/attack off
/delay 1s
/pet attack
/call cast ${SpellSTUN} gem5 5s
/sit
}
/if (${ChatText.Equal[mez]}) {
/target ${Sender}
/delay 1s
/ttell casting ${SpellMEZ}
/delay 1s
/assist
/delay 1s
/attack off
/delay 1s
/pet attack
/call cast ${SpellMEZ} gem6 5s
/sit
}
/if (${ChatText.Equal[paci]}) {
/target ${Sender}
/delay 1s
/ttell casting ${SpellPACI}
/delay 1s
/assist
/delay 1s
/attack off
/delay 1s
/pet attack
/call cast ${SpellPACI} gem7 5s
/sit
}
/if (${ChatText.Equal[gate]}) {
/target ${Sender}
/delay 1s
/ttell casting ${SpellGATE}
/delay 1s
/assist
/delay 1s
/attack off
/delay 1s
/pet attack
/call cast ${SpellGATE} gem8 5s
/sit
}
| Buffs sent to persons who asked via chat type selected.
/if (${ChatText.Equal[haste]}) {
/target ${Sender}
/delay 1s
/ttell inc haste
/delay 1s
/call cast ${SpellHASTE} gem1 5s
/sit
}
/if (${ChatText.Equal[c2]}) {
/target ${Sender}
/delay 1s
/ttell inc clarity
/delay 1s
/call cast ${SpellC2} gem1 5s
/sit
}
/if (${ChatText.Equal[rune]}) {
/target ${Sender}
/delay 1s
/ttell inc rune
/delay 1s
/call cast ${SpellRUNE} gem1 5s
/sit
}
/if (${ChatText.Equal[invis]}) {
/target ${Sender}
/delay 1s
/ttell inc invis
/delay 1s
/call cast ${SpellINVIS} gem1 5s
/sit
}
/if (${ChatText.Equal[see]}) {
/target ${Sender}
/delay 1s
/ttell inc see invis
/delay 1s
/call cast ${SpellSEE} gem1 5s
/sit
}
/if (${ChatText.Equal[lev]}) {
/target ${Sender}
/delay 1s
/ttell inc levitate
/delay 1s
/call cast ${SpellLEV} gem1 5s
/sit
}
/if (${ChatText.Equal[eb]}) {
/target ${Sender}
/delay 1s
/ttell inc enduring breath
/delay 1s
/call cast ${SpellEB} gem1 5s
/sit
}
/if (${ChatText.Equal[cha]}) {
/target ${Sender}
/delay 1s
/ttell inc charisma
/delay 1s
/call cast ${SpellCHA} gem1 5s
/sit
}
/if (${ChatText.Equal[mr]}) {
/target ${Sender}
/delay 1s
/ttell inc group resist magic
/delay 1s
/call cast ${SpellMR} gem1 5s
/sit
}
| ** Other stuff **
/if (${ChatText.Equal[gate]}) {
/ttell casting gate!
/call cast ${SpellGATE} gem8 5s
}
/if (${ChatText.Equal[pet]}) {
/ttell getting my pet out
/call cast ${SpellPET} gem1 5s
}
/if (${ChatText.Equal[follow]}) {
/target ${Sender}
/delay 1s
/ttell sticking to you
/stand
/stick 50%
}
/if (${ChatText.Equal[camp]}) {
/ttell camping
/delay 1s
/icamp
}
/return
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sub LOM
/if (${Me.CurrentHPs} < ${Math.Calc[${Me.MaxHPs}/2]}) /call CheckMyHPs
/if (${Me.CurrentMana} < ${Math.Calc[${Me.MaxMana}-5]}) /sit
/return



