• 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 --->

Target certain mobs only? (1 Viewer)

Foxseven

New member
Joined
Feb 6, 2010
RedCents
Hello all. I have a question to anyone interested in assisting. I am pasting the following AFK macro that I use, for anyone that wants a monk one, to not only share some stuff I have compiled (very little of it is my own work anyway) and to also ask for some assistance in adding a piece that will make it more effective. Currently I keep a limited radius since there are some mobs I want to avoid - but these mobs are not KOS to me. However if I can get this working this thing can run all the time without any lapse. Meaning, if I can tell the macro to ONLY kill certain mobs then there are enough where I hunt that this thing will work all day long if I was so inclined.

Anyway, here it is - again my question is how do i add a piece that will ONLY attack certain mobs? ie "a bat" or "a ghoul"



#event Stunned "You are too distracted to use a skill.#*#"
#event Stunned "You are stunned#*#"
#event Stunned "You can't cast spells while stunned!#*#"
#event Stunned "You can't attack while stunned!#*#"
#event Stunned "You cannot use a skill while stunned!#*#"
#event Stunned "You *CANNOT* cast spells, you have been silenced!#*#"

#include spell_routines.inc

Sub Main

|--------------------------------------------------------------------------------
|Configure Values Below
|--------------------------------------------------------------------------------
/declare usearray int outer 0 |--Change to 1 to use loot array
/declare RV_LootArray[5] string outer
/varset RV_LootArray[1] "Diamond"
/varset RV_LootArray[2] "Legends"
/varset RV_LootArray[3] "Junkx"
/varset RV_LootArray[4] "Junky"
/varset RV_LootArray[5] "Junkz"
|--------------------------------------------------------------------------------
|DO NOT MODIFY ANY OF THESE VALUES
|--------------------------------------------------------------------------------
/declare StickFighting int outer 0
/makecamp on
/call loop

|--------------------------------------------------------------------------------
|MAIN LOOP: Out of Combat actions
|--------------------------------------------------------------------------------
Sub Loop
:abilwatch
/if (${StickFighting}==1) /varset StickFighting 0
/if (${NearestSpawn[NPC].Distance} < 180) {
/target ${NearestSpawn[NPC]}
/attack on
}
/if (${Me.Combat}) /call Combat
/if (${Me.PctHPs} < 60) /doability "Mend"
/if (${Me.PctHPs} < 20) /call FDend
/if (${Me.PctHPs} > 60) /call SecondLife
/goto :abilwatch
/return


|--------------------------------------------------------------------------------
|SUB: Second Life
|--------------------------------------------------------------------------------
Sub SecondLife
/if (${Me.PctHPs} < 60) /doability "Mend"
/if (${Me.PctHPs} > 60) /stand
/delay 2s
/call loop

/return

|--------------------------------------------------------------------------------
|SUB: Combat Start Attack / End Fight
|--------------------------------------------------------------------------------
Sub Combat
:combatstart
/if (${Target.ID} && !${Me.Combat}) /attack on
/doevents
/if (${Me.PctHPs} < 25) /call FDend
/if (${StickFighting}==0) {
/varset StickFighting 1
/stick 13
}
/call Monkabil
|---------Run at end of fight---------------|
/if (${Target.Type.Equal[corpse]}) /keypress esc
/if (!${Target.ID}) {
/keypress back
/varset StickFighting 0
/delay 2s
/if (${NearestSpawn[NPC].Distance}<10) {
/target ${NearestSpawn[NPC]}
/attack on
/goto :combatstart
}
/attack off
/call Loot
/return
}

/goto :combatstart
/return

|--------------------------------------------------------------------------------
|SUB: Loot w/ Array
|--------------------------------------------------------------------------------
Sub Loot
/declare slot int local 1
/declare NumberItems int local 0
/declare CorpseCut int local 0
/target corpse radius 100
/stick 5 hold
:Moveto
/if (${Target.Distance}>10) /goto :MoveTo
/delay 2s
/face fast
/loot
/delay 2s
/face fast
/keypress forward
/keypress back
/varset NumberItems ${Corpse.Items}
/if (${NumberItems}>0) {
/varcalc CorpseCut ${Target.CleanName.Find['s corpse]}-1
/for slot 1 to ${NumberItems}
/shift /itemnotify loot${slot} leftmouseup
/delay 1s
:LagFix
/call HandleItem
/autoinventory
/delay 1s
/if (${Cursor.ID}) /goto :LagFix
/next slot
}
/nomodkey /notify LootWnd DoneButton leftmouseup
/delay 1s
/squelch /if (${Target.ID}) /target clear
/delay 1s

/return


sub HandleItem
/delay 1s
| /echo Found ${Cursor.Name}
/declare ItemSetting int local
/declare NotFound int local

/varset NotFound -1

| Look up this item in the INI file
/varset ItemSetting ${Ini[AutoLooter.ini,KeepList,${Cursor.Name},${NotFound}]}
/delay 5

| If the item isn't in the .ini file then add it.
/if (${ItemSetting}==${NotFound}) {
/ini "AutoLooter.ini" "KeepList" "${Cursor.Name}" "1"
/varset ItemSetting 1
}

| If we're keeping this item then stash it in our bags.
| Otherwise, just destroy it.
/if (${ItemSetting}==1) {
:LootIt
/autoinventory
/delay 5
/if (${Cursor.ID}) /goto :LootIt
} else {
/popup Destroying ${Cursor.Name}
/destroy
}
/return

/call loop
/return

|--------------------------------------------------------------------------------
|SUB: Monk Abilities (Epic Click, Mend, Flying Kick, Specials)
|--------------------------------------------------------------------------------
Sub Monkabil
|---------Abilities-------------------------|
/if ((${Me.AbilityReady["Flying Kick"]}) && (${Target.Distance}<18) && (${Me.Endurance}>500)) /doability "Flying Kick"
/if ((${Me.AbilityReady["Mend"]}) && (${Me.PctHPs} < 50)) /doability "Mend"
/if ((${Me.CombatAbilityReady["Clawstriker's Flurry"]}) && (${Target.Distance}<18) && (${Me.Endurance}>300)) /doability "Clawstriker's Flurry"
/return

|--------------------------------------------------------------------------------
|SUB: Feign Death (Something went terribly wrong)
|--------------------------------------------------------------------------------
Sub FDend
/doability "Feign Death"
/echo LOW HP!!!! FD!
/call SecondLife

|--------------------------------------------------------------------------------
|Event Triggers
|--------------------------------------------------------------------------------
Sub Event_Stunned
/delay 1s
/return





Thanks in advance! I appreciate all the help I have recieved so far. Its been a great community =)
 
Thanks! How do I avoid mobs? Like something along the lines of

/if ((${NearestSpawn[NPC].Distance} < 180) && (!${Target.ID})) !== Bad A$$ Mob Name Here
 
/if (${Target.Name.Equal[Bad A$$ Mob Name Here]}) /target npc next

BTW remembering this one reminds me you can also use this one for attacking:

/if (${Target.Name.Equal[a bat]}) {
INSET WHAT YOU WANT THE BOT TO DO
}

- decker
 
Thank you =)

I added that in and cannot get the thing to launch so I will have to look at it later. I forgot to redcent some people and can only do one a day so I am playing catch up. I'll be a little overdue sending you and official thanks =)
 
Ok lets help you out, best solution will be to make the macro use a Targetlist.

1.st you ll get a macro from me, with wich you create an ini file. This ini file will contain all the mobs you want to avoid. The macro is NaN.mac.
Usage: Target an npc, then /mac nan [ENTER]
Target next npc you want avoided and rince repeat.

2.nd we ll tune your macro to load the names out of your ini file.

Now to work. First here the NaN macro:

Rich (BB code):
|Nan.mac	Created by Crystane
|
|		Use this Macro to populate an ini file, which will contain NPC based by zone, which are Questgivers or Merchants or wich you just never want to attack.
|		My Macros will be redesigned to use the Nan.ini to avoid such NPCs
|
|Usage:	- Make a hotkey --> /mac nan
|		- Target a NPC you want to add and hit your hotkey or start the mac manually
|
|
|Created:	[15-10-08]
|
|Last Update:	[15-10-08]
|

#turbo

Sub Main
/if (${Target.Type.Equal[PC]} || !${Target.ID}) {
	/echo You need to target an NPC first before your use NaN.
	/end
}
/declare naninifile	string outer		NaN.ini
/declare inizone	string outer		${Zone.ShortName}
/declare Cntr1	int outer
/declare CntrSt	int outer		1
/declare CntrMax	int outer		10
/declare tempnm	string outer		${Target.Name}
/declare tempstr	string outer
/call CPini
/echo Added ${tempnm} to ${naninifile}, you got ${Cntr1} NPC/s setup in this zone now.
/end
/return

Sub CPini
:CntParse
/for Cntr1 ${CntrSt} to ${CntrMax}
	/varset tempstr ${Ini[${naninifile},${inizone},${Cntr1},NOTFOUND]}
	/if (${tempnm.Equal[${tempstr}]}) {
		/echo This NPC (${tempnm}) is allready setup in your ini.
		/end
	}
	/if (${tempstr.Equal["NOTFOUND"]}) {
		/call Amdini
		/goto :ParsEnd
	}
/next Cntr1
/varcalc CntrSt ${CntrMax}+1
/varcalc CntrMax ${CntrMax}+10
/if (${CntrSt}>=1001) {
	/echo More then 1000 NPC in the ini??? Parse-Loop seams broken, ending.
	/end
}
/goto :CntParse
:ParsEnd
/return

Sub Amdini
/ini "${naninifile}" ${inizone} ${Cntr1} ${tempnm}
/return


And now next part, right below Sub Main add following lines.
Rich (BB code):
Sub Main
/declare AlertListVoid int outer
/varset AlertListVoid 10
/call LoadVoidlist

next add the following Sub to your macro:

Rich (BB code):
Sub LoadVoidlist
/declare inizone string local ${Zone.ShortName}
/declare Cntr1 int local
/declare CntrSt int local 1
/declare CntrMax int local 10
/declare tempnm string local 
/if (${Ini[NaN,${inizone},1,NOTFOUND].Find["NOTFOUND"]}) { 
|	/echo No Exclude list exists. 
	/return 
} 
/squelch /alert clear ${AlertListVoid}
:CntParse
/for Cntr1 ${CntrSt} to ${CntrMax}
	/varset tempnm ${Ini[NaN,${inizone},${Cntr1},NOTFOUND]}
	/if (${tempnm.Equal["NOTFOUND"]}) {
		/goto :ParsEnd
	} else {
		/if (${tempnm.Find["NONE"]}) {
			/goto :skipline
		} else {
			/squelch /alert add ${AlertListVoid} "${tempnm}"
		}
	}
:skipline
/next Cntr1
/varcalc CntrSt ${CntrMax}+1
/varcalc CntrMax ${CntrMax}+10
/if (${CntrSt}>=1001) {
	/echo More then 1000 NPC in the ini??? Parse-Loop seams broken, ending.
	/end
}
/goto :CntParse
:ParsEnd
/squelch /alert add ${AlertListVoid} ${Me.Name}
/return

Now last part change a line in your macro from :

Rich (BB code):
/target ${NearestSpawn[NPC]}

to:

Rich (BB code):
/target ${NearestSpawn[NPC noalert ${AlertListVoid}]}

Dont forget to setup your ini file first useing NaN.mac

Enjoy Crystane.
 
Last edited:
Thank you both so very much. This was extremely helpful. I dont think you know how much i appreciate the assistance. I think I enjoy the "coding" more than the game so its great to have mentors to help me along.
 
Just wanted to say this is real nice Snip for a mac! Im currently using it in my mac. I was wondering since you can make a .Ini for mobs you dont want targeted would there be any way to alter this Snip to Target the mobs you did want, Maybe another .Ini's for Desired mobs?
 
Target certain mobs only?

Users who are viewing this thread

Back
Top