fix few more items 7.92

This commit is contained in:
ErikasKontenis
2020-03-04 19:58:00 +02:00
parent 3cb71f9127
commit 2ce746ea27
8 changed files with 69 additions and 9 deletions

View File

@@ -146,6 +146,7 @@
<action itemid="4852" script="misc/ectoplasm_container.lua" />
<action itemid="3217" script="misc/letter_bag.lua" />
<action fromid="3603" toid="3605" script="misc/baking.lua" />
<action itemid="6276" script="misc/baking.lua" />
<action itemid="5466" script="misc/distilling_rum.lua" />
<action fromid="3264" toid="3276" script="misc/weapons.lua" />
<action fromid="3278" toid="3286" script="misc/weapons.lua" />
@@ -161,6 +162,7 @@
<action itemid="5957" script="misc/lottery_ticket.lua" />
<action itemid="5776" script="misc/sabrehaven_talon.lua" />
<action itemid="5928" script="misc/catch_fish.lua" />
<action itemid="6279" script="misc/party_cake.lua" />
<!-- Dolls -->
<action itemid="5080" script="misc/dolls.lua" />
@@ -301,6 +303,8 @@
<action itemid="5096" script="misc/food.lua" />
<action itemid="5678" script="misc/food.lua" />
<action itemid="6125" script="misc/food.lua" />
<action itemid="6277" script="misc/food.lua" />
<action itemid="6278" script="misc/food.lua" />
<!-- Passthrough -->
<action fromid="2334" toid="2341" script="misc/doors.lua" />

View File

@@ -29,6 +29,12 @@ function onUse(player, item, fromPosition, target, toPosition)
item:remove(1)
return true
end
elseif item:getId() == 6276 then
if table.contains(ovens, target:getId()) then
Game.createItem(6277, 1, target:getPosition())
item:remove(1)
return true
end
elseif item:getId() == 3605 then
if table.contains(milestone, target:getId()) then
local parent = item:getParent()

View File

@@ -40,7 +40,9 @@ local foods = {
[3732] = "Munch.", -- green mushroom
[5096] = "Yum.", -- mango
[5678] = "Gulp.", -- tortoise egg
[6125] = "Gulp." -- tortoise egg from Nargor
[6125] = "Gulp.", -- tortoise egg from Nargor
[6277] = "Mmmm.", -- cake
[6278] = "Mmmm." -- cake
}
function onUse(player, item, fromPosition, target, toPosition)

View File

@@ -1,3 +1,5 @@
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
@@ -7,6 +9,11 @@ function onUse(player, item, fromPosition, target, toPosition)
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
end

View File

@@ -0,0 +1,6 @@
function onUse(player, item, fromPosition, target, toPosition)
item:getPosition():sendMagicEffect(CONST_ME_POFF)
item:transform(6278, 1)
item:getPosition():sendMonsterSay(player:getName() .. " blew out the candle.")
return true
end