• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

[GKPRO] aka Ghost Kill Pro by Pdub (1 Viewer)

pdub87

New member
Joined
Sep 30, 2009
RedCents
Here's a pretty kickass GHOST KILLING macro I wrote. You need a GHOST KILL plugin for this to work. If they are still available.I don't play EQ anymore, so this is Provided as is, I commented as much as I could. You're going to have to change a lot of the settings variables to get it to work. It works best if you can warp OUTSIDE the boundaries of the map, or in a corner of the map far away from the mobs.

Good luck (LOL) and enjoy... if you have what it takes to get it working :)

Rich (BB code):
| =========================================================================================
| GHOSTKILL PRO - (GKPRO.MAC) 
| 	by Pdub
| =========================================================================================
| EVENTS 

#event Melee "You #1# #*# for #*# points of damage."
#event MeleeMiss "You try to #1# #*#, but #*#!"

Sub Event_Melee(MeleeText, AttackType)
	| If we hit the mob with something other than backstab its 'attackable'
	/if (${String[${AttackType}].NotEqual["backstab"]}) {
		| mob is attackable
		/varset TargetAttackable 1
		/varcalc MeleeAttacks ${MeleeAttacks}+1
	}
/return

Sub Event_MeleeMiss(MeleeText, AttackType)
	| If we hit the mob with something other than backstab its 'attackable'
	/if (${String[${AttackType}].NotEqual["backstab"]}) {
		| mob is attackable
		/varset TargetAttackable 1
		/varcalc MeleeAttacks ${MeleeAttacks}+1
	}
/return

Sub Main
| ==========================================================================================
| MOB / TARGET SETTINGS

| MobsToKillCount: the total number of elements (mobs) in MobsToKill
/declare MobsToKillCount int outer 3

| MobsToKill: string array containing partial or full names of mobs to target.
/declare MobsToKill[${MobsToKillCount}] string outer

| MobsToKill mobs: List of mob names to pull. (in order)
/varset MobsToKill[1] "Hand of"
/varset MobsToKill[2] "mummy"
/varset MobsToKill[3] "efreeti"

| ==========================================================================================
| PULL / SAFETY SETTINGS

| ZWarp - are we ZWarping or not
/declare ZWarping int outer 0

| PlayerTooCloseDist: Skips targets that are nearby players, or if players are nearby you.
| (Ingame setting: Actor Clip Plane. Default is around 500, maximum setting is about 1017)
/declare PlayerTooCloseDist float outer 650

| MinTargetDistance: only pull targets that are beyond this distance
/declare MinTargetDistance int outer 1100

| PCsAllowed: the number of player characters allowed in your zone before the macro waits
/declare PCsAllowed int outer 100

| Friends: characters that your macro doesn't avoid. Group mates / leechers, other macroers, whatever
/declare FriendCount int outer 1
/declare MyFriends[${FriendCount}] string outer 
/varset MyFriends[1] "Somefriend"

| ==========================================================================================
| LOOT SETTINGS

| Looting: 1=YES, 0=NO
/declare Looting int outer 1

| LootMode: 1=PLAT, 2=ALL, 3=SMART LOOT
/declare LootMode int outer 3

| MinLootValue: (Smart Loot) Items must be worth this much COPPER for you to loot them.
/declare MinLootValue int outer 10000

| ItemsToLootCount: the total number of elements (items) in ItemsToLoot
/declare ItemsToLootCount string outer 25

| ItemsToLoot: string array containing partial or full names of items you want to always loot
/declare ItemsToLoot[${ItemsToLootCount}] string outer

