Jump to content

mrgeorge

Members
  • Posts

    3
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

mrgeorge's Achievements

Newbie

Newbie (1/10)

1

Reputation

  1. I am sorry but may I ask what is the reason, just starting this as my first script. Thanks Polymorphism, like your name
  2. Please make the script so it right clicks the loot to pick up arrows. It left clicks the drop and at time there are other things on top of the arrows.
  3. import org.osbot.rs07.api.NPCS; import org.osbot.rs07.api.Walking; import org.osbot.rs07.api.model.GroundItem; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(author = "myName", info = "Kills chickens in Fally.", name = "ChickSlayer", version = 0.1, logo = "") public class Main extends Script { public void onStart() { } public void onExit() { } public int onLoop() throws InterruptedException { NPCS npc = getNpcs(); GroundItem arrows = groundItems.closest("Bronze arrow"); Walking walk = new Walking(); if (npc.closest("Chicken").isVisible() && !(myPlayer().isUnderAttack())) { attackNPC(npc); pickUpArrows(arrows, walk); sleep(1500); } else { camera.toEntity(npc.closest("Chicken")); } return 1500; } private void pickUpArrows(GroundItem arrows, Walking walk) throws InterruptedException { if (!myPlayer().isAnimating() && !myPlayer().isUnderAttack() && !myPlayer().isMoving()) { if (!arrows.isOnScreen()) { camera.toEntity(arrows); if (!arrows.isOnScreen()) { walk.walk(arrows); } } arrows.interact("Take"); } } private void attackNPC(NPCS npc) throws InterruptedException { if (npc.closest("Chicken").isAttackable() && npc.closest("Chicken").exists() && !(myPlayer().isUnderAttack()) && !(npc.closest("Chicken").isUnderAttack())) { npc.closest("Chicken").interact("Attack"); sleep(1500); } } } The code seems to compile and the script does run 75% of my logic. However I want to pick up the arrows right after the kill. And it is unable to do that. The script does in fact pick up the arrows but not right after the chicken is dead. It kills maybe 2 or 3 chickens then decides to pick up the arrows from the ground. It also picks up arrows while its in combat. Please look in the picture below.
×
×
  • Create New...