Jump to content

Aftabdear's GoblinKiller


Recommended Posts

Posted

GoblinKiller

- First script ever made includes no antibans or banking

-very basic just clicks and attacks the goblins 

-will be adding an antiban & banking support

-will be adding a deathwalker support

anyways her is the script,

 

DOWNLOAD:  http://www.mediafire.com/file/1wocoivsei6pd79/GoblinKiller.jar

 

 

Here is the open code:

import org.osbot.rs07.api.map.Area;
import org.osbot.rs07.api.model.NPC;
import org.osbot.rs07.api.model.Player;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

import java.awt.*;

@ScriptManifest(author = "Aftabdear", info = "Simple Goblin Killer", name = "GoblinKiller", version = 0.1, logo = "")
@SuppressWarnings("unused")
public class GoblinKiller extends Script {

	Area GOBLIN_SPOT = new Area(
			new int[][]{
		        { 3240, 3252 },
		        { 3240, 3243 },
		        { 3243, 3240 },
		        { 3244, 3235 },
		        { 3246, 3233 },
		        { 3249, 3232 },
		        { 3251, 3230 },
		        { 3252, 3229 },
		        { 3255, 3230 },
		        { 3257, 3230 },
		        { 3259, 3230 },
		        { 3262, 3230 },
		        { 3264, 3229 },
		        { 3266, 3229 },
		        { 3266, 3230 },
		        { 3266, 3232 },
		        { 3266, 3234 },
		        { 3266, 3236 },
		        { 3265, 3240 },
		        { 3265, 3242 },
		        { 3265, 3244 },
		        { 3265, 3245 },
		        { 3264, 3246 },
		        { 3264, 3248 },
		        { 3264, 3249 },
		        { 3264, 3250 },
		        { 3264, 3251 },
		        { 3264, 3252 },
		        { 3264, 3253 },
		        { 3264, 3253 },
		        { 3240, 3254 }});
		        
	Player[] randomPlayers = new Player [] {};
	private String Goblins;
	
public boolean isGoblin() {
	NPC Goblin = npcs.closest(Goblins, "Goblin");
    
	
	if (Goblin.isUnderAttack()){
		 return true;
	} else return false;
}

public void OnStart() throws InterruptedException {
	log("Here it begins");
}

private enum State { KILL, IDLE};

@SuppressWarnings("unused")
private State getState() {
	 if (GOBLIN_SPOT.contains(myPlayer()) && !myPlayer() .isAnimating())
		 return State.KILL;
	 else
	return State.IDLE;	 
			
}
	
	
	
	@Override
	public int onLoop() throws InterruptedException {
	
	switch(getState()) {	
	case KILL:
			NPC Goblin = npcs.closest(Goblins, "Goblin");
			
			if (GOBLIN_SPOT.contains(myPlayer())) {
				if (Goblin.getAnimation() ==3029);
				Goblin.interact("Attack");
			}else if (Goblin == null)
				getWalking().webWalk(GOBLIN_SPOT);    
	case IDLE: 
		log("case IDLE:");
        break;
			
	}
	return 1000;
  
	
}}

 

 

Posted (edited)
if (GOBLIN_SPOT.contains(myPlayer())) {
				if (Goblin.getAnimation() ==3029);
				Goblin.interact("Attack");
			}else if (Goblin == null)
				getWalking().webWalk(GOBLIN_SPOT);    

I'm not really sure on your area as I haven't bothered looking into it, but this has the possibility to freeze, if the goblin is outside of the goblin spot, but the player is not, it will agro onto the goblin, moving you outside of the goblin zone. After you've killed your goblin, it isn't in the goblin spot, so it enters the idle case.

Edited by Hydra
  • Like 1
  • 4 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...