Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 07-27-2007, 03:45 AM
Strake
Sarnak
 
Join Date: Jul 2007
Posts: 37
Default

Okay, before I compile it and break everything, does this look good to everyone else?
(Reminder: I'm trying to allow #summonitem with augments and items with charges while not allowing people to stack item stats. I figured, since 100 is the max number of charges, and 1001 is the lowest item number, there's no chance of item stacking)

Code:
void command_summonitem(Client *c, const Seperator *sep)
{
	if (!sep->IsNumber(1))
		c->Message(0, "Usage: #summonitem [item id] [charges], charges are optional");
	else {
		int32 itemid = atoi(sep->arg[1]);
		if (database.GetItemStatus(itemid) > c->Admin())
			c->Message(13, "Error: Insufficient status to summon this item.");
		else if (sep->argnum==2 && sep->IsNumber(2)) {
			const Item_Struct* itm = database.GetItem(itemid);
			if(itm){
				if(itm->AugType == 0 || atoi(sep->arg[2]) > 100){
					c->SummonItem(itemid);
				}
				else
				{
					c->SummonItem(itemid, atoi(sep->arg[2]) );
				}
			}
		else {
			c->SummonItem(itemid);
		}
	}
}
-Dillon
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 11:46 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3