Jump to content

sudoinit6

Lifetime Sponsor
  • Posts

    353
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by sudoinit6

  1. Wouldn't that buy them one at a time? I am buying them on the exchange, that seems terribly inefficient. It is also possible I am misunderstanding you.
  2. And I have been informed that you should begin variable names with lower case letters
  3. Assuming the GE is open and declared private int barsToBuy; barsToBuy = (int) (getInventory().getAmount("Coins") / 100); getGrandExchange().buyItem(2357, "Gold bar", 100, barsToBuy); Why does this only buy one bar?
  4. Good advice, I should have taken it the first time. Thanks!
  5. You are correct, I see no "Make 10" action for the widget and child 446, 34 so I clearly have the wrong widget. As best I can tell that is what the debugger is telling me, I am unsure where to go from here:
  6. I am trying to turn a gold bar into a gold amulet and I am having trouble with getting the correct widgets. Using the widget debugger tool it is telling me that the widget parent and child are 446, 34 so I tried this: RS2Widget ammy = getWidgets().get(446, 34); Script.sleep(Script.random(1000, 3000)); ammy.interact("Make 10"); But it isn't working. I have read here it is best to get widgets by getWidgets().getWidgetContainingText() I tried that too with "Amulet", "amulet", "Gold amulet (u)", and just "mulet" but none of them are working. Any advice would be appreciated.
  7. From this noobs perspective it seems like it makes it easier to keep track of which curly brackets are a pair.....
  8. So far I have been able to throw together some simple state based scripts and I don't like it much. This style is much cleaner in my opinion. My problem is I don't "get it". I write unix shell scripts so I can understand the logic flow of state based scripts. I can follow it and see that it goes down the list till it matches a condition and then activates that case statement. With this script I don't understand how it knows which task it should be doing. Any advice (other than learn java :P)?
  9. How would I check for and close the "You died!" screen?
  10. Is there a reason no sell method has been included in the API? Would be kinda nice...
  11. I tried running this script and it just stands there. I am a noob so I wanted to ask if would be poor form to take the source posted and try and make it work again. I would never try and take credit or anything I just think it is a great and hilarious idea.
  12. Thanks, that works! if ((myPlayer().isUnderAttack())){ return state.GTFO;
  13. I am attempting to make the bot flee if he is under attack by anything. I tried this: if ((myPlayer().getHealthPercent() < 100)){ return state.WALK_TO_BANK; But it doesn't have the desired effect, if hi gets hurt he still just does his thing. Any tips? Thanks!
  14. Do enums get the underscore treatment for multiple words? Which of the following is correct for an enum? WALKINGTOBANK WALKING_TO_BANK Thanks!
  15. My apologies, I will try to learn and adhere to naming conventions. Thanks for this guide!
  16. As the topic says this is my first java script. I have been studying JAVA for a couple weeks and think I am starting to get it. That being said I know there are some really stupid things in my script and my intent is to post it here and you guys and gals can tell me how bad it is and how to improve as a programmer. Saying I "wrote" this is fairly generous as I mostly looked at what other people did and made it work for what I wanted to do. I decided not to make a fisher or woodcutter because then I would just be copying some of the fine examples provided by this website, so in order to make sure I was learning not copying here is what this script does: Goes to "Drogo dwarf", tries to buy Iron ore, if there isn't enough to fill inventory hop to a different world and when full go bank. A couple of things that I know are done wrong: The loop to buy the ore. I tried to get it to buy 27 but the docs indicate it wants it in forms of 1,5,or 10. I would think there would be a way to tell it to buy exactly 27, but I can't figure it out. The other thing I am not happy with is the world hopper. Instead of going to a random f2p world I would rather keep them all in an array and tell it get the current world and then hop to the next, but that is beyond me as well. This script doesn't make much money, it wasn't the intent, this was to learn. I will say I am having a blast learning and scripting, hopefully I can make some more complicated ones soon. So here it is, let me know if I am on the right track and what I need to work on please! (Oh, and I didn't steal this from someone named jubjub, that's another online nick I use!) edit: Wow those code tags dont format well! Check the spoiler for my script.
  17. Is the Grand Exchange resupply working? Can you set it to, for example, cut 500 Yew longbows, string 500 Yew longbows, sell 500 Yew longbows (strung) then buy 500 logs, 500 strings and repeat?
  18. I would like a trial please. If I purchase how many instance of this script can I run at a time? Thanks Mother of Dragons!
×
×
  • Create New...