mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-05-10 21:49:20 +02:00
24 lines
489 B
Lua
24 lines
489 B
Lua
local statues = {
|
|
[2032] = 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
|