Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import static org.rev317.min.api.methods.Players.getMyPlayer;
- import java.awt.*;
- import java.io.IOException;
- import java.net.URL;
- import org.parabot.environment.api.utils.Time;
- import org.parabot.environment.scripts.Category;
- import org.parabot.environment.scripts.Script;
- import org.parabot.environment.scripts.ScriptManifest;
- import org.parabot.environment.scripts.framework.LoopTask;
- import org.rev317.min.api.methods.Inventory;
- import org.rev317.min.api.methods.Menu;
- import org.rev317.min.api.methods.Players;
- import org.rev317.min.api.methods.Skill;
- import org.rev317.min.api.wrappers.Character;
- import org.rev317.min.api.wrappers.Item;
- import org.rev317.min.api.wrappers.Player;
- @ScriptManifest(author = "God Poe X D",
- category = Category.COMBAT, description = "Makes you santaly",
- name = "AutoEater",
- servers = { "Ikov" },
- version = 0.3)
- public class Autoeater extends Script implements LoopTask {
- public static boolean ragbot420 = true;
- public static int superRestoreID = 14416;
- public static int saradominBrewID = 14129;
- @Override
- public int loop() {
- int i = (int) (290 + (90 * Math.random()));
- Time.sleep(i);
- if (ragbot420 == true) {
- if (Inventory.containts(14129, 14127, 14125, 14123, 14420, 14418) //check to see if i still have brews
- && Inventory.containts(14416, 14414, 14412, 14410, 14408, 14406)) { //check to see if i still have restores
- if (Skill.PRAYER.getLevel() < 1) { //if smited then try to tele, need to improve this cuz tb + zbow = ez divine
- teleToHome(); //tries to tele
- while (Skill.PRAYER.getLevel() < 20) {
- drinkRestore(); //spams restore, it's a while loop so that it wont brew
- }
- reactivatePray();
- }
- if (Skill.PRAYER.getLevel() < 66) { //check if i need to ppot
- drinkRestore();
- }
- if (Skill.HITPOINTS.getLevel() < 99) { //check if i need to eat
- drinkBrew();
- }
- if (Skill.RANGE.getLevel() < 66) { //check if i need to restore, not with ppot part because this is lower priority/importance than hp/brew
- drinkRestore();
- }
- } else { //either no brews or restores, so you need to tele, gf divine if tbed #pm5wayin
- teleToHome();
- }
- }
- return 0;
- }
- void drinkRestore() {
- if (Inventory.getCount(superRestoreID) > 0) { //check to make sure that you have a potion of that dose before you try drinking it
- Item[] superRes = Inventory.getItems(superRestoreID);
- Menu.sendAction(74, superRestoreID - 1, superRes[0].getSlot(), 3214, 2106, 4); //drinks restore
- }
- superRestoreID -=2; //cycles through restore IDs (ie various doses)
- if (superRestoreID < 14406) {
- superRestoreID = 14416;
- }
- }
- void drinkBrew() {
- if (Inventory.getCount(saradominBrewID) > 0) { //check to make sure that you have a potion of that dose before you try drinking it
- Item[] saraBrews = Inventory.getItems(saradominBrewID);
- Menu.sendAction(74, saradominBrewID - 1, saraBrews[0].getSlot(), 3214, 2106, 4); //drinks brew
- }
- if (saradominBrewID == 14123) { //these two if statements
- saradominBrewID = 14420; //cycle through the IDs of
- } else { //sara brew doses
- saradominBrewID -=2;
- }
- if (saradominBrewID == 14416) {
- saradominBrewID = 14129;
- }
- }
- void teleToHome() {
- Menu.sendAction(646, 343, 512, 30000, 598, 1); //home tele in spellbook
- Menu.sendAction(315, 255, 350, 2461, 1088, 1); //click on teleport to home (as opposed to other option, market)
- }
- void reactivatePray() {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement