I do not know what's happening but npc does not send the globalmessage to the players online.
**no error appears on the console**
script:
Spoiler
prontera,164,173,3 script Ticket de Promoção 562,{
mes "^0000FF*Você vê uma fenda no canto da Máquina de Promoções e logo";
mes "acima um botão próximo a uma";
mes "alavanca*^000000";
next;
mes "^FF1493[BlinkN PowerBank]^000000";
mes "Acho que é aqui que eu coloco";
mes "aquele ^008800Ticket de Promoção^000000...";
next;
mes "^FF1493[BlinkN PowerBank]^000000";
mes "Antes de inserir um ticket veja o que você";
mes "poderá obter nessa Máquina:";
next;
mes "^FF1493[BlinkN PowerBank]^000000";
for (.@i = 0; .@i < getarraysize(.item); .@i++) {
mes .qnt[.@i]+"x "+getitemname(.item[.@i])+"";
}
next;
mes "^FF1493[BlinkN PowerBank]^000000";
mes "Você gostaria de trocar agora?";
next;
if(select("[Inserir um Ticket]:[Cancelar]") == 2) {
mes "^FF1493[BlinkN PowerBank]^000000";
mes "Quando quiser trocar um";
mes "^008800Ticket de Promoção^000000, basta vir e falar comigo.";
mes "Estarei aqui por pouco tempo.";
mes "Até mais!";
close;
}
mes "^FF1493[BlinkN PowerBank]^000000";
if(countitem(7608) >= 1) {
mes "^0000FF*Você insere o Ticket de Promoção na fenda da Máquina e";
mes "observa enquanto ela puxa o Ticket automáticamente*^000000";
next;
mes "^FF1493[BlinkN PowerBank]^000000";
mes "Legal!!! Isso vai ser bastante útil.";
delitem 7608,1;
for(.@i = 0; .@i < getarraysize(.item); .@i++) {
if(rand(1, 10000) <= .chance[.@i]) {
if(.item[.@i] == .GlobalMessage) {
}
getitem .item[.@i],.qnt[.@i];
set .@recompensa,1;
close;
}
Question
technick
I do not know what's happening but npc does not send the globalmessage to the players online.
**no error appears on the console**
script:
prontera,164,173,3 script Ticket de Promoção 562,{
mes "^0000FF*Você vê uma fenda no canto da Máquina de Promoções e logo";
mes "acima um botão próximo a uma";
mes "alavanca*^000000";
next;
mes "^FF1493[BlinkN PowerBank]^000000";
mes "Acho que é aqui que eu coloco";
mes "aquele ^008800Ticket de Promoção^000000...";
next;
mes "^FF1493[BlinkN PowerBank]^000000";
mes "Antes de inserir um ticket veja o que você";
mes "poderá obter nessa Máquina:";
next;
mes "^FF1493[BlinkN PowerBank]^000000";
for (.@i = 0; .@i < getarraysize(.item); .@i++) {
mes .qnt[.@i]+"x "+getitemname(.item[.@i])+"";
}
next;
mes "^FF1493[BlinkN PowerBank]^000000";
mes "Você gostaria de trocar agora?";
next;
if(select("[Inserir um Ticket]:[Cancelar]") == 2) {
mes "^FF1493[BlinkN PowerBank]^000000";
mes "Quando quiser trocar um";
mes "^008800Ticket de Promoção^000000, basta vir e falar comigo.";
mes "Estarei aqui por pouco tempo.";
mes "Até mais!";
close;
}
mes "^FF1493[BlinkN PowerBank]^000000";
if(countitem(7608) >= 1) {
mes "^0000FF*Você insere o Ticket de Promoção na fenda da Máquina e";
mes "observa enquanto ela puxa o Ticket automáticamente*^000000";
next;
mes "^FF1493[BlinkN PowerBank]^000000";
mes "Legal!!! Isso vai ser bastante útil.";
delitem 7608,1;
for(.@i = 0; .@i < getarraysize(.item); .@i++) {
if(rand(1, 10000) <= .chance[.@i]) {
if(.item[.@i] == .GlobalMessage) {
}
getitem .item[.@i],.qnt[.@i];
set .@recompensa,1;
close;
}
}
if(!.@recompensa) {
.@i = rand(getarraysize(.item));
if(.item[.@i] == .GlobalMessage || .item[.@i] == .GlobalMessage2) {
}
getitem .item[.@i], .qnt[.@i];
}
close;
} else {
mes "Hmmm, voce precisa ter um ^008800Ticket de Promoção^000000";
mes "para receber um dos itens...";
close;
}
OnInit:
// Array dos itens, quantidade e chance.
// Chance 1 = 0.01
setarray .item[0], 6665, 12412, 12915, 12903, 12904, 12908, 12905, 12906, 12907, 12912, 12375, 13858, 13588, 12210, 12709, 12710, 13718, 13750, 13756, 13714, 13711, 7608;
setarray .qnt[0], 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 20, 5, 1, 1, 1, 1;
setarray .chance[0], 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5, 5, 10, 10, 1000;
// Envia uma mensagem global para todos online quando ganhar item com a id
.GlobalMessage = 7608;
}
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.