genbot.mac - Bot for any class scirpts.

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

Moderator: MacroQuest Developers

macrotoon
a ghoul
a ghoul
Posts: 106
Joined: Wed Sep 18, 2002 4:38 pm

Post by macrotoon » Mon Sep 08, 2003 12:53 am

You could setup an event looking for the words slowed or yawns.
After that something like this part of the script should work. Using most of what grim has in place. I havnt debugged it, and dont plan to really. Give it a try and make it work. Just ideas im throwing out at ya.

Code: Select all

|bothealer.inc 
|Bot healer routines 
|Must have botspell.inc loaded also to use this. 
| 
|Version 1.03 
| 
|Commands included in this module: 
|autoheal   Toggle group watching auto heals. 

||| Monitor Group health and call heal subs. 
Sub CheckGrpHealth 
   /varset GroupMember 0 
   /if n "$IsHealer"==0 /return 
   /if n "$IsPally"==1 /return 
   /if n "$MobSlowed"==0 /call QuickHeal  /call return
   /varcalc GroupMax $group(count)-1 
   :GroupLoop 
   /doevents 
   /if n $spawn($group($GroupMember),hp,pct)<41 { 
      /if n $spawn($group($GroupMember),hp,pct)>=1 { 
         /if "$spawn($group($GroupMember),class)"=="Warrior" /call Tankheal 
         /if "$spawn($group($GroupMember),class)"=="Paladin" /call Tankheal 
         /if "$spawn($group($GroupMember),class)"=="Shadow Knight" /call Tankheal 
         /if "$spawn($group($GroupMember),class)"=="Monk" /call Tankheal 
         /if "$spawn($group($GroupMember),class)"=="Ranger" /call Tankheal 
        
      } 
   } 
   /if n $spawn($group($GroupMember),hp,pct)>=1 { 
      /if n $spawn($group($GroupMember),hp,pct)<41 { 
         /call CasterHeal 
      } 
   } 
   /if n $GroupMember>=$GroupMax /return 
   /varadd GroupMember 1 
   /doevents 
   /goto :GroupLoop 
/return 

Sub QuickHeal
   /varset GroupMember 0 
   /varcalc GroupMax $group(count)-1 
   :GroupLoop 
   /doevents 
   /if n $spawn($group($GroupMember),hp,pct)<80 { 
      /if n $spawn($group($GroupMember),hp,pct)>=1 { 
         /if "$spawn($group($GroupMember),class)"=="Warrior" /call FastTankheal 
         /if "$spawn($group($GroupMember),class)"=="Paladin" /call FastTankheal 
         /if "$spawn($group($GroupMember),class)"=="Shadow Knight" /call FastTankheal 
         /if "$spawn($group($GroupMember),class)"=="Monk" /call FastTankheal 
         /if "$spawn($group($GroupMember),class)"=="Ranger" /call FastTankheal 
        
      } 
   } 
   /if n $spawn($group($GroupMember),hp,pct)>=1 { 
      /if n $spawn($group($GroupMember),hp,pct)<41 { 
         /call CasterHeal 
      } 
   } 
   /if n $GroupMember>=$GroupMax /return 
   /varadd GroupMember 1 
   /doevents 
   /goto :GroupLoop 
/return 

Sub PalGrpHealChk 
   /varset GroupMember 0 
   /if n "$IsPally"==0 /return 
   /if n "$IsHealer"==0 /return 
   /varcalc GroupMax $group(count)-1 
   /varset LowHealthCheck 0 
   :GroupLoop 
   /doevents 
   /if n $spawn($group($GroupMember),hp,pct)<81 { 
      /if n $spawn($group($GroupMember),hp,pct)>=1 { 
         /varadd LowHealthCheck 1 
      } 
   } 
   /if n $LowHealthCheck>=3 /call PalGroupheal 
   /if n $GroupMember>=$GroupMax /return 
   /varadd GroupMember 1 
   /doevents 
   /goto :GroupLoop 
/return 


Sub PalHealChk 
   /varset GroupMember 0 
   /if n "$IsPally"==0 /return 
   /if n "$IsHealer"==0 /return 
   /varcalc GroupMax $group(count)-1 
   :GroupLoop 
   /doevents 
   /if n $spawn($group($GroupMember),hp,pct)<81 { 
      /if n $spawn($group($GroupMember),hp,pct)>=1 { 
         /call PallyHeal 
      } 
   } 
   /if n $GroupMember>=$GroupMax /return 
   /varadd GroupMember 1 
   /doevents 
   /goto :GroupLoop 
/return 


||| Toggle auto heal on and off. 
Sub Do-autoheal    
   /if n $strlen("$p1")<=0 { 
      /tell $MasterName Autoheal=$IsHealer 
      /return 
   } 
   /if $p1=="off" /varset IsHealer 0 
   /if $p1=="on" /varset IsHealer 1 
   /tell $MasterName Autoheal=$IsHealer 
/return 

|||Heal called when healing a tank. 
Sub Tankheal 
         /if n $group($GroupMember)==$char(id) /press F1 
         /if n $group($GroupMember)!=$char(id) /target id $group($GroupMember) 
         /stand 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
||| Edit Edit heal message 
||| Edit Spell to auto cast on Melee 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
         /g COMPLETE HEAL on %T in 10seconds 
         /call SpellSub "Complete Heal" 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
         /if "$SitAfterCast"=="1" /sit on 
         /press esc 
/return 

|||Heal called when fast healing a tank. 
Sub FastTankheal 
         /if n $group($GroupMember)==$char(id) /press F1 
         /if n $group($GroupMember)!=$char(id) /target id $group($GroupMember) 
         /stand 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
||| Edit Edit heal message 
||| Edit Spell to auto cast on Melee 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
         /g QUICK HEAL on %T in 4seconds 
         /call SpellSub "QUICK HEAL NAME" 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
         /if "$SitAfterCast"=="1" /sit on 
         /press esc 
