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.
We are certainly not an ambulance, but we will definitely cure you of blacklists and empty pockets. Live freely with SX!
Each of you will receive a trial version of SX to familiarize yourself with the product, all you have to do is post in this thread
In my opinion, if you're looking for completely open-sourced projects where you are able to contribute.
Interlude (aCis): Official Repo
High-Five (Mobius): Official Repo
Both are respectable projects, but Mobius is going to need a lot of tidying up though. If you're looking for guidance on client development, that's a little more complicated so you'd probably be better off learning that side of things once you have a better idea of specifically what you want to do.
https://github.com/Cannabytes/SphereWeb2/commit/38d76437bec8cf082564cdd5c7ead03019d4bcaf#diff-6a3a65cebb7e157f8baa017cb119bef804a5a603c2789f764c78b2e7af672b2b
not even a mention to your mentor
https://prnt.sc/wug1fMXXRY5y
now fix this
ini_set('error_log', __DIR__ . '/errors.txt');
// txt files can be read from the hacker and use errors against your code
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.