Advertisement
Guest User

Untitled

a guest
Sep 11th, 2019
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1.  
  2. // Faça um NPC que dê itens com quantidade e id configuravel com array.
  3.  
  4. prontera,150,150,5 Script Arrays 90,{
  5.  
  6. setarray .@itens_nome$[0],"Item 1","Item 2","Item 3","Item 4";
  7. setarray .@itens_id[0],501,502,503,507;
  8. setarray .@itens_qtd[0],1,2,3,9;
  9.  
  10. .@n$ = "[Dadeira de Itens]";
  11.  
  12. mes "Olá, você deseja ganhar um item?";
  13.  
  14. if( select( "Sim", "Não" ) == 2 ) close;
  15.  
  16. next;
  17. mes .@n$;
  18. mes "Qual item deseja?";
  19.  
  20. .@menu$ = implode( .@itens_nome$, ":" ); // "Item 1:Item 2:Item 3:Item 4"
  21.  
  22. .@opcao = select( .@menu$ );
  23. .@opcao--;
  24.  
  25. next;
  26. mes .@n$;
  27. mes "Pronto, aqui está o " + .@itens_nome$[.@opcao] + "!";
  28.  
  29. announce "Jogador ganhou item com id " + .@itens_id[.@opcao] + " e com quantidade " + .@itens_qtd[.@opcao] + "!",0;
  30.  
  31. close;
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement