1.4.2which server and which version? Without this information, no one can help you with anything.
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.
![]()
forgottenserver/data/actions/scripts/others/skill_trainer.lua at master · otland/forgottenserver
A free and open-source MMORPG server emulator written in C++ - otland/forgottenservergithub.com
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