elnelson
Lunaria World Dev
Hello, otlanders, im trying to make this script but im failing, i want it to have these conditions:
1-.Player uses weapon on destroyable item
2-. destro-Item poof until it breaks
3-. 20% chance to get 1-100 gold, 20% chance to get 1 - 10 potions, 5% chance to get weapons/armors and so (its an example)
i already started this failure script, but it might improve with your help
1-.Player uses weapon on destroyable item
2-. destro-Item poof until it breaks
3-. 20% chance to get 1-100 gold, 20% chance to get 1 - 10 potions, 5% chance to get weapons/armors and so (its an example)
i already started this failure script, but it might improve with your help
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local rand = math.random(1,7)
if rand == 1 then
doCreateItem(2148,math.random(1, 22), toPosition)
end
return destroyItem(cid, itemEx, toPosition)
end
/code
the bug: it gives item and barrel is still dont destroyed