Jump to content
  • 0

Last Hit Drops


Question

Posted

hello guyz :)

i am using a pack and the farming drop system is not with last hit but with the person that have the mob on him is taking also the drops..

so i wanna make it with last hit to take the drop but only for the RB's so all players can have chances to take the rb's drop not only 1..

Can some1 tell me what files i have to change or gimme a code to fix this cauze is annoying ;s

thank you :)

9 answers to this question

Recommended Posts

  • 0
Posted (edited)

Not sure if it's gonna work or not (dunno if I changed all needed things, since it was fast :D), but try :P

### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/model/actor/L2Attackable.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/L2Attackable.java    (revision 319)
+++ java/net/sf/l2j/gameserver/model/actor/L2Attackable.java    (working copy)
@@ -1280,20 +1280,20 @@
      * to each Item Identifier dropped</li> <li>If the autoLoot mode is actif and if the L2Character that has killed the L2Attackable is a L2PcInstance, give this or these Item(s) to the L2PcInstance that has killed the L2Attackable</li> <li>If the autoLoot mode isn't actif or if the L2Character
      * that has killed the L2Attackable is not a L2PcInstance, add this or these Item(s) in the world as a visible object at the position where mob was last</li><BR>
      * <BR>
-     * @param mainDamageDealer The L2Character that made the most damage.
+     * @param lastAttacker The L2Character that made the last hit.
      */
-    public void doItemDrop(L2Character mainDamageDealer)
+    public void doItemDrop(L2Character lastAttacker)
     {
-        doItemDrop(getTemplate(), mainDamageDealer);
+        doItemDrop(getTemplate(), lastAttacker);
     }
     
-    public void doItemDrop(L2NpcTemplate npcTemplate, L2Character mainDamageDealer)
+    public void doItemDrop(L2NpcTemplate npcTemplate, L2Character lastAttacker)
     {
-        if (mainDamageDealer == null)
-            return;
+        L2PcInstance player = null;
+        if (lastAttacker instanceof L2PcInstance) player = (L2PcInstance)lastAttacker;
+        if (lastAttacker instanceof L2Summon) player = ((L2Summon)lastAttacker).getOwner();
         
         // Don't drop anything if the last attacker or owner isn't L2PcInstance
-        L2PcInstance player = mainDamageDealer.getActingPlayer();
         if (player == null)
             return;
Edited by SweeTs
  • 0
Posted (edited)

Seriously, you want last hit? None would join your server with that lol :D

Edited by SweeTs
  • 0
Posted (edited)

well in rb this system sucks. You just lose time if you dont have the mob in you. i want all players to have the chance to take the drops in rb's :)

 

 

does this have any realtion with the fixes i wanna make?

 

public boolean doDie(L2Character killer)
{
if(!super.doDie(killer))
return false;
 
L2PcInstance player = null;
 
if(killer instanceof L2PcInstance)
player = (L2PcInstance) killer;
else if(killer instanceof L2Summon)
player = ((L2Summon) killer).getOwner();
Edited by te0x
  • 0
Posted (edited)

Nop :D

 

Yeah, you are killing a rb for 30min and some random fags come and somehow make last hit, or ks-ing mobs at farm zone, seriously.. Don't do that.

Edited by SweeTs
  • 0
Posted

well but when u have a whole server in the rb and i mean grand bosses for a jewel. i'd like to make it with last hit drop. :)

  • 0
Posted

Still dat suck. The one who did most dmg should take the drop, as I explained before. Anyway, it's your 'server' :P

  • 0
Posted

u are awsome man :)) thanks a lot but in the pack that i use is different but i am gonna modify this this now i know what file need changes :)) thanks a lot ;D

Guest
This topic is now closed to further replies.


×
×
  • Create New...