/return 


|||Heal called when healing a non tank. 
Sub Casterheal 
         /if n $group($GroupMember)==$char(id) /press F1 
         /if n $group($GroupMember)!=$char(id) /target id $group($GroupMember) 
         /stand 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
||| Edit Edit heal message 
||| Edit Spell to auto cast on Non Melee 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
         /g Healing %T 
         /call SpellSub "Supernal Remedy" 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
         /if "$SitAfterCast"=="1" /sit on 
         /press esc 
/return 


Sub PalGroupheal 
         /stand 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
||| Edit Edit heal message 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
         /if n $Combatstatus==1 /g Attempting GROUP HEAL for 660 Pt heal 
         /if n $Combatstatus==0 /g GROUP HEAL COMING 
         /call SpellSub "Healing Wave of Prexus" 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
         /if "$SitAfterCast"=="1" /sit on 
         /press esc 
/return 

Sub PallyHeal 
         /if n $Combatstatus==1 /return 
         /if n $group($GroupMember)==$char(id) /press F1 
         /if n $group($GroupMember)!=$char(id) /target id $group($GroupMember) 
         /stand 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
||| Edit Edit heal message 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
         /if n $Combatstatus==0 /g Celestial Cleansing on %t 
         /call SpellSub "Celestial Cleansing" 
         /varset HealTimer 300 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
         /if "$SitAfterCast"=="1" /sit on 
         /press esc 
/return

Random()
a lesser mummy
a lesser mummy
Posts: 38
Joined: Fri Aug 29, 2003 11:31 am

Post by Random() » Mon Sep 08, 2003 5:57 am

Doh. In my pseudocode I kept putting the SE's above the CH's which would require events and more variables which I knew couldn't be the cleanest way to do it.

Thanks a lot for the ideas!

MegaHertz
a lesser mummy
a lesser mummy
Posts: 35
Joined: Mon Dec 16, 2002 5:13 pm

Post by MegaHertz » Mon Sep 08, 2003 4:43 pm

I am of the opinion that this macro should be cheked in to the cvs since there are not many in there and this seems to be a widly used bot macro It warrents being checked in :)

theafkxper
a hill giant
a hill giant
Posts: 207
Joined: Sun Sep 08, 2002 6:41 pm

Post by theafkxper » Mon Sep 08, 2003 6:14 pm

while i agree that it is definately good enough to go in, i think it prolly gets updated a tad too much to be in CVS, lets wait a release or two more and then we can bug em for CVS hehe :P

Also, anyone think of a way to implement:
a HoT that dosent keep spamming (im thinking on a timer variable?)
an OOR setting so the script dosent spam the grp if the target goes oor

macrotoon
a ghoul
a ghoul
Posts: 106
Joined: Wed Sep 18, 2002 4:38 pm

Post by macrotoon » Mon Sep 08, 2003 8:37 pm

Also, anyone think of a way to implement:
a HoT that dosent keep spamming (im thinking on a timer variable?)
an OOR setting so the script dosent spam the grp if the target goes oor
Im not sure what you mean by the HoT not spamming.

The way to have the macro not spam anything is to put a timer or counter/timer. If the timer reaches 5 seconds and the person isnt back in range then you do spam again. for say 2 or 3 tries. if that doesnt work. The let them die! haha

macrotoon
a ghoul
a ghoul
Posts: 106
Joined: Wed Sep 18, 2002 4:38 pm

Post by macrotoon » Mon Sep 08, 2003 8:41 pm

also as for using my suggestion this morning about looking for the word yawns or slowed. you need a way to turn the variable back before the next pull. and another thing. what if the shaman/chanter slows them on pulls. My groups do sometimes slow on pulls. Hmm..

hmm...an idea. Eqcompanion will track dps of PCs and NPCs. Wonder if there would be a way of making companion write the dps to an ini file. then have MQ read the dps. If the mobs dps is more than say...200(?) use quick heals. I think someone here was writing a parser for MQ. Ways of working it in the equation?!?! i'll look at that. sounds fun to me

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Tue Sep 09, 2003 1:38 am

theafkxper wrote:while i agree that it is definately good enough to go in, i think it prolly gets updated a tad too much to be in CVS, lets wait a release or two more and then we can bug em for CVS hehe :P

Also, anyone think of a way to implement:
a HoT that dosent keep spamming (im thinking on a timer variable?)
an OOR setting so the script dosent spam the grp if the target goes oor
OOR should be able to be fixed fairly easily. Here is a few ideas.

Right now in the spell sub it fails if the target is OOR. You could make it not fail and retry.

Code: Select all

Sub Event_CastTooFar
   /varset Fail 1
   /tell $MasterName Too far away.
   /varset CTimer 0
/return


Could be changed to something like this.

Code: Select all

Sub Event_CastTooFar
   /varset DoAgain 1
   /if n $v20==0 /tell $MasterName %t is too far away.
   /varadd v20 1
   /if n $v20>=30 /varset v20 0
/return 

And you would need to change this


Code: Select all

