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
Alex13xD
Hello, I'm trying to make an item that when you own it or activate it, like you activate your soulshots (if it's posible) to give some stats on the player.
Here is what I have done so far and still not working:
Item xml:
Skill xml:
Cactive handler (toke it from L2J_DataPack/dist/game/data/scripts/handlers/itemhandlers/SoulShot.java:
I wanted to make the item active with right-click and shine like soulshot and get the stats
package handlers.itemhandlers; import com.l2jserver.gameserver.handler.IItemHandler; import com.l2jserver.gameserver.model.L2ItemInstance; import com.l2jserver.gameserver.model.actor.L2Playable; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; public class Cactive implements IItemHandler { /** * * @see com.l2jserver.gameserver.handler.IItemHandler#useItem(com.l2jserver.gameserver.model.actor.L2Playable, com.l2jserver.gameserver.model.L2ItemInstance, boolean) */ public void useItem(L2Playable playable, L2ItemInstance item, boolean forceUse) { if (!(playable instanceof L2PcInstance)) return; L2PcInstance activeChar = (L2PcInstance) playable; int itemId = item.getItemId(); activeChar.soulShotLock.lock(); try { } finally { activeChar.soulShotLock.unlock(); } @SuppressWarnings("unused") int skillId = 0; switch (itemId) { case 60000: skillId=30412; break; case 60001: skillId=30413; break; } } }What I have done wrong and how to fix it or if it's a way to get the stats just the item to be inside inventory or something like that.
Thanks for your time :)
2 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