GM drop items restriction

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
iamhawk
Posts: 45
Joined: Sun Mar 21, 2010 9:04 am

GM drop items restriction

Post by iamhawk »

L2J Revision 4401
L2JDP Revision 7650

How to restrict some GM or Char to drop any Item from inventory?
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: GM drop items restriction

Post 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.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
iamhawk
Posts: 45
Joined: Sun Mar 21, 2010 9:04 am

Re: GM drop items restriction

Post by iamhawk »

Many thanks for help! If I do, i'll post there.
User avatar
SolidSnake
Posts: 865
Joined: Wed Jan 20, 2010 6:54 pm
Location: Italy

Re: GM drop items restriction

Post 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.
Image
Post Reply