Page 1 of 1

Raid Tracking

Posted: Sun May 30, 2004 9:26 am
by Kizzy
Well, I searched to my heart's content for something that could come close to fulfilling what I need but came up blank. Looking for something that can make life easier on our loot system. That part I have done, but the tracking part has me stumped so here I am.
Anyone have a way to capture "PLAYER has entered the raid" and left for that matter and put that name into a generic text file with a time stamp?
(I did some work with the /log and dumps but there was no way to import the things I needed with all the other text and junk). Ideally having something calculate the total time for a player would be genius but I don't have the smarts to do something like that. Any help would be appreciated for those macro/plug-in guru's out there.


btw..
Yes I did search the forums for something like this.. Maybe I missed it but don't think so.. and don't flame because I asked for help even if it ends up to be something simple. Not all of us are as perfect as those who like to take the time to bash someone instead of help.

Posted: Sun May 30, 2004 9:35 am
by wassup
readme.chm is your friend... in particular, look at events and /mqlog

Posted: Sun May 30, 2004 9:11 pm
by Rusty~
ok i'm really bored so i'm gonna give this a shot. it might actually be pretty useful
no clue if it works or not, just wrote it now and not in game. can give it a shot though, probably has some bugs though

typing "/echo write log " should make it write to mq log file. it clears the file first then writes all the info to it

Code: Select all

#event RaidJoin "#1# joined the raid." 
#event WriteLog "[MQ2] write log" 

Sub Main 
   /declare i int local 
   /declare raidList string outer | 
:mainloop 
   /for i 1 to ${Raid.Members} 
      /if ( !${raidList.Find[|${Raid.Member[${i}]}|]} ) /call AddPlayer ${Raid.Member[${i}]} 
      /varcalc totalTime${Raid.Member[${i}]} ${totalTime${Raid.Member[${i}]}} + ( ( ${MacroQuest.Running} - ${lastJoinTime${Raid.Member[${i}]}} ) /1000 )
      /varset lastJoinTime${Raid.Member[${i}]} ${MacroQuest.Running} 
   /next i 
   /doevents 
   /delay 1s 
   /goto :mainloop 

Sub AddPlayer(string playerName) 
   /varset raidList ${raidList}${playerName}| 
   /declare firstJoinTime${playerName} string outer ${Time} 
   /declare lastJoinTime${playerName} float outer ${MacroQuest.Running} 
   /declare totalTime${playerName} int outer 0 
/return 

Sub Event_WriteLog 
   /mqlog clear 
   /declare i int local 
   /declare playerName string local 
   /for i 1 to ${Math.Calc[${raidList.Count[|]}-1]} 
      /varset playerName ${raidList.Arg[${i},|]} 
      /mqlog ${playerName} joined at ${firstJoinTime${playerName}}. Total time: ${totalTime${playerName}} seconds. 
   /next i 
/return 

Sub Event_RaidJoin(string line,string playerName) 
   /varset lastJoinTime${playerName} ${MacroQuest.Running} 
/return