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

Demon helmet quest

Boyegas

New Member
Joined
Jan 27, 2009
Messages
159
Reaction score
1
local pinkstonepos1 = {x= XXXX, y= YYYY, z= Z} -- Blocking stone position.
local TeleportToPos = {x = XXXX, y = YYYY, z = Z} -- Position the player will be ported to when leaving the DHQ, like the Temple...
local TeleportInPos = {x = XXXX, y = YYYY, z = Z} -- Position In DHQ.
local LeverPos = {x = XXXX, y = YYYY, z = Z} -- Lever Position
local TeleportOutPos = {x = XXXX, y = YYYY, z = Z} -- Telporter out pos
local timeToRemove = 40 -- Time before quest reset

local function doRemoveTeleport()
local teleport = getTileItemById(TeleportInPos, 1387).uid
if teleport > 0 then
doCreateItem(1355, 1, pinkstonepos1)
doRemoveItem(teleport)
doSendMagicEffect(TeleportInPos, CONST_ME_POFF)
doTransformItem(getTileItemById(LeverPos, 1946).uid, 1945)
end
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 1945 then
local pinkstone, teleport = getTileItemById(pinkstonepos1, 1355).uid, getTileItemById(TeleportInPos, 1387).uid
doRemoveItem(pinkstone)
doCreateTeleport(1387, TeleportToPos, TeleportOutPos)
doSendMagicEffect(TeleportInPos, CONST_ME_TELEPORT)
doPlayerSendTextMessage(cid,22,"The stone is removed, get the reward before the time runs out!")
addEvent(doRemoveTeleport, timeToRemove * 1000)
elseif item.itemid == 1946 then
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return TRUE
end




What is local TeleportInPos = {x = XXXX, y = YYYY, z = Z} -- Position In DHQ., when I pull the lever, like a teleports comes and dissapears, what is it for, other than that, the script works great.
 
TeleportOutPos and TeleportInPos are actually the same positions, so there's no need to define 2 values for it.
 
Back
Top