Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

CTucker1327

Registered
  • Content Count

    38
  • Joined

  • Last visited

  • Feedback

    0%

Community Reputation

0 Neutral

About CTucker1327

  • Rank
    New Botter
  • Birthday 07/18/1994
  1. DERPPPPPPPPPPPP I'm retarded. do this: in the run method add a while loop and make the argument true inside the while loop add your loop method public void startLoop() { General.sleep(250); } public void run() { while(true) { startLoop(); } }Yeah, I know. I was just really tired when writing it and completely left the loop() function out.
  2. When I read this snippet.... one thing came into mind...
  3. Thanks, I'll abuse this maliciously.
  4. use botstates, if you'd like more information on this add my skype (XenoTools)
  5. Method hasESS() RSItem[] items = Items on the interface for all items on the interface { items = items on the interface (??? Not sure why you did this twice) if the item ID in slot is equal to the ESS ID { dx = (i -24) * 48 ---- (The fuck is this?) return the slot number.
  6. [17:27:58] Script Started: XenoProgress.[17:27:59] Script Ended: XenoProgress.Just a script that displays a paint (For EXP Counting when playing legit) package scripts;import java.awt.Graphics;import org.tribot.api.General;import org.tribot.api.Inventory;import org.tribot.api2007.Player;import org.tribot.api2007.Skills;import org.tribot.script.Script;import org.tribot.script.ScriptManifest;import org.tribot.script.interfaces.Painting;@ScriptManifest(authors = { "CTucker1327" }, category = "Misc", name = "XenoProgress")public class XenoProgress extends Script implements Painting { private static enum BotState { IDLE, COMBAT }; private BotState state; private final long START_TIME = System.currentTimeMillis(); public int attackLevel = Skills.getActualLevel("Attack"), currAttack, attackStarting = Skills.getXP("Attack"), strengthLevel = Skills.getActualLevel("Strength"), currStrength, strengthStarting = Skills.getXP("Strength"), defenseLevel = Skills.getActualLevel("Defence"), currDefence, defenceStarting = Skills.getXP("Defence"), hitpointsLevel = Skills.getActualLevel("Hitpoints"), currHitpoints, hitpointsStarting = Skills.getXP("Hitpoints"), rangedLevel = Skills.getActualLevel("Range"), currRanged, rangedStarting = Skills.getXP("Range"), magedLevel = Skills.getActualLevel("Magic"), currMaged, magedStarting = Skills.getXP("Magic"); @Override public void onPaint(Graphics g) { currAttack = Skills.getXP("Attack"); currStrength = Skills.getXP("Strength"); currDefence = Skills.getXP("Defence"); currHitpoints = Skills.getXP("Hitpoints"); currRanged = Skills.getXP("Range"); currMaged = Skills.getXP("Magic"); long timeRan = System.currentTimeMillis() - START_TIME; double multiplier = timeRan / 3600000D; int gainedAttack = currAttack-attackStarting, gainedStrength = currStrength-strengthStarting, gainedDefence = currDefence-defenceStarting, gainedHP = currHitpoints - hitpointsStarting, gainedRange = currRanged - rangedStarting, gainedMage = currMaged - magedStarting; int gainedAttackHR = (int) (gainedAttack/multiplier), gainedStrengthHR = (int)(gainedStrength/multiplier), gainedDefenceHR = (int)(gainedDefence/multiplier), gainedHPHR = (int)(gainedHP/multiplier), gainedRangeHR = (int)(gainedRange/multiplier), gainedMageHR = (int)(gainedMage/multiplier); int damageDone = gainedStrength / 4; //g.drawString("Attack Exp Gained: " +gainedAttack+ " || P/Hr: " +gainedAttackHR, 10, 35); g.drawString("Strength Exp Gained: " +gainedAttack+ " || P/Hr: " +gainedStrengthHR, 10, 35); //g.drawString("Defence Exp Gained: " +gainedDefence+ " || P/Hr: " +gainedDefenceHR, 10, 65); g.drawString("Health Exp Gained: " +gainedHP+ " || P/Hr: " +gainedHPHR, 10, 50); //g.drawString("Ranged Exp Gained: " +gainedRange+ " || P/Hr: " +gainedRangeHR, 10, 95); //g.drawString("Magic Exp Gained: " +gainedMage+ " || P/Hr: " +gainedMageHR, 10, 110); g.drawString("Damage Done = " +damageDone, 10, 65); } @Override public void run() { General.sleep(250); } public BotState setState() { if(Player.getRSPlayer().isInCombat()) return BotState.COMBAT; return BotState.IDLE; }}Ideas?
  7. Oh I'm going to abuse this maliciously....
  8. That, my friends, requires interfaces. Which i have STILL YET TO FUCKING FIGURE OUT, how to debug with tribot Interfaces are quite annoying. I'm currently working on a law runner with balloon transport method, but I can't figure out how to tell if the balloon transport interface is open >.> I just want to know what's wrong with mine, as I've done every measure possible to stop the error from accuring, null checks and whatnot, the code shouldn't even be run if the array is empty. :Pissyface:
  9. That, my friends, requires interfaces. Which i have STILL YET TO FUCKING FIGURE OUT, how to debug with tribot
  10. Here's my law rune crafter script, it's set up so you start in draynor with tiara equiped.. Reason it's here -- only 90% completed, and no paint. Too lazy to continue with it as it was just a contribution, if I see a law-runner that is very basic being released for cash, I'll create a nice advanced one and release it for free. Simple as that. No leaching. Segmant of Code error is in case CRAFT_RUNES: RSObject[] Table = Objects.findNearest(10, tableID); RSObject[] Portal = Objects.findNearest(10, portalID); Walking.walkTo(toTable[1]); General.sleep(1000); if(Table != null && Table.length > 0) { if(Table[0].isOnScreen()) { Table[0].click(craft); General.sleep(1250); } else { Camera.turnToTile(Table[0].getPosition()); General.sleep(500); } } Walking.walkTo(toTable[0]); General.sleep(1250); if(Portal != null && Portal.length > 0) { if(Portal[0].isOnScreen()) { Portal[0].click(tele); General.sleep(400); } else { Camera.turnToTile(Portal[0].getPosition()); General.sleep(300); } } break;Error: Full Source: package scripts;import java.awt.Graphics;import org.tribot.api2007.Banking;import org.tribot.api.General;import org.tribot.api2007.Camera;import org.tribot.api2007.Inventory;import org.tribot.api2007.NPCs;import org.tribot.api2007.Objects;import org.tribot.api2007.Player;import org.tribot.api2007.Walking;import org.tribot.api2007.types.RSNPC;import org.tribot.api2007.types.RSObject;import org.tribot.api2007.types.RSTile;import org.tribot.script.Script;import org.tribot.script.ScriptManifest;import org.tribot.script.interfaces.Painting;@ScriptManifest(authors = { "CTucker1327" }, category = "Runecrafting", name = "XenoLawRunner", description = "Start in Drynor bank with a tiara equiped, empty inventory", version = 0.1)public class XenoLawRunner extends Script implements Painting { private static enum BotState { INITIALIZING, CRAFT_RUNES, WALKING_TO_MONKS, ON_BOAT, WALKING_TO_ALTAR, WALKING_TO_MONKS2, BANKING, ERROR }; private BotState state; private int[] monkIDs = { 2728, 657, 658, 2729, 2731, 2730 }; private String tele = "use", craft = "Craft-Rune", enter = "enter", sail = "Take-boat", leave = "Cross"; int plankID = 2415, bankID = 2213, tableID = 10067, portalID = 10054, ruinsID = 12733; int lawID = 563, essID = 7936; boolean onBoat = false; RSTile[] toMonks = { new RSTile(3094, 3243, 0), //0 new RSTile(3085, 3248, 0), new RSTile(3072, 3252, 0), new RSTile(3072, 3268, 0), new RSTile(3068, 3276, 0), new RSTile(3065, 3263, 0), new RSTile(3059, 3253, 0), new RSTile(3047, 3247, 0), new RSTile(3043, 3235, 0) // [8} }; RSTile[] fromMonks = { new RSTile(2840, 3336, 0), new RSTile(2854, 3340, 0), new RSTile(2859, 3356, 0), new RSTile(2859, 3371, 0), new RSTile(2857, 3379, 0) }; RSTile[] toTable = { new RSTile(2464, 4819, 0), new RSTile(2464, 4829, 0) }; @Override public void onPaint(Graphics g) { // TODO Auto-generated method stub } @Override public void run() { state = setState(); handleState(state); General.sleep(400, 600); } // try using x or y to debate rather at law or not // x 2834, 3335 // 2857, 3379, 0) private BotState setState() { RSObject[] plank = Objects.find(10, plankID); RSObject[] table = Objects.find(10, tableID); if(Inventory.find(lawID) == null && Inventory.find(essID) == null) return BotState.INITIALIZING; if(table != null) return BotState.CRAFT_RUNES; if(plank != null) return BotState.ON_BOAT; if(Inventory.find(lawID) != null && Player.getPosition().getY() > 3320) return BotState.WALKING_TO_MONKS2; // at entrana if(Inventory.find(lawID) != null && Player.getPosition().getY() < 3320) return BotState.BANKING; // at sarim if(Inventory.find(essID) != null && Player.getPosition().getY() > 3320) return BotState.WALKING_TO_ALTAR; if(Inventory.find(essID) != null && Player.getPosition().getY() < 3320) return BotState.WALKING_TO_MONKS; return BotState.ERROR; } private void handleState(BotState state) { switch(state) { case INITIALIZING: RSObject[] bankBooth = Objects.findNearest(10, bankID); if(!Banking.isBankScreenOpen()) { if(bankBooth != null) { if(bankBooth[0].isOnScreen()) { bankBooth[0].click("bank"); General.sleep(500, 600); Banking.withdraw(28, essID); General.sleep(250, 500); Banking.close(); } else { Camera.turnToTile(bankBooth[0].getPosition()); General.sleep(300); } } else { } } else { Banking.withdraw(28, essID); General.sleep(250, 500); Banking.close(); } break; case WALKING_TO_ALTAR: Walking.walkPath(fromMonks); General.sleep(500); RSObject[] Ruins = Objects.findNearest(10, ruinsID); if(Ruins != null) { if(Ruins[0].isOnScreen()) { Ruins[0].click(enter); General.sleep(500); } else { Camera.turnToTile(Ruins[0].getPosition()); General.sleep(500); } } else sleep(500); break; case CRAFT_RUNES: RSObject[] Table = Objects.findNearest(10, tableID); RSObject[] Portal = Objects.findNearest(10, portalID); Walking.walkTo(toTable[1]); General.sleep(1000); if(Table != null && Table.length > 0) { if(Table[0].isOnScreen()) { Table[0].click(craft); General.sleep(1250); } else { Camera.turnToTile(Table[0].getPosition()); General.sleep(500); } } Walking.walkTo(toTable[0]); General.sleep(1250); if(Portal != null && Portal.length > 0) { if(Portal[0].isOnScreen()) { Portal[0].click(tele); General.sleep(400); } else { Camera.turnToTile(Portal[0].getPosition()); General.sleep(300); } } break; case WALKING_TO_MONKS: Walking.walkPath(toMonks); General.sleep(500); RSNPC[] monk = NPCs.findNearest(monkIDs); if(monk != null) { if(monk[0].isOnScreen()) { monk[0].click(sail); General.sleep(800, 1500); } else { Camera.turnToTile(monk[0].getPosition()); General.sleep(300); } } else sleep(500); break; case ON_BOAT: RSObject[] plank = Objects.find(10, plankID); if(plank[0].isOnScreen()) { plank[0].click(leave); General.sleep(1250); } else { Camera.turnToTile(plank[0].getPosition()); General.sleep(300); } break; case BANKING: break; } }}Enjoy.
  11. Yes, do an if() statement comparing the tile and Player.getRSPlayer().getPosition() Example: if(Player.getRSPlayer().getPosition() != tileWalkedTo && BotState.WALKING) {General.sleep(250);} The above code will make it wait aslong as the bot is walking and not at the location he was told to be at No, you have to do it yourself HINT: Most ID's of doors change once they open.
  12. ___________________________RS2007___________________________ Trying to figure out how to check the inventory slots for an item, there has to be a way to check an inventory slot and return the item that is in that slot, although I cannot find it in the API. For instance, I want to create a forloop that will display How many empty inventory slots I have, and Which slots they are, for example the script would do exactly what the Debug:Interface does... Example: Slot[0] = nullSlot[1] = 996Slot[2] = 556Slot[3] = nullSlot[4] = nullSlot[5] = 152Slot[6] = nullSlot[7] = nullSlot[8] = 7632Slot[9] = nullSlot[10] = nullSlot[11] = nullSlot[12] = nullSlot[13] = nullSlot[14] = nullSlot[15] = 163 slot[inventorySlot]
×
×
  • Create New...