C
Ccomp5950
I wrote this with the intention to create a website with all the info harvested by this macro.
Plop a character in Plane of Knowledge and let it roll.
Oh and if you ask a question and post your INI, be sure and delete the first record as that is YOU.
You can use another macro to output to /mqlog and put it in comma delimited files with the intention to finally create a website around the idea to get % of different attributes.
Like "How many unguilded clerics on what server" etc.
Anyone that decides to actually do it, have fun and feel free to use this code any way you please.
Plop a character in Plane of Knowledge and let it roll.
Oh and if you ask a question and post your INI, be sure and delete the first record as that is YOU.
Code:
|Census Macro
|
| By Ccomp5950
|
|
|
|
#turbo 40
Sub Main
/declare recordnum int outer ${Ini[census.ini,Admin,recordnum,0]}
/declare filename string outer census.ini
/declare PCinfo[500,6] string outer
/declare Flag int outer 1
/declare nospawnFlag int outer 0
/declare X int outer
/declare Y int outer
/declare Z int outer
/declare temprecordnum int outer
/alert clear 1
:loop
/delay 1
/varset nospawnFlag 0
/if (!${SpawnCount[pc noalert 1]}) /goto :loop
/for X 1 to ${SpawnCount[pc noalert 1]}
/varset PCinfo[${X},1] ${NearestSpawn[${X}, pc noalert 1].CleanName}
/varset PCinfo[${X},2] ${NearestSpawn[${X}, pc noalert 1].Surname}
/varset PCinfo[${X},3] ${NearestSpawn[${X}, pc noalert 1].Guild}
/varset PCinfo[${X},4] ${NearestSpawn[${X}, pc noalert 1].Race}
/varset PCinfo[${X},5] ${NearestSpawn[${X}, pc noalert 1].Class}
/varset PCinfo[${X},6] ${NearestSpawn[${X}, pc noalert 1].Level}
/squelch /alert add 1 PC ${PCinfo[${X},1]}
/varset temprecordnum ${X}
/next X
/if (${nospawnFlag}==1) /goto :loop
/for Y 1 to ${temprecordnum}
/varset Flag 0
/for Z 1 to ${recordnum}
/if (${PCinfo[${Y},1].Equal[${Ini[Census.ini,Census,Name${Z}]}]}) /varset Flag 1
/next Z
/if (${Flag}==0) {
/varcalc recordnum ${recordnum}+1
/ini "census.ini" "Admin" "Recordnum" "${recordnum}"
/ini "census.ini" "Census" "Name${recordnum}" "${PCinfo[${Y},1]}"
/ini "census.ini" "Census" "Surname${recordnum}" "${PCinfo[${Y},2]}"
/ini "census.ini" "Census" "Guild${recordnum}" "${PCinfo[${Y},3]}"
/ini "census.ini" "Census" "Race${recordnum}" "${PCinfo[${Y},4]}"
/ini "census.ini" "Census" "Class${recordnum}" "${PCinfo[${Y},5]}"
/ini "census.ini" "Census" "Level${recordnum}" "${PCinfo[${Y},6]}"
/ini "census.ini" "Admin" "Recordnum" "${recordnum}"
/echo Added ${PCinfo[${Y},1]} to the census, character ${recordnum}
}
/next Y
/doevents
/goto :loop
/return
You can use another macro to output to /mqlog and put it in comma delimited files with the intention to finally create a website around the idea to get % of different attributes.
Like "How many unguilded clerics on what server" etc.
Anyone that decides to actually do it, have fun and feel free to use this code any way you please.

