Welcome to TRiBot Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

omgwizzle

Registered
  • Content count

    2
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by omgwizzle

  1. Trying to get my script to attack a monster with a safespot. If my character is not on the safespot I want the script to click back on the tile, but even when on the tile it only clicks that.
  2. package scripts.TestWoodCutter; import org.tribot.api.General; import org.tribot.api.input.Mouse; import org.tribot.api2007.*; import org.tribot.api2007.types.RSNPC; import org.tribot.api2007.types.RSTile; import org.tribot.script.Script; import org.tribot.script.ScriptManifest; import static org.tribot.api.General.random; /** * Created by Letlo on 7/12/2016. */ @ScriptManifest(authors = "Omgwizzle", name = "scripts.idk", category = "Combat") public class idk extends Script { private RSNPC[] npc; private RSNPC nearest; private RSTile SAFE; private boolean False = false; public int randomness; @Override public void run() { startScript(); while (loop()) { } } private void startScript() { Mouse.setSpeed(105); SAFE = Player.getPosition(); } public boolean loop() { if (False) { } else { attack(SAFE); } return true; } public void attack(RSTile startTile) { npc = NPCs.findNearest(15, 2515); nearest = npc[0]; if (!Player.getRSPlayer().isInCombat() && !nearest.isInCombat()) { randomness = 1 + General.random(1, 99); if (nearest.isOnScreen()) { if ((randomness > 50)) { nearest.click("Attack"); sleep(1500, 2250); } else { Mouse.click(nearest.getModel().getTriangles()[0].getBounds().getLocation(), 1); sleep(1500, 2250); } } else { Camera.turnToTile(nearest.getPosition()); } } else if (Player.getPosition() != startTile) { Walking.walkTo(startTile); sleep(600, 940); } } } Sorry, I didn't notice the code quote