Tool to see who isn't in raid

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

brat
orc pawn
orc pawn
Posts: 15
Joined: Fri Nov 21, 2003 10:46 am

Tool to see who isn't in raid

Post by brat » Fri Nov 21, 2003 10:51 am

For those guilds who have to manage 72 people in Time B.
There is always those couple people who don't listen and cause people to poof to GY.

The way this works is you do a RaidDump from the UI
Click the external Parser that converts RaidDump to an .ini file - included
Then /macro raid (channel)

Raid.cpp - will have to modify file locations as needed

Code: Select all

#include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[])
{
	FILE *fp,*fp2;
	char input[256],name[64];
	char *key;
	int i, length, j=0;

	printf("renaming\n");
	system("copy x:\\raidd*.txt x:\\raiddump.txt");
	printf("opening\n");
	fp = fopen("x:\\raiddump.txt","r");
	if (fp == 0) {
		printf("BAD FILE\n");
	}
	else {
		printf("opening2\n");
		fp2 = fopen("z:\\raid.ini","w");
		fprintf(fp2,"[raid]\n");
		do {
			key = fgets(input,256,fp);
			if (key != NULL) {
				length = (int)strlen(input);
				for (i = 0;i < length;i++) {
					if (input[i]==',') input[i]=0;
				}
				sprintf(name,"%s",&input[3]);
				j++;
				fprintf(fp2,"%s=%d\n",name,j);
			}				
		} while (key != NULL);
		fclose(fp2);
		fclose(fp);
	}
	printf("removing\n");
	system("del x:\\raiddump*.txt");
	//scanf("%d",&i);
	return 0;
}
raid.mac

Code: Select all

#turbo
#define INIFile "z:\raid.ini" 

Sub Main
/declare LoopID global
/declare Channel global
/declare NotInList global

/press f1
/varset LoopID $target(id)
/varset NotInList "ARE NOT IN RAID"

:getnext
/if n @LoopID==0 /goto :gotlistheader
/if "$spawn(@LoopID,type)"=="player" {
  /if "$ini("INIFile","raid","$spawn(@LoopID,name)")"=="NOTFOUND" {
    /varset NotInList "$spawn(@LoopID,name), @NotInList"
  }
}
/varset LoopID $spawn(@LoopID,next)
/goto :getnext

:gotlistheader

/varset LoopID $target(id)
/varset LoopID $spawn(@LoopID,prev)

:getnext2
/if n @LoopID==0 /goto :gotlistheader2
/if "$spawn(@LoopID,type)"=="player" {
  /if "$ini("INIFile","raid","$spawn(@LoopID,name)")"=="NOTFOUND" {
    /varset NotInList "$spawn(@LoopID,name), @NotInList"
  }
}
/varset LoopID $spawn(@LoopID,prev)
/goto :getnext2

:gotlistheader2
/if "@Param0"=="1" { 
  /1 @NotInList 
} else /if "@Param0"=="2" {
  /2 @NotInList 
} else /if "@Param0"=="3" {
  /3 @NotInList 
} else /if "@Param0"=="rs" {
  /rs @NotInList 
} else /if "@Param0"=="gu" {
  /gu @NotInList 
} else /if "@Param0"=="say" {
  /say @NotInList 
} else {
  /echo @NotInList
}
/return

Midnight
a lesser mummy
a lesser mummy
Posts: 68
Joined: Wed Nov 12, 2003 12:51 pm

Post by Midnight » Fri Nov 21, 2003 12:50 pm

Will test this tonight at raids.. See if it helps out our LC's at all. No more comparison pages

brat
orc pawn
orc pawn
Posts: 15
Joined: Fri Nov 21, 2003 10:46 am

Post by brat » Fri Nov 21, 2003 1:01 pm

just a couple comments..

it expects that there is only one raiddump_XYZ.txt file in the /everquest directory - clean out all old files - "pre-clicking" the parser will do this for you. DUMP will put a new file in /everquest with raiddump_date_time.txt. The parser has some hacktastic logic to get this file open.

update all file locations in both files to reflect your setup. raiddump in /eq and .ini in your /marcos directory

compile the .cpp - as if people here shouldn't realize that .. but I figure, might as well pre-emt the less skilled from making that comment.

NotSoCSharp
a ghoul
a ghoul
Posts: 85
Joined: Sat Oct 25, 2003 10:48 am

Post by NotSoCSharp » Fri Nov 21, 2003 2:49 pm

Also looks like you have hard coded drive letters in the source. You might want to mention that people need to change these based on their configuration.

Edit: Um, and yes you did mention that! DOH! :oops:

brat
orc pawn
orc pawn
Posts: 15
Joined: Fri Nov 21, 2003 10:46 am

Post by brat » Fri Nov 21, 2003 2:56 pm

I'd also be open to someone throwing together a routine that figures out the most recent raiddump_X_Y.txt and just use that. I was a bit lazy about it. Would make it so you don't have to delete the dumps and can use them for DB entry to assign DKP.

ulitmately having a raid structs available in MQ would be even better.

NotSoCSharp
a ghoul
a ghoul
Posts: 85
Joined: Sat Oct 25, 2003 10:48 am

Post by NotSoCSharp » Fri Nov 21, 2003 3:40 pm

ulitmately having a raid structs available in MQ would be even better.
Sounds like a plugin to me!! :D

J-Squared
orc pawn
orc pawn
Posts: 22
Joined: Wed Nov 19, 2003 11:02 am

Post by J-Squared » Tue May 18, 2004 1:29 pm

ulitmately having a raid structs available in MQ would be even better.
Now that this has happened/happening perhaps this can be revisited. The above was a useful idea/concept, however the hassle of doing the end around each time to capture the raid data was prohibative.

Having this and also another tool that told you how many of X class was in the raid would really help in managing a raid as the night progressed.