L2J Revision 4401
L2JDP Revision 7650
How to restrict some GM or Char to drop any Item from inventory?
GM drop items restriction
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: GM drop items restriction
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.
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.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
-
- Posts: 45
- Joined: Sun Mar 21, 2010 9:04 am
Re: GM drop items restriction
Many thanks for help! If I do, i'll post there.
- SolidSnake
- Posts: 865
- Joined: Wed Jan 20, 2010 6:54 pm
- Location: Italy
Re: GM drop items restriction
Disable this config in General.properties to set restriction for all community:
If you want to disable restriction only for some VIP players or GM, use this code as jurchiks said:
Remember to add the config.
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]
Code: Select all
int RestrictionAccLvl = (Config.RESTRICTION_ACCESS_LEVEL);if (activeChar.getAccessLevel().getLevel() == RestrictionAccLvl) return;
