Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import com.optimus.types.client.GameConstants;
- import com.optimus.types.client.GameObject;
- import com.optimus.types.system.Script;
- import java.awt.*;
- /**
- * Author: Sacr[e]d
- * Date: Mar 20, 2009
- * Time: 5:32:14 AM
- * Only to be used for Renev[a]tio or with permission from author.
- */
- public class OptiMiner1 extends Script {
- private int startingLevel;
- private int startingExperience;
- private boolean grabbedExp = false;
- public boolean scriptableLoop() {
- if(!grabbedExp) {
- this.startingLevel = skills.getLevel(GameConstants.SKILL_MINING);
- this.startingExperience = skills.getExperience(GameConstants.SKILL_MINING);
- grabbedExp = true;
- }
- if (!values.getMyPlayer().isMoving() && values.getMyPlayer().getAnimation() <= 0 && !interfaces.isInventoryFull()) {
- GameObject rock = objects.findObject(11962);// Search on whole loaded map lols.
- actions.atObject(rock, "Mine");
- } else if (interfaces.isInventoryFull()) {
- items.dropAllOf(437);
- }
- return true; //To change body of implemented methods use File | Settings | File Templates.
- }
- public void onStart() {
- }
- public String getPaintEventName() {
- return "OptiMiner"; //To change body of implemented methods use File | Settings | File Templates.
- }
- public boolean performPaint(Graphics graphics) {
- graphics.setColor(Color.BLACK);
- graphics.fill3DRect(25, 25, 250, 83, true);
- graphics.setColor(Color.GRAY);
- graphics.fill3DRect(30, 30, 240, 73, true);
- graphics.setColor(Color.ORANGE);
- graphics.drawString("Thanks for using OptiMiner.",30,50);
- graphics.drawString("Levels Gained = "+(skills.getLevel(GameConstants.SKILL_MINING) - startingLevel),30,60);
- graphics.drawString("XP Gained = "+(skills.getExperience(GameConstants.SKILL_MINING) - startingExperience),30,70);
- return true; //To change body of implemented methods use File | Settings | File Templates.
- }
- public String getScriptName() {
- return "OptiMiner"; //To change body of implemented methods use File | Settings | File Templates.
- }
- public String getScriptAuthor() {
- return "Sacr[3]d"; //To change body of implemented methods use File | Settings | File Templates.
- }
- public int getScriptVersion() {
- return 1; //To change body of implemented methods use File | Settings | File Templates.
- }
- }
Add Comment
Please, Sign In to add comment