Sub SpellSub
   /varset Remem 0
   /sendkey up up
   /if n Combatstatus==1 /delay 3s
   /varset Fail 0
   /varset SpellName "$p0"
   :MemWait
   /varset SpellSlot "$char(gem,"$SpellName")"

   | Uncoment below for debug
   |/echo Spell Slot is $SpellSlot
   |/echo Negative value means gem is not ready.  Zero means spell is not memed.

   /if n $SpellSlot<0 {

      |Uncomment below for debug
      |/echo Waiting for spell slot to repop

      /delay 1s
      /goto :MemWait
   }
   /if n $SpellSlot==0 {

      |Uncomment below for debug.
      |/echo Meming spell

      /memspell 2 "$p0"
      /varset SpellSlot 2
      /varset Remem 1
      :refreshwait
      /delay 5
      /if n $char(gem,"$SpellName")<=0 /goto :refreshwait
   }
   /varset CastTime "$spell("$SpellName",mycasttime)"

   |Uncomment below for debug.
   |/echo Spell Cast time is $spell("$SpellName",casttime)"
   |/echo If this value is not being reported properly this script will malfunction.

   :BeginCast
   /varset Fail 0
   /varset DoAgain 0
   /varset StartCast 0
   /call WaitForStart
   :TimerLoop
   /doevents
   /if n $DoAgain==1 /goto :BeginCast
   /if n $Fail==1 {
      /varset Fail 0
      /return
   }
   /doevents
   /if n $DoAgain==1 /goto :BeginCast
   /if n $Fail==1 {
      /varset Fail 0
      /return
   }
   /if n $CTimer>0 /goto :TimerLoop
   /delay 2
   /doevents
   /if n $DoAgain==1 /goto :BeginCast
   /if n $Remem==1 {
      /loadspells "default"
      :loadsploop
      /delay 5
      /if $char(state)=="SIT" /goto :loadsploop
   }   
/return

to something like this

Code: Select all

Sub SpellSub
   [b]/varset v20 0[/b]
   /varset Remem 0
   /sendkey up up
   /if n Combatstatus==1 /delay 3s
   /varset Fail 0
   /varset SpellName "$p0"
   :MemWait
   /varset SpellSlot "$char(gem,"$SpellName")"

   | Uncoment below for debug
   |/echo Spell Slot is $SpellSlot
   |/echo Negative value means gem is not ready.  Zero means spell is not memed.

   /if n $SpellSlot<0 {

      |Uncomment below for debug
      |/echo Waiting for spell slot to repop

      /delay 1s
      /goto :MemWait
   }
   /if n $SpellSlot==0 {

      |Uncomment below for debug.
      |/echo Meming spell

      /memspell 2 "$p0"
      /varset SpellSlot 2
      /varset Remem 1
      :refreshwait
      /delay 5
      /if n $char(gem,"$SpellName")<=0 /goto :refreshwait
   }
   /varset CastTime "$spell("$SpellName",mycasttime)"

   |Uncomment below for debug.
   |/echo Spell Cast time is $spell("$SpellName",casttime)"
   |/echo If this value is not being reported properly this script will malfunction.

   :BeginCast
   /varset Fail 0
   /varset DoAgain 0
   /varset StartCast 0
   /call WaitForStart
   :TimerLoop
   /doevents
   /if n $DoAgain==1 /goto :BeginCast
   /if n $Fail==1 {
      /varset Fail 0
      /return
   }
   /doevents
   /if n $DoAgain==1 /goto :BeginCast
   /if n $Fail==1 {
      /varset Fail 0
      /return
   }
   /if n $CTimer>0 /goto :TimerLoop
   /delay 2
   /doevents
   /if n $DoAgain==1 /goto :BeginCast
   /if n $Remem==1 {
      /loadspells "default"
      :loadsploop
      /delay 5
      /if $char(state)=="SIT" /goto :loadsploop
   }   
/return
That would make it recast automaticly if the target is out of range instead of failing(The reason it spams is that when it fails the group check sees that the person needs healed again). It will report that the target is out of range to the master once but continue to attempt to cast. If the target is still out of range after 30 tries it will report again. You could have it fail at that point if you wanted. Try it out and let me know what works best and that is what I will go with.

The HOT thing will take a little more work. Delay or a timer would do it but it will have to be able to keep track of which people it cast the HOT on and such. I'll see what I can thing of.
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Something else to test.

Post by grimjack » Tue Sep 09, 2003 2:07 am

Here is an idea for heal over time.. It looks like it will be easier than I thought. I have not been playing for a while so I'm not sure if Supernal Remedy is a heal over time or not.

Code: Select all

Sub Casterheal
   /if n $t21>0 {
      /if n $group($GroupMember)==$v21 /return
   }
   /if n $group($GroupMember)==$char(id) /press F1
   /if n $group($GroupMember)!=$char(id) /target id $group($GroupMember)
   /stand
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||| Edit Edit heal message
||| Edit Spell to auto cast on Non Melee
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
   /g Healing %T
   /varset v21 $group($GroupMember)
|Change this to how many 10ths of a second to wait before casting again on the same person.
   /varset t21 100
   /call SpellSub "Supernal Remedy"
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
   /if "$SitAfterCast"=="1" /sit on
   /press esc
/return 

These are the key additions that you will find above. I will rename them with #define if they work out. Let me know what you think. Also let me know how many seconds delay you would need betweend casting HOT on the same person. Right now it's set to 100 tents of a second(10sec).

Check timer. If it is not 0, check if the person we are looking to heal was healed with a HOT already. Do nothing if both are true.

/if n $t21>0 {
/if n $group($GroupMember)==$v21 /return
}

If we decide to cast a heal over time on someone, set v20 to the ID of the person being healed and set the timer to 100 tenths of a second(10 sec).

/varset v21 $group($GroupMember)
/varset t21 100

If this works out let me know and I will update the bot. Be sure to include anything that you had to change.

Thanks
GrimJack
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

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

Post by Slice » Thu Sep 11, 2003 11:57 am

Would it be possible to take the checkgrphealth sub and modify it to use a parameter list from an autohealt command (Auto Heal Targets) instead of having it check current group members. So the format of the command would be:

/tell botname autohealt target1 target2 target3 target4 target5

I was looking at how the sits.mac takes a parameter list to turn it into a loop but I'm not quite sure how to integrate this into the heal sub correctly.

Slice

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Thu Sep 11, 2003 11:45 pm

Slice wrote:Would it be possible to take the checkgrphealth sub and modify it to use a parameter list from an autohealt command (Auto Heal Targets) instead of having it check current group members. So the format of the command would be:

/tell botname autohealt target1 target2 target3 target4 target5

I was looking at how the sits.mac takes a parameter list to turn it into a loop but I'm not quite sure how to integrate this into the heal sub correctly.

Slice
Try these. If it works I will update the macro. Two new commands in this.
healtargets
healgroup

healtargets takes a list of targets and will make the bot watch those for heals. Will always watch itself so you don't need to specify the bot as a target. Will only take up to 6 targets atm.

/tell botname healtargets target1 target2 target3 target4 target5 target6

should make the bot watch itself and those 6 targets for heals.

healgroup will switch back to group watch mode.

Code: Select all

|bothealer.inc
|Bot healer routines
|Must have botspell.inc loaded also to use this.
|
|Version 2.0
|
|Commands included in this module:
|autoheal   Toggle group watching auto heals.
|healtargets   Watch list of targets with autoheal.
|healgroup   Watch group for autoheal



Sub Do-healgroup
   /varset GroupHeal 1
   /varset TargetHeal 0
/return

Sub Do-healtargets
   /if n $strlen("$p1")<=0 {
      /varset GroupHeal 1
      /varset TargetHeal 0
      /return
   } else /if n $strlen("$p2")<=0 {
      /varset CheckMax 1
      /varset a(4,0) $char(id)
      /varset a(4,1) $id($p1)
   } else /if n $strlen("$p3")<=0 {
      /varset CheckMax 2
      /varset a(4,0) $char(id)
      /varset a(4,1) $id($p1)
      /varset a(4,2) $id($p2)
   } else /if n $strlen("$p4")<=0 {
      /varset CheckMax 3
      /varset a(4,0) $char(id)
      /varset a(4,1) $id($p1)
      /varset a(4,2) $id($p2)
      /varset a(4,3) $id($p3)
   } else /if n $strlen("$p5")<=0 {
      /varset CheckMax 4
      /varset a(4,0) $char(id)
      /varset a(4,1) $id($p1)
      /varset a(4,2) $id($p2)
      /varset a(4,3) $id($p3)
      /varset a(4,4) $id($p4)
   } else /if n $strlen("$p6")<=0 {
      /varset CheckMax 5
      /varset a(4,0) $char(id)
      /varset a(4,1) $id($p1)
      /varset a(4,2) $id($p2)
      /varset a(4,3) $id($p3)
      /varset a(4,4) $id($p4)
      /varset a(4,5) $id($p5)          
   } else {
      /varset CheckMax 6
      /varset a(4,0) $char(id)
      /varset a(4,1) $id($p1)
      /varset a(4,2) $id($p2)
      /varset a(4,3) $id($p3)
      /varset a(4,4) $id($p4)
      /varset a(4,5) $id($p5)      
      /varset a(4,6) $id($p6)
   }
   /varset GroupHeal 0
   /varset TargetHeal 1
/return


Sub CheckListHealth
   /if n "$GroupHeal"==1 /return
   /if n "$TargetHeal"==0 /return
   /if n "$IsHealer"==0 /return
   /if n "$IsPally"==1 /return
   /varset CheckCount 0
   :ListHealthLoop
   /doevents
   /if n $spawn($a(4,$CheckCount),hp,pct)<41 {
      /if n $spawn(a(4,$CheckCount),hp,pct)>=1 {
         /if $spawn($a(4,$CheckCount),class)=="Warrior" /call Tankheal $a(4,$CheckCount)
         /if $spawn($a(4,$CheckCount),class)=="Paladin" /call Tankheal $a(4,$CheckCount)
         /if $spawn($a(4,$CheckCount),class)=="Shadow Knight" /call Tankheal $a(4,$CheckCount)
         /if $spawn($a(4,$CheckCount),class)=="Monk" /call Tankheal $a(4,$CheckCount)
         /if $spawn($a(4,$CheckCount),class)=="Ranger" /call Tankheal $a(4,$CheckCount)
      }
   }
   /if n $spawn($a(4,$CheckCount),hp,pct)>=1 {
      /if n $spawn($a(4,$CheckCount),hp,pct)<41 {
         /call CasterHeal $a(4,$CheckCount)
      }
   }
   /if n $CheckCount>=$CheckMax /return
   /varadd CheckCount 1
   /doevents
   /goto :ListHealthLoop
/return


Sub CheckGrpHealth
   /varset GroupMember 0
   /if n "$GroupHeal"==0 /return
   /if n "$TargetHeal"==1 /return
   /if n "$IsHealer"==0 /return
   /if n "$IsPally"==1 /return
   /varcalc GroupMax $group(count)-1
   :GroupLoop
   /doevents
   /if n $spawn($group($GroupMember),hp,pct)<41 {
      /if n $spawn($group($GroupMember),hp,pct)>=1 {
         /if "$spawn($group($GroupMember),class)"=="Warrior" /call Tankheal $spawn($group($GroupMember)
         /if "$spawn($group($GroupMember),class)"=="Paladin" /call Tankheal $spawn($group($GroupMember)
         /if "$spawn($group($GroupMember),class)"=="Shadow Knight" /call Tankheal $spawn($group($GroupMember)
         /if "$spawn($group($GroupMember),class)"=="Monk" /call Tankheal $spawn($group($GroupMember)
         /if "$spawn($group($GroupMember),class)"=="Ranger" /call Tankheal $spawn($group($GroupMember)
       
      }
   }
   /if n $spawn($group($GroupMember),hp,pct)>=1 {
      /if n $spawn($group($GroupMember),hp,pct)<41 {
         /call CasterHeal $spawn($group($GroupMember)
      }
   }
   /if n $GroupMember>=$GroupMax /return
   /varadd GroupMember 1
   /doevents
   /goto :GroupLoop
/return

Sub PalGrpHealChk
   /varset GroupMember 0
   /if n "$IsPally"==0 /return
   /if n "$IsHealer"==0 /return
   /varcalc GroupMax $group(count)-1
   /varset LowHealthCheck 0
   :GroupLoop
   /doevents
   /if n $spawn($group($GroupMember),hp,pct)<81 {
      /if n $spawn($group($GroupMember),hp,pct)>=1 {
         /varadd LowHealthCheck 1
      }
   }
   /if n $LowHealthCheck>=3 /call PalGroupheal
   /if n $GroupMember>=$GroupMax /return
   /varadd GroupMember 1
   /doevents
   /goto :GroupLoop
/return


Sub PalHealChk
   /varset GroupMember 0
   /if n "$IsPally"==0 /return
   /if n "$IsHealer"==0 /return
   /varcalc GroupMax $group(count)-1
   :GroupLoop
   /doevents
   /if n $spawn($group($GroupMember),hp,pct)<81 {
      /if n $spawn($group($GroupMember),hp,pct)>=1 {
         /call PallyHeal
      }
   }
   /if n $GroupMember>=$GroupMax /return
   /varadd GroupMember 1
   /doevents
   /goto :GroupLoop
/return


||| Toggle auto heal on and off.
Sub Do-autoheal   
   /if n $strlen("$p1")<=0 {
      /if n $IsHealer==0 /tell $MasterName Autoheal=off
      /if n $IsHealer==1 /tell $MasterName Autoheal=on
      /return
   }
   /if $p1=="off" /varset IsHealer 0
   /if $p1=="on" /varset IsHealer 1
   /tell $MasterName Autoheal=$IsHealer
/return

|||Heal called when healing a tank.
Sub Tankheal
         /if n $p0==$char(id) /press F1
         /if n $p0!=$char(id) /target id $p0
         /stand
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||| Edit Edit heal message
||| Edit Spell to auto cast on Melee
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
         /g COMPLETE HEAL on %T in 10seconds
         /call SpellSub "Complete Healing"
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
         /if "$SitAfterCast"=="1" /sit on
         /press esc
/return


|||Heal called when healing a non tank.
Sub Casterheal
         /if n $p0==$char(id) /press F1
         /if n $p0!=$char(id) /target id $p0
         /stand
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||| Edit Edit heal message
||| Edit Spell to auto cast on Non Melee
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
         /g Healing %T
         /call SpellSub "Supernal Remedy"
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
         /if "$SitAfterCast"=="1" /sit on
         /press esc
/return


Sub PalGroupheal
         /stand
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||| Edit Edit heal message
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
         /if n $Combatstatus==1 /g Attempting GROUP HEAL for 660 Pt heal
         /if n $Combatstatus==0 /g GROUP HEAL COMING
         /call SpellSub "Healing Wave of Prexus"
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
         /if "$SitAfterCast"=="1" /sit on
         /press esc
/return

Sub PallyHeal
         /if n $Combatstatus==1 /return
         /if n $group($GroupMember)==$char(id) /press F1
         /if n $group($GroupMember)!=$char(id) /target id $group($GroupMember)
         /stand
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||| Edit Edit heal message
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
         /if n $Combatstatus==0 /g Celestial Cleansing on %t
         /call SpellSub "Celestial Cleansing"
         /varset HealTimer 300
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
         /if "$SitAfterCast"=="1" /sit on
         /press esc
/return

Code: Select all

|botcore.inc
|Bot core module
|version 2.0

#chat tell
#define GroupHeal v46
#define TargetHeal v47
#define CheckCount v48
#define CheckMax v49
#define MasterName v50
#define CmdArrayNum v51
#define CmdArraySize v52
#define GroupMember v53
#define GroupMax v54
#define ChatInput1 v55
#define ChatInput2 v56
#define ChatInput3 v57
#define SitAfterCast v58
#define MyXLoc v59
#define MyYLoc v60
#define IsHealer v61
#define countdown v62
#define CmdList v63
#define RangeMin v70
#define RangeMax v71
#define FastRange v72
#define Combatstatus v73
#define Remem v75
#define MyClass v76
#define IsPally v77
#define EnrageVar v78
#define FollowTarget v79
#define Afollow v80
#define MName1 v81
#define MName2 v82
#define MName3 v83
#define MName4 v84
#define MName5 v85
#define MName6 v86
#define Fail v94
#define DoAgain v95
#define StartCast v96
#define SpellSlot v97
#define SpellName v98
#define CastTime v99
#define CTimer t39
|Chat handeling sub.
Sub Event_Chat
   /varset CmdArrayNum 0
   /if "$MName1"=="$p1" /goto :SetupTime
   /if "$MName2"=="$p1" /goto :SetupTime
   /if "$MName3"=="$p1" /goto :SetupTime
   /if "$MName4"=="$p1" /goto :SetupTime
   /if "$MName5"=="$p1" /goto :SetupTime
   /if "$MName6"=="$p1" /goto :SetupTime
   /tell $MName1 $p1 told me: $p2
   /return
   :SetupTime
   /varset MasterName $p1
   :ArrayTime
   /if "$arg(1,"$p2")"=="$a(1,$CmdArrayNum)" {
      /call Do-$a(1,$CmdArrayNum) $p2
      /return
   }
   /varadd CmdArrayNum 1
   /if n $CmdArrayNum>=$CmdArraySize /return
   /goto :ArrayTime
/return

sub CountArraySize
   /varset l0 0
   :CountArrayLoop
    /if n $strlen("$a($p0,$l0)")<=0 {
       /goto :CountArrayEnd
   }
   /varadd l0 1
   /goto :CountArrayLoop
   :CountArrayEnd
/return $l0

Sub Do-target
   /if n $strlen("$p1")<=0 {
      /return
   } else /if n $strlen("$p2")<=0 {
      /target "$p1"
   } else /if n $strlen("$p3")<=0 {
      /target "$p1 $p2"
   } else /if n $strlen("$p4")<=0 {
      /target "$p1 $p2 $p3"
   } else /target "$p1 $p2 $p3 $p4"
   /tell $MasterName my target is %t
/return

Sub Do-saytarget
   /tell $MasterName my target is %t
/return

Sub Do-assist
   /if n $strlen("$p1")<=0 {
      /assist $MasterName
      /delay 3
   } else /if n $strlen("$p2")<=0 {
      /assist "$p1"
   } else /if n $strlen("$p3")<=0 {
      /assist "$p1 $p2"
   } else /if n $strlen("$p4")<=0 {
      /assist "$p1 $p2 $p3"
   } else /assist "$p1 $p2 $p3 $p4"
   /tell $MasterName my target is %t
/return



Sub Do-sit
   /sit off
   /sit
/return

Sub Do-stand
   /sit off
/return

Sub Do-notarget
   /press esc
   /press esc
   /press esc
/return

Sub Do-afk
   /varset CmdArrayNum 0
   /if n $strlen("$p1")<=0 {
      /afk
   } else /if n $strlen("$p2")<=0 {
      /afk $p1
   } else /if n $strlen("$p3")<=0 {
      /afk $p1 $p2
   } else /if n $strlen("$p4")<=0 {
      /afk $p1 $p2 $p3
   } else /if n $strlen("$p5")<=0 {
      /afk $p1 $p2 $p3 $p4
   } else /if n $strlen("$p6")<=0 {
      /afk $p1 $p2 $p3 $p4 $p5
   } else /if n $strlen("$p7")<=0 {
      /afk $p1 $p2 $p3 $p4 $p5 $p6
   } else /if n $strlen("$p8")<=0 {
      /afk $p1 $p2 $p3 $p4 $p5 $p6 $p7
   } else /if n $strlen("$p9")<=0 {
      /afk $p1 $p2 $p3 $p4 $p5 $p6 $p7 $p8
   } else {
      /afk $p1 $p2 $p3 $p4 $p5 $p6 $p7 $p8 $p9
   }
   /afk
/return

Sub Do-afollow
   /if n $strlen("$p1")<=0 {
      /return
   } else /if n $strlen("$p2")<=0 {
      /varset FollowTarget "$p1"
      /varset Afollow 1
   } else /if n $strlen("$p3")<=0 {
      /varset FollowTarget "$p1 $p2"
      /varset Afollow 1
   } else /if n $strlen("$p4")<=0 {
      /varset FollowTarget "$p1 $p2 $p3"
      /varset Afollow 1
   } else /varset FollowTarget "$p1 $p2 $p3 $p4"
      /varset Afollow 1
   }
/return

Sub Do-say
   /varset CmdArrayNum 0
   /if n $strlen("$p1")<=0 {
      /return
   } else /if n $strlen("$p2")<=0 {
      /say $p1
   } else /if n $strlen("$p3")<=0 {
      /say $p1 $p2
   } else /if n $strlen("$p4")<=0 {
      /say $p1 $p2 $p3
   } else /if n $strlen("$p5")<=0 {
      /say $p1 $p2 $p3 $p4
   } else /if n $strlen("$p6")<=0 {
      /say $p1 $p2 $p3 $p4 $p5
   } else /if n $strlen("$p7")<=0 {
      /say $p1 $p2 $p3 $p4 $p5 $p6
   } else /if n $strlen("$p8")<=0 {
      /say $p1 $p2 $p3 $p4 $p5 $p6 $p7
   } else /if n $strlen("$p9")<=0 {
      /say $p1 $p2 $p3 $p4 $p5 $p6 $p7 $p8
   } else /if n $strlen("$p10")<=0 {
   } else {
      /say $p1 $p2 $p3 $p4 $p5 $p6 $p7 $p8 $p9
   }
/return

Sub Do-group
   /varset CmdArrayNum 0
   /if n $strlen("$p1")<=0 {
      /return
   } else /if n $strlen("$p2")<=0 {
      /g $p1
   } else /if n $strlen("$p3")<=0 {
      /g $p1 $p2
   } else /if n $strlen("$p4")<=0 {
      /g $p1 $p2 $p3
   } else /if n $strlen("$p5")<=0 {
      /g $p1 $p2 $p3 $p4
   } else /if n $strlen("$p6")<=0 {
      /g $p1 $p2 $p3 $p4 $p5
   } else /if n $strlen("$p7")<=0 {
      /g $p1 $p2 $p3 $p4 $p5 $p6
   } else /if n $strlen("$p8")<=0 {
      /g $p1 $p2 $p3 $p4 $p5 $p6 $p7
   } else /if n $strlen("$p9")<=0 {
      /g $p1 $p2 $p3 $p4 $p5 $p6 $p7 $p8
   } else /if n $strlen("$p10")<=0 {
   } else {
      /g "$p1 $p2 $p3 $p4 $p5 $p6 $p7 $p8 $p9
   }
/return

Sub Do-tell
   /varset CmdArrayNum 0
   /if n $strlen("$p1")<=0 {
      /return
   } else /if n $strlen("$p2")<=0 {
      /return
   } else /if n $strlen("$p3")<=0 {
      /tell $p1 $p2
   } else /if n $strlen("$p4")<=0 {
      /t $p1 $p2 $p3
   } else /if n $strlen("$p5")<=0 {
      /t $p1 $p2 $p3 $p4
   } else /if n $strlen("$p6")<=0 {
      /t $p1 $p2 $p3 $p4 $p5
   } else /if n $strlen("$p7")<=0 {
      /t $p1 $p2 $p3 $p4 $p5 $p6
   } else /if n $strlen("$p8")<=0 {
      /t $p1 $p2 $p3 $p4 $p5 $p6 $p7
   } else /if n $strlen("$p9")<=0 {
      /t $p1 $p2 $p3 $p4 $p5 $p6 $p7 $p8
   } else {
      /t $p1 $p2 $p3 $p4 $p5 $p6 $p7 $p8 $p9
   }
/return


Sub Do-accept
   /press esc
   /press esc
   /invite
/return

Sub Do-reject
   /press esc
   /press esc
   /disband
/return

Sub Do-invite
   /if n $strlen("$p1")<=0 {
      /assist $MasterName
      /delay 3
   } else /if n $strlen("$p2")<=0 {
      /target "$p1"
   } else /if n $strlen("$p3")<=0 {
      /target "$p1 $p2"
   } else /if n $strlen("$p4")<=0 {
      /target "$p1 $p2 $p3"
   } else /target "$p1 $p2 $p3 $p4"
   /tell $MasterName Inviting %t
   /invite
/return

Sub Do-follow
   /target $MasterName
   /face
   /follow
   /tell $MasterName Autofollow on %t.
/return

Sub Do-stop
   /varset Fail 1
   /tell $MasterName Stoping.
   /varset Afollow 0
   /varset FollowTarget ""
   /sendkey up up
   /press d
   /press d
   /press esc
   /press esc
   /press esc
   /press right
/return

Sub Do-sit
   /stand
   /sit on
/return

Sub Do-stand
   /stand
/return

Sub Do-camp
   /tell $MasterName Camping out.
   /stand
   /sit
   /camp
/return

Sub Do-duck
   /press d
   /varset Fail 1
   /varset CTimer 0
   /press d
/return


Sub Do-cmds
   /tell "$MasterName" Commands: "$CmdList"
/return

Sub Do-moveto
   /sit off
   /varset countdown 0
   /varset MyXLoc $char(x)
   /varset MyYLoc $char(y)
   /if n $strlen("$p1")<=0 {
      /assist $MasterName
      /delay 3
   } else /if n $strlen("$p2")<=0 {
      /target "$p1"
   } else /if n $strlen("$p3")<=0 {
      /target "$p1 $p2"
   } else /if n $strlen("$p4")<=0 {
      /target "$p1 $p2 $p3"
   } else /target "$p1 $p2 $p3 $p4"
   /if $p1=="me" /target $MasterName
   /tell $MasterName Moving to %t.
   :gotopointloop
   /doevents
   /if $target()==FALSE {
      /sendkey up up
      /return
   }
   /face fast nopredict
   /if n $target(distance)>15 /sendkey down up
   /if n $target(distance)<=15 {
      /sendkey up up
      /return
   }
   /face fast nopredict
   /if n $countdown>=3 {
      /call Detectobst
      /varset countdown 0
   }
   /varadd countdown 1
   /doevents
   /goto :gotopointloop
   }
   /sendkey up up
   /face
/return

Sub Detectobst
   /if n $MyXLoc==$char(x) /if $MyYLoc==$char(y) /call Hitobst 5
   /varset MyXLoc $char(x)
   /varset MyYLoc $char(y)
/return


sub Hitobst
   /sendkey up up
   /sendkey down down
   /if n $rand(99)>50 {
      /delay 2s
      /sendkey up down
      /sendkey down Right
      /delay $p0
      /sendkey up Right
      /sendkey down up
      /delay 2s
      /sendkey up up
   } else {
      /delay 2s
      /sendkey up down
      /sendkey down left
      /delay $p0
      /sendkey up left
      /sendkey down up
      /delay 2s
      /sendkey up up       
   }
   /sendkey up down
   /sendkey up Right
   /sendkey up Left
   /sendkey down up
/return

Code: Select all

|genbot.mac
|Generic bot example.
|Make sure you edit this macro to add the commands you want.
|Version 3.08
|Grimjack
#include botcore.inc
#include botspell.inc
#include botcombat.inc
#include bothealer.inc
#turbo 75



Sub Main
|This checks if started with a master name. Print usage statement and exit if it was not.
   /if n $strlen("$p0")<=0 {
     /echo Usage: /macro generic <Master Name1> <Master Name2>...
     /endmacro
   }
|This sets up the variables that set who can be master of bot
   /if n $strlen("$p1")<=0 {
      /varset MName1 $p0
      /varset MName2 NULL
      /varset MName3 NULL
      /varset MName4 NULL
      /varset MName5 NULL

      /varset MName6 NULL
   } else /if n $strlen("$p2")<=0 {
      /varset MName1 $p0
      /varset MName2 $p1
      /varset MName3 NULL
      /varset MName4 NULL
      /varset MName5 NULL
      /varset MName6 NULL
   } else /if n $strlen("$p3")<=0 {
      /varset MName1 $p0
      /varset MName2 $p1
      /varset MName3 $p2
      /varset MName4 NULL
      /varset MName5 NULL
      /varset MName6 NULL
   } else /if n $strlen("$p4")<=0 {
      /varset MName1 $p0
      /varset MName2 $p1
      /varset MName3 $p2
      /varset MName4 $p3
      /varset MName5 NULL
      /varset MName6 NULL
   } else /if n $strlen("$p5")<=0 {
      /varset MName1 $p0
      /varset MName2 $p1
      /varset MName3 $p2
      /varset MName4 $p3
      /varset MName5 $p4
      /varset MName6 NULL
   } else {
      /varset MName1 $p0
      /varset MName2 $p1
      /varset MName3 $p2
      /varset MName4 $p3
      /varset MName5 $p4
      /varset MName6 $p5   
   }
   /varset Afollow 0
|Set if bot should autoheal.  0 for no and 1 for yes. 
|Can be turned on or off by master with a command.
|Make sure you edit what spell to use in bothealer.inc if you enable this.
   /varset IsHealer 0
|Set if user is a paladin. 0 for no and 1 for yes.
|If this is set to 1 it will disable the default auto heals and use Pally group types.
|Edit the spells to use in bothealer.inc
   /varset IsPally 0
|Set minimum and maximum combat range desired.
   /varset RangeMin 10
   /varset RangeMax 12
|Set to range that you want the bot to stop using /press to move.
   /varset FastRange 15
|Do not change
   /varset Combatstatus 0
|Set if bot should automaticly sit after casting.  0 for no 1 for yes.  Can be toggled with a command.
   /varset SitAfterCast 0

|||This is where the commands the bot can take is set up

|||Commands in botcore.inc
   /varset a(1,0) afk
   /varset a(1,1) accept
   /varset a(1,2) reject
   /varset a(1,3) invite
   /varset a(1,4) follow
   /varset a(1,5) stop
   /varset a(1,6) moveto
   /varset a(1,7) sit
   /varset a(1,8) stand
   /varset a(1,9) camp
   /varset a(1,10) duck
   /varset a(1,11) run
   /varset a(1,12) say
   /varset a(1,13) tell
   /varset a(1,14) group
   /varset a(1,15) cmds
   /varset a(1,16) target
   /varset a(1,17) notarget
   /varset a(1,18) assist
   /varset a(1,19) saytarget
   /varset a(1,20) afollow
|||Commands in botcombat.inc
   /varset a(1,21) attack
   /varset a(1,22) noattack
|||Commands in botspell.inc
   /varset a(1,23) sn
   /varset a(1,24) mana
   /varset a(1,25) evac
   /varset a(1,26) aftercastsit
   /varset a(1,27) loadlist
|||Commands in botheal.inc
   /varset a(1,28) autoheal
   /varset a(1,29) healtargets
   /varset a(1,30) healgroup
|||||||||||||||||||||||Personal Commands|||||||||||||||||||||||||||||||||
|||Add commands you want here.
|||Example:
|||   /varset a(1,29) mycommand
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

|||Bot commands setup ends here

   | Calculate size of command list array(Thanks to Kagonis)
   /call CountArraySize 1
   /varset CmdArraySize $int($return)
   /varset CmdList "$a(1,0), $a(1,1), $a(1,2), $a(1,3), $a(1,4), $a(1,5) $a(1,6), $a(1,7), $a(1,8), $a(1,9), $a(1,10), $a(1,11), $a(1,12), $a(1,13), $a(1,14), $a(1,15), $a(1,16), $a(1,17), $a(1,18), $a(1,19), $a(1,20) $a(1,21), $a(1,22), $a(1,23), $a(1,24), $a(1,25), $a(1,26), $a(1,27), $a(1,28), $a(1,29), $a(1,30), $a(1,31), $a(1,32), $a(1,33), "$a(1,34), $a(1,35), $a(1,36), $a(1,37), $a(1,38), $a(1,39), $a(1,40)"
   /varset CmdArrayNum 0
   :MainLoop
   |||Sub from bothealer.inc
   /call CheckGrpHealth
   /call CheckListHealth
   ||| Sub From bothealer.inc
   /call PalGrpHealChk
   ||| Sub From bothealer.inc
   /call PalHealChk
   |||Sub from botcombat.inc
   /call Combatcheck
   |||Sub from botcombat.inc
   /if $Combatstatus=="1" /call RangeSub
   /if $Afollow=="1" /call Do-moveto blah $FollowTarget
   /doevents
   /varset CmdArrayNum 0
   /goto :MainLoop
/return

|||||||||||||||||||||||Personal Commands|||||||||||||||||||||||||||||||||
|||Add Sub routines for any commands you added here.
|||Example:
|||   Sub do-mycommand
|||      /echo this is my command
|||   /return
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

|||||||||||||||||||||||Personal Commands|||||||||||||||||||||||||||||||||

Thanks
GrimJack
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

boredom
a lesser mummy
a lesser mummy
Posts: 49
Joined: Thu Jun 19, 2003 3:45 pm

watching other pc's health outside the group

Post by boredom » Fri Sep 12, 2003 2:21 pm

watching pc or npc health that isn't in your group is diffucult (so I've found). my problem is that you don't recieve HP updates unless they are targeted. (you might also get HP updates of pc's in your raid). of course you could have your bot target the watch, but then you'd have a cleric constantly switching targets to check health and if you decided to play it for a second (you want virtue? ok) would be almost impossible because it's constantly switching targets. anyone have a better way around this?

/Bored

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Fri Sep 12, 2003 2:27 pm

I forgot about the no hp updates thing. I guess there isn't a good way to do that.

Thanks
GrimJack
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

RogerWilco
a ghoul
a ghoul
Posts: 86
Joined: Thu Aug 28, 2003 4:05 am

Post by RogerWilco » Wed Sep 17, 2003 10:16 pm

I have been playing with adding a cmd for /pet attack but I an not having any success....

any suggestions???

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Thu Sep 18, 2003 1:53 am

RogerWilco wrote:I have been playing with adding a cmd for /pet attack but I an not having any success....

any suggestions???
This will assist the master and do a /pet attack. You could make it more advanced if you wanted.

Code: Select all

Sub Do-petattack
   /assist $MasterName
   /delay 1s
   /if $target()=="FALSE" {
      /msg $MasterName failed to get target for pet.
      /return
   }
   /pet attack
/return
Make sure you add the command petattack.

/varset a(1,#)

Change # to the next number in the list of commands.

Thanks
GrimJack
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

RogerWilco
a ghoul
a ghoul
Posts: 86
Joined: Thu Aug 28, 2003 4:05 am

Post by RogerWilco » Thu Sep 18, 2003 9:39 am

Grimjack thanks alot