• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OTClient Adding a new skill bar

Ramirow

Veteran OT User
Joined
Aug 22, 2009
Messages
584
Solutions
15
Reaction score
301
Location
Argentina
YouTube
ramirogrant
I am trying to add a new skill bar to the otclient, made some progress on the topic, i will list all the files i've edited in the client and in sources down below.

The thing is, it shows the bar but with a -1 as value.

skill.png

I will list the source edits I made first.
Added the multiplier at the end on Vocation.h
Code:
float skillMultipliers[SKILL_LAST + 1] = {1.5f, 2.0f, 2.0f, 2.0f, 2.0f, 1.5f, 1.1f, 1.1f};

Made these changes to Enums.h
Code:
enum skills_t : uint8_t {
    SKILL_FIST = 0,
    SKILL_CLUB = 1,
    SKILL_SWORD = 2,
    SKILL_AXE = 3,
    SKILL_DISTANCE = 4,
    SKILL_SHIELD = 5,
    SKILL_FISHING = 6,
    SKILL_RUNECRAFT = 7,

    SKILL_MAGLEVEL = 8,
    SKILL_LEVEL = 9,

    SKILL_FIRST = SKILL_FIST,
    SKILL_LAST = SKILL_RUNECRAFT
};

On Vocation.cpp
Code:
uint32_t Vocation::skillBase[SKILL_LAST + 1] = {50, 50, 50, 50, 30, 100, 20, 20};

Also modified Schema.sql to create the required columns on the database for players, the skill gets a value of 10 after character creation just like any other skill.

On OtClient:

I've added this skill after fishing in Skills.otui (And yes, I've moved the skillIds of ManaLeech and such by a +1)
Code:
SkillButton
      id: skillId7
      SkillNameLabel
        !text: tr('Runecraft')
      SkillValueLabel
      SkillPercentPanel

Then I've edited Skills.lua that originally stated Skill.Fishing as the last skill.
Code:
    if i > Skill.Runecraft then
      toggleSkill('skillId'..i, hasAdditionalSkills)
    end
 
Well if anyone happens to read this post and doesn't know how to proceed. I've found a way to fix this. Here are the threads:
 
Back
Top