Jump to content

Chris

Scripter II
  • Posts

    8355
  • Joined

  • Last visited

  • Days Won

    14
  • Feedback

    100%

Everything posted by Chris

  1. I want to to select the talisman and interact with the ruins but it only returns the option for tiaras aka "Enter" Entity ruins = s.objects.closest("Mysterious ruins"); if (ruins != null) { s.sleep(s.random(3000)+500); if (s.getInventory().contains("Air talisman")) { if (s.getInventory().getSelectedItemName().equals("Air talisman")) { ruins.interact("Use"); s.sleep(s.random(300) + 600); } else { s.inventory.getItem("Air talisman").interact("Use"); //if first statement is not true it will select it again (Hoping ) } } else { ruins.interact("Enter"); //if you are using a tiara it will just call 'enter' and go inside s.sleep(s.random(300) + 1000); } }
  2. Can I buy like 2m?
  3. ahh hot damn folks! Sinatra scripter noob did it again! thanks again!
  4. Issue Code Source package me.sinatra.machine.Activities; import me.sinatra.machine.util.Activity; import org.osbot.rs07.api.filter.Filter; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.script.Script; /** * Created by Sinatra on 8/5/2015. */ public class attackTarget implements Activity { @Override public boolean shouldDoActivity(Script s) { return ((!s.myPlayer().isAnimating()) && (s.myPlayer().isVisible()) && (!s.myPlayer().isUnderAttack())); } @Override public int doActivity(Script s) throws InterruptedException { final NPC cow = s.npcs.closest(new Filter<NPC>() { @Override public boolean match(NPC npc) { return npc != null && npc.getName().equals("Cow") && !npc.isUnderAttack() && npc.getHealth() > 0 && s.map.canReach(npc); } }); if (!cow.isVisible() || (cow == null)) { s.camera.toEntity(cow); s.sleep(s.random(2000)); } else { cow.interact("Attack"); s.sleep(s.random(300)+3000); } return (s.random(500,2000)); } } Need help
  5. 45 attack (Quested) 63 Strength 1 Defence 44 range 73 mage No email attatched
  6. try to keep it somewhat clean. for example (Credit to Isolate) State getState() { if (skills.getStatic(Skill.THIEVING) >= 5) { if (TEA_STALL_AREA.contains(myPlayer())) { if (inventory.contains("Cup of tea")) { return State.DROP; } else { return State.STEAL; } }else{ return State.WALK_STALL; } }else{ return State.POCKET; } and have functions private void Pick() throws InterruptedException { NPC npc = npcs.closest("Man"); if (npc != null){ if (npc.exists() && (!myPlayer().isAnimating()) && npc.isOnScreen()){ Status = "Interacting: Pickpocket"; npc.interact("Pickpocket"); sleep(random(300,600)); }else{ camera.toEntity(npc); } } } case POCKET: Status = "IDLE"; Pick(); break;
  7. Chris

    My New Signature

    how about fire on the sides and not the top? idk still looks good
  8. import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(author = "Sinatra", info = "The best bot ever", name = "SPOCKET", version = 1.0, logo = "") public class Spocket extends Script { public void onStart() { } private enum State{ STEAL,DROP } State getState() { if (inventory.contains("Cup of tea")) { return State.DROP; } return State.STEAL; } private void Thieve(){ Entity T_STALL = objects.closest("Tea stall"); if (T_STALL != null && (!myPlayer().isAnimating())){ T_STALL.interact("Steal-from"); } } private void drop(){ log("Dropping shit tea"); inventory.drop("Cup of tea"); } @Override public int onLoop() throws InterruptedException { switch(getState()){ case STEAL: Thieve(); sleep(random(300,600)); break; case DROP: drop(); sleep(random(300,600)); break; } return random(100, 250); } @Override public void onExit() { } @Override public void onPaint(Graphics2D g) { } } Deciding to fix it just for the tea stall :P
  9. hmm i'll look into it later c: going to bed and dont have time to test :p
  10. Criticize my work http://gyazo.com/3d3e6da2620a5bfa04f32ae41a59a5e6 Want it to: 1.Thieve till level 5 2. once its level 5 go to varrock 3. thieve tea stall
  11. Yeah i started with the logic loop style but might switch to the state method
×
×
  • Create New...