• 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!

TFS 1.X+ Axe, club, sword advance at once.

mRefaat

Marketing and Coding
Joined
Jan 18, 2014
Messages
854
Solutions
3
Reaction score
141
Location
Egypt
Hello

How can i make (axe, club, sword) skills advance at once?
I want to make it flexible for players to use any kind of weapon (no matter axe or sword or club).
Also how can i change the advanced msg to be only 1 for the 3 not for each one of them or it will be spam.

Using tfs 1.3 10.98
 
Solution
Ok.
Open tools.cpp
and change this line:
C++:
        case SKILL_SWORD:
            return "sword fighting";
to this:
C++:
        case SKILL_SWORD:
            return "melee fighting";
And compile server.

Then in OTClient open
modules/game_skills/skills.otui

And replace 'Sword Fighting' to 'Melee Fighting'

Axe Fighting and Club Fighting you can hold and replace it at the same way for other things that you will add in future like "Mining, Alchemy"

Then in items.xml you have change all axes and clubs to sword, and you will get all weapons in game with "Melee Fighting" :)
Hello

How can i make (axe, club, sword) skills advance at once?
I want to make it flexible for players to use any kind of weapon (no matter axe or sword or club).
Also how can i change the advanced msg to be only 1 for the 3 not for each one of them or it will be spam.

Using tfs 1.3 10.98
Example, change sword fighting name to melee weapons, and register all weapon as sword. Then in game you got One skill for all kind of weapons
 
easier to edit the onGainSkillTries event to add the 'tries' to each skill:


Lua:
function Player:onGainSkillTries(skill, tries)
    if APPLY_SKILL_MULTIPLIER == false then
        return tries
    end

    if skill == SKILL_MAGLEVEL then
        return tries * configManager.getNumber(configKeys.RATE_MAGIC)
    end
    return tries * configManager.getNumber(configKeys.RATE_SKILL)
end
 
easier to edit the onGainSkillTries event to add the 'tries' to each skill:


Lua:
function Player:onGainSkillTries(skill, tries)
    if APPLY_SKILL_MULTIPLIER == false then
        return tries
    end

    if skill == SKILL_MAGLEVEL then
        return tries * configManager.getNumber(configKeys.RATE_MAGIC)
    end
    return tries * configManager.getNumber(configKeys.RATE_SKILL)
end
Can you give me tips?
 
Ok.
Open tools.cpp
and change this line:
C++:
        case SKILL_SWORD:
            return "sword fighting";
to this:
C++:
        case SKILL_SWORD:
            return "melee fighting";
And compile server.

Then in OTClient open
modules/game_skills/skills.otui

And replace 'Sword Fighting' to 'Melee Fighting'

Axe Fighting and Club Fighting you can hold and replace it at the same way for other things that you will add in future like "Mining, Alchemy"

Then in items.xml you have change all axes and clubs to sword, and you will get all weapons in game with "Melee Fighting" :)
 
Solution
Ok.
Open tools.cpp
and change this line:
C++:
        case SKILL_SWORD:
            return "sword fighting";
to this:
C++:
        case SKILL_SWORD:
            return "melee fighting";
And compile server.

Then in OTClient open
modules/game_skills/skills.otui

And replace 'Sword Fighting' to 'Melee Fighting'

Axe Fighting and Club Fighting you can hold and replace it at the same way for other things that you will add in future like "Mining, Alchemy"

Then in items.xml you have change all axes and clubs to sword, and you will get all weapons in game with "Melee Fighting" :)
That’s great i will try it :)
But what if i want to hide the axe and club skills for now? Delete lines on skills.otui?
---
Edit
Thanks man it worked perfect now :)
 
Last edited:
Feel like i have to revive this topic for similar issues, so i'v managed to add the Melee skill so that all weapon hits advance melee skill.

Now i want to remove Sword and axe from the list but whenever remove them, the crit and leech bars gets messed up and not sure how to solve this, if anyone has some tips or hints i'd be glad :]

Update: Managed to fix it by hideing the skill by using
height:0
width:0 under each skill i wanted gone.

For some reason Skillbutton had to be renamed to SmallSkillButton for it to work, no idea why but it works :)

Lua:
    SmallSkillButton
      id: skillId3
      SkillNameLabel
        !text: tr('Axe Fighting')
      SkillValueLabel
      SkillPercentPanel
      height:0
      width:0

Update2: Tho skill was hidden, the client side was bit bugged but its a start atleast, SmallSkillButton had no help as i thought it did.
 
Last edited:
Back
Top