daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if(playerCommand.equalsIgnoreCase("donated")){
  2.            
  3.     try {
  4.     java.sql.Connection con = DriverManager.getConnection("jdbc:mysql://zionscape.com:3306/zionscap_db", "zionscap_user", "***");
  5.             Statement statement = con.createStatement();
  6.         ResultSet rs = statement.executeQuery("SELECT * FROM donation WHERE username = '"+c.playerName.replaceAll(" ", "_")+"';");
  7. c.sendMessage("queried.. :)");
  8.         if(rs.next()){
  9.             c.sendMessage("Thanks for donating");
  10.             c.getItems().addItem(rs.getInt("productid"), 1);
  11.             int itemid = rs.getInt("productid");
  12.             switch(itemid) {
  13.                 case 13887://vesta
  14.                 c.getItems().addItem(13893, 1);
  15.                 c.getItems().addItem(13899, 1);
  16.                 c.getItems().addItem(13905, 1);
  17.                 break;
  18.                
  19.                 case 13890://statius
  20.                 c.getItems().addItem(13884, 1);
  21.                 c.getItems().addItem(13896, 1);
  22.                 c.getItems().addItem(13902, 1);
  23.                 break;
  24.                
  25.                 case 11724://bandos
  26.                 c.getItems().addItem(11726, 1);
  27.                 c.getItems().addItem(11728, 1);
  28.                 break;
  29.                
  30.                 case 20135://torva
  31.                 c.getItems().addItem(20139, 1);
  32.                 c.getItems().addItem(20143, 1);
  33.                 break;
  34.                
  35.                 case 20159://virtus
  36.                 c.getItems().addItem(20163, 1);
  37.                 c.getItems().addItem(20167, 1);
  38.                 break;
  39.                
  40.                 case 11718://armadyl
  41.                 c.getItems().addItem(11720, 1);
  42.                 c.getItems().addItem(11722, 1);
  43.                 break;
  44.             }
  45.             c.isMember = 1;
  46.             c.logout();
  47.             //statement.executeUpdate("DELETE FROM donation WHERE username = '"+rs.getString("username")+"'");
  48.         }else{
  49. c.sendMessage("Donate b4 claiming");
  50. }
  51.  
  52.     } catch (SQLException e) {
  53.             e.printStackTrace();
  54.         }
  55.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top