- 0
This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..
Question
<< Masterio >>
Hi a have request for java developers.
How to get this red value (pAtk of weapon) from java side.
I created instance i checked stats funcs etc and i can't obtain this value.
<item id="4700" type="Weapon" name="Sword of Delusion - Health">
<set name="icon" val="icon.weapon_sword_of_delusion_i01" />
<set name="default_action" val="equip" />
<set name="weapon_type" val="sword" />
<set name="bodypart" val="rhand" />
<set name="random_damage" val="10" />
<set name="attack_range" val="40" />
<set name="damage_range" val="0;0;40;120" />
<set name="immediate_effect" val="1" />
<set name="crystal_count" val="1322" />
<set name="crystal_type" val="c" />
<set name="material" val="mithril" />
<set name="weight" val="1400" />
<set name="price" val="3304300" />
<set name="change_weaponId" val="9270" />
<set name="soulshots" val="3" />
<set name="spiritshots" val="3" />
<set name="enchant_enabled" val="1" />
<set name="item_skill" val="3013-1" />
<for>
<set order="0x08" stat="pAtk" val="139" />
<set order="0x08" stat="mAtk" val="76" />
<set order="0x08" stat="rCrit" val="8" />
<set order="0x08" stat="pAtkSpd" val="379" />
<enchant val="0" order="0x0C" stat="pAtk" />
<enchant val="0" order="0x0C" stat="mAtk" />
</for>
</item>
I wrote something like this for tests:
for(int i = 0; i<activeChar.getInventory().getItems().length; i++){ if(activeChar.getInventory().getItems()[i] != null){ L2ItemInstance itemInstance = activeChar.getInventory().getItems()[i]; L2Item item = ItemTable.getInstance().getTemplate(itemInstance.getItem().getItemId()); try{ System.out.println("Item: "+item.getName()+", id: "+item.getItemId()); System.out.println("Icon: "+item.getIcon()); System.out.println("Body part: "+item.getBodyPart()); }catch(Exception e){ } System.out.println("Effects: "+item.getEffects(itemInstance, activeChar).length); for(int j = 0; j<item.getEffects(itemInstance, activeChar).length; j++){ try{ L2Effect effect = item.getEffects(itemInstance, activeChar)[j]; if(effect != null){ System.out.println(" Abnormal level:" + effect.getAbnormalLvl()); System.out.println(" Abnormal Time:" + effect.getAbnormalTime()); System.out.println(" Abnormal Type:" + effect.getAbnormalType()); System.out.println(" Count:" + effect.getCount()); System.out.println(" Effect Flags:" + effect.getEffectFlags()); System.out.println(" Effect Power:" + effect.getEffectPower()); System.out.println(" Force Effect:" + effect.getForceEffect()); System.out.println(" Level:" + effect.getLevel()); System.out.println(" Total Count:" + effect.getTotalCount()); System.out.println(" Skill Name:" + effect.getSkill().getName()); } }catch(Exception e){ } } System.out.println("StatFuncs: "+item.getStatFuncs(itemInstance, activeChar).length); for(int k = 0; k<item.getStatFuncs(itemInstance, activeChar).length; k++){ try{ Func f = item.getStatFuncs(itemInstance, activeChar)[k]; Env env = new Env(); env.setItem(itemInstance); System.out.println(" order:" +f.order+", stat[name]:"+f.stat.name()+", stat[value]:"+f.stat.getValue()+", stat[ordinal]:"+f.stat.ordinal()+", "+env.toString()); }catch(Exception e){ } } System.out.println("-------------------------------------------------------------------------------"); } }This code not obtain information about weapon pAtk/mAtk or Armor pDef/mDef.
Thanks for answer.
5 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now