• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

Server Census macro

  • Thread starter Thread starter Ccomp5950
  • Start date Start date
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.

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.
 
Server Census macro

Users who are viewing this thread

Back
Top
Cart