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

The Black Tux

Ex-Staff
  • Content Count

    1,788
  • Joined

  • Last visited

  • Days Won

    3
  • Feedback

    100%

The Black Tux last won the day on February 17 2014

The Black Tux had the most liked content!

Community Reputation

145 Excellent

About The Black Tux

  • Rank
    Feeling old
  • Birthday 09/30/1994

Personal

  • Sex
    Male
  • Location
    Colombia
  • Bio
    Started playing in 04, I'm a senior backend engineer now. wtf.

Recent Profile Visitors

14,650 profile views
  1. I don't see how not turning off a default tribot feature is my fault? I don't want to turn of features of tribot for my script to work
  2. Anyone? $20 if you find my fault
  3. Tried that, didn't change anything
  4. Objects.find is limited to find it within a distance of 2, if I increase it, it will also paint the other one and include in array. But the code as is returns 0 or 1 stall (the close one). I also tried Objects.findNearest (same but sorted), same issue. That far away stall is never returned or used by my code. Adde check anyways: if (rsObjects.length > 0 && (stall = rsObjects[0]) != null && Player.getPosition().distanceTo(stall.getPosition()) < 3 && Screen.isInViewport(stall.getModel().getCentrePoint())) { I have the sleep because I don't want to run the loop so soon, wasting CPU. I tried removing it, doesn't solve issue
  5. nope, not the model, it's literally going to the other stall, for whatever reason
  6. Ok, I came back to work on this script and found the same issue. Attaching video and source. Unintended action starts at second 45. Misclick of unwanted stall happens at the end. I do not look for far away stalls, and I even make sure it is in viewport, but bot will turn to that one. Going crazy. If it´s my fault, I'll pay who can help me figure it out. @[email protected]@Optimus package scripts; import org.tribot.api.Screen; import org.tribot.api.Timing; import org.tribot.api2007.*; import org.tribot.api2007.types.RSObject; import org.tribot.api2007.types.RSTile; import org.tribot.script.ScriptManifest; import org.tribot.script.interfaces.Ending; import org.tribot.script.interfaces.MessageListening07; import org.tribot.script.interfaces.Painting; import org.tribot.script.interfaces.Starting; import java.awt.*; @ScriptManifest(authors = "The Black Tux", name = "TuxThiever", version = 0.11, category = "Thieving", gameMode = 1) public class TuxThiever extends TuxScript implements Starting, Ending, Painting, MessageListening07 { private final int STALL_SILK = 11729; // Silk 11729, baker 11730 private final int NPC_FARMER_= 3114; private RSObject stall = null; private RSTile tile = new RSTile(2663, 3316); // new RSTile(2669, 3310); @Override public void run() { Inventory.dropAllExcept(); while (running) { checkContinue(true); if (Player.getRSPlayer().isInCombat()) { sound(2); sleep(1000); continue; } if (Inventory.isFull()) { status = "Dropping all"; while(Inventory.getAll().length > 0) { Inventory.dropAllExcept(); clickSleep(); } continue; } if (Player.getPosition().distanceTo(tile) > 0) { status = "Walking"; Walking.walkTo(tile); continue; } RSObject[] rsObjects = Objects.find(2, STALL_SILK); if (rsObjects.length > 0 && (stall = rsObjects[0]) != null && Screen.isInViewport(stall.getModel().getCentrePoint())) { log("In"); stall = rsObjects[0]; status = "Stealing - clicking"; if (random() < 0.1) Camera.setCameraAngle(90 + ((int) random() * 20)); if (!rsObjects[0].click("Steal-from")) { status = "Stealing - failed to steal"; continue; } clickSleep(); if (!Timing.waitCondition(() -> Player.getAnimation() != -1, 2000)) { status = "Stealing - failed"; continue; } stall = null; status = "Stealing - success"; sleep(1000); continue; } else { log("Lol"); } status = "Sleeping"; sleep(0, 5000, 500); } } @Override public void onPaint(Graphics2D g) { RSObject[] rsObjects = Objects.find(2, STALL_SILK); for (RSObject stall : rsObjects) { Point p = stall.getModel().getCentrePoint(); Point p2 = Projection.tileToMinimap(stall.getPosition()); g.setColor(new Color(0, 230, 0, 100)); g.fillRect(p.x - 5, p.y - 5, 10, 10); g.fillRect(p2.x - 5, p2.y - 5, 10, 10); } if (stall != null) { Point p = stall.getModel().getCentrePoint(); Point p2 = Projection.tileToMinimap(stall.getPosition()); g.setColor(new Color(0, 255, 0, 200)); g.fillRect(p.x - 5, p.y - 5, 10, 10); g.fillRect(p2.x - 5, p2.y - 5, 10, 10); } } } tribot.mov
  7. Happening to me too. it just won't start
  8. Here's my code. The status = "Stealing - Clicking" doesn't happen when setting camera angle and clicking the other stall, remains "Sleeping". Also, paint doesn't paint the other stall. It's like the sleep at the end of the loop tells the bot to do "learned" things and the bot does it. I don't have the hooks cache enabled, but how can I force clear that? Also, the "Lol" log never happens (At least one stall but where distance > 5) public void run() { Inventory.dropAllExcept(); while (running) { checkContinue(true); if (Player.getRSPlayer().isInCombat()) { sound(2); sleep(500); continue; } if (Inventory.isFull()) { status = "Dropping all"; while(Inventory.getAll().length > 0) { Inventory.dropAllExcept(); clickSleep(); } continue; } if (Player.getPosition().distanceTo(new RSTile(2663, 3316)) > 0) { status = "Walking"; Walking.walkTo(new RSTile(2663, 3316)); continue; } RSObject[] rsObjects = Objects.find(2, SILK_STALL); log(rsObjects.length); if (rsObjects.length > 0 && Player.getRSPlayer().getPosition().distanceTo(rsObjects[0].getAnimablePosition()) < 6) { stall = rsObjects[0]; status = "Stealing - clicking"; Camera.setCameraAngle(100); if (!rsObjects[0].click("Steal-from")) { status = "Stealing - failed to steal"; continue; } clickSleep(); if (!Timing.waitCondition(() -> Player.getAnimation() != -1, 2000)) { status = "Stealing - failed"; continue; } status = "Stealing - stealing"; sleep(1000); } else if (rsObjects.length > 0) { log("Lol", Player.getPosition().distanceTo(rsObjects[0].getPosition())); } status = "Sleeping"; sleep(0, 5000, 200); } } @Override public void onPaint(Graphics2D g) { RSObject[] rsObjects = Objects.find(2, SILK_STALL); for (RSObject stall : rsObjects) { Point p = stall.getModel().getCentrePoint(); Point p2 = Projection.tileToMinimap(stall.getPosition()); g.setColor(new Color(0, 230, 0, 150)); g.fillRect(p.x, p.y, 10, 10); g.fillRect(p2.x, p2.y, 5, 5); } }
  9. I'm writing a thieving script that specifically searches for a stall within 2 tiles of distance, I even paint the model and the minimap tile. For some reason, the script will try to turn to a further long distance stall and click it while script is in a sleeping state (sleeping in run loop). Why is this happening? is driving me crazy. Same for my alch script. bot will hover bank before even instructed to do so.
  10. Hi all, This will be my first public script. Fetches prices from RSBuddy exchange and calculates your bank worth. Add from repo Open to suggestions, requests.
  11. Just wanted to post some progress on my fighter. Started from scratch 4 days ago. Hadn't scripted in years Will post more updates later on
×
×
  • Create New...