Warrior-autogrp.mac Rogue-autogrp.mac Cleric-autogrp.mac

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

Moderator: MacroQuest Developers

roguish
orc pawn
orc pawn
Posts: 29
Joined: Sun Jul 21, 2002 1:11 am

Warrior-autogrp.mac Rogue-autogrp.mac Cleric-autogrp.mac

Post by roguish » Sat Dec 14, 2002 12:38 pm

Here are the code snippets from three macros I have written and used over the last several months. I am leaving Everquest, so I thought I would post this code for others now.

Perhaps most unique in the scripts is the Rogue backstab auto-positioning code and the Cleric using Yaulp 5 on a regular basis to increase mana regen by 7.5 if his mana was low. On my cleric, who already had Flowing Thought 15, mental clarity 3, and usually had tranquility, mana regen was awesome.

A feature I introduced into the code was something that detected if the bots were killed or zoned. If they were zoned or killed, the macro would be halted to stop problems inherent in zone changes (missing equipment or items in bank, hangs, whatever). With this code I have never had a problem even using the new UI upon death or zone changes.

One can see how easily variations of the code can be used to set up auto-pulling systems and all kinds of fun bots. I had a blast using the systems and my hat is off to the creaters of MacroQuest for making my last few months of Everquest a real scream!!

The objective of the codesets was to allow a Cleric main (level 60 or now 65) run in semi-auto mode to have two 'pets'-- a 60th warrior and a 60th rogue.

+++++++++++++++++++++++++
General info on cleric bot:

1. The Cleric player manually announces to a chat channel one of several commands that would cause the warrior and rogue to attack and kill a mob targetted by the Cleric.
2. The cleric would autoheal members of the group (CH or mini-heals as needed-- supernal) as the situation warranted.
3. Cleric had the ability to be set on "Raid follow mode" to follow members of the raid around a complex zone (like VT) and if a heal was needed... go off autofollow and heal as needed. Setting for Raid AutoFollow is done via a hotbutton switch that simply has: /varset v10 1 or /varset v10 0
4. There is a little code on running to target to heal if out of range, but I had not tuned this correctly (in a raid group situation I happened to have the main guild pulling monk in the group and this feature was turned on --and my cleric suddenly ran at the monk and nearly aggroed the god on us hehe... so needs tuning still or can kept commented out). I think the spellsub has it commented out, or is set to ignore monks, but should be obvious how to call it again.
5. If cleric is being hammered by some mob and it looks like he needs Divine Aura, bot attempts to first use archetype bestow divine aura (instant) then it attempts to cast one of two DAs in spell gems 4 and 5. This occurs at setpoint of 30% health. This section needs some work to ensure it attempts to CH next (to avoid running through all DAs and never attempt to heal). Usually I would end the macro at that point, heal myself, and reset.
6. Cleric had the ability to watch for mana and if mana below 100% would auto-cast Yaulp V every 24 secs. The check for spell gem availability appeared to have a bug in it at last release of MacroQuest so I put in a timer as well for this. Will not attempt to cast if you are moving. People get a bit annoyed at twice per minue Yaulp cast but I just tell them it is to regen my mana faster, which is true. I thought to add in a randomizer for when it is used to avoid GM snooping... but never did.

In play, the Cleric bot would monitor the health of each group member and heal as necessary. It would catch heals way faster than I could respond to in heavy fighting zones and would keep people alive such that I often became a 'choice' cleric especially for mixed warrior-squishy caster groups. That quick heal on the chanter or wizzy really helps...

The macro commands from the Cleric main allow for:

1. Attacking target of Cleric.
2. Follow me (return from attack... ie pull it in or follow me around zone).
3. "Sit"-- a command to stay where you are standing and don't move.
4. Auto-join group-- but only join Cleric to avoid people joining you to groups if you are afk.
5. Systems for ensuring that minions only target and auto-face targetted NPCs or Cleric and not PCs.
6. A 'backup' command to warrior minion to position him better in tight places during a fight (because in auto-fight mode he locks on and is hard to disengage manually).
7. A buffing command to click clickie buffs.
8. Commands to send to the warrior script an auto-pull setup that sends the warrior around corners (to auto-pull a room).


+++++++++++++++++++++++++
The warrior would

1. attack and taunt (and kick) the target.
2. He would use one of his disciplines if it was up and if the health of the target mob merits using it.
3. When the target 'enrages' the warrior will stop attacking and wait until rage is off.
4. An auto-pull setup that sends the warrior around corners (to auto-pull a room).

++++++++++++++++++++++++++
The rogue would

