Jump to content
  • 0

[Help] Class related pvp reward


Question

Posted

well i saw that:http://www.maxcheaters.com/forum/index.php?topic=170488.0

and wanted to make it like when human class kills ( light elf, dark elf, orc or dwarf class, gets reward for exaple 1 ls)

P.S if human kills his own race human dont take reward

How can this be done?

 

it must be smth like this

if ( class id of human ) kills ( L.ELF id , D.ELF id, ORC id, DWARF id)
       {
           addItem("Loot", 8732, 1, this, true);
           sendMessage("You won 1 lifestone for a pvp kill!");
       }

 

please help me with this code, give me human example and ill make it on my own with the other classes ty :)

Recommended Posts

  • 0
Posted

        if (getRace() == Race.human && target.getRace() == Race.darkelf || target.getRace() == Race.dwarf)

        {

        //do something

        }

  • 0
Posted

here we go again :/

// Add karma to attacker and increase its PK counter
        setPvpKills(getPvpKills() + 1);
     // pvp class related reward
        
        if (getRace() == Race.human && target.getRace() == Race.darkelf || target.getRace() == Race.dwarf)
        {
            addItem("Loot", 8732, 1, this, true);
            sendMessage("You won 1 lifestone for a pvp kill!");
        }

 

error:

[javac] C:\Server SVN\L2JBrasil_CORE\java\com\it\br\gameserver\model\actor\instance\L2PcInstance.java:4559: cannot find symbol
    [javac] symbol  : variable target
    [javac] location: class com.it.br.gameserver.model.actor.instance.L2PcInstance
    [javac]         if (getRace() == Race.human && target.getRace() == Race.darkelf || target.getRace() == Race.dwarf)
    [javac]                                        ^
    [javac] C:\Server SVN\L2JBrasil_CORE\java\com\it\br\gameserver\model\actor\instance\L2PcInstance.java:4559: cannot find symbol
    [javac] symbol  : variable target
    [javac] location: class com.it.br.gameserver.model.actor.instance.L2PcInstance
    [javac]         if (getRace() == Race.human && target.getRace() == Race.darkelf || target.getRace() == Race.dwarf)
    [javac]                                                                            ^
    [javac] Note: C:\Server SVN\L2JBrasil_CORE\java\com\it\br\gameserver\GeoEngine.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] 2 errors

 

  • 0
Posted

replace target with ((L2PcInstance)target) or declare in your method L2PcInstance target

 

nop not working with ((L2PcInstance)target)

error:

[javac] C:\Server SVN\L2JBrasil_CORE\java\com\it\br\gameserver\model\actor\instance\L2PcInstance.java:4558: cannot find symbol
    [javac] symbol  : variable target
    [javac] location: class com.it.br.gameserver.model.actor.instance.L2PcInstance
    [javac]         if (getRace() == Race.human && ((L2PcInstance)target).getRace() == Race.darkelf || ((L2PcInstance)target).getRace() == Race.dwarf)
    [javac]                                                       ^
    [javac] C:\Server SVN\L2JBrasil_CORE\java\com\it\br\gameserver\model\actor\instance\L2PcInstance.java:4558: cannot find symbol
    [javac] symbol  : variable target
    [javac] location: class com.it.br.gameserver.model.actor.instance.L2PcInstance
    [javac]         if (getRace() == Race.human && ((L2PcInstance)target).getRace() == Race.darkelf || ((L2PcInstance)target).getRace() == Race.dwarf)
    [javac]                                                                                                           ^
    [javac] Note: C:\Server SVN\L2JBrasil_CORE\java\com\it\br\gameserver\GeoEngine.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] 2 errors

what do you mean to declare in my method L2PcInstance target?

 

  • 0
Posted

look man while i set

public void increasePvpKills(L2PcInstance target)
   public void increasePvpKills()

i get this error

[javac] C:\Server SVN\L2JBrasil_CORE\java\com\it\br\gameserver\model\actor\instance\L2PcInstance.java:4515: ';' expected
   [javac]     public void increasePvpKills(L2PcInstance target)
   [javac]                                                      ^
   [javac] 1 error

p.s i tried it in many ways:1) void increasePvpKills((L2PcInstance)target)  2)increasePvpKills((L2PcInstance)target); 3)increasePvpKills(L2PcInstance target);

 

  • 0
Posted

public void increasePvpKills(L2PcInstance target)

public void increasePvpKills()

 

comm'ooooooooooon ...... your brain can't make the difference ? you need to replace the fuking method "public void increasePvpKills()" with "public void increasePvpKills(L2PcInstance target)"

  • 0
Posted

i did  tried it man but i got error :

 

[javac] C:\Server SVN\L2JBrasil_CORE\java\com\it\br\gameserver\model\actor\instance\L2PcInstance.java:4464: increasePvpKills(com.it.br.gameserver.model.actor.instance.L2PcInstance) in com.it.br.gameserver.model.actor.instance.L2PcInstance cannot be applied to ()
   [javac]             increasePvpKills();
   [javac]             ^
   [javac] C:\Server SVN\L2JBrasil_CORE\java\com\it\br\gameserver\model\actor\instance\L2PcInstance.java:4479: increasePvpKills(com.it.br.gameserver.model.actor.instance.L2PcInstance) in com.it.br.gameserver.model.actor.instance.L2PcInstance cannot be applied to ()
   [javac]                         increasePvpKills();
   [javac]                         ^
   [javac] C:\Server SVN\L2JBrasil_CORE\java\com\it\br\gameserver\model\actor\instance\L2PcInstance.java:4494: increasePvpKills(com.it.br.gameserver.model.actor.instance.L2PcInstance) in com.it.br.gameserver.model.actor.instance.L2PcInstance cannot be applied to ()
   [javac]                     increasePvpKills();
   [javac]                     ^
   [javac] C:\Server SVN\L2JBrasil_CORE\java\com\it\br\gameserver\model\actor\instance\L2PcInstance.java:4558: cannot find symbol
   [javac] symbol  : variable getRace
   [javac] location: class com.it.br.gameserver.model.actor.instance.L2PcInstance
   [javac]         if (getRace() == Race.human && ((L2PcInstance)target).getRace() == Race.darkelf || ((L2PcInstance)target).getRace.getRace() == Race.dwarf)
   [javac]                                                                                                                  ^
   [javac] Note: C:\Server SVN\L2JBrasil_CORE\java\com\it\br\gameserver\GeoEngine.java uses or overrides a deprecated API.
   [javac] Note: Recompile with -Xlint:deprecation for details.
   [javac] 4 errors

  • 0
Posted

increasePvpKills(); replace with increasePvpKills(this);

 

and

 

if (getRace() == Race.human && ((L2PcInstance)target).getRace() == Race.darkelf || ((L2PcInstance)target).getRace.getRace() == Race.dwarf)

 

with

 

if (getRace() == Race.human && target.getRace() == Race.darkelf || target.getRace.getRace() == Race.dwarf)

  • 0
Posted

error:

[javac] C:\Server SVN\L2JBrasil_CORE\java\com\it\br\gameserver\model\actor\instance\L2PcInstance.java:4515: invalid method declaration; return type required
    [javac]     increasePvpKills(this);
    [javac]     ^
    [javac] C:\Server SVN\L2JBrasil_CORE\java\com\it\br\gameserver\model\actor\instance\L2PcInstance.java:4515: illegal start of type
    [javac]     increasePvpKills(this);
    [javac]                      ^
    [javac] 2 errors

  • 0
Posted

public void increasePvpKills(this);

 

if (getRace() == Race.human && target.getRace() == Race.darkelf || target.getRace.getRace() == Race.dwarf)
        {
            addItem("Loot", 8732, 1, this, true);
            sendMessage("You won 1 lifestone for a pvp kill!");
        }

 

 

 

 

  • 0
Posted

public void increasePvpKills(this);

 

if (getRace() == Race.human && target.getRace() == Race.darkelf || target.getRace.getRace() == Race.dwarf)
        {
            addItem("Loot", 8732, 1, this, true);
            sendMessage("You won 1 lifestone for a pvp kill!");
        }

 

 

 

 

lol`d

  • 0
Posted

i did smth wrong?

doh..

 

public void increasePvpKills(L2PcInstance target) LEAVE THE FUKING METHOD.. and replace increasePvpKills(); with increasePvpKills(this);

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
Answer this question...

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




  • Posts

    • just with this extender that I have shared it is not possible to start with c4 client, you have to make some changes to the extender and it works with c4 client perfectly. regarding the updates in this last revision   🔹dll is not packaged with vmprotect   New custom zone types have been added: 🔹 NO_NOBLESS begin MinX=84638 MaxX=92616 MinY=-87170 MaxY=-82018 MinZ=-6000 MaxZ=0 Type=NO_NOBLESS KickOutPos=83007/148057/-3464 end   ▶️ This zone checks if the character is noble. If it does not meet the condition, it will be automatically kicked to the indicated position (KickOutPos). 🔹 CUSTOM_SPAWN_ZONE begin MinX=77275 MaxX=85704 MinY=10122 MaxY=18066 MinZ=-8000 MaxZ=5000 Type=CUSTOM_SPAWN_ZONE OutPos=83007/148057/-3464 Spawns={{82984/18066/-5256}};{{79275/15147/-5248}};{{82922/14263/-5256}};{{83704/10122/-5288}} end ▶️ This zone allows characters, upon death, to respawn with full buff, CP, HP and MP if they press “Fixed”. They will only be able to revive in one of the positions defined in Spawns. 🔧 Both zones are fully configurable from territorydata.txt
    • Could you tell me what changed in this update?   more one question: Is it possible to log in through the c4 client instead of interlude? That would be great  
    • ➡ Discount for your purchase: JULY2025 (11% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • ➡ Discount for your purchase: JULY2025 (11% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: 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