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

Lua [TFS 0.4] Don't lose skills for "X" vocations

boxxer321

Active Member
Joined
Nov 5, 2011
Messages
106
Reaction score
34
hey, how are you guys?

so, I was in need of a script in which certain vocations would not lose skills when they died, however, continue to lose experience ....

is it possible to do that?
 
Solution
E
i tried this and work it
Lua:
local vocationIDS = {13, 14, 15, 16}
function onDeath(cid, corpse, deathList)
    if isInArray(vocationIDS, getPlayerVocation(cid)) then
        doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 0)
        doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0)
    end
    return true
end
now i need one to not gain more skills in these vocations haaha can u help me?
yes, add to login.lua

Lua:
local vocationIDS = {13, 14, 15, 16}
if isInArray(vocationIDS, getPlayerVocation(cid)) then
    doPlayerSetRate(cid, SKILL_FIST, 0)
    doPlayerSetRate(cid, SKILL_CLUB, 0)
    doPlayerSetRate(cid, SKILL_SWORD, 0)
    doPlayerSetRate(cid, SKILL_AXE, 0)
    doPlayerSetRate(cid, SKILL_DISTANCE, 0)
    doPlayerSetRate(cid...
how did you add it to your login.lua?
i tried this and work it
Lua:
local vocationIDS = {13, 14, 15, 16}
function onDeath(cid, corpse, deathList)
    if isInArray(vocationIDS, getPlayerVocation(cid)) then
        doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 0)
        doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0)
    end
    return true
end
now i need one to not gain more skills in these vocations haaha can u help me?
 
i tried this and work it
Lua:
local vocationIDS = {13, 14, 15, 16}
function onDeath(cid, corpse, deathList)
    if isInArray(vocationIDS, getPlayerVocation(cid)) then
        doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 0)
        doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0)
    end
    return true
end
now i need one to not gain more skills in these vocations haaha can u help me?
yes, add to login.lua

Lua:
local vocationIDS = {13, 14, 15, 16}
if isInArray(vocationIDS, getPlayerVocation(cid)) then
    doPlayerSetRate(cid, SKILL_FIST, 0)
    doPlayerSetRate(cid, SKILL_CLUB, 0)
    doPlayerSetRate(cid, SKILL_SWORD, 0)
    doPlayerSetRate(cid, SKILL_AXE, 0)
    doPlayerSetRate(cid, SKILL_DISTANCE, 0)
    doPlayerSetRate(cid, SKILL_SHIELD, 0)
    doPlayerSetRate(cid, SKILL_FISHING, 0)
    doPlayerSetRate(cid, SKILL__MAGLEVEL, 0)
end
 
Solution
yes, add to login.lua

Lua:
local vocationIDS = {13, 14, 15, 16}
if isInArray(vocationIDS, getPlayerVocation(cid)) then
    doPlayerSetRate(cid, SKILL_FIST, 0)
    doPlayerSetRate(cid, SKILL_CLUB, 0)
    doPlayerSetRate(cid, SKILL_SWORD, 0)
    doPlayerSetRate(cid, SKILL_AXE, 0)
    doPlayerSetRate(cid, SKILL_DISTANCE, 0)
    doPlayerSetRate(cid, SKILL_SHIELD, 0)
    doPlayerSetRate(cid, SKILL_FISHING, 0)
    doPlayerSetRate(cid, SKILL__MAGLEVEL, 0)
end
Thank u!!
 
Back
Top