Jump to content
  • 0

SkillTrainer CommunityBoard


Question

Posted

Hi Guys, do you know how can i implement a button in my communityboard that when you click in that button, a skilltrainer windows opens?.

I hope you can help me.

Im using L2jsunrise

THanks!

5 answers to this question

Recommended Posts

  • 0
Posted
8 minutes ago, barao45 said:

Hi Guys, do you know how can i implement a button in my communityboard that when you click in that button, a skilltrainer windows opens?.

I hope you can help me.

Im using L2jsunrise

THanks!

try this: <td align=center><button value="Skills" action="bypass -h npc_%objectId%_SkillList" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td></tr>

  • 0
Posted

if (bypass.equals("bp_skillenchant"))
            showEnchantSkillList(activeChar);

 

========================

 

    public static void showEnchantSkillList(Player player)
    {
        ExEnchantSkillList esl = new ExEnchantSkillList();
        esl.setCommand(true);
        boolean empty = true;
        
        List<L2EnchantSkillLearn> esll = SkillTreeTable.getInstance().getAvailableEnchantSkills(player);
        for (L2EnchantSkillLearn skill : esll)
        {
            L2Skill sk = SkillTable.getInstance().getInfo(skill.getId(), skill.getLevel());
            if (sk == null)
                continue;
            
            L2EnchantSkillData data = SkillTreeTable.getInstance().getEnchantSkillData(skill.getEnchant());
            if (data == null)
                continue;
            
            if (data.getRate(80) == 0)
                continue;
            
            if (skill.getLevel() <= 115 || (skill.getLevel() >= 140 && skill.getLevel() <= 155))
                esl.addSkill(skill.getId(), skill.getLevel(), data.getCostSp(), data.getCostExp());
            empty = false;
        }
        
        if (empty)
        {
            player.sendPacket(SystemMessageId.THERE_IS_NO_SKILL_THAT_ENABLES_ENCHANT);
            
            if (player.getLevel() < 74)
                player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.DO_NOT_HAVE_FURTHER_SKILLS_TO_LEARN_S1).addNumber(74));
            else
                player.sendPacket(SystemMessageId.NO_MORE_SKILLS_TO_LEARN);
        }
        else
            player.sendPacket(esl);
  
        player.sendPacket(ActionFailed.STATIC_PACKET);
    }

============================================================

 

for me this is working 

  • 0
Posted
On 8/28/2021 at 3:29 PM, arm4729 said:

if (bypass.equals("bp_skillenchant"))
            showEnchantSkillList(activeChar);

 

========================

 

    public static void showEnchantSkillList(Player player)
    {
        ExEnchantSkillList esl = new ExEnchantSkillList();
        esl.setCommand(true);
        boolean empty = true;
        
        List<L2EnchantSkillLearn> esll = SkillTreeTable.getInstance().getAvailableEnchantSkills(player);
        for (L2EnchantSkillLearn skill : esll)
        {
            L2Skill sk = SkillTable.getInstance().getInfo(skill.getId(), skill.getLevel());
            if (sk == null)
                continue;
            
            L2EnchantSkillData data = SkillTreeTable.getInstance().getEnchantSkillData(skill.getEnchant());
            if (data == null)
                continue;
            
            if (data.getRate(80) == 0)
                continue;
            
            if (skill.getLevel() <= 115 || (skill.getLevel() >= 140 && skill.getLevel() <= 155))
                esl.addSkill(skill.getId(), skill.getLevel(), data.getCostSp(), data.getCostExp());
            empty = false;
        }
        
        if (empty)
        {
            player.sendPacket(SystemMessageId.THERE_IS_NO_SKILL_THAT_ENABLES_ENCHANT);
            
            if (player.getLevel() < 74)
                player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.DO_NOT_HAVE_FURTHER_SKILLS_TO_LEARN_S1).addNumber(74));
            else
                player.sendPacket(SystemMessageId.NO_MORE_SKILLS_TO_LEARN);
        }
        else
            player.sendPacket(esl);
  
        player.sendPacket(ActionFailed.STATIC_PACKET);
    }

============================================================

 

for me this is working 

 

 

Thanks Arm, but my interest is to add a tab link in community to show the Player Skills Learn Windows. I think that you shared the class to implement a Skill Enchanter.

Do you know how to show the Skills Learn?

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...