Jump to content
  • 0

Last Hit Drops


te0x

Question

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 :)

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

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
Link to comment
Share on other sites

  • 0

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

Edited by SweeTs
Link to comment
Share on other sites

  • 0

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
Link to comment
Share on other sites

  • 0

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
Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • Gift30 — is a promo code for a -30% discount on all fares. Have time to activate the promo code before 03.06.2023.   SELECT TARIFY   As a reminder, we are open to cooperation and ready to offer favourable conditions for bulk rates, as well as to make you the personalised rate you've been dreaming of for so long.    Kind regards, Proxy5 Team.
    • Good luck, i like Pride Style.
    • Opening June 17 at 19:00 (UTC +3) Open Beta Test from June 10   Link to announce : https://forum.lineage2dex.com/threads/16500/ This is pre-announcing of summer season server, so we want to share some key points of this new server. Full details we announce a bit latter. Summer is a time for rest and vacations, so we decided to make this season much easier and less hardcore than usual. Our features: We use classic Interlude rules, no Kamaels, new races or new gear (maximum S gr like it should be on Interlude). But yes, we are using a new modern client, and we add new content to make your gameplay more varied and interesting. So if you before play only on default Interlude servers it will be not a problem for you  And for players who before not play in la2 at all, we have good Data Base in game where you can get all detailed info about server + we have very friendly core Dex community on discord who will help you with pleasure. New Classic Game client (more FPS) Unique TvT system, with 1 week season, rating for best players in classes. Good reward (you can get for it even epics, even if you solo player, just regular visit it) Daily Instance Zones with good rewards (Rim Kamaloka, Labyrinth of Abyss + others instance) Daily reward system. Visit game each day being Nobless and get reward. Daily Quests Item Broker Auctions in towns and Fair on Giran Harbor Masterwork items (can be obtained by crafting or farming RBs ) PvP Items Residence skills High-end content (details below) Cycle macros Some changes on summer season: x100 Exp Rates From the start, all characters have 24 slots buffs (you don't need Divinity books) All characters have from start buff book with all buffs. From Astarte, you can get book with buff profiles. Simplified system for getting Nobles Reworked TvT season system We have destroyed the stereotypes that x50 servers live for a couple of weeks. And our Union x50 server proves it (working for 3+ years with good online and clans fighting for Epic bosses and on Daily PvP) We have enough content that will allow you to maintain interest in the game all the time! And we are always working on improving the game and adding new interesting activities and content. Our Last (winter) season start from November 5 2022 and was merged with Union on March 28 2023 (5 month). High-end activities on start will be not available, we will add it gradually with time. High-end content: Hellbound (closed on server start) Spoiler Talent Tree system - Lineage2Dex | Forum | Lineage 2 Classic | Interlude Steel Citadel - Lineage2Dex | Forum | Lineage 2 Classic | Interlude Anomic Foundry and Elixirs - Lineage2Dex | Forum | Lineage 2 Classic | Interlude Ancient Mansion, Cursed Town & Charms! - Lineage2Dex | Forum | Lineage 2 Classic | Interlude Beleth - Cursed Wizard - Lineage2Dex | Forum | Lineage 2 Classic | Interlude We will be glad to hear any comments and suggestions on our discord channel, join it we have very friendly community there  - Join discord  
    • DONT BUY GUYS!  100% SCAM OR BAN .      https://prnt.sc/TyXTohUii3nB     When I asked him for proof it's working he told he not gonna use giftcard for proof 😄 After that he called person monkey and block him. Guys dont risk with this guy - if there would be no scam or ban . He could use those giftcards by himself and make tons of money not selling for 15 $ lol. 
    • im looking for interlude pvp server, like inf-skills used to be So idk if anyone remembers l2 inf-skills, maybe? from c4 to interlude, mobs dropped AA, players dropped 20%? of their AA from inventory in pvp, dont remember pk..   there was npc to enchant items with AA, smth like 9-11 were very safe, 16/16+ almost impossible there was always pvp for good spots fog/mos/woa angels pvp events/town pvp event if u killed X people u get hero aura, you could use your hero weap    
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock