Jump to content

cjeee

Members
  • Posts

    12
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by cjeee

  1. yessir! EDIT: When i added the code: if (inventoryEmptyExcept(563, 555) || inventoryEmptyExcept(563)) { log("State WALKBACK returned"); return State.WALKBACK; } along with the warning below, i still don't receive a log back when those conditions are met. can somebody please help me?
  2. Im getting these errors in my code when i put them in: "The method contains(List<Item>) in the type ItemContainer is not applicable for the arguments (new Filter<Item>(){})" Also getting an error under "match(Item item) public boolean match(Item item) "The method match(Item) of type new Filter<Item>(){} must override or implement a supertype method" im sorry i am a noob at this but im always willing to learn! EDIT: I added the import and im getting a warning message under all of the code you send me now "Type safety: A generic array of Filter<Item> is created for a varargs parameter"
  3. EDIT; Guys, I still need help, please scroll down and help me please so what im trying to do is return a state for banking once the inventory becomes full and the same thing for if its empty even tho its containing 2 different items, here is my code private enum State { ERROR, WALKBACK, BANK, WAIT, }; private State getState() { if (!inventory.contains(563) || !equipment.contains(1381)) { log("State ERROR returned"); return State.ERROR; } } if (inventory.isEmptyExcept(563, 555) || inventory.isEmptyExcept(563)) { log("State WALKBACK returned"); return State.WALKBACK; } if (inventory.isFull()) { log("State BANK returned"); return State.BANK; } return State.WAIT; } idk if im doing this right but shouldnt it log out my text if my inventory is full/isEmptyExcept(xx)? its not working but all of my other getStates are working just fine so im obviously missing something or using the wrong methods
  4. im pretty sure the if statements help it from messing up because if the conditions that weren't met the second time for some reason(some error or something happened that you have no control over) then it wouldnt do anything and prevent a critical error from occurring
  5. oh okay! but why exactly would it make it more detectable? im sorry if im asking asking too many questions, im just curious about is because it will help me when creating my script and expanding my knowledge. it just seems like the morn random/human like a bot is, the less chance of has of being detected. after all, it seems like if it isnt random then it will be more noticeable
  6. Thank you soo much! this really helps!!! Also, wouldnt putting down the same coords for a walk path make the bot more detectable? maybe I should set an integer on random (limited to the number of paths i have) and depending on the value, it will randomly select the 1st coordinate or whichever path it chooses, then select the 2nd coord from these paths, etc. im trying to implement a very good antiban to make it more human like. would making the coordinates within an array list help me out more, and is that even possible? Please let me know! Anyways, thank you so much already, ill make sure to return the favor for anyone who has any questions in the future!
  7. True, but i was just checking out how the code works and all. I REALLLYY like how random the mouse movements are for this API, it really makes it more human like And Thank You very much for replying! im glad to see that people are willing to help others on here! This is just what i like, friendly people helping others with their code If you could help me with my current scripting problem then that would be nice: Basically the script I am creating requires for the user to be at 1 of 2 different locations for a while, then walk to a bank. How would I format this to properly see my distance from these spaces, and randomly select one of the two positions, and walk to it? i have looked at this guide: http://osbot.org/forum/topic/60536-tutorial-how-to-walk-a-path-in-one-line-of-code/ but i dont know how to make it randomly go to 1 of 2 locations (both locations are near/diagonal from each other) thank you
  8. naa dude, when i take out that log output, everything is fine, So why cant i exactly use a log output in that specific location? btw, I coppied my code and made a new prject and everything is working just fine now!! woohoo!
  9. Nvm im dumb, i guess i cant add a log there because it messes with the decompiler lmao Edit: is there any way to get a log output between switch (getState()) { case DROP: within @Override public int onLoop() throws InterruptedException { log("Running onLoop..."); switch (getState()) { case DROP: inventory.dropAll(); log("Dropping..."); break; case WAIT: log("Waiting..."); sleep(random(50, 60)); break; } return random(200, 300); } i want to log it but i get a compiling error
  10. EDIT: PROBLEM SOLVED, I JUST HAD TO CREATE A NEW PROJECT FILE I added a Log output within the onLoop method to see what is running and such, and im not recieving any output. My script isnt doing anything either. Maybe its the way i compiled it? I added the OSBot Jar to the build path, and Im using Eclipse. This Code was modified from this tutorial: http://osbot.org/forum/topic/58775-a-beginners-guide-to-writing-osbot-scripts-where-to-get-started-by-apaec/ I would really like to know what I am doing thats wrong. Please let me know ASAP, thanks Heres my simple ass code: import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(name = "Droppa", author = "Daddy", version = 6.999999, info = "", logo = "") public class main extends Script { @Override public void onStart() { //Code here will execute before the loop is started log("Welcome to my script!!!"); } private enum State { DROP, WAIT }; private State getState() { if (!inventory.isEmpty()) return State.DROP; return State.WAIT; } @Override public int onLoop() throws InterruptedException { log("Running onLoop..."); switch (getState()) { log("Getting State..."); case DROP: inventory.dropAll(); log("Dropping..."); break; case WAIT: log("Waiting..."); sleep(random(50, 60)); break; } return random(200, 300); } @Override public void onExit() { //Code here will execute after the script ends log("Thanks!!!"); } @Override public void onPaint(Graphics2D g) { //This is where you will put your code for paint(s) } }
  11. hey Im new to scripting, so Im trying to do the simple things and see how each line of code works in game. For example, I created a script using your script as a format, and I'm trying to make it Drop items. It shouldnt be a problem right? I mean, after all, I'm just removing the STEAL state right? Well I tried using your guide to help me with this and its not doing anything? Can you please tell me what I'm doing wrong? Like, I made my inventory full of items, but nothing is working? I even tried to modify your Code for stealing to interact with a bank booth and use the "Collect" option and nothing happened. (I know theres an API for banking, but shouldnt it still work?) I used a Log output to see where the script is going to see when it stops and such, im not a total noob EDIT: So apparently My script doesn't run the onLoop? Does the OSBot API not support these methods anymore? I added a log output for the onLoop and I haven't received any text. I only receive a log output when I add it to the onStart & onExit Method. EDIT2: EVERYTHING IS FINE NOW, I GOT IT WORKING, ALL I DID WAS CREATE A NEW PROJECT AND COPY THE CODE FIXED
×
×
  • Create New...