Jump to content
  • 0

Preventing GM to drop item


uDe

Question


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

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.

Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

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;
		}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

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

/??

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

BUMP.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

BUMP for today.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

BUMP

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

BUMP

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

BUMP

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

BUMP

Link to comment
Share on other sites

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.

×
×
  • Create New...