tuduras
Member
- Joined
- Jun 4, 2017
- Messages
- 76
- Solutions
- 1
- Reaction score
- 11
Hello! ;]
I have got the problem, when I stay on special sqm , it could spawn monster. I get it
feedback 15:56 Monsters has been spawned and nothing is happening.
Anyone know what's this.
Here post my code with hunting room:
Help.. !
I have got the problem, when I stay on special sqm , it could spawn monster. I get it
feedback 15:56 Monsters has been spawned and nothing is happening.
Anyone know what's this.
Here post my code with hunting room:
Code:
<!-- to jest do tworzenia potworow -->
<movement type="StepIn" actionid="2860" 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, 'You haven\'t killed all monsters.')
doTeleportThing(cid, fromPosition)
else
if exhaustion.check(cid, configHunting.storageExh) then
doPlayerSendCancel(cid, 'You have to wait: '..exhaustion.get(cid, configHunting.storageExh)..' sec to respawn monsters again.')
doTeleportThing(cid, fromPosition)
else
exhaustion.set(cid, configHunting.storageExh, configHunting.exhaust)
doTeleportThing(cid, fromPosition, true)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Monsters has been spawned.')
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>
Help.. !
