Nao uai vamos ver o seu, por que esse ficou tudo em 1 TP sabe? Vou postar, e eu estou precisanndo de um NPC que não acho de jeito nenhum! Depois vou te mostrar.
creaturescripts: No caso está todos com as mesmas POS pois foi só um teste!
local t = {
[{"The Snapper"}] = {y_storage = 996401, x_storage = 65004},
[{"Hide"}] = {y_storage = 996402, x_storage = 65005},
[{"Tiquandas Revenge"}] = {y_storage = 996403, x_storage = 65006},
[{"The Bloodtusk"}] = {y_storage = 996404, x_storage = 65008},
[{"Shardhead"}] = {y_storage = 996405, x_storage = 65009},
[{"Thul"}] = {y_storage = 996406, x_storage = 65011},
[{"Esmeralda"}] = {y_storage = 996407, x_storage = 65016},
[{"The Old Widow"}] = {y_storage = 996408, x_storage = 65017},
[{"The Many"}] = {y_storage = 996409, x_storage = 65018},
[{"Leviathan"}] = {y_storage = 996410, x_storage = 65019},
[{"Stonecracker"}] = {y_storage = 996411, x_storage = 65020},
[{"The Noxious Spawn"}] = {y_storage = 996412, x_storage = 65021},
[{"Merikh The Slaughterer"}] = {y_storage = 996413, x_storage = 65022},
[{"Fahim The Wise"}] = {y_storage = 996414, x_storage = 65023},
[{"Brutus Bloodbeard"}] = {y_storage = 996415, x_storage = 65024},
[{"Demodras"}] = {y_storage = 996416, x_storage = 65025},
[{"The Horned Fox"}] = {y_storage = 996417, x_storage = 65026},
[{"Necropharus"}] = {y_storage = 996418, x_storage = 65027},
[{"Paiz The Pauperizer"}] = {y_storage = 996419, x_storage = 65028},
[{"Kerberos"}] = {y_storage = 996420, x_storage = 65029},
[{"Zanakeph"}] = {y_storage = 996421, x_storage = 65030},
[{"Ethershreck"}] = {y_storage = 996422, x_storage = 65031},
[{"God Of Death"}] = {y_storage = 996423, x_storage = 65032}
}
local teleport_position = {x = 32696, y = 32766, z = 6} -- where player will be sent after killing boss
local function teleport_loop(cid, n)
doCreatureSay(cid, "Teleported out in " .. n .. " seconds!", TALKTYPE_ORANGE_1, cid)
if n > 0 then
addEvent(teleport_loop, 1000, cid, n - 1)
elseif n == 0 then
doTeleportThing(cid, teleport_position)
end
end
function onKill(cid, target, damage, flags)
for v, k in pairs(t) do
local master = getCreatureMaster(target)
if(master and master ~= target) then
return true
end
if(bit.band(flags, 1) == 1 and isMonster(target) and isInArray(v, getCreatureName(target))) then
if getCreatureStorage(cid, k.y_storage) < 1 then
doCreatureSetStorage(cid, k.y_storage, 1)
doCreatureSetStorage(cid, k.x_storage, getCreatureStorage(cid, k.x_storage) + 1)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have defeated " .. getCreatureName(target):lower() .. "!")
addEvent(teleport_loop, 1000, cid, 15)
end
end
return true
end
movements:
local config = {
[1] = {x_storage = 65004, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "The Snapper", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[2] = {x_storage = 65005, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "Hide", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[3] = {x_storage = 65006, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "Tiquandas Revenge", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[4] = {x_storage = 65008, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "The Bloodtusk", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[5] = {x_storage = 65009, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "Shardhead", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[6] = {x_storage = 65011, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "Thul", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[7] = {x_storage = 65016, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "Esmeralda", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[8] = {x_storage = 65017, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "The Old Widow", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[9] = {x_storage = 65018, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "The Many", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[10] = {x_storage = 65019, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "Leviathan", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[11] = {x_storage = 65020, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "Stonecracker", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[12] = {x_storage = 65021, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "The Noxious Spawn", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[13] = {x_storage = 65022, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "Merikh The Slaughterer", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[14] = {x_storage = 65023, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "Fahim The Wise", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[15] = {x_storage = 65024, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "Brutus Bloodbeard", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[16] = {x_storage = 65025, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "Demodras", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[17] = {x_storage = 65026, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "The Horned Fox", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[18] = {x_storage = 65027, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "Necropharus", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[19] = {x_storage = 65028, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "Paiz The Pauperizer", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[20] = {x_storage = 65029, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "Kerberos", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[21] = {x_storage = 65030, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "Zanakeph", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[22] = {x_storage = 65031, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "Ethershreck", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}},
[23] = {x_storage = 65032, x_storage_value = 1, teleport_pos = {x = 32700, y = 32762, z = 7}, boss_name = "God Of Death", boss_position = {x = 32700, y = 32763, z = 7}, boss_chamber_top_left_pos = {x = 32700, y = 32762, z = 7}, boss_chamber_bottom_right_pos = {x = 32703, y = 32764, z = 7}}
}
local condition = createConditionObject(CONDITION_INFIGHT)
setConditionParam(condition, CONDITION_PARAM_TICKS, 5000)
function onStepIn(cid, item, position, fromPosition)
if not isPlayer(cid) then
return true
end
for i = 1, #config do
if getPlayerStorageValue(cid, config[i].x_storage) == config[i].x_storage_value then
local count = 0
local monster = 0
for t = config[i].boss_chamber_top_left_pos.x, config[i].boss_chamber_bottom_right_pos.x do
for f = config[i].boss_chamber_top_left_pos.y, config[i].boss_chamber_bottom_right_pos.y do
for n = config[i].boss_chamber_top_left_pos.z, config[i].boss_chamber_bottom_right_pos.z do
pos = {x = t, y = f, z = n}
pid = getTopCreature(pos).uid
if isPlayer(pid) then
count = count + 1
end
if isMonster(pid) then
monster = pid
end
end
end
end
if count ~= 0 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Someone is currently in " .. config[i].boss_name .. "'s chamber. Please wait awhile.")
doTeleportThing(cid, fromPosition)
doSendMagicEffect(fromPosition, 10)
return true
end
if monster ~= 0 then
doRemoveCreature(monster)
end
doSendMagicEffect(position, 10)
doTeleportThing(cid, config[i].teleport_pos)
doAddCondition(cid, condition)
local delay = 1000
for n = 1, 3 do
addEvent(doSendMagicEffect, delay, config[i].boss_position, 10)
delay = delay + 1000
end
addEvent(doCreateMonster, 4000, config[i].boss_name:lower(), config[i].boss_position)
return true
end
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have any required quests completed to access this portal.")
doTeleportThing(cid, fromPosition)
doSendMagicEffect(fromPosition, 10)
return true
end
Ai é o seguinte, apenas um TP com a actionID, quando o player pisa nele, ele checka qual boss Enviar o player, se tem alguem lá, etc..
Mais tenho certeza que o seu estará melhor que esse, vamos ver o seu!