As the title says, on my server I have the custom cloaks (Aden Cloak, Dion Cloak, etc...) and I want only the members that own that castle to equip them. And if they loose the castle, they loose the cloak.
Kinda like the "The Lord's Crown".
I have been editing some java code inside the chamberlain configuration but it hasn't worked.
Here is the code i came up with:
else if (actualCommand.equals("give_cloak"))
{
if (siegeBlocksFunction(player))
return;
NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
if (player.isClanLeader() && _castleId==5) <-I made that custom, so that the castle was Aden
{
if (player.getInventory().getItemByItemId(64000) == null)<-Aden Cloak ID
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Discord : utchiha_market
Telegram : https://t.me/utchiha_market
Auto Buy Store : https://utchiha-market.mysellauth.com/
Not sure if we’re legit? Check Our server — real reviews, real buyers
https://discord.gg/4EPpYhe2HA | https://campsite.bio/utchihaamkt
Customer reviews are the key to trust!
We will now be adding real reviews about our service so you can see that our service is trusted by other users.
Our Website: vibe-sms.net
Telegram: t.me/vibe_sms
Question
InfinityOwners
As the title says, on my server I have the custom cloaks (Aden Cloak, Dion Cloak, etc...) and I want only the members that own that castle to equip them. And if they loose the castle, they loose the cloak.
Kinda like the "The Lord's Crown".
I have been editing some java code inside the chamberlain configuration but it hasn't worked.
Here is the code i came up with:
else if (actualCommand.equals("give_cloak"))
{
if (siegeBlocksFunction(player))
return;
NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
if (player.isClanLeader() && _castleId==5) <-I made that custom, so that the castle was Aden
{
if (player.getInventory().getItemByItemId(64000) == null)<-Aden Cloak ID
{
L2ItemInstance crown = player.getInventory().addItem("Aden Cloak", 64000, 1, player, this);
SystemMessage ms = new SystemMessage(SystemMessageId.EARNED_ITEM);
ms.addItemName(crown);
player.sendPacket(ms);
html.setFile(player.getHtmlPrefix(), "data/html/chamberlain/chamberlain-gavecrown.htm");
html.replace("%CharName%", String.valueOf(player.getName()));
html.replace("%FeudName%", String.valueOf(getCastle().getName()));
}
else
html.setFile(player.getHtmlPrefix(), "data/html/chamberlain/chamberlain-hascrown.htm");
}
else
html.setFile(player.getHtmlPrefix(), "data/html/chamberlain/chamberlain-noprivs.htm");
player.sendPacket(html);
return;
}
Ofcourse after that i edited the chamberlain html and added this line:
<a action="bypass -h npc_%objectId%_give_cloak">Aden Cloak</a><br>
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.