Kojiiro
Nobody cares. Do yourself.
Helo ! the Inquisition Quest on my server is not functioning normally, before was giving debug when entered on teleport and i managed to straighten, but appeared one other problem in creaturescripts, and i not get straighten.
My server is TFS 0.4 ( 9.52 ) Help me PLEASE !
data\creaturescripts\scripts\InquisitionBoss
My server is TFS 0.4 ( 9.52 ) Help me PLEASE !
data\creaturescripts\scripts\InquisitionBoss
Code:
config = {
timeToRemove = 180, -- seconds
message = "You now have 3 minutes to exit this room through the teleportr. It will bring you to the next room only during this time.",
teleportId = 1387,
bosses = { -- Monster Name, Teleport Position
["Ushuriel"] = { pos={ x=33069, y=31782, z=13, stackpos=2 }, aid=1001 },
["Zugurosh"] = { pos={ x=33372, y=31613, z=14, stackpos=2 }, aid=1002},
["Madareth"] = { pos={ x=33153, y=31782, z=12, stackpos=2 }, aid=1003},
["Annihilon"] = { pos={ x=33199, y=31686, z=12, stackpos=2 }, aid=1005},
["Hellgorak"] = { pos={ x=33110, y=31682, z=12, stackpos=2 }, aid=1006}
},
brothers ={
["Golgordan"] = {pos={ x=33038, y=31753, z=15, stackpos=1 },aid=1004, brother = "Latrivan"},
["Latrivan"] = {pos={ x=33038, y=31753, z=15, stackpos=1 },aid=1004, brother = "Golgordan"},
brothersArea ={
fromPos = {x = 33224, y = 31722, z = 11},
toPos = {x = 33240, y = 31734, z = 11} } }
}
local function change(position)
doItemSetAttribute(getTileItemById(position, config.teleportId).uid, "aid", 3000)
return TRUE
end
function onDeath(cid, corpse, deathList)
if(monsters[getCreatureName(target)]) then
local t = monsters[getCreatureName(target)]
doCreateTeleport(1387, t.toPos, t.teleportPos)
doSendMagicEffect(t.teleportPos, CONST_ME_POFF)
doCreatureSay(cid, "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", TALKTYPE_MONSTER, getCreaturePosition(target))
addEvent(doRemoveTeleport, time * 1000, t.teleportPos)
elseif(brothers[getCreatureName(target)]) then
t = brothers[getCreatureName(target)]
local brother = getCreatureByName(t.brother)
if(isMonster(brother) == true) then
if(isInRange(getCreaturePosition(brother), brothers.brothersArea.fromPos, brothers.brothersArea.toPos) == true) then
return true
else
doCreateTeleport(1387, t.toPos, t.teleportPos)
doSendMagicEffect(t.teleportPos, CONST_ME_POFF)
doCreatureSay(cid, "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", TALKTYPE_MONSTER, getCreaturePosition(target))
addEvent(doRemoveTeleport, time * 1000, t.teleportPos)
end
end
end
return true
end
function doRemoveTeleport(position)
if(getTileThingByPos(position).itemid > 0) then
doRemoveItem(getTileThingByPos(position).uid)
doSendMagicEffect(position, CONST_ME_POFF)
end
end