Cleric bot

Macro requests from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

Rass
orc pawn
orc pawn
Posts: 13
Joined: Sun Dec 29, 2002 9:59 am

Cleric bot

Post by Rass » Sun Dec 29, 2002 10:17 am

I need help with a cleric bot that actually works. I use these spell gems:

1. Root
2. CH
3. Supernal Elixer
4. Supernal Light
5. Group Heal
6 DA
7. DB
8. *usually Virtue*

I was looking for an Autohealing script so I can focus on one of my other alts more or even watch tv :wink: I've tried each of the ones in Depot forum but only one worked and even it shutdown itself every now and then.

As for buffs, I'd like it to respond to /tell for Virtue but use a Autoheal script for healing.

Any ideas?


Cheers

YKW-28983
a hill giant
a hill giant
Posts: 252
Joined: Sun Dec 01, 2002 11:37 pm

Post by YKW-28983 » Sun Dec 29, 2002 11:52 am

I'm sorry to say but most if not all the Cleric bots out there work without a hitch, you just aren't setting them up correctly. Play around with them and fix them to your likeing.

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

Post by Dirtface » Sun Dec 29, 2002 8:24 pm

Here


Cleric.mac

Code: Select all

| cleric.mac 
| cleric petbot
|  
| Courtesy of Dirtface
| Special thanks: Wes (for the idea of the FOR loop)
|                 Fippy (for figuring out "What went wrong.)
|                 Valerian (for completely writing the Autoheal script
|                           and the auto loot script.
|                           Seriously, Val figured this whole thing out.)
|                 Sparr (For helping me with the Set camp feature)
| Usage: /macro cleric.mac <character in control> 

#define GroupMember v93
#define GroupMax v90
#define ChatCommand p2
#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 ClarityGone "Your mind returns to normal." 
#Event InvisGone "You feel yourself starting to appear"
#Event RootGone "Your Immobilize spell has worn off." 
#Event FollowOff "You are no longer auto-following " 

Sub Main 
   /varset v69 $p0 
: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
         /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 1 105 
         /sit
         /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
:nextmember
      }
   /next GroupMember
   /goto :chkevent
/return 

Sub Event_Chat 

:Commands

| *** Complete Heal ***

/if "$ChatCommand"=="ch" { 
     /target $p1
     /stand
     /g COMPLETE HEAL on %T in 10seconds 
     /call SpellSub 1 105 
     /sit
     /press esc

| *** HEAL OVER TIME ***

   } else /if "$ChatCommand"=="ce" { 
     /target $p1
     /stand
     /g Celestial Healing on %T 
     /call SpellSub 4 45 
     /sit
     /press esc

| *** GATE ***

   } else /if "$ChatCommand"=="gate" { 
     /stand 
     /g Gating 
     /call SpellSub 8 55
     
| *** HP BUFF ***

   } else /if "$ChatCommand"=="HP" { 
     /target $p1
     /stand
     /g HP Buff on %T 
     /call SpellSub 6 65
     /sit  
     /press esc

| *** Superior Heal ***

   } else /if "$ChatCommand"=="Heal" { 
     /target $p1
     /stand
     /g Healing %T 
     /call SpellSub 2 50
     /sit 
     /press esc

| *** Pet Complete Heal ***

   } else /if "$ChatCommand"=="pet" { 
     /press esc
     /press f2
     /press f2
     /stand
     /g CH on %T
     /call SpellSub 1 105
     /sit
     /press esc

| *** Symbol ***

   } else /if "$ChatCommand"=="Symbol" { 
     /target $p1
     /stand
     /g Symbol on %T 
     /call SpellSub 7 55
     /sit  
     /press esc

| *** AC BUFF ***

   } else /if "$ChatCommand"=="AC" { 
     /target $p1
     /stand
     /g AC BUFF on %T 
     /call SpellSub 5 85
     /sit 
     /press esc

| *** Root ***

     } else /if "$ChatCommand"=="root" { 
     /target $p1
     /assist
     /stand
     /delay 7
     /g Rooting %T 
     /call SpellSub 3 40
     /sit 
     /press esc

| *** Report Mana ***

   } else /if "$ChatCommand"=="mana" { 
     /stand
     /dismount
     /press F1
     /g Mana is at $char(mana,pct) 
     /press esc
     /sendkey down shift
     /press 2
     /press shift
     /press 0
     /press esc

| *** Auto Loot ***

   } else /if "$ChatCommand"=="loot" { 
     /stand
     /call AutoLoot
     /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, [Gate] - Gate out, [Mana] - Report Mana, [Follow] - Follow, [Stop] - Stop Follow, [Loot] - Autoloot, [Setcamp] = Set camp spot, [Return] - Return to camp, [Sit] - Sit/Stand, [MOUNT/DISMOUNT] - (dis)mount Horse[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_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
Spellsub.mac

Code: Select all

| - 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. Divine Light 
| 3. Celestial Healing 
| 4. Remedy 
| 5. Symbol of Marzin (?) 
| 6. Heroic Bond 
| 7. Mark of Karn 
| 8. Mark of Retribution
|
| 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 

#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
Loot.inc

Code: Select all

#Event CorpseTime "This corpse will decay in 0" 
#Event Looted "--You have looted a " 

Sub AutoLoot
   /target npc corpse radius 160
   /delay 5
   /con 
   /delay 5 
   /doevents 
   /if n $v4==1 /goto :Continue 
   /if n $target(distance)<15 /goto :LootCorpse 
   /sendkey down up 

   :FaceCorpse 
      /delay 0 
      /face 
      /if n $target(distance)>14 /goto :FaceCorpse 

   :LootCorpse 
      /sendkey up up 
      /loot 
      /delay 10 
      /varset v3 0 

   :Looting 
      /delay 0 
      /varset v5 $v3 
      /click right corpse $v3 
      /delay 5 
      /doevents 
      /if n $v3>$v5 /goto :Looting 
      /press esc 

   :Continue 
      /varset v4 0 

/return 

Sub Event_CorpseTime 
   /varset v4 1 
/return 

Sub Event_Looted 
   /varadd v3 1 
/return 
routines.mac

Code: Select all

| - routines.mac - 
| Generic routines that may be used a lot. 
| ---------------------------- 
| Original Version by: Plazmic 
| Improved by: L124RD 


Sub BuyItems 

   /sendkey down shift 

   /for l1 1 to $p0 
      /click left merchant buy 
      /varset l2 $char(cash)
      :BuyItems_Wait
         /delay 0
      /if n $l2==$char(cash) /goto :BuyItems_Wait
   /next l1 

   /sendkey up shift 

/return 


| ---------------------------- 

Sub CleanPack 
   /varcalc v2 $pack($v80,slots)-1 
   /sendkey down shift 
   /for v1 0 to $v2 
      /if "$item($v80,$v1)"=="NULL" /goto :skipclean 
      /click left pack $v80 $v1 
      :cleanwait0 
       /if "$cursor()"!="TRUE" /goto :cleanwait0 
      /click left auto 
      :cleanwait1 
       /if "$cursor()"=="TRUE" /goto :cleanwait1 
  :skipclean 
   /next v1 
   /sendkey up shift 
/return 

Sub SellItem 
   /sendkey down shift 
   :SellItem 
      /finditem $p0 
      /if $find()==FALSE /goto :DoneSellItem 
      /click left merchant sell 
      /delay $rand(3) 
   /goto :SellItem 
   :DoneSellItem 
   /sendkey up shift 
/return 


| ---------------------------- 


Sub BackPedal 
   /if $p0==$v79 /return 
   /varset v79 $p0 
   /if $p0==1 /sendkey down up 
   /if $p0==0 /sendkey up up 
/return 


| ---------------------------- 


Sub AutoRun 
   /if $p0==$v80 /return 
   /varset v80 $p0 
   /if $p0==1 /sendkey down up 
   /if $p0==0 /sendkey up up 
/return 


| ---------------------------- 


Sub GotoLoc 
   /varset v91 $rand(5) 
   :GotoLocLoop 
      /face loc $p0 
      /if "$p1"=="u" /Press u 
      /call AutoRun 1 
   /if n $distance($p0)>$v91 /goto :GotoLocLoop 
   /call AutoRun 0 
/return 


| ---------------------------- 


Sub GotoTarg 
    /varset v91 $rand(5) 
   /target $p0 
   :GotoTargLoop 
      /face 
      /if "$p1"=="u" /Press u 
      /call AutoRun 1 
   /if n $target(distance)>$v91 /goto :GotoTargLoop 
   /call AutoRun 0 
/return 

| ---------------------------- 

Sub BuyItems 
   /press down shift 
   /for p1 1 to $p0 
      /varcalc p2 $char(plat)*1000+$char(gold)*100+$char(silver)*10+$char(copper) 
      /click left merchant buy 
      :BuyItemsLoop 
         /delay 0 
      /if n $calc($char(plat)*1000+$char(gold)*100+$char(silver)*10+$char(copper))==$p2 /goto :BuyItemsLoop 
   /next p1 
   /press up shift 
/return 

| ---------------------------- 

Sub SellItem 
   /sendkey down shift 
   :SellItem 
      /finditem $p0 
      /if $find()==FALSE /goto :DoneSellItem 
      /varcalc p2 $char(plat)*1000+$char(gold)*100+$char(silver)*10+$char(copper) 
      /click left merchant sell 
      :SellItemLoop 
         /delay 0 
      /if n $calc($char(plat)*1000+$char(gold)*100+$char(silver)*10+$char(copper))==$p2 /goto :SellItemLoop      
   /goto :SellItem 
   :DoneSellItem 
   /sendkey up shift 
/return 

| ---------------------------- 

Sub BuyitemSingle 
    /sendkey down ctrl 
        /varset t1 10 
        /varcalc p2 $char(plat)*1000+$char(gold)*100+$char(silver)*10+$char(copper) 
       /click left merchant buy 
      :BuyItemLoop 
          /delay 1 
      /if n $t1<1 /click left auto 
     /if n $t1<1 /click left merchant buy 
      /if n $calc($char(plat)*1000+$char(gold)*100+$char(silver)*10+$char(copper)==$p2 /goto :BuyItemsLoop 
   /sendkey up ctrl 
/return 

| ----------------------------

Sub FindCombiner 
   /for p1 7 downto 0 
      /if "$pack($p1,combine)"=="$p0" /return $p1 
   /next p1 
   /echo You do not appear to have a valid $p0 container. 
/return 99 

| End of routines.mac
If it doesnt work for you, I dunno what to tell you. This mac is so fucking customizable, its disgusting.

Fuego
decaying skeleton
decaying skeleton
Posts: 1
Joined: Fri Jan 24, 2003 10:44 pm

Post by Fuego » Fri Jan 24, 2003 10:52 pm

Can some1 tell me where to put these codes for them to run, and how to start them?