1. automatically position himself into a backstabbing position (opposite the warrior generally but based on the heading of the mob) and /assist off the warrior. Positioning was done via circling the mob with ctrl-arrow keys to move sideways and then a bit forward or backward. There is quite a bit of math that went into ensuring a backstab position on the rogue-- the logic is sound but assumes a circle of 'infinite' degrees since weird things happen around the 0/360 point in the comparisons of where the rogue is facing and the facing of the mob. But it works nicely and it was amazing to watch the rogue circle the mob, always facing him, and moving to the backstab position.
2. The rogue would also use his discipline if it was up and attempt to either disarm, pickpocket, etc (whatever other skill).
3. When the target mob 'enrages' the rogue will stop attacking and wait until rage is off.
4. If the mob hits the rogue the rogue will attempt to duck out of combat to relieve aggro briefly and allow the warrior to pick it up again with taunt, etc.

+++++++++++++++++++++++++

The warrior and the rogue made a great team and I never found that snare was needed since they would auto-face and nail the mob before it got too far-- Rogues rule on this. Snare is really needed only in manual play because reaction times of human players are too slow, and warping-- with these two scripts the mob never makes it far enough to be a problem with adds.

Ask if questions on what the scripts are doing if not clear from above or analysis. I won't be checking the board often. Feel free to rip sections of the code you want! A modifed Spellsub is included. Removed the autoloot.inc system from the original scripts I ripped the prog from.


Warrior Code:

Code: Select all

#Event Loading "LOADING, PLEASE WAIT..."
#Event Slainby "You have been slain by a"
#Event Gainexp "You gain party experience"
#Event Closerplease "too far away, get closer"
#Event Enraged "has become ENRAGED"
#Event Offrage "is no longer enraged"


#turbo
#chat tell
#chat chat
#include routines.mac


Sub main
	/join chatchanalert
	/varset v15 0
:resetattack
	/varset v0 $target(name) 
	/varset v1 $target(id)
	/varset v22 0
	/varset t1 10
	/varset t5 120
	/varset t6 50
	/varset v30 0
	/if n $v15==1 /if "$target(type)"=="NPC" /face nopredict
:CloserAF
  	/doevents
  	/if n $v22==1 /goto :resetattack
  	/if "$target()"=="FALSE" /goto :holdingpatt
  	/if "$target(name)"=="MainHealer" /goto :overit
  	/if "$target(type)"!="NPC" /goto :holdingpatt
:overit
	/varset v11 0
	/if n $char(hp,pct)<=50 /call HealsMePlease
	/if n $v15==1 /call movetotarg
	/if "$target(name)"=="MainHealer" /call movetotarg
	/if "$target(type)"=="NPC" /face nopredict
	/if "$target(name)"=="MainHealer" /face nopredict
	/goto :CloserAF
:holdingpatt
        /varset t1 70
        /if n $v11!=1 /goto :holdingmove
        /delay 5
        /attack off
        /goto :CloserAF
:holdingmove
        /press up
        /press down
        /sendkey up ctrl
        /varset v11 1
        /delay 5
        /attack off
        /goto :CloserAF

Sub movetotarg
	/if n $target(distance)<15 /if n $v15==1 {
		/face fast nopredict
		/if $char(ability,"Disarm")>0 /if n $v30==0 /doability "Disarm"
		/if $char(ability,"Kick")>0 /if n $v30==0 /doability "Kick"
		/if $char(ability,"Taunt")>0 /if n $v30==0 /doability "Taunt"
		/if $char(ability,"Sense Heading")>0 /doability "Sense Heading" 
		/if n $t1==0 {
			/if n $target(hp,pct)>=20 {
				/disc aggressive
				/varset t1 250
			}
		}
	}
	/if n $target(distance)>=15 /varset v20 1
	/if n $target(distance)>20 /sendkey down up
	/if n $target(distance)<10 /press down
	/if n $target(distance)<21 /sendkey up up
	/if n $target(distance)>8 /sendkey up down
	/if n $target(distance)<15 /if v20==1 {
		/varset v20 0
		/press up
	/return
	}
	/if n $target(distance)>9 /if v21==1 {
		/varset v21 0
		/press down
	/return
	}
	/return

||||||||||||||||||||||||  
Sub HealsMePlease
	/if n $t5==0 /goto :okheal
	/if n $t6==0 /goto :spamheal
/return
:okheal
	/3 MainHealer, I need a heal now please, hurry!!!
	/varset t5 200
/return
:spamheal
	/3 MainHealer, HEAL Minion1 NOW!!
	/varset t6 10
/return

||||||||||||||||||||||||||||
Sub Event_Chat

/if "$p2"=="Attack my target guys!!!" {
	/assist MainHealer
	/delay 5
	/attack on
	/attack on
	/varset v15 1
	/varset v22 1
/return
}

/if "$p2"=="Follow me guys" {
	/attack off
	/varset v15 0
	/target MainHealer
	/varset v10 1
/return
}

