- 0
1 resposta a esta questão
Recommended Posts
Este tópico está impedido de receber novos posts.
Entre para seguir isso
Seguidores
0
-
Quem Está Navegando 0 membros estão online
Nenhum usuário registrado visualizando esta página.
Antes de fazer a sua pergunta, tenha certeza de ter lido as regras da seção e o guia abaixo:
https://forums.otserv.com.br/index.php?/forums/topic/168583-regras-da-seção/
https://forums.otserv.com.br/index.php?/forums/topic/165121-como-fazer-uma-pergunta-ou-o-grande-guia-do-usuário-com-dúvidas/
Obs: não delete esse formulário pré-definido, preencha-o corretamente para postar o seu tópico!
Descreva em algumas palavras a base utilizada. (Nome do servidor / Nome do cliente / Nome do website / etc.).
Base:
OTServBR-Global 12.x
Qual é a sua pergunta?
Olá! Estou tendo alguns problemas ao tentar criar um script de alavanca para o Boss King Zelos. Procurei em vários fórum alguns scripts e nenhum funcionou.
Atualmente estou usando como base esse Script:
otservbr-global/3-urmahlullu-the-immaculate.lua at 30304137ec82749dd024524e405bd8cc00e443ae · opentibiabr/otservbr-global · GitHub
E esse post feito aqui:
OTServ Brasil - O seu Portal para o mundo OTServ!
Fiz as modificações e que achei que deveria fazer e nada deu certo. Se alguém ai puder me dizer o que fiz de errado agradeço muito!!!
Segue meu script que fiz:
Desde já agradeço a quem puder ajudar!
OBS: A ideia é bem simples, 1-10 jogadores podem entrar na sala do boss e e enfrenta-lo, logo após isso somente depois de 20 horas poderão enfrentar novamente,
Você tem o código disponível? Se tiver poste-o na caixa de código que está dentro do spoiler abaixo:
-- lever to king zelos room
local config = {
requiredLevel = 450,
daily = false,
centerZelosRoomPosition = Position(33443, 31542, 13),
playerPositions = {
Position(33485, 31548, 13),
Position(33486, 31548, 13),
Position(33485, 31547, 13),
Position(33486, 31547, 13),
Position(33485, 31546, 13),
Position(33486, 31546, 13),
Position(33485, 31545, 13),
Position(33486, 31545, 13),
Position(33485, 31544, 13),
Position(33486, 31544, 13),
},
newPositions = {
Position(33443, 31542, 13),
},
zelosPosition = {
Position(33443, 31546, 13),
},
firstPlayer = {
Position(33485, 31546, 13),
}
}
local leverboss = Action()
function leverboss.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if item.itemid == 9825 then
local storePlayers, playerTile = {}
for i = 1, #config.playerPositions do
playerTile = Tile(config.firstPlayer):getTopCreature()
if not playerTile or not playerTile:isPlayer() then
player:sendTextMessage(MESSAGE_STATUS_SMALL, "You need 5 players.")
return true
end
if playerTile:getLevel() < config.requiredLevel then
player:sendTextMessage(MESSAGE_STATUS_SMALL,
"All the players need to be level ".. config.requiredLevel .." or higher.")
return true
end
if config.daily and playerTile:getStorageValue(Storage.King.ZelosTimer) > os.time() then
player:getPosition():sendMagicEffect(CONST_ME_POFF)
player:sendCancelMessage('All players are not still ready from last battle yet.')
return true
end
storePlayers[#storePlayers + 1] = playerTile
end
local specs, spec = Game.getSpectators(config.centerZelosRoomPosition, false, false, 14, 14, 13, 13)
for i = 1, #specs do
spec = specs
if spec:isPlayer() then
player:sendTextMessage(MESSAGE_STATUS_SMALL, "A team is already inside the quest room.")
return true
end
spec:remove()
end
if player:getPosition()~=config.firstPlayer[1] then
player:sendTextMessage(MESSAGE_STATUS_SMALL, "You can't start a battle.")
return true
end
for i = 1, #config.zelosPosition do
Game.createMonster("King Zelos", config.zelosPosition)
end
local players
for i = 1, #storePlayers do
players = storePlayers
config.playerPositions:sendMagicEffect(CONST_ME_POFF)
players:teleportTo(config.newPositions[1])
config.newPositions[1]:sendMagicEffect(CONST_ME_ENERGYAREA)
players:setDirection(DIRECTION_EAST)
end
player:setStorageValue(Storage.King.ZelosTimer, os.time()+20*60*60) -- 20 hours
end
item:transform(9825)
return true
end
leverboss:uid(47521)
leverboss:register()
Você tem alguma imagem que possa auxiliar no problema? Se sim, anexe-a dentro do spoiler abaixo:
Compartilhar este post
Link para o post
Compartilhar em outros sites