View Single Post
  #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