Complete Cleric Bot Mac

Macro depository for macros written before the user variable changes that broke all of them.

Moderator: MacroQuest Developers

Dirtface
a lesser mummy
a lesser mummy
Posts: 39
Joined: Tue Nov 12, 2002 2:43 am

Complete Cleric Bot Mac

Post by Dirtface » Tue Nov 12, 2002 8:35 am

This is my first day here at MQ, and this is my first attempt at a macro. Much of the code is ripped from all 4 of the other cleric pet macros, but I added my own. If any of this is illogical, please post corrections.
| cbot.mac
| cleric botting macro
| written by dreamer
| modified by sempi
| modified even more by S_B_R
| modifies yet again by Dirtface
| Usage: /macro cbot.mac <character in control>

#include SpellSub.mac
#chat tell
#Event Invited "To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel"
#Event ClarityGone "Your mind returns to normal."
#Event InvisGone "You feel yourself starting to appear"
#Event FollowOff "You are no longer auto-following "

Sub Main
/varset v69 $p0
:chkevent
/doevents
/press ESC
/press F1
/if "$target()"=="TRUE" /varset v7 0
/press ESC
/press F2
/if "$target()"=="TRUE" /varset v7 1
/press ESC
/press F3
/if "$target()"=="TRUE" /varset v7 2
/press ESC
/press F4
/if "$target()"=="TRUE" /varset v7 3
/press ESC
/press F5
/if "$target()"=="TRUE" /varset v7 4
/press ESC
/press F6
/if "$target()"=="TRUE" /varset v7 5
/press ESC
:LoopStart

/delay 1
|/echo $v7 --
/for v40 0 to $v7
/delay 5
/if n $v40==0 /press F1
/if n $v40==1 /press F2
/if n $v40==2 /press F3
/if n $v40==3 /press F4
/if n $v40==4 /press F5
/if n $v40==5 /press F6
/varset v59 $target(hp,pct)
| the if statement checks to see if HP are under 50% on the target if so stand heal and sit
/if n $v59<=50
| the if/and statement checks to see if its a tank. If so, it proceeds to CH
and $char(class)=="Warrior"
or $char(class)=="Monk"
or $char(class)=="Shadowknight"
or $char(class)=="Paladin" {
/sit off
/gsay Complete Healing $target(name)
| This call spellsub is set to Complete Heal (slot 1)
/cast 1
/sit on

| the if statement checks to see if HP are under 60% on the target if so stand heal and sit
} else /if n $v59<=60
| the if/and statement checks to see if its NOT a tank. If so, it proceeds to SH
and $char(class)<>"Warrior"
or $char(class)<>"Monk"
or $char(class)<>"Shadowknight"
or $char(class)<>"Paladin" {
/sit off
/gsay Superior Healing $target(name)
| This call spellsub is set to Superior Heal (slot 2)
/cast 2
/sit on

else /if n $v59>=90 {
/delay 0
}
/next v40
/goto :LoopStart
/return
/goto LoopStart
/return

/goto :chkevent

/return

Sub Event_Chat
/varset v3 "$p2"
| /target $arg(2,"$v3")
/if $arg(2,"$v3")=="self" {
/target myself
} else /if $arg(2,"$v3")=="me" {
/target $p1
}
/delay 5
/if $arg(1,"$v3")=="ch" {
/rt
/delay 11
/stand
/g COMPLETE HEAL on %T in 10seconds
/call SpellSub 1 105
} else /if $arg(1,"$v3")=="ce" {
/rt
/delay 11
/stand
/g Celestial Healing on %T
/call SpellSub 4 45
} else /if $arg(1,"$v3")=="haste" {
/rt
/delay 11
/stand
/g Spell haste for %T.
/call SpellSub 8 40
} else /if $arg(1,"$v3")=="reso" {
/rt
/delay 11
/stand
/g Resolution on %T
/call SpellSub 6 50
} else /if $arg(1,"$v3")=="heal" {
/rt
/delay 11
/stand
/g Healing %T
/call SpellSub 2 35
} else /if $arg(1,"$v3")=="symbol" {
/rt
/delay 11
/g Symbol on %T
/call SpellSub 7 65
} else /if $arg(1,"$v3")=="armor" {
/rt
/delay 11
/stand
/g Armor of Faith on %T
/call SpellSub 5 40
} else /if $arg(1,"$v3")=="mana" {
/target myself
/delay 5
/g Mana is at $char(mana,pct)
} else /if "$p2"=="follow" {
/rt
/sit off
/follow
/g Lead on %T
/varset v10 0
} else /if "$p2"=="stop" {
/press down
/varset v10 1
/say Stopping here.
} else /if "$p2"=="sit" {
/sit
} else /if "$p2"=="LFG" {
/delay 10
/target myself
/delay 10
/disband
/delay 10
/lfg on
/r LFG now.
} else /if "$p2"=="camp" {
/sit off
/sit
/camp
/delay 10
/unload
} else /if "$p2"=="shoe shine" {
/target $v69
/r Shine your shoes? You gotta be kidding me. Shine em yourself ya damn %r
} else /if "$p2"=="oral sex" {
/target $v69
/r Are you serious? I'm no fairy, ya know.
} else /if "$p2"=="command help" {
/reply "Greetings. My commands are as follows: [CE] - Celestial Heal, [CH] - Complete Heal, [Armor] - Armor of Faith, [Haste] - Blessing of Faith, [Reso] - Resolution, [Heal] - Superior Heal, [Mana] - Report Mana, [Follow] - Follow, [Stop] - Stop Follow, [Sit] - Sit/Stand, [LFG] - LFG ON, [Camp] - Camp

}
/return

Sub Event_Invited
/delay 20
/invite
/return

Sub Event_ClarityGone
/g Clarity just faded...
/return

Sub Event_InvisGone
/g Invis is wearing off.
/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
And heres the spellsub
| - SpellSub.mac -
| Spell Casting Sub routine - Usage "/call SpellSub <gem> <delay *actual cast time plus recast*>"
| Will return $v99 = 999 if you go oom.
|
| Modified by GD to work with the 7-4-2002 Release
|
| modified by sempi to include sitting/standing and be more cleric oriented
| 1. Complete Heal
| 2. Superior Heal
| 3. Greater Healing
| 4. Celestial Healing
| 5. Armor of Faith
| 6. Resolution
| 7. Symbol of Naltron
| 8. Blessing of Faith
|
| Modified by S_B_R to handle more events and relay more information to the person
| issuing the command. Also removed the auto-sit function to help control aggro. 09-07-02
|Modified by Dirtface to not sound so much like a bot, when speaking. Also, caters to a level 46 cleric. Please change your spell setup to fit your own.

#Event CastStart "You begin casting"
#Event CastFizzle "Your spell fizzles!"
#Event CastInterrupt "Your spell is interrupted."
#Event CastNoMana "Insufficient Mana to cast this spell"
#Event CastTooFar "Your target is out of range, get closer!"
#Event CastTimer "You haven't recovered yet..."
#Event CastResist "Your target resisted "

Sub SpellSub
/varset v98 $p0
/varset v99 $p1
:ReCast
/sit off
/varset v1 2
/cast $v98
/delay 10
/doevents
/if n $v1==0 /goto :ReCast
/if n $v1>1 /goto :Failure
/return

:Failure
/if n $v1==2 {
/reply Spell failed for unknown reason...
/delay 5
} else /if n $v1==3 {
/reply You're too far away. Come back.
/delay 5
} else /if n $v1==4 {
/reply OOM
/delay 100
/sit on
} else /if n $v1==5 {
/reply Waiting for repop...
} else /if n $v1==6 {
/reply %T RESISTED.
}
/return

Sub Event_CastStart
/varset v1 1
/delay $v99
/return

Sub Event_CastFizzle
/varset v1 0
/return

Sub Event_CastInterrupt
/varset v1 0
/return

Sub Event_CastTooFar
/varset v1 3
/return

Sub Event_CastNoMana
/varset v1 4
/return

Sub Event_CastTimer
/varset v1 5
/return

Sub Event_CastResist
/varset v1 6
/return

Dirtface
a lesser mummy
a lesser mummy
Posts: 39
Joined: Tue Nov 12, 2002 2:43 am

grrr

Post by Dirtface » Tue Nov 12, 2002 8:45 am

Just tested it. It doesnt work. It flips out.

I realized that this probably wont work either as it is constantly looping through the F1 keys, so you cant get much else done.

Also, it returns a message saying "Cant parse 'or $char(class)==....etc"

So theres an error there too. Any help would be lovely.

Unless someone can figure out a way, I think we have to settle for either a cleric pet, or a cleric autohealer, but not both.

User avatar
Slice
a hill giant
a hill giant
Posts: 189
Joined: Wed Oct 30, 2002 2:52 pm

Post by Slice » Tue Nov 12, 2002 4:33 pm

I just did my first run through modifying S_B_R's cleric as well. I finished up my modifications for straight command usage but I plan to have an autoheal cycle in there as well. Once I get it working I'll post it.

Slice

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Tue Nov 12, 2002 6:24 pm

I suggest using $group to get hp's instead of using the f keys as well. YOu could even store them in an array and work out dps to predict CH's
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]