Hi,
Example:
How would I add a line so that on use a corpse of id xxxx is created toPosition? Is that possible?
Many thanks in advance <3!
Example:
LUA:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local text = ""
local Config = {
Coin = {
Chance = 15
},
}
}
if math.random(100) <= Config.Coin.Chance then
text = 'You find gold coins.'
player:addItem(2148, math.random(1, 7))
else
text = 'You find nothing'
end
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, text)
toPosition:sendMagicEffect(3)
return true
end
How would I add a line so that on use a corpse of id xxxx is created toPosition? Is that possible?
Many thanks in advance <3!