L2JMobius

Classic Interlude Help with code

Drazeal · 3 · 2331

Offline Drazeal

  • Vassal
  • *
    • Posts: 7
can someone tell me how to wtite this on Mobius projects?--->

if (activeChar.getActiveWeaponItem() != null)
{
     return ItemGrade.values()[activeChar.getActiveWeaponItem().getItemGrade()];
}
return ItemGrade.values()[0];

i tried
ItemGrade.values()[activeChar.getActiveWeaponInstance().getItem().getId()];

no error on compile
but i get error "ArrayIndexOutOfBoundsException" on gameserver.

im trying to add autoshots code (https://pastebin.com/pHACrzYp)


Offline djjapulis

  • Vassal
  • *
    • Posts: 7
Why you need this? The client has this function,you just need to edit l2.ini ,change AutoSoulShot from false to true...


Offline Drazeal

  • Vassal
  • *
    • Posts: 7
Why you need this? The client has this function,you just need to edit l2.ini ,change AutoSoulShot from false to true...

this code doesnt require shots at all. it auto activates onEnterWorld w/o having any in your inv.
thats why i need it