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

Lua inq portals -.-

Glidarn

Member
Joined
May 9, 2009
Messages
970
Reaction score
16
Location
Åkersberga, Sweden
ImageShack® - Online Photo and Video Hosting

LUA:
local config = {
	message = "You have 45 seconds for back use Death Monster For Teleport You.",
	timeToRemove = 60, -- seconds
	teleportId = 1387,
	bosses = {
		["Ushuriel"] = { x = 172, y = 559, z = 13 },
		["Annihilon"] = { x = 294, y = 681, z = 13},
		["Hellgorak"] = { x = 255, y = 467, z = 13},
		["Madareth"] = { x = 287, y = 365, z = 13},
		["Zugurosh"] = { x = 314,  y = 474, z = 13},
		["Latrivan"] = { x = 408, y = 413, z = 13},
                ["Tirecz"] = { x = 33061, y = 31029, z = 7 }
              
                
	}
}
	
local function removal(position)
	doRemoveThing(getTileItemById(position, config.teleportId).uid, 1)
    return TRUE
end


function onDeath(cid, corpse, killer)
	registerCreatureEvent(cid, "inquisitionPortals")
	local position = getCreaturePosition(cid)
	
	for name, pos in pairs(config.bosses) do
		if name == getCreatureName(cid) then
			teleport = doCreateTeleport(config.teleportId, pos, position)
			doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
			addEvent(removal, config.timeToRemove * 1000, position)
			doSendMagicEffect(position,65)
		end
	end
	return TRUE
end
 
Try this one.

local config = {
message = "Go into the teleporter in 3 minutes, else it will disappear.",
timeToRemove = 180, -- seconds
teleportId = 1387,
bosses = {
["Ushuriel"] = { x = 1320, y = 1419, z = 5 },
["Annihilion"] = { x = 1392, y = 1403, z = 5 },
["Hellgorak"] = { x = 1397, y = 1445, z = 5 },
["Madareth"] = { x = 1317, y = 1445, z = 5 },
["Zugurosh"] = { x = 1354, y = 1418, z = 5 },
["Latrivan"] = { x = 1352, y = 1449, z = 5}
}
}

local function removal(position)
position.stackpos = 1
if getThingfromPos(position).itemid == config.teleportId then
doRemoveItem(getThingfromPos(position).uid)
end
return TRUE
end

function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "inquisitionPortals")
local position = getCreaturePosition(cid)

for name, pos in pairs(config.bosses) do
if name == getCreatureName(cid) then
teleport = doCreateTeleport(config.teleportId, pos, position)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)
end
end
return TRUE
end
 
Back
Top