Ir para conteúdo
Entre para seguir isso  
Roku

Invasao de TODOS os Bosses

Recommended Posts

Roku    0
Roku

[spoiler=VERSÃO ANTIGA]

Nome: All Boss invasion

Autor: Roku

Versão Testada: Nao foi testada. Deve funcionar em 8.1+

 

Informações Adicionais

Um script de invasão de Bosses, para quem esta casando de fazer mais de 10 raids

para ter todos os boss separados em diversas invasoes, esse resolve seu problema.

Tem TODOS os bosses Archdemons (Mogaroth, Orshabaal, etc.)

Use com:

/invasion NOMEDOMONSTRO

Primeiro lugar, lembrando que é desnecessário qualquer post com agradecimento. Existe script de invasao por talkaction, mas esse é diferente.

Se tiver algum erro (Provavelmente terá) por favor avise.

Sim, o script é grande, mas te poupa de fazer VARIOS arquivos .xml de raid, e isso poupa espaço e tempo.

Vamos ao script:

Vá na pasta TalkActions e crie um arquivo com extensão .lua e o de um nome de bossraid.lua

 

Agora abra ele e cole o seguinte script:

local pos = {
['OrshabaalPOS'] = {x=X, y=Y, z=Z},
['ZuguroshPOS'] = {x=X, y=Y, z=Z},
['MorgarothPOS'] = {x=X, y=Y, z=Z},
['GolgordanPOS'] = {x=X, y=Y, z=Z},
['ApocalypsePOS'] = {x=X, y=Y, z=Z},
['GhazbaranPOS'] = {x=X, y=Y, z=Z},
['HellgorakPOS'] = {x=X, y=Y, z=Z},
['LatrivanPOS'] = {x=X, y=Y, z=Z},
['BazirPOS'] = {x=X, y=Y, z=Z},
['MadarethPOS'] = {x=X, y=Y, z=Z},
['UshurielPOS'] = {x=X, y=Y, z=Z},
['AnnihilonPOS'] = {x=X, y=Y, z=Z},
['InfernatilPOS'] = {x=X, y=Y, z=Z},
}

function onSay(cid, words, param)
if getPlayerAccess(cid) >= 3 and words == '/invasion' and param == '' then
doPlayerSendTextMessage(cid, 22, 'You must choose a monster.')
return TRUE
end
if getPlayerAccess(cid) >= 3 and words == '/invasion' and param == 'Orshabaal' then
doSummonCreature('Orshabaal', OrshabaalPOS)
doPlayerSendTextMessage(cid, 22, 'You sumon Orshabaal.')
doBroadcastMessage(cid, 12, 'Be careful! Orshabaal invaded the city!')

elseif getPlayerAccess(cid) >= 3 and words == '/invasion' and param == 'Zugurosh' then
doSummonCreature('Zugurosh', ZuguroshPOS)
doPlayerSendTextMessage(cid, 22, 'You sumon Zugurosh.')
doBroadcastMessage(cid, 12, 'Be careful! Zugurosh invaded the city!')

elseif getPlayerAccess(cid) >= 3 and words == '/invasion' and param == 'Morgaroth' then
doSummonCreature('Morgaroth', MorgarothPOS)
doPlayerSendTextMessage(cid, 22, 'You sumon Morgaroth.')
doBroadcastMessage(cid, 12, 'Be careful! Morgaroth invaded the city!')

elseif getPlayerAccess(cid) >= 3 and words == '/invasion' and param == 'Golgordan' then
doSummonCreature('Golgordan', GolgordanPOS)
doPlayerSendTextMessage(cid, 22, 'You sumon Golgordan.')
doBroadcastMessage(cid, 12, 'Be careful! Golgordan invaded the city!')

elseif getPlayerAccess(cid) >= 3 and words == '/invasion' and param == 'Apocalypse' then
doSummonCreature('Apocalypse', ApocalypsePOS)
doPlayerSendTextMessage(cid, 22, 'You sumon Apocalypse.')
doBroadcastMessage(cid, 12, 'Be careful! Apocalypse invaded the city!')

elseif getPlayerAccess(cid) >= 3 and words == '/invasion' and param == 'Ghazbaran' then
doSummonCreature('Ghazbaran', GhazbaranPOS)
doPlayerSendTextMessage(cid, 22, 'You sumon Ghazbaran.')
doBroadcastMessage(cid, 12, 'Be careful! Ghazbaran invaded the city!') 

elseif getPlayerAccess(cid) >= 3 and words == '/invasion' and param == 'Hellgorak' then
doSummonCreature('Hellgorak', HellgorakPOS)
doPlayerSendTextMessage(cid, 22, 'You sumon Hellgorak.')
doBroadcastMessage(cid, 12, 'Be careful! Hellgorak invaded the city!') 

elseif getPlayerAccess(cid) >= 3 and words == '/invasion' and param == 'Latrivan' then
doSummonCreature('Latrivan', LatrivanPOS)
doPlayerSendTextMessage(cid, 22, 'You sumon Latrivan.')
doBroadcastMessage(cid, 12, 'Be careful! Latrivan invaded the city!') 

elseif getPlayerAccess(cid) >= 3 and words == '/invasion' and param == 'Bazir' then
doSummonCreature('Bazir', BazirPOS)
doPlayerSendTextMessage(cid, 22, 'You sumon Bazir.')
doBroadcastMessage(cid, 12, 'Be careful! Bazir invaded the city!')

elseif getPlayerAccess(cid) >= 3 and words == '/invasion' and param == 'Madareth' then
doSummonCreature('Madareth', MadarethPOS)
doPlayerSendTextMessage(cid, 22, 'You sumon Madareth.')
doBroadcastMessage(cid, 12, 'Be careful! Madareth invaded the city!')

elseif getPlayerAccess(cid) >= 3 and words == '/invasion' and param == 'Ushuriel' then
doSummonCreature('Ushuriel', UshurielPOS)
doPlayerSendTextMessage(cid, 22, 'You sumon Ushuriel.')
doBroadcastMessage(cid, 12, 'Be careful! Ushuriel invaded the city!')

elseif getPlayerAccess(cid) >= 3 and words == '/invasion' and param == 'Annihilon' then
doSummonCreature('Annihilon', AnnihilonPOS)
doPlayerSendTextMessage(cid, 22, 'You sumon Annihilon.')
doBroadcastMessage(cid, 12, 'Be careful! Annihilon invaded the city!')

elseif getPlayerAccess(cid) >= 3 and words == '/invasion' and param == 'Infernatil' then
doSummonCreature('Infernatil', InfernatilPOS)
doPlayerSendTextMessage(cid, 22, 'You sumon Infernatil.')
doBroadcastMessage(cid, 12, 'Be careful! Infernatil invaded the city!')
return TRUE
end
end

No começo do script onde tem o seguinte trecho:

local types = {

['OrshabaalPOS'] = {x=X, y=Y, z=Z},

['ZuguroshPOS'] = {x=X, y=Y, z=Z},

['MorgarothPOS'] = {x=X, y=Y, z=Z},

['GolgordanPOS'] = {x=X, y=Y, z=Z},

['ApocalypsePOS'] = {x=X, y=Y, z=Z},

['GhazbaranPOS'] = {x=X, y=Y, z=Z},

['HellgorakPOS'] = {x=X, y=Y, z=Z},

['LatrivanPOS'] = {x=X, y=Y, z=Z},

['BazirPOS'] = {x=X, y=Y, z=Z},

['MadarethPOS'] = {x=X, y=Y, z=Z},

['UshurielPOS'] = {x=X, y=Y, z=Z},

['AnnihilonPOS'] = {x=X, y=Y, z=Z},

['InfernatilPOS'] = {x=X, y=Y, z=Z},

}

As posições onde tem X, Y e Z devem ser configuradas a seu gosto, cada montro sera sumonado nela.

Ex: ['BazirPOS'] = {x=20, y=57, z=7}

Isso quer dizer que se usar o comando para sumonar Bazir, ele apareçera na posição 20, 57, 7.

 

 

 

Depois disso vá em talkactions.xml e adione esta tag:

<talkaction words="/invasion" event="script" value="bossraid.lua"/>
Agora é so entrar no seu servidor e se divertir!

 

 

Versão 2.0.0

 

Depois de muita preguiça e aprendizado, resolvi refazer o script.

 

As principais mudanças são:

 

• O Script, que antes tinha 88 linhas, não funcionava e poderia causar brechas, agora foi reduzido para 14 linhas com total garantia de funcionabilidade e segurança.

 

• Não é mais invasão de boss, é de qualquer bixo. Então agora é uma espécie de invasão específica.

 

• Posições na fala, decididas na hora, para nao ter que mudar, salvar, reloadar, etc.

 

MODO DE USAR:

/invasion Monstername, posX, posY, posZ, Broadcast Msg

Script:

 

--[[ Summon boss 
V 2.0.0
Developed by Roku]]
function onSay(cid, words, param)
if getPlayerAccess(cid) < 4 then return FALSE end
if (param == "") then return doPlayerSendCancel("Sorry, not possible.") and FALSE
end
       local param = string.explode(param, ",")
                        if (not isMonster(getCreatureByName(param[1]))) then return doPlayerSendCancel(cid, "Not monster.") end
          if (param[1] and param[2] and param[3] and param[4] and param[5]) then
           pos = {x=tonumber(param[2]), y=tonumber(param[3]),z=tonumber(param[4])}
       doCreateMonster(tostring(param[1]), pos)
       doBroadcastMessage(tostring(param[5]), 22)
       return doShowTextDialog(cid, 2355, "Hello, "..getCreatureName(cid).."!\nYou have summoned the monster "..param[1].." at the position "..pos.x.." | "..pos.y.." | "..pos.z..", at "..os.date()..".\nAnd broadcasted message: "..param[5].."\nGraciously, Roku.") and TRUE 
  end
       return FALSE
end

 

É so adicionar nas talks:

<talkaction words="/invasion" value="[b]bossraid[/b].lua"/>

O script deverá estar salvo com este nome.

 

Exemplo de uso:

/invasion Morgaroth, 178, 36, 8, The people have seen the Morgaroth at the Caves!
Na posição aparecerá o boss:

morg.png

(A mensagem será branca)

 

E para você aparecerá isto:

smsg.png

 

Aproveitem ;)

SE GOSTOU POR FAVOR CLIQUE NO BOTÃO THANKS NO FINAL DO POST.

Editado por Black Ice

Compartilhar este post


Link para o post
Gpwjhlkdcf    21
Gpwjhlkdcf

Você poderia ter usado as tables sem aquele POS no final do nome do monstro, e com isso tirar aquela montanha desnecessária de IFs, além disso, possibilitaria você adicionar qualquer monstro novo em uma linha.

 

Enfim, o script está fora de CODE, por favor, tire o SPOILER e adicione CODE.

 

Não eram QUOTE, e sim CODE, mas ok. Movido.

Editado por Skyen Hasus

Compartilhar este post


Link para o post
Naruto_Uzakraki    0
Naruto_Uzakraki

Uma invazao dessas nao seria muita apelação?

 

Cidadao da city que ouve invasao :

:fuu:FUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU

 

mas se tiver algum server tipo mais facil, exp maior e que os players aprovarem.. fica legal.

Compartilhar este post


Link para o post
Socket    0
Socket

Ótimo script mas tem um pequeno erro de sintaxe:

[/b]doSummonCreature('Orshabaal', OrshabaalPOS)[b]

Na verdade seria pos.['OrshabaalPOS']

E.. diminui um pouco:

local pos = {
 ['OrshabaalPOS'] = {x=X, y=Y, z=Z},
 ['ZuguroshPOS'] = {x=X, y=Y, z=Z},
 ['MorgarothPOS'] = {x=X, y=Y, z=Z},
 ['GolgordanPOS'] = {x=X, y=Y, z=Z},
 ['ApocalypsePOS'] = {x=X, y=Y, z=Z},
 ['GhazbaranPOS'] = {x=X, y=Y, z=Z},
 ['HellgorakPOS'] = {x=X, y=Y, z=Z},
 ['LatrivanPOS'] = {x=X, y=Y, z=Z},
 ['BazirPOS'] = {x=X, y=Y, z=Z},
 ['MadarethPOS'] = {x=X, y=Y, z=Z},
 ['UshurielPOS'] = {x=X, y=Y, z=Z},
 ['AnnihilonPOS'] = {x=X, y=Y, z=Z},
 ['InfernatilPOS'] = {x=X, y=Y, z=Z},
}

function bossInvasion(name, pos)
 if getPlayerAcess(cid) >= 3 then
   if name == 'Orshabaal' or 'Zugurosh' or 'Morgaroth' or 'Golgordan' or 'Apocalypse' or 'Ghazbaran' or 'Hellgorak' or 'Latrivan' or 'Bazir' or 'Madareth' or 'Ushuriel' or 'Annihilon' or 'Infernatil' then
     doSummonCreature(name, pos[name..'POS'])
     doPlayerSendTextMessage(cid, 22, 'You sumon '..name..'.')
     doBroadcastMessage(cid, 12, 'Be careful! '..name..' invaded the city!')
   end
 end
end

function onSay(cid, words, param)

 if getPlayerAccess(cid) >= 3 and param == '' then
   doPlayerSendTextMessage(cid, 22, 'You must choose a monster.')
   return TRUE
 end
 bossInvasion(param, pos)
end

 

Deve funcionar (Y)

 

Compartilhar este post


Link para o post
Kerooker    0
Kerooker

otimo script, mais devia diminuir um poko...

Compartilhar este post


Link para o post
Zaffend    0
Zaffend

Mesmo sendo grandinhu o scripter... acho um gênio qualquer scripter

E num gostei da ideia mto n, de coloca todos os Bosses, iria fika apelativo

=/

Compartilhar este post


Link para o post
felipe00    0
felipe00

Muito Bom! ^^

Compartilhar este post


Link para o post
josejunior23    2
josejunior23

desculpa mais não gosto nada de ver esses scripts grandes ;@

 

local CONFIG = { 
   ["orshabaal"] = {monster = "orshabaal", pos = {x=771, y=1239, z=7}, message = "Orshabaal Attacks!"}, 
   ["demodras"] = {monster = "demodras", pos = {x=771, y=1239, z=7}, message = "" } 
} 

function onSay(cid, words, param) 
   if(param == "") then 
       doPlayerSendCancel(cid, "please type name of an invasion.") 
	return TRUE 
   end 

if getPlayerAccess(cid) < 3 then 
       doPlayerSendCancel(cid, "Only gamemaster\'s may start a raid!")   
	return TRUE
end

local raid = CONFIG[string.lower(param)] 
   if raid then 
       doSummonCreature(raid.monster, raid.pos) 
       broadcastMessage(cid, MESSAGE_EVENT_ADVANCE, raid.message)           
   end 
   return TRUE 
end 

Compartilhar este post


Link para o post
Pandá s2    0
Pandá s2

Caramba, esse Otserv é mais para Server's zuado mesmo pow, ele é bom para server's com Rate +7000X. Varios Bosses Reconhecidos por todos estao no Script, isso é que deixa interativo

Compartilhar este post


Link para o post
Roku    0
Roku

Para esse povo, pandaS2, Naruto_Uzakraki, o script não manda tudo de uma vez. Você usa qualquer um deles.

Mas não é esse o motivo do post.

 

ATUALIZAÇÃO

VERSÃO 2.0.0

 

Novidades no tópico.

--Roku

Compartilhar este post


Link para o post
Visitante
Este tópico está impedido de receber novos posts.
Entre para seguir isso  
  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×