-
-
Save Pizzamaster59/f5fea4b8c06f38014ca3 to your computer and use it in GitHub Desktop.
fff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Leonid on 10/17/2015. | |
*/ | |
import org.tbot.internal.AbstractScript; | |
import org.tbot.internal.Manifest; | |
import org.tbot.internal.ScriptCategory; | |
import org.tbot.internal.handlers.LogHandler; | |
import org.tbot.methods.NPCChat; | |
import org.tbot.methods.Npcs; | |
import org.tbot.methods.Time; | |
import org.tbot.methods.tabs.Inventory; | |
import org.tbot.methods.walking.Path; | |
import org.tbot.methods.walking.Walking; | |
import org.tbot.util.Condition; | |
import org.tbot.wrappers.NPC; | |
import org.tbot.wrappers.Tile; | |
/** | |
* Created by Leonid on 10/17/2015. | |
* 2954,3146 - customs off | |
* 2956,3143,1 - ship to karmj | |
* 3032,3217,1 - ship to bank | |
* 3028,3217 - seemen | |
* 3045,3235 - deposit box | |
* 2925,3180 - lobbers | |
* continue - 1 - c - c - 2 - c - 1 | |
*/ | |
@Manifest(authors = "me", name = "test2", category = ScriptCategory.MINIGAMES) | |
public class karamajaja extends AbstractScript { | |
private boolean bank() { | |
return Inventory.isFull(); | |
} | |
NPC toLobber = Npcs.getNearest("Seaman Lorris"); | |
NPC toBank = Npcs.getNearest("Customs officer"); | |
@Override | |
public int loop() { | |
if (!bank()) { | |
final Path shiptolob = Walking.findPath(new Tile(3028, 3217)); | |
if (Walking.isRunEnabled() && Walking.getRunEnergy() > 50) { | |
Walking.setRun(true); | |
} | |
if (shiptolob != null) { | |
shiptolob.traverse(); | |
} | |
if (toLobber.isOnScreen() && toLobber != null && !NPCChat.isChatOpen()) { | |
toLobber.interact("Talk-to"); | |
Time.sleepUntil(new Condition() { | |
@Override | |
public boolean check() { | |
return NPCChat.isChatOpen(); | |
} | |
}); | |
} else if (NPCChat.isChatOpen() && NPCChat.canContinue()) { | |
NPCChat.clickContinue(); | |
} else { | |
NPCChat.selectOption("Yes please."); | |
} | |
} | |
return 120;} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment