Sheinen Highfive
In a hot scale.
Thank you :thumbup:
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/login.lua
luaRegisterCreatureEvent(). Creature not found
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "voodoo")
local creaturename = getCreatureName(cid)
--- positions where the teleports will be created:
local xief_in_pos = {x=1226, y=935, z=8, stackpos=2}
--- positions where the teleports will be teleported you:
local xief_to_pos = {x=1233, y=941, z=8, stackpos=1}
local time_to_pass = 180 -- in seconds
local tpID = 1387
local doEffect = CONST_ME_TELEPORT
local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear"
if creaturename == 'xief' then
teleport = doCreateTeleport(tpID, xief_to_pos, xief_in_pos)
doSendMagicEffect(ushuriel_in_pos, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInUshurielWard, (1000*time_to_pass))
end
end
function removeTeleportInUshurielWard()
if getThingfromPos({x=1226, y=935, z=8, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=1226, y=935, z=8, stackpos=2}).uid,1)
doSendMagicEffect({x=1226, y=935, z=8, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
function removeTeleportInAnnihilonWard()
if getThingfromPos({x=143, y=963, z=7, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=143, y=963, z=7, stackpos=2}).uid,1)
doSendMagicEffect({x=143, y=963, z=7, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
function removeTeleportInHellgorakWard()
if getThingfromPos({x=244, y=959, z=4, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=244, y=959, z=4, stackpos=2}).uid,1)
doSendMagicEffect({x=244, y=959, z=4, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
function removeTeleportInMadarethWard()
if getThingfromPos({x=345, y=1017, z=7, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=345, y=1017, z=7, stackpos=2}).uid,1)
doSendMagicEffect({x=345, y=1017, z=7, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
function removeTeleportInZuguroshWard()
if getThingfromPos({x=509, y=1190, z=7, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=509, y=1190, z=7, stackpos=2}).uid,1)
doSendMagicEffect({x=509, y=1190, z=7, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
function removeTeleportInBrothersWard()
if getThingfromPos({x=219, y=1041, z=7, stackpos=1}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=219, y=1041, z=7, stackpos=1}).uid,1)
doSendMagicEffect({x=219, y=1041, z=7, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
function onLogin(cid)
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "PlayerDeath")
return TRUE
end
registerCreatureEvent(cid, "inquisitionPortals")
registerCreatureEvent(cid, "inquisitionPortals")
return TRUE
end
Change the function "getThingfromPos(pos)" to "getThingFromPos(pos)"Mefiu said:So some1 got it working on the newest tfs ?? I rly need this.
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "voodoo")
local creaturename = getCreatureName(cid)
--- positions where the teleports will be created:
local xief_in_pos = {x=1226, y=935, z=8, stackpos=2}
--- positions where the teleports will be teleported you:
local xief_to_pos = {x=1233, y=941, z=8, stackpos=1}
local time_to_pass = 180 -- in seconds
local tpID = 1387
local doEffect = CONST_ME_TELEPORT
local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear"
if creaturename == 'xief' then
teleport = doCreateTeleport(tpID, xief_to_pos, xief_in_pos)
doSendMagicEffect(ushuriel_in_pos, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInUshurielWard, (1000*time_to_pass))
end
end
function removeTeleportInUshurielWard()
if getThingfromPos({x=1226, y=935, z=8, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=1226, y=935, z=8, stackpos=2}).uid,1)
doSendMagicEffect({x=1226, y=935, z=8, stackpos=1}, CONST_ME_POFF)
registerCreatureEvent(cid, "inquisitionPortals")
return TRUE
end
end
function removeTeleportInAnnihilonWard()
if getThingfromPos({x=143, y=963, z=7, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=143, y=963, z=7, stackpos=2}).uid,1)
doSendMagicEffect({x=143, y=963, z=7, stackpos=1}, CONST_ME_POFF)
registerCreatureEvent(cid, "inquisitionPortals")
return TRUE
end
end
function removeTeleportInHellgorakWard()
if getThingfromPos({x=244, y=959, z=4, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=244, y=959, z=4, stackpos=2}).uid,1)
doSendMagicEffect({x=244, y=959, z=4, stackpos=1}, CONST_ME_POFF)
registerCreatureEvent(cid, "inquisitionPortals")
return TRUE
end
end
function removeTeleportInMadarethWard()
if getThingfromPos({x=345, y=1017, z=7, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=345, y=1017, z=7, stackpos=2}).uid,1)
doSendMagicEffect({x=345, y=1017, z=7, stackpos=1}, CONST_ME_POFF)
registerCreatureEvent(cid, "inquisitionPortals")
return TRUE
end
end
function removeTeleportInZuguroshWard()
if getThingfromPos({x=509, y=1190, z=7, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=509, y=1190, z=7, stackpos=2}).uid,1)
doSendMagicEffect({x=509, y=1190, z=7, stackpos=1}, CONST_ME_POFF)
registerCreatureEvent(cid, "inquisitionPortals")
return TRUE
end
end
function removeTeleportInBrothersWard()
if getThingfromPos({x=219, y=1041, z=7, stackpos=1}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=219, y=1041, z=7, stackpos=1}).uid,1)
doSendMagicEffect({x=219, y=1041, z=7, stackpos=1}, CONST_ME_POFF)
registerCreatureEvent(cid, "inquisitionPortals")
return TRUE
end
end
It is actually supposed to be a non-capitalized f, so "getThingfromPos" is correct, whilst "getThingFromPos" isn't. ;- )put the code:
before:Code:registerCreatureEvent(cid, "inquisitionPortals")
Change the function "getThingfromPos(pos)" to "getThingFromPos(pos)"Code:return TRUE end
Tried it, got the same error message ::
Code:function onDeath(cid, corpse, killer) registerCreatureEvent(cid, "voodoo") local creaturename = getCreatureName(cid) --- positions where the teleports will be created: local xief_in_pos = {x=1226, y=935, z=8, stackpos=2} --- positions where the teleports will be teleported you: local xief_to_pos = {x=1233, y=941, z=8, stackpos=1} local time_to_pass = 180 -- in seconds local tpID = 1387 local doEffect = CONST_ME_TELEPORT local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear" if creaturename == 'xief' then teleport = doCreateTeleport(tpID, xief_to_pos, xief_in_pos) doSendMagicEffect(ushuriel_in_pos, doEffect) doCreatureSay(cid, message, TALKTYPE_ORANGE_1) addEvent(removeTeleportInUshurielWard, (1000*time_to_pass)) end end function removeTeleportInUshurielWard() if getThingfromPos({x=1226, y=935, z=8, stackpos=2}).itemid == 1387 then doRemoveItem(getThingfromPos({x=1226, y=935, z=8, stackpos=2}).uid,1) doSendMagicEffect({x=1226, y=935, z=8, stackpos=1}, CONST_ME_POFF) registerCreatureEvent(cid, "inquisitionPortals") return TRUE end end function removeTeleportInAnnihilonWard() if getThingfromPos({x=143, y=963, z=7, stackpos=2}).itemid == 1387 then doRemoveItem(getThingfromPos({x=143, y=963, z=7, stackpos=2}).uid,1) doSendMagicEffect({x=143, y=963, z=7, stackpos=1}, CONST_ME_POFF) registerCreatureEvent(cid, "inquisitionPortals") return TRUE end end function removeTeleportInHellgorakWard() if getThingfromPos({x=244, y=959, z=4, stackpos=2}).itemid == 1387 then doRemoveItem(getThingfromPos({x=244, y=959, z=4, stackpos=2}).uid,1) doSendMagicEffect({x=244, y=959, z=4, stackpos=1}, CONST_ME_POFF) registerCreatureEvent(cid, "inquisitionPortals") return TRUE end end function removeTeleportInMadarethWard() if getThingfromPos({x=345, y=1017, z=7, stackpos=2}).itemid == 1387 then doRemoveItem(getThingfromPos({x=345, y=1017, z=7, stackpos=2}).uid,1) doSendMagicEffect({x=345, y=1017, z=7, stackpos=1}, CONST_ME_POFF) registerCreatureEvent(cid, "inquisitionPortals") return TRUE end end function removeTeleportInZuguroshWard() if getThingfromPos({x=509, y=1190, z=7, stackpos=2}).itemid == 1387 then doRemoveItem(getThingfromPos({x=509, y=1190, z=7, stackpos=2}).uid,1) doSendMagicEffect({x=509, y=1190, z=7, stackpos=1}, CONST_ME_POFF) registerCreatureEvent(cid, "inquisitionPortals") return TRUE end end function removeTeleportInBrothersWard() if getThingfromPos({x=219, y=1041, z=7, stackpos=1}).itemid == 1387 then doRemoveItem(getThingfromPos({x=219, y=1041, z=7, stackpos=1}).uid,1) doSendMagicEffect({x=219, y=1041, z=7, stackpos=1}, CONST_ME_POFF) registerCreatureEvent(cid, "inquisitionPortals") return TRUE end end
First i added "registerCreatureEvent(cid, "inquisitionPortals")" only on the first return TRUE, tested, didnt work. Than added it to them all, tested, samething.
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "inquisitionPortals")
local creaturename = getCreatureName(cid)
--- positions where the teleports will be created:
local demodras_in_pos = {x=812, y=1037, z=9, stackpos=2}
local xief_in_pos = {x=1225, y=936, z=8, stackpos=2}
local hellgorak_in_pos = {x=244, y=959, z=4, stackpos=2}
local madareth_in_pos = {x=345, y=1017, z=7, stackpos=2}
local zugurosh_in_pos = {x=509, y=1190, z=7, stackpos=2}
local brothers_in_pos = {x=219, y=1041, z=7, stackpos=1}
--- positions where the teleports will be teleported you:
local demodras_to_pos = {x=995, y=996, z=7, stackpos=1}
local xief_to_pos = {x=1231, y=941, z=8, stackpos=1}
local hellgorak_to_pos = {x=169, y=1047, z=6, stackpos=1}
local madareth_to_pos = {x=416, y=1017, z=7, stackpos=1}
local zugurosh_to_pos = {x=424, y=1119, z=7, stackpos=1}
local brothers_to_pos = {x=46, y=1109, z=7, stackpos=1}
local time_to_pass = 180 -- in seconds
local tpID = 1387
local doEffect = CONST_ME_TELEPORT
local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear"
if creaturename == 'Demodras' then
teleport = doCreateTeleport(tpID, demodras_to_pos, demodras_in_pos)
doSendMagicEffect(demodras_in_pos, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInUshurielWard, (1000*time_to_pass))
elseif creaturename == 'Xief' then
teleport = doCreateTeleport(tpID, xief_to_pos, annihilon_in_pos)
doSendMagicEffect(xief_in_pos, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInAnnihilonWard, (1000*time_to_pass))
elseif creaturename == 'Madareth' then
teleport = doCreateTeleport(tpID, madareth_to_pos, madareth_in_pos)
doSendMagicEffect(madareth_in_pos, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInMadarethWard, (1000*time_to_pass))
elseif creaturename == 'Hellgorak' then
teleport = doCreateTeleport(tpID, hellgorak_to_pos, hellgorak_in_pos)
doSendMagicEffect(hellgorak_in_pos, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInHellgorakWard, (1000*time_to_pass))
elseif creaturename == 'Zugurosh' then
teleport = doCreateTeleport(tpID, zugurosh_to_pos, zugurosh_in_pos)
doSendMagicEffect(zugurosh_in_pos, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInZuguroshWard, (1000*time_to_pass))
elseif creaturename == 'Latrivan' then
teleport = doCreateTeleport(tpID, brothers_to_pos, brothers_in_pos)
doSendMagicEffect(brothers_in_pos, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInBrothersWard, (1000*time_to_pass))
end
end
function removeTeleportInUshurielWard()
if getThingfromPos({x=812, y=1037, z=9, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=812, y=1037, z=9, stackpos=2}).uid,1)
doSendMagicEffect({x=812, y=1037, z=9, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
function removeTeleportInAnnihilonWard()
if getThingfromPos({x=1225, y=936, z=8, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=1225, y=936, z=8, stackpos=2}).uid,1)
doSendMagicEffect({x=1225, y=936, z=8, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
function removeTeleportInHellgorakWard()
if getThingfromPos({x=244, y=959, z=4, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=244, y=959, z=4, stackpos=2}).uid,1)
doSendMagicEffect({x=244, y=959, z=4, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
function removeTeleportInMadarethWard()
if getThingfromPos({x=345, y=1017, z=7, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=345, y=1017, z=7, stackpos=2}).uid,1)
doSendMagicEffect({x=345, y=1017, z=7, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
function removeTeleportInZuguroshWard()
if getThingfromPos({x=509, y=1190, z=7, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=509, y=1190, z=7, stackpos=2}).uid,1)
doSendMagicEffect({x=509, y=1190, z=7, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
function removeTeleportInBrothersWard()
if getThingfromPos({x=219, y=1041, z=7, stackpos=1}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=219, y=1041, z=7, stackpos=1}).uid,1)
doSendMagicEffect({x=219, y=1041, z=7, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/login.lua
luaRegisterCreatureEvent(). Creature not found
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "inquisitionPortals")
local creaturename = getCreatureName(cid)
--- positions where the teleports will be created:
local demodras_in_pos = {x=812, y=1037, z=9, stackpos=2}
local xief_in_pos = {x=1225, y=936, z=8, stackpos=2}
local hellgorak_in_pos = {x=244, y=959, z=4, stackpos=2}
local madareth_in_pos = {x=345, y=1017, z=7, stackpos=2}
local zugurosh_in_pos = {x=509, y=1190, z=7, stackpos=2}
local brothers_in_pos = {x=219, y=1041, z=7, stackpos=1}
--- positions where the teleports will be teleported you:
local demodras_to_pos = {x=995, y=996, z=7, stackpos=1}
local xief_to_pos = {x=1231, y=941, z=8, stackpos=1}
local hellgorak_to_pos = {x=169, y=1047, z=6, stackpos=1}
local madareth_to_pos = {x=416, y=1017, z=7, stackpos=1}
local zugurosh_to_pos = {x=424, y=1119, z=7, stackpos=1}
local brothers_to_pos = {x=46, y=1109, z=7, stackpos=1}
local time_to_pass = 180 -- in seconds
local tpID = 1387
local doEffect = CONST_ME_TELEPORT
local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear"
if creaturename == 'Demodras' then
teleport = doCreateTeleport(tpID, demodras_to_pos, demodras_in_pos)
doSendMagicEffect(demodras_in_pos, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInUshurielWard, (1000*time_to_pass))
elseif creaturename == 'Xief' then
teleport = doCreateTeleport(tpID, xief_to_pos, annihilon_in_pos)
doSendMagicEffect(xief_in_pos, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInAnnihilonWard, (1000*time_to_pass))
elseif creaturename == 'Madareth' then
teleport = doCreateTeleport(tpID, madareth_to_pos, madareth_in_pos)
doSendMagicEffect(madareth_in_pos, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInMadarethWard, (1000*time_to_pass))
elseif creaturename == 'Hellgorak' then
teleport = doCreateTeleport(tpID, hellgorak_to_pos, hellgorak_in_pos)
doSendMagicEffect(hellgorak_in_pos, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInHellgorakWard, (1000*time_to_pass))
elseif creaturename == 'Zugurosh' then
teleport = doCreateTeleport(tpID, zugurosh_to_pos, zugurosh_in_pos)
doSendMagicEffect(zugurosh_in_pos, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInZuguroshWard, (1000*time_to_pass))
elseif creaturename == 'Latrivan' then
teleport = doCreateTeleport(tpID, brothers_to_pos, brothers_in_pos)
doSendMagicEffect(brothers_in_pos, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInBrothersWard, (1000*time_to_pass))
end
end
function removeTeleportInUshurielWard()
if getThingfromPos({x=812, y=1037, z=9, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=812, y=1037, z=9, stackpos=2}).uid,1)
doSendMagicEffect({x=812, y=1037, z=9, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
function removeTeleportInAnnihilonWard()
if getThingfromPos({x=1225, y=936, z=8, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=1225, y=936, z=8, stackpos=2}).uid,1)
doSendMagicEffect({x=1225, y=936, z=8, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
function removeTeleportInHellgorakWard()
if getThingfromPos({x=244, y=959, z=4, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=244, y=959, z=4, stackpos=2}).uid,1)
doSendMagicEffect({x=244, y=959, z=4, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
function removeTeleportInMadarethWard()
if getThingfromPos({x=345, y=1017, z=7, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=345, y=1017, z=7, stackpos=2}).uid,1)
doSendMagicEffect({x=345, y=1017, z=7, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
function removeTeleportInZuguroshWard()
if getThingfromPos({x=509, y=1190, z=7, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=509, y=1190, z=7, stackpos=2}).uid,1)
doSendMagicEffect({x=509, y=1190, z=7, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
function removeTeleportInBrothersWard()
if getThingfromPos({x=219, y=1041, z=7, stackpos=1}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=219, y=1041, z=7, stackpos=1}).uid,1)
doSendMagicEffect({x=219, y=1041, z=7, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/login.lua
luaRegisterCreatureEvent(). Creature not found
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "inquisitionPortals")
local creaturename = getCreatureName(cid)
--- positions where the teleports will be created:
local azerus_in_pos = {x=961, y=926, z=9, stackpos=2}
--- positions where the teleports will be teleported you:
local azerus_to_pos = {x=1063, y=1008, z=8, stackpos=1}
local time_to_pass = 180 -- in seconds
local tpID = 1387
local doEffect = CONST_ME_TELEPORT
local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear"
if creaturename == 'Azerus' then
teleport = doCreateTeleport(tpID, azerus_to_pos, azerus_in_pos)
doSendMagicEffect(azerus_in_pos, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInAzerus, time_to_pass * 1000)
end
end
function removeTeleportInAzerus()
if getThingfromPos({x=961, y=926, z=9, stackpos=2}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=961, y=926, z=9, stackpos=2}).uid,1)
doSendMagicEffect({x=961, y=926, z=9, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
registerCreatureEvent(cid, "Ushuriel")
<event type="death" name="Ushuriel" event="script" value="Ushuriel.lua"/>
function onDeath(cid, Killer)
registerCreatureEvent(cid, "Ushuriel")
local creaturename = getCreatureName(cid)
if isMonster(cid) == TRUE then
if creaturename ~= Ushuriel then
setGlobalStorageValue(45001, 1)
doCreatureSay(cid, "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during this time or you have to kill the boss again.", TALKTYPE_ORANGE_1)
addEvent(setGlobalStorageValue, 180000, 45001, -1)
end
end
end
<movevent type="StepIn" actionid="45001" event="script" value="Ushuriel.lua" />
function onStepIn(cid, item, frompos, item2, topos)
success = {x=33069, y=31782, z=13}
faliure = {x=33168, y=31712, z=14}
status = getGlobalStorageValue(cid, 45001)
if item.actionid == 45001 then
if status == 1 then
if isPlayer(cid) == TRUE then
doTeleportThing(cid, success)
setPlayerStorageValue(cid, 45001, 1)
doSendMagicEffect(success, CONST_ME_ENERGYAREA)
end
else
if isPlayer(cid) == TRUE then
doTeleportThing(cid, faliure)
doSendMagicEffect(faliure, CONST_ME_ENERGYAREA)
end
end
end
return TRUE
end
local config = {
message = "Go into the teleporter in 3 minutes, else it will disappear.",
timeToRemove = 180, -- seconds
teleportId = 1387,
bosses = {
["Morgaroth"] = { x = 1932, y = 645, z = 4 },
["Ghazbaran"] = { x = 1932, y = 645, z = 4 },
["Zoralurk"] = { x = 1932, y = 645, z = 4 }
}
}
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, "trianglePortals")
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
[31/05/2009 18:10:09] Lua Script Error: [CreatureScript Interface]
[31/05/2009 18:10:09] data/creaturescripts/scripts/trianglePortals.lua:onDeath
[31/05/2009 18:10:09] luaGetThingFromPos(). Tile not found
[31/05/2009 18:10:09] Lua Script Error: [CreatureScript Interface]
[31/05/2009 18:10:09] data/creaturescripts/scripts/trianglePortals.lua:onDeath
[31/05/2009 18:10:09] luaDoRemoveItem(). Item not found