Jump to content

[Share]Disable item drop for low level character


Recommended Posts

Hello Maxcheaters.Today i guy in help section open topic about how to disable for low level characters item drop.and i decide to make this share.

 

Diff

 

Index: /java/lt/equal/gameserver/network/clientpackets/RequestDropItem.java
===================================================================
--- /java/lt/equal/gameserver/network/clientpackets/RequestDropItem.java (revision 33)
+++ /java/lt/equal/gameserver/network/clientpackets/RequestDropItem.java (revision 34)
@@ -110,4 +110,12 @@
             		return;
         	}
+
+		//Disable Item Drop For Low Level Characters
+		if (activeChar.getLevel() < Config.NEWBIE_LEVEL && Config.DISABLE_DROP_LOW_LEVEL && !Config.ALLOW_DISCARDITEM)
+        	{
+            		activeChar.sendMessage("Low Level Character's Can't Drop Item");
+            		activeChar.sendPacket(new SystemMessage(SystemMessageId.NOTHING_HAPPENED));
+            		return;
+        	}

		if (_count <= 0)
Index: /java/lt/equal/Config.java
===================================================================
--- /java/lt/equal/Config.java (revision 25)
+++ /java/lt/equal/Config.java (revision 34)
@@ -786,4 +786,6 @@
     public static int SOE_Z;
	public static boolean DISABLE_DROP_FOR_GM;
+	public static boolean DISABLE_DROP_LOW_LEVEL;
+	public static int NEWBIE_LEVEL;

	// RATES_CONFIG_FILE
@@ -2112,4 +2114,6 @@
             SOE_Z = Integer.parseInt(byLekiSettings.getProperty("CustomSOEz", "-3724"));
			DISABLE_DROP_FOR_GM	= Boolean.valueOf(byLekiSettings.getProperty("DisableItemDropForGM", "False"));
+			DISABLE_DROP_LOW_LEVEL	= Boolean.valueOf(byLekiSettings.getProperty("DisableItemDropForNewbie", "False"));
+			NEWBIE_LEVEL = Integer.parseInt(byLekiSettings.getProperty("MinLvlForItemDrop", "40"));

			_log.info("# " + BYLEKI_CONFIG_FILE + " Sucessfully LOADED #");
Index: /config/ByLeki.properties
===================================================================
--- /config/ByLeki.properties (revision 25)
+++ /config/ByLeki.properties (revision 34)
@@ -410,2 +410,11 @@
CustomSOEy = -87806
CustomSOEz = -2915
+
+#--------------------------------------------------------------
+# Disable Item Drop for Low Level Characters
+#--------------------------------------------------------------
+#Disable Item Drop for Low Level Characters?
+DisableItemDropForNewbie = False
+
+#Minimum level for Item Drop
+MinLvlForItemDrop = 40

 

Credits to me

Link to comment
Share on other sites

and this usefull because?

for example i have server and starting adena is 50.000.000 someone will create new character and drop items in ground then took them in main character. with this config admin will disable item drop for low level characters

Link to comment
Share on other sites

if every1 post in share section all the thing that does for help section this will be just a madness

 

anyway, gj for c/p the code posted there and add some stupid configs

even its not complete the code (lol)

 

hope some1 will give you karma for this  :)

Link to comment
Share on other sites

Leki: absolutely useless

 

1) you have ByLeki.properties (and most of us dont)

2) what about freight? (or dualbox)

3) that patch is useless (if i wanna use it, i must rewrite it)

 

 

and server with 50M start adena? it has rates 10k?

Link to comment
Share on other sites

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   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...