/if "$p2"=="Stay here guys!!!" {
	/press esc
	/varset v15 0
/return
}

/if "$p2"=="Back up a bit Minion1!!!" {
	/sendkey down down
	/delay 5
	/sendkey up down
	/press down
	/delay 40
/return
}

/if "$p2"=="Buff up guys now!!!" {
	/delay 10
	/sendkey up up
	/sendkey up down
	/sendkey up alt
	/sendkeu up ctrl
	/sendkey down shift
	/press 1
	/sendkey up shift
	/press 9
	/delay 2
	/press 0
	/delay 2
	/press 7
	/delay 37
/return
}

/if "$p2"=="Go get room one, Minion1!!!" {
	/call gotoloc 1016,-180
	/call gotoloc 975,-205
	/delay 20
	/call gotoloc 1016,-180
	/call gotoloc 840,-80
/return
}

/if "$p2"=="Go get room two, Minion1!!!" {
	/call gotoloc 810,42
	/call gotoloc 883,58
	/delay 20
	/call gotoloc 810,42
	/call gotoloc 840,-80
/return
}
/return


|||||||||||||||||||||||||||||||||
Sub Event_Loading
	/endmacro
/return

Sub Event_Slainby
	/endmacro
/return

Sub Event_Closerplease
	/face nopredict
	/if n $target(distance)>13 /sendkey down up
	/if n $target(distance)>6 /if n $target(distance)<13 /press up
	/if n $target(distance)>6 /if n $target(distance)<13 /press up
/return

Sub Event_GainExp
	/varset v10 1
/return

Sub Event_Enraged
	/varset v30 1
	/attack off
/return

Sub Event_Offrage
	/varset v30 0
	/attack on
/return



|Event Timers
|Event Timers
|Event Timers
|Event Timers




||||||||||||||||||||||||||||||||||||
:EndAF
	  /sendkey up up 
	  /sendkey up down 
	  /attack off 
	  /varset v0 0
/return


Ok, and now for the Rogue script:


Code: Select all


#Event Gainexp "You gain party experience"
#Event Loading "LOADING, PLEASE WAIT..."
#Event Slainby "You have been slain by a"
#Event Getcloser "too far away, get closer"
#Event Invitegroup "invites you to join a group"
#Event Attkd1 "tries to"
#Event Attkd2 "YOU for"
#Event Enraged "has become ENRAGED"
#Event Offrage "is no longer enraged"



#include routines.mac
#turbo 
#chat chat


	|v0	Target name
	|v1	Target ID
	|v5
	|v6	0   : 	Event passback variable that you are being attacked, so DUCK.
	|v66	0/1	0=target has moved
	|v8
	|v20	0/1 :	Warning variable that you are running at target fast, prepare to STOP by quick BACKUP.
	|v21
	|v22	1/0 : 	Used to pass a request from "attack my targ" to ensure it resets all other variables before attacking.
	|		1 means an attack has been called
	|v10	1/0 : 	Determines if attacking.  
	|		0=attack, or move to target
	|		1=no attack called
	|v11
	|v
	|v
	|v
	|t1	0 : 	Backstab timer.  When t1 reaches 0, hit backstab button.  Currently backstab attempt every 1 second.
	|t2
	|t5		Healing timer.  At 40% health will call for heal.  Will set timer to call for auto-CH every 20 secs
	|t6		Quick spam heal timer to ensure seen.
	
	
Sub main
	/join chatchanalert
	/assist WarriorMinion
	/varset v0 $target(name)
	/varset v1 $target(id)
	/varset v10 1
	/assist WarriorMinion
	/delay 2
:resetattack
	/varset v0 $target(name)
	/varset v1 $target(id)
	/varset t1 10
	/varset t2 10
	/varset t5 120
	/varset t6 50
	/varset v5 $target(heading)
	/varset v6 1
	/varset v66 1
	/varset v8 1
	/varset v20 1
	/varset v21 1
	/varset v22 0
	/varset v30 0
	/if n $v10==0 {
		/if "$target(type)"=="NPC" /face nopredict
		/if "$target(name)"=="MainHealer" /face nopredict
	}
:CloserAF
	/delay 1
	/doevents
	/if n $v22==1 /goto :resetattack
	/if "$target()"=="FALSE" /goto :holdingpatt
	/if "$target(name)"=="MainHealer" /goto :overit
	/if "$target(type)"!="NPC" /goto :holdingpatt
:overit
	/varset v11 0
	/if n $char(hp,pct)<=40 /call HealsMePlease
	/if n $v10==0 /call movetotarg
	/if "$target(name)"=="MainHealer" /call movetotarg
