myalitth
New Member
- Joined
- Jan 13, 2013
- Messages
- 69
- Reaction score
- 3
function onUse(player, item, position, fromPosition, toPosition)
local position = player:getPosition()
local chance = math.random(1, 30)
if chance <= 28 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You ransack the pile but fail to find any useful parts.")
item:transform(11253)
item:decay()
Game.createMonster("Guzzlemaw", position)
elseif chance == 29 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Amidst the pile of various bones you find a large, hollow part, similar to a pipe.")
player:addItem(22389, 1)
item:transform(11253)
item:decay()
elseif chance == 30 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a mouthpiece for a horn.")
player:addItem(22391, 1)
item:transform(11253)
item:decay()
end
return true
end
local position = player:getPosition()
local chance = math.random(1, 30)
if chance <= 28 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You ransack the pile but fail to find any useful parts.")
item:transform(11253)
item:decay()
Game.createMonster("Guzzlemaw", position)
elseif chance == 29 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Amidst the pile of various bones you find a large, hollow part, similar to a pipe.")
player:addItem(22389, 1)
item:transform(11253)
item:decay()
elseif chance == 30 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a mouthpiece for a horn.")
player:addItem(22391, 1)
item:transform(11253)
item:decay()
end
return true
end