Jump to content
  • 0

[Request]Some things


Question

Posted

I have some requests for freya if someone can help then thanks

(core modifications)

 

1)When player put the armor-weap-jewel into scroll a message with the rate will appears

2)pvp increase item

7 answers to this question

Recommended Posts

  • 0
Posted

1)RequestEnchant.java Find the method which enchant the weapon and add a sendMessage

2)Make a new itemhandler and find the method which increate the pvp's(look at admin handlers i remember they add it on freya on the panel).

  • 0
Posted

 

 

Kяaσh told you what to do, i will just explain.

 

Anyway, for the 1 go in RequestEnchant.java file ( located in clientpackets package ). There you can handle the actions happen when a players accepts to enchant an item. So you want a message to be sented to the player , then you add something like

player.sendMessage("Rate:70%");

 

For the 2 you will go at package itemhandlers and you will create a new .java file. See how other itemhandlers work (ex: potions) and you will just change the method

useItem(L2PlayableInstance playable, L2ItemInstance item) there you will add the code.

increasePvpKills() is the method you need to increase player's pvp.

  • 0
Posted

if (!scrollTemplate.isValid(item) || !isEnchantable(item))
{
                                                                                                                     activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.DOES_NOT_FIT_SCROLL_CONDITIONS));
   activeChar.setActiveEnchantItem(null);
   activeChar.sendPacket(new ExPutEnchantTargetItemResult(0));
   return;
}
else
{
    int itemType = item.getItem().getType2();
               
     if(scrollTemplate.isBlessed())
       {
            switch(itemType)
             {
                  case L2Item.TYPE2_WEAPON:
                  activeChar.sendMessage("Success rate: " + Config.BLESSED_ENCHANT_CHANCE_WEAPON + "%");
                  break;
                  case L2Item.TYPE2_SHIELD_ARMOR:
                  activeChar.sendMessage("Success rate: " + Config.BLESSED_ENCHANT_CHANCE_ARMOR + "%");
                  break;
                  case L2Item.TYPE2_ACCESSORY:
                  activeChar.sendMessage("Success rate: " + Config.BLESSED_ENCHANT_CHANCE_JEWELRY + "%");
                  break;
               }
         }
         else
         {
             switch(itemType)
              {
                  case L2Item.TYPE2_WEAPON:
                  activeChar.sendMessage("Success rate: " + Config.ENCHANT_CHANCE_WEAPON + "%");
                   break;
                   case L2Item.TYPE2_SHIELD_ARMOR:
                   activeChar.sendMessage("Success rate: " + Config.ENCHANT_CHANCE_ARMOR + "%");
                   break;
                   case L2Item.TYPE2_ACCESSORY:
                   activeChar.sendMessage("Success rate: " + Config.ENCHANT_CHANCE_JEWELRY + "%");
                   break;
               }
           }
}

from http://www.l2jserver.com/forum/viewtopic.php?f=73&t=21328 but i dont know in which lines to enter that...

  • 0
Posted

 

Kяaσh told you what to do, i will just explain.

 

Anyway, for the 1 go in RequestEnchant.java file ( located in clientpackets package ). There you can handle the actions happen when a players accepts to enchant an item. So you want a message to be sented to the player , then you add something like

player.sendMessage("Rate:70%");

 

For the 2 you will go at package itemhandlers and you will create a new .java file. See how other itemhandlers work (ex: potions) and you will just change the method

useItem(L2PlayableInstance playable, L2ItemInstance item) there you will add the code.

increasePvpKills() is the method you need to increase player's pvp.

for the 1st it can be more cool if the msg comes directly from configs so if you change the rate you wont have to re-compile again.

 

do what krash told you.

  • 0
Posted

the prolem is that i dont know in which lines to add the message

for the first one,krash told you,find the method which enchant the weapon and add a msg.

 

I cant actually understand what you cant understand.

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

    • Vilmis is the biggest scammer in history. He bans his members when they complain about something. I know more than one who's banned him. He updates shit, but he charges you like he's doing something serious.
    • I did not want to, but I will tell a few things (just because of other members that might understand something wrong): 1. Nothing held as hostage some kinda customer of yours. I think even now could find your donate panel code at my source code. So, stop spreading a lie because of your head progressive diseases. 2. Don't use my old customer's post as counterargument. We all had the worst customers which think they are the righest ones no matter what. He was one of them. He caused a lot of problems to me. Also, he was rude and disrespectful. 3. You're just simply hater. No matter what good I'm gonna say you gonna say in reverse. Smarter people sees the truth. 4. Look, you don't like me, I don't like you, but it's unnecessary to comment all post about my project and write everything worst just because you hate me. 😉
    • I've seen this many times, to be honest, let's hope that this time it will actually happen. I would suggest building something that helps develop trust within the community's sales. It could be something similar to FunPay, for example, which ensures secure trades for both the seller and the buyer, along with a rating system for both parties. I would also recommend doing something about the voting site, which has been paused for I don't know how many years since the Fiverr failure. Last but not least, I’d suggest creating an open blog or at least publishing weekly articles that can attract more people to the forum or encourage members to return and read them. The topics of these articles could include overviews and opinions on L2 or GTA V servers, PUBG, Fortnite, tech news, coding updates, or even general news that the author finds interesting.   How could you know such an information? 🤔 And yeah I agree on the part about the poor management
    • ➡ Discount for your purchase: JUNE2025 (10% 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 
    • there are extenders that already have all that included ingame 🙂 for example GX-EXT
  • 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