GM Drop

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
ezek
Posts: 7
Joined: Wed Jan 14, 2009 2:17 pm

GM Drop

Post by ezek »

Hi all

My question is, how can I make the GM drop any item?
I mean, I saw GM could drop any item even if it has "false" in column "dropable" of db.

Is there any .properties for that? or access level?

Thanks
User avatar
momo61
Posts: 1648
Joined: Fri Jun 06, 2008 2:05 pm
Location: Europe

Re: GM Drop

Post by momo61 »

pvp.properties

Code: Select all

# ---------------------------------------------------------------------------# PK'er Drop Settings# ---------------------------------------------------------------------------# Default: FalseCanGMDropEquipment = True
ezek
Posts: 7
Joined: Wed Jan 14, 2009 2:17 pm

Re: GM Drop

Post by ezek »

t doesn't work.
That setting just makes GM could drop if he has karma
seanpaul
Posts: 21
Joined: Fri Nov 30, 2007 5:42 am

Re: GM Drop

Post by seanpaul »

This should work for you add to server with Eclipse.

Code: Select all

Index: java/net/sf/l2j/gameserver/clientpackets/RequestDropItem.java===================================================================--- java/net/sf/l2j/gameserver/clientpackets/RequestDropItem.java	(revision 2010)+++ java/net/sf/l2j/gameserver/clientpackets/RequestDropItem.java	(working copy)@@ -68,12 +68,12 @@         		|| _count == 0         		|| !activeChar.validateItemManipulation(_objectId, "drop")         		|| (!Config.ALLOW_DISCARDITEM && !activeChar.isGM())-        		|| !item.isDropable())+        		|| !item.isDropable() && !activeChar.isGM())         {         	activeChar.sendPacket(new SystemMessage(SystemMessageId.CANNOT_DISCARD_THIS_ITEM));         	return;         }-        if(item.getItemType() == L2EtcItemType.QUEST)+        if(item.getItemType() == L2EtcItemType.QUEST && !activeChar.isGM())         {         	return;
ezek
Posts: 7
Joined: Wed Jan 14, 2009 2:17 pm

Re: GM Drop

Post by ezek »

Thanks for your answer buy it doesn't work =(
seanpaul
Posts: 21
Joined: Fri Nov 30, 2007 5:42 am

Re: GM Drop

Post by seanpaul »

must have done something wrong it works on all servers check again.
edit "RequestDropItem.java" in Eclipse

go to

java/net/sf/l2j/gameserver/network/clientpackets/RequestDropItem.java

some where around line 75 and line 80 and add

just add "&& !activeChar.isGM()" in the 2 spots under drop section and should work.

|| _count == 0
|| !activeChar.validateItemManipulation(_objectId, "drop")
|| (!Config.ALLOW_DISCARDITEM && !activeChar.isGM())
- || !item.isDropable())
+ || !item.isDropable() && !activeChar.isGM())
{
activeChar.sendPacket(new SystemMessage(SystemMessageId.CANNOT_DISCARD_THIS_ITEM));
return;
}
- if(item.getItemType() == L2EtcItemType.QUEST)
+ if(item.getItemType() == L2EtcItemType.QUEST && !activeChar.isGM())
{
return;

all items and quest items will be dropable for a GM.
has worked on all Revisions of servers for me.
ezek
Posts: 7
Joined: Wed Jan 14, 2009 2:17 pm

Re: GM Drop

Post by ezek »

Code: Select all

        		|| _count == 0        		|| !activeChar.validateItemManipulation(_objectId, "drop")        		|| (!Config.ALLOW_DISCARDITEM && !activeChar.isGM())        		|| !item.isDropable() && !activeChar.isGM())        {        	activeChar.sendPacket(new SystemMessage(SystemMessageId.CANNOT_DISCARD_THIS_ITEM));        	return;        }        if(item.getItemType() == L2EtcItemType.QUEST && !activeChar.isGM())        {        	return;        }
That's my .java, I added activeChar.isGM, and it's like your code, but it dosn't drop non-dropable items.
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: GM Drop

Post by janiii »

DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
Post Reply