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.


  • Posts

    • Telegram gifts are once again showing growth. This is associated with a possible pause in the gift release pipeline by Pavel Durov, as well as the approaching New Year, when demand traditionally increases. Against this backdrop, Telegram Stars, the platform’s internal currency, are once again coming to the forefront. With their help, users send gifts, subscribe to Telegram Premium, and use paid features within the Telegram ecosystem. Buy Telegram Stars with maximum benefit in our bot
    • Telegram gifts are once again showing growth. This is associated with a possible pause in the gift release pipeline by Pavel Durov, as well as the approaching New Year, when demand traditionally increases. Against this backdrop, Telegram Stars, the platform’s internal currency, are once again coming to the forefront. With their help, users send gifts, subscribe to Telegram Premium, and use paid features within the Telegram ecosystem. Buy Telegram Stars with maximum benefit in our bot
    • 流量套利 + SMM 面板 — 强大的增长组合. 通过社交信号加强推广活动,提高信任度和转化率,加速扩张。 为套利专员和 SMM 提供的所有工具 — 在一个地方. 有效链接: SMM 面板: 前往 – 推广您的社交媒体账户。 其他服务和产品: 数字商品商店(网站): 前往 商店 Telegram 机器人: 前往 – 通过 Telegram 信使方便访问商店。 虚拟号码服务: 前往 用于购买 Telegram Stars 的 Telegram 机器人: 前往 – 在 Telegram 中快速且优惠地购买 Stars。 SMM 面板: 前往 – 推广您的社交媒体账户。 我们想向您展示当前促销和特别优惠列表,用于购买我们服务的产品和服务: 1. 您可以在首次购买时使用促销代码:SOCNET(15% 折扣) 2. 获取 $1 商店余额或 10–20% 折扣——只需在我们网站注册后按以下模板填写您的用户名:"SEND ME BONUS, MY USERNAME IS..." ——您需要在我们的论坛主题中发布! 3. SMM 面板首次试用可获得 $1:只需在我们的网站(Support)提交主题为 “Get Trial Bonus” 的工单。 4. 我们的 Telegram 频道和 Stars 购买机器人中每周都会赠送 Telegram Stars! 新闻: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh 联系方式和支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Traffic arbitrage + SMM panel — a powerful combination for growth. Strengthen campaigns with social signals, increase trust and conversion, scale faster. All tools for arbitrage specialists and SMM — in one place. Active links: SMM Panel: Go to – promotion of your social media accounts. Other services and products: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. We want to present to you the current list of promotions and special offers for purchasing products and services of our service: 1. You can use a promo code for your first purchase: SOCNET (15% discount) 2. Get $1 on your store balance or a 10–20% discount — just write your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." – you need to post this in our forum thread! 3. Get $1 for the first trial launch of the SMM Panel: just open a ticket with the subject “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our bot for purchasing stars! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Traffic arbitrage + SMM panel — a powerful combination for growth. Strengthen campaigns with social signals, increase trust and conversion, scale faster. All tools for arbitrage specialists and SMM — in one place. Active links: SMM Panel: Go to – promotion of your social media accounts. Other services and products: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. We want to present to you the current list of promotions and special offers for purchasing products and services of our service: 1. You can use a promo code for your first purchase: SOCNET (15% discount) 2. Get $1 on your store balance or a 10–20% discount — just write your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." – you need to post this in our forum thread! 3. Get $1 for the first trial launch of the SMM Panel: just open a ticket with the subject “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our bot for purchasing stars! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • 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