Hey there! I wonder if someone got 0.4 dhq script.
I got this one:
And get this console error when using the lever:
It does execute 30 % atleast. It remove the stone trap but the rest shit it don't does.. If there is someone how can compile it for 0.4 or just send me an link to an correct one i will be happy
Thanks
I got this one:
PHP:
local pinkstonepos1 = {x=1008, y=699, z=10} -- Blocking stone position.
local TeleportToPos = { x = 988, y = 1463, z = 6} -- Position the player will be ported to when leaving the DHQ, like the Temple...
local TeleportInPos = { x = 1015, y = 699, z = 10} -- Position In DHQ.
local LeverPos = { x = 1024, y = 698, z = 10} -- Lever Position
local TeleportoutPos = { x = 1010, y = 697, z = 10} -- Telporter out pos
local timeToRemove = 40 -- Time before quest reset
function onUse(cid, item, frompos, item2, topos)
local pinkstone1 = getTileItemById(pinkstonepos1, 1355) -- You can change the ID to any other kind of blocking item
local teleport = getTileItemById(TeleportInPos, 1387)
if item.itemid == 1945 then
doRemoveItem(pinkstone1.uid, 1)
doCreateTeleport(1387, TeleportToPos, TeleportOutPos)
doSendMagicEffect(TeleportInPos, CONST_ME_TELEPORT)
doPlayerSendTextMessage(cid,22,"The stone is removed, get the reward before the time runs out!") -- Message when the lever is pulled
addEvent(doRemoveTeleport, timeToRemove * 1000)
else if item.itemid == 1946 then
doPlayerSendCancel(cid,"Sorry, not possible.") -- message if the lever is pulled again.
return 1
end
end
end
function doRemoveTeleport()
local teleport = getTileItemById(TeleportInPos, 1387)
local Lever = getTileItemById(LeverPos, 1946)
if teleport.uid > 0 then
doCreateItem(1355, 1, pinkstonepos1)
doRemoveItem(teleport.uid)
doSendMagicEffect(TeleportInPos, CONST_ME_POFF)
doTransformItem(Lever.uid, 1945)
end
end
And get this console error when using the lever:
PHP:
[27/12/2012 18:58:29] [Error - Action Interface]
[27/12/2012 18:58:29] data/actions/scripts/newquest/dhq.lua:onUse
[27/12/2012 18:58:29] Description:
[27/12/2012 18:58:29] attempt to index a nil value
[27/12/2012 18:58:29] stack traceback:
[27/12/2012 18:58:29] [C]: in function 'doCreateTeleport'
[27/12/2012 18:58:29] data/actions/scripts/newquest/dhq.lua:16: in function <data/actions/scripts/newquest/dhq.lua:8>
It does execute 30 % atleast. It remove the stone trap but the rest shit it don't does.. If there is someone how can compile it for 0.4 or just send me an link to an correct one i will be happy