-
Posts
19 -
Joined
-
Last visited
-
Feedback
0%
Profile Information
-
Gender
Male
Recent Profile Visitors
1010 profile views
Toxic's Achievements
Newbie (1/10)
3
Reputation
-
Got it, so I will go ahead and change to the if, else if and else way but what would you suggest me putting in between it? a if statement stating if its not in neither locations go to "this location" and then start the process?
-
I ran into a problem trying to make my Jug collector bank and the script is just not working. I tried to format this as neat and tidy as I can with the help of Juggles topics. This is my first script and if anyone finds errors, things that can fix this could you please explain it too me. Thank You This is the code import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.model.GroundItem; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(name = "Jug Collector", author = "Toxic", version = 1, info = "Collects Jugs", logo = "") public class Main extends Script { private State state; //Area to where the jug is Area Jug = new Area (3211,3212,0,0); //Area for my bank Area Bank = new Area(3208,3221,2,0); private enum State { //These must be true and it will go to the CASE TakeJug,WalkToBank,Bank,WalkToJug } private State getState() { /*This is where you tell it what case to go to, If true it will go to that case*/ if (getInventory().isFull() && Bank.contains(myPlayer())) { return state.Bank; } if (getInventory().isFull() && !Bank.contains(myPlayer())){ return state.WalkToBank; } if (!getInventory().isFull() && !Jug.contains(myPlayer())){ return state.TakeJug; } if (!getInventory().isFull() && !Jug.contains(myPlayer())){ return state.WalkToBank; } return state.Bank; } public void onStart() { } @Override public int onLoop() throws InterruptedException { state = getState(); switch (state) { case Bank: //If bank isn't open, go open it if (!getBank().isOpen()) { getBank().open(); } else { //If bank is open, deposit everything I have getBank().depositAll(); } case WalkToBank: //webWalking to the bank, will handle any obstacle in the way getWalking().webWalk(Bank); break; case TakeJug: if (myPlayer().isAnimating()) { //If my player is taking the jug, do nothing //DO NOTHING IS HERE } else { /*Here you null checking the table. Once it is not equal to null, you can take the jug. It will only do this when it is not already taking the jug */ RS2Object jug = getObjects().closest("Jug"); if (jug != null) { jug.interact("Take"); } } break; case WalkToJug: //Basic webWalk to the area you created for taking the jug. getWalking().webWalk(Jug); break; } //This is how long it takes to loop return random(150, 175); } @Override public void onExit() { log("Thanks for running my Jug Stealer"); } @Override public void onPaint(Graphics2D g) { g.drawString("Hello Jugs!", 50, 50); g.drawString(getState().toString(), 50, 60); } }
-
Thank you for your guide, it has helped me a lot and I have figured out a lot of different things just reading your guide. It's perfect and short I will thank you!
-
Your right, I apologize
-
@HeyImJamie Helped me with it all on teamviewer Also showed me a bunch of other stuff...love this guy haha. Will be doing pseudo code from now on
-
I am already logged in while starting the script and it does nothing still.
-
Well, I really didn't want to ask for help and try to figure this out myself but...I just don't understand why my script is not running. I click start and it just stands there by the jug...:/ If anyone can help and explain too me how to fix this to make it take the Jug in lumbridge kitchen and then drop and wait....please I would love you. Here is my Code
-
Got it! - Have IDE open and try out everything while I am in these lessons @dreameo Do you have any suggestions on a decent-good open source I can refer too? Got it, Yea I was looking at the Osbot API and it looks like a lot hahaha Thanks!!!
-
UPDATE END OF WEEK #1 I have been trying to use all my spare hours between class, work & fiance too get in as much information I can from all my resources to learn Java. I have been using multiple things to teach me Java as quick and efficiently as possible. What I have been using: Code Academy - I have been looking over many threads and many scriptwriters recommended Code Academy, so I went ahead and started doing that and I am currently 50% done (Object Oriented Java) and will be resuming it starting Monday as I need a break from my week. SoloLearn - I downloaded this app on my phone and its almost exactly the same as Code Academy but phone friendly and it seems more informative then Code Academy. I have been learning lots but there is way more on this app too learn and it goes much slower. I am currently at 4/8 on the Basic Concepts and there's 6 more categories with 8 sections in each so I have a long way too go in this app. OSBOT Guide #1 - I have been reading over @Apaec "A Beginners Guide to Writing OSBOT Scripts" and it has helped me a lot, I have yet to make a script a full script that works but I am very close too, just want to be able to program the bot to bank within @Apaec script example. OSBOT Guide #2 - I have also been reading over @Explv "Explv's Scripting 101" which seems a bit more advanced and more information so I suggest you read @Apaec guide first before moving to this but it has helped me a lot as well and takes you to the next stage in a way about learning the API for OSBOT. OSBOT Open Source Script - I have been mainly looking at @kadiem "F2PChopper" but I am just trying to make it chop the tree rather then bank or anything more the just swinging an axe and dropping. I have been trying to code a script that just takes the Jug inside of lumbridge castle, in the kitchen off the table and drops it and repeats. I have been having a slow start trying to figure this out and feel horrible because I feel like I should be able to somewhat do this but I am determined to get this obstacle out of my way and start up on the tree cutter. Here is my code: This has been a bit of a slow start and I am kind of disappointed in myself and how hard I am struggling but I do not plan on giving up and will keep going head strong into this. If anyone has any advice...it would help me so much! Thanks for reading and see you all next weekend P.S. I will check this topic everday for any advice or replies!