Jump to content

DragonTTK

Trade With Caution
  • Posts

    22
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by DragonTTK

  1. Hi i am trying to setup a basic script that will detect if there are x amount of whatever item on ground and if there is then pick it up otherwise it would just ignore it, how would i go about doing this i've tried the following but it doesn't seem to be working thanks.

    GroundItem item1 = groundItems.closest(id);
    			if (item1.getAmount() >= 28) {
    				item1.interact("Take");
    			}

     

  2. Hello i need a sprite sheet created for a 2d game i am working on i provided an example below of a sprite sheet that fits my needs if you can create something like this please post below how much you would like and you're attempt with watermark etc i do not want a remake of this example this is just showing what a sprite sheet is i would like the character to be a white male with just boxers and no weapon in hand.

     

    Size: Same as example but maybe just a little more height.

     

    Example:

    professor_walk_cycle_no_hat.png

     

     

    • Like 1
  3. I am trying to make a script and it will constantly keep clicking on the NPC regardless of if its already in combat or not and will sometimes try to switch to another npc in combat how would i go about stopping this?

     

    Note im really new to this and would like to get into this sort of stuff.

     

    Heres the code im using (Guard killer)

     

     

     

    package GuardKiller;

    import org.osbot.rs07.api.model.GroundItem;
    import org.osbot.rs07.api.model.NPC;
    import org.osbot.rs07.script.Script;
    import org.osbot.rs07.script.ScriptManifest;

    import java.awt.*;
    import java.awt.image.BufferedImage;
    import java.io.IOException;

    import javax.imageio.ImageIO;


    @ScriptManifest(author = "Skeleton", info = "Kills falador guards", name = "Guard Killer", version = 1, logo = "http://osbot.org/images/logo.png")
    public class GuardKiller extends Script {
        
        BufferedImage background;
        
        @Override
        public void onStart() {
            try{

    background = ImageIO.read(GuardKiller.class.getResourceAsStream("/GuardKillers/images/bg.png"));
    } catch(IOException e){

    log(e);
    }
        }

        private enum State {
            KILL, LOOT, WAIT, BANK, WALK,
        };

        private State getState() {
            NPC guard = npcs.closest("Guard");
            GroundItem loot = groundItems.closest("{Medium} Clue Scroll");
            if (guard != null)
                return State.KILL;
            if (loot != null)
                return State.LOOT;

            return State.WAIT;
        }

        @Override
        public int onLoop() throws InterruptedException {
            switch (getState()) {
            case KILL:
                NPC guard = npcs.closest("Guard");
             if(guard != null){
             guard.interact("Attack");
             log("Status: Attacking...");
             }
                break;
                
            case LOOT:
                GroundItem loot = groundItems.closest("{Medium} Clue Scroll");
                if (loot != null) {
                    loot.interact("Take");
                    log("Status: Looting...");
        
                }
                break;
            
            case WAIT:
                log("Status: Waiting...");
                sleep(random(500, 600));
                break;
                
            case BANK:
                log("Status: Banking...");
                break;
                
            case WALK:
                log("Status: Walking...");
                break;
        }
        return random(200, 300);

        }
        
        @Override
        public void onExit() {
        }
        
        @Override
    public void onPaint(Graphics2D g){
            
    if(background != null){

    g.drawImage(background, null, 149, 154);
    g.drawString("Guard killer", 37, 270);
    }

    }
        

     

  4. I've noticed this script stands there doing nothing during dwarf part of RFD and on chompy when you have to get the bird for the orge it just sits there doing nothing (had it there for like an hour)

×
×
  • Create New...