:workedout
	/if "$target(type)"=="NPC" /face nopredict
	/if "$target(name)"=="MainHealer" /face nopredict
	/varset v5 $target(heading)
	/if n $target(distance)<15 /if n $target(distance)>=3 /if n $v10==0 /if "$target(name)"!="MainHealer" /goto :bspos

/goto :CloserAF


:bspos
	/face fast nopredict
	/if "$target(name)"=="MainHealer" /goto :CloserAF
	/if $char(ability,"Backstab")>0 /if n $v30==0 /doability "Backstab"
	/if $char(ability,"Disarm")>0 /if n $v30==0 /doability "Disarm"
	/if $char(ability,"Pick Pocket")>0 /doability "Pick Pocket"
	/if $char(ability,"Sense Heading")>0 /doability "Sense Heading" 
| counter
	/if n $target(heading)>=180 /if n $calc($target(heading)-180)<=$char(heading) /if n $char(heading)<$calc($target(heading)-22.5) /goto :bsclock
	/if n $target(heading)>=180 /if n $char(heading)<=180 /if n $calc($char(heading)-22.5)>$calc($target(heading)-360) /goto :bscounter
	/if n $target(heading)<=180 /if n $char(heading)<$calc($target(heading)-22.5) /goto :bsclock 
|counter clockwise
	/if n $char(heading)>=180 /if n $calc($char(heading)-180)<=$target(heading) /if $char(heading)>$calc($target(heading)+22.5) /goto :bscounter
	/if n $char(heading)>=180 /if n $target(heading)<=180 /if n $calc($char(heading)-157.5)<$calc($target(heading)+180) /goto :bsclock
	/if n $char(heading)<=180 /if n $target(heading)<=180 /if n $char(heading)>$calc($target(heading)+25) /goto :bscounter
/goto :CloserAF

:bsclock
	/if n $v10==0 /face nopredict
	/sendkey down ctrl
	/sendkey down up
	/sendkey down right
	/sendkey up up
	/sendkey down down
	/sendkey up right
	/sendkey up down
	/sendkey up ctrl
	/press down
	/press ctrl
	/if n $v10==0 /face nopredict
	/if n $v10==0 /face nopredict
/goto :CloserAF

:bscounter
	/if n $v10==0 /face nopredict
	/sendkey down ctrl
	/sendkey down up
	/sendkey down left
	/sendkey up up
	/sendkey down down
	/sendkey up left
	/sendkey up down
	/sendkey up ctrl
	/press down
	/press ctrl
	/if n $v10==0 /face nopredict
	/if n $v10==0 /face nopredict
/goto :CloserAF

:holdingpatt
        /varset t1 70
        /varset t2 10
        /if n $v11!=1 /goto :holdingmove
        /delay 5
        /attack off
/goto :CloserAF
:holdingmove
        /press up
        /press down
        /sendkey up ctrl
        /varset v11 1
        /delay 5
        /attack off
        /goto :CloserAF
/return


| Subroutines
| Subroutines
| Subroutines
| Subroutines

||||||||||||||||||||||||  
Sub movetotarg
							|if >15... 		set v20 to warn
	/if n $target(distance)>=15 /varset v20 1
							|if >20... 		move forward 
	/if n $target(distance)>20 /sendkey down up
							|if too close... 	back up
	/if n $target(distance)<4 /press down
							|we are within range	stop moving-forward a sec
	/if n $target(distance)<21 /sendkey up up
							|we are within range	stop backing-up a sec
	/if n $target(distance)>2 /sendkey up down
							|within hitrange	quick BACKUP to STOP
	/if n $target(distance)<15 /if v20==1 {
		/press down
	/return
	}
							|was stopped and close	quick FORWARD to STOP

/return

||||||||||||||||||||||||  
Sub HealsMePlease
	/if n $t5==0 /goto :okheal
	/if n $t6==0 /goto :spamheal
/return
:okheal
	/3 MainHealer, I need a heal now please, hurry!!!
	/varset t5 200
/return
:spamheal
	/3 MainHealer, HEAL Rogue1 NOW!!
	/varset t6 10
/return


|Event Chats
|Event Chats
|Event Chats
|Event Chats

||||||||||||||||||||||||  
Sub Event_Chat

/if "$p2"=="Follow me guys" {
	/target MainHealer 
	/face
/return
}

/if "$p2"=="Attack my target guys!!!" {
	/assist MainHealer
	/delay 5
	/attack on
	/attack on
	/varset v10 0
	/varset v22 1
/return
}

/if "$p2"=="Stay here guys!!!" {
	/press esc
	/varset v10 0
/return
}

/if "$p2"=="Buff up guys now!!!" {
	/sendkey down shift
	/press 1
	/sendkey up shift
	/press 9
/return
}

/return

||||||||||||||||||||||||||||||||||||||||||||||
|Event System
|Event System
|Event System
|Event System

Sub Event_Loading
	/endmacro
/return

Sub Event_Slainby
	/endmacro
/return


Sub Event_GainExp
	/varset v10 1
/return

Sub Event_Getcloser
	/face nopredict
	/if n $target(distance)>13 /sendkey down up
	/if n $target(distance)>6 /if n $target(distance)<13 /press up
	/if n $target(distance)>6 /if n $target(distance)<13 /press up
/return

Sub Event_Attkd1
	/attack off
	/doability 2
	/attack on
	/varset v6 0
/return

Sub Event_Attkd2
	/attack off
	/doability 2
	/attack on
	/varset v6 0
/return

Sub Event_Invitegroup
/target MainHealer
/if "$target(name)"=="MainHealer" {
	/delay 10
	/invite
/return
}
/return


|Event Timers
|Event Timers
|Event Timers
|Event Timers

Sub Event_Timer
	/if n $p0==1 /goto :discipline
	/if n $p0==2 /goto :timerup
:discipline
/if n $target(distance)<10 /if n $target(distance)>=3 /if n $v10==0 {
	/disc duelist
	/varset t1 290
/return
}
:timerup
	/varset v66 1
	/varset v8 1
	/varset t2 10
/return

Sub Event_Enraged
	/varset v30 1
	/attack off
/return

Sub Event_Offrage
	/varset v30 0
	/attack on
/return




|||||||||||||||||||||||||||||||
:EndAF 
	/press up
	/press down 
	/attack off
	/varset v0 0
	/sendkey up ctrl
/return




Cleric Script modified from others on this board largely (sorry I don't remember who, but hats off to them for some great group-checking language!!)

Code: Select all

| uberCbot.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)
#define MyXLoc v46
#define MyYLoc v47
#define GroupLocX v48
#define GroupLocY v49
#define JustMoved v50
#define YesFollow v51

#include RaidcbotSpellSub.mac
#include routines.mac


#Event Loading "LOADING, PLEASE WAIT..."
#Event Slainby "You have been slain by a"
#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 t1 50
   /echo Starting...
   /varset YesFollow 0
   /varset JustMoved 0
:chkevent 
   /doevents 
   | *** AutoHeal *** 
   /varcalc GroupMax $group(count)-1 
   /for GroupMember 0 to $GroupMax
      /call divine
|      /if n $spawn($group($GroupMember),pet)!=0 /if n $spawn($spawn($group($GroupMember),pet),hp,pct)<65
      /if n $spawn($group($GroupMember),hp,pct)<65 {
         /varset YesFollow 0
         /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
         /if "$GroupClass"=="Rogue" /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 6 105
         /varset t1 30
         /goto :nextmember 

:Casterheal  
         /if n $group($GroupMember)==$char(id) /press F1 
         /if n $group($GroupMember)!=$char(id) /target id $group($GroupMember) 	 
         /stand 
         /call SpellSub 3 25 
         /varset t1 30
        
:nextmember 
      } 
   /next GroupMember
	/varset MyXLoc $char(x) 
	/varset MyYLoc $char(y)
	/if n $char(mana,pct)<100 /if n $MyXLoc==$char(x) /if $MyYLoc==$char(y) /if n $t1==0 /if n $char(gem,"Yaulp V")!=-2  {
		/call SpellSub 8 10
		/varset t1 30
	}
	:getclose
          /if n $YesFollow==1 /if "$target(type)"!="NPC" /if "$target(name)"!="MainHealer" /if "$target()"!="FALSE" /call movetotarg
          /if n $target(distance)>=20 /goto :getclose
          /if $JustMoved==1 {
          /press down
          /press up
          /varset JustMoved 0
          }
    }

   /goto :chkevent 
/return 


Sub movetotarg

	/face
	/if n $target(distance)>20 /sendkey down up
							|if too close... 	back up
	/if n $target(distance)<4 /press down
							|we are within range	stop moving-forward a sec
	/if n $target(distance)<21 /sendkey up up
							|we are within range	stop backing-up a sec
	/if n $target(distance)>2 /sendkey up down
							|within hitrange	quick BACKUP to STOP
	/if n $target(distance)<15 /press down
							|was stopped and close	quick FORWARD to STOP
	/varset JustMoved 1
/return




Sub Divine
   /if n $char(hp,pct)<30 {
   	/sendkey down shift
   	/press 0
   	/sendkey up shift
   	/press 2
   	/target myself
   	/cast 4
   	/delay 2
   	/cast 5
   	/delay 200
   	/target self
   	/cast 3
   }
/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. 
/return 

Sub Event_FollowOff 
   /if n $v10==1 { 
      /r Parked. 
   } else { 
      /sendkey down up 
      :KeepRunning 
      /face 
          /if n $target(distance)<50 { 
             /sendkey up up 
             /follow 
             /varset v10 0
          } else { 
             /goto :KeepRunning 
          } 
       } 
/return


Sub Event_Loading
	/endmacro
/return

Sub Event_Slainby
	/endmacro
/return



Cleric Spellsub:

Code: Select all



| - ubercbotSpellSub.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 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 { 
      /delay 5 
   } else /if n $v1==3 {
:getclosetoheal
      /if "$GroupClass"!="Monk" /if "$target(type)"!="NPC" /call movetotarg
      /if n $target(distance)>=30 /goto :getclosetoheal
      /delay 5
      /press down
      /press up
}
   } 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 movetotarg

	/face
	
	/if n $target(distance)>20 /sendkey down up
							|if too close... 	back up
	/if n $target(distance)<4 /press down
							|we are within range	stop moving-forward a sec
	/if n $target(distance)<21 /sendkey up up
							|we are within range	stop backing-up a sec
	/if n $target(distance)>2 /sendkey up down
							|within hitrange	quick BACKUP to STOP
	/if n $target(distance)<15 /press down
							|was stopped and close	quick FORWARD to STOP
/return


Sub Event_CastStart 
   /varset v1 1
/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

Last edited by roguish on Thu Dec 26, 2002 3:33 pm, edited 6 times in total.

lifewolf
a ghoul
a ghoul
Posts: 143
Joined: Fri Oct 18, 2002 6:29 pm

Post by lifewolf » Fri Dec 20, 2002 11:09 am

Hrm wow...

roguish
orc pawn
orc pawn
Posts: 29
Joined: Sun Jul 21, 2002 1:11 am

Post by roguish » Sat Dec 21, 2002 2:07 am

someone said my intro was sloppy so I tried to tidy it up and consolidate hehe...

Jojongua
decaying skeleton
decaying skeleton
Posts: 7
Joined: Thu Dec 05, 2002 3:16 pm

Post by Jojongua » Sat Dec 21, 2002 3:50 am

WOW.


/kneel in humility and reverance

Awesome work


Jojongua

asta
decaying skeleton
decaying skeleton
Posts: 9
Joined: Wed Dec 25, 2002 5:30 pm

Do you have this macro..

Post by asta » Wed Dec 25, 2002 5:33 pm

#include Raidcbotloot.inc

I have been tinkering with your macro's and working to eliminate the rogue and replace with a monk (the one class you had scripted out) but havent been able to find or find a substitue that works for this macro.

Asta

roguish
orc pawn
orc pawn
Posts: 29
Joined: Sun Jul 21, 2002 1:11 am

Post by roguish » Wed Dec 25, 2002 7:49 pm

Asta,

Yes, I made a special case for taking the monk from the "run-to if OOR" as that is one of the best ways to wipe out an entire raid if the monk in your group is one of the pull monks and you run at the monk during a pull! Probably not a concern for you if you are botting the monk as well in a 'solo' group.

I would approach your need to incorporate a monk by first fixing the spellsub routine to remove the monk abatement section (a single statement-- easy). Change:

Code: Select all

:getclosetoheal 
      /if "$GroupClass"!="Monk" /if "$target(type)"!="NPC" /call movetotarg 
to

Code: Select all

:getclosetoheal 
      /if "$target(type)"!="NPC" /call movetotarg 

Then I would just simply toss the rogue script and make a copy of the Warrior script and change the fight sequence in the Warrior. Alter it to whatever things Monks do in a fight in addition to punching, kicking, disciplines, clicking Monk epic, etc.

Should be really easy, including having the Monk check for whether their health is really low then doing a feign dead (similar to how I had the Cleric check for low health and casting DA on himself). I never really played a monk except messing with a friend's monk a few times so I don't know the particulars.

Good luck.

asta
decaying skeleton
decaying skeleton
Posts: 9
Joined: Wed Dec 25, 2002 5:30 pm

Post by asta » Thu Dec 26, 2002 3:18 pm

Yes, I agree now the warrior script copy may be better way to go for my monk (reason for the rogue one was to avoid him eating ripostes). Next question, did you have a listin of spell slots used by it? I have determined te slot you used for Cheal and your DA's but would be interested in knowing others to save me a bit of digging.

Thanks again.

Also, any idea on tha loot.mac?

roguish
orc pawn
orc pawn
Posts: 29
Joined: Sun Jul 21, 2002 1:11 am

Post by roguish » Thu Dec 26, 2002 3:31 pm

Spell slots:

Supernal Remedy (or whatever mini-heal): 3
Complete Heal: 6

DA1: 4
DA2: 5

Bestow DA (AA skill): Bank 0, slot 2

