mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-04-30 09:39:20 +02:00
remove training statues
This commit is contained in:
parent
cc12345fa1
commit
c991d1a469
@ -7,24 +7,24 @@ local statues = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
||||||
local skill = statues[item:getActionId()]
|
-- local skill = statues[item:getActionId()]
|
||||||
if not player:isPremium() then
|
-- if not player:isPremium() then
|
||||||
player:sendCancelMessage(RETURNVALUE_YOUNEEDPREMIUMACCOUNT)
|
-- player:sendCancelMessage(RETURNVALUE_YOUNEEDPREMIUMACCOUNT)
|
||||||
return true
|
-- return true
|
||||||
end
|
-- end
|
||||||
|
|
||||||
if player:isPzLocked() then
|
-- if player:isPzLocked() then
|
||||||
return false
|
-- return false
|
||||||
end
|
-- end
|
||||||
|
|
||||||
local entreePrice = 1000
|
-- local entreePrice = 1000
|
||||||
if player:getBankBalance() < entreePrice then
|
-- if player:getBankBalance() < entreePrice then
|
||||||
player:sendCancelMessage("You do not have 1000 gold coins in your bank account balance to participate in offline training.")
|
-- player:sendCancelMessage("You do not have 1000 gold coins in your bank account balance to participate in offline training.")
|
||||||
return true
|
-- return true
|
||||||
end
|
-- end
|
||||||
|
|
||||||
player:setOfflineTrainingSkill(skill)
|
-- player:setOfflineTrainingSkill(skill)
|
||||||
player:setBankBalance(player:getBankBalance() - entreePrice)
|
-- player:setBankBalance(player:getBankBalance() - entreePrice)
|
||||||
player:remove()
|
-- player:remove()
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user