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.
Fresh databases directly from the source!
• Cold leads
• Registrations
• First deposits
• Wealthy individuals
Up-to-date GEOs!
Guaranteed replacement of invalids!
Work through guarantor+
Contacts:
Telegram — @yashkatsigun
We build reliable relationships with our users!
Hello!
We’re not here just for the sake of it our goal is to create long-term and honest relationships with everyone who uses our services.
It’s important to us that you feel safe and confident.
If something goes wrong or you have any questions, don’t hesitate to contact our support.
We won’t just respond we’ll personally look into everything, help solve any problem, and make sure it’s convenient and comfortable for you to work with us.
Visit our website: Vibe-sms.net
Telegram: https://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.