I concur with MattJM, however since I am bored at work.
Riped and modified from an old macro that I had made updates to. Note, the original was a nuking macro, not sure if this will work.
This should be a little secure, commands have to be sent via tell and you have to define a master.
It should also warn you when someone other than you attempts to use your Shammy and relay tells to you.
it will setup an INI file with the master you specified on first load using Minor Healing on gem1. Edit the INI file to change these.
Requires spell_routines.inc
Has not been tested and I am not going to support it.
Save as healme.mac
Code: Select all
| Usage /mac healme master
#include spell_routines.inc
#chat tell
Sub Main
/declare IniFile string outer
/declare Master string outer
/declare Spell string outer
/declare Gem string outer
/varset IniFile heal_${Me.Name}.ini
/if (${Defined[Param0]}) {
/ini "${IniFile}" Settings Master ${Param0}
/varset Master ${Param0}
} else /if (!${Defined[Param0]}) {
/varset TempStr ${Ini[${IniFile},Settings,tankname,NOTFOUND]}
/varset Master ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/echo You need to start the macro with /mac healme master and generate your .INI file.
/endmacro
}
}
/call LoadINI
/call AntiRetard
/cleanup
/echo Macro successfully started.
/echo Your master is ${Master}
/if (${Me.Sitting}) /sit off
:mainloop
/doevents
/delay 0
/goto :mainloop
/endmacro
Sub Event_Chat(ChatType, Sender, ChatText)
:wait1
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait1
/if (${Sender} = ${Master} && ${ChatText} = "heal me") {
/if (${Spawn[${Sender}].ID} && ${Spawn[${Sender}].Distance}<=100) {
/squelch /target id ${Spawn[${Sender}].ID}
/delay 2s
/call cast "$Spell" $Gem 7s
} else {
/echo Heal failed - ${Sender} too far away or not in zone.
}
} else /if (${Sender} <> ${Master} && ${ChatText} = "heal me") {
/echo WARNING!!! - Non-authorized user, ${Sender}, attempting use me.
/squelch /tell ${Master} ${Sender} is attempting to have me heal him.
/goto done
} else /if (${Sender} <> ${Master} && ${ChatText} <> "heal me") {
/squelch /tell ${Master} ${Sender} told me ${ChatText}
}
:done
/return
Sub LoadINI
| INI setup variables
/varset TempStr ${Ini[${IniFile},Settings,Spell,NOTFOUND]}
/varset Spell ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings Spell "Minor Healing"
/varset Spell Minor Healing
}
/varset TempStr ${Ini[${IniFile},Settings,Gem,NOTFOUND]}
/varset Gem ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings Gem gem1
/varset Gem gem1
}
/if (${INIFlag}==1) {
/echo INI file created/appended. Please customize ${IniFile} in your macros directory. You may now start the macro with /mac afnuke
/endmacro
}
/return
Sub AntiRetard
| Anti Retard Code
/if (!${Me.Book["${Spell}"]}) {
/echo You don't seem to have the spell ${Spell}
/endmacro
}
/return