Thread: Cow Own3r - Great for Pures

Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1 Cow Own3r - Great for Pures 
    Renown Programmer

    Nikki's Avatar
    Join Date
    Aug 2008
    Posts
    3,992
    Thanks given
    553
    Thanks received
    1,078
    Rep Power
    5000
    Features:
    Fast Cow switching -
    Crafting guild -
    Update: Logs When A Level is gained, Now Eats also when at A Lower HP! If You want it to eat!

    No Other features, but Tested and gives 30k xp an hour if noone else there! Sometimes i Think it works too good, Can wipe out all cows next to crafting guild with 40 str before they all spawn again
    The Script: Save as CowOwn3r.java - Exact caps
    Code:
    import java.awt.*;
    import java.util.*;
    import java.util.List;
    import com.speljohan.rsbot.bot.Bot;
    import com.speljohan.rsbot.script.*;
    import com.speljohan.rsbot.script.wrappers.*;
    import com.speljohan.rsbot.event.events.ServerMessageEvent;
    import com.speljohan.rsbot.event.listeners.ServerMessageListener;
    import com.speljohan.rsbot.accessors.*;
    
    public class CowOwn3r extends Script {
    
        private final int KILLCOWS = 0;
        private final int KILLSCRIPT = 1;
        private int action = 0;
        
        private RSTile playerPosition = null;
        private int standingCount = 0;
        
        private int[] COWID = {1767,81,1768,1766,397,2310, 1767};
        private int FEATHERID = 314;
        private int[] STEELARROW = {886};
        
        private RSTile CowTile = new RSTile(2924,3275);
        
        public String getAuthor( ) {
            return "xX Nicole Xx";
        }
    
        public String getName() {
            return "Cow Own3r";
        }
    
        public String getScriptCategory() {
            return "Combat";
        }
    
        public double getVersion() {
            return 1.0;
        }
        
        public boolean onStart(Map < String, String > args) {
            log("Started CowOwn3r");
    				try {
    			if (args.get("eatsies").equals("") ){
    				log("You don't want to eat");
    				wants2Eat = false;
    
    			}
    
    			else {
    				food = Integer.parseInt( args.get("eatsies") );
    				log("You want to eat");
    				wants2Eat = true;
    			}
    
    		} catch (Exception e) {
    
    		}
            return true;
        }
    		public void checkEat() {
    		int cHealth = skills.getCurrentSkillLevel( STAT_HITPOINTS );
    		int randomInt = random(7, 9);
    		if (cHealth <= randomInt) {
    			atInventoryItem(food, "Eat");
    
    		}
    
    	}
    	    public void serverMessageRecieved(ServerMessageEvent e) {
            if(e.getMessage().contains("You've just advanced a Strength level!"))
                        log("Strength Level Gained!");
            if(e.getMessage().contains("You've just advanced a Defence level!")) {
                        log("Defence Level Gained!");
            }
            if(e.getMessage().contains("You've just advanced an Attack level!")) {
                        log("Attack Level Gained!");
            }
            if(e.getMessage().contains("You've just advanced a Hitpoints level!")) {
                        log("Hitpoints Level Gained!");
            }
            if(e.getMessage().contains("You've just reached Combat level")) {
                        log("Combat Level Gained!");
            }
        }
    	public String getScriptDescription( ) {
    		String html = "";
    
    		html += "<html>\n";
    		html += "<body>\n";
    		html += "<h2>" + getName() + " version" + getVersion() + "</h2><br>\n";
    		html += "Author: " + getAuthor() + "<br><br>\n";
    		html += "Start At Cows next to crafting Guild";
    		html += "<br>Based off Ruski's Chicken killer for Fast switching";
    		html += "<br>We do Not make any guarantees of Bans.";
    		html += "<br>When using this Please use All Antiban. Or similar.";
    		html += "<br>This will kill cows next to Crafting guild ONLY";
    		html += "<br>It Will NOT get Cow hides, Just amazingly Fast EXP!";
    		html += "<br>Enter the ID of food Or just leave blank if you Don't Want to eat<br>";
    		html +=	"ID of food: <input type=\"text\" name=\"eatsies\"><br>";
    		html += "</body>\n";
    		html += "</html\n";
    
    		return(html);
    	}
    
    	public boolean wants2Eat;
    	public int food;
    	public int loop() {
    		if (wants2Eat) {
    			if (inventoryContains(food) ) {
    				checkEat();
    			}
    		}
    
        action = getAction();    
            switch(action) {
                case KILLCOWS:                
                    runControl();
                    RSItemTile arrow = getNearestGroundItemByID(5,STEELARROW);
                    int randomNum = random(0, 5);
                    if(randomNum > 4 && arrow != null) {
                        atTile(arrow, "Steel arrow");
                        return random(900, 1400);
                    }                
                    if(getMyPlayer().getInteracting() != null) {
                        return random(300, 450);
                    }            
                    
                    RSNPC cow = getNearestNextNPCByID(COWID);            
                    if(cow != null) {
                        if(cow.getInteracting() != null && getMyPlayer().getInteracting() == null) {                        
                            return random(100, 200);
                        }                    
                        
                        if(getMyPlayer().getInteracting() == null) {                    
                            clickNPC(cow, "attack");
                            return random(800, 1400);
                        }                    
                        return random(200, 400);
                    }                
                    return random(500, 1000);
                                
                case KILLSCRIPT:
                    log("Stopping scripts - Wrong Tile Position, Please move to Crafting Guild");
                    stopAllScripts();
                    return random(100, 200);
            }        
            
        return random(400, 800);        
        }
    
    	
    
        
        private int getAction() {
            if(distanceTo(CowTile) < 50) {
                return KILLCOWS;
            } else {
                return KILLSCRIPT;
            }                
        }
        
        private void checkPlayerPosition(RSPlayer player) {
            try {
                RSTile currentPosition = player.getLocation();
                if (currentPosition.equals(playerPosition)) {
                    standingCount++;
                }
                if (!currentPosition.equals(playerPosition)) {
                    playerPosition = currentPosition;
                    standingCount = 0;
                }
                switch (standingCount) {
                    case 15:
                        setCameraRotation(getCameraAngle() + random(30, 180));
                        break;
                    case 30:
                        if(canReach(CowTile , false)) {
                            walkTileMM(CowTile);
                            wait(400, 600);
                        }
                        break;
                    case 50:
                        log("Standing still for too long, stopping script");
                        action = KILLSCRIPT;
                        break;
                }
            } catch (Exception e) {
                System.out.print("checkPlayerPosition(RSPlayer) error: " + e);
            }
        }
            
        private void runControl() {
            if (!isRunning() && getEnergy() > random(20, 30)) {
                setRun(true);
            }
        }
        
        public RSItemTile getNearestGroundItemByID(int range, int[] ids) {
            int pX = getMyPlayer().getLocation().getX();
            int pY = getMyPlayer().getLocation().getY();
            int minX = pX - range;
            int minY = pY - range;
            int maxX = pX + range;
            int maxY = pY + range;
            int dist = 100;
            RSItemTile nItem = null;
            for (int x = minX; x <= maxX; x++) {
                for (int y = minY; y <= maxY; y++) {
                    if (Calculations.canReach(new RSTile(x,y), false)){
                        RSItemTile[] items = getGroundItemsAt(x, y);
                        for (RSItemTile item : items) {
                            int iId = item.getItem().getID();
                            for (int id : ids) {
                                if (iId == id) {
                                //    log(""+id+" at "+x+","+y);
                                    if (distanceTo(new RSTile(x,y)) < dist){
                                        dist = distanceTo(new RSTile(x,y));
                                        nItem = item;
                                    }
    
    
    
                                }
                            }
                        }
                    }
                }
            }
            return nItem;
        }
        
        private RSNPC getNearestNextNPCByID(int... ids) {
            int Dist = 20;
            RSNPC closest = null;
            int[] validNPCs = Bot.getClient().getNPCIndexArray();
            NPC[] npcs = Bot.getClient().getNPCArray();
    
            for (int element : validNPCs) {
                if (npcs[element] == null) {
                    continue;
                }        
                RSNPC Monster = new RSNPC(npcs[element]);
                try {
                    for (int id : ids) {
                        if (id != Monster.getID() || Monster.isInCombat() || Monster.getInteracting() != null) {
                            continue;
                        }
                        int distance = getRealDistanceTo(Monster.getLocation(), false);
                        if (distance < Dist) {
                            Dist = distance;
                            closest = Monster;
                        }
                    }
                } catch (Exception e) {}
            }    
            return closest;
        }
        
        private boolean clickNPC(RSNPC npc, String action) {
            if (npc == null) {
                return false;
            }
            RSTile tile = npc.getLocation();
            if (!tile.isValid()) {
                return false;
            }
    
            try {
                Point screenLoc = npc.getScreenLocation();
                if (distanceTo(tile) > 6 || !pointOnScreen(screenLoc)) {
                    turnToTile(tile);
                }
                if (distanceTo(tile) > 20) {
                    walkTileMM(tile);
                    return false;
                }
                for (int i = 0; i < 12; i++) {
                    screenLoc = npc.getScreenLocation();
                    if (!npc.isValid() || !pointOnScreen(screenLoc)) {
                        return false;
                    }
                    moveMouse(screenLoc, 5, 5);
                    if (getMenuItems().get(0).toLowerCase().contains(npc.getName().toLowerCase())) {
                        break;
                    }
                    if (getMouseLocation().equals(screenLoc)) {
                        break;
                    }
                }
                List<String> menuItems = getMenuItems();
                if (menuItems.isEmpty()) {
                    return false;
                }
                for (int a = 0; a < menuItems.size(); a++) {
                    if (menuItems.get(a).toLowerCase().contains(npc.getName().toLowerCase())) {
                        if (menuItems.get(0).toLowerCase().contains(action.toLowerCase())) {
                            clickMouse(true);
                            return true;
                        } else {
                            clickMouse(false);
                            return atMenu(action);
                        }
                    }
                }
            } catch (Exception e) {
                System.out.print("clickNPC(RSNPC, String) error: " + e);
                return false;
            }
            return false;
        }
        
    }
    Enjoy!
    This was made off of Seagullown3r - Ruski's chicken killer. Edited by me to use different methods but also The right npc ids, All the IDS of all cows, The Other ids not at Crafting guild are lumby, Will be editing soon.
    Credits: Ruski, Alche001 - 70%, Me 30% for Converting!
    Please don't add/pm me asking for RSPS help!

    Links:
    - Pastebin
    - Sleeksnap

    Reply With Quote  
     

  2. #2  
    Silverz.
    Guest
    Nice
    Will use on my noob str 20 pure lolz
    Reply With Quote  
     

  3. #3  
    Renown Programmer

    Nikki's Avatar
    Join Date
    Aug 2008
    Posts
    3,992
    Thanks given
    553
    Thanks received
    1,078
    Rep Power
    5000
    i wanted to get 60 str on my Pure, and sell as a mauler but now that i dont have a main im using this to get 40 att 60 str on my pure, make it my main
    Please don't add/pm me asking for RSPS help!

    Links:
    - Pastebin
    - Sleeksnap

    Reply With Quote  
     

  4. #4  
    Silverz.
    Guest
    i dont play rs at all, i just let my botzor do all work then i peekay sometimes, when im bored
    Reply With Quote  
     

  5. #5  
    Registered Member Drunkdrive4's Avatar
    Join Date
    Dec 2008
    Posts
    36
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Awesome script just tested wayy better than any other!


    Reply With Quote  
     

  6. #6  
    Renown Programmer

    Nikki's Avatar
    Join Date
    Aug 2008
    Posts
    3,992
    Thanks given
    553
    Thanks received
    1,078
    Rep Power
    5000
    Ruskie's Script Was the Fastest, And Now i edited for cows. I will make a lumb version Careful tho, It is posible to die with it! ill add Eating later, However Lumb is crowded, and for training fast I suggest Crafting guild.
    Please don't add/pm me asking for RSPS help!

    Links:
    - Pastebin
    - Sleeksnap

    Reply With Quote  
     

  7. #7  
    Pj then Pk
    Guest
    The Power Cower is also good but this is pretty good too. If you die with the power cower it walks you back
    Reply With Quote  
     

  8. #8  
    Byte Me Hard
    Bytes Me's Avatar
    Join Date
    Nov 2007
    Posts
    254
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    Will this like work for a leet rune pure 46cb? lol jk, looks nice tested it on my rune pure got like 2-4str lvls, and stuff, 40att 42str 40def pro rune pure rite rite.

    Thanks, btw isnt this on the RSbot 533 already, saw something similiar to it.


    ~Creative


    Thanks Daza!
    Reply With Quote  
     

  9. #9  
    Banned HEADLEY's Avatar
    Join Date
    Dec 2007
    Age
    28
    Posts
    366
    Thanks given
    5
    Thanks received
    1
    Rep Power
    0
    Great Script!
    Reply With Quote  
     

  10. #10  
    hihihihihihihihih
    wtfdonkey's Avatar
    Join Date
    Nov 2007
    Age
    27
    Posts
    786
    Thanks given
    110
    Thanks received
    8
    Rep Power
    855
    dude nicole i frigging love this script, it got me 30 atk, 56 str, 2 days ty!!!!!!
    Reply With Quote  
     

Page 1 of 3 123 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •