• 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 v0.2.8][Spell] Spells give skill when using them?

Mithaz

Nightimp Mapper/Scripter
Joined
Nov 7, 2007
Messages
120
Reaction score
1
Location
Sweden
Hello.
I creating a custom server and i want to make special spells to all my vocations.
I wonder if i can make so EXAMPLE :

My ranger vocation use a spell only for his vocation.
And when he use it he will get Distance Fighting for using his skill.

All i want to know is how to make the spell so my vocation spells adds to the skills needed for that vocation.
A bit tired right now and done some looking for a solution here on Ot Land and havnt found a solution yet.

As the title says the server is a TFS v0.2.8

Dont need a full code on it just a point to the right direction to solve this.
 
Has this solved your problem?

I don't really understand what you're trying to do but here's what I think I understood :

A spell that when use will make your skill(s) advance like you were actually training it.

In this case use this function :

doPlayerAddSkillTry(cid, skills, tries)

Tries must be replace by the number of hit you want it to simulate. (If your spell shoot 10 arrow then you may want to add 10 tries to make it realist)

Here a list for the parameter skills (you may find it in constant.lua) :
SKILL_CLUB
SKILL_SWORD
SKILL_AXE
SKILL_DISTANCE
SKILL_SHIELD
SKILL_FISHING
 
Has this solved your problem?

I don't really understand what you're trying to do but here's what I think I understood :

A spell that when use will make your skill(s) advance like you were actually training it.

In this case use this function :

doPlayerAddSkillTry(cid, skills, tries)

Tries must be replace by the number of hit you want it to simulate. (If your spell shoot 10 arrow then you may want to add 10 tries to make it realist)

Here a list for the parameter skills (you may find it in constant.lua) :
SKILL_CLUB
SKILL_SWORD
SKILL_AXE
SKILL_DISTANCE
SKILL_SHIELD
SKILL_FISHING

That was what i was looking for thanks man.
Will add it to my spell and try it out ASAP!

It Worked fine :) Thanks alot!
Back to code, Mapping and designing my Custom RPG server!
Again thanks alot!
 
Last edited:
Back
Top Bottom