• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

/inviting a friend

slandaro

Member
Joined
Sep 12, 2004
RedCents
80¢
im trying to add an event to my macros that will /invite a set group of friends who know a keyword to trigger it but cant seem to get it to work. basically at the top of the macro i have this

#Event Invite "soandso tells you, 'invite'"


then later in the macro i have

Sub Event_invite
/keypress 4
/return

keypress 4 being my hotkey that invites my set friends

any idea why this isnt working or is there a better way to do this?

thanks
 
Events have to be exact so for any unneeded text use #.# as a wildcard. You need the parameters and make sure Invite and invite are the exact same case.

Turn tell windows off in Options.

With this one you do not have to keep a list if they know the phrase "Invite me dirtbag."

Don't forget that you have to cycle through a /doevents

Rich (BB code):
/declare Invite_Person string outer
#Event Invite "#1# tells you, 'Invite me dirtbag.'"

Sub Event_Invite(Invite_Sentence,Invite_Person)
| - The Invite_Sentence is always the entire sentence and transfers as #0#.
/target ${Invite_Person}
/invite
/return
 
heh thats basically what i thought ok since its kicking my butt so much and still not working ill post whole macro im working with on this guy. maybe someone can spot the problem its gotta be something stupid. hope i do this right been a while. btw using this darn pull macro on a bard would love suggestions to fix it so i dont run all the way up to the stupid mob when i use boastful bellow lol.



Rich (BB code):
| Puller Macro
| Puller.mac
| Author      : Alatyami: Ripped by robdawg :Ripped by Jdelpheki :Ripped Again By hakcenter
| Version     : v3 2004-12-16 5:50pm PST
| Useage      : /macro pull
| Description : This macro will run your character around Pulling any mobs.
|      This is definitely a work in progress and I am sure
|      someone can think of plenty of upgrades for this.
| : Ripped section Jdelpheki
|      Modified for pull to area where Macro is started.  I have been using this
|      2 level 45's Cleric Running genbot and Warrior running Pull2.  Ran for 4 hours
|      Max with one cleric death. Needs Throwing weapon or arch support too
|      Needs Genbot to announce its getting hit or get a new cleric script
| : Ripped section hakcenter
|      Pulls Any Mobs within radius (regardless of level)
|      No Mob Array Required
|      Looting Added
|      *Looting -stuck on corpse bug fixed-
|      Loot Table Array Support
|      *Puller runs to pull spot after mob looting is finished
|      *Removed Target Fail Counters
|      *Checks for mobs every 30seconds, 1second 50radius checks
|      *Reformated
|      *On zoning(death whatever), quits everquest
|      *Added more checks
|
|      2004-12-11
|
|      Added some squelching, always looking for mobs within range, 5 distance intervals
|      Jacked Item Coding from Rogue Helper
|      Fixed UI locking up
|      Fixed Long Buff Casts
|      Added Disarm to the Special Combat abilities
|
|      2004-12-16
|      Revamped Close mob checking to 0.1second 100radius squelched
|      Revamped Item casting to check for local mobs during.. and interupt if mob is near 100radius
|      Removed mass escaping.. cause its retarded
|      Fixed cool errors when accidently pushing esc while on a mob
|      Fixed cool errors when accidently pushing esc while pulling a mob
|      Added 1second before first item cast, incase item is worn... you get interupted cause its too fast
|
|------------------------------------------------------------------------------------

#turbo 10
#Event Slain "#*# slain#*#"
#Event Zoned "LOADING, PLEASE WAIT..."
#Event ItemSet "[MQ2] ItemSet#*#"
#Event ItemBounce "[MQ2] ItemBounce#*#"
#Event ItemCast "[MQ2] ItemCast#*#"
#Event Invite "#1# tells you, 'Invite me dirtbag.'"


Sub Main

   |------------------------------------------------------------
   |How far would you like to target a mob?
   |------------------------------------------------------------
   /declare RV_MaxRadius        int outer  1000
   |------------------------------------------------------------
   |How far is the fast movement range?
   |------------------------------------------------------------
   /declare RV_FastRange        int outer  10
   |------------------------------------------------------------
   |How far is the maximum combat range?
   |------------------------------------------------------------
   /declare RV_RangeMax         int outer  7
   |------------------------------------------------------------
   |How far is the minimum combat range?
   |------------------------------------------------------------
   /declare RV_RangeMin         int outer  8
   |------------------------------------------------------------
   |What is the minimum Z Value of mobs I should target?
   |------------------------------------------------------------
   /declare RV_MinZRange        int outer  -1000
   |------------------------------------------------------------
   |What is the maximum Z Value of mobs I should target?
   |------------------------------------------------------------
   /declare RV_MaxZRange        int outer  100

   |------------------------------------------------------------
   |Variables that you don't need to worry about.
   |------------------------------------------------------------
   /declare RV_MyTargetID       int outer  0
   /declare RV_MyTargetName     string outer
   /declare RV_MyTargetDead     int outer  0
   /declare RV_InvalidTargetID  int outer  0
   /declare RV_HasTarget        int outer  0
   /declare RV_RandomWait       int outer  0
   /declare RV_LootSlot         int outer  0
   /declare RV_CheckLook        int outer  0
   /declare RV_Fighting         int outer  0
   /declare RV_TargetDead       int outer  0
   /declare RV_MyXLOC           int outer  0
   /declare RV_MyYLOC           int outer  0
   /declare RV_ObstacleCount    int outer  0
   /declare RV_hitcount         int outer  0
   /declare RV_healcheck        int outer  0
   /declare RT_MyXLOC           int outer  ${Me.X}
   /declare RT_MyyLOC           int outer  ${Me.Y}
   /declare Invite_Person string outer
   /declare lastevent string outer None
   /declare CheckBuffs int outer 0
   /declare i int outer
   /declare ialias string outer None
   /declare doIclick bool outer FALSE
   /declare bouncenum int outer 1
   /declare ibounce string outer None
   /declare itemspellname string outer None
   /declare clicktimer timer outer 0
   /squelch /alias /iset /echo ItemSet
   /squelch /alias /ibounce /echo ItemBounce
   /squelch /alias /iclick /echo ItemCast

   /varset CheckBuffs 1
   :Start
      /doevents
      /call GMCheck
      /call GetTarget
      /if (${RV_HasTarget}) /call Pull
      /if (${RV_HasTarget}) /call CombatSub
      /call ResetSub
      /call MoveToLoc ${RT_MyyLOC} ${RT_MyXLOC}
      /goto :Start
/return

|--------------------------------------------------------------------------------
|SUB: GMCheck
|--------------------------------------------------------------------------------
Sub GMCheck
   /if (${Spawn[gm].ID}) {
      /beep
      /beep
      /beep
      /echo GM has entered the zone!
      /echo FUCK HIM but ending the macro...
      /keypress forward
      /keypress back
      /quit
      /endmacro
   }
/return

|--------------------------------------------------------------------------------
|SUB: AquireTarget
|--------------------------------------------------------------------------------
Sub GetTarget
   /doevents
   /declare SpawnTimer         int local
   /declare RV_CurrentRadius   int local
   /declare RV_TargetSub       int local
   /echo Looking for Close Range Mobs
   :Acquire
      /doevents
      /for RV_CurrentRadius 100 to ${RV_MaxRadius} step 5
      /squelch /target radius ${RV_CurrentRadius} npc
      /varset RV_MyTargetID ${Target.ID}
      /varset RV_MyTargetDead 0
      /if (${Target.ID}) {
         /if (${Int[${Target.Z}]}<${RV_MinZRange}) {
            /echo Mob is BELOW Min Z Range, picking another...
            /varset RV_InvalidTargetID ${Target.ID}
            /call ResetSub
            /goto :Acquire
         }
         /if (${Int[${Target.Z}]}>${RV_MaxZRange}) {
            /echo Mob is ABOVE Max Z Range, picking another...
            /varset RV_InvalidTargetID ${Target.ID}
            /call ResetSub
            /goto :Acquire
         }
         /varset RV_HasTarget 1
         /varset RV_MyTargetName ${Target.Name}
         /echo Acquired ${Target.Name} at range ${Int[${Target.Distance}]}
         /return
      }

      /next RV_CurrentRadius
      /goto :Acquire
/return




Sub Event_Invite(Invite_Sentence,Invite_Person)
| - The Invite_Sentence is always the entire sentence and transfers as #0#.
/target ${Invite_Person}
/invite
/return



|--------------------------------------------------------------------------------
|SUB: Pull
|--------------------------------------------------------------------------------
Sub Pull
   /doevents
   /echo Pulling Mob
   /declare TargDist float local
   :PullLoop
      /doevents
      /if (!${Me.Combat}) /alt act 199
      /call MoveToMob
      /if (!${Target.ID}) /return
      /face fast
      /if (${Target.PctHPs}==100) /goto :PullLoop
      /if (${Target.PctHPs}<21) /return
      /call MoveToLoc ${RT_MyyLOC} ${RT_MyXLOC}
      /if (!${Target.ID}) /return
      /face fast
   :Engage
      /varset TargDist ${Math.Distance[${Target.Y},${Target.X},0:${Me.Y},${Me.X},0]}
      /if ( ${TargDist}<70 ) /return
      /delay 1s
      /goto :Engage
/return

|--------------------------------------------------------------------------------
|SUB: MovetoMob
|--------------------------------------------------------------------------------
Sub MoveToMob
   /doevents
   /varset RV_MyXLOC ${Int[${Me.X}]}
   /varset RV_MyYLOC ${Int[${Me.Y}]}
   /varset RV_ObstacleCount 0
   :MovementLoop
      /doevents
      /if (!${Target.ID}) /return
      /face fast
      /varcalc RV_ObstacleCount ${RV_ObstacleCount}+1
      /if (${Int[${Target.Distance}]}>${RV_FastRange}) /keypress forward hold
      /if (${Int[${Target.Distance}]}<${RV_FastRange}&&${Int[${Target.Distance}]}>${RV_RangeMax}) /keypress forward
      /if (${Int[${Target.Distance}]}<${RV_RangeMin}) /keypress back
      /if (${RV_ObstacleCount}>=15) {
         /call CheckObstacle
         /goto :Movementloop
      }
      /if (${Int[${Target.Distance}]}>${RV_FastRange}) /goto :MovementLoop
/return

|--------------------------------------------------------------------------------
|SUB: MoveToLocation
|--------------------------------------------------------------------------------
Sub MoveToLoc(MoveToY, MoveToX)
   /doevents
   /declare running int local
   /declare distanceNow float local
   /declare distanceBefore float local
   /declare distanceModifier int local
   /declare distanceTimer timer 15
   /varset running 0
   /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
   /varset distanceModifier 1
   /echo Moving to Location: ${MoveToY}, ${MoveToX}.
   /echo Distance: ${distanceBefore}
   :moveToLocation
      /doevents
      /face fast nolook loc ${MoveToY},${MoveToX}
      /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<10) {
         /keypress forward
         /return
      }
      /if (${distanceTimer}==0) {
         /if (${Me.Sneaking}) {
            /varset distanceModifier 2
         } else {
            /varset distanceModifier 1
         }
         /varset distanceNow ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
         /if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) {
         /call HitObstacle
         }
         /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
         /varset distanceTimer 15
      }
      /if (${running}==0) {
         /keypress forward
            /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}>10) {
               /varset running 1
               /keypress forward hold
            }
      } else {
         /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<11) {
            /varset running 0
            /keypress forward
         }
      }
      /goto :moveToLocation
/return

|--------------------------------------------------------------------------------
|SUB: ObstacleCheck
|--------------------------------------------------------------------------------
Sub CheckObstacle
   /doevents
   /if ((${RV_MyXLOC}==${Int[${Me.X}]})&&(${RV_MyYLOC}==${Int[${Me.Y}]})) /call HitObstacle
   /varset RV_MyXLOC ${Int[${Me.X}]}
   /varset RV_MyYLOC ${Int[${Me.Y}]}
   /varset RV_ObstacleCount 0
/return

|--------------------------------------------------------------------------------
|SUB: ObstacleAvoidance
|--------------------------------------------------------------------------------
Sub HitObstacle
   /echo Obstacle hit, moving around it...
   /keypress forward
   /keypress back hold
   /delay 3
   /keypress back
   /if (${Math.Rand[2]}) {
      /keypress strafe_right hold
   } else {
      /keypress strafe_left hold
   }
   /delay 5
   /keypress strafe_right
   /keypress strafe_left
   /keypress forward hold
/return

|--------------------------------------------------------------------------------
|SUB: Combat
|--------------------------------------------------------------------------------
Sub CombatSub
   /doevents
   /varset RV_Fighting 1
   /varset RV_TargetDead 0
   /echo Attacking Mob NOW!
   :CombatLoop
      /if (${Me.Combat} && ${Me.XTarget} > 1 &&  ${SpawnCount[npc radius 35]}>1) /multiline ; /if (!${Defined[mezd]}) /declare mezd timer outer 0 ; /if (${mezd}==0) /twist once 11 ;  /if (${mezd}==0) /varset mezd 50
      /if (!${Me.Combat}) /keypress 1
      /if (!${Target.ID}) /return
      /call MoveToMob
      /call SpecialIT
      /if (!${RV_TargetDead}) /goto :CombatLoop
      /doevents
/keypress esc
/return

|--------------------------------------------------------------------------------
|SUB: SpecialCombat
|--------------------------------------------------------------------------------
Sub SpecialIt
   /doevents
   /declare TempID    int inner  0

   /if (${Target.Distance}<=17 && ${Me.AbilityReady[Disarm]}) {
      /doability "Disarm"
   }
   /if (${Target.Distance}<=17 && ${Me.AbilityReady[Taunt]}) {
      /doability "Taunt"
   }
   /if (${Target.Distance}<=17 && ${Me.AbilityReady[Bash]}) {
      /doability "Bash"
   }
/return

|--------------------------------------------------------------------------------
|SUB: Slain
|--------------------------------------------------------------------------------

Sub Event_Slain
   /varset RV_TargetDead 1
   /varset RV_Fighting 0
   /attack off
   /target clear
   /keypress forward
   /keypress back
   /squelch /target radius 30 corpse
   /face fast
/keypress esc
/keypress 2
/return

