local cfg = {
monsters = {"Butterfly", "Metapod", "Caterpie", "Pidgey", "Beedrill", "Meowth", "Pidgeotto"},
grassChance = 25, -- % chance create monster
timeTo = 5, -- Seconds so you can use them again
}
function onStepIn(cid, item, pos)
if not isPlayer(cid) then return true end
if getGlobalStorageValue(14260) > os.time() then return true end
if math.random(100) <= cfg.grassChance then
if getCreatureName(cid) == "Butterfly" or getCreatureName(cid) == "Metapod" or getCreatureName(cid) == "Caterpie" or getCreatureName(cid) == "Pidgey" or getCreatureName(cid) == "Beedrill" or getCreatureName(cid) == "Meowth" or getCreatureName(cid) == "Pidgeotto" or getCreatureName(cid) == "Marshtomp" then
end
doCreateMonster(cfg.monsters[math.random(1, #cfg.monsters)], getCreaturePosition(cid))
local lvl = math.random(10, 30)
local nick = ""..getCreatureName(cid).." ["..lvl.."]"
doCreatureSetNick(cid, nick)
addEvent(doSendMagicEffect, 1 * 1000, getCreaturePosition(cid), 14)
setGlobalStorageValue(14260, os.time() + cfg.timeTo)
end
return true
end