Jump to content

Chikan

Members
  • Posts

    902
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    100%

Posts posted by Chikan

  1. I just started writing scripts for OSbot, but have been in school for programing for about 2 months now.

     

    To a total beginner, I'd stress taking things one at a time. Ie. For a combat script, making it attack the monster, then making it wait to attack because you're in combat, then make it eat food.

     

    Try not to right away think of doing it all at once, because you may get overwhelmed. Make sure you read some guides, Explv's helped me and a couple others did.

    Good luck. :)

  2. Chikan's Varock West Smither

    GUI

    3704a0b9e4591c8b9687ccec7dce9d3c.gif

    Features:

    32802ecf32e63453f2db6751e85b06b7.png

    Requirements:

    None, just start with a hammer in your inventory.

    Updates:

    v1.1 - Fixed some logic involving banking to make it more responsive

    v1.2 - Fixed a bug involving the script being stuck on a loop when the user ran out of materials, and also removed the make-X option and added make all in its place. Also I cleaned up the paint a little bit and added a display for xp gained.

    Download:

    --TBA--

    Will give testers a .jar to use until the script is eligeble for SDN

    Teaser:

     

    :boge:

    48cda837fe0f1ef033f7568eee2d31d8.gif

     

     

     

    Proggies:

     

    My proggies & some of the users proggies from the community

    8f17ff393ca1d718f2effb96e209782d.png

     

    • Like 3
  3. 1 minute ago, Deathimminent said:

    Isn't your bank handler going to deposit your hammer as well when you deposit all? I don't see where you withdraw your hammer again to be able to smith.

    Yeah, you're right. I just fixed it I think, but I got lazy and just added bank fillers so I didn't make a difference when I was testing.

  4. Made my first script today, and by first I mean first OSBot script. I struggled through the API, so be gentle: I'm learning.

     

    import org.osbot.rs07.script.Script;
    import org.osbot.rs07.script.ScriptManifest;
    import org.osbot.rs07.api.map.constants.Banks;
    import org.osbot.rs07.api.ui.RS2Widget;
    
    @ScriptManifest(author = "Chikan", name = "Dagger Maker 3.0", info = "Dagger Maker 3.0", version = 0.3, logo = "")
    public final class Main extends Script  
    {
    	public enum State {
    		USEANVIL, SMITH, BANK, WAIT		
    	}
    	
    	private State getState()
    	{
    		RS2Widget smithingInterface = getWidgets().get(312, 2, 2);
    		if(smithingInterface == null&&canSmithBars())
    			return State.USEANVIL;
    		if (smithingInterface != null&&canSmithBars())
                return State.SMITH;
    		if (!getInventory().contains("Bronze Bar"))
    		
    			return State.BANK;
    		return State.WAIT;
    	}
    	
        @Override
        public final int onLoop() throws InterruptedException 
        {
           switch (getState()) {
        	   case USEANVIL:
        		   getObjects().closest("anvil").interact("Smith");
        		   sleep(random(3000, 4000));
        		   log("starting state: USEANVIL");
        		   break;
        	   case SMITH:
        		   log("starting state: SMITH");
        		   getWidgets().get(312, 2, 2).interact("Smith 10");
        		   sleep(random(12500, 14500));
        		   break;
        	   case BANK:
        		   log("starting state: BANK");
        		   bankHandler();
        	   case WAIT:
       			log("starting state: Wait");
       			sleep(random(250, 700));
       			break;
           }
        	return random(200, 400) ;
        }
           
        //space for making variables
        //inventory check
        private boolean canSmithBars() {
        	return getInventory().contains("Bronze Bar");
        }
        
         //anvil entity
        public boolean useAnvil() {
        	return getObjects().closest("anvil").interact("Smith");
        }
        
        //bank handler (if statement loop)
        private void bankHandler() throws InterruptedException 
        {
        	if (!Banks.VARROCK_WEST .contains(myPosition())) {
                getWalking().webWalk(Banks.VARROCK_WEST );
            } else if (!getBank().isOpen()) {
                getBank().open();
            } else if (!getInventory().isEmptyExcept("Bronze Bar", "Hammer")) {
                getBank().depositAll();
            } else if (getBank().contains("Bronze Bar")) {
                getBank().withdrawAll("Bronze Bar");
            } else {
                stop(true);
            }
        } 	
    }

     

  5. 197ff928fef8cbda943a63dc9bd411b8.png

    d720de6d2f341c333b4c9330bfa0722a.png

    1a0b20f5060b3544a868c0df85c22051.gif

    cd26c2aa9b9665ab93421ae03823583c.gif

    Noteable quests: Zulrah unlocked, horror from the deep, MM1, Lunar Dip.

     

    Account has no bans, I'm looking to get what it's worth right now. Not what it's worth with X or Y.

    Thanks :)

    • Like 1
  6. 2 hours ago, DSJR said:

    assuming i would not sell this until i have alot more.. then what would you say? i just cant think of selling this for 30m lol.. 

    assuming prayer is quested, and you could get mith gloves. I could see it selling for 50-60m, much more if you got 94 mage and ancients. :boge:

    • Like 1
  7. 9 minutes ago, DSJR said:

    er.. ive had higher pc few months ago.. lol thanks tho..

    Keep in mind that you have 19 posts (at the time of my response) & you have no feedback. Account value can vary heavily depending on that.

×
×
  • Create New...