Page 1 of 1

GM drop items restriction

Posted: Tue Aug 10, 2010 9:34 am
by iamhawk
L2J Revision 4401
L2JDP Revision 7650

How to restrict some GM or Char to drop any Item from inventory?

Re: GM drop items restriction

Posted: Tue Aug 10, 2010 4:37 pm
by jurchiks
well, there's not such function currently implemented so I guess you'll have to make that yourself...
make a new accesslevel in table access_levels and make the right condition in com.l2jserver.network.clientpackets.RequestDropItem

if (activeChar.getAccessLevel().getLevel() == youraccesslevelhere)
return;

if you want you can also add a config option for this or a new column to the access_levels table.

Re: GM drop items restriction

Posted: Wed Aug 11, 2010 5:57 pm
by iamhawk
Many thanks for help! If I do, i'll post there.

Re: GM drop items restriction

Posted: Wed Aug 11, 2010 9:00 pm
by SolidSnake
Disable this config in General.properties to set restriction for all community:

Code: Select all

# -----------------------# Optimization# -----------------------# Items on ground management.# Allow players to drop items on the ground.# Default: TrueAllowDiscardItem = [b]True[/b] --> [i][b]False[/b][/i]
If you want to disable restriction only for some VIP players or GM, use this code as jurchiks said:

Code: Select all

int RestrictionAccLvl = (Config.RESTRICTION_ACCESS_LEVEL);if (activeChar.getAccessLevel().getLevel() == RestrictionAccLvl)	return;
Remember to add the config.