First commit
This commit is contained in:
19
app/SabrehavenServer/data/actions/scripts/misc/knife.lua
Normal file
19
app/SabrehavenServer/data/actions/scripts/misc/knife.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
local fruits = {3584, 3585, 3586, 3587, 3588, 3589, 3590, 3591, 3592, 3593, 3595, 3596, 5096}
|
||||
|
||||
function onUse(player, item, fromPosition, target, toPosition)
|
||||
if not target:isItem() then
|
||||
return false
|
||||
end
|
||||
|
||||
if target:getId() == 3594 then
|
||||
target:transform(2977, 1)
|
||||
target:decay()
|
||||
return true
|
||||
elseif isInArray(fruits, target:getId()) and player:removeItem(6277, 1) then
|
||||
target:remove(1)
|
||||
player:addItem(6278, 1)
|
||||
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
Reference in New Issue
Block a user