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:
Hey! It's been years since I tried this, just redownloaded everything for the nostalgia but I'm having the "mismatch" problem.
You were right, I used another system, not the one from the post! My bad!
Now I can't find the system that works with AuthGateD 🤣
I see you have found it and uploaded it but the link you provided no longer works. If you are still around, can you please reupload? Thank you!
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