Napster321 Posted April 16, 2012 Posted April 16, 2012 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 Quote
0 VasQueZ Posted April 16, 2012 Posted April 16, 2012 Write it again with better english this time and maybe i can help you. Quote
0 Kяaσh Posted April 16, 2012 Posted April 16, 2012 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). Quote
0 Rizlaaa Posted April 16, 2012 Posted April 16, 2012 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. Quote
0 Napster321 Posted April 16, 2012 Author Posted April 16, 2012 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... Quote
0 Fanky Posted April 16, 2012 Posted April 16, 2012 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. Quote
0 Napster321 Posted April 16, 2012 Author Posted April 16, 2012 the prolem is that i dont know in which lines to add the message Quote
0 Fanky Posted April 17, 2012 Posted April 17, 2012 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. Quote
Question
Napster321
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
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.