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.



×
×
  • Create New...