• 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+ [tfs 1.3] how can i SetSkill(fishing)?

roriscrave

Advanced OT User
Joined
Dec 7, 2011
Messages
1,188
Solutions
34
Reaction score
200
Hi, I created an item to change vocation, the player can be: Tanker, Healer and Attacker.
just need to set fishing to the correct value when changing vocation.
how can I do this? the player can change vocation at any time
Need something like this: player:setSkill(SKILL_FISHING, 10)... I know this function is incorrect, but is there a way to do this?
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if item.itemid == 1500 then
        player:setVocation(Vocation(1))
        player:sendTextMessage(22, "You are now a Tanker!")
        -- set skill fishing (100)
    elseif item.itemid == 1501 then
        player:setVocation(Vocation(2))
        player:sendTextMessage(22, "You are now a Healher!")
        -- set skill fishing (50)
    elseif item.itemid == 1502 then
        player:setVocation(Vocation(3))
        player:sendTextMessage(22, "You are now a Attacker!")
        -- set skill fishing (10)
    end  
    return true
end
 
Back
Top