|--------------------------------------------------------------------------------
|SUB: Zoned
|--------------------------------------------------------------------------------
Sub Event_Zoned
  /echo Zoned
  /delay 60s
  /quit
  /endmacro

|--------------------------------------------------------------------------------
|SUB: Looting
|--------------------------------------------------------------------------------
Sub LootMob
   /doevents
   /call AutoLoot
/return

|--------------------------------------------------------------------------------
|SUB: Reset
|--------------------------------------------------------------------------------
Sub ResetSub
   /doevents
   /varset RV_HasTarget 0
   /varset RV_TargetDead 0
   /varset RV_Fighting 0
/return
 
oh and for some reason that macro just stops pulling half the time if anyone can figure out that one shrug lol forgive me 10 glasses of wild turkey and coke and i suck :) really appreciate the help though guys
 
No promises but here is one of my older revised ones. It works or it doesn't good luck.


Rich (BB code):
| Puller Macro
| Puller.mac
| Revised: by Maskoi
| Author  Alatyami: Ripped by robdawg :Ripped by Jdelpheki :Ripped Again By hakcenter

#turbo 40

#Event Slain "#*# slain#*#"
#Event Slain "#*#You gain#*#experience#*#"
#Event Zoned "LOADING, PLEASE WAIT..."
#Event CantSee "You cannot see your target."

#include spell_routines.inc 
#include Ninjadvloot.inc

Sub Main

|-------------------------------------------------------------------------------------
| Select Pull AA (Alt Ability), Disc (Combat Ability) or Weapon
| Pull with 0=melee 1=Alt Ability 2=spell 3=disc/combat ability  4=ranged attacked
|-------------------------------------------------------------------------------------
	/declare PullMethod         		int 	outer	1
	/declare PullAA           			string 	outer	Boastful Bellow
	/declare PullCombatAbility        	string 	outer	Throw Stone
	/declare PullSpell			        string 	outer	Sha's Revenge
	/declare PullSpellGem				int 	outer	7
    /declare PullRangedItem          	string 	outer	Bloodfiend's Throat Gem
	/declare DoRangedSwap       		int 	outer	0
    /declare EquippedRangedItem       	string 	outer	Tiny Tomes of Understanding
|-------------------------------------------------------------------------------------
| Group Main Assist Name, Mana/Endurance check to stop and resume pulling
|-------------------------------------------------------------------------------------
	/declare MainAssist 				string 	outer	TankName
	/declare DoMACheck    				int 	outer	0
|-------------------------------------------------------------------------------------
| Group Healer Name, Mana check to stop and resume pulling
|-------------------------------------------------------------------------------------
	/declare DoHealerCheck    			int 	outer	0
	/declare HealerName		        		string 	outer	HealerName
|-------------------------------------------------------------------------------------
|  Clickys
|-------------------------------------------------------------------------------------
	/declare DoClicky 					int 	outer 	1
	/declare ClickyItem[8]  			string 	outer
	/varset ClickyItem[1]				Phosphorescent Rapier of Dazzling Light
	/varset ClickyItem[2]				Kemph's Bonded Girdle
	/varset ClickyItem[3]				Earring of the Attendants
	/varset ClickyItem[4]				NULL
	/varset ClickyItem[5]				NULL
	/varset ClickyItem[6]				NULL
	/varset ClickyItem[7]				NULL
	/varset ClickyItem[8]				NULL
	/declare DoAura 					int 	outer 	1
	/declare Aura 						string 	outer 	Aura of the Poet

|-------------------------------------------------------------------------------------
| How far would you like to target a mob?
|-------------------------------------------------------------------------------------
	/declare MaxRadius        			int 	outer	425
|-------------------------------------------------------------------------------------
| What is the minimum Z Value of mobs I should target?
|-------------------------------------------------------------------------------------
	/declare MinZRange        			int 	outer	-10
|-------------------------------------------------------------------------------------
| What is the maximum Z Value of mobs I should target?
|-------------------------------------------------------------------------------------
	/declare MaxZRange        			int 	outer	10
|-------------------------------------------------------------------------------------
| Attack mob after returning to camp Hps % and distance
|-------------------------------------------------------------------------------------
	/declare EngageHPs          		int 	outer	97
	/declare EngageDistance     		int 	outer	85
|-------------------------------------------------------------------------------------
| Variables that you don't need to worry about.
|-------------------------------------------------------------------------------------
   	/declare DoLoot						int 	outer	0
	/declare FastRange					int 	outer	15
	/declare Combat_RangeMin			int 	outer	15
	/declare Combat_RangeMax			int 	outer	20
	/declare HasTarget					int 	outer	0
	/declare RandomWait					int 	outer	0
	/declare Fighting					int 	outer	0
	/declare TargetDead					int 	outer	0
	/declare MyXLOC						int 	outer	0
	/declare MyYLOC						int 	outer	0
	/declare ObstacleCount				int 	outer	0
	/declare CampXLoc					int 	outer   ${Me.X}
	/declare CampYLoc					int 	outer   ${Me.Y}
	/declare MinRadius					int 	outer   0
	/declare TargetChecked				int 	outer
	/declare WaitingSpam				int 	outer   1
	/declare Exchanged					int 	outer   0
	/declare Pulled						int 	outer   0   
	/declare PullRange					int 	outer
	/declare PullWith					string	outer   
	/declare PullSub					string	outer   
	/declare PullType					string	outer
	/declare LookForward				int		outer	${Me.Heading.DegreesCCW}
	/declare HasAdds	 				int		outer   0 
	/declare LoS		 				int		outer   0 
	/declare MAClass					string 	outer 	${Spawn[${MainAssist}].Class.ShortName}
	/declare HealerClass				string 	outer 	${Spawn[${HealerName}].Class.ShortName}	
	/call SetupAdvLootVars
	
	/if (${PullMethod}==0) {
		/varset PullRange 10
		/varset PullSub Pull_Cast
		/varset PullWith Melee
		/varset PullType 0
	} else /if (${PullMethod}==1) {
		/varset PullRange ${Math.Calc[${Spell[${Spell["${PullAA}"].ID}].Range}/5]}
		/varset PullSub Pull_Cast
		/varset PullWith ${PullAA}
		/varset PullType alt
	} else /if (${PullMethod}==2) {
		/varset PullRange  ${Math.Calc[${Spell[${Spell["${PullSpell"].ID}].Range}/9]}
		/varset PullSub Pull_Cast
		/varset PullWith  ${PullSpell}
		/varset PullType gem${PullSpellGem}
	} else /if (${PullMethod}==3) {   
		/varset Pulling_method ${}   
	} else /if (${PullMethod}==4) {
		/varset Pulling_method ${}  
	}
	
	/call MainAssist
	
|-------------------------------------------------------------------------------------
| SUB: Main Loop
|-------------------------------------------------------------------------------------
	:Mainloop
   
		/doevents
		/call CheckForAdds
		/call DoWePause
		/call CheckClicky
		/call CastAura
		/call GetTarget
		/call Pull
		/call Combat
		/call LootStuff
		/call MoveToCamp
		/call ResetSub

	/goto :Mainloop
	/return

|-------------------------------------------------------------------------------------
| SUB: MainAssist Sets main Assist for puller if there is one
|-------------------------------------------------------------------------------------
	Sub MainAssist
		/declare i int local
		/if (!${Defined[Param0]}) {
			/for i 1 to ${Group}
				/if (${Group.Member[${i}].MainTank} && ${Group.Member[${i}].ID}) {
					/varset MainAssist ${Group.Member[${i}].CleanName}
					/echo  +++ Found Main Tank role. +++
					/goto :setM_Assist
				}
			/next i
		} 
		/if (${Defined[Param0]}) {
			/varset MainAssist ${Param0} 
			/goto :setM_Assist
		}
		/if (!${Spawn[${Target}].ID} || !${Select[${Target.Type},Mercenary,PC,Pet]}) {
			/echo You do not have a Mercenary, PC or Pet targeted using default Main Assist: ${MainAssist}.
			/goto :setM_Assist
		}
		/if (${Target.CleanName.Equal[${Me.CleanName}]}) { 
			/echo You cannot assist yourself!
			/goto :setM_Assist
		} 
		/varset MainAssist ${Target.CleanName}
		:setM_Assist
		/echo Assist set to >> ${MainAssist} <<
	/return
	 
|-------------------------------------------------------------------------------------
| SUB: AquireTarget
|-------------------------------------------------------------------------------------
	Sub GetTarget
		/doevents
		/declare CurrentRadius   int local
		/echo Looking for Close Range Mobs
		:Acquire
			/doevents
			/for CurrentRadius ${Min_Radius} to ${MaxRadius} step 5
			/squelch /target radius ${CurrentRadius} npc noalert 1

			/if (${Target.ID}) {
				/if (${Select[${Target.Type},PC,Pet,CORPSE,CHEST,TRIGGER,TRAP,TIMER,ITEM,MOUNT,Mercenary]} || !${Target.LineOfSight} || ${Target.PctHPs}<=95 || ${SpawnCount[loc ${Target.X} ${Target.Y} radius 25 pc]}>=1) {
					/squelch /alert add 1 id ${Target.ID}
					/call ResetSub 
					/goto :Acquire
				}
				
				/varset HasTarget 1
				/varset LoS 1
				/echo Acquired ${Target.CleanName} at range ${Int[${Target.Distance}]}
				/return
			}
			| Reset search radius if it gets larger that MaxRadius
			/if (${CurrentRadius}>=${MaxRadius}) {
				/if (${SpawnCount[radius ${MaxRadius} npc noalert 1]}==0) /call AlertClear
				/varset MinRadius 0
			}
			/next CurrentRadius
		/goto :Acquire
	/return

|-------------------------------------------------------------------------------------
| SUB: Pull
|-------------------------------------------------------------------------------------
	Sub Pull
		/if (!${HasTarget}) /return
		/doevents
		/echo Pulling Mob
		/declare TargDist float local
		:PullLoop
			/doevents
			/call MoveToMob_Pull
			/if (!${Target.ID}) /return
			/face fast
			/if (${Int[${Target.Distance}]}<10 && ${Pulled}) /goto :MoveTo
		/if (${Target.PctHPs}==100 ) /goto :PullLoop
				/if (${Target.PctHPs}<21) /return
		:MoveTo
			/call MoveToLoc ${CampYLoc} ${CampXLoc}
			/if (!${Target.ID}) /return
			/face fast
		:Engage
			/if (${Spawn[${MainAssist}].ID}) 	/assist ${MainAssist}
			/varset TargDist ${Math.Distance[${Target.Y},${Target.X},0:${Me.Y},${Me.X},0]}
			/if (${TargDist}<${EngageDistance} && ${Target.PctHPs}<${EngageHPs}) /return
		/goto :Engage
	/return

|-------------------------------------------------------------------------------------
| SUB: MovetoMob_Pull
|-------------------------------------------------------------------------------------
	Sub MoveToMob_Pull
		/doevents
		/varset MyXLOC ${Int[${Me.X}]}
		/varset MyYLOC ${Int[${Me.Y}]}
		/varset ObstacleCount 0
		:MovementLoop
			/doevents
			/if (!${Target.ID}) /return
			/face fast 
			/varcalc ObstacleCount ${ObstacleCount}+1
			/if (${Int[${Target.Distance}]}>${PullRange}) /keypress forward hold
			/if (${Int[${Target.Distance}]}<${PullRange}) /keypress back     
			/if (${ObstacleCount}>=15) {
				 /call CheckObstacle
				 /goto :Movementloop
			}
		/if (${Target.LineOfSight}) /call ${PullSub} "${PullWith}" "${PullType}"
	/return

|-------------------------------------------------------------------------------------
| SUB: MovetoMob
|-------------------------------------------------------------------------------------
	Sub MoveToMob
		/doevents
		/varset MyXLOC ${Int[${Me.X}]}
		/varset MyYLOC ${Int[${Me.Y}]}
		/varset ObstacleCount 0
		:MovementLoop
			/doevents
			/if (!${Target.ID}) /return
			/face fast
			/varcalc ObstacleCount ${ObstacleCount}+1
			/if (${Int[${Target.Distance}]}>${FastRange}) /keypress forward hold
			/if (${Int[${Target.Distance}]}<${FastRange} && ${Int[${Target.Distance}]}>${Combat_RangeMax}) /keypress forward
			/if (${Int[${Target.Distance}]}<${Combat_RangeMin}) /keypress back
			/if (${ObstacleCount}>=15) {
				/call CheckObstacle
				/goto :Movementloop
			}
		/if (${Int[${Target.Distance}]}>${FastRange}) /goto :MovementLoop
	/return

|-------------------------------------------------------------------------------------
| SUB: MoveToLocation
|-------------------------------------------------------------------------------------
	Sub MoveToLoc(MoveToY, MoveToX)
		/doevents
		/declare running int local
		/declare distanceNow float local
		/declare distanceBefore float local
		/declare distanceModifier int local
		/declare distanceTimer timer 15
		/varset running 0
		/varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
		/varset distanceModifier 1
		/echo Moving to Location: ${MoveToY}, ${MoveToX}.
		/echo Distance: ${distanceBefore}
		:moveToLocation
			/doevents
			/face fast nolook loc ${MoveToY},${MoveToX}
			/if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<10) {
				/keypress forward
				/return
			}
			/if (${distanceTimer}==0) {
				/if (${Me.Sneaking}) {
					/varset distanceModifier 2
				} else {
					/varset distanceModifier 1
				}
				/varset distanceNow ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
				/if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) {
					/call HitObstacle
				}
				/varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
				/varset distanceTimer 15
			}
			/if (${running}==0) {
				/keypress forward
				/if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}>10) {
					/varset running 1
					/keypress forward hold
				}
			} else {
				/if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<11) {
					/varset running 0
					/keypress forward
				}
			}	
		/goto :moveToLocation
	/return

|-------------------------------------------------------------------------------------
| SUB: ObstacleCheck
|-------------------------------------------------------------------------------------
	Sub CheckObstacle
	   /doevents
	   /if ((${MyXLOC}==${Int[${Me.X}]})&&(${MyYLOC}==${Int[${Me.Y}]})) /call HitObstacle
	   /varset MyXLOC ${Int[${Me.X}]}
	   /varset MyYLOC ${Int[${Me.Y}]}
	   /varset ObstacleCount 0
	/return

