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.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-24-2007, 04:25 AM
Strake
Sarnak
 
Join Date: Jul 2007
Posts: 37
Default #summonitem - augments

I'm trying to remove item stacking, while allowing augments, so I've narrowed it down to:
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)) {
			c->SummonItem(itemid, atoi(sep->arg[2]) );
		else {
			c->SummonItem(itemid);
		}
	}
}
I was wondering if there was some kind of "is item an augment" thing (kinda like sep->IsNumber(2) but for augments)

Thanks,
Dillon
Reply With Quote
  #2  
Old 07-24-2007, 11:59 AM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

You don't want anything to stack? ~confused~
Reply With Quote
  #3  
Old 07-24-2007, 12:18 PM
Strake
Sarnak
 
Join Date: Jul 2007
Posts: 37
Default

like #summonitem 11000 11000 11000 11000 11000 to get 5x the stats
Reply With Quote
  #4  
Old 07-24-2007, 01:01 PM
techguy84's Avatar
techguy84
Discordant
 
Join Date: Apr 2007
Location: Somewhere Safe
Posts: 453
Default

Quick hide that post otherwise your players are going to be running around with high powered rifles and then you have to go through and find out which ones are, and people arent always honest.
Reply With Quote
  #5  
Old 07-24-2007, 03:30 PM
Strake
Sarnak
 
Join Date: Jul 2007
Posts: 37
Default

heh, no stackers left on my server.

SELECT * FROM eqemu.inventory WHERE augslot1 > 0 OR augslot2 > or OR augslot3 > 0 OR augslot4 > 0 OR augslot5 > 0;

and then

UPDATE eqemu.inventory SET augslot1=0, augslot2=0, augslot3=0, augslot4=0, augslot5=0;

and that one will remove ALL stacked items and turn them to normal. =p
Reply With Quote
  #6  
Old 07-24-2007, 04:41 PM
techguy84's Avatar
techguy84
Discordant
 
Join Date: Apr 2007
Location: Somewhere Safe
Posts: 453
Default

Ooo, I only say this in dire times, but I have to here.



...... Pwned.......


Cheers Strake. Is this on Krushers? I seen a post I think about item mods in Server Discussion. Now if you can just figure out what code allows this nifty little hack.
Reply With Quote
  #7  
Old 07-24-2007, 06:35 PM
Strake
Sarnak
 
Join Date: Jul 2007
Posts: 37
Default

It's already in place, I'm trying to REMOVE it due to abuse.
Reply With Quote
  #8  
Old 07-24-2007, 07:39 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Hmm, I'm a bit confused so bare with me.

If you wanted to remove the ability to summon items with charges that were augments you could probably just change your code to(I haven't tested this btw =p)

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){
					c->SummonItem(itemid, atoi(sep->arg[2]) );
				}
				else
				{
					c->SummonItem(itemid);
				}
			}
		else {
			c->SummonItem(itemid);
		}
	}
}
Though again I'm a little confused as to what's trying to be accomplished, fixing some exploit I don't know about I guess.
Reply With Quote
  #9  
Old 07-25-2007, 01:16 AM
Strake
Sarnak
 
Join Date: Jul 2007
Posts: 37
Default

I mean, if not augment then tell it no, if so augment allow. Some minor tweaking to that and it'll work. Thanks a ton man! I'm new to source editing and still trying to get the hang of it. Haven't found all of the options for everything, like AugType and such.

Thanks again!,
Dillon
Reply With Quote
  #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
Reply


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 05:07 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