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

Question - Suicide Bot (1 Viewer)

disasteroid

New member
Joined
May 18, 2015
RedCents
575¢
I am trying to create a macro to delevel toons automatically by suiciding into guards to take advantage of the insane merc AA gain at low levels. It first tries to find a guard standing nearby on the same Z plane to prevent pathing issues, and if the guard is nearby it uses the MQ2Melee command /killthis to run up and punch him or her. Since it's not an instantkill, the macro loops every 3 seconds to check if the character is still alive. Once dead, it triggers an event ("you've been slain", etc) that sets IAmDead to TRUE.

My question is then in several parts:

1) How does event queueing work? In the snippet below I have the command /doevents before it checks if the character is still alive. Is this necessary?
2) Is there a better way to handle restarting this subroutine after death?

Rich (BB code):
Sub MercAA
	:CakeIsGreat
	/if (${Me.Level}>LowLevel) {
		/declare guard2d bool local 0
		/declare guardzd bool local 0
		
		/varset IAmDead 0
		/squelch /target clear
		/squelch /target guard radius 30
		/if (${Target.ID}) /varset guard2d 1
		
		/squelch /target clear
		/squelch /target guard zradius 3
		/if (${Target.ID}) /varset guardzd 1
		
		/if (guard2d && guardzd) {
			/if (!${Me.Combat}) {
				/if (${Me.Sitting}) /stand
				/killthis
				
				:StillAlive
				/doevents
				/if (!${IAmDead}) {
					/delay 3s
					/goto :StillAlive
				} else {
					/goto :CakeIsGreat
				}
			} 
		} else {
			/echo Guard out of range, waiting...
			/delay 5s
			/goto :CakeIsGreat
		}
	}
/return
 
An event is an emote in Everquest that MQ2 looks for in message boxes. /doevents calls mq2 to look for those emotes.

Rich (BB code):
#Event ImDead            "You have been slain by#*#"
#Event ImDead            "You died."

You have it in the correct place
 
Great, thanks! Does that mean that events don't trigger automatically and must be called from /doevents? If so, does that mean they get triggered in a first-on first-off fashion or first-on last-off?

i had it in my head they functioned more like state effects from the magic card game, in that the event subroutine would be called anytime its declared trigger was met. is there documentation on how they work somewhere I could read? I still a novice programmer in any language.
 
i used to do this in more of a archaic way but if you bind next to guard then take and using a clicker program or a g15 keyboard you can use sacvictom.mac in conjunction and delevel to 1 in about 20 minutes

- - - Updated - - -

Rich (BB code):
| SacVictim.mac
| Written by drzoon
| Last updated 2006-10-21
| - Updated for New Rez/Respawn Window

| Usage: Just start the macro and sit back...

#event InvitesYou      "#*# invites you to join a group."

Sub Main
   :wait_for_sac
   /if (${Window[ConfirmationDialogBox].Open}) {
      /notify ConfirmationDialogBox Yes_Button leftmouseup
   }
  /if (${Window[RespawnWnd].Open}) /nomodkey /notify RespawnWnd RW_SelectButton leftmouseup
   /doevents
   /goto :wait_for_sac
/return

Sub Event_InvitesYou
   /if (!${Me.Grouped}) {
      /delay 3s
      /keypress invite_follow
   }
/return

this is the mac if it might help you
 
Thanks for the macro outlaw! Unfortunately this code will be called within a macro that has a specific bind condition and the guards that are nearby are roamers. I think I have the code figured out, been a great learning process about how awful I am at picking good conditionals. ANyway, I have a new problem--there's a stack a mile high of corpses. Is there any way to get rid of these? Obviously they expire within a few hours, but I'm generating ~50 corpses every 5-10 minutes going from 25 to 20.

Edit: Use the /decaycorpse command! Here's the snippet I use now:

Rich (BB code):
Sub Main
	:loop
	/target ${Me}'s corpse
	/if (${Target.ID}) {
		/squelch /decaycorpse
		/notify ConfirmationDialogBox CD_Yes_Button leftmouseup
		/delay 3
		/goto :loop
	}
/return
 
Last edited:
This idea got me interested in working on a macro for the first time.

Please note: I'm happily lazy using macs from others, and appreciative of them. :)

But I wanted to try one with a similar idea in mind like disasteroid has here.

So here's what I came up with so far (and the name is for fun, not for my ego :D)


Edit: Oops, forgot to mention that it's working but I'm having a problem with the DelevelMe routine. It does it once, goes to bind, then loops with a spam of the "DelevelMe" echo. So I am missing something obvious.


Rich (BB code):
SuicideKings V1
|Most of this code is copied from disasteroid with the Suicide Bot mac idea,  the autobones.mac, and Kissassist mac.
|Appreciation goes out to the authors of those: fuzzymelon, Redbot,  Maskoi, Randyleo, disasteroid.
|And to all others who have made suggestions on improvements of the Kissassist, Bonechips and Autobones macs.

#include ninjadvloot.inc

#turbo 120

Sub Main
	/declare NpcToHit string local a_militia_Enforcer
|	/declare DelevelTo int local 20
	:Mainloop
	/call LoseOldCorpses
    /call NPCtoKillMe ${NpcToHit}
|	/call DelevelMe ${DelevelTo}
	/call DelevelMe
	/call LoseOldCorpses
/Return

| --------------------------------------------------------------
| Sub: LoseOldCorpses
| --------------------------------------------------------------
Sub LoseOldCorpses
    /declare IGottaCorpse int local
    /declare CorpseID int local
    /declare CorpseRadius int local 150
	:losecorpses
| Do I have a Corpse
    /varset IGottaCorpse ${Spawn[corpse ${Me} radius ${CorpseRadius} zradius 50].ID}
    /if (${IGottaCorpse}) {
        /target id ${IGottaCorpse}
		/delay 1
        /decaycorpse
		/delay 1
		/if (${Window[ConfirmationDialogBox].Open}) {
			/notify ConfirmationDialogBox CD_Yes_Button leftmouseup
			/delay 1
			/goto :losecorpses
		}
	}
/return

-------------------------------------------
| Sub: NPCtoKillMe
| --------------------------------------------------------------
Sub NPCtoKillMe(string targ)
    /declare targid int local 0
    :retarget
    /echo NPCtoKillMe
    /target targ
    /if (${Target.ID} && ${Target.ID}==${Spawn[${targ}].ID}) /return
    /if (${Spawn[${targ}].ID}) {
      /varset targid ${Spawn[${targ}].ID}
      /if (${Spawn[${targ}].Distance}<100) {
|        /echo Targeting ${Spawn[${targ}]}
		 /echo Targeting ${targ}
         /target id ${targid}
         /delay 30 ${Target.ID}==${targid}
      }
   }
   /if (!${Target.ID}) {
      /echo [NPCtoKillMe] couldnt find a target, retrying
      /delay 1s
      /goto :retarget
   }
/return

| --------------------------------------------------------------
| Sub: DelevelMe
| --------------------------------------------------------------
|Sub DelevelMe (int tolevel)
Sub DelevelMe
	/declare NpcToHitFound bool local 0
	/declare IAmDead bool local 0
	:DelevelStart
	/echo DelevelMe
|	/if (${Me.Level}>tolevel) {
	/if (${Me.Level}>20) {
		/varset IAmDead 0
		/varset NpcToHitFound 0
		/if (${Target.ID}) /varset NpcToHitFound 1
		
		/if (${NpcToHitFound}) {
			/if (!${Me.Combat}) {
				/if (${Me.Sitting}) /stand
				/killthis
				:StillAlive
				/doevents
				/delay 3s
				/if (${Window[RespawnWnd].Open}) /nomodkey /notify RespawnWnd RW_SelectButton leftmouseup
				}
			} 
		} else {
			/echo ${NpcToHit} out of range, waiting...
			/delay 5s
		}
		/goto :DelevelStart
	}
/return
 
Forgot about this thread. This macro runs when you're bound next to the two guards at the top of the hogscaller inn inside Freeport. If you're evil, you can faction through normal means (whiskers) or there's a task in south ro that gives +20 per turn-in--you kill 15 sand giants. either way, takes about 5 minutes to delevel from 70 to 19 and half of that is from the corpseclear sub. Requires MQ2Melee and MQ2Rez, with the latter having Spawn=1 set in the INI.

Rich (BB code):
Sub Main
	:die
	/if (${Me.Level}>19) {
		/target militia enforcer
		/killthis
		/delay 2s
		/goto :die
	} else {
		/call CorpseClear
		/bc I am finished de-leveling.
		/endmacro
	}
/return

Sub CorpseClear
	:loop
	/squelch /target clear
	/squelch /target mycorpse next
	/if (${Target.ID}) {
		/decaycorpse
		/notify ConfirmationDialogBox CD_Yes_Button leftmouseup
		/delay 5
		/goto :loop
	}
/return
 
Last edited:
Thanks for responding. Your version is much cleaner than mine. I think I was over-thinking it a bit much.

One thing with yours though. When I ran it, it wouldn't click on the window to respawn right there at the bind point.

I added this line after the /killthis one and it did the trick:

/if (${Window[RespawnWnd].Open}) /nomodkey /notify RespawnWnd RW_SelectButton leftmouseup

Thanks again for the info. :)
 
Thanks for responding. Your version is much cleaner than mine. I think I was over-thinking it a bit much.

One thing with yours though. When I ran it, it wouldn't click on the window to respawn right there at the bind point.

I added this line after the /killthis one and it did the trick:

/if (${Window[RespawnWnd].Open}) /nomodkey /notify RespawnWnd RW_SelectButton leftmouseup

Thanks again for the info. :)

oh yeah. it requires mq2rez to bet set at spawn=1. that will automatically click the window for you.
 
Question - Suicide Bot

Users who are viewing this thread

Back
Top