Advertisement
Guest User

Untitled

a guest
Jul 12th, 2013
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. package scripts;
  2.  
  3. import java.awt.Graphics;
  4.  
  5. import org.tribot.api2007.Banking;
  6. import org.tribot.api.General;
  7. import org.tribot.api.input.Mouse;
  8. import org.tribot.api2007.Camera;
  9. import org.tribot.api2007.Inventory;
  10. import org.tribot.api2007.GameTab;
  11. import org.tribot.api2007.NPCs;
  12. import org.tribot.api2007.Player;
  13. import org.tribot.api2007.Walking;
  14. import org.tribot.api2007.GameTab.TABS;
  15. import org.tribot.api2007.Objects;
  16. import org.tribot.api2007.types.RSNPC;
  17. import org.tribot.api2007.types.RSObject;
  18. import org.tribot.api2007.types.RSTile;
  19. import org.tribot.script.Script;
  20. import org.tribot.script.ScriptManifest;
  21. import org.tribot.script.interfaces.Painting;
  22.  
  23. @ScriptManifest(authors = { "Jamal" }, category = "No category", name = "JGoblins", version = 0.01)
  24. public class JGoblins extends Script implements Painting {
  25. public static final RSTile[] togoblin = new RSTile[] { new RSTile(3223, 3218, 0), new RSTile(3235, 3219, 0),
  26. new RSTile(3240, 3225, 0), new RSTile(3257, 3228, 0), };
  27.  
  28. public void onPaint(Graphics g) {
  29.  
  30. }
  31.  
  32. @Override
  33. public void run() {
  34. Mouse.setSpeed(General.random(200, 250));
  35. Walking.control_click = true;
  36. Walking.walking_timeout = 500;
  37. while(true) {
  38. if(goblin() !=null) {
  39. if(goblin().isOnScreen()) {
  40. goblin().click("Attack");
  41. } else {
  42. Camera.turnToTile(goblin().getPosition());
  43. }
  44. }
  45. }
  46.  
  47. }
  48.  
  49. RSNPC goblin() {
  50. RSNPC[] goblins = NPCs.findNearest(10, 3865,3866,3867,3868);
  51. if(goblins.length > 0) return goblins[0];
  52. return null;
  53. }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement