- Awards
- 8
Buenas noches, estoy trabajando con el hellgrave 12.72.
me parece un mapa genial el cual se nota las ganas que le han puesto por editarlo, y decidi tambien agregarle algunas modificaciones y nuevas zonas.
- quisiera saber si hay alguna forma de agregar zonas en la cual los summons ya sean por el spells "utevo res" o familiares no puedan ingresar ni ser invocados.
- esto es debido a que he intentado con varios scripts y cuando hay summons en la parte de las palancas salta error en la consola.
- lo otro es que cuando entran grupos de 2 o mas player. solo se le agrega cooldown de bosses al que tiro la palanca a los demas que participan pueden volver a intentarlo y hacer que el que ya la tiro, pueda volver a entrar.
me pasa con todos los bosses de palancas quisiera saber si alguien tiene alguna solucion o alguna mejor idea.
pasa con todos los bosses y quisiera saber si es posible repararlo, y que le cuente a todos los que entren al boss el cd.
me parece un mapa genial el cual se nota las ganas que le han puesto por editarlo, y decidi tambien agregarle algunas modificaciones y nuevas zonas.
- quisiera saber si hay alguna forma de agregar zonas en la cual los summons ya sean por el spells "utevo res" o familiares no puedan ingresar ni ser invocados.
- esto es debido a que he intentado con varios scripts y cuando hay summons en la parte de las palancas salta error en la consola.
- lo otro es que cuando entran grupos de 2 o mas player. solo se le agrega cooldown de bosses al que tiro la palanca a los demas que participan pueden volver a intentarlo y hacer que el que ya la tiro, pueda volver a entrar.
me pasa con todos los bosses de palancas quisiera saber si alguien tiene alguna solucion o alguna mejor idea.
Código:
local config = {
cooldown = 60 * 60 * 24, -- in seconds - (Make it 'seconds * minutes * hours' - its will be '60 * 60 * 20' for 20 hours) (player cooldown)
cooldown_storage = 811307,
duration = 10, -- time till reset, in minutes (lever cooldown)
level_req = 100, -- minimum level to do quest
min_players = 1, -- minimum players to join quest
lever_id = 1945, -- id of lever before pulled
pulled_id = 1946, -- id of lever after pulled
}
local player_positions = {
[1] = {fromPos = Position(32211, 32272, 6), toPos = Position(31940, 31935, 7)},
[2] = {fromPos = Position(32212, 32272, 6), toPos = Position(31941, 31935, 7)},
[3] = {fromPos = Position(32213, 32272, 6), toPos = Position(31942, 31935, 7)},
[4] = {fromPos = Position(32214, 32272, 6), toPos = Position(31943, 31936, 7)}
}
local monsters = {
[1] = {pos = Position(31937, 31941, 7), name = "Dragon Lord"},
[2] = {pos = Position(31941, 31944, 7), name = "Dragon"},
[3] = {pos = Position(31945, 31942, 7), name = "Dragon"}
}
local quest_range = {fromPos = Position(31934, 31941, 7), toPos = Position(31950, 31950, 7)}
local exit_position = Position(32215, 32268, 6) -- Position completely outside the quest area
local fireArena = Action()
function doResetTheBossDukeKrule(position, cid_array)
local tile = Tile(position)
local item = tile and tile:getItemById(config.pulled_id)
if not item then
return
end
local monster_names = {}
for key, value in pairs(monsters) do
if not isInArray(monster_names, value.name) then
monster_names[#monster_names + 1] = value.name
end
end
for i = 1, #monsters do
local creatures = Tile(monsters.pos):getCreatures()
for key, creature in pairs(creatures) do
if isInArray(monster_names, creature:getName()) then
creature:remove()
end
end
end
for i = 1, #player_positions do
local creatures = Tile(player_positions.toPos):getCreatures()
for key, creature in pairs(creatures) do
if isInArray(monster_names, creature:getName()) then
creature:remove()
end
end
end
for key, cid in pairs(cid_array) do
local participant = Player(cid)
if participant and isInRange(participant:getPosition(), quest_range.fromPos, quest_range.toPos) then
participant:teleportTo(exit_position)
exit_position:sendMagicEffect(CONST_ME_TELEPORT)
end
end
item:transform(config.lever_id)
end
local function removeBoss()
local specs, spec = Game.getSpectators(Position(33919, 31646, 8), false, false, 18, 18, 18, 18) -- Do not change
for j = 1, #specs do
spec = specs[j]
if spec:getName():lower() == 'Dragon lord' then
spec:remove()
end
end
end
function fireArena.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if player:getStorageValue(config.cooldown_storage) >= os.time() then
player:sendTextMessage(MESSAGE_INFO_DESCR, "Try Again in 24 Hours.")
return true
end
local participants, pull_player = {}, false
for i = 1, #player_positions do
local fromPos = player_positions.fromPos
local tile = Tile(fromPos)
if not tile then
print(">> ERROR: Arena Fire tile does not exist for Position(" .. fromPos.x .. ", " .. fromPos.y .. ", " .. fromPos.z .. ").")
return player:sendCancelMessage("There is an issue with this quest. Please contact an administrator.")
end
local creature = tile:getBottomCreature()
if creature then
local participant = creature:getPlayer()
if not participant then
return player:sendCancelMessage(participant:getName() .. " is not a valid participant.")
end
if participant:getLevel() < config.level_req then
return player:sendCancelMessage(participant:getName() .. " is not the required level.")
end
if participant.uid == player.uid then
pull_player = true
end
participants[#participants + 1] = {participant = participant, toPos = player_positions.toPos}
end
end
if #participants < config.min_players then
return player:sendCancelMessage("You do not have the required amount of participants.")
end
if not pull_player then
return player:sendCancelMessage("You are in the wrong position.")
end
for i = 1, #monsters do
local toPos = monsters.pos
if not Tile(toPos) then
print(">> ERROR: Arena Fire tile does not exist for Position(" .. toPos.x .. ", " .. toPos.y .. ", " .. toPos.z .. ").")
return player:sendCancelMessage("There is an issue with this quest. Please contact an administrator.")
end
removeBoss()
Game.createMonster(monsters.name, monsters.pos, false, true)
end
local cid_array = {}
for i = 1, #participants do
participants.participant:teleportTo(participants.toPos)
participants.toPos:sendMagicEffect(CONST_ME_TELEPORT)
cid_array[#cid_array + 1] = participants.participant.uid
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have 20 minutes to kill and loot all monsters. Otherwise you will lose that chance and will be kicked out.")
end
item:transform(config.pulled_id)
player:setStorageValue(config.cooldown_storage, os.time() + config.cooldown)
addEvent(doResetTheBossDukeKrule, config.duration * 20 * 60000, toPosition, cid_array)
return true
end
fireArena:uid(41383)
fireArena:register()
pasa con todos los bosses y quisiera saber si es posible repararlo, y que le cuente a todos los que entren al boss el cd.
Última edición por un moderador: