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

Inquisition Create Teleport

Joined
Sep 29, 2009
Messages
224
Reaction score
0
I Need script of Inq Quest, When Kill "Boss" (anihilon, hellgorak, etc.) Create Teleport In (x,y,z) With 30seg Duration.

Plx Help.

THX ;]
 
Code:
local config = {
	message = "Go into the teleporter in 3 minutes, else it will disappear.",
	timeToRemove = 30, -- seconds
	teleportId = 1387,
	bosses = { -- Monster Name, Teleport To Position, Teleport Position
		["Ushuriel"] = { { x = 222, y = 564, z = 6 }, { x = 218, y = 564, z = 6 } },
		["Annihilion"] = { { x = 276, y = 1045, z = 6 }, { x = 218, y = 564, z = 6 } },
		["Hellgorak"] = { { x = 169, y = 1047, z = 6 }, { x = 218, y = 564, z = 6 } },
		["Madareth"] = { { x = 416, y = 1017, z = 6 }, { x = 218, y = 564, z = 6 } },
		["Zugurosh"] = { { x = 424, y = 1119, z = 7 }, { x = 218, y = 564, z = 6 } },
		["Latrivan"] = { { x = 46, y = 1109, z = 7 }, { x = 218, y = 564, z = 6 } }
	}
}

local function removal(position)
	local thing = getTileItemById(position, 1387).uid
	if thing > 0 then
		doRemoveItem(thing)
	end
	return TRUE
end

function onDeath(cid, corpse, killer)
	for name, pos in pairs(config.bosses) do
		if name:lower() == getCreatureName(cid):lower() then
			doCreateTeleport(config.teleportId, pos[1], pos[2])
			doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
			addEvent(removal, config.timeToRemove * 1000, pos[2])
		end
	end
	return TRUE
end
You will also need to register the event in creaturescripts.xml, login.lua and bosses' XML files.
 
In Creaturescripts.xml
<event type="death" name="inquisitionPortals" script="inquisitionPortals.lua"/>

In Login.lua
registerCreatureEvent(cid, "inquisitionPortals")

In Bosses
<script>
<event name="inquisitionPortals"/>
</script>

Correct ? And I Need Create Teleport In Map Editor ?

Thx, Repp++ For U ;D
 
Back
Top