Jump to content

Kitty Kaster - Stun/Weaken/Curse Monk of Zamorak in Varrock Castle


Recommended Posts

Posted (edited)

About Me:

I have been out of the RS scene for many years.

 

Back then I use to script for RSbot and aided in developing sharpF/Kbot.

 

Anyway, I decided to start playing again with a friend and needed a few decent scripts.

 

I was unable to find a decent curser so I decided to make my own.

 

I would use this to train mage from 3-55.

 

Averages about 30k/hour

 

It will automatically switch between the spells as they become available.

 

Jar: Kitty_Kaster.zip. (Zipped due to file restrictions)

 

I can attach the source if requested.

 

Stand right outside the monks cell in varrock castle and start the script.

 

If you enjoy this be sure to let me know and I will continue developing.

 

Screens:

post-133701-0-45048500-1419842774_thumb.jpg

post-133701-0-10597800-1421127240_thumb.jpg

Edited by whiped
  • Like 1
  • 2 weeks later...
  • 2 weeks later...
Posted

Please attatch the source smile.png

No problem, here it is:

 

import java.awt.*;
import java.awt.event.MouseEvent;

import org.osbot.rs07.api.model.NPC;
import org.osbot.rs07.api.ui.Skill;
import org.osbot.rs07.api.ui.Spells;
import org.osbot.rs07.api.ui.Tab;
import org.osbot.rs07.input.mouse.BotMouseListener;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author = "Kitty", info = "Casts Stun, Weaken and Curse on the Monk of Zamorak in Varrock Castle", name = "Kitty Kaster", version = 1.1, logo = "https://lh3.googleusercontent.com/-Aum1ZjEU_KY/TnpVdyzR2XI/AAAAAAAAAD4/jmUZ7pL4iYM/s150-c/photo.jpg")
public class main extends Script
{

	private long startTime;
	private int magicStartLevel;
	private int magicStartXP;
	private long numBody = 0;
	private int errorCheck = 0;
	private boolean mouseClick;

	@Override
	public void onStart()
	{
		startTime = System.currentTimeMillis();
		mouseClick = false;
		antiBan.initializeModule();
		magicStartXP = skills.getExperience(Skill.MAGIC);
		magicStartLevel = skills.getStatic(Skill.MAGIC);
		numBody = inventory.getAmount("Body rune");
		
		bot.addMouseListener(new BotMouseListener() {
			@Override
			public void mousePressed(MouseEvent e) {}
			@Override
			public void mouseReleased(MouseEvent e) {}
			@Override
			public void mouseClicked(MouseEvent e) {mouseClick=true;}
			@Override
			public void mouseEntered(MouseEvent e) {}
			@Override
			public void mouseExited(MouseEvent e) {}
			@Override
			public boolean blockInput(Point arg0) {return false;}
		});
	}

	@Override
	public int onLoop() throws InterruptedException
	{
		tabs.open(Tab.MAGIC);
		NPC monk = npcs.closest("Monk of Zamorak");
		if(monk!=null && (monk.getInteracting() == null || monk.getInteracting().getName().equals(myPlayer().getName()))) {
			if(magic.isSpellSelected())
				magic.deselectSpell();
			if (!inventory.contains("Body rune")) {
				stop(true);//Error
				getLogoutTab().logOut();
				log("Ran out of Body Runes, casted " + numBody + " times!");
			}
			else if(magic.canCast(Spells.NormalSpells.CURSE)) {
				magic.castSpellOnEntity(Spells.NormalSpells.CURSE, monk);
				errorCheck=0;
			}
			else if(magic.canCast(Spells.NormalSpells.WEAKEN)) {
				magic.castSpellOnEntity(Spells.NormalSpells.WEAKEN, monk);
				errorCheck=0;
			}
			else if(magic.canCast(Spells.NormalSpells.CONFUSE)) {
				magic.castSpellOnEntity(Spells.NormalSpells.CONFUSE, monk);
				errorCheck=0;
			}
			else {
				errorCheck++;
			}
		}
		else {
			errorCheck++;
		}
		if(errorCheck>12){
			stop(true);//Error
			getLogoutTab().logOut();
			log("Monk not found or busy, exited after ~30 seconds");
		}
		sleep(random(300,500));
		if(random(1,100)<30)
			mouse.moveSlightly();
		else if(random(1,100)<20)
			mouse.moveRandomly();
		sleep(random(300,500));
		return random(1000, 1500);
	}

	@Override
	public void onExit() {
		long elapsed = System.currentTimeMillis() - startTime;
		log("-------Finished Kitty Kaster-------");
	    log("-----Ran For: " + format(elapsed).toString());
	    log("-----Number of Casts: " + (int)(numBody-inventory.getAmount("Body rune")));
	    log("-----XP Gained: " + (int)(skills.getExperience(Skill.MAGIC)-magicStartXP));
	    log("-----Levels Gained: " + (int)(skills.getStatic(Skill.MAGIC)-magicStartLevel));
	}
	
	@Override
	public void onPaint(Graphics2D g)
	{
		g.setColor(Color.CYAN);
		g.setFont(new Font ("SansSerif", Font.BOLD , 16));
		if(!mouseClick){
			if(errorCheck>0)
				g.drawString(Integer.toString(errorCheck), this.mouse.getPosition().x-6, this.mouse.getPosition().y+6);
			else
				g.drawString("•", this.mouse.getPosition().x-6, this.mouse.getPosition().y+6);
		}
		else {
			mouseClick=false;
		}
		
		long elapsed = System.currentTimeMillis() - startTime;
		g.setStroke(new BasicStroke(2));
		g.setColor(Color.CYAN);
		g.drawRect(1, 254, 250, 82);
		
		g.setStroke(new BasicStroke(1));
		g.setColor(new Color(0, 0, 0, .7f));
		g.fillRect(4, 255, 246, 80);
		
		//Title
		g.setColor(Color.WHITE);
		g.setFont(new Font ("Jokerman", Font.PLAIN , 16));
		g.drawString("Kitty Kaster", 5, 270);
		
		//Time
		g.setColor(Color.RED);
		g.setFont(new Font ("SansSerif", Font.BOLD , 12));
		g.drawString("Time Running:", 118, 270);
		g.setColor(Color.WHITE);
		g.setFont(new Font ("SansSerif", Font.PLAIN , 12));
		g.drawString(format(elapsed).toString(), 200, 271);
		
		//Progress Bar
		g.setFont(new Font ("SansSerif", Font.BOLD , 12));
		g.setColor(Color.BLACK);
		g.fillRect(10, 279, 232, 15);
		double delta = skills.getExperienceForLevel(skills.getStatic(Skill.MAGIC) + 1) - skills.getExperienceForLevel(skills.getStatic(Skill.MAGIC));
		double percentage = (100 - skills.experienceToLevel(Skill.MAGIC) / (delta / 100));
		g.setColor(new Color(79, 192, 24));
		g.fillRect(11, 280, (int) (230 * (percentage / 100)), 13);
		if (percentage < 55) g.setColor(Color.WHITE);
		else g.setColor(Color.BLACK);
		g.drawString(((int) percentage) + "%", 115, 291);

		//Stats
		g.setColor(Color.WHITE);
		g.setFont(new Font ("Monospaced", Font.PLAIN , 12));
		g.drawString("Lvls: +" + (int)(skills.getStatic(Skill.MAGIC)-magicStartLevel), 15, 310);
		g.drawString("XP  : +" + (int)(skills.getExperience(Skill.MAGIC)-magicStartXP), 15, 325);
		
		g.drawString("XP TNL: " + skills.experienceToLevel(Skill.MAGIC), 133, 310);
		g.drawString("Casts : " + (int)(numBody-inventory.getAmount("Body rune")), 133, 325);

	}

	public String format(long time)
	{
		long totalSeconds = time / 1000L;
		long totalMinutes = totalSeconds / 60L;
		long totalHours = totalMinutes / 60L;
		int seconds = (int) totalSeconds % 60;
		int minutes = (int) totalMinutes % 60;
		int hours = (int) totalHours % 24;
		return String.format("%02d:%02d:%02d", hours, minutes, seconds);
	}
}

 

Any chance u want to add a feature for splashing? Just have it sit there while it splashes for 6 hours and does nothing. Then when it logs out you have it log back in and attack the user specified target? That would be awesome haha let me know what you think.

There is not really a point in this as it is easily done without a script....

Why bot something you don't have to?

If you want it to stop after 6 hours you could just do it with batch.

Normally if I just want something to run for say 3 hours and then close and shutdown my computer I run this via CMD:

shutdown /f /s /t 10800
to cancel the above command:

shutdown /a
  • 1 month later...
  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...