• 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!

Inq teleports disappears

Hjuston

New Member
Joined
Sep 29, 2009
Messages
11
Reaction score
0
I will start with code:

creaturescripts.xml
Code:
	<event type="kill" name="Inquisition" script="inq.lua"/>


scripts/inq.lua

Code:
local config = {
     message = "Go into the teleporter in 3 minutes, else it will disappear.",
  timeToRemove = 180, -- seconds
   teleportId = 1387,
  MonStor = 48000,
    bosses = { -- Monster Name, Teleport To Position, Teleport Position, UID
	 ["Ushuriel"] = { ptp={ x=199, y=668, z=11 }, pp={ x=141, y=745, z=11, stackpos=1 } },
        ["Annihilon"] = { ptp={ x=272, y=827, z=11 }, pp={ x=213, y=729, z=11, stackpos=1 }},
        ["Hellgorak"] = { ptp={ x=95, y=835, z=12 }, pp={ x=218, y=771, z=11, stackpos=1 } },
        ["Madareth"] = { ptp={ x=71, y=736, z=12 }, pp={ x=138, y=771, z=11, stackpos=1}  },
        ["Zugurosh"] = { ptp={ x=154, y=682, z=11 }, pp={ x=175, y=744, z=11, stackpos=1 }  },
        ["Latrivan"] = { ptp={ x=178, y=726, z=12 }, pp={ x=173, y=775, z=11, stackpos=1 } },
        ["Andzej"] = { ptp={ x=1023, y=928, z=9 }, pp={ x=1197, y=820, z=8, stackpos=1 } }

}
}
 


  function remove(position)
  doRemoveThing(getTileItemById(position, config.teleportId).uid, 1)
    return TRUE
	end


function onKill(cid, target, lastHit)
    if(config.bosses[getCreatureName(target)]) then
        t = config.bosses[getCreatureName(target)]
        teleport = doCreateTeleport(1387, t.ptp, t.pp)
        position = t.pp
        doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
        addEvent(remove, config.timeToRemove * 1000, position)

    end
    return TRUE
end

monsters - after line immunities
Code:
<script> 
	<event name="Inquisition"/> 
</script>

It is inq mod changed into normal scripts.
I have problem with that when I kill one of those monsters teleport appears and disappear in ~1 sec. It don't depends on addEvent, because when I delete it that teleport still disappear :eek: I thing there is something wrong with other functions, but what? There aren't any errors in console.
I have no idea so I am asking.
I am using TFS 0.4
 
Back
Top