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;
}
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

