Jump to content

Aftabdear's GoblinKiller


aftabdear

Recommended Posts

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;
  
	
}}

 

 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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