klongrich 0 Share Posted October 30, 2019 package main; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.Category; import org.dreambot.api.script.ScriptManifest; import org.dreambot.api.methods.map.Area; import org.dreambot.api.wrappers.interactive.NPC; import org.dreambot.api.wrappers.widgets.WidgetChild; @ScriptManifest(category = Category.MISC, name="Hide Tanner", author="klongrich", version=1) public class hideTanner extends AbstractScript { private Area AlkhairdBank = new Area(3270, 3166, 3271, 3168); private Area TanningShop = new Area(3277, 3190, 3274, 3193); private void BankCowhides() { getWalking().walk(AlkhairdBank.getRandomTile()); if(AlkhairdBank.contains(getLocalPlayer())) { NPC Banker = getNpcs().closest("Banker"); Banker.interact("Bank"); getBank().depositAllExcept("Coins"); getBank().withdrawAll("Cowhide"); } } private void TanCowhides() { NPC Ellis = getNpcs().closest("Ellis"); Ellis.interact("Trade"); WidgetChild TanInterface = getWidgets().getWidgetChild(324, 133); TanInterface.interact("Tan all"); } @Override public int onLoop() { if (getInventory().contains("Hard leather")) { BankCowhides(); } else if (TanningShop.contains(getLocalPlayer())) { TanCowhides(); } else { getWalking().walk(TanningShop.getRandomTile()); } return 1000; } } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.