boby psaico
Member
- Joined
- Oct 17, 2009
- Messages
- 84
- Reaction score
- 5
I need a script that check if Obujos is in his room,
If yes, nothing happens.
If not, another is summoned
This is possible?
I've tried tried tried and nothing ;s
EDIT: Holy shit, maybe i solved, i'll test and back here
EDIT 2: yes i solved
I made a globalevent:
function onThink(interval, lastExecution)
local boss = 0
local room = {fromx = 33416, tox = 33446, fromy = 31254, toy = 31275, z = 11}
for x = room.fromx, room.tox do
for y = room.fromy, room.toy do
for z = room.z, room.z do
creature = {x = x, y = y, z = z}
mob = getTopCreature(creature).uid
if isMonster(mob) and not(isSummon(mob)) and getCreatureName(mob) == "Obujos" then
boss = 1
end
end
end
end
if boss == 1 then
else
doSummonCreature("Obujos", {x = 33434, y = 31262, z = 11})
end
return true
end
If yes, nothing happens.
If not, another is summoned
This is possible?
I've tried tried tried and nothing ;s
EDIT: Holy shit, maybe i solved, i'll test and back here
EDIT 2: yes i solved
I made a globalevent:
function onThink(interval, lastExecution)
local boss = 0
local room = {fromx = 33416, tox = 33446, fromy = 31254, toy = 31275, z = 11}
for x = room.fromx, room.tox do
for y = room.fromy, room.toy do
for z = room.z, room.z do
creature = {x = x, y = y, z = z}
mob = getTopCreature(creature).uid
if isMonster(mob) and not(isSummon(mob)) and getCreatureName(mob) == "Obujos" then
boss = 1
end
end
end
end
if boss == 1 then
else
doSummonCreature("Obujos", {x = 33434, y = 31262, z = 11})
end
return true
end
Last edited: