Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Faça um NPC que dê itens com quantidade e id configuravel com array.
- prontera,150,150,5 Script Arrays 90,{
- setarray .@itens_nome$[0],"Item 1","Item 2","Item 3","Item 4";
- setarray .@itens_id[0],501,502,503,507;
- setarray .@itens_qtd[0],1,2,3,9;
- .@n$ = "[Dadeira de Itens]";
- mes "Olá, você deseja ganhar um item?";
- if( select( "Sim", "Não" ) == 2 ) close;
- next;
- mes .@n$;
- mes "Qual item deseja?";
- .@menu$ = implode( .@itens_nome$, ":" ); // "Item 1:Item 2:Item 3:Item 4"
- .@opcao = select( .@menu$ );
- .@opcao--;
- next;
- mes .@n$;
- mes "Pronto, aqui está o " + .@itens_nome$[.@opcao] + "!";
- announce "Jogador ganhou item com id " + .@itens_id[.@opcao] + " e com quantidade " + .@itens_qtd[.@opcao] + "!",0;
- close;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement