Hey, I have script which make TP but i need edit this because i need also actionID of teleport:
I think i have to add action id of teleport after
then add something to
but how?
Code:
local config = {
teleportId = 1387,
bosses = { -- Monster Name, Teleport To Position, Teleport Position
["Ushuriel"] = { { x=1173, y=1141, z=12 }, { x=1097, y=1214, z=12, stackpos=1 } },
["Annihilon"] = { { x=1244, y=1297, z=12 }, { x=1187, y=1198, z=12, stackpos=1 } },
["Hellgorak"] = { { x=1064, y=1308, z=13 }, { x=1192, y=1240, z=12, stackpos=1 } },
["Madareth"] = { { x=1045, y=1206, z=13 }, { x=1112, y=1240, z=12, stackpos=1 } },
["Zugurosh"] = { { x=1128, y=1151, z=12 }, { x=1149, y=1213, z=12, stackpos=1 } },
["Latrivan"] = { { x=1154, y=1195, z=13 }, { x=1147, y=1244, z=12, stackpos=1 } }
}
}
local function removal(position)
if getThingfromPos(position).itemid == config.teleportId then
doRemoveItem(getThingfromPos(position).uid)
end
return TRUE
end
function onKill(cid, target, lastHit)
if lastHit == true then
local position = getCreaturePosition(target)
for name, pos in pairs(config.bosses) do
if name == getCreatureName(target) then
teleport = doCreateTeleport(config.teleportId, pos[1], pos[2])
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, pos[2])
doSendMagicEffect(pos[2], 10)
end
end
end
return TRUE
I think i have to add action id of teleport after
Code:
Teleport Position
Code:
teleport = doCreateTeleport(config.teleportId, pos[1], pos[2])
but how?