Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-14-2012, 05:42 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default #peekinv money

A quick little patch for anyone interested in viewing a player's money.

It uses currently coded public client functions, but could be expounded upon if the need ever arises.

[MoneyPeek.patch]
Code:
Index: command.cpp
===================================================================
--- command.cpp	(revision 2229)
+++ command.cpp	(working copy)
@@ -263,7 +263,7 @@
 		command_add("appearance","[type] [value] - Send an appearance packet for you or your target",150,command_appearance) ||
 		command_add("charbackup","[list/restore] - Query or restore character backups",150,command_charbackup) ||
 		command_add("nukeitem","[itemid] - Remove itemid from your player target's inventory",150,command_nukeitem) ||
-		command_add("peekinv","[worn/cursor/inv/bank/trade/trib/all] - Print out contents of your player target's inventory",100,command_peekinv) ||
+		command_add("peekinv","[money/worn/cursor/inv/bank/trade/trib/all] - Print out contents of your player target's inventory",100,command_peekinv) ||
 		command_add("findnpctype","[search criteria] - Search database NPC types",100,command_findnpctype) ||
 		command_add("findzone","[search criteria] - Search database zones",100,command_findzone) ||
 		command_add("fz",NULL,100,command_findzone) ||
@@ -3029,7 +3029,18 @@
 	Client* client = c->GetTarget()->CastToClient();
 	const Item_Struct* item = NULL;
 	c->Message(0, "Displaying inventory for %s...", client->GetName());
-		
+	
+	if (bAll || (strcasecmp(sep->arg[1], "money")==0)) {
+		// Money
+		bFound = true;
+		c->Message(0, "Total Money (in Copper): %i", client->GetAllMoney());
+		c->Message(0, "Carried Money (in Copper): %i", client->GetCarriedMoney());
+		c->Message(0, "Carried Platinum: %i", client->GetPlatinum());
+		c->Message(0, "Carried Gold: %i", client->GetGold());
+		c->Message(0, "Carried Silver: %i", client->GetSilver());
+		c->Message(0, "Carried Copper: %i", client->GetCopper());
+	}
+
 	if (bAll || (strcasecmp(sep->arg[1], "worn")==0)) {
 		// Worn items
 		bFound = true;
@@ -3331,7 +3342,7 @@
 		
 	if (!bFound)
 	{
-		c->Message(0, "Usage: #peekinv [worn|cursor|inv|bank|trade|trib|all]");
+		c->Message(0, "Usage: #peekinv [money|worn|cursor|inv|bank|trade|trib|all]");
 		c->Message(0, "  Displays a portion of the targeted user's inventory");
 		c->Message(0, "  Caution: 'all' is a lot of information!");
 	}
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:34 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3