cleric.mac modifications Am I on the right track?

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

Stank Funkyfanger
decaying skeleton
decaying skeleton
Posts: 3
Joined: Thu Oct 24, 2002 11:49 am

cleric.mac modifications Am I on the right track?

Post by Stank Funkyfanger » Thu Dec 19, 2002 10:51 am

Hey folks, I'm looking for some advice on how to accomplish the following...

I triple box when I play EQ now. StankWarrior is on my main screen and I want to be able to control StankCleric from StankWarrior and I want to be able to tell StankCleric to heal or buff anyone, not just StankWarrior who is controlling StankCleric.

Not long ago, I found cleric.mac in the Depot. Thanks to all who worked very hard creating that script.

Specifically, I want to be able to "tell" StankCleric to target someone, then cast a particular spell from StankWarrior... Like this: /tell StankCleric CH StankWizard, where CH triggers casting gem #1 right after targeting StankWizard.

I have attempted to "comment out" the AutoHeal portion of this script too. Undesireable symptoms I'm having are total unresponsiveness from StankCleric when I tell him to cast something on someone.

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.mac
#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 Instill 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"=="Shadowknight" /goto :Tankheal
|         /if "$GroupClass"=="Monk" /goto :Tankheal
|         /if "$GroupClass"=="Ranger" /goto :Tankheal

   /goto :chkevent

|:Tankheal
|         /if n $group($GroupMember)==$char(id) /press F1
|         /if n $group($GroupMember)!=$char(id) /target id 
$group($GroupMember)
|         /stand
|         /delay 11
|         /face
|         /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
|         /delay 11
|         /face
|         /g Healing %T
|         /call SpellSub 2 50
|         /sit
|:nextmember
|      }
|   /next GroupMember
|   /goto :chkevent
|/return
|

Sub Event_Chat
/varset v2 $p2
/target $arg(2,"v2")
/if $arg(1,"v2")=="CH" /call CH
/if $arg(1,"v2")=="CE" /call CE
/if $arg(1,"v2")=="Gate" /call Gate
/if $arg(1,"v2")=="HP" /call Hpbuff
/if $arg(1,"v2")=="Supheal" /call Supheal
/if $arg(1,"v2")=="Symbol" /call Symbol
/if $arg(1,"v2")=="AC" /call Acbuff
/if $arg(1,"v2")=="Root" /call Root
/if $arg(1,"v2")=="Mana" /call Mana
/if $arg(1,"v2")=="loot" /call Autoloot
/if $arg(1,"v2")=="Follow" /call Follow
/if $arg(1,"v2")=="Stop" /call Nofollow
/if $arg(1,"v2")=="Setcamp" /call Setcamp
/if $arg(1,"v2")=="Gettocamp" /call Gettocamp
/if $arg(1,"v2")=="Sit" /call Sit
/if $arg(1,"v2")=="LFG" /call LFG
/if $arg(1,"v2")=="Camp" /call Camp
/return


Sub CH
| *** Complete Heal ***
    /stand
    /delay 11
    /g COMPLETE HEAL on %T in 10seconds
    /call SpellSub 1 105
    /sit
    /press esc
/return



Sub CE
| *** HEAL OVER TIME ***

     /stand
     /delay 11
     /face
     /g Celestial Healing on %T
     /call SpellSub 4 45
     /sit
     /press esc
/return

Sub Gate
| *** GATE ***
     /stand
     /g Gating
     /call SpellSub 8 55
/return

Sub Hpbuff
| *** HP BUFF ***
     /stand
     /delay 11
     /face
     /g HP Buff on %T
     /call SpellSub 6 65
     /sit
     /press esc
/return


Sub Supheal
| *** Superior Heal ***
     /stand
     /delay 11
     /face
     /g Superior Healing %T
     /call SpellSub 2 50
     /sit
     /press esc
/return


Sub Symbol
| *** Symbol ***
     /stand
     /delay 11
     /face
     /g Symbol on %T
     /call SpellSub 7 55
     /sit
     /press esc
/return


Sub Acbuff
| *** AC BUFF ***
     /stand
     /delay 11
     /face
     /g AC BUFF on %T
     /call SpellSub 5 45
     /sit
     /press esc
/return

Sub Root
| *** Root ***
     /stand
     /assist
     /delay 11
     /face
     /g Rooting %T
     /call SpellSub 3 40
     /sit
     /press esc
/return

Sub Mana
| *** Report Mana ***
     /target myself
     /delay 5
     /tell $p1 $char(mana,pct) mana
     /press esc
/return

Sub Autoloot
| *** Auto Loot ***
     /stand
     /call AutoLoot
/return

Sub Follow
| *** AUTOFOLLOW ***
     /sit off
     /face
     /follow
     /varset v10 0
     /tell $p1 Following %T
/return

Sub NoFollow
     /varset v10 1
     /press down
     /tell $p1 No longer following %T
/return

Sub Setcamp
     /target myself
     /delay 5
     /varset XLOC $char(x)
     /varset YLOC $char(y)
     /tell $p1 Think I'll camp here when I camp.
/return

Sub Gettocamp
     /stand
     /face loc $YLOC,$XLOC
     /call GotoLoc $YLOC,$XLOC
     /sit
/return

Sub Sit
| *** SIT/STAND ***
     /sit
/return


Sub LFG
| *** LFG ON ***
     /delay 10
     /target myself
     /delay 10
     /disband
     /delay 10
     /lfg on
     /tell $p1 LFG now.
/return


Sub Camp
| *** CAMP ***
     /sit off
     /sit
     /camp
     /delay 10
     /unload
/return

| *** COMMAND HELP ***
| Remmed out cause it's just asking for trouble from a GM who suspects that 
you're
| bot'ing and is familiar with MQ.
|   } else /if "$ChatCommand"=="command help" {
|     /reply "[CE] - Celestial Heal, [CH] - Complete Heal, [HP] - HP Buff, 
[AC] - AC Buff, [SupHeal] - 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, [LFG] - LFG ON, [Camp] - Camp
|
|   }
| /return

Sub Event_Invited
   /delay 20
   /invite
/return

Sub Event_ClarityGone
   /g Just lost Clarity
/return

Sub Event_InvisGone
   /g Invis is wearing off.
/return

Sub Event_RootGone
   /g Root dropped.
/return

Sub Event_FollowOff
   /if n $v10==1 {
      /tell $p1 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
Thanks in advance for any suggestions you may have.


Stank

Akeph
decaying skeleton
decaying skeleton
Posts: 6
Joined: Sun Jan 05, 2003 2:04 pm

Post by Akeph » Sat Jan 11, 2003 4:04 am

I've been working on something similar to this, but it doesnt work for people outside your group (yet). Thats one of the features I plan on adding one of these days, after I get my enchanter.mac working :)