• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Sprawdzanie czy potwór jest w danym pokoju.

maciekxx

Banned User
Joined
Mar 6, 2011
Messages
267
Reaction score
3
Yo, mam taki pokój:
02062958757561221566.png

jest jakaś funkcja sprawdzająca czy znajduje się w nim jakiś potworek? (nie piszcie tak, tylko podajcie xD)
 
Pisałem na szybko powinno chodzić.

Lua:
local from = {x=111, y=111, z=7}
local to = {x=122, y=122, z=7}

		for x = from.x, to.x do
			for y = from.y, to.y do
				local v = getTopCreature({x=x, y=y, z=from.z}).uid
				if isMonster(v) then
					return doCreatureSay(cid, 'There is a monster.', TALKTYPE_ORANGE_1, false, cid)
				end
			end
		end
 
Back
Top