|-------------------------------------------------------------------------------------
| SUB: ObstacleAvoidance
|-------------------------------------------------------------------------------------
	Sub HitObstacle
		/echo Obstacle hit, moving around it...
		/keypress forward
		/keypress back hold
		/delay 3
		/keypress back
		/if (${Math.Rand[2]}) {
			/keypress strafe_right hold
		} else {
			/keypress strafe_left hold
		}
		/delay 5
		/keypress strafe_right
		/keypress strafe_left
		/keypress forward hold
	/return

|-------------------------------------------------------------------------------------
| SUB: Combat
|-------------------------------------------------------------------------------------
	Sub Combat
		/if (!${HasTarget} && !${HasAdds}) /return
		/doevents
		/varset Fighting 1
		/varset TargetDead 0
		/echo Attacking Mob NOW!
		/if (${Spawn[MainAssist].ID}) /assist ${MainAssist}
		/if (!${Me.Combat}) /attack on
		:CombatLoop
			/doevents Slain
			/if (!${Target.ID}) /return
			/if (${Target.Distance}>20) /call MoveToMob
		/if (!${TargetDead}) /goto :CombatLoop

	/return

|-------------------------------------------------------------------------------------
| SUB: Event Slain
|-------------------------------------------------------------------------------------
	Sub Event_Slain
		/varset TargetDead 1
		/varset Fighting 0
		/varset Pulled 0
		/attack off
		/squelch /target clear
	/return

	
|-------------------------------------------------------------------------------------
| SUB: Event Can't See
|-------------------------------------------------------------------------------------
	Sub Event_CantSee
	/if (${HasTarget} && ${LoS}) /varset PullRange 20
	/return	

|-------------------------------------------------------------------------------------
| SUB: MovetoCamp
|-------------------------------------------------------------------------------------
	Sub MoveToCamp
			/if (${HasAdds}) /return
			/if (${Math.Distance[${CampYLoc}, ${CampXLoc}]} > 5) /call MoveToLoc ${CampYLoc} ${CampXLoc}
			/face fast heading ${LookForward}
	/return

|-------------------------------------------------------------------------------------
| SUB: Zoned
|-------------------------------------------------------------------------------------
	Sub Event_Zoned
	  /echo Zoned
	  /delay 60s
	  /endmacro
  
|-------------------------------------------------------------------------------------
| SUB: alert clear
|-------------------------------------------------------------------------------------
	Sub AlertClear
		/echo Clearing Alert list.
		/squelch /alert clear 1
	/return

|-------------------------------------------------------------------------------------
| SUB: Reset
|-------------------------------------------------------------------------------------
	Sub ResetSub
		/doevents
		/varset HasTarget 0
		/varset TargetDead 0
		/varset Fighting 0
		/varset Exchanged 0
		/varset Pulled 0
		/varset LoS 0
		/squelch /target clear
		/delay 1s
	/return

|-------------------------------------------------------------------------------------
| SUB: CheckHealerMana
|-------------------------------------------------------------------------------------
	Sub CheckHealerMana
		/if (!${DoHealerCheck} || ${Group.Member[${Spawn.[group clr]}].CurrentMana}>${HealerManaPause}) /return

		:wait_for_healer

		/if (${Group.Member[${Group.Member[${HealerName}]}].CurrentMana}<${HealerManaResume}) /goto :wait_for_healer
	/return
	
|-------------------------------------------------------------------------------------
| SUB: CheckMAEnd
|-------------------------------------------------------------------------------------
	Sub CheckMAEnd
		/if (!${DoMACheck} || ${Group.Member[${Group.Member[${MainAssist}]}].CurrentEndurance}>${MAEndPause})  /return
		/declare WaitingSpam int local 0
		:wait_for_ma
			/if (${WaitingSpam}) {
				/echo Waiting for MA to med up. ${MainAssist} has ${Group.Member[${Group.Member[${MainAssist}]}].CurrentEndurance}% End
				/varset WaitingSpam 0
				/timed 600 /varset WaitingSpam 1
			}
		/if (${Group.Member[${Group.Member[${MainAssist}]}].CurrentEndurance}<${MAEndResume}) /goto :wait_for_ma
	/return

|--------------------------------------------------------------------------------
| SUB: Pull_Cast
|--------------------------------------------------------------------------------
Sub Pull_Cast
	/if (${Pull_With}=1 && ${Me.AltAbilityReady[${Pull_Alt_Ability}]}) {
	/alt act ${Me.AltAbility[${Pull_Alt_Ability}].ID}
	} else /if (${Pull_With}=2 && ${Me.CombatAbilityReady[${Pull_Combat_Ability}]}) {
        /ability ${Me.CombatAbility[${Pull_Combat_Ability}].ID}
	} else /if (${Pull_With}=3 && ${Me.SpellReady[${Pull_Spell}]}) {
        /call cast ${Pull_Spell} ${PullSpellGem} 3s
	}
/varset Pulled 1
/return

|-------------------------------------------------------------------------------------
| SUB: Equip_Ranged
|-------------------------------------------------------------------------------------
	Sub Equip_Ranged
		/if (${String[${Me.Inventory[ranged]}].NotEqual[${PullRangedItem}]}) {
			/exchange "${PullRangedItem}" ranged
			/varset Exchanged 1
		}
		/delay 5s 
		/if (${Exchanged}) /exchange "${EquippedRangedItem}" ranged
	/return
 
|-------------------------------------------------------------------------------------
| SUB: CheckClicky
|-------------------------------------------------------------------------------------
	Sub CheckClicky
	| /echo enter clicky 
	/if (!${DoClicky}) /return
	/declare i int local 1
	 | /echo leave clicky
	/if (${Me.Pet.CleanName.Equal[${Me.Name}`s familiar]}) /pet get lost
		/for i 1 to ${ClickyItem.Size}
		 | /echo ${i} ${ClickyItem[${i}]}  && ${NearestSpawn[NPC].Distance}>=25  Kemph's Bonded Girdle
			/if (${FindItemCount[${ClickyItem[${i}]}]}<=0) /next i
			| /if (${FindItemCount[${ClickyItem[${i}]}]}) /keypress OPEN_INV_BAGS
			/delay 1s
			/if (${FindItem[${ClickyItem[${i}]}].Spell.Stacks[0]} && !${Me.Buff[${FindItem[${ClickyItem[${i}]}].Spell}].ID}) {
			/call SwapItem "${ClickyItem[${i}]}" ${FindItem[${ClickyItem[${i}]}].WornSlot[1]}
			/delay 1s
			/autoinventory
			/squelch  /if (${Me.Class.ShortName.Equal[BRD]}) /twist off
			/target myself
			/delay 1s
			/call Cast "${ClickyItem[${i}]}" item 5s
		}
		
		/next i
		/squelch /if (${Me.Class.ShortName.Equal[BRD]}) /twist 
	/return

|-------------------------------------------------------------------------------------
| SUB: Cast Aura
|-------------------------------------------------------------------------------------
	Sub CastAura
		/if (!${DoAura}) /return
		| - Mutant Bards do this
		/if (!${Me.Song[${Aura} Effect].ID}) {
				/if (${Me.Class.ShortName.Equal[BRD]}) {
				/if ( !${Me.Gem[${Aura}]} ) {
					/memspell 8 "${Aura}"
					/delay 30
				}	
				/twist once ${Me.Gem[${Aura}]}
				/return
			}
			| - Normal casting
			/call cast "${Aura}" gem8 5s
			/delay 5s
		}
	/return

|-------------------------------------------------------------------------------------
| SUB: Check for adds
|-------------------------------------------------------------------------------------
	Sub CheckForAdds
		/if (${Me.XTarget} < 1) /return
		/varset HasAdds 1
		/popup Add in camp detected 
		:moreadds
			/delay 5
			/if (${Spawn[${MainAssist}].ID}) {
				/assist ${MainAssist}
			} else {
				/target id ${Me.XTarget[1].ID}
			}
			/call Combat
		/if (${Me.XTarget} > 0) /goto :moreadds
		/varset HasAdds 0
	/return

|-------------------------------------------------------------------------------------
| SUB: Loot Stuff
|-------------------------------------------------------------------------------------
	Sub LootStuff
		/if (!${DoLoot}) /return
		/call Lootmobs
	/return
	
|-------------------------------------------------------------------------------------
| SUB: DoWePause
|-------------------------------------------------------------------------------------
	Sub DoWePause
		/call CheckStats ${DoMACheck} "${MainAssist}" "${MAClass}" Endurance 80 90
		/call CheckStats ${DoHealerCheck} "${HealerName}" "${HealerClass}" Mana 20 90
	/return
	
|-------------------------------------------------------------------------------------
| SUB: CheckStats
|-------------------------------------------------------------------------------------
	Sub CheckStats(int statcheck, charname, ckclass, stat, int pause,int resume)
		/if (!${statcheck} || !${Spawn[${ckclass} ${charname}].ID} || ${Group.Member[${Group.Member[${Spawn[Group ${ckclass} ${charname}]}]}].Current${stat}}>${pause}) /return
		/echo Waiting for ${charname} to med up to ${resume}% ${stat}
		:wait_for_resume
		/if (${Group.Member[${Group.Member[${Spawn[Group ${ckclass} ${charname}]}]}].Current${stat}}<${resume}) /goto :wait_for_resume
		/echo ${charname} is now above ${resume}% ${stat} resuming macro
	/return
 
/inviting a friend

Users who are viewing this thread

Back
Top
Cart