Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script fidelidade -1,{
- OnInit:
- bindatcmd "fidelidade",strnpcinfo(3)+"::Onfidelidade";
- setarray .Currency[1],507;
- setarray .Shop1[0],12210,1,12208,1,12103,5;
- setarray .Shop2[0],5518,300,5374,300,2202,100;
- set .@i,1;
- while (.@i <= getarraysize(.Currency)) {
- set .@j,0;
- while (.@j < getarraysize(getd(".Shop"+.@i))) {
- npcshopdelitem "presenceshop"+.@i,512;
- npcshopadditem "presenceshop"+.@i, getd(".Shop"+.@i+"["+.@j+"]"), getd(".Shop"+.@i+"["+(.@j+1)+"]");
- set .@j, .@j+2; }
- set .@i, .@i+1; }
- end;
- }
- - shop presenceshop -1,512:-1
- Onfidelidade:{
- mes "[Sistema de Fidelidade]";
- mes ""+strcharinfo(0)+", bem-vind"+(Sex?"o":"a")+" ao sistema de fidelidade.";
- mes "O que deseja fazer hoje?";
- switch(select("Marcar Fidelidade:Trocar meus pontos:Informações:Sair"))
- {
- case 1:
- next;
- set @n1, rand(1,9);
- set @n2, rand(1,9);
- set @n3, rand(1,9);
- set @n4, rand(1,9);
- set @numero, @n1*1000+@n2*100+@n3*10+@n4;
- mes "[Sistema de Fidelidade]";
- mes "Quais numeros aparecem aqui?";
- mes "---->[ "+@n1+" "+@n2+" "+@n3+" "+@n4+" ]<----";
- input @respnum;
- next;
- mes "[Sistema de Fidelidade]";
- if(@respnum == @numero){
- mes "Você acertou as respostas!";
- mes "Desculpe o inconveniente.";
- }
- if(@respnum != @numero){
- mes "Você NÃO acertou as respostas!";
- close;
- }
- next;
- mes "[Sistema de Fidelidade]";
- if(!#counting)
- {
- set #online_time, gettimetick(2) + $time;
- set #counting,1;
- mes "Tempo marcado, volte dentro de "+((#online_time-gettimetick(2))/60)+" minuto(s)!";
- close2;
- dispbottom "Para verificar o tempo que resta, mande uma MP para npc:"+strnpcinfo(1)+".";
- end;
- }
- if(#online_time >= gettimetick(2))
- {
- mes "Você ainda deve aguardar "+((#online_time-gettimetick(2))/60)+" minuto(s).";
- close;
- }
- mes "Receba agora seu ponto de presença.";
- set #point_presence,#point_presence + $point;
- set #counting,0;
- close;
- case 2:
- close2;
- set @s, select("Utilidades");
- message strcharinfo(0),"Esta loja só aceita Pontos Fidelidade.";
- dispbottom "Você tem "+$point+" de fidelidade.";
- callshop "presenceshop"+@s,1;
- npcshopattach "presenceshop"+@s;
- end;
- case 3:
- next;
- mes "[Sistema de Fidelidade]";
- mes "Aqui você poderá ganhar pontos por tempo online no servidor.";
- next;
- mes "[Sistema de Fidelidade]";
- mes "A cada "+$time/60+" minutos, você ganhará "+$point+" ponto(s).";
- next;
- mes "[Sistema de Fidelidade]";
- mes "Você pode trocar os pontos acumulados por itens.";
- mes "Aproveite!";
- close;
- case 4:
- close;
- }
- OnWhisperGlobal:
- if(!#counting)
- {
- dispbottom "Você ainda não marcou sua presença.";
- end;
- }
- dispbottom "Faltam ainda "+((#online_time-gettimetick(2))/60)+" minuto(s).";
- end;
- OnPCLogoutEvent:
- if(#counting == 1)
- {
- if(checkvending(strcharinfo(0)))
- {
- set #counting,0;
- }
- set #offline_time,#online_time - gettimetick(2);
- end;
- }
- OnPCLoginEvent:
- if(#counting == 1)
- {
- set #online_time, gettimetick(2) + #offline_time;
- end;
- }
- if(!$new_time) { set $time,3600; }
- if(!$new_point) { set $point,1; }
- end;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement