Advertisement
Guest User

Untitled

a guest
Mar 25th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. import org.osbot.rs07.api.map.Position;
  2. import org.osbot.rs07.api.model.NPC;
  3. import org.osbot.rs07.api.model.RS2Object;
  4. import org.osbot.rs07.api.ui.RS2Widget;
  5. import org.osbot.rs07.api.ui.Tab;
  6. import org.osbot.rs07.script.Script;
  7. import org.osbot.rs07.script.ScriptManifest;
  8.  
  9. @ScriptManifest(author = "Caleb", info = "Sacrafises bones", logo = "", name = "Rimmy Altar", version = 0)
  10. public class main extends Script {
  11. RS2Object Altar = getObjects().closest("Altar");
  12. RS2Widget HouseOptions = getWidgets().get(261, 78);
  13. RS2Widget LeaveHouse = getWidgets().get(370, 18);
  14. NPC Phials = npcs.closest("Phials");
  15. Position Store = new Position(2949, 3213, 0);
  16. @Override
  17. public int onLoop() throws InterruptedException {
  18. if(myPlayer().getLocalX() >= 6000) {
  19. DoBones();
  20. } else {
  21. RunBones();
  22. }
  23. return 250;
  24. }
  25.  
  26. private void RunBones() throws InterruptedException {
  27. if(!getInventory().contains(536)) {
  28. if(getInventory().contains(537)) {
  29. if(Phials.isVisible()) {
  30. if(getInventory().isItemSelected()){
  31. Phials.interact("Use");
  32. sleep(random(400,800));
  33. }else{
  34. getInventory().interact("Use", 537);
  35. }
  36. }else {
  37. getWalking().walk(Store);
  38. }
  39. }
  40. }
  41. }
  42.  
  43. private void DoBones() throws InterruptedException {
  44. if(Altar != null) {
  45. if(!myPlayer().isAnimating()) {
  46. if(getInventory().contains("Dragon bones")) {
  47. if(getInventory().isItemSelected()){
  48. Altar.interact("Use");
  49. sleep(random(400,800));
  50. }else{
  51. getInventory().interact("Use", "Dragon bones");
  52. }
  53. }else {
  54. LeaveHouse();
  55. }
  56. }
  57. }
  58. }
  59.  
  60. private void LeaveHouse() throws InterruptedException {
  61. getTabs().open(Tab.SETTINGS);
  62. if(LeaveHouse.isVisible()) {
  63. LeaveHouse.interact("Leave House");
  64. sleep(1000);
  65. }else{
  66. HouseOptions.interact("View House Options");
  67. }
  68. }
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement