sakkat

Untitled

May 23rd, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.11 KB | None | 0 0
  1. //Refatoração do Recruiter [questão #1]
  2. prontera,150,150,5 Script Recruiter 90,{
  3.  
  4. begin( strML( "[Homem]", "[Man]" ),
  5. 0,
  6. "Olá, dependendo do que me dizer, irei lhe dar uma quantidade de Zeny dependendo do que me falar.",
  7. "Hi, depending on what you tell me, I'll give you Zeny depending on what you tell me.");
  8.  
  9. addOption( "Como assim?", "How?", BT_NORMAL, 1, 0, strML( "","")); //Não sei se podia passar apenas um null nesse strML
  10. addOption( "Oi?", "Hi?", BT_NORMAL, 2, 0, strML( "",""));
  11. addOption( "Legal!", "Cool!", BT_NORMAL, 3, 0, strML( "",""));
  12. addOption( "Parece suspeito", "It seems suspicious", BT_NORMAL, 4, 0, strML( "",""));
  13. waitOption();
  14. clear();
  15.  
  16. 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
  17. {
  18. case 1:
  19. show( "Não tenho tempo para gente burra!", "I will not waste time with dumb people!" ); //Caso final subir para aqui pra economizar linhas
  20. break;
  21.  
  22. case 2:
  23. show( "Há, tome 30 Zeny!", "Ha! Take 30 Zeny!" );
  24. Zeny += 30;
  25. break;
  26.  
  27. case 3:
  28. show( "Há, tome 55 Zeny!", "Ha! Take 55 Zeny!" );
  29. Zeny += 55; //O script original só dava 30 zenys, alterei pra 55 pra condizer com o que o npc fala
  30. break;
  31.  
  32. case 4:
  33. .@rand = rand(10, 30);
  34. show("Vou te dar um valor aleatório então! Tome " +
  35. sprintf( "%d Zeny's!", .@rand ), //talvez não seja a melhor forma de fazer esse print de variavel, falta informação
  36. "I'll give you a random value then! Take "+
  37. sprintf( "%d Zeny's!", .@rand ) );
  38. Zeny += .@rand;
  39. //clear();
  40. //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.
  41.  
  42.  
  43. break;
  44. }
  45.  
  46. macro_endtalk();
  47. end;
  48.  
  49. OnInit:
  50. SLN( $E_PTBR, "Recrutador" );
  51. }
  52.  
  53.  
  54.  
  55. //Codigo do Item Giver[questão #2]
  56. prontera,150,150,5 Script Item Giver 90,{
  57.  
  58. setarray .@listaItens_ID[0],501,502,503,504,505;
  59. setarray .@listaItens_NM$[0],"Poção FORÇA", "Poção VITALIDADE", "Poção AGILIDADE", "Poção DESTREZA". "Poção SABEDORIA" );
  60.  
  61. //Arrays auxiliar pra tradução em inglês
  62. setarray .@listaItens_NME$[0],"STRENGHT Potion", "VITALITY Potion", "AGILITY Potion", "DEXTERITY Potion". "WISDOM Potion" );
  63.  
  64. begin( strML( "Doador de itens", "Item Giver" ),
  65. 0,
  66. "Olá, eu possuo alguns itens, deseja ver a lista?",
  67. "Hello, I have some items, do you want to see the list?" );
  68.  
  69. addButton( 1, "Ok!", "Ok!", BT_NORMAL );
  70. addButton( 2, "Não!", "No!", BT_NORMAL );
  71. waitButton();
  72. clear();
  73.  
  74. if( BUTTON == 1 ){
  75. for (set @i,0; @i < 10; set @i,@i+1) {
  76. addOption( .@listaItens_NM$[@i], .@listaItens_NME$[@i], BT_NORMAL, @i, .@listaItens_ID[i], strML( "",""));
  77. }
  78. waitOption();
  79. clear();
  80. getitem( .@extra_num[BUTTON], 1 );
  81. macro_endtalk("Obrigado!","Thanks!"); //Finish trocado pelo macro_endtalk();
  82. }
  83. else{
  84. show( "Adeus!", "Adeus!" );
  85. finish();
  86. }
  87.  
  88.  
  89.  
  90. OnInit:
  91. SLN( $E_PTBR, "Entregador de Itens" );
  92. }
Advertisement
Add Comment
Please, Sign In to add comment