++++++++++++++++++++++++++++++++++

As to the loot.inc: Just delete that include line. I have removed from the posted script now. It was not needed. If you need it it is identical to the one used by the Cleric script that I used as the basis for my script from this board (I used the one from the board because it had some awesome group-checking code). To find the right cleric script check out the scripts on the board -- much of the preamble in the script thanking people is the same and should clue you in on the right loot.inc if you really need it. For me the loot.inc was legacy code and I commented out the called routine and never bothered to fully clean the code... sowwy.

++++++++++++++++++++++++++++++++++

You can probably rip the script on ripostes from the rogue script and modify it fairly easily. Good luck!

roguish
orc pawn
orc pawn
Posts: 29
Joined: Sun Jul 21, 2002 1:11 am

Post by roguish » Thu Dec 26, 2002 3:34 pm

Found it. Mine is modded extensively from this to be a little more responsive to the 63+ PoP zones and able to follow others around in a raid situation and defend oneself a bit from aggro (mainly in VT).

This link:

http://macroquest2.com/phpBB2/viewtopic.php?t=1312

Mutter
a ghoul
a ghoul
Posts: 105
Joined: Sat Nov 16, 2002 1:09 pm

Question

Post by Mutter » Fri Dec 27, 2002 11:14 am

You use a ca\ommand that i THINK is how you turn corners
/disc aggressive
what is it?? not in help system at ALL

asta
decaying skeleton
decaying skeleton
Posts: 9
Joined: Wed Dec 25, 2002 5:30 pm

/disc aggresive

Post by asta » Fri Dec 27, 2002 2:44 pm

/disc aggressive is an in game command that begins a warrior discipline. Mquest allows you to inclue EQ's commands in your macro.

Iceassassin
a lesser mummy
a lesser mummy
Posts: 49
Joined: Tue Nov 05, 2002 11:40 am

Hmm

Post by Iceassassin » Fri Dec 27, 2002 3:19 pm

How can i take off the pull feature for the warrior? :D

Ariain
a ghoul
a ghoul
Posts: 88
Joined: Fri Oct 11, 2002 10:35 am

This I think.

Post by Ariain » Fri Dec 27, 2002 3:29 pm

Code: Select all


#Event Loading "LOADING, PLEASE WAIT..." 
#Event Slainby "You have been slain by a" 
#Event Gainexp "You gain party experience" 
#Event Closerplease "too far away, get closer" 
#Event Enraged "has become ENRAGED" 
#Event Offrage "is no longer enraged" 


#turbo 
#chat tell 
#chat chat 
#include routines.mac 


Sub main 
   /join chatchanalert 
   /varset v15 0 
:resetattack 
   /varset v0 $target(name) 
   /varset v1 $target(id) 
   /varset v22 0 
   /varset t1 10 
   /varset t5 120 
   /varset t6 50 
   /varset v30 0 
   /if n $v15==1 /if "$target(type)"=="NPC" /face nopredict 
:CloserAF 
     /doevents 
     /if n $v22==1 /goto :resetattack 
     /if "$target()"=="FALSE" /goto :holdingpatt 
     /if "$target(name)"=="MainHealer" /goto :overit 
     /if "$target(type)"!="NPC" /goto :holdingpatt 
:overit 
   /varset v11 0 
   /if n $char(hp,pct)<=50 /call HealsMePlease 
   /if n $v15==1 /call movetotarg 
   /if "$target(name)"=="MainHealer" /call movetotarg 
   /if "$target(type)"=="NPC" /face nopredict 
   /if "$target(name)"=="MainHealer" /face nopredict 
   /goto :CloserAF 
:holdingpatt 
        /varset t1 70 
        /if n $v11!=1 /goto :holdingmove 
        /delay 5 
        /attack off 
        /goto :CloserAF 
:holdingmove 
        /press up 
        /press down 
        /sendkey up ctrl 
        /varset v11 1 
        /delay 5 
        /attack off 
        /goto :CloserAF 

Sub movetotarg 
   /if n $target(distance)<15 /if n $v15==1 { 
      /face fast nopredict 
      /if $char(ability,"Disarm")>0 /if n $v30==0 /doability "Disarm" 
      /if $char(ability,"Kick")>0 /if n $v30==0 /doability "Kick" 
      /if $char(ability,"Taunt")>0 /if n $v30==0 /doability "Taunt" 
      /if $char(ability,"Sense Heading")>0 /doability "Sense Heading" 
      /if n $t1==0 { 
         /if n $target(hp,pct)>=20 { 
            /disc aggressive 
            /varset t1 250 
         } 
      } 
   } 
   /if n $target(distance)>=15 /varset v20 1 
   /if n $target(distance)>20 /sendkey down up 
   /if n $target(distance)<10 /press down 
   /if n $target(distance)<21 /sendkey up up 
   /if n $target(distance)>8 /sendkey up down 
   /if n $target(distance)<15 /if v20==1 { 
      /varset v20 0 
      /press up 
   /return 
   } 
   /if n $target(distance)>9 /if v21==1 { 
      /varset v21 0 
      /press down 
   /return 
   } 
   /return 

||||||||||||||||||||||||  
Sub HealsMePlease 
   /if n $t5==0 /goto :okheal 
   /if n $t6==0 /goto :spamheal 
/return 
:okheal 
   /3 MainHealer, I need a heal now please, hurry!!! 
   /varset t5 200 
/return 
:spamheal 
   /3 MainHealer, HEAL Minion1 NOW!! 
   /varset t6 10 
/return 

|||||||||||||||||||||||||||| 
Sub Event_Chat 

/if "$p2"=="Attack my target guys!!!" { 
   /assist MainHealer 
   /delay 5 
   /attack on 
   /attack on 
   /varset v15 1 
   /varset v22 1 
/return 
} 

/if "$p2"=="Follow me guys" { 
   /attack off 
   /varset v15 0 
   /target MainHealer 
   /varset v10 1 
/return 
} 

/if "$p2"=="Stay here guys!!!" { 
   /press esc 
   /varset v15 0 
/return 
} 

/if "$p2"=="Back up a bit Minion1!!!" { 
   /sendkey down down 
   /delay 5 
   /sendkey up down 
   /press down 
   /delay 40 
/return 
} 

/if "$p2"=="Buff up guys now!!!" { 
   /delay 10 
   /sendkey up up 
   /sendkey up down 
   /sendkey up alt 
   /sendkeu up ctrl 
   /sendkey down shift 
   /press 1 
   /sendkey up shift 
   /press 9 
   /delay 2 
   /press 0 
   /delay 2 
   /press 7 
   /delay 37 
/return 
} 

|/if "$p2"=="Go get room one, Minion1!!!" { 
|   /call gotoloc 1016,-180 
|   /call gotoloc 975,-205 
|   /delay 20 
|   /call gotoloc 1016,-180 
|   /call gotoloc 840,-80 
|/return 
|} 

|/if "$p2"=="Go get room two, Minion1!!!" { 
|   /call gotoloc 810,42 
|   /call gotoloc 883,58 
|   /delay 20 
|   /call gotoloc 810,42 
|   /call gotoloc 840,-80 
|/return 
|} 
/return 


||||||||||||||||||||||||||||||||| 
Sub Event_Loading 
   /endmacro 
/return 

Sub Event_Slainby 
   /endmacro 
/return 

Sub Event_Closerplease 
   /face nopredict 
   /if n $target(distance)>13 /sendkey down up 
   /if n $target(distance)>6 /if n $target(distance)<13 /press up 
   /if n $target(distance)>6 /if n $target(distance)<13 /press up 
/return 

Sub Event_GainExp 
   /varset v10 1 
/return 

Sub Event_Enraged 
   /varset v30 1 
   /attack off 
/return 

Sub Event_Offrage 
   /varset v30 0 
   /attack on 
/return 



|Event Timers 
|Event Timers 
|Event Timers 
|Event Timers 




|||||||||||||||||||||||||||||||||||| 
:EndAF 
     /sendkey up up 
     /sendkey up down 
     /attack off 
     /varset v0 0 
/return 

roguish
orc pawn
orc pawn
Posts: 29
Joined: Sun Jul 21, 2002 1:11 am

yar

Post by roguish » Fri Dec 27, 2002 7:07 pm

Asta and Ariain are correct. Sorry I could not answer sooner.

The code commented out above is that which I used to send them to two rooms from one place in the cellars of Vox' Dungeon (where the Polar Bears are... ). Once that room was manually cleared I had a Cleric bot variant that pulled the area automatically calling out commands to the Warrior Bot. Warrior would simply run into a room and the Bears would aggro... warrior would run back along path then we he got close enough to the Cleric (<10 feet or so) the cleric bot would call out for the Warrior and Rogue to attack and kill-- I think I also had a thing in that Cleric bot to stun the bears continuously near 20% to stop them from going around the corner and up the ramp. The three bots could work for hours pulling non-stop while I did real work.

Much harder to do in PoP with those hard-hitting mobs. Zones are less 'predictable' so hat's off to better dungeon design by Verant.

Iceassassin
a lesser mummy
a lesser mummy
Posts: 49
Joined: Tue Nov 05, 2002 11:40 am

Now after that...

Post by Iceassassin » Sun Dec 29, 2002 1:23 pm

Now after that... What are the steps i must take to run this :D . If I type in attack.mac or whatever.. it doesn't do anything. :evil: