Jump to content
  • 0

Preventing GM to drop item


Question

Posted

Hello guys..

 

I knew that in groups.conf that we can set for GM to have permission to drop/trade/storage

 

can_trade: false

But, when their inventory is full. Items that can be trade (that are not in item_trade.txt) can be accidentally dropped and GM is still can abuse that.

 

So, is there any ways to prevent this? Maybe when their full of weight, they can't make any item that same goes like 30k item limit.

 

Or there's another way that I still didn't know.

 

Thank you.

8 answers to this question

Recommended Posts

Posted

try this

 

inside trunk/src/map/atcommand.c

find

	item_id = item_data->nameid;
	get_count = number;
	//Check if it's stackable.
	if (!itemdb_isstackable2(item_data))
		get_count = 1;

add below....

		int weight = 0;
		weight += itemdb_weight(item_id) * get_count;
		if( weight + sd->weight > sd->max_weight ){
			script_pushint(st,0);
			return 0;
		}
Posted

Thanks Emistry. But,

 

atcommand.c: In function âatcommand_itemâ:
atcommand.c:1338: warning: implicit declaration of function âscript_pushintâ
atcommand.c:1338: error: âstâ undeclared (first use in this function)
atcommand.c:1338: error: (Each undeclared identifier is reported only once
atcommand.c:1338: error: for each function it appears in.)
make[1]: *** [obj_sql/atcommand.o] Error 1

/??

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...