Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onUse(cid, item, fromPosition, itemEx, toPosition)
- local ITEM_POS = {x = x, y = y, z = z}
- local ITEM = getTileItemById(ITEM_POS, 17999)
- if (getGlobalStorageValue(17999) >= 6) then
- if (ITEM.uid > 0) then
- addEvent(doCreateItem, 30 * 1000, 17999, 1, toPosition)
- doRemoveItem(ITEM.uid)
- end
- return setGlobalStorageValue(17999, 0)
- end
- local error = nil
- local k = 0
- for LOOP = 1, 8 do
- if (doSummonCreature("Humongous Fungus", toPosition)) then
- if (doSummonCreature("Hideous Fungus", fromPosition)) then
- k = k + 1
- else
- error = debug.traceback("[WARNING] Can't create Hideous Fungus monster created " .. k .. "")
- end
- else
- error = debug.traceback("[WARNING] Can't create Humongous Fungus " .. k .. "")
- end
- end
- if (error) then
- print(error)
- end
- local val = getGlobalStorageValue(17999) < 0 and 0 or getGlobalStorageValue(17999)
- return setGlobalStorageValue(17999, getGlobalStorageValue(17999) + val)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement