Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Refatoração do Recruiter [questão #1]
- prontera,150,150,5 Script Recruiter 90,{
- begin( strML( "[Homem]", "[Man]" ),
- 0,
- "Olá, dependendo do que me dizer, irei lhe dar uma quantidade de Zeny dependendo do que me falar.",
- "Hi, depending on what you tell me, I'll give you Zeny depending on what you tell me.");
- addOption( "Como assim?", "How?", BT_NORMAL, 1, 0, strML( "","")); //Não sei se podia passar apenas um null nesse strML
- addOption( "Oi?", "Hi?", BT_NORMAL, 2, 0, strML( "",""));
- addOption( "Legal!", "Cool!", BT_NORMAL, 3, 0, strML( "",""));
- addOption( "Parece suspeito", "It seems suspicious", BT_NORMAL, 4, 0, strML( "",""));
- waitOption();
- clear();
- switch( .@extra_num[BUTTON] ) //Assumindo que não mudou a maneira de fazer o switch(Não tinha exemplos no manual), caso contrario, usaria if aqui
- {
- case 1:
- show( "Não tenho tempo para gente burra!", "I will not waste time with dumb people!" ); //Caso final subir para aqui pra economizar linhas
- break;
- case 2:
- show( "Há, tome 30 Zeny!", "Ha! Take 30 Zeny!" );
- Zeny += 30;
- break;
- case 3:
- show( "Há, tome 55 Zeny!", "Ha! Take 55 Zeny!" );
- Zeny += 55; //O script original só dava 30 zenys, alterei pra 55 pra condizer com o que o npc fala
- break;
- case 4:
- .@rand = rand(10, 30);
- show("Vou te dar um valor aleatório então! Tome " +
- sprintf( "%d Zeny's!", .@rand ), //talvez não seja a melhor forma de fazer esse print de variavel, falta informação
- "I'll give you a random value then! Take "+
- sprintf( "%d Zeny's!", .@rand ) );
- Zeny += .@rand;
- //clear();
- //show( "Não tenho tempo para gente burra!", "I will not waste time with dumb people!" ); //Por conta de não ter close no caso quatro, essa linha devia aparecer aqui também.
- break;
- }
- macro_endtalk();
- end;
- OnInit:
- SLN( $E_PTBR, "Recrutador" );
- }
- //Codigo do Item Giver[questão #2]
- prontera,150,150,5 Script Item Giver 90,{
- setarray .@listaItens_ID[0],501,502,503,504,505;
- setarray .@listaItens_NM$[0],"Poção FORÇA", "Poção VITALIDADE", "Poção AGILIDADE", "Poção DESTREZA". "Poção SABEDORIA" );
- //Arrays auxiliar pra tradução em inglês
- setarray .@listaItens_NME$[0],"STRENGHT Potion", "VITALITY Potion", "AGILITY Potion", "DEXTERITY Potion". "WISDOM Potion" );
- begin( strML( "Doador de itens", "Item Giver" ),
- 0,
- "Olá, eu possuo alguns itens, deseja ver a lista?",
- "Hello, I have some items, do you want to see the list?" );
- addButton( 1, "Ok!", "Ok!", BT_NORMAL );
- addButton( 2, "Não!", "No!", BT_NORMAL );
- waitButton();
- clear();
- if( BUTTON == 1 ){
- for (set @i,0; @i < 10; set @i,@i+1) {
- addOption( .@listaItens_NM$[@i], .@listaItens_NME$[@i], BT_NORMAL, @i, .@listaItens_ID[i], strML( "",""));
- }
- waitOption();
- clear();
- getitem( .@extra_num[BUTTON], 1 );
- macro_endtalk("Obrigado!","Thanks!"); //Finish trocado pelo macro_endtalk();
- }
- else{
- show( "Adeus!", "Adeus!" );
- finish();
- }
- OnInit:
- SLN( $E_PTBR, "Entregador de Itens" );
- }
Advertisement
Add Comment
Please, Sign In to add comment