mirror of
https://github.com/opentibiabr/canary
synced 2026-08-16 06:26:09 -04:00
23 lines
1 KiB
Lua
23 lines
1 KiB
Lua
local toolGear = Action()
|
|
|
|
function toolGear.onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
|
if math.random(100) > 5 then
|
|
return onUseRope(player, item, fromPosition, target, toPosition, isHotkey)
|
|
or onUseShovel(player, item, fromPosition, target, toPosition, isHotkey)
|
|
or onUsePick(player, item, fromPosition, target, toPosition, isHotkey)
|
|
or onUseMachete(player, item, fromPosition, target, toPosition, isHotkey)
|
|
or onUseCrowbar(player, item, fromPosition, target, toPosition, isHotkey)
|
|
or onUseSpoon(player, item, fromPosition, target, toPosition, isHotkey)
|
|
or onUseScythe(player, item, fromPosition, target, toPosition, isHotkey)
|
|
or onUseKitchenKnife(player, item, fromPosition, target, toPosition, isHotkey)
|
|
else
|
|
player:say("Oh no! Your tool is jammed and can't be used for a minute.", TALKTYPE_MONSTER_SAY)
|
|
player:addAchievementProgress("Bad Timing", 10)
|
|
item:transform(item.itemid + 1)
|
|
item:decay()
|
|
end
|
|
return true
|
|
end
|
|
|
|
toolGear:id(9594, 9596, 9598)
|
|
toolGear:register()
|