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

Offline Training in beds on houses.

OTcreator

Active Member
Joined
Feb 14, 2022
Messages
426
Solutions
1
Reaction score
44
Hi,
I'm trying to make offline training only in exchange for an item.
I have dealt with the stats because they are in actions.

But how can I change the training in beds?
 
which server and which version? Without this information, no one can help you with anything.
 
Can you change the IDs of the offline training statues to offline training beds? Only here or by maintaining and creating a new line and adding this to all the beds with the corresponding IDs. That simple.


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:sendCancelMessage(RETURNVALUE_YOUNEEDPREMIUMACCOUNT)
        return true
    end

    if player:isPzLocked() then
        return false
    end

    player:setOfflineTrainingSkill(skill)
    player:remove()
    return true
end
 
Can you change the IDs of the offline training statues to offline training beds? Only here or by maintaining and creating a new line and adding this to all the beds with the corresponding IDs. That simple.


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:sendCancelMessage(RETURNVALUE_YOUNEEDPREMIUMACCOUNT)
        return true
    end

    if player:isPzLocked() then
        return false
    end

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

I fixed the first problem on my own a long time ago.
But what to do to remove the ability to train at home in beds, or what to do to also charge items in exchange for the ability to train?
 
Back
Top