Advertisement
Guest User

Untitled

a guest
Jan 19th, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class bot
  3. {
  4. public static void main(String[] args) {
  5.  
  6. System.out.println("\f");
  7. Scanner sc = new Scanner(System.in);
  8. System.out.println("Witaj w sklepie internetowym Metin2, jak masz na imie: ");
  9. System.out.println(">>>>");
  10. String n = sc.nextLine();
  11. System.out.println(" Witaj " + n + " Jak sie masz? ");
  12.  
  13.  
  14. while (true) {
  15. System.out.println(">>>>");
  16. String s = sc.nextLine();
  17. s = s.toUpperCase();
  18.  
  19. if (s.indexOf("DOBRZE") >= 0) {
  20. System.out.println("To super mordo");
  21. }
  22. else if (s.indexOf("ELO") >= 0) {
  23. System.out.println("supi");
  24. }
  25. else if (s.indexOf("SUPER") >= 0) {
  26. System.out.println("supi");
  27. }
  28. else if (s.indexOf("W PORZADKU") >= 0) {
  29. System.out.println("supi");
  30. }
  31. else if (s.indexOf("ZAJEBISCIE") >= 0) {
  32. System.out.println("supi");
  33. }
  34. else if (s.indexOf("SUPER EKSTRA") >= 0) {
  35. System.out.println("supi");
  36. }
  37. else if (s.indexOf("ELUWINA") >= 0) {
  38. System.out.println("supi");
  39. }
  40. else if (s.indexOf("SAGAN") >= 0) {
  41. System.out.println("supi");
  42. }
  43. else if (s.indexOf("POZDRO") >= 0) {
  44. System.out.println("supi");
  45. }
  46. else if (s.indexOf("E600") >= 0) {
  47. System.out.println("supi");
  48. }
  49. else {
  50. final int num = 3;
  51. double r = Math.random();
  52. int whichResponse = (int) (r * num);
  53. String response = "Cooooo? Nie rozumiem, zadaj inne pytanie";
  54.  
  55. if (whichResponse == 1) {
  56. response = "Nie rozumiem, zapytaj mnie o cos zwiazanego ze sklepem Metin2";
  57.  
  58. } else if (whichResponse == 2) {
  59. response = "Coooo? Zadaj normalne pytanie o sklep";
  60. }
  61. else if (whichResponse == 3) {
  62. response = "Nie kumam, zapytaj o sklep";
  63. }
  64. else if (whichResponse == 4) {
  65. response = "Przestan sie wyglupiac, zapytaj o cos sensownego zwiazanego ze sklepem";
  66. }
  67. System.out.println(response);
  68. }
  69.  
  70. }
  71. }
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement