• 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 Inquisition Script [HELP]

avastar

New Member
Joined
Nov 29, 2008
Messages
10
Reaction score
0
Code:

local config = {
message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during this time.",
timeToRemove = 180, -- seconds
teleportId = 1387,
-----------------------------------------------------------------
-- Name of creature + position that the portal will teleport
bosses = {
["Ushuriel"] = { x = 31600, y = 32191, z = 14 },
["Annihilon"] = { x = 31600, y = 32191, z = 14 },
["Hellgorak"] = { x = 31600, y = 32414, z = 13 },
["Madareth"] = { x = 31600, y = 32191, z = 14 },
["Zugurosh"] = { x = 31600, y = 32191, z = 14 },
["Latrivan"] = { x = 31600, y = 32191, z = 14 }
}
-----------------------------------------------------------------
}
-----------------------------------------------------------------
-- Position that will create the portal
local ushuriel_in_pos = {x=31633, y=32320, z=12}
local annihilon_in_pos = {x=31723, y=32320, z=12}
local hellgorak_in_pos = {x=31728, y=32362, z=12}
local madareth_in_pos = {x=31648, y=32360, z=12}
local zugurosh_in_pos = {x=31665, y=32319, z=12}
local brothers_in_pos = {x=31683, y=32360, z=12}
-----------------------------------------------------------------
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")

for name, pos in pairs(config.bosses) do
if name == getCreatureName(cid) and name == 'Ushuriel' then
local position = ushuriel_in_pos
teleport = doCreateTeleport(config.teleportId, pos, position)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)

elseif name == getCreatureName(cid) and name == 'Annihilon' then
local position = annihilon_in_pos
teleport = doCreateTeleport(config.teleportId, pos, position)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)

elseif name == getCreatureName(cid) and name == 'Hellgorak' then
local position = hellgorak_in_pos
teleport = doCreateTeleport(config.teleportId, pos, position)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)

elseif name == getCreatureName(cid) and name == 'Madareth' then
local position = madareth_in_pos
teleport = doCreateTeleport(config.teleportId, pos, position)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)

elseif name == getCreatureName(cid) and name == 'Zugurosh' then
local position = zugurosh_in_pos
teleport = doCreateTeleport(config.teleportId, pos, position)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)

elseif name == getCreatureName(cid) and name == 'Latrivan' then
local position = brothers_in_pos
teleport = doCreateTeleport(config.teleportId, pos, position)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)
end
end
return TRUE
end

I wanted someone to help me end script :/
I have a ideda of how to place a
setPlayerStorageValue
so he can pass the portal and win a
setPlayerStorageValue
as if he had it completed a part of the quest that he kills monster and enter the portal to be a part of the quest

someone has an idea how I can add it in the script?
 
Last edited:
Back
Top