Jump to content
  • 0

i need sb good in java developing


removed_001

Question

1st : i want to create a skill

2nd : i want an item that when u press it, it will automatically gives u that skill

 

sb do that for me plz?

and no do that just show me how or tell me the code plz!

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

first : skill guides can be found if you use search

second: you can use this code

 

 

/**

* @author eKo

*

*/

public class ViP implements IItemHandler

{

  private static final int[] ITEM_IDS = { itemID };

 

  public void useItem(L2PlayableInstance playable, L2ItemInstance item)

    {

        if (!(playable instanceof L2PcInstance))

            return;

        L2PcInstance activeChar = (L2PcInstance)playable;

          int itemId = item.getItemId();

       

      if (itemId == itemID)

      {

 

blabla add here skill code.

 

      }

    }

 

     

 

    public int[] getItemIds()

    {

      return ITEM_IDS;

    }

 

the code to add skills you should find out yourself.

 

 

 

Link to comment
Share on other sites

  • 0

  if (itemId == itemID)  <----- look this

 

its for items not for skills :/ plz if u can help me a little more cause i am new in java developing

 

its for the item code if you use xy item you get skills....grr read some guides

Link to comment
Share on other sites

  • 0

to get the skill use

L2Skill sk  = SkillTable.getInstance().getInfo(/*skill id*/, /*skill lvl*/);

activeChar.addSkill(sk, true);

 

EDIT:

 

btw eKo, isnt better to use

     for(i= 0; i< ITEM_IDS.length; i++)
             if (ITEM_IDS[i] == itemid)
             {

                    blabla add here skill code.

              }

Link to comment
Share on other sites

  • 0

/**

* @author eKo

*

*/

public class ViP implements IItemHandler

{

  private static final int[] ITEM_IDS = { itemID };

 

  public void useItem(L2PlayableInstance playable, L2ItemInstance item)

   {

        if (!(playable instanceof L2PcInstance))

           return;

        L2PcInstance activeChar = (L2PcInstance)playable;

         int itemId = item.getItemId();

       

     if (itemId == itemID)

      {

 

  L2Skill sk  = SkillTable.getInstance().getInfo(/*skill id*/, /*skill lvl*/);

  activeChar.addSkill(sk, true);

 

      }

   }

 

   

 

   public int[] getItemIds()

   {

      return ITEM_IDS;

   }

}

 

so it would be like this... (if correct say it and lock the topic.) also (where do i put that code?)

Link to comment
Share on other sites

  • 0

first of all create the skill

go to data/stats/skills

and create a file named "10100-10199.xml" if it doesnt exist

edit it using http://www.l2jserver.com/wiki/Skills

if  you dont have time or dont want to read that all, just copy any skill done b4, and edit it

BTW use skill id 10100 coz i hope its not used yet

so change in the itemhandler's code " /*skill id*/ " with the skill id (10100) and " /*skill lvl*/ " with 1 if you just want to make 1 lvl of the skill

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • Welcome to my store : https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 60.99 $ 2016 Discord Account : 10.50 $ 2017 Discord Account :4.99 $ 2018 Discord Account : 3.99 $ 2019 Discord Account : 2.99 $ 2020 Discord Account :1.99$ 2021 Discord Account :1.50$ 2022 Discord Account :0.99$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Telegram : https://t.me/ultrastore11 Whatsapp ; +212614849119 Welcome to my store : https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 60.99 $ 2016 Discord Account : 10.50 $ 2017 Discord Account :4.99 $ 2018 Discord Account : 3.99 $ 2019 Discord Account : 2.99 $ 2020 Discord Account :1.99$ 2021 Discord Account :1.50$ 2022 Discord Account :0.99$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Telegram : https://t.me/ultrastore11 Whatsapp ; +212614849119 ULTRAS Store Back again For Discord Accounts With Cheap Prices    🎃 AGED OLD DISCORD ACCOUNTS [ AUTO-BUY ] 🎃   Ful Acces   INSTANT DELIVERY   2015 Discord Account : 50.99 $   2016 Discord Account : 10 $   2017 Discord Account :3.99 $   2018 Discord Account : 2.99 $   2019 Discord Account : 2.50$   2020 Discord Account :1.50$   2021 Discord Account :0.99$   2022 Discord Account :0.70$   PAYMENT METHODS : CRYPTO / paypal   You can buy here From our Store : ultrasstore11.mysellix.io   Or from my Telegram user :https://t.me/ultrastore11   Or from my Discord user : @ULTRASstore11 ULTRAS Store Back again For Discord Accounts With Cheap Prices     AGED OLD DISCORD ACCOUNTS [ AUTO-BUY ]    Ful Acces   INSTANT DELIVERY   2015 Discord Account : 50.99 $   2016 Discord Account : 10 $   2017 Discord Account :3.99 $   2018 Discord Account : 2.99 $   2019 Discord Account : 2.50$   2020 Discord Account :1.50$   2021 Discord Account :0.99$   2022 Discord Account :0.70$   PAYMENT METHODS : CRYPTO / paypal   You can buy here From our Store : ultrasstore11.mysellix.io   Or from my Telegram user :https://t.me/ultrastore11
    • Sorry for such late reply. But extender in this build is just bad. It will give you this random error and shut down your server once a day, maybe more often. And since we don't have any source code of it, the solution is to remove it from the L2Server.exe file. You can do it yourself with CFF_Explorer app. Or download mine with already removed extender. No more random shut downs. The only downside is you gonna lose auto loot ability.  L2Server.exe without extender
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/hoodservices https://campsite.bio/utchihaamkt
  • Topics

×
×
  • Create New...