Adblock breaks this site

Good scripter help please.

Discussion in 'RuneScape 3 Cheating' started by cX jaxhax Xc, Dec 18, 2008.

  1. cX jaxhax Xc

    cX jaxhax Xc Forum Addict
    Banned

    Joined:
    Feb 19, 2007
    Posts:
    425
    Referrals:
    2
    Sythe Gold:
    0
    Good scripter help please.

    it would be appreciated greatly if you could make the script to NOT stop when it clicks wrong thing, it always clicks lumby tele and stops the script, please fix.
    will vouch.

    Code:
    import java.awt.*;
    import java.util.*;
    import java.awt.event.*;
    
    import com.speljohan.rsbot.script.*;
    import com.speljohan.rsbot.bot.*;
    import com.speljohan.rsbot.script.wrappers.*;
    import com.speljohan.rsbot.event.listeners.*;
    import com.speljohan.rsbot.event.events.*;
    import com.speljohan.rsbot.event.events.ServerMessageEvent;
    import com.speljohan.rsbot.event.listeners.ServerMessageListener;
    
    public class DummyCurser extends Script implements ServerMessageListener,PaintListener{
    	long lastanti = System.currentTimeMillis();
    	long curranti;
    	long anticheck;
    	public boolean norunes = false;
    	public int spell = 0;
    	public String spelln = "";
    	public int runecount = 0;
    	public int startlvl = 0;
    	public int startxp = 0;
    	public int style = 0;
    	public int castxp = 0;
    	Color BG = new Color(0, 0, 0, 100);
    	public long startTime = System.currentTimeMillis();
        public String getName() {
            return "Lumbridge Dummy Curse";
        }
    
        public double getVersion() {
            return 1.1;
        }
    
        public String getAuthor() {
            return "endoskeleton";
        }
    	public void serverMessageRecieved(ServerMessageEvent e) {
    		if (e.getMessage().contains("You do not have enough")) {
    			norunes = true;
    		}
    		if (e.getMessage().contains("Your Magic level is not high enough")) {
    			if (spell == 3)
    				norunes = true;
    			spell = 3;
    			spelln = "Confuse";
    		}
    	}
        public void onFinish() {
            Bot.getEventManager().removeListener(ServerMessageListener.class, this);
            Bot.getEventManager().removeListener(PaintListener.class, this);
        }
        public boolean onStart(Map<String, String> args) {
            if (args.get("style").equals("confuse")) {
            	spell = 3;
            	spelln = "Confuse";
            	castxp = 13;
            }
            if (args.get("style").equals("curse")) {
            	spell = 12;
            	spelln = "Curse";
            	castxp = 29;
            }
        	startlvl = skills.getCurrentSkillLevel(STAT_MAGIC);
        	startTime = System.currentTimeMillis();
        	startxp = skills.getCurrentSkillExp(STAT_MAGIC);
        	runecount = getEquipmentCount(559);
            Bot.getEventManager().addListener(PaintListener.class, this);
            norunes = false;
    		Bot.getEventManager().addListener(ServerMessageListener.class, this);
            return true;
        }
        public void onRepaint(Graphics g) {
        	if (isLoggedIn()) {
    			long millis = System.currentTimeMillis() - startTime;
    			long hours = millis / (1000 * 60 * 60);
    			millis -= hours * (1000 * 60 * 60);
    			long minutes = millis / (1000 * 60);
    			millis -= minutes * (1000 * 60);
    			long seconds = millis / 1000;
    			int LevelChange = skills.getCurrentSkillLevel(STAT_MAGIC) - startlvl;
    			int XPChange = skills.getCurrentSkillExp(STAT_MAGIC) - startxp;
    			float XPperSec = 0;
    			if ((minutes > 0 || hours > 0 || seconds > 0) && XPChange > 0) {
    				XPperSec = ((float) XPChange)/(float)(seconds + (minutes*60) + (hours*60*60));
    			}
    
    			float XPperMin = XPperSec*60;
    			float XPperHour = XPperMin*60;
    			float timeTillLvl = 9999;
    			float secsTillLvl = (int) timeTillLvl;
    			float minsTillLvl = (int) timeTillLvl;
    			float hoursTillLvl = (int) timeTillLvl;
    
    			if (XPperSec > 0) {
    				secsTillLvl = skills.getXPToNextLevel(STAT_MAGIC)/XPperSec ;
    				}
    			if (XPperMin > 0) {
    				minsTillLvl = skills.getXPToNextLevel(STAT_MAGIC)/XPperMin ;
    				}
    			if (XPperHour > 0) {
    				hoursTillLvl = skills.getXPToNextLevel(STAT_MAGIC)/XPperHour ;
    				}
    			secsTillLvl -= (int) minsTillLvl*60;
    			minsTillLvl -= (int) hoursTillLvl*60;
    
    			if (minsTillLvl < 0) minsTillLvl = 0;
                g.setColor(BG);
                g.fill3DRect(332, 258, 184, 75, true);
    			g.setColor(Color.white);
    			g.drawString("Runtime: " + hours + "h " + minutes
    					+ "m " + seconds + "s.", 335, 270);
                g.drawString("Magic levels gained: " +LevelChange, 335, 282);
                g.drawString("Magic EXP gained: " +(skills.getCurrentSkillExp(STAT_MAGIC) - startxp), 335, 294);
    			g.drawString("EXP per hour: " +(int)XPperHour, 335, 306);
    			g.drawString("Casts per hour: " +((int)XPperHour / castxp), 335, 318);
    			g.drawString("Time to level: " + (int)hoursTillLvl + "h " + (int)minsTillLvl
    					+ "m " + (int)secsTillLvl + "s", 335, 330);
        	}
        }
        public int loop() {
        	try {
        		if (getMyPlayer().isMoving()) {
        			return random(300,400);
        		}
        		if (getMyPlayer().isInCombat() && getPlane() == 0) {
        			if (atTile(new RSTile(3212, 3256), "Climb-up"))
        				return random(30000,40000);
        			return random(300,400);
        		}
        		if (getPlane() == 1) {
        			atTile(new RSTile(3213, 3256), "Climb-down");
        			return random(500,600);
        		}
        		if (!isInArea(3213, 3252, 3210, 3254)) {
        			walkTileMM(new RSTile((3213 - random(0,3)), (3254 - random(0,2))));
        			return random(600,700);
        		}
        		if (norunes)
        			return -1;
        		RSNPC dummy = getNearestFreeNPCByID(4474);
        		if (!Bot.getClient().isSpellSelected()) {
        			if (getCurrentTab() != 6)
        				openTab(6);
        			castSpell(spell);
        			return antiBan();
        		}
        		if (dummy != null && getMyPlayer().getAnimation() == -1) {
        			atNPC(dummy, "Cast " +spelln+ " -> Magic dummy");
        		}
        		antiBan();
            } catch(Exception e) {
                e.printStackTrace();
            }
            return antiBan();
        }
        public boolean isInArea(int maxX, int minY, int minX, int maxY) {
        	int x = getMyPlayer().getLocation().getX();
        	int y = getMyPlayer().getLocation().getY();
        	if (x >= minX && x <= maxX
        			&& y >= minY && y <= maxY) {
        		return true;
        	}
        	return false;
        }
        public int antiBan() {
        	int rand = random(1,200);
        		if (rand==1) {
        			if (Bot.getClient().isSpellSelected())
        				clickMouse(true);
        			openTab(TAB_STATS);
        			wait(random(100,200));
        			int tempstat = 130;
        			int tempxM = RSInterface.getInterface(320).getChild(tempstat).getAbsoluteX() + RSInterface.getInterface(320).getChild(tempstat).getWidth();
        			int tempxY = RSInterface.getInterface(320).getChild(tempstat).getAbsoluteY() + RSInterface.getInterface(320).getChild(tempstat).getHeight();
        			moveMouse(tempxM,tempxY,1,1);
        			wait(random(3000,4000));
        			return random(300,400);
        		}
        		if (rand==2) {
        			if (Bot.getClient().isSpellSelected())
        				clickMouse(true);
        			if (getCurrentTab() != TAB_INVENTORY) {
        				openTab(TAB_INVENTORY);
        			}
        			wait(random(3000,4000));
        			return random(300,400);
        		}
        		if (rand==13) {
        			if (Bot.getClient().isSpellSelected())
        				clickMouse(true);
        			if (getCurrentTab() != TAB_EQUIPMENT) {
        				openTab(TAB_EQUIPMENT);
        			}
        			wait(random(3000,4000));
        			return random(300,400);
        		}
        		if (rand > 2 && rand < 9) {
        			moveMouse(random(0,450), random(0,450));
        			return random(800,900);
        		}
        		if (rand > 9 && rand < 12) {
        			setCameraRotation(random(1,360));
        			setCameraAltitude(random(-200,100));
        			return random(300,400);
        		}
        		if (rand > 13 && rand < 15) {
        			return random(5000,8000);
        		}
        		return random(100,200);
        }
        public String getScriptDescription() {
            return "<html>\n" +
                    "<head></head>\n" +
                    "<body>\n" +
                        "<center>" +
                            "<h2>" + getName() + "</h2>" +
                        "</center>\n" +
                        "<b>Author:</b> " + getAuthor() + "<br/>\n" +
                		"Confuse:<input type=\"radio\" name=\"style\" value=\"confuse\"> " +
                		"Curse:<input type=\"radio\" name=\"style\" value=\"curse\" checked=\"checked\"> " +
                    "</body>\n" +
                    "</html>";
        }
        public String getScriptCategory() {
            return "Magic";
        }
    }
     
< Good Bot to use to make money??? | Question on autoing. >


 
 
Adblock breaks this site