rasanpedromujica 154d82a9c2 Bug fix related to Dipthrath Tomb
This bug was recently discovered in nostalrius.com.br, how did I miss such a small detail?! OH GOD!
2019-01-16 22:24:06 -05:00

19 lines
793 B
Lua

function onStepIn(creature, item, position, fromPosition)
if creature:isPlayer() and creature:getPlayer():getItemCount(3238) >= 1 and creature:getPlayer():getStorageValue(262) == 0 then
doRelocate(item:getPosition(),{x = 33349, y = 32830, z = 14})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 33349, y = 32830, z = 14}, 11)
creature:getPlayer():removeItem(3238, 1)
else
doRelocate(item:getPosition(),{x = 33280, y = 32740, z = 10})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 33280, y = 32740, z = 10}, 11)
end
end
function onAddItem(item, tileitem, position)
doRelocate(tileitem:getPosition(),{x = 33280, y = 32740, z = 10})
tileitem:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 33280, y = 32740, z = 10}, 11)
end