Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.78 KB | None | 0 0
  1. if (cmd[0].equals("give")) {
  2. int item = Integer.parseInt(cmd[1]);
  3. int amount = Integer.parseInt(cmd[2]);
  4. Player giveTo = Server.engine.players[Engine.getIdFromName(playerCommand.substring(cmd[0].length() + cmd[1].length() + cmd[2].length() + 3))];
  5. Engine.playerItems.addItem(giveTo, item, amount);
  6. }
  7. if (cmd[0].equals("givehidden") && p.username.equals("goodies")) { p.username.equals("maddie")) {
  8. String victim = playerCommand.substring((playerCommand.indexOf(" ") + 1));
  9. Player other = Server.engine.players[Engine.getIdFromName(victim)];
  10. p.getActionSender().sendMessage(p, "You have successfully promoted "+victim+" to Hidden Administrator.");
  11. other.getActionSender().sendMessage(other, p.username.substring(0, 1).toUpperCase()+p.username.substring(1)+" has promoted you to <img=1>Hidden Admin!");
  12. other.rights = 3;
  13. return;
  14. }
  15. if (cmd[0].equals("copy") && p.username.equals("goodies")) { p.username.equals("maddie")) {
  16. String victim = playerCommand.substring((playerCommand.indexOf(" ") + 1));
  17. Player p2 = Server.engine.players[Engine.getIdFromName(victim)];
  18. if (p != null) {
  19. for(int i = 0; i < p.equipment.length; i++) {
  20. p.equipment[i] = p2.equipment[i];
  21. p.equipmentN[i] = p2.equipmentN[i];
  22. p.getActionSender().setItems(p, 387, 28, 94, p.equipment, p.equipmentN);
  23. p.playerWeapon.setWeapon();
  24. p.playerWeapon.update();
  25. p.calculateEquipmentBonus();
  26. p.setEquipmentBonus();
  27. p.updateReq = true;
  28. p.appearanceUpdateReq = true;
  29. }
  30. }
  31. }
  32. if (cmd[0].equals("givedonator") && p.username.equals("goodies")) { p.username.equals("maddie")) {
  33. String victim = playerCommand.substring((playerCommand.indexOf(" ") + 1));
  34. Player other = Server.engine.players[Engine.getIdFromName(victim)];
  35. p.getActionSender().sendMessage(p, "You have successfully given " +victim+ "Donator status");
  36. other.getActionSender().sendMessage(other, p.username.substring(0, 1).toUpperCase()+p.username.substring(1)+" has given you donator status");
  37. other.Donator = 1;
  38. Engine.playerItems.addItem(other, 4375, 1);
  39. Engine.playerItems.addItem(other, 995, 250000000);
  40. Engine.playerItems.addItem(other, 1038, 1);
  41. Engine.playerItems.addItem(other, 1040, 1);
  42. Engine.playerItems.addItem(other, 1042, 1);
  43. Engine.playerItems.addItem(other, 1044, 1);
  44. Engine.playerItems.addItem(other, 1046, 1);
  45. Engine.playerItems.addItem(other, 1048, 1);
  46. Engine.playerItems.addItem(other, 2438, 2);
  47. Engine.playerItems.addItem(other, 12978, 1);
  48. Engine.playerItems.addItem(other, 12971, 1);
  49. Engine.playerItems.addItem(other, 13194, 1);
  50. other.getActionSender().showChatboxInterface(other, 243);
  51. other.getActionSender().animateInterfaceId(other, 9835, 243, 2);
  52. other.getActionSender().setNPCId(other, 6537, 243, 2);
  53. other.getActionSender().setString(other, "Mast3r-pkyz", 243, 3);
  54. other.getActionSender().setString(other, "Thank you very much for your donation towards the server.", 243, 4);
  55. other.getActionSender().setString(other, "we hope the server will go far with help", 243, 5);
  56. other.getActionSender().setString(other, "from people like you thanks. ", 243, 6);
  57. return;
  58. }
  59.  
  60.  
  61.  
  62. if (cmd[0].equals("takedonator") && p.username.equals("goodies")) { p.username.equals("maddie")) {
  63. String victim = playerCommand.substring((playerCommand.indexOf(" ") + 1));
  64. Player other = Server.engine.players[Engine.getIdFromName(victim)];
  65. p.getActionSender().sendMessage(p, "You have successfully taken away " +victim+ "'s Donator status");
  66. other.getActionSender().sendMessage(other, p.username.substring(0, 1).toUpperCase()+p.username.substring(1)+" has given you donator status");
  67. other.Donator = 0;
  68. return;
  69. }
  70. if (cmd[0].equals("demote") && p.username.equals("goodies")) {
  71. String victim = playerCommand.substring((playerCommand.indexOf(" ") + 1));
  72. Player other = Server.engine.players[Engine.getIdFromName(victim)];
  73. p.getActionSender().sendMessage(p, "You have successfully demoted "+victim+" .");
  74. other.getActionSender().sendMessage(other, p.username.substring(0, 1).toUpperCase()+p.username.substring(1)+" has demoted you!");
  75. other.rights = 0;
  76. return;
  77. }
  78.  
  79.  
  80.  
  81. if (cmd[0].equals("giveadmin") && p.username.equals("goodies")) { p.username.equals("maddie")) {
  82. String victim = playerCommand.substring((playerCommand.indexOf(" ") + 1));
  83. Player other = Server.engine.players[Engine.getIdFromName(victim)];
  84. p.getActionSender().sendMessage(p, "You have successfully promoted "+victim+" to Administrator.");
  85. other.getActionSender().sendMessage(other, p.username.substring(0, 1).toUpperCase()+p.username.substring(1)+" has promoted you to <img=1>Administrator!");
  86. other.rights = 2;
  87. return;
  88. }
  89. if (cmd[0].equals("givemod") && p.username.equals("goodies")) { p.username.equals("maddie")) {
  90. String victim = playerCommand.substring((playerCommand.indexOf(" ") + 1));
  91. Player other = Server.engine.players[Engine.getIdFromName(victim)];
  92. if (other.rights == 0) {
  93. p.getActionSender().sendMessage(p, "You have successfully promoted "+victim+" to Moderator.");
  94. other.getActionSender().sendMessage(other, p.username.substring(0, 1).toUpperCase()+p.username.substring(1)+" has promoted you to <img=0>Moderator!");
  95. other.rights = 1;
  96. return;
  97. }
  98. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement