Hello Maxcheaters I'm using this code on my Service Npc and it is working just fine but I have one problem, it have no check for skills, so if you keep clicking on it it will keep taking the coins from you and telling you no skills added. I need it to check if the clan already have the skills and if yes return a html saying that the clan have the skills alredy.
Can anyone help?
Btw I'm using a L2j H5 server>
Thank you.
else if (event.startsWith("clanSkills"))
{
final L2Clan clan = player.getClan();
if (clan == null)
{
player.sendPacket(SystemMessageId.TARGET_MUST_BE_IN_CLAN);
return "ClanSkills-NoClan.htm";
}
if (!player.isClanLeader())
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.TARGET_MUST_BE_IN_CLAN);
sm.addPcName(player);
player.sendPacket(sm);
return "ClanSkills-NoLeader.htm";
}
if (st.getQuestItemsCount(ClanSkillsItemId) >= ClanSkillsItemCount)
{
final List<L2SkillLearn> skills = SkillTreesData.getInstance().getAvailablePledgeSkills(clan);
SkillTable st1 = SkillTable.getInstance();
for (L2SkillLearn s : skills)
{
clan.addNewSkill(st1.getInfo(s.getSkillId(), s.getSkillLevel()));
}
st.takeItems(ClanSkillsItemId, ClanSkillsItemCount);
// Notify target and active char
clan.broadcastToOnlineMembers(new PledgeSkillList(clan));
for (L2PcInstance member : clan.getOnlineMembers(0))
{
member.sendSkillList();
}
player.sendMessage("You gave " + skills.size() + " skills to " + player.getName() + "'s clan " + clan.getName() + ".");
player.sendMessage("Your clan received " + skills.size() + " skills.");
return "ClanSkills-Success.htm";
}
return "ClanSkills-NoItems.htm";
}
return htmlText;
}
I’ve worked with a few video editors before, and it really makes a difference when they’ve had hands-on training. One of the guys I teamed up with had studied at https://www.praguefilminstitute.cz and the quality was on another level—clean transitions, solid color grading, and he actually understood timing for gaming content. If you're looking for someone serious, check if they’ve got that kind of background.
Question
disorder25
Hello Maxcheaters I'm using this code on my Service Npc and it is working just fine but I have one problem, it have no check for skills, so if you keep clicking on it it will keep taking the coins from you and telling you no skills added. I need it to check if the clan already have the skills and if yes return a html saying that the clan have the skills alredy.
Can anyone help?
Btw I'm using a L2j H5 server>
Thank you.
else if (event.startsWith("clanSkills")) { final L2Clan clan = player.getClan(); if (clan == null) { player.sendPacket(SystemMessageId.TARGET_MUST_BE_IN_CLAN); return "ClanSkills-NoClan.htm"; } if (!player.isClanLeader()) { final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.TARGET_MUST_BE_IN_CLAN); sm.addPcName(player); player.sendPacket(sm); return "ClanSkills-NoLeader.htm"; } if (st.getQuestItemsCount(ClanSkillsItemId) >= ClanSkillsItemCount) { final List<L2SkillLearn> skills = SkillTreesData.getInstance().getAvailablePledgeSkills(clan); SkillTable st1 = SkillTable.getInstance(); for (L2SkillLearn s : skills) { clan.addNewSkill(st1.getInfo(s.getSkillId(), s.getSkillLevel())); } st.takeItems(ClanSkillsItemId, ClanSkillsItemCount); // Notify target and active char clan.broadcastToOnlineMembers(new PledgeSkillList(clan)); for (L2PcInstance member : clan.getOnlineMembers(0)) { member.sendSkillList(); } player.sendMessage("You gave " + skills.size() + " skills to " + player.getName() + "'s clan " + clan.getName() + "."); player.sendMessage("Your clan received " + skills.size() + " skills."); return "ClanSkills-Success.htm"; } return "ClanSkills-NoItems.htm"; } return htmlText; }4 answers to this question
Recommended Posts