Now only the name you give the macro is the controler of the bot, and if the bot gets a tell it will say from who and what to the controler of the bot. You can also give tells true the bot to any one you wants.
Well my first macro. Any improment you want just say so.
Code: Select all
| cleric.mac
| cleric petbot
|
| Usage: /macro cleric.mac <character in control>
|
| Spell gem as follow
| 1 : Superior Heal
| 2 : Celestial Healing
| 3 : Armor of Faith
| 4 : Reso
| 5 : Symbol
| 6 : Instill
| 7 : A dd spell
| 8 : complite Heal
#define GroupMember v93
#define GroupMax v90
#define ChatCommand p2
#define Charincommand v69
#define XLOC v52
#define YLOC v53
#define $GroupClass $spawn($group($GroupMember),class)
#include SpellSub.mac
#include loot.inc
#include routines.mac
#chat tell
#Event Invited "To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel"
#Event RejectInvite " rejects you offer to join the group."
#Event ClarityGone "Your mind returns to normal."
#Event InvisGone "You feel yourself starting to appear"
#Event RootGone "Your Instill spell has worn off."
#Event FollowOff "You are no longer auto-following "
#Event hityou " hits YOU for "
Sub Main
/if "$p0"=="" {
/echo Usage: /macro cleric <Char to be in command>
/echo You have to write the name of your controler
/return
}
/varset v69 "$p0"
/echo I am running Cleric BOT. ($Charincommand is in command)
:chkevent
/doevents
| *** AutoHeal ***
/varcalc GroupMax $group(count)-1
/for GroupMember 0 to $GroupMax
/if n $spawn($group($GroupMember),hp,pct)<41 {
/if n $spawn($group($GroupMember),hp,pct)<1 /goto :nextmember
/if "$GroupClass"=="Warrior" /goto :Tankheal
/if "$GroupClass"=="Paladin" /goto :Tankheal
/if "$GroupClass"=="Shadow Knight" /goto :Tankheal
/if "$GroupClass"=="Monk" /goto :Tankheal
/if "$GroupClass"=="Ranger" /goto :Tankheal
/doevents
/goto :CasterHeal
:Tankheal
/if n $group($GroupMember)==$char(id) /press F1
/if n $group($GroupMember)!=$char(id) /target id $group($GroupMember)
/stand
/g COMPLETE HEAL on %T in 10seconds
/call SpellSub 8 115
/sit
/press esc
/goto :nextmember
:Casterheal
/if n $group($GroupMember)==$char(id) /press F1
/if n $group($GroupMember)!=$char(id) /target id $group($GroupMember)
/stand
/g Healing %T
/call SpellSub 2 50
/sit
/press esc
:nextmember
}
/next GroupMember
/goto :chkevent
/return
Sub Event_Chat
:Commands
/if "$Charincommand"=="$p1" {
/if "$left(1,"$ChatCommand")"=="#" { | Calles the command issue function
/call commandissu $p2
| *** Complete Heal ***
} else /if "$ChatCommand"=="ch" {
/target $p1
/stand
/g COMPLETE HEAL on %T in 10seconds
/call SpellSub 8 105
/sit
/press esc
| *** HEAL OVER TIME ***
} else /if "$ChatCommand"=="ce" {
/target $p1
/stand
/g Celestial Healing on %T
/call SpellSub 2 45
/sit
/press esc
| *** DD ***
} else /if "$ChatCommand"=="dd" {
/target $p1
/ass
/delay 7
/stand
/g BOOM casting DD on %t
/call SpellSub 7 45
/delay 60
/sit on
| *** HP BUFF ***
} else /if "$ChatCommand"=="HP" {
/target $p1
/call buffhp
| *** Superior Heal ***
} else /if "$ChatCommand"=="Heal" {
/target $p1
/call buffheal
| *** Pet Complete Heal ***
} else /if "$ChatCommand"=="pet" {
/press esc
/press f2
/press f2
/stand
/g CH on %T
/call SpellSub 2 105
/sit
/press esc
| *** Symbol ***
} else /if "$ChatCommand"=="Symbol" {
/target $p1
/stand
/g Symbol on %T
/call SpellSub 5 55
/sit
/press esc
| *** AC BUFF ***
} else /if "$ChatCommand"=="AC" {
/target $p1
/stand
/g AC BUFF on %T
/call SpellSub 3 85
/sit
/press esc
| *** Root ***
} else /if "$ChatCommand"=="root" {
/target $p1
/assist
/delay 7
/stand
/g Rooting %T
/call SpellSub 6 40
/sit
/press esc
| *** Report Mana ***
} else /if "$ChatCommand"=="mana" {
/stand
/dismount
/press F1
/g Mana is at $char(mana,pct)%
/press esc
/press esc
/sit on
| *** Auto Loot ***
} else /if "$ChatCommand"=="loot" {
/stand
| /call AutoLoot
/echo Sorry cant loot right now...
/goto :return
| *** AUTOFOLLOW ***
} else /if "$ChatCommand"=="follow" {
/target $p1
/face
/sit off
/follow
/g Lead on %T
/varset v10 0
| *** Define Camp Spot ***
} else /if "$ChatCommand"=="setcamp" {
/press F1
/delay 5
/varset XLOC $char(x)
/varset YLOC $char(y)
/g Ok. Here I sit.
| *** AUTORETURN (to camp)***
} else /if "$ChatCommand"=="return" {
:return
/stand
/face loc $YLOC,$XLOC
/call GotoLoc $YLOC,$XLOC
/sit
| *** AUTOSTOP ***
} else /if "$ChatCommand"=="stop" {
/press down
/varset v10 1
/say Stopping here.
| *** SIT/STAND ***
} else /if "$ChatCommand"=="sit" {
/sit
| *** MOUNT HORSE ***
} else /if "$ChatCommand"=="mount" {
/sendkey down shift
/press 2
/press shift
/press 0
| *** DISMOUNT HORSE ***
} else /if "$ChatCommand"=="dismount" {
/dismount
| *** LFG ON ***
} else /if "$ChatCommand"=="LFG" {
/delay 10
/press f1
/delay 10
/disband
/delay 10
/lfg on
/r LFG now.
| *** CAMP ***
} else /if "$ChatCommand"=="camp" {
/sit off
/sit
/camp
/delay 10
/unload
| *** COMMAND HELP ***
} else /if "$ChatCommand"=="command help" {
/reply [CE] - Celestial Heal, [CH] - Complete Heal, [AC] - HP Buff, [HP] - HP Buff, [Heal] - Superior Heal, [Root] - Root Mob, [DD] - Direct Dmg, [Gate] - Gate out, [Mana] - Report Mana, [Follow] - Follow, [Stop] - Stop Follow, [Setcamp] - Set camp spot, [Return] - Return to camp, [Sit] - Sit/Stand, [MOUNT/DISMOUNT] - (dis)mount Horse[LFG] - LFG ON, [Camp] - Camp, [command help2] - Advance command
} else /if "$ChatCommand"=="command help2" {
/r [#t <char> <text>] - [#hp [char]] - [#heal [char]] - [#afk [text]] - [#inv [name]] - [#accept] - [#reject]
}
} else { | End check on who is inchage
/echo Tell from unknowen user ($p1)
/tell $Charincommand [$p1] - $p2
}
/return
Sub Event_Invited
/tell $Charincommand I have been invitedet into a group. Accept or Reject the invite ??
/return
Sub Event_RejectInvite
/tell $Charincommand char did reject the invite.
/return
Sub Event_ClarityGone
/g Clarity just faded...
/return
Sub Event_InvisGone
/g Invis is wearing off.
/return
Sub Event_RootGone
/g Root Wore off.
/press f2
/assist
/delay 11
/stand
/g Rooting %T
/call SpellSub 3 40
/sit
/press esc
/return
Sub Event_FollowOff
/if n $v10==1 {
/r Parked.
} else {
/g Lost ya.
/sendkey down up
:KeepRunning
/face
/if n $target(distance)<50 {
/sendkey up up
/follow
/varset v10 0
/g Back on Auto-Follow. go ahead.
} else {
/goto :KeepRunning
}
}
/return
Sub Event_hityou
/tell $Charincommand Somthing is hitting you cleric. GET IT OFF ME !!!!
/return
Sub commandissu
/if "$p0"=="#t" {
/tell "$p1" "$p2"
} else /if "$p0"=="#hp" { | Casting HP buff on controler's target or on name giving
/if "$p2"=="" {
/assist $Charincommand
} else {
/target $p1
}
/call buffhp
} else /if "$p0"=="#heal" {
/if "$p2"=="" {
/assist $Charincommand
} else {
/target $p1
}
/call buffheal
} else /if "$p0"=="#afk" {
/afk $p1
} else /if "$p0"=="#inv" {
/if "$p2"=="" {
/invite $Charincommand
} else {
/invite $p1
}
} else /if "$p0"=="#accept" {
/invite
} else /if "$p0"=="#reject" {
/disband
}
/return
Sub buffhp
/stand
/g HP Buff on %T
/call SpellSub 4 65
/sit
/press esc
/return
Sub buffheal
/stand
/g Healing %T
/call SpellSub 1 50
/sit
/press esc
/return




