It works perfect for me, ty
How did you ? could you send pm!
It works perfect for me, ty
local config = {
message = "Go into the teleporter in 3 minutes, else it will disappear.",
timeToRemove = 180, -- seconds
teleportId = 1387,
[B] actionId = {
["ushuriel"] = 41610,
["zugurosh"] = 41611,
["madareth"] = 41612,
["latrivan"] = 41613,
["annihilion"] = 41614,
["hellgorak"] = 41615
},[/B]
bosses = { -- Monster Name, Teleport To Position, Teleport Position
["ushuriel"] = { { x = 1178, y = 1142, z = 5 }, { x = 1119, y = 1219, z = 5, stackpos = 1 } },
["annihilion"] = { { x = 1251, y = 1301, z = 5 }, { x = 1192, y = 1204, z = 5, stackpos = 1 } },
["hellgorak"] = { { x = 1070, y = 1313, z = 6 }, { x = 1197, y = 1246, z = 5, stackpos = 1 } },
["madareth"] = { { x = 1050, y = 1209, z = 6 }, { x = 1117, y = 1246, z = 5, stackpos = 1 } },
["zugurosh"] = { { x = 1133, y = 1156, z = 5 }, { x = 1153, y = 1218, z = 5, stackpos = 1 } },
["latrivan"] = { { x = 1157, y = 1200, z = 6 }, { x = 1152, y = 1250, z = 5, stackpos = 1 } }
}
}
local function removal(position)
if getThingfromPos(position).itemid == config.teleportId then
doRemoveItem(getThingfromPos(position).uid)
end
return TRUE
end
function onDeath(cid, corpse, killer)
local position = getCreaturePosition(cid)
for name, pos in pairs(config.bosses) do
if name == getCreatureName(cid) then
teleport = doCreateTeleport(config.teleportId, pos[1], pos[2])
[B]doSetItemActionId(teleport,config.actionId)[/B]
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, pos[2])
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 = { -- Monster Name, Teleport To Position, Teleport Position, Action ID
["ushuriel"] = { { x = 1178, y = 1142, z = 5 }, { x = 1119, y = 1219, z = 5, stackpos = 1 }, 41610 },
["annihilion"] = { { x = 1251, y = 1301, z = 5 }, { x = 1192, y = 1204, z = 5, stackpos = 1 }, 41611 },
["hellgorak"] = { { x = 1070, y = 1313, z = 6 }, { x = 1197, y = 1246, z = 5, stackpos = 1 }, 41612 },
["madareth"] = { { x = 1050, y = 1209, z = 6 }, { x = 1117, y = 1246, z = 5, stackpos = 1 }, 41613 },
["zugurosh"] = { { x = 1133, y = 1156, z = 5 }, { x = 1153, y = 1218, z = 5, stackpos = 1 }, 41614 },
["latrivan"] = { { x = 1157, y = 1200, z = 6 }, { x = 1152, y = 1250, z = 5, stackpos = 1 }, 41615 }
}
}
local function removal(position)
if getThingfromPos(position).itemid == config.teleportId then
doRemoveItem(getThingfromPos(position).uid)
end
return TRUE
end
function onDeath(cid, corpse, killer)
local position = getCreaturePosition(cid)
for name, pos in pairs(config.bosses) do
if name == getCreatureName(cid) then
teleport = doCreateTeleport(config.teleportId, pos[1], pos[2])
doSetItemActionId(teleport, pos[3])
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, pos[2])
end
end
return TRUE
end
yep work for me too, i úsed a another script before the one frmo christiandb ^^ thats why its not worked.
function onDeath(cid, corpse, killer)
local position = getCreaturePosition(cid)
for name, pos in pairs(config.bosses) do
if name == getCreatureName(cid) then
teleport = doCreateTeleport(config.teleportId, pos[1], pos[2])
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, pos[2])
if "Annihilon" == getCreatureName(cid) then
setPlayerStorageValue(killer, 10000,1)
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 = { -- Monster Name, Teleport To Position, Teleport Position
["Ushuriel"] = { { x = 222, y = 564, z = 6 }, { x = 218, y = 564, z = 6, stackpos = 1 }, 12345 },
["Annihilion"] = { { x = 276, y = 1045, z = 6 }, { x = 218, y = 564, z = 6, stackpos = 1 }, 123456 },
["Hellgorak"] = { { x = 169, y = 1047, z = 6 }, { x = 218, y = 564, z = 6, stackpos = 1 }, 1234567 },
["Madareth"] = { { x = 416, y = 1017, z = 6 }, { x = 218, y = 564, z = 6, stackpos = 1 }, 12345678 },
["Zugurosh"] = { { x = 424, y = 1119, z = 7 }, { x = 218, y = 564, z = 6, stackpos = 1 }, 123456789 },
["Latrivan"] = { { x = 46, y = 1109, z = 7 }, { x = 218, y = 564, z = 6, stackpos = 1 }, 1234567890 }
}
}
local function removal(position)
if getThingfromPos(position).itemid == config.teleportId then
doRemoveItem(getThingfromPos(position).uid)
end
return TRUE
end
function onDeath(cid, corpse, killer)
local position = getCreaturePosition(cid)
for name, pos in pairs(config.bosses) do
if name == getCreatureName(cid) then
teleport = doCreateTeleport(config.teleportId, pos[1], pos[2])
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
setStorageValue(killer, pos[3])
addEvent(removal, config.timeToRemove * 1000, pos[2])
end
end
return TRUE
end
["Ushuriel"] = { { x = 222, y = 564, z = 6 }, { x = 218, y = 564, z = 6, stackpos = 1 }, 12345 },
#UP
Code:local config = { message = "Go into the teleporter in 3 minutes, else it will disappear.", timeToRemove = 180, -- seconds teleportId = 1387, bosses = { -- Monster Name, Teleport To Position, Teleport Position ["Ushuriel"] = { { x = 222, y = 564, z = 6 }, { x = 218, y = 564, z = 6, stackpos = 1 }, 12345 }, ["Annihilion"] = { { x = 276, y = 1045, z = 6 }, { x = 218, y = 564, z = 6, stackpos = 1 }, 123456 }, ["Hellgorak"] = { { x = 169, y = 1047, z = 6 }, { x = 218, y = 564, z = 6, stackpos = 1 }, 1234567 }, ["Madareth"] = { { x = 416, y = 1017, z = 6 }, { x = 218, y = 564, z = 6, stackpos = 1 }, 12345678 }, ["Zugurosh"] = { { x = 424, y = 1119, z = 7 }, { x = 218, y = 564, z = 6, stackpos = 1 }, 123456789 }, ["Latrivan"] = { { x = 46, y = 1109, z = 7 }, { x = 218, y = 564, z = 6, stackpos = 1 }, 1234567890 } } } local function removal(position) if getThingfromPos(position).itemid == config.teleportId then doRemoveItem(getThingfromPos(position).uid) end return TRUE end function onDeath(cid, corpse, killer) local position = getCreaturePosition(cid) for name, pos in pairs(config.bosses) do if name == getCreatureName(cid) then teleport = doCreateTeleport(config.teleportId, pos[1], pos[2]) doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1) setStorageValue(killer, pos[3]) addEvent(removal, config.timeToRemove * 1000, pos[2]) end end return TRUE end
It should be works
setPlayerStorageValue(cid, pos[3])
Use:
Code:setPlayerStorageValue(cid, pos[3])