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

Solved Create New Skill - Mining

Allesn

Member
Joined
May 4, 2011
Messages
204
Solutions
1
Reaction score
24
How do I create a new skill, for example, a mining. The lua script I do based on fishing.

Thank You
 
If you want a 'real bar', it will require a source edit and a client edit.
If you want it to just be an invisible skill, you can use a single storage value, and just incorporate it into the script when they successfully mine materials.
 
1=
If you are using OTclient, Like Xikini says, you need edit the Client and of course the sources to add the New skill, or if you mean "change" the Fishing for the "Minning" you need to REPLACE all the names in the sources "fishing" for the new name.

2=
you can continue using Tibia normal Client.
with an Hex editor You can edit the Tibia.exe and change the Name Fishing for Minning

to be fast i recommend to you, Only change the external name "fishing" of the client, and modify the Sources to get new message "You advance on Minning Knowledge/Fighting/skill"
 
1. I want a real bar, I've edited the otclient (sources and game_skills)
2. I want add one more (mining), not replace fishing
3. I need help with source edit :x
 
1 - I searched for "fish" in the source and added below that the mining skill.
2 - I made the changes in the database.
3 - I changed the otclient where I added the bar (see the image). The initial value in bar appears correctly (Mining 10), but when I use the pick, the bar does not increase
3.1 - II created the action when using pick, and when I use, it performs player:addSkillTries(SKILL_MINING, 1)

PS: When I run player:addSkillTries(SKILL MINING, 1), it is not changing the value in the database

Image:
pON4goT.jpg

My Edited Source:
https://www.sendspace.com/file/m90nxg
 
what is the ID of mining skill in your client? have you made it 7 just like in sources? since you shifted SKILL_MAGLEVEL and SKILL_LEVEL by +1 in server, I hope you also did it in client

how about vocations.xml? did you add something like this for each vocation
Code:
<skill id="7" multiplier="1.1" />
since I noticed you didn't add this to vocation.cpp
Code:
   skillMultipliers[7] = 1.1f;
 
what is the ID of mining skill in your client? have you made it 7 just like in sources? since you shifted SKILL_MAGLEVEL and SKILL_LEVEL by +1 in server, I hope you also did it in client

how about vocations.xml? did you add something like this for each vocation
Code:
<skill id="7" multiplier="1.1" />
since I noticed you didn't add this to vocation.cpp
Code:
   skillMultipliers[7] = 1.1f;

Actually, I forgot to make changes to these two files. I'll do here and after a while I say if it worked.
Thank you
 
I've made the changes, still won't work.
In otclient, the ID of mining skill is 7, like in sources.
But, in otclient I only change const.h and skills.otui

Part of code in const.h:
Code:
    enum Skill {
        Fist = 0,
        Club,
        Sword,
        Axe,
        Distance,
        Shielding,
        Fishing,
        Mining,
        LastSkill
    };

EDIT
I made one more change in vocations.cpp, had also forgot skillBase, now it's working :D
Code:
uint32_t Vocation::skillBase[SKILL_LAST + 1] = {50, 50, 50, 50, 30, 100, 20, 20};

Proof:
ZmyJVKz.png


Thank you, problem solved :D
 
Last edited:
I've made the changes, still won't work.
In otclient, the ID of mining skill is 7, like in sources.
But, in otclient I only change const.h and skills.otui

Part of code in const.h:
Code:
    enum Skill {
        Fist = 0,
        Club,
        Sword,
        Axe,
        Distance,
        Shielding,
        Fishing,
        Mining,
        LastSkill
    };

EDIT
I made one more change in vocations.cpp, had also forgot skillBase, now it's working :D
Code:
uint32_t Vocation::skillBase[SKILL_LAST + 1] = {50, 50, 50, 50, 30, 100, 20, 20};

Proof:
ZmyJVKz.png


Thank you, problem solved :D

Could you explain me briefly what did you do to add this mining system?
 
I've made the changes, still won't work.
In otclient, the ID of mining skill is 7, like in sources.
But, in otclient I only change const.h and skills.otui

Part of code in const.h:
Code:
    enum Skill {
        Fist = 0,
        Club,
        Sword,
        Axe,
        Distance,
        Shielding,
        Fishing,
        Mining,
        LastSkill
    };

EDIT
I made one more change in vocations.cpp, had also forgot skillBase, now it's working :D
Code:
uint32_t Vocation::skillBase[SKILL_LAST + 1] = {50, 50, 50, 50, 30, 100, 20, 20};

Proof:
ZmyJVKz.png


Thank you, problem solved :D
Do you can show us how to?
 
Back
Top