• 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
MQ2PlatTracker

Release MQ2PlatTracker

Tracks platinum changes and shows a total gained/lost since loading plugin or resetting start amount.

Rich (BB code):
/plat :: Lists command syntax
/plat reset :: Resets starting amount of platinum to current platinum.
/plat show :: Shows amount of platinum gained or lost since last reset.

Source
Rich (BB code):
// MQ2PlatTracker.cpp :: RedGuides exclusive plugin to track platinum changes
// v1.00 :: Sym - 2012-11-11
// v1.01 :: Sym - 2013-01-03 - Added plat per hour average
// v1.02 :: Sym - 2013-01-27 - Fixed timer reset for plat per hour average

#include "../MQ2Plugin.h"

PLUGIN_VERSION(1.02);
PreSetup("MQ2PlatTracker");

#define SECOND 1000
#define MINUTE (60 * SECOND)
#define HOUR (60 * MINUTE)
#define DAY (24 * HOUR)

DWORD StartTime = GetTickCount();
unsigned int sCash = 0;
unsigned int cCash = 0;

bool didInit = false;
char szTemp[MAX_STRING];

void ShowHelp(void) {
	WriteChatf("\atMQ2PlatTracker :: v%1.2f :: by Sym for RedGuides.com\ax", MQ2Version);
	WriteChatf("/plat :: Lists command syntax");
	WriteChatf("/plat reset :: Resets starting amount of platinum to current platinum.");
	WriteChatf("/plat show :: Shows amount of platinum gained or lost since last reset along with the average per hour.");
}

void PlatTrackerCommand(PSPAWNINFO pChar, PCHAR szLine) {
    int b = 0;
    GetArg(szTemp,szLine,1);
    if(!strnicmp(szTemp,"reset",5)) {
		sCash=GetCharInfo2()->Plat*1000+GetCharInfo2()->Gold*100+GetCharInfo2()->Silver*10+GetCharInfo2()->Copper;
		WriteChatf("MQ2PlatTracker :: \ayStarting amount reset to %.3f platinum\ax", float(sCash)/1000);
		StartTime = GetTickCount();
        return;
    }
	if(!strnicmp(szTemp,"show",5)) {
		cCash = GetCharInfo2()->Plat*1000+GetCharInfo2()->Gold*100+GetCharInfo2()->Silver*10+GetCharInfo2()->Copper;
	    DWORD RunningTime = GetTickCount() - StartTime;
	    FLOAT RunningTimeFloat = (float)RunningTime/HOUR;

		if (cCash > sCash) {
			WriteChatf("MQ2PlatTracker :: \agYou have gained a total of %.3f platinum (%.3f platinum per hour)\ax", float(cCash - sCash) / 1000, float(((cCash - sCash) / 1000)/RunningTimeFloat));
		} else if (cCash < sCash) {
			WriteChatf("MQ2PlatTracker :: \arYou have lost a total of %.3f platinum (%.3f platinum per hour)\ax", float(sCash - cCash) / 1000, float(((sCash - cCash) / 1000)/RunningTimeFloat));
		} else {
			WriteChatf("MQ2PlatTracker :: \ayNo platinum changes detected yet\ax");
		}
		return;
	}
	ShowHelp();
}

// Called once, when the plugin is to initialize
PLUGIN_API VOID InitializePlugin(VOID) {
    DebugSpewAlways("Initializing MQ2PlatTracker");

    //Add commands, MQ2Data items, hooks, etc.
    AddCommand("/plat",PlatTrackerCommand);
}

// Called once, when the plugin is to shutdown
PLUGIN_API VOID ShutdownPlugin(VOID) {
    DebugSpewAlways("Shutting down MQ2PlatTracker");

    RemoveCommand("/plat");
}



// Called once directly after initialization, and then every time the gamestate changes
PLUGIN_API VOID SetGameState(DWORD GameState) {
    DebugSpewAlways("MQ2PlatTracker::SetGameState()");
    if (GameState==GAMESTATE_INGAME && !didInit) {
		didInit = true;
		StartTime = GetTickCount();
		sCash=GetCharInfo2()->Plat*1000+GetCharInfo2()->Gold*100+GetCharInfo2()->Silver*10+GetCharInfo2()->Copper;
		WriteChatf("\atMQ2PlatTracker :: v%1.2f :: by Sym for RedGuides.com\ax", MQ2Version);
	}
}
 
Last edited:
MQ2PlatTracker - Tracks platinum changes and shows a total gained/lost since loading plugin or resetting start amount.

Rich (BB code):
/plat - Lists command syntax
/plat reset - Resets starting amount of platinum to current platinum. 
/plat show - Shows amount of platinum gained or lost since last reset.
 
I don't suppose you have the source for this plugin available ... Is like to add the ability to save the plat amounts to an INI between sessions.

Classes are over in 3 weeks and I'll have time to putter around.
 
Here are my updates to work with an INI file.

The ini file used is SERVER_CHARACTERNAME.ini
The Section added is: [PlatTracker]

It automatically saves the plat on the character and the total time since the last reset if you camp to character select.
However it does not auto save the information to the ini if "/camp desktop" or "/ex" is used.

you also have the option to save the information manually with the command "/plat save"

"/plat reset" will also reset the plat in the ini to the current amount of plat on the character and the running time to 0.

Sym feel free to take or trash my changes as you wish.
 
Last edited:
Here are my updates to work with an INI file.

The ini file used is SERVER_CHARACTERNAME.ini
The Section added is: [PlatTracker]

It automatically saves the plat on the character and the total time since the last reset if you camp to character select.
However it does not auto save the information to the ini if "/camp desktop" or "/ex" is used.

you also have the option to save the information manually with the command "/plat save"

"/plat reset" will also reset the plat in the ini to the current amount of plat on the character and the running time to 0.

Sym feel free to take or trash my changes as you wish.

Red Cented Thanks for sharing
 
ill try that ... I didn't use it because it seemed only to fire when a plugin was forcibly unloaded but i never watched the spew on a /ex or /camp desktop to see if it fired then.
 
@Sym I like the plat and kill tracker.
I was curious if there was an experience tracker?

I wanted to compare if it is better to do a fellowship or a raid and stuff like that.
 
@Sym I like the plat and kill tracker.
I was curious if there was an experience tracker?

I wanted to compare if it is better to do a fellowship or a raid and stuff like that.

MQ2Xptracker is included in the Vanilla build and should work I believe. Haven't leveled any characters in a while so I haven't used it in a few patches, though.
 
Release MQ2PlatTracker

Users who are viewing this thread

Back
Top
Cart