Logging Macro for DKP

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

Moderator: MacroQuest Developers

Harden
a hill giant
a hill giant
Posts: 244
Joined: Thu Aug 25, 2005 8:23 pm

Logging Macro for DKP

Post by Harden » Sun Jan 01, 2006 3:52 am

If you DKP system is anything like ours, it uses a Log Parser, and pulls out names based on a /list of a channel, and /who's in the zone. I wrote a small macro to handle the /list and /who functions, mainly because I forget to do it, and the logs get messed up. So here it is:

Code: Select all

|DKPParse.mac by Harden 
|Events Borrowed From Gimps krust.mac 
|Special Thanks to Gimp for all the Help he's provided me. 
|Janurary 01, 2006 
|Last Updated: Feburary 3, 2006 
|Channels can be listed by name, rather then number, in case your channel numbers change a lot. 
|Added a Check to see if your in a Raid.
|
|This Macro Auto-Updates your Logs for DKP. 
|Does /list and /who commands every 15 Minutes 
|Provides Function to see who in Raid is Not in zone, by typing /notinzone 
|Added "Camp Check" to end macro if you camp. 
|Change the Name to match your Raid Channel Name. (ex. /list WeRaidGud)- 
|Change 15m, to what ever Time Frequency you want (ex. 15m = 15 Minutes)- 

#Event WhoNotInZone        "[MQ2] notinzone"
Sub Event_WhoNotInZone(string Line)
	/if (!${Raid.Members}) {
		/echo /notinzone: You are not in raid.
		/return
	}
	
	/echo --------------------------
	/echo # Raid members not in zone:
	
	/declare i int local 0
	/declare cnt int local 0

	/for i 1 to ${Raid.Members}
		/if (!${Spawn[PC ${Raid.Member[${i}].Name}].ID}) {
			/echo # ${Raid.Member[${i}].Name} [${Raid.Member[${i}].Class.ShortName}] (${SpawnCount[pc ${Raid.Member[${i}].Class.ShortName}]} ${Raid.Member[${i}].Class.Name.Lower}s in zone)
			/varcalc cnt ${cnt}+1
		}
	/next i

	/echo # ${cnt} of ${Raid.Members} raid members not in zone
	/echo --------------------------
/return

Sub MakeRaidDumpsFunction
	|Change Channel(s) to Suit your Raid Channels 
    /list RaidChannel1 
    /delay 1
    /list RaidChannel2
    /delay 1
    / 
/return

#Event	Camping				"#*#It will take you about 30 seconds to prepare your camp.#*#"
Sub Event_Camping
	/echo Camping - Ending macro!
	/endmacro
/return

Sub Main
	/declare MakeRaidDumpsTimer     timer outer 0

	/squelch /alias /notinzone /echo notinzone

	:dkploop
		/doevents

		|DKP log parse
		|Change 15m to what time interval you want logs updated (15m = 15 Minutes)
			/if (!${MakeRaidDumpsTimer} && ${Raid.Members}) {
			/echo [${Time}] # Updating Logs for DKP. 
			/call MakeRaidDumpsFunction
			/popup Updating Logs for DKP.
			/echo Next Update in 15 Minutes.
			/varset MakeRaidDumpsTimer 15m 
		}
	
	/goto :dkploop
/return
Just need to Modify The channel Name, and the Timer (how often you want it to Update the logs)

Also included is the command /notinzone (Thanks Gimp, Borrowed from Krust.mac) Reports who is in raid, but not in zone.

I Don't know if anyone will Find use for this, but I thought I would share reguardless.
Last edited by Harden on Fri Feb 03, 2006 11:00 am, edited 4 times in total.
-Harden
I wanna be a Macro Writer when I grow up!

NFC
a hill giant
a hill giant
Posts: 151
Joined: Mon Dec 19, 2005 2:16 pm

Post by NFC » Sun Jan 01, 2006 5:14 pm

Before I go any further, let me qualify something: I am adventurous enough to try and make anything work but I'm not the vaguest idea what I'm doing with plugins or macros, other than the basic: Creating, compiling and running. When it comes to writing I leave that to the experts.

