Jump to content

Floglet

Members
  • Posts

    8
  • 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.

Floglet's Achievements

Newbie

Newbie (1/10)

1

Reputation

  1. Thanks all, yes mainly just learning how to write scripts at this stage, I agree with the more complex the task the more unique the actions will be, that may explain partially why I was banned so quickly. @Hybris Thanks for the info, I had totally passed over the onloop ms timer, didn't even realise that was a thing (obvious I know, but I seemed to have missed it :P) @SyntaxRSI was a little confused about the ClickContinue, but it turns out even though it says "click" it actually does use the keyboard spacebar to continue dialogue, I'll have to learn how to make my own walk paths, I feel like webwalking would be a flag in some cases, I've noticed it consistently miss-clicking the ladder on the ground floor outside the lumbridge castle when walking to the bank.
  2. Hi all. had two accounts running this script, I was a little bit surprised, considering I only ran it for 45 minutes, but soon realised that its probably due to the sleeps I had included, could anyone help me figure out a better way to write the part with the sleeps so I would be less likely to be banned? Here is the code: (what it does: - Have woad and coins in inventory, goes to aggie witch, interacts with her, uses woad on witch, in return for a blue dye, goes through two dialog windows then repeats till inventory full, banks, repeat.) package Main; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.constants.Banks; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; import org.osbot.rs07.script.MethodProvider; import java.awt.*; @ScriptManifest(name = "BlueDyeMaker5", author = "Flog", version = 1.0, info = "", logo = "") public class Core extends Script { @Override public void onStart() { } @Override public void onExit() { } @Override public int onLoop() throws InterruptedException { goToBank(); getDye(); return 100; //The amount of time in milliseconds before the loop starts over } public void goToBank() throws InterruptedException { Area witchHouse = new Area(3084, 3260, 3087, 3257); if(!Banks.DRAYNOR.contains(myPosition()) && getInventory().isFull()) { log("INV FULL!: Walking to bank"); getWalking().webWalk(Banks.DRAYNOR); if(getBank().open()){ log("Opening bank"); new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getBank().isOpen(); } }.sleep(); } getBank().depositAll("Blue Dye"); log("Deposited all blue dye"); getBank().close(); log("Closing bank"); walking.webWalk(witchHouse); log("walking back to witchHouse"); } } public void getDye() throws InterruptedException { if(getInventory().getAmount("Woad Leaf") > 2 && getInventory().getAmount("Coins")> 500) { if (getInventory().interact("Use", "Woad Leaf")) { NPC WitchNPC = getNpcs().closest("Aggie"); if(WitchNPC.interact("use")){ log("Using Woad on witch"); new ConditionalSleep(random(3800,6800)) { @Override public boolean condition() throws InterruptedException { return getDialogues().isPendingContinuation(); //it clicks } }.sleep(); } log("pending continuation..."); long startAmt; startAmt = getInventory().getAmount("Blue Dye"); // <- save amount of dye, then check its more than after itneract if(getDialogues().clickContinue()){ log("waiting for next blue dye in inv"); new ConditionalSleep(random(5000,8000)) { @Override public boolean condition() throws InterruptedException { return startAmt < (getInventory().getAmount("Blue Dye")); //wait till inv amount is more than start amount +1 } }.sleep(); } sleep(random(75,360)); getDialogues().clickContinue(); // Click continue on 2nd dialoug box that comes up, recieved. sleep(random(80,410)); } } else { log("RAN OUT OF Woads or coins! EXITING!"); stop(); } } @Override public void onPaint(Graphics2D g) { //This is where you will put your code for paint(s) } } Accounts were old, had not botted on them before, only low level (20), The only conclusion I can come to is my use of static sleeps, rather than conditional sleeps (I wrongly assumed it would be ok for me to run it for a short while without getting banned, before I worked out a conditional sleep method that would work). <- I'm still struggling to work out how I would get a conditional wait to work in this situation. Also, another thing which might have caused it is the GetDialouges.ClickContinue(); - seemed to react quite quickly to the dialogues, i guess this could have also seemed bot like. Anyone else have any comments onto why I was likely banned so quickly? PS. I'm thinking of getting a members account to bot on next, fresh level 3 member. I've heard that members are less likely to be banned, is this equally true for members which have used bonds to gain members or only $ paying members?
  3. Hello all, I'm just putting together a little cow killer/hide pick up/bank script to run to earn a little GP on new accounts... At the moment I'm having a little trouble with my logic, the script works, but things do not work as they should! - Here are the issues: Some of my logic is a bit around the wrong way, I think, which causes weird waits at points My for loop seems to loop through extemely fast, even with the conditionalSleep, my goal of this for loop is to pick up a random amount of hides after killed the cow (picking up other peoples hides). It only ever prints "Picking up item.. 0 of X" never 1 of X for example. I have made the CowPenArea, how do I walk to the centre (or a random point near centre for antiban) of this location? At the moment once it reaches the outer part of the area it stops walking, causing it to get stuck outside the fence if it is closed. If there are no hides to pick up, it gets stuck in the conditional sleep of the for loop, which is weird, because it doesnt otherwise. It keeps wanting to do both pick up hides and attack at the same time, (it clicks a cow then quickly clicks a hide on the ground, causing cows to be attacking the character while its walking to pick up hides) i've tried using !is.moving etc to try and make the script wait until its moved before continuing... My banking was working perfectly fine, but now it crashes or keeps checking if inv is full, probably a logic issue. This causes the whole OSBOT to seize up. I've commented out a check if inv empty then walk to cowpen, but then I realised I should do this elsewhere, otherwise if the script is not in the cow pen when it starts it will seize up, where would be an appropriate place to do this? package core; import java.awt.Graphics2D; import org.osbot.rs07.api.model.GroundItem; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.api.Walking; import org.osbot.rs07.api.map.constants.Banks; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.utility.ConditionalSleep; @ScriptManifest(author = "You", info = "Hide Picker", name = "Hide PickerUpperer", version = 0, logo = "") public class Main extends Script { Area CowPen = new Area(3239, 3297, 3265, 3260); @Override public void onStart() { log("Let's get started!"); } @Override public int onLoop() throws InterruptedException { if (!myPlayer().isMoving() && !myPlayer().isAnimating()) { AttackCow(); PickUpHides(); // when not moving it tries to both PICK UP hides and also ATTACk. //need to force to be stuck in PICKUPHIDES after KILLED cow for loop amount, will fix issue. } if (getInventory().isFull()){ // PUT THIS INSIDE PickUpHides? goToBank(); //died at go to bank? log("Detected full Inv, going to bank!"); } return random(200, 777); } @Override public void onExit() { log("Thanks for running COWLOOTER dont get B& asshole!"); } public void AttackCow() throws InterruptedException { NPC cow = getNpcs().closest("Cow"); if (!myPlayer().isMoving() && !myPlayer().isUnderAttack() && !cow.isUnderAttack() && cow.getHealthPercent()>0) { cow.interact("Attack"); log("Attacking cow"); new ConditionalSleep(15000) { @ Override public boolean condition() throws InterruptedException { return !myPlayer().isUnderAttack(); } }.sleep(); } } public void PickUpHides() throws InterruptedException { GroundItem groundItem; Position itemPosition; int PickAmt = random(1,20); //how many hides to pick up before attacking another cow int PickedAmt; for (PickedAmt = 0; PickedAmt<PickAmt; PickedAmt++) { //loop with random (1-12) of amount of times to repeat the shit groundItem = getGroundItems().closest(e -> e != null && e.getName().contains("Cowhide")); if(groundItem != null && !myPlayer().isMoving() && CowPen.contains(groundItem) && !myPlayer().isUnderAttack()) { //&& !myPlayer().isAnimating() itemPosition = groundItem.getPosition(); groundItem.interact("Take"); log("Picking up item.. " + PickedAmt + "of: " + PickAmt); new ConditionalSleep(random(10000,20000)) { @ Override public boolean condition() throws InterruptedException { return myPlayer().isMoving(); } }.sleep(); //GETS STUCK LOOKING FOR HIDES TO PICK UP!!!!!!!!! } } } public void goToBank() throws InterruptedException { log("Inside goToBank module"); if(!Banks.LUMBRIDGE_UPPER.contains(myPosition())) getWalking().webWalk(Banks.LUMBRIDGE_UPPER); else if(!getBank().isOpen()) getBank().open(); //spam clicks open bank else { log("depositing all items"); getBank().depositAll(); //if (getInventory().isEmpty()) { walking.webWalk(CowPen); log("walking back to cowPen"); //GOT STUCK OUTSIDE AREA, GATE CLOSED. CHANGE TO WALK INTO CENTER OF AREA! } } } Thanks all for the help, I'm really enjoying learning programming and making RS bots at the same time! Its making me motivated to learn new things haha. ALSO: WebWalk consistently misclicks the nothern stairs at lumbridge, walking around the outside, not that much of an issue (and not one I can fix without making my own walk path)
  4. I update the script name yet it doesn't update/run the new script, maybe this is because I am running OSBOT via the "Run Boot" button through eclipse rather than through just running the osbot.jar?
  5. Thank you both for the help! My normal process to get the new script to work in OSBOT is to close out the current OSBOT window and re-launch. Currently I export the project (from eclipse) with the updated script but when I hit refresh on OSBOT nothing changes, am I forgetting to do something?
  6. Hi all, I've just made a partially working script for looting bones in the chicken pen... I have a few questions: 1- How do I stop the script walking away from the area with a trail of bones for example? or picking up bones from the nearby cow enclosure? 2- When I update the script I have to re-launch OSBOT before I can "refresh" the script into the list, is this always the case? 3- how do I set it to log into F2P worlds on startup? Thanks all.
×
×
  • Create New...