Lua:
local function doRemoveFood(food, world)
foods = getWorldFoods(world)
for i = 1, #foods do
repeat
if food.uid == foods[i].uid then
doRemoveThing(foods[i].uid)
end
until #foods == 0
end
break
end
end
function onThink(cid, interval)
local interval = 0.00000000000000000000001 --seconds
local thread = getForumThreadByTitle(otland, "[Latest RTS] Last Poster Wins (Second one)")
local peanut = getThingFromThread(thread)
doRemoveFood(peanut, earth)
if isThing(peanut) then --remove peanuts if by any reason on earth the last function didn't remove them
local elephant = doSummonCreature("elephant", thread)
doMonsterSetTarget(elephant, peanut)
end
--EPIC WIN \/
repeat
doThreadSetLastPoster(thread, "cybershot")
until thread.lastPoster == "cybershot"
end
return true
end
k bye Peanuts
Elephants eat Peanuts
Last edited: