FunKermaN Posted December 25, 2016 Share Posted December 25, 2016 (edited) Hello guys Merry Christmas, maybe someone can help me to create one code, to wearing each class his own tattoo ? For Example: The Archer can wearing tattoo for archer if worn at dagger to get penalty "low stats" or even better to don't allow to wear. Thanks in advance!!! Edited December 25, 2016 by FunKermaN Link to comment Share on other sites More sharing options...
0 Reborn12 Posted December 25, 2016 Share Posted December 25, 2016 Useitem.java put a check with item id and classes you want to dissable it.. Link to comment Share on other sites More sharing options...
0 FunKermaN Posted December 26, 2016 Author Share Posted December 26, 2016 (edited) Useitem.java put a check with item id and classes you want to dissable it.. i have write that ... this is correct ? if (Config.TATTOO_CHECKER) { if (player.getClassId().getId() == 92) //archer { if(activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FACE.getId()) == 8530) { setPaperdollItem(PAPERDOLL_FACE, 8530); } else { setPaperdollItem(PAPERDOLL_FACE, null); activeChar.sendMessage("That tattoo is not allowed to wearing at your class."); } } else if (player.getClassId().getId() == 93) // dagger { if(activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FACE) == 8531) { setPaperdollItem(PAPERDOLL_FACE, 8531); } else { setPaperdollItem(PAPERDOLL_FACE, null); activeChar.sendMessage("That tattoo is not allowed to wearing at your class."); } } } Edited December 26, 2016 by FunKermaN Link to comment Share on other sites More sharing options...
0 'Baggos' Posted December 27, 2016 Share Posted December 27, 2016 My friend, there is a code "Daggers/archers can't use heavy". In your frozen pack on UseItem.java just stole and modify these lines.. Link to comment Share on other sites More sharing options...
0 FunKermaN Posted December 27, 2016 Author Share Posted December 27, 2016 (edited) My friend, there is a code "Daggers/archers can't use heavy". In your frozen pack on UseItem.java just stole and modify these lines.. I have write that but does not work :/ "its a test code" if (activeChar.getClassId().getId() == 92 && item.getItemType() == L2WeaponType.NONE && item.getItemId() == 15036 && item.getItemId() == 15046 && item.getItemId() != 15056 && !activeChar.isGM()) { activeChar.sendMessage("That tattoo is not allowed to wearing at your class."); return; } Edited December 27, 2016 by FunKermaN Link to comment Share on other sites More sharing options...
0 tazerman2 Posted December 27, 2016 Share Posted December 27, 2016 (edited) i can help you send me pm or you can make tattoo give stats only in a wep non all weapon like this <add order="0x40" stat="pAtk" val="1737"> <using kind="Bow"/> </add> Edited December 27, 2016 by tazerman2 Link to comment Share on other sites More sharing options...
0 SweeTs Posted December 27, 2016 Share Posted December 27, 2016 lul && item.getItemType() == L2WeaponType.NONE && Link to comment Share on other sites More sharing options...
0 FunKermaN Posted December 27, 2016 Author Share Posted December 27, 2016 (edited) i can help you send me pm or you can make tattoo give stats only in a wep non all weapon like this <add order="0x40" stat="pAtk" val="1737"> <using kind="Bow"/> </add> and how i can prevent with this method the healers to don't use the tattoo for mages ? lul && item.getItemType() == L2WeaponType.NONE && what ? that method does not work at interlude ? <cond msgId="1518"> <!-- mdgId is showing in client to player why he cant use this item--> <and> <player level="81" /> <!-- here you put from what lvl you can use this item--> <player class_id_restriction="93, 101, 108, 117" /> <!-- Here you put all classes you want to use that item --> </and> </cond> Edited December 27, 2016 by FunKermaN Link to comment Share on other sites More sharing options...
0 IpotoniC Posted December 27, 2016 Share Posted December 27, 2016 May i ask what is the point of doing this? Link to comment Share on other sites More sharing options...
0 FunKermaN Posted December 27, 2016 Author Share Posted December 27, 2016 May i ask what is the point of doing this? if you cant help me dont spam at this topic !!! Link to comment Share on other sites More sharing options...
0 tazerman2 Posted December 27, 2016 Share Posted December 27, 2016 hmm here is a problem... so only in useitem.java you can disable via class but again have problem because you need block 3 class number like the human fisrt is 0 after is like 20 and after 92 you need block all this. or you can do my option like if player use dagger and is archer the tattoo he down stats atk.spd,accurasy,evasion,speed and i think i can make it via class Link to comment Share on other sites More sharing options...
0 FunKermaN Posted December 27, 2016 Author Share Posted December 27, 2016 (edited) My friend, there is a code "Daggers/archers can't use heavy". In your frozen pack on UseItem.java just stole and modify these lines.. dont have anything about heavy at useitem.java hmm here is a problem... so only in useitem.java you can disable via class but again have problem because you need block 3 class number like the human fisrt is 0 after is like 20 and after 92 you need block all this. or you can do my option like if player use dagger and is archer the tattoo he down stats atk.spd,accurasy,evasion,speed and i think i can make it via class give me one example! i use that at the item and does dont do anything <add order="0x40" stat="pAtk" val="1737"> <using kind="Bow"/> </add> Edited December 27, 2016 by FunKermaN Link to comment Share on other sites More sharing options...
0 tazerman2 Posted December 27, 2016 Share Posted December 27, 2016 dont have anything about heavy at useitem.java give me one example! i use that at the item and does dont do anything <add order="0x40" stat="pAtk" val="1737"> <using kind="Bow"/> </add> i can help you via teamviewer send me pm if you need Link to comment Share on other sites More sharing options...
0 Tryskell Posted December 30, 2016 Share Posted December 30, 2016 (edited) I have write that but does not work :/ "its a test code" if (activeChar.getClassId().getId() == 92 && item.getItemType() == L2WeaponType.NONE && item.getItemId() == 15036 && item.getItemId() == 15046 && item.getItemId() != 15056 && !activeChar.isGM()) { activeChar.sendMessage("That tattoo is not allowed to wearing at your class."); return; } item.getItemType() == L2WeaponType.NONE got strictly no use (at least use the item type related to dyes - but anyway the limitation will be solved by item id just after) and item.getItemId() == 15036 && item.getItemId() == 15046 is impossible to reach too ; an id can't be one AND another in same time. You lack of basic logic, I invite you to read more about OR/AND. http://stackoverflow.com/questions/1795808/and-and-or-in-if-statements If you got numerous items to edit, the simpliest is to add it directly to L2Item / ItemTable to avoid a fatass check which would include all classes type. If it's based on class type you can also introduce it on classes. On aCis you can check teachTo, which do exactly what you ask (NPC restraining player ids to be able to learn skills, and also numerous classes to be linked to that NPC). The whole logic exists, you only have to copy, edit it for your own stuff and put it on the good classes. If one class == one tatoo, it's even simplier. Or you can make a very long check with all your class ids / item ids integrated inside it. Edited December 30, 2016 by Tryskell Link to comment Share on other sites More sharing options...
0 FunKermaN Posted December 31, 2016 Author Share Posted December 31, 2016 Lock topic thanks for help !!! Link to comment Share on other sites More sharing options...
Question
FunKermaN
Edited by FunKermaN
Link to comment
Share on other sites
14 answers to this question
Recommended Posts