Jump to content
  • 0
Sign in to follow this  
Tutti

INVASAO

Question

Gostaria de fazer q este npc anunciasse o nome do mob que esta invadindo a cidade e que anunciasse o nick do player que matou o mob na cidade

E se passa por 1h ninguem matar o npc mesmo dese killmonster2 no mob q esta na cidade.

 

NPC

/===== Cronus Script ========================================
//= Script de Invasão
//===== By: ==================================================
//= Kamper
//===== Versão Atual: ========================================
//= 1.2
//===== Comentarios Adicionais: ==============================
//= Faz invasões automáticas.
//===== Changelog: ===========================================
//= 1.0 Criado o script. [Kamper]
//= 1.1 Otimizado. [RoM]
//= 1.2 While removido e substituido por um timer [Keoy]
// .gat removidos.
//============================================================

prontera,0,0,0 script InvasionScript -1,{
end;

OnInit:
// ================= Configurações ===========================
set $IS_chance,1000; //Chances de invasão. 1 = 0,01% 1/1000
// ================= Monstros (ID) ===========================
setarray $IS_mob[0],1087,1147,1190,1115,1511,1159,1389,1150,1688,1980,1251,2068,1312,1885,1252,1583,1038,1046,1059,1039,1157,1112,1373,1658,1272,1630,1623,1492,1418,1785,1779,1708,1956,1734,1685,1719,1768,2202,1871,1751,1832,1874,1917,1647,1649,1651,1648,1646;
// ================= Cidades =================================
// Nome dos Mapas:
setarray $IS_city$[0],"geffen","izlude","alberta","morocc","prontera","payon";
// Nomes das Cidades:
setarray $IS_cityn$[0],"Geffen","Izlude","Alberta","Morroc","Prontera","Payon";

initnpctimer;

// ================= Script ==================================

OnTimer600000:
if(rand(1,1000) <= $IS_chance)
{
set $@m,rand(getarraysize($IS_mob)-1);
set $@c,rand(getarraysize($IS_city$)-1);
monster $IS_city$[$@c],0,0,strmobinfo(1,$IS_mob[$@m]),$IS_mob[$@m],1;
announce "Venham nos ajudar!",0;
sleep2 2000;
announce $IS_cityn$[$@c]+" acaba de ser invadida por um MVP!",0;
}
initnpctimer;
end;
}

 

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

 

 

 

/===== Cronus Script ========================================//= Script de Invasão//===== By: ==================================================//= Kamper//===== Versão Atual: ========================================//= 1.2//===== Comentarios Adicionais: ==============================//= Faz invasões automáticas.//===== Changelog: ===========================================//= 1.0 Criado o script. [Kamper]//= 1.1 Otimizado. [RoM]//= 1.2 While removido e substituido por um timer [Keoy]// .gat removidos.//============================================================prontera,0,0,0 script InvasionScript -1,{end;OnInit:// ================= Configurações ===========================set $IS_chance,1000; //Chances de invasão. 1 = 0,01% 1/1000// ================= Monstros (ID) ===========================setarray $IS_mob[0],1087,1147,1190,1115,1511,1159,1389,1150,1688,1980,1251,2068,1312,1885,1252,1583,1038,1046,1059,1039,1157,1112,1373,1658,1272,1630,1623,1492,1418,1785,1779,1708,1956,1734,1685,1719,1768,2202,1871,1751,1832,1874,1917,1647,1649,1651,1648,1646;// ================= Cidades =================================// Nome dos Mapas:setarray $IS_city$[0],"geffen","izlude","alberta","morocc","prontera","payon";// Nomes das Cidades:setarray $IS_cityn$[0],"Geffen","Izlude","Alberta","Morroc","Prontera","Payon";initnpctimer;end;// ================= Script ==================================OnTimer600000:if(rand(1,1000) <= $IS_chance){if($@ms == 1) end;set $@m,rand(getarraysize($IS_mob)-1);set $@c,rand(getarraysize($IS_city$)-1);monster $IS_city$[$@c],0,0,strmobinfo(1,$IS_mob[$@m]),$IS_mob[$@m],1;set $@ms,1;announce "Venham nos ajudar!",bc_all;sleep2 2000;announce "O MvP "+strmobinfo(1,$IS_mob[$@m])+" está invadindo "+$IS_cityn$[$@c]+"!!",bc_all;}initnpctimer;end;OnTimer3600000:announce "O MvP "+strmobinfo(1,$IS_mob[$@m])+" devastou "+$IS_cityn$[$@c]+" e foi embora!",bc_allset $@ms,0;stopnpctimer;end;OnNPCKillEvent:if(killedrid == $IS_mob[$@m] && strcharinfo(3) == $IS_cityn$[$@c]){announce strcharinfo(0)+" Matou o MvP que estava atacando a cidade "+$IS_cityn$[$@c]+"!",bc_all;set $@ms,0;stopnpctimer;end;}} 

 

 

 

Share this post


Link to post
Share on other sites
  • 0

 

Em cima dela falta um ; no final do announce.

 

Boa vou testar amanha !

 

Não precisa postar informando que irá testar, apenas teste e informe o resultado... obrigado~

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.