ItsMeMagic
Old Tibia Player.
an error appears in console and obviously i cant use the statues...
this is my offlinetraining.lua
Thanks, sorry for so many requests..
Code:
Lua Script Error: [Action Interface]
data/actions/scripts/other/offlinetraining.lua:onUse
data/actions/scripts/other/offlinetraining.lua:25: attempt to call global 'doPlayerSetOfflineTrainingSkill' (a nil value)
stack traceback:
[C]: in function 'doPlayerSetOfflineTrainingSkill'
data/actions/scripts/other/offlinetraining.lua:25: in function
this is my offlinetraining.lua
Code:
local statue = {
[18488] = SKILL_SWORD,
[18489] = SKILL_AXE,
[18490] = SKILL_CLUB,
[18491] = SKILL_DISTANCE,
[18492] = SKILL_MAGLEVEL
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local premiumDays = getPlayerPremiumDays(cid)
if (isPlayerPzLocked(cid)) then
return false
end
if (isPremium(cid)) then
doPlayerSetOfflineTrainingSkill(cid, statue[item.itemid])
doRemoveCreature(cid)
else
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUNEEDPREMIUMACCOUNT)
end
return true
end
Thanks, sorry for so many requests..