Everything posted by Twin
-
Simple Crimson Swift catcher
The option was added! changed a few other things too. Will look into moving it back to a certain position after a snare goes down next.
-
Simple Crimson Swift catcher
Working on a few things right now, just added multiple trap support, and yeah, i'll look into adding some kind of option where you can either drop or bury the bones! thanks for the suggestion!
-
Simple Woodcutter Help (For Personal Use)
I'm not to sure how you're writing this, but if you're using enums/states I can help you a bit. So for mine basically I have a few states, chop,bank, bank_walk, chopw,chopo, a few more but thats not really important. for lets say for my CHOPW state which stands for chop willow I have if (wcLvl2 >= 30&&!inventory.isFull) //this will see if the woodcutting level is greater than or equal to 30, //and if the inventory is not full { return State.CHOPW;//if these 2 statements go through, then it will return the state CHOPW } //so then after this state is returned it needs to know what to do case CHOPW: Entity willow = objects.closest("Willow");//gets the closest willow tree if (wcLvl2 >= 30 && !myPlayer().isAnimating()&& !inventory.isFull())//this will check again to make sure the player has the //right wc level, and they're not animating { willow.interact("Chop down");//this will interact with the closest will tree and use the option chop down sleep(random(500, 1000));//this will make it so the bot won't do anything for a second or so so the bot has time to //start animating break; } so basically that would be the most basic form to see if your inventory is not full, and you have a woodcutting level high enough to cut willows. and then check again to make sure, while also seeing if your character is animating or not.
-
Move mouse one or two blocks then click?
My bad man I fell asleep early. I found out it was an issue with my logic and sleep timers on why some stuff was fucking up and not working properly so I need to mess around with that to get it right! Thanks for all your replies though!
-
Move mouse one or two blocks then click?
else{ camera.toEntity((org.osbot.rs07.api.model.Entity) swaaaag); } What exactly does that do? did you just force camera to go into the position swaaaag?
-
Move mouse one or two blocks then click?
So instead of moving the mouse, It should move the camera and click? That seems like it would be easier, let me mess around with it for a second and i'll tell if you if it works. Thanks for the reply! And also is there any point to that else statement? or is it just a default else statement your IDE said like you said?
-
Move mouse one or two blocks then click?
Basically have the player move 1/2 sqaures from his starting position to lay another trap
-
Move mouse one or two blocks then click?
Can't seem to figure this out, right now I have mouse.moveSlightly(300);//should move the mouse a little bit from where it is, then sleep for 300miliseconds. mouse.click(true);//should left click where current mouse is I'm not sure if this is right or not, no clue how to do it.
-
how to check for closest two objects?
If i'm reading this correctly, no it shouldn't objects.closest("whatever string" or whatever id) you have in here will only be looked for, not anything else.
-
Simple Crimson Swift catcher
What are you doing to view the code from the jar?
-
Simple Crimson Swift catcher
http://www.mediafire.com/download/1gcyl3wdca5465f/CrimsonCatcher.rar, not sure why it did that. just ran through all scenarios and it worked, this one should be right.
-
Simple Crimson Swift catcher
case LAY: GroundItem snareOnFloor = groundItems.closest("Bird snare"); if (snareOnFloor != null) { snareOnFloor.interact("Lay"); sleep(random(2000,3000)); } break; case DROP: inventory.dropAllExcept("Bird snare", "Coins"); break; Did you type that or is that from what the code I submitted said? Because these are the cases I have when I open eclipse.
-
Simple Crimson Swift catcher
If there is stiill demand for this script, I know a lot more than when i first started. Due to their already being a paid one on the SDN, I can't release this because I want to keep it free. Anyway, I can add in wagtail support if anyone still wants it. Will be able to go side to side with my kebbit script once that fully releases. I'm testing wagtails out right now, so i'll see how that goes! Virus total link: https://www.virustotal.com/en/file/00d2347603abec089d70e0cef545b0bcd08ed2b8f1e9ecc17d67269fda24a52f/analysis/1425322428/ Updated link for 1.3 jar Download Link: [url="http://www.mediafire.com/download/3kggb2wbztk75vt/CrimsonCatcherFix.rar%5B/url] I put it in a zip because when I just uploaded the jar, it gave me an issue, not sure if it being in a .zip is a big deal or not. Let me know if you have any issues so I can fix it asap, from what I tested though, everything works fine. To use the script, run the character to Crimson Swifts, the script will do the rest! If this thread is missing anything mods let me know. Updates Version 1 - initial release very basic Version 1.1 - multiple trap support Version 1.2 - added option to bury or drop bones. changed dropping to drop/bury after every catch Version 1.21 - worked out a few kinks that makes the script more reliable, current issue is once it reaches the end of hunting area, it will keep running away and going back. Will have this addressed tomorrow. Version 1.3 - Fixed an issue where bot wouldn't check snares unless all snares had birds in them. Made the bot space the traps out by 1 space so he doesn't just keep walking up and up. Big shout out to isolate for that one! To-do Add option for tropical wagtails Add a more indepth gui Allow players to select whether they want the bones dropped or buried - DONE Once hunter level is 19, have it auto walk to the tropical wagtails! Due to the way the script counts how many traps are down, if you pause the script to manually pick them up, restart the script so it doesn't get confused! I put an updated version of the script. Let me know of that works better. <--ran it on an account that started at level 1, got me 1-19 no issues,
-
Console spams all my scripts with the same issue, not sure what's wrong.
ahh found the issue, just made a wait case instead of having it return null. Thank you!
-
Console spams all my scripts with the same issue, not sure what's wrong.
[ERROR][bot #1][02/27 09:44:04 PM]: Error in script executor! java.lang.NullPointerException at BirdHunter.onLoop(BirdHunter.java:43) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(ml:189) at java.lang.Thread.run(Unknown Source) is the issue. All my scripts work fine, it's just that gets spammed 24/7 every second. import java.awt.*; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.Area; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.model.GroundItem; @ScriptManifest(author = "twin 763", info = "Crimson Swift Catcher", name = "Crimson Catcher", version = 1, logo = "") public class BirdHunter extends Script { @Override public void onStart() { log("Crimson Hunter by twin 763"); log("Let me know on my forum post any issues you've had"); log("Enjoy the easy levels!"); } Area HUNTING_AREA = new Area(2618,2940,2597,2912); private enum State { LAY, CHECK, PLACE, DROP,DISMANTLE }; private State getState() { Entity snare = objects.closest("Bird snare"); GroundItem snareOnFloor = groundItems.closest("Bird snare"); Entity brokenSnare = objects.closest(9344); if (inventory.isFull()) return State.DROP; if (snareOnFloor != null) return State.LAY; if(snare==null&&snareOnFloor == null&&brokenSnare==null) return State.PLACE; if (snare.hasAction("Check")) return State.CHECK; if(brokenSnare!=null) return State.DISMANTLE; return null; } @Override public int onLoop() throws InterruptedException { if (!HUNTING_AREA.contains(myPlayer())) { log("Returning to Hunting Area"); localWalker.walk(HUNTING_AREA.getRandomPosition(0)); } switch (getState()) { case LAY: GroundItem snareOnFloor = groundItems.closest("Bird snare"); if (snareOnFloor != null) { snareOnFloor.interact("Lay"); sleep(random(2000,3000)); } break; case DROP: inventory.dropAllExcept("Bird snare", "Coins"); break; case PLACE: inventory.interact("Lay","Bird snare" ); sleep(random(2500,3000)); break; case CHECK: Entity snare = objects.closest("Bird snare"); if(snare.hasAction("Check")) snare.interact("Check"); sleep(random(2000,3000)); break; case DISMANTLE: Entity brokenSnare = objects.closest(9344); if(brokenSnare!= null) brokenSnare.interact("Dismantle"); sleep(random(2000,3000)); break; } return random(200, 300); } @Override public void onExit() { log("Thanks for using my script! Report any issues to me on the forum!"); } @Override public void onPaint(Graphics2D g) { } } Everything in there works fine, it's just my console is getting spammed and I can't figure out why.
-
How to have bot pick up birdsnare after a bird has been caught/it fell over
did not mean to post here.
-
Attack npc that is not under attack.
You could maybe get the health of the NPC instead? Like cowHP= NPC.getHealth("Cow"); if(cowHP<8) return State.ATTACK; or something like that. not 100% sure if thats how you do it but something like that might work
-
Wildy looter MUCH NEEDED PLEASE
What do you want this to do? Go run out in the wilderness and pick up dropped sharks and what not?
-
need help finding a good way to make a if statement to a state more reliable.
I'm getting a weird error where smithXP.startTrackingSkills(Skill.SMITHING); is saying that it wants an @ before start and and @ sign instead of a semi colon, other than that everything looks good, Thanks for this by the way! I would have had no clue on how to write a class/method for something like that.
-
need help finding a good way to make a if statement to a state more reliable.
this post did not show up for me for some reason! did not mean to ignore it. This is exactly what I meant, how would I go about doing that? I make an integer of my smithing experience and then what? kind of lost of what to do there.
-
combat 91 main price check
Assume basic quest done i.e monkey madness, lost city, and animal magnetism, a few others but not to important 41 qp total. http://imgur.com/5VcYltL stats, assume anythign crossed out is less than level 10
-
need help finding a good way to make a if statement to a state more reliable.
Nope, didn't fix it. Still having the issue where it will use the steel bar on the furnace every 10-20 seconds depending on when the sleep ends. Welp im an idiot lol could have sworn that said isInteracting, well like acted the same way.
-
need help finding a good way to make a if statement to a state more reliable.
Had no idea getInteracting was a method, that should fix this actually.
-
need help finding a good way to make a if statement to a state more reliable.
I had animating originally, but the smithing animation stops for about 2 seconds or so inbetween, so it goes back and does it all over again. I'm going to try an idea I had to see if that works i'll report back.
-
need help finding a good way to make a if statement to a state more reliable.
The one that this thread was about or the if statement in my state? The one my thread is talking is return State.SMITH; the one in the code I linked just breaks after a little bit