That said, is there any way something like this could be built into another macro? I like to keep Krust's macro running for the auto clickies and /acceptrez functions, but something like this would be a great add on to that.

Not sure if it's even a possibility, but maybe something like the /autorez or /autoinvite toggles in Krust?

JimJohnson
a grimling bloodguard
a grimling bloodguard
Posts: 1299
Joined: Sat Oct 11, 2003 6:00 am

Post by JimJohnson » Sun Jan 01, 2006 6:33 pm

wouldnt be to hard to change it to an include file should post a link and a request to it in Gimps threds.

Harden
a hill giant
a hill giant
Posts: 244
Joined: Thu Aug 25, 2005 8:23 pm

Post by Harden » Sun Jan 01, 2006 7:06 pm

NFC wrote:Before I go any further, let me qualify something: I am adventurous enough to try and make anything work but I'm not the vaguest idea what I'm doing with plugins or macros, other than the basic: Creating, compiling and running. When it comes to writing I leave that to the experts.

That said, is there any way something like this could be built into another macro? I like to keep Krust's macro running for the auto clickies and /acceptrez functions, but something like this would be a great add on to that.

Not sure if it's even a possibility, but maybe something like the /autorez or /autoinvite toggles in Krust?

I personally use Krust also. and I have added this into the main loop for krust as well.

Open krust.mac with notepad, or another editing software (VC++ works also)

Add this with the other sub functions:

Code: Select all

Sub MakeRaidDumpsFunction 
    /list 3
    /delay 1s
    /
/return
For me it looks like this:

Code: Select all

|Opens up friend window, since the macro uses a modified feedback xml file to display data
	|sometimes this is NULL bleh
	/if (!${Window[FriendsWindow].Open}) {
		/nomodkey /keypress alt+f
	}

/return

Sub MakeRaidDumpsFunction 
    /list 3
    /delay 1s
    /
/return

#Event AutoAcceptInvite "[MQ2] acceptinvite"
Sub Event_AutoAcceptInvite(string Line)
	/varcalc autoAcceptInvite ${autoAcceptInvite}+1
	/if (${autoAcceptInvite} == 1) {
		/echo # The next group or raid invite will be auto-accepted.
	} else {
		/echo # The next ${autoAcceptInvite} group or raid invites will be auto-accepted.
	}
/return
Then add this line somewhere under sub main:

Code: Select all

/declare MakeRaidDumpsTimer		timer outer 0
Mine looks like this:

Code: Select all

/declare mendReuseTime			timer outer 0
	/declare oakenGuardReuseTime	timer outer 0
	/declare UpdateClickiesTimer	timer outer 0
	/declare MakeRaidDumpsTimer		timer outer 0
	
	

	
	/declare UpdateTimer			timer outer 0
Now under :krustloop add:

Code: Select all

|DKP log parse
		/if (!${MakeRaidDumpsTimer}) {
			/echo # Updating Logs for DKP.
			/call MakeRaidDumpsFunction 
			/varset MakeRaidDumpsTimer 10m 
		}
Should look something like this:

Code: Select all

:krustloop
		/doevents

		|Update various regularry, like "do i have a modrod", average resists, current buff slots used etc
		/if (!${UpdateTimer}) {
			/varset UpdateTimer 3s
			/call DoRegularUpdates
		}
		
		|DKP log parse
		/if (!${MakeRaidDumpsTimer}) {
			/echo # Updating Logs for DKP.
			/call MakeRaidDumpsFunction 
			/varset MakeRaidDumpsTimer 10m 
		}
		
		|Refresh clickies every 30 seconds
		/if (!${UpdateClickiesTimer}) {
			/call DoClickies
			/varset UpdateClickiesTimer 30s
		}
If done correctly, when you start krust, after everything initilizes, it will do your raid dump (/lisy and /who) Then repeat every 10min, while krust is running.

Hope this helps.
-Harden
I wanna be a Macro Writer when I grow up!

NFC
a hill giant
a hill giant
Posts: 151
Joined: Mon Dec 19, 2005 2:16 pm

Post by NFC » Mon Jan 02, 2006 3:46 am

Works like a charm. Thanks for the help :)

Harden
a hill giant
a hill giant
Posts: 244
Joined: Thu Aug 25, 2005 8:23 pm

Post by Harden » Thu Jan 26, 2006 8:15 pm

Updated Jan 26, 2006.
-Realized Channel Names vice numbers could be used (If your channel numbers change a lot)
-Harden
I wanna be a Macro Writer when I grow up!

NFC
a hill giant
a hill giant
Posts: 151
Joined: Mon Dec 19, 2005 2:16 pm

Post by NFC » Wed Feb 08, 2006 10:09 am

Been using this for a while and I've got to say it's a lifesaver. One question/request though. If I wanted to narrrow it down, is there any way I can add a check to it to see if I'm in a raid first? I've added the code for this to my Krust.mac, but since I run Krust all the time when in game, it does logs all the time as well. Not a real problem except that I have to parse through 12 hours of logs when only 3 or 4 are relelvant and remove the rest.

Any thoughts?

Harden
a hill giant
a hill giant
Posts: 244
Joined: Thu Aug 25, 2005 8:23 pm

Post by Harden » Wed Feb 08, 2006 10:14 am

I fogot to post the update, but I did add that check

Code: Select all

/if (!${MakeRaidDumpsTimer} &[b]& ${Raid.Members}[/b]) {
So for Krust Change:

Code: Select all

 
:krustloop 
      /doevents 

      |Update various regularry, like "do i have a modrod", average resists, current buff slots used etc 
      /if (!${UpdateTimer}) { 
         /varset UpdateTimer 3s 
         /call DoRegularUpdates 
      } 
       
      |DKP log parse 
      [b]/if (!${MakeRaidDumpsTimer}) { [/b]
         /echo # Updating Logs for DKP. 
         /call MakeRaidDumpsFunction 
         /varset MakeRaidDumpsTimer 10m 
      } 
       
      |Refresh clickies every 30 seconds 
      /if (!${UpdateClickiesTimer}) { 
         /call DoClickies 
         /varset UpdateClickiesTimer 30s 
      } 
to this:

Code: Select all

 
:krustloop 
      /doevents 

      |Update various regularry, like "do i have a modrod", average resists, current buff slots used etc 
      /if (!${UpdateTimer}) { 
         /varset UpdateTimer 3s 
         /call DoRegularUpdates 
      } 
       
      |DKP log parse 
      [b]/if (!${MakeRaidDumpsTimer} && ${Raid.Members}) {[/b]
         /echo # Updating Logs for DKP. 
         /call MakeRaidDumpsFunction 
         /varset MakeRaidDumpsTimer 10m 
      } 
       
      |Refresh clickies every 30 seconds 
      /if (!${UpdateClickiesTimer}) { 
         /call DoClickies 
         /varset UpdateClickiesTimer 30s 
      } 
-Harden
I wanna be a Macro Writer when I grow up!

NFC
a hill giant
a hill giant
Posts: 151
Joined: Mon Dec 19, 2005 2:16 pm

Post by NFC » Wed Feb 08, 2006 1:41 pm

Awesome. Thanks :)

Harden
a hill giant
a hill giant
Posts: 244
Joined: Thu Aug 25, 2005 8:23 pm

Post by Harden » Wed Aug 16, 2006 10:11 pm

Converted this to a Plugin now also, You can find it here: http://www.macroquest2.com/phpBB2/viewtopic.php?t=13699
-Harden
I wanna be a Macro Writer when I grow up!

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

Re: Logging Macro for DKP

Post by xyilla » Mon Jun 30, 2025 9:25 pm


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

Re: Logging Macro for DKP

Post by xyilla » Mon Jun 30, 2025 9:26 pm


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

Re: Logging Macro for DKP

Post by xyilla » Mon Jun 30, 2025 9:27 pm


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

Re: Logging Macro for DKP

Post by xyilla » Mon Jun 30, 2025 9:29 pm


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

Re: Logging Macro for DKP

Post by xyilla » Mon Jun 30, 2025 9:30 pm