E
Evil Puncker
Guest
Hello everyone, here is another script that i'm trying to do to implement on our official repository, help me finishing it according to this (ignore the giant spider chance, it is not true), mostly the chances and anything else that I missed, thanks 

LUA:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local chance = math.random(100)
if chance >= 50 and chance < 83 then
Game.createMonster("Spider", fromPosition)
elseif chance >= 83 and chance < 97 then
Game.createMonster("Poison Spider", fromPosition)
elseif chance >= 97 and chance < 100 then
Game.createMonster("Tarantula", fromPosition)
end
item:transform(7536)
item:decay()
item:getPosition():sendMagicEffect(CONST_ME_POFF)
return true
end