T9Text Posted June 30, 2015 Posted June 30, 2015 (edited) Hello guys :) I have end my "Shift Click Action" but i dont know how to link (Item Icon) If somebody can help me :) Preview : //EDIT Source : l2jaCis Edited July 2, 2015 by T9Text
0 Tryskell Posted July 1, 2015 Posted July 1, 2015 Told you to create a static map (put it on Item or ItemTable no importance) and populate it. It's similar to what absolutepower tried to do, except it's even easier to handle it.
0 T9Text Posted July 1, 2015 Author Posted July 1, 2015 Told you to create a static map (put it on Item or ItemTable no importance) and populate it. It's similar to what absolutepower tried to do, except it's even easier to handle it. XML is not better way ?
0 Tryskell Posted July 2, 2015 Posted July 2, 2015 (edited) XML is not better way ? If you don't reuse existing items, nope. It's fat for what it is. And guess where your XML will load its data...? In a Map. As a temporary solution, use a Map. You won't have to recode a lot if you decide to stick to latest aCis (would probably be in the 350 cycle if the work goes on). Edited July 2, 2015 by Tryskell
0 Rootware Posted July 2, 2015 Posted July 2, 2015 (edited) You can add custom xml file what will be contains all necessary icons for important items. First, you need add logger for all itemId's how addition to the droplist - NpcDataTable.java. Then you must create parser for xml file with names as icons.xml: <?xml version="1.0" encoding="UTF-8"?> <list> <item id="57" icon="icon.adena"/> </list> For all missed icons you need add default return value like "icon.noimage". And as result, you can uses is as IconTable.getIcon(item.getItemId()); Profit. BUT, you can use it as part of Item data. In this case you need add to item properties new variable - _icon with default parser statement "icon.noimage" and add called method getIcon(). So, by default, getIcon() method will be return "icon.noimage". And you need add to XML file with items new property: <name="icon" val="icon.adena" /> Like L2J style. Edited July 2, 2015 by Rootware
0 T9Text Posted July 2, 2015 Author Posted July 2, 2015 i dont know how to code this ( IconTable.java ) i have no idea how works XML :/
0 T9Text Posted July 2, 2015 Author Posted July 2, 2015 (edited) You can add custom xml file what will be contains all necessary icons for important items. First, you need add logger for all itemId's how addition to the droplist - NpcDataTable.java. Then you must create parser for xml file with names as icons.xml:<?xml version="1.0" encoding="UTF-8"?><list> <item id="57" icon="icon.adena"/></list>For all missed icons you need add default return value like "icon.noimage". And as result, you can uses is asIconTable.getIcon(item.getItemId());Profit. BUT, you can use it as part of Item data. In this case you need add to item properties new variable - _icon with default parser statement "icon.noimage" and add called method getIcon(). So, by default, getIcon() method will be return "icon.noimage". And you need add to XML file with items new property:<name="icon" val="icon.adena" />Like L2J style. I make the java...i have this error... ItemTable: Highest used itemID : 9208 TeleportLocationTable: Error while creating tablejava.lang.NullPointerException Exception in thread "main" java.lang.ExceptionInInitializerError at net.sf.l2j.gameserver.datatables.IconList.getInstance(IconList.java:2 5) at net.sf.l2j.gameserver.GameServer.<init>(GameServer.java:169) at net.sf.l2j.gameserver.GameServer.main(GameServer.java:404) Caused by: java.lang.NullPointerException at net.sf.l2j.gameserver.datatables.IconList.load(IconList.java:65) at net.sf.l2j.gameserver.datatables.IconList.<init>(IconList.java:30) at net.sf.l2j.gameserver.datatables.IconList$SingletonHolder.<clinit>(Ic onList.java:77) ... 3 more Edited July 2, 2015 by T9Text
Question
T9Text
Hello guys :)
I have end my "Shift Click Action" but i dont know how to link (Item Icon)
If somebody can help me :)
Preview :
//EDIT
Source : l2jaCis
Edited by T9Text21 answers to this question
Recommended Posts