| ItemsToLoot items:
/varset ItemsToLoot[1] Spell
/varset ItemsToLoot[2] Song
/varset ItemsToLoot[3] Archaic
/varset ItemsToLoot[4] Girdle of Command
/varset ItemsToLoot[5] Bloodreaper
/varset ItemsToLoot[6] Ring of the Reaper
/varset ItemsToLoot[7] Veschtar's Ring of Reaping
/varset ItemsToLoot[8] Barrelbreaker
/varset ItemsToLoot[9] Fang Flesh Belt
/varset ItemsToLoot[10] Warband
/varset ItemsToLoot[11] Snakefang
/varset ItemsToLoot[12] Butcher's band
/varset ItemsToLoot[13] Thrallbond Belt
/varset ItemsToLoot[14] Thrallmaster Belt
/varset ItemsToLoot[15] Snakehandler Belt
/varset ItemsToLoot[16] Fangskin Belt
/varset ItemsToLoot[17] Band of
/varset ItemsToLoot[18] Deadclaw
/varset ItemsToLoot[19] AA
/varset ItemsToLoot[20] Tome
/varset ItemsToLoot[21] Xanth
/varset ItemsToLoot[22] Band of Binding
/varset ItemsToLoot[23] Signet
/varset ItemsToLoot[24] Longfang
/varset ItemsToLoot[25] Mask

| ==========================================================================================
| COMBAT SETTINGS 

| HurtHP: The percentage of health you will stop attacking and heal
/declare HurtHP int outer 50

| MobHealTolerance: the amount of healing before you give up on a mob
/declare MobHealTolerance int outer 35

| AACount - how many AA abilitys / elements in AAsToUse
/declare AACount int outer 3

| AAsToUse - string array containing full names of aas to use
/declare AAsToUse[${AACount}] string outer

| AAsToUse list - Format:  Name#ID
/varset AAsToUse[1] Rogue's Fury#3514
/varset AAsToUse[2] Envenomed Blades#3515
/varset AAsToUse[3] Fundament: Third Spire of The Rake#1412

| ==========================================================================================
| ITEM BUFF SETTINGS

| UseItemBuffs - do you want to use item buffs
/declare UseItemBuffs int outer 1

| ItemBuffsCount - how many different item buffs you want to use
/declare ItemBuffsCount int outer 3

| ItemBuffs - array 
/declare ItemBuffs[${ItemBuffsCount}] string outer

| ItemBuffs - list (format:  Item#Buff#CastTime)
/varset ItemBuffs[1] Diazophire Earring#Savage Guard#2
/varset ItemBuffs[2] Band of Subterfuge#Taelosian Guard#4
/varset ItemBuffs[3] Eyepatch of Plunder#Captain Nalot's Quickening#5

| ==========================================================================================
| POTION / POISON SETTINGS

| UseHealPots: 0=NO, 1=YES
/declare UseHealPots int outer 0

| HealPotSlot: set to the potion belt slot with your healing potion.
/declare HealPotSlot int outer 3

| HealPotBuff: set to the spell effect / buff name of the actual healing pot spell effect.
/declare HealPotBuff string outer "Elixir of Healing XII"

| PotionAtPctHPs - use potion when below ths health percent
/declare PotionAtPctHPs int outer 80

| UsePoison: Use poisons (rogue)
/declare UsePoison int outer 1

| PoisonSlot: The slot of your poison on your potion belt
/declare PoisonSlot int outer 1

| PoisonBuff: The spell effect / buff name of your poison 
/declare PoisonBuff string outer "Bite of the Shissar Poison VIII"

| UseHastePotion: 0=NO, 1=YES
/declare UseHastePotion int outer 0

| HastePotionSlot: The potion belt slot of your haste potion
/declare HastePotionSlot int outer 2

| HastePotionBuff: The spell effect / buff name of your haste potion
/declare HastePotionBuff string outer "Elixir of Speed X"

| =============================================================================
| INTERNAL VARIABLES ... leave be
| =============================================================================
/declare CurrentTarget int outer 0
/declare CombatDuration int outer 0
/declare TargetHPLastTick int outer 0
/declare TargetHPCurrent int outer 0
/declare TargetHPMin int outer 0
/declare TargetHPDelta int outer 0
/declare MeleeAttacks int outer 0

/declare BadTargets[255] int outer 0
/declare BadTargetCount int outer 0

/declare TargetAttackable int outer 0
/declare BadTargetTolerance int outer 5

/declare HealWaiting int outer 0
/declare HealWarned int outer 0
/declare PlayerWarned int outer 0
/declare PlayerWaiting int outer 0

/declare FindBadTargetCtr int outer 1
/declare MobToKillCtr int outer 1
/declare SpawnCtr int outer 1
/declare NearCtr int outer 1
/declare ItemCtr int outer 0
/declare ItemCount int outer 0
/declare FriendCtr int outer 1
/declare PlayerCtr int outer 1
/declare PlayerCtr2 int outer 1
/declare PlayerCtr3 int outer 1
/declare PlayerId int outer 0
/declare AACtr int outer 1
/declare X1 float outer 0
/declare Y1 float outer 0
/declare X2 float outer 0
/declare Y2 float outer 0
/declare dX float outer 0
/declare dY float outer 0
/declare Distance float outer 0

/declare ReturnX float outer 
/declare ReturnY float outer 
/declare ReturnZ float outer

/declare CorpseCtr int outer

/declare MyZone string outer

| ------------------------------------------------------------------
| ONCE UPON A TIME SHIT

| If we're ZWarping lets do it
/if (${ZWarping}) {
	/squelch /setgrav 0
	/squelch /zwarp 2000	
}

| set up to loot
/squelch /hidecorpse all
/squelch /hidecorpse none
/squelch /hidecorpse looted

| ------------------------------------------------------------------
| MAIN LOOP
:mainloop
	/call GMCheck
	/call ZoneCheck
	/call PlayerCheck
	/call BuffCheck
	/call FindTarget
	/delay 1s
	/goto :mainloop
/return

| --------------------------------------------------------------------
| FIND TARGET
Sub FindTarget
	/varset MobToKillCtr 1
	/squelch /nauto off

	| for each element in MobsToKill
	:MobToKillLoop
		/varset SpawnCtr 1
		
		/if (${SpawnCount[npc ${MobsToKill[${MobToKillCtr}]}]} > 0) {
			| there are mobs of this type spawned.
			:SpawnLoop
				| target mob
				/target ${NearestSpawn[${SpawnCtr}, npc ${MobsToKill[${MobToKillCtr}]}]}
				/delay 1

				| do we have a target?
				/if (${Target.Level} != NULL) {
					| distance check
					/if (${Target.Distance} > ${MinTargetDistance}) {
						| check for bad target
						/call FindBadTarget ${Target.ID}
						/if (${Macro.Return} == 0) {
							| not a bad target yet.
							| check for player too close to mob
							/call PlayerTooCloseCheck ${Target.ID}
							/if (${Macro.Return} == 1) {
								| there is a player too close to this mob.
								/goto :NextSpawn
							} else {
								| there are no players nearby this mob
								/call Combat ${Target.ID}
								/return
							}
						} else {
							| this one's flagged as a bad target
							/goto :NextSpawn
						}
					} else {
						| failed distance check
						/goto :NextSpawn
					}
				}
				| is SpawnCtr >= spawn count?
				/if (${SpawnCtr} >= ${SpawnCount[npc ${MobsToKill[${MobToKillCtr}]}]}) {
					/goto :NextMobType
				}		
		} else {
			/goto :NextMobType
		}

	:NextSpawn
		| bad target. increase Spawn counter
		/varcalc SpawnCtr ${SpawnCtr}+1

		| is SpawnCtr > spawn count?
		/if (${SpawnCtr} > ${SpawnCount[npc ${MobsToKill[${MobToKillCtr}]}]}) {
			| gone through all of this mob type. go to next one
			/goto :NextMobType
		} else {	
			| still good, go to next spawn
			/goto :SpawnLoop
		}

	:NextMobType
		| Go to the next type of mob to pull
		/if (${MobToKillCtr} <= ${MobsToKillCount}) {
			/echo [GK-PRO] Couldn't find any suitable ${MobsToKill[${MobToKillCtr}]}
			
			| increase mob counter
			/varcalc MobToKillCtr ${MobToKillCtr}+1
			
			| Reset spawn counter
			/varset SpawnCtr 1
			
			| Move on to next mob
			/echo [GK-PRO] Moving to next MobToKill
			/goto :MobToKillLoop
		} else {
			| there are no more mobs to check. shitty.
			/echo [GK-PRO] Checked through all mobs and couldn't find any.. (change MobsToKill?)
			/delay 1s
		}
/return

| -------------------------------------------------------------------
| COMBAT 
Sub Combat(int id)
	| COMBAT INIT --------------------------------
	/echo [GK-PRO] Starting combat.
	/varset CurrentTarget ${id}
	/varset CombatDuration 0
	/varset TargetAttackable 0
	/varset TargetHPLastTick ${Target.PctHPs}
	/varset TargetHPCurrent ${Target.PctHPs}
	/varset TargetHPMin ${Target.PctHPs}
	/varset TargetHPDelta 0
	/varset MeleeAttacks 0
	/squelch /stealth off
	/squelch /nauto on

	| COMBAT LOOP --------------------------------
	:CombatLoop
		| updtae var
		/call UpdateTargetHP

		| do events
		/doevents

		| check for GM
		/call GMcheck
		
		| zone check
		/call ZoneCheck

		| check for players in zone
		/call PlayerCheck	

		| check for player too close to mob
		/call PlayerTooCloseCheck ${CurrentTarget}
		/if (${Macro.Return} == 1) {
			| thhere is a player too close to this mob.
			/goto :PlayerTooClose
		}

		| check for players too close to US
		/call PlayerCloseToMeCheck
		/if (${Macro.Return} == 1) {
			| player is too close!
			/call PlayerByMe
		}

		| heal check
		/call HealCheck

		| buff check
		/call BuffCheck

		| check for dead mob
		/if (${String[${Spawn[${CurrentTarget}]}].Find["corpse"]}) {
			| target is dead
			/goto :Victory
		}

		| check for bad target
		/call BadTargetCheck
		/if (${Macro.Return} == 1) {
			/goto :QuitBadTarget
		}

		| check for healing target
		/call TargetHealing
		/if (${Macro.Return} == 1) {
			/goto :QuitHealingTarget
		}
		
		| use AA's
		/call UseAAs

		| delay
		/delay 1s
		/varcalc CombatDuration ${CombatDuration}+1
	/goto :CombatLoop

	:PlayerTooClose
		/echo [GK-PRO] Player close to target, aborting!
		/goto :EndCombat
	
	:QuitHealingTarget
		/echo [GK-PRO] Target is healing, skipping..
		/goto :EndCombat

	:QuitBadTarget
		/echo [GK-PRO] Target looks bad, skipping..
		/goto :EndCombat

	:Victory
		/echo [GK-PRO] Target killed!
		/call Loot
		/goto :EndCombat

	:EndCombat
		| reset combat vars
		/squelch /nauto off
		/varset CurrentTarget 0
		/varset CombatDuration 0
		/varset TargetAttackable 0
		/varset MeleeAttacks 0
/return

| -------------------------------------------------------------------
| UseAAs
Sub UseAAs
	/varset AACtr 1
	/for AACtr 1 to ${AACount}
		/if (${Me.AltAbilityReady[${AAsToUse[${AACtr}].Arg[1,#]}]}) {
			/alt activate ${AAsToUse[${AACtr}].Arg[2,#]}
		}
	/next AACtr
/return

| -------------------------------------------------------------------
| LOOT
Sub Loot
	/if (${Looting} == 1) {
		/declare WantCtr int local 1
		| save current position
		/varset ReturnX ${Me.X}
		/varset ReturnY ${Me.Y}
		/varset ReturnZ ${Me.Z}
		/varset CorpseCtr 1
		/squelch /nauto off
		/delay 1s

		| go through corpses and find the right one
		/for CorpseCtr 1 to ${SpawnCount[corpse]}
			/target ${NearestSpawn[${CorpseCtr}, corpse]}		
			/if (${Target.ID} == ${CurrentTarget}) {
				/goto :LootShit
			}
		/next CorpseCtr
		
		| didn't find it apparently, return
		/return
		
		| found the corpse, loot it
		:LootShit
		/delay 5
		/warp t
		/delay 1s

		/if (${LootMode} == 1) {
			| loot plat only.
			/loot
			/delay 5
			/keypress esc
			/delay 5
		} else /if (${LootMode} == 2) {
			| loot all.
			/lootall
			/delay 2s
			/keypress esc
			/delay 5
		} else /if (${LootMode} == 3) {
			| smart looting
			/loot
			/delay 8
			/if (${Window[LootWnd].Open}) {
				| go through items on corpse and loot valuable ones
				| if there are items on the corpse
				/if (${Corpse.Items}) {
					/echo [GK-PRO] Smart Loot Check
					/varset ItemCtr 1
					/varset ItemCount ${Corpse.Items}
					:ItemLoop
						/if (${ItemCtr} <= ${ItemCount}) {
							| see if this is one of the items we want
							/for WantCtr 1 to ${ItemsToLootCount}
								/if (${InvSlot[loot${ItemCtr}].Item.Name.Find[${ItemsToLoot[${WantCtr}]}]} != NULL) {
									/echo [GK-PRO] Looting: ${InvSlot[loot${ItemCtr}].Item.Name}
									/shiftkey /itemnotify loot${ItemCtr} rightmouseup
									/delay 5
									/goto :NextItem
								}
							/next WantCtr
							
							| check if this item is worth looting
							/if (${InvSlot[loot${ItemCtr}].Item.Value} >= ${MinLootValue}) {
								| loot the item
								/echo [GK-PRO] Looting: ${InvSlot[loot${ItemCtr}].Item.Name}
								/shiftkey /itemnotify loot${ItemCtr} rightmouseup
								/delay 5
								| if we attempted to loot a stack then confirm
								| /if (${Window[QuantityWnd].Open}) {
								| 	/nomodkey /notify QuantityWnd QTYW_Accept_Button leftmouseup
								| 	/delay 5
								| }
							}
							| next item on corpse
							:NextItem
							/varcalc ItemCtr ${ItemCtr}+1
							/goto :ItemLoop
						} 
					/delay 3
					/keypress esc
				}
			}
		}

		| go back to our spot
		/warp loc ${ReturnY} ${ReturnX} ${ReturnZ}
	}
/return

| -------------------------------------------------------------------
| BAD TARGET SEARCH - Loops through bad targets to see if target is bad
Sub FindBadTarget(int id)
	/varset FindBadTargetCtr 1

	:next
	/if (${BadTargets[${FindBadTargetCtr}]} == ${Target.ID}) /return 1
	/varcalc FindBadTargetCtr ${FindBadTargetCtr}+1
	/if (${FindBadTargetCtr} <= ${BadTargetCount}) /goto :next

	/return 0
/return 

| --------------------------------------------------------------------
| PLAYER CHECK - If there are too many players in the zone the macro waits
Sub PlayerCheck
	/varset PlayerWarned 0
	/varset PlayerWaiting 0

	:Check
	/if (${SpawnCount[pc]} > ${PCsAllowed}) {
		| There are too many players in the zone. 
		/if (${PlayerWarned} == 0) {
			/echo [GK-PRO] Too many players in zone, waiting.
			/varset PlayerWarned 1
			/squelch /nauto off
			/squelch /stealth on
		}
		/varset PlayerWaiting 1
		/delay 2s
		/goto :Check
	} else {
		| There aren't too many players in the zone.
		/if (${PlayerWaiting} == 1) {
			| If we're waiting, display a message 
			/echo [GK-PRO] Resuming macro.
		}
	}
/return

| ---------------------------------------------------------------------
| HEAL CHECK - If we're below HurtHP, then wait for heals
Sub HealCheck
	/declare DidEvac int local 0
	/varset HealWarned 0
	/varset HealWaiting 0

	:Check
	/if (${Me.PctHPs} <= ${PotionAtPctHPs}) {
		| do we want to pop a potion?
		/if (${UseHealPots}) {
			| make sure didn't already use a potion
			/if (${Me.Buff[${HealPotBuff}].Duration} == NULL) {
				/echo [GK-PRO] Using healing potion
				/potionbelt activate ${HealPotSlot}
				/delay 1s
			}
		}
	}
	
	/if (${Me.PctHPs} <= ${HurtHP}) {
		| if we're zwarping then warp succor and fade
		/if (${ZWarping} == 1 && ${DidEvac} == 0) { 
			/echo [GK-PRO] Evac!
			/varset DidEvac 1
			/squelch /warp s
			/squelch /fade	
		}
		
		| wait for heals
		/varset HealWaiting 1
		/if (${HealWarned} == 0) {
			/echo [GK-PRO] HP LOW! Waiting for health.
			/varset HealWarned 1
			/squelch /nauto off
			

		}
		/delay 1s
		/goto :Check
	} else {
		/if (${HealWaiting} == 1) {
			/echo [GK-PRO] Healed up! Lets do this shit.
			| if we zwarped we are gonna want to warp back up			
			/if (${DidEvac} == 1) {
				/echo [GK-PRO] Zwarping
				/squelch /setgrav 0
				/squelch /zwarp 2000	
				/squelch /hidecorpse all
				/squelch /hidecorpse none
				/squelch /hidecorpse looted
				/varset DidEvac 0
				| target our mob
				/target ${Spawn[${CurrentTarget}]}
			}
			/squelch /nauto on
		}
	}
	

	
/return

| ---------------------------------------------------------------------
| BAD TARGET CHECK
Sub BadTargetCheck
	| if we've been in combat for a while..
	/if (${CombatDuration} > ${BadTargetTolerance}) {
		| If this mob is unattackable..
		/if (${TargetAttackable} == 0) {
			| it's a bad target.
			/call AddBadTarget ${Target.ID}
			/return 1
		}

		| check if we're attacking reaaly slow.. ie, less than 1/sec
		/if (${MeleeAttacks} < ${CombatDuration}) {
			| if it's a named don't skip it maybe its just moving
			/if (${Target.Name.Find[#]} != NULL) {
				/return	
			}
			| screw it
			/call AddBadTarget ${Target.ID}
			/return 1
		}

		| if it's at 100% hp, fuck it
		/if (${Target.PctHPs} >= 99) {
			/call AddBadTarget ${Target.ID}
			/return 1
		}
	}
	
	| it's not bad (yet)
	/return 0
/return

| ----------------------------------------------------------------------
| ADD BAD TARGET
Sub AddBadTarget(int id)
	| increase the BadTargetCount
	/varcalc BadTargetCount ${BadTargetCount}+1
	
	| Add this bad target to our array
	/varset BadTargets[${BadTargetCount}] ${id}
/return

| -----------------------------------------------------------------------
| GM CHECK
Sub GMcheck  
 	/if (${Spawn[gm].ID}) {  
 		/echo [GK-PRO] GM DETECTED!!  
		/endmac
 	}  
/return  

| -----------------------------------------------------------------------
| BUFF CHECK
Sub BuffCheck
	/if (${UsePoison}) {
		/if (${Me.Buff[${PoisonBuff}].Duration} == NULL) {
			/squelch /nauto off
			/echo [GK-PRO] Applying Poison.
			/potionbelt activate ${PoisonSlot}
			/delay 5s
			/squelch /nauto on
		}
	}

	/if (${UseHastePotion}) {
		/if (${Me.Buff[${HastePotionBuff}].Duration} == NULL) {
			/squelch /nauto off
			/echo [GK-PRO] Popping haste pot
			/potionbelt activate ${HastePotionSlot}
			/delay 5s
			/squelch /nauto on
		}
	}
	
	| Call ItemBuffCheck
	/if (${UseItemBuffs} == 1) {
		/call ItemBuffCheck
	}
/return

| -----------------------------------------------------------------------
| ITEM BUFF CHECK
Sub ItemBuffCheck
	/declare ItemBuffCtr int local 1
	/declare _itemName string local 
	/declare _buffName string local
	/declare _castTime int local
	
	/for ItemBuffCtr 1 to ${ItemBuffsCount}
		/varset _itemName ${ItemBuffs[${ItemBuffCtr}].Arg[1,#]}
		/varset _buffName ${ItemBuffs[${ItemBuffCtr}].Arg[2,#]}
		/varset _castTime ${ItemBuffs[${ItemBuffCtr}].Arg[3,#]}
		/if (${Me.Buff[${_buffName}].Duration} == NULL && ${Spell[${_buffName}].Stacks}) {
			/echo [GK-PRO] Using ${_itemName}
			/squelch /nauto off
			/cast item "${_itemName}"
			/delay ${_castTime}s
			/squelch /nauto on	
		}
	/next ItemBuffCtr

/return

| -------------------------------------------------------------------------------
| UPDATE TARGET HP - updates the target hp vars
Sub UpdateTargetHP
	/varset TargetHPLastTick ${TargetHPCurrent}
	/varset TargetHPCurrent ${Target.PctHPs}

	| check if target current hp is lower than the 'min' we've seen so far
	/if (${TargetHPCurrent} < ${TargetHPMin}) {
		| it is, record this new minimum
		/varset TargetHPMin ${TargetHPCurrent}
	}

	| update target hp delta
	/varcalc TargetHPDelta ${TargetHPCurrent}-${TargetHPMin}
/return

|--------------------------------------------------------------------------------
| TARGET HEALING - determines if the target has healed beyond the tolerance
Sub TargetHealing
	/if (${TargetHPDelta} > ${MobHealTolerance}) {
		| it's healing more than I tolerate.
		/call AddBadTarget ${Target.ID}
		/return 1
	}
/return 0

|--------------------------------------------------------------------------------
| PLAYER TOO CLOSE CHECK - determines if there's any players near a specific mob
Sub PlayerTooCloseCheck(int mobId)
	/varset NearCtr 1

	| get the closest player to this mob that is NOT a friend
	/call GetClosestNonFriendToMob ${mobId}
	/varset PlayerId ${Macro.Return}
	
	| if it returned -1 it's safe
	/if (${PlayerId} == -1) /return 0 
	
	| get X,Y points of the mob and the non-friend pc nearest to this mob
	/varset X1 ${Spawn[${mobId}].X}
	/varset Y1 ${Spawn[${mobId}].Y}
	/varset X2 ${Spawn[${PlayerId}].X} 
	/varset Y2 ${Spawn[${PlayerId}].Y} 

	| calculate distance between mob and player. HOLLA PYTHAGORAS
	/varcalc dX ${X1}-${X2}
	/varcalc dY ${Y1}-${Y2}
	/varcalc Distance ${Math.Sqrt[${dX}^2 + ${dY}^2]}

	| is this pc too close?
	/if (${Distance} <= ${PlayerTooCloseDist}) {
		| too close
		/return 1
	} else {
		| player is not too close
		/return 0
	}
/return

| ---------------------------------------------------------------------------------
| PLAYER CLOSE TO ME CHECK
Sub PlayerCloseToMeCheck
	| If there's more than one player in zone..
	/if (${SpawnCount[pc]} > 1) {
		| Get the nearest player to us
		/call GetClosestNonFriendToMe
		/if (${Spawn[${Macro.Return}].ID} == NULL) {
			| its safe
			/return 0	
		}
		/if (${Spawn[${Macro.Return}].Distance3D} <= ${PlayerTooCloseDist}) {
			| the player is too close
			| /echo ${Spawn[${Macro.Return}].Name}
			/return 1
		} else {
			| they are far enough away
			/return 0
		}
	}
/return

| ---------------------------------------------------------------------------------
| PLAYER BY ME - waits until the player is no longer by us
Sub PlayerByMe
	/echo [GK-PRO] Player is too close to me, waiting..
	/squelch /nauto off
	/squelch /stealth on

	:Loop
		/call PlayerCloseToMeCheck
		/if (!${Macro.Return}) {
			| the player moved away
			/echo [GK-PRO] Player left, resuming.
			/squelch stealth off
			/squelch /nauto on
		} else {
			| still waiting for player to leave
			/delay 1s
			/goto :Loop
		}
/return

| ----------------------------------------------------------------------------------
| IsFriend - Checks if a pc is a friend
Sub IsFriend(string pcname)
	/for PlayerCtr 1 to ${FriendCount}
		/if (${String[${MyFriends[${PlayerCtr}]}].Equal[${pcname}]}) {
			/return 1
		} else {
			/if (${String[${Me.Name}].Equal[${pcname}]}) /return 1	
		}
	/next PlayerCtr
	
	| This is not a friend
/return 0

| -----------------------------------------------------------------------------------
| GetClosestNonFriendToMe - gets closest non-friend pc to the PLAYER
Sub GetClosestNonFriendToMe
	/varset PlayerCtr2 1
	
	| make sure there's more than 1 pc in the zone
	/if (${SpawnCount[pc]} > 1) {

		:CheckPlayer
		| call IsFriend to determine if this pc is a friend
		/call IsFriend ${Spawn[${Me.NearestSpawn[${PlayerCtr2}, pc]}].Name}
		
		/if (${Macro.Return} == 1) {
			| this is a friend. check next pc	
			/varcalc PlayerCtr2 ${PlayerCtr2}+1
			/if (${PlayerCtr2} <= ${SpawnCount[pc]}) /goto :CheckPlayer
		} else {
			| this is not a friend
			/return ${Spawn[${Me.NearestSpawn[${PlayerCtr2}, pc]}].ID}
		}
	}
/return -1

| -----------------------------------------------------------------------------------
| GetClosestNonFriendToMob - gets closest non-friend pc to the PLAYER
Sub GetClosestNonFriendToMob(int mobId)
	| make sure there's more than 1 pc in the zone
	/if (${SpawnCount[pc]} > 1) {
		/varset PlayerCtr3 1
		:CheckPlayer
		| call IsFriend to determine if this pc is a friend
		/call IsFriend ${Spawn[${mobId}].NearestSpawn[${PlayerCtr3}, pc].Name}
		/if (${Macro.Return} == 1) {
			| this is a friend. check next pc	
			/varcalc PlayerCtr3 ${PlayerCtr3}+1
			/if (${PlayerCtr3} <= ${SpawnCount[pc]}) /goto :CheckPlayer
		} else {
			| this is not a friend
			/return ${Spawn[${mobId}].NearestSpawn[${PlayerCtr3}, pc].ID}
		}
	}
/return -1

| -----------------------------------------------------------------------------------
| ZONE CHECK
Sub ZoneCheck
	/if (${String[${MyZone}].NotEqual[${Zone}]}) {
		/echo [GK-PRO] I've a feeling we aren't in ${MyZone} anymore.
		/echo [GK-PRO] MACRO STOPPED
		/beep
		/endmac	
	}
/return
 
Do people still use GM detection in macro? GM can be invisible and if you detect GM chances are GM already knows.
 
GM Detect is still good in case they are in the zone for other reasons and have exposed themselves.
 
Anyone get it working at all?? Or did they fix ghost kill by now.. I hope at least someone gets it working, I put a lot of time into this macro and it served me well. I hope someone can make some use of it. Once you get it going its pretty srs bznz.

It only pulls the mobs u specify, and it does not pull targets that are nearby other players, and it stops killing entirely when there are players near you. Handles buffs, firing off AA's, looting may need a tweak.

Its basically the first and only macro i ever wrote so you can tell the parts I wrote when I was first learning and the ones I did towards the end.. I coulndt get FOR loops to work at the start, lol.

Basically just make sure u look over all the variables that are commented, if you change the size of an array/list such as monsters to kill, stuff to loot, etc.. make sure you change the 'count' var above the list..

Depending on your ghost kill macro you may need to change the /command that enables / disables ghost kill, I had been using zipp zipp;s and now I see his site is gone or something.

anyways i hope someone can figure it out cuz its badass. gl
 
Ghost kill is a really good way to get yourself banned. Last time i checked there wasnt a way to deal with the massive amounts of warping that it produces to kill raid level mobs. I would stay far away from it.
 
Ghost kill is a really good way to get yourself banned. Last time i checked there wasnt a way to deal with the massive amounts of warping that it produces to kill raid level mobs. I would stay far away from it.

Well unless they changed something recently, I've leveld multiple characters to 85 and gained thousands of AA's using ghostkill with this macro. Of course you can't kill most high-end raid encounters, that'd be a bit too much. Ghostkill always seemed too good to be true though...
 
which brings me to my question i have been playing eq since kunark and i have messed around with some macros and offsets etc. nothing to major and i have never been able to find a working ghostkill or similar cheat since around 07' when i started using hacks in eq. i appreciate this macro but does anyone know where to get the ghostkill component so i can use it?
 
[GKPRO] aka Ghost Kill Pro by Pdub

Users who are viewing this thread

Back
Top