Guest User

Untitled

a guest
Jun 24th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. import com.optimus.types.client.GameConstants;
  2. import com.optimus.types.client.GameObject;
  3. import com.optimus.types.system.Script;
  4.  
  5. import java.awt.*;
  6.  
  7. /**
  8. * Author: Sacr[e]d
  9. * Date: Mar 20, 2009
  10. * Time: 5:32:14 AM
  11. * Only to be used for Renev[a]tio or with permission from author.
  12. */
  13. public class OptiMiner1 extends Script {
  14. private int startingLevel;
  15. private int startingExperience;
  16. private boolean grabbedExp = false;
  17.  
  18. public boolean scriptableLoop() {
  19. if(!grabbedExp) {
  20. this.startingLevel = skills.getLevel(GameConstants.SKILL_MINING);
  21. this.startingExperience = skills.getExperience(GameConstants.SKILL_MINING);
  22. grabbedExp = true;
  23. }
  24. if (!values.getMyPlayer().isMoving() && values.getMyPlayer().getAnimation() <= 0 && !interfaces.isInventoryFull()) {
  25. GameObject rock = objects.findObject(11962);// Search on whole loaded map lols.
  26. actions.atObject(rock, "Mine");
  27. } else if (interfaces.isInventoryFull()) {
  28. items.dropAllOf(437);
  29. }
  30. return true; //To change body of implemented methods use File | Settings | File Templates.
  31. }
  32.  
  33. public void onStart() {
  34.  
  35. }
  36.  
  37. public String getPaintEventName() {
  38. return "OptiMiner"; //To change body of implemented methods use File | Settings | File Templates.
  39. }
  40.  
  41. public boolean performPaint(Graphics graphics) {
  42. graphics.setColor(Color.BLACK);
  43. graphics.fill3DRect(25, 25, 250, 83, true);
  44. graphics.setColor(Color.GRAY);
  45. graphics.fill3DRect(30, 30, 240, 73, true);
  46. graphics.setColor(Color.ORANGE);
  47. graphics.drawString("Thanks for using OptiMiner.",30,50);
  48. graphics.drawString("Levels Gained = "+(skills.getLevel(GameConstants.SKILL_MINING) - startingLevel),30,60);
  49. graphics.drawString("XP Gained = "+(skills.getExperience(GameConstants.SKILL_MINING) - startingExperience),30,70);
  50. return true; //To change body of implemented methods use File | Settings | File Templates.
  51. }
  52.  
  53. public String getScriptName() {
  54. return "OptiMiner"; //To change body of implemented methods use File | Settings | File Templates.
  55. }
  56.  
  57. public String getScriptAuthor() {
  58. return "Sacr[3]d"; //To change body of implemented methods use File | Settings | File Templates.
  59. }
  60.  
  61. public int getScriptVersion() {
  62. return 1; //To change body of implemented methods use File | Settings | File Templates.
  63. }
  64. }
Add Comment
Please, Sign In to add comment