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

Training offline (statues and beds)

Fortera Global

Intermediate OT User
Joined
Nov 20, 2015
Messages
1,180
Solutions
2
Reaction score
117
TFS 1.2

I'd like to know how I can increase the amount of stamina earned for players who train on the statues and beds.

script statues:
Lua:
local statues = {
    [18488] = SKILL_SWORD,
    [18489] = SKILL_AXE,
    [18490] = SKILL_CLUB,
    [18491] = SKILL_DISTANCE,
    [18492] = SKILL_MAGLEVEL
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local skill = statues[item:getId()]
    if not player:isPremium() then
        player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_YOUNEEDPREMIUMACCOUNT))
        return true
    end

    if player:isPzLocked() then
        return false
    end

    player:setOfflineTrainingSkill(skill)
    player:remove()
    return true
end
 
Back
Top