What should i change or add to this code for using this item without character restart? Now you cant see added points without restart.
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* http://www.gnu.org/copyleft/gpl.html
*/
package net.sf.l2j.gameserver.handler.itemhandlers;
import net.sf.l2j.gameserver.handler.IItemHandler;
import net.sf.l2j.gameserver.model.L2ItemInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
/**
* @author Stefoulis15
**/
public class ScrollOfClanRepPoints implements IItemHandler
{
private static final int ITEM_IDS[] = { 9190 };
public void useItem(L2PlayableInstance playable, L2ItemInstance item)
{
L2PcInstance activeChar = (L2PcInstance) playable;
if (activeChar.getClan() == null)
{
activeChar.sendMessage("You do not have any clan!");
return;
}
else if (activeChar.getClan().getHasUsedRepItem(true))
{
activeChar.sendMessage("You have already used this item!");
return;
}
else if (!activeChar.isClanLeader())
{
activeChar.sendMessage("You are not clan leader!");
return;
}
activeChar.getClan().setReputationScore(1000, true);
activeChar.getClan().setHasUsedRepItem(true);
activeChar.sendMessage("Your clan's reputation score is now " + activeChar.getClan().getReputationScore() + "");
activeChar.broadcastUserInfo();
playable.destroyItem("Consume", item.getObjectId(), 1, null, true);
}
public int[] getItemIds()
{
return ITEM_IDS;
}
}
Https://lineage2dex.com
Discord link : https://discord.com/channels/786506979493281794/814778540893536307/1424434670690504874
## Dexters!
**Our x25 server is celebrating its first week!**
🔥 Online stays strong at peak levels! New players are joining every day, with 200+ new master accounts registered daily — amazing results!
✨ Tomorrow we launch a new episode along with the first event. Full details will be shared in the morning(October 6).
🎁 And for this little celebration, here’s a bonus code with a small gift for you!
## O05-IIW
**Contains: **
* x3 - Training Potion 200% (20 min)
* x200 - Mana Potions Loyatly (no weight)
*The code will remain active until October 6, 7 AM(server time). And be sure, you have at less 20 slots free on inv before using a code.*
**👉 How to redeem:**
1. Log in to your Master Account on site.
2. Click the Redeem Bonus Code button at the top of the panel, type code click redeem.
3. Select the account and character you want to receive the gift.
**Codes work only 1 time for 1 Master Account!**
### Enjoy your adventure, Dexters!
Question
BlackJack24
What should i change or add to this code for using this item without character restart? Now you cant see added points without restart.
4 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