L2JMobius

Free Users => General Discussion => Topic started by: Drazeal on March 04, 2021, 03:56:50 PM

Title: Help with code
Post by: Drazeal on March 04, 2021, 03:56:50 PM
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)
Title: Re: Help with code
Post by: djjapulis on March 07, 2021, 11:43:38 AM
Why you need this? The client has this function,you just need to edit l2.ini ,change AutoSoulShot from false to true...
Title: Re: Help with code
Post by: Drazeal on March 07, 2021, 08:01:43 PM
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