Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class bot
- {
- public static void main(String[] args) {
- System.out.println("\f");
- Scanner sc = new Scanner(System.in);
- System.out.println("Witaj w sklepie internetowym Metin2, jak masz na imie: ");
- System.out.println(">>>>");
- String n = sc.nextLine();
- System.out.println(" Witaj " + n + " Jak sie masz? ");
- while (true) {
- System.out.println(">>>>");
- String s = sc.nextLine();
- s = s.toUpperCase();
- if (s.indexOf("DOBRZE") >= 0) {
- System.out.println("To super mordo");
- }
- else if (s.indexOf("ELO") >= 0) {
- System.out.println("supi");
- }
- else if (s.indexOf("SUPER") >= 0) {
- System.out.println("supi");
- }
- else if (s.indexOf("W PORZADKU") >= 0) {
- System.out.println("supi");
- }
- else if (s.indexOf("ZAJEBISCIE") >= 0) {
- System.out.println("supi");
- }
- else if (s.indexOf("SUPER EKSTRA") >= 0) {
- System.out.println("supi");
- }
- else if (s.indexOf("ELUWINA") >= 0) {
- System.out.println("supi");
- }
- else if (s.indexOf("SAGAN") >= 0) {
- System.out.println("supi");
- }
- else if (s.indexOf("POZDRO") >= 0) {
- System.out.println("supi");
- }
- else if (s.indexOf("E600") >= 0) {
- System.out.println("supi");
- }
- else {
- final int num = 3;
- double r = Math.random();
- int whichResponse = (int) (r * num);
- String response = "Cooooo? Nie rozumiem, zadaj inne pytanie";
- if (whichResponse == 1) {
- response = "Nie rozumiem, zapytaj mnie o cos zwiazanego ze sklepem Metin2";
- } else if (whichResponse == 2) {
- response = "Coooo? Zadaj normalne pytanie o sklep";
- }
- else if (whichResponse == 3) {
- response = "Nie kumam, zapytaj o sklep";
- }
- else if (whichResponse == 4) {
- response = "Przestan sie wyglupiac, zapytaj o cos sensownego zwiazanego ze sklepem";
- }
- System.out.println(response);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement