• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Add skil to player tfs 1.2

darcioantonio

www.adventurerpg.com.br
Joined
Jul 30, 2013
Messages
170
Solutions
1
Reaction score
28
Location
Brasil
GitHub
darcioantonio
Twitch
darcio_
YouTube
MundoOTServer
i need script to add skil to player onLogin

LUA:
function onLogin(player)
if player:getVocation():getId() == 4 then
getPlayerSkillLevel(cid, 2, 100)
end
return true
end

i need all player knight, start game all skills 100

thx...
 
i need script to add skil to player onLogin

LUA:
function onLogin(player)
if player:getVocation():getId() == 4 then
getPlayerSkillLevel(cid, 2, 100)
end
return true
end

i need all player knight, start game all skills 100

thx...
- getPlayerSkill is a function that will return the skill of the player currently.
- cid isn't a variable set for this current function since it's set to player userdata already.

This should work(untested tho). I just used tibia-stats.com to get the skill tries but I'm not sure if it'll be perfect, but you can tweak it to work.
LUA:
local skillStorage = 12384

function onLogin(player)
    if player:getVocation():getId() == 4 then
        if player:getStorageValue(skillStorage) < 0 then
            player:addSkillTries(SKILL_SWORD, 2656011)
            player:addSkillTries(SKILL_CLUB, 2656011)
            player:addSkillTries(SKILL_AXE, 2656011)
            player:addSkillTries(SKILL_SHIELD, 2655971)

            player:setStorageValue(skillStorage, 1)
        end
    end
    return true
end
 
Back
Top