Necro Sacrifice Scripts (Necro and Victim)

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

drzoon
a hill giant
a hill giant
Posts: 239
Joined: Tue May 04, 2004 5:38 pm

Necro Sacrifice Scripts (Necro and Victim)

Post by drzoon » Wed Jun 29, 2005 8:15 am

Here's two little scripts I whipped up to automate my necro when saccing people. I wrote the SacVictim one when saccing one of my toons down to 52, since I couldn't be bothered to sit there and click ok 100 times :)

I added the invite code as an afterthought, since my 2nd box kept crashing on zoning and I had to keep inviting and restarting the SacNecro mac. I haven't tested it, but its pretty simple and I'm sure there'll be no problems with it.

You'll need spell_routines.inc found here.

Code: Select all

| SacNecro.mac v1.0
| Written by drzoon
| Last updated 2005-06-29

| Usage: Just target your victim and start the macro
| 		 Modify the StopAtLevel number to set the minimum level (of your victim) you want to sacrifice down to

#include spell_routines.inc
#event NotGrouped "You must first target a group member."

Sub Main
	/declare SacCount int local 0
	/declare VictimName string local
	/declare StopAtLevel int local 52

	| Check victim exists/is grouped
	/if (!${Target.ID} || ${Target.Type.NotEqual[PC]}) {
		/echo Error: Target your victim, then restart the macro!
		/endmacro
	} else {
		/varset VictimName ${Target.Name}
	}
	
	:main_loop
	/doevents

	| Check for cursor items and autoinventory any items
	/if (${Cursor.ID}) {
		/if (${Cursor.Name.Equal[Essence Emerald]}) {
			/varcalc SacCount ${SacCount}+1
		}
		/autoinventory
		/delay 1s
		/goto :main_loop
	}
	
	| Check I have emeralds
	/if (!${FindItem[Emerald].ID}) {
		/echo Error: Can't find any emeralds, exiting!
		/goto :end_of_macro
	}
	
	/if (${Bool[${Spawn[pc ${VictimName}]}]}) {
		/target pc ${VictimName}
		/delay 1s ${Target.Name.Equal[${VictimName}]}
	} else {
		/goto :main_loop
	}
	
	/if (!${Target.ID} || ${Target.Type.Equal[Corpse]} || ${Target.Name.NotEqual[${VictimName}]}) /goto :main_loop
	
	/if (${Target.Level}<=${StopAtLevel}) {
		/echo Target Level reached, stopping
		/goto :end_of_macro
	}
	
	/if (${Target.Name.Equal[${VictimName}]} && ${Target.Type.NotEqual[Corpse]}) {
		/call Cast Sacrifice gem7 8s
	}
	
	/delay 1s
	/goto :main_loop
	
	:end_of_macro
	/if (${SacCount}>0) {
		/echo =============================
		/echo Total Sacrifices: ${SacCount}
	}

/return


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

Code: Select all

| SacVictim.mac
| Written by drzoon
| Last updated 2005-06-29

| 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
	}
	/doevents
	/goto :wait_for_sac
/return

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

JamesTree99
decaying skeleton
decaying skeleton
Posts: 8
Joined: Fri Dec 09, 2005 7:43 pm

Post by JamesTree99 » Fri Oct 20, 2006 10:18 pm

I loved using this script. I was wondering if someone could update it to click Respawn? With the new changes to death, it would be very useful. Thanks in advance if you can :)

drzoon
a hill giant
a hill giant
Posts: 239
Joined: Tue May 04, 2004 5:38 pm

Post by drzoon » Sat Oct 21, 2006 6:24 am

Try this for the SacVictim.mac:

Code: Select all

| 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
Untested but should work; I just added a line in to click the Respawn button if the Respawn window is there. Let me know if there are any problems.

Villageidiot
orc pawn
orc pawn
Posts: 23
Joined: Sun Jan 21, 2007 5:48 pm
Location: The moon

Re: Necro Sacrifice Scripts (Necro and Victim)

Post by Villageidiot » Thu May 24, 2012 9:51 am

Great macro, used the first version as i had something else to accept rez. Just wanted to say thanks.

Maskoi

Re: Necro Sacrifice Scripts (Necro and Victim)

Post by Maskoi » Thu May 24, 2012 2:52 pm

Posted: Wed Jun 29, 2005 6:15 am
How to necro a necro thread. :)










xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Necro Sacrifice Scripts (Necro and Victim)

Post by xyilla » Tue Jan 06, 2026 11:11 pm