vexler222
Active Member
- Joined
- Apr 22, 2012
- Messages
- 714
- Solutions
- 15
- Reaction score
- 46
Hi, i have script for hunting room but i have problem cuz if i stay on arena with summon i can't create new summons onStep How to blockade summons on huntingroom or how to remove blockade?
Code:
<movement type="StepIn" actionid="10900" event="script">
<![CDATA[
domodlib("huntingConfig")
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local monsters, player = false, false
if isPlayer(cid) then
for k, v in pairs(huntingConfig) do
if isInRange(getThingPos(cid), v.fromPos, v.toPos) then
for x = v.fromPos.x, v.toPos.x do
for y = v.fromPos.y, v.toPos.y do
doCleanTile({x=x, y=y, z=v.toPos.z})
local t = getTopCreature({x=x, y=y, z=v.toPos.z}).uid
if t ~= 0 then
if isMonster(t) then
monsters = true
end
end
end
end
if monsters then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Nie zabiles jeszcze wszystkich potworow!')
doTeleportThing(cid, fromPosition)
else
if exhaustion.check(cid, configHunting.storageExh) then
doPlayerSendCancel(cid, 'Musisz poczekac: '..exhaustion.get(cid, configHunting.storageExh)..'s by stworzyc kolejne potwory.')
doTeleportThing(cid, fromPosition)
else
exhaustion.set(cid, configHunting.storageExh, configHunting.exhaust)
doTeleportThing(cid, fromPosition, true)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Potwory zostaly zrespione.')
for i = 1, v.monsters[2] do
doCreateMonster(v.monsters[1], v.teleportPos, false, false, false)
end
end
end
break
end
end
end
return true
end
]]>
</movement>