Jump to content

TzTok Wine Maker


TzTok Jad
 Share

Recommended Posts

MY SUPER BASIC
PROBABLY GONNA GET YOU BANNED

WINE MAKER

What it does:
Make wine!

How to:
Start at any bank that has banker NPCs, make sure you have Jugs of Water and Grapes in your bank or inventory.

Features:
NONE! Maybe I'll add some "antiban" and paints who knows.

DOWNLOAD:
CLICK HERE

SOURCE:


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

import java.awt.*;


@ScriptManifest(name = "TzTok Wine Maker", author = "TzTok Jad", version = 1.0, info = "Makes wines. Super basic, love Jad.", logo = "") 
public class WineMaker extends Script {

	public int wineMade;
	public int expGained;
	public boolean makingWine;
	public String grapes = "Grapes";
	public String jugwater = "Jug of water";
	public String unfwine = "Unfermented wine";
	


    @[member=Override]
    public void onStart() throws InterruptedException {
        //Code here will execute before the loop is started
    	log("Starting TzTok Wine Maker");
    	makingWine = false;
    }
    
    @[member=Override]
    public void onExit() {
        //Code here will execute after the script ends


    }
	public enum scriptState{
		MAKEWINE, BANK, NULL, END
	}
	
	public scriptState getState() {
		if (inventory.contains(grapes) && inventory.contains(jugwater) && makingWine == false){
			return scriptState.MAKEWINE;
		}
		if (inventory.isEmptyExcept(unfwine) || inventory.isEmptyExcept("Jug of wine")){
			return scriptState.BANK;
		}
		else{
			return scriptState.NULL;
		}
			
		}


    @[member=Override]
    public int onLoop() throws InterruptedException {
    	

    	switch(getState()){


    	case MAKEWINE:
    		inventory.getItem(grapes).interact();
    		sleep(random(700,1200));
    		inventory.getItem(jugwater).interact();
    		sleep(random(700,1200));
    		while(getWidgets().get(309, 2).isVisible()){
        		sleep(random(700,1200));
    			getWidgets().get(309, 2).interact("Make All");
        		makingWine = true;
    		}
    		break;
    	case BANK:
        	NPC banker = npcs.closest("Banker");
    		banker.interact("Bank");
    		sleep(random(700,1200));
    		bank.depositAll();
    		sleep(random(700,1200));
    		if(inventory.isEmpty()){
    		bank.withdraw(jugwater, 14);
    		sleep(random(700,1200));
    		bank.withdraw(grapes, 14);
    		sleep(random(700,1200));
    		bank.close();
    		makingWine = false;
    		} 		
    		break;
    	case NULL:
    		log("NULL");
    		break;
    		
    	}
    	
        return 800; //The amount of time in milliseconds before the loop starts over
    }


    @[member=Override]
    public void onPaint(Graphics2D g) {
        //This is where you will put your code for paint(s)




    }


}
  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

 Share

  • Recently Browsing   0 members

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