Jump to content

Question

Adicionei um sistema de teleports da inquisition. Mas quando eu tento matar qualquer outro monstro que não seja os bosses da inqui (Annihilon, Hellgorak etc), ele não morre e da um erro persistente:

 

http://imageshack.us/photo/my-images/16/errofl.png/

 

 

O Script

 

 

local config = {

timeToRemove = 180, -- segundos

message = "Go into the teleport in 180 seconds, else it will disappear.",

teleportId = 9773,

bosses = { -- Nome do monstro, Posicao do teleporte

["Ushuriel"] = { pos={x=1294, y=705, z=15, stackpos=1}, aid=11001 },

["Zugurosh"] = { pos={x=1328, y=704, z=15, stackpos=1}, aid=11002},

["Madareth"] = { pos={x=1291, y=731, z=15, stackpos=1}, aid=11003},

["Annihilon"] = { pos={x=1366, y=689, z=15, stackpos=1}, aid=11005},

["Hellgorak"] = { pos={x=1371, y=731, z=15 , stackpos=1}, aid=11006},

["Latrivan"] = {pos={x=1326, y=735, z=15, stackpos=1},aid=11004}

 

} }

local function change(position)

doItemSetAttribute(getTileItemById(position, config.teleportId).uid, "aid", 3000)

return TRUE

end

 

function onKill(cid, target, lastHit)

if(config.bosses[getCreatureName(target)]) then

local t = config.bosses[getCreatureName(target)]

local position = t.pos

doItemSetAttribute(getTileItemById(position, config.teleportId).uid, "aid", t.aid)

doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)

addEvent(change, config.timeToRemove * 1000, position)

return TRUE

 

else

local position = t.pos

doItemSetAttribute(getTileItemById(position, config.teleportId).uid, "aid", t.aid)

doItemSetAttribute(teleport, "aid", t.aid)

doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)

addEvent(removal, config.timeToRemove * 1000, position)

end

end

return TRUE

 

Alguem pode me ajudar ?

Obrigado !

2 answers to this question

Recommended Posts

  • 0
local config = {
timeToRemove = 180, -- segundos
message = "Go into the teleport in 180 seconds, else it will disappear.",
teleportId = 9773,
bosses = { -- Nome do monstro, Posicao do teleporte
["Ushuriel"] = { pos={x=1294, y=705, z=15, stackpos=1}, aid=11001 },
["Zugurosh"] = { pos={x=1328, y=704, z=15, stackpos=1}, aid=11002},
["Madareth"] = { pos={x=1291, y=731, z=15, stackpos=1}, aid=11003},
["Annihilon"] = { pos={x=1366, y=689, z=15, stackpos=1}, aid=11005},
["Hellgorak"] = { pos={x=1371, y=731, z=15 , stackpos=1}, aid=11006},
["Latrivan"] = {pos={x=1326, y=735, z=15, stackpos=1},aid=11004}

} }

local function change(position)
   doItemSetAttribute(getTileItemById(position, config.teleportId).uid, "aid", 3000)
return TRUE
end

function onKill(cid, target, lastHit)

local t = config.bosses[getCreatureName(target)]
local position = t.pos

if(config.bosses[getCreatureName(target)]) then
   doItemSetAttribute(getTileItemById(position, config.teleportId).uid, "aid", t.aid)
   doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
   addEvent(change, config.timeToRemove * 1000, position)
return TRUE
else
   doItemSetAttribute(getTileItemById(position, config.teleportId).uid, "aid", t.aid)
   doItemSetAttribute(teleport, "aid", t.aid)
   doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
   addEvent(removal, config.timeToRemove * 1000, position)
end

return TRUE
end

Guest
This topic is now closed to further replies.
×
×
  • Create New...