Basic function is to start this macro on a bot that is intended to only do buffing. The macro includes a ini file that should set up the spells you want in each slot and if you send a tell for a buff not memmed it should automem it using gem 8.
Currently it does not send the person asking for the buff any tells and there is no help setup so that I can keep it from being so obviously a bot. Also I still need to add in the most common aliases for the buffs to help with that; currently it uses only the real spell name to cast it.
Since the latest run of patches I have not been able to check this out and debug it. This is the first major macro for me and I would figure on there being some bugs. I will continue to work on it and improve it once I get MQ running again. If anyone has any pointers or corrections I thank you.
Main Macro
Code: Select all
|** Generic buffer bot that will buff upon tell. Using the INI you can set the main 8 spells used for each possible class then pass wich class through the Param1
Uses two INI files. First is Spellcast originally by Plazmic for spell cast handling.
Will also automem spells requested that are not in the list Using slot 8.
The other is used to set the basic spell memmed for each possible buff class used.
Most code is just rearrangement of others macros.
An Example of the start line for it to work properly is .
Ex. /macro genericbuffer Controllername Classofbot **|
#Event SLAINBY "You have been slain by "
#chat tell
#Include spellcast2.ini
#Include genericbuffer.ini
#turbo infinite
Sub Main
/declare controller global
/declare buff1 global
/declare buff2 global
/declare buff3 global
/declare buff4 global
/declare buff5 global
/declare buff6 global
/declare buff7 global
/declare buff8 global
/declare Itemmount global
/declare class global
/if $char(mounted)==TRUE {
/varset mount 1
}
/if ($defined(Param0)==false || $ucase("@Param0")=="NEED"){
/call Need
/endmacro
}
/varset controller @Param0
/if ($defined(Param1)==false) {
/call Need
/endmacro
}
/varset class @Param1
/if ($defined(Param2)==false)
{
/call Need
/endmacro
}
/call Set @class
:Mainloop
/target myself
/if n @mount!=1 /if ($char(state)!="Sit") {
/sit
}
/delay 1s
/doevents
/if n @mount==1 /if n $char(buff,"Summon:")==0 /call mount
/goto :mainloop
Sub Event_Chat(ChatType,Sender,ChatText)
/if "@Sender"=="@controller" {
/if "@ChatText"~~"camp" {
/if $char(mounted)==TRUE /dismount
/sit
/camp desktop
}
}
/if "@ChatText"~~"@buff1" {
/target @Sender
/call Cast "@buff1"
}
/if "@ChatText"~~"@buff2" {
/target @Sender
/call Cast "@buff2"
}
/if "@ChatText"~~"@buff3" {
/target @Sender
/call Cast "@buff3"
}
/if "@ChatText"~~"@buff4" {
/target @Sender
/call Cast "@buff4"
}
/if "@ChatText"~~"@buff5" {
/target @Sender
/call Cast "@buff5"
}
/if "@ChatText"~~"@buff6" {
/target @Sender
/call Cast "@buff6"
}
/if "@ChatText"~~"@buff7" {
/target @Sender
/call Cast "@buff7"
}
/if "@ChatText"~~"@buff8" {
/target @Sender
/call Cast "@buff8"
}
/return
Sub Need
/echo To start the buff bot you must use the following:
/echo
/echo /macro buffbot <ControllerName> <Class>
/echo ex. /macro genericbuffer yourname classofbot
/echo
/return
Sub Mount
/if $char(state)!="Stand" /stand
/call Cast @Itemmount
if return=="NO HORSE" /sit
:Waitmount
/if "$char(casting)"=="TRUE" {
/delay 3
/goto :Waitmount
}
/delay 1s
/return
Sub Event_SLAINBY
/Echo Slained Event Entered
/endmacro
/returnSpellcast2.ini
Code: Select all
| SpellCast.inc
| This will cast a spell reliably for you...
| Usage:
| /call Cast "spellname" [item]
| It will return the following values:
| CAST_SUCCESS
| CAST_UNKNOWNSPELL
| CAST_OUTOFMANA
| CAST_OUTOFRANGE
| CAST_CANNOTSEE
| CAST_STUNNED
| CAST_RESISTED
|
| New Vars Modification
| Plazmic's no globals needed version
|
| Oct 9, 2003 - Updated to work with new vars and $char(casting) - gf
| Oct 11, 2003 - switched some logic, removed defines - gf
| Oct 15, 2003 - Item support added by EqMule
| Modified to add automeming of spells. Goofmester1
#event Fizzle "Your spell fizzles"
#event Interrupt "Your casting has been interrupted"
#event Interrupt "Your spell is interrupted."
#event Recover "You haven't recovered yet..."
#event Recover "Spell recovery time not yet met."
#event Resisted "You target resisted the "
#event OutOfMana "Insufficient Mana to cast this spell!"
#event OutOfRange "Your target is out of range, get closer!"
#event NoLOS "You cannot see your target."
#event Stunned "You cannot cast while stunned"
#event Standing "You must be standing to cast a spell"
#event Collapse "Your gate is too unstable, and collapses."
Sub Cast(SpellName,Item)
/if n $char(gem,"@SpellName")==0 {
/memspell 8 "@SpellName"
/delay 5s
}
:StartCast
/if "@Item"=="Item" {
/call ClearReturnValue
/cast item "@SpellName"
} else {
/if n $char(gem,"@SpellName")==0 /return CAST_UNKNOWNSPELL
/call ClearReturnValue
/if n $char(gem,"@SpellName")<0 {
/delay 0
/goto :StartCast
}
/cast "@SpellName"
}
:WaitCast
/if "$char(casting)"=="TRUE" {
/delay 1
/goto :WaitCast
}
/doevents Fizzle
/doevents Interrupt
/doevents Recover
/doevents Standing
/doevents OutOfRange
/doevents OutOfMana
/doevents NoLOS
/doevents Resisted
/if "$return"=="CAST_RESTART" /goto :StartCast
/if "$return"!="CAST_SUCCESS" /return "$return"
/if "$return"=="CAST_OUTOFMANA" /goto :StartCast
/return CAST_SUCCESS
Sub ClearReturnValue
/return CAST_SUCCESS
Sub Event_Fizzle
/return CAST_RESTART
Sub Event_Interrupt
/return CAST_RESTART
Sub Event_Recover
/delay 5
/return CAST_RESTART
Sub Event_Standing
/stand
/return CAST_RESTART
Sub Event_Collapse
/return CAST_RESTART
Sub Event_OutOfMana
/tell "@Sender" "I'm out of mana at the moment, Let me med for 10 seconds and I'll try
again !"
/sit
pause 10s
/stand
/return CAST_OUTOFMANA
Sub Event_OutOfRange
/return CAST_OUTOFRANGE
Sub Event_NoLOS
/return CAST_CANNOTSEE
Sub Event_Stunned
/return CAST_STUNNED
Sub Event_Resisted
/return CAST_RESISTEDThe buffer ini for the class selectability
Code: Select all
Sub Set(class)
/if @class~~"Druid" /call ClassD
/if @class~~"Cleric" /call ClassC
/if @class~~"Enchanter" /call ClassE
/if @class~~"Necro" /call ClassN
/if @class~~"Ranger" /call ClassR
/if @class~~"Paladin" /call ClassP
/if @class~~"Shaman" /call ClassS
/if @class~~"Beastlord" /call ClassB
/if @class~~"Wizard" /call ClassW
/if @class~~"Magician" /call ClassM
/if @class~~"Shadowknight" /call ClassSK
/varset Itemmount "Small green drum" |set the name of your mount item and it must be
equiped.
/return
Sub ClassD
/varset buff1 "Protection of the Nine"
/memspell 1 "@buff1"
/varset buff2 "Protection of Seasons"
/memspell 2 "@buff2"
/varset buff3 "Blessing of Replenishment"
/memspell 3 "@buff3"
/varset buff4 "Blessing of the Nine"
/memspell 4 "@buff4"
/varset buff5 "Legacy of Bracken"
/memspell 5 "@buff5"
/varset buff6 "Flight of Eagles"
/memspell 6 "@buff6"
/varset buff7 "Replenishment"
/memspell 7 "@buff7"
/varset buff8 "Circle of Summer"
/memspell 8 "@buff8"
/return
Sub ClassC
/varset buff1 "Hand of Virtue"
/memspell 1 "@buff1"
/varset buff2 "Kazad's Mark"
/memspell 2 "@buff2"
/varset buff3 "Blessing of Reverence"
/memspell 3 "@buff3"
/varset buff4 "Symbol of Kazad"
/memspell 4 "@buff4"
/varset buff5 "Ward of Gallantry"
/memspell 5 "@buff5"
/varset buff6 "Aura of Reverence"
/memspell 6 "@buff6"
/varset buff7 "Supernal Remedy"
/memspell 7 "@buff7"
/varset buff8 "Remove Greater Curse"
/memspell 8 "@buff8"
/return
Sub ClassE
/varset buff1 "Vallon's Quickening"
/memspell 1 "@buff1"
/varset buff2 "Voice of Quellious"
/memspell 2 "@buff2"
/varset buff3 "Night's Dark Terror"
/memspell 3 "@buff3"
/varset buff4 "Tranquility"
/memspell 4 "@buff4"
/varset buff5 "Guard of Druzzil"
/memspell 5 "@buff5"
/varset buff6 "Speed of Vallon"
/memspell 6 "@buff6"
/varset buff7 "Rune of Zebuxoruk"
/memspell 7 "@buff7"
/varset buff8 "Koadic's Endless Intellect"
/memspell 8 "@buff8"
/return
Sub ClassN
/varset buff1 "Dead Men Floating"
/memspell 1 "@buff1"
/varset buff2 "Dead Man Floating"
/memspell 2 "@buff2"
/return
Sub ClassR
/varset buff1 "Spirit of Eagle"
/memspell 1 "@buff1"
/varset buff2 "Spirit of the Predator"
/memspell 2 "@buff2"
/varset buff3 "Circle of Summer"
/memspell 3 "@buff3"
/varset buff4 "Call of the Rathe"
/memspell 4 "@buff4"
/varset buff5 "Strength of Tunare"
/memspell 5 "@buff5"
/varset buff6 "Circle of Winter"
/memspell 6 "@buff6"
/return
Sub ClassP
/varset buff1 "Brell's Stalwart Shield"
/memspell 1 "@buff1"
/varset buff2 "Remove Greater Curse"
/memspell 2 "@buff2"
/return
Sub ClassS
/varset buff1 "Ferine Avatar"
/memspell 1 "@buff1"
/varset buff2 "Focus of the Seventh"
/memspell 2 "@buff2"
/varset buff3 "Blessing of Replenishment"
/memspell 3 "@buff3"
/varset buff4 "Talisman of the Boar"
/memspell 4 "@buff4"
/varset buff5 "Endurance of the Boar"
/memspell 5 "@buff5"
/varset buff6 "Focus of Soul"
/memspell 6 "@buff6"
/varset buff7 "Primal Essence"
/memspell 7 "@buff7"
/varset buff8 "Remove Greater Curse"
/memspell 8 "@buff8"
/return
Sub ClassB
/varset buff1 "Ferocity"
/memspell 1 "@buff1"
/varset buff2 "Spiritual Dominion"
/memspell 2 "@buff2"
/varset buff3 "Spiritual Vigor"
/memspell 3 "@buff3"
/varset buff4 "Infusion of Spirit"
/memspell 4 "@buff4"
/return
Sub ClassW
/varset buff1 "Protection of Calrena"
/memspell 1 "@buff1"
/varset buff2 "Spellshield"
/memspell 2 "@buff2"
/varset buff3 "Translocate"
/memspell 3 "@buff3"
/varset buff4 "Teleport"
/memspell 4 "@buff4"
/return
Sub ClassM
/varset buff1 "Maelstrom of Ro"
/memspell 1 "@buff1"
/varset buff2 "Mass Mystical Transvergance"
/memspell 2 "@buff2"
/varset buff3 "Rod of Mystical Transvergance"
/memspell 3 "@buff3"
/return
Sub ClassSK
/varset buff1 "Voice of Thule"
/memspell 1 "@buff1"
/return
