Jump to content

MarWo22

Members
  • Posts

    33
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by MarWo22

  1. This is the enum im using. It uses a snippet to gather the prices for the items
  2. Im trying to make the piece of script to sell all the clean herbs i have in my inventory. I have an enum with all the herbs data. I've been trying to do it with a for loop but for some reason it doesn't work. If anyone could help me out that would be great
  3. Idk if its like this for everybody but the client wont get past the welcome screen and if i force it past the welcome screen my script doesnt work either. Anyone know why?
  4. I'm trying to make a splasher for spells like curse etc which can't be autocasted. But how do i only attack the npc that is currently attacking me? Because in the script i'm making that doesn't work correctly. And also what is a good way to make it stop spamming the spells?
  5. He refunded my 6 tutorial island accounts after my own stupidity. This guy is the best!!

     

    1. OSRS Butlers

      OSRS Butlers

      Gave you another 6 not refunded <3 

      Much love man! 

  6. Are there any people who are selling lvl 55 magic accounts? I really dont care about the other stats. And if anyone is selling them how much gp do you ask for it? I'm willing to go first
  7. Hey guys, I recently made this code for one of my scripts. Its the part that handles the GE interactions. It would be awesome if you could leave me some feedback because i just recently started with scripting and im also not very familiar with java. The snippet i use for getting the prices for the certain items returns it in Optional<String>.
  8. MarWo22

    lvl3 acc's

    looking to buy 5-10 lvl 3 tutorial island finished accounts. I will pay with GP and am willing to go first.
  9. could you please write the code i cant seem to get it :]
  10. Hey guys, I've been trying to make an enum which wel check which potion has the best margin to make. Buy my java skills aren't that great and i'm a little bit stuck. This is how far i came. But i cant seem to find a way to acces the potion with the highest margin. If anyone could help me that would be great! The price lookup snippet i use returns the values in Optional<String> so thats why i first needed to transform them into integers
  11. I wrote a constructor for banking. I need one because the script i'm going to write requires a lot of banking. I just need someone to give me feedback because it is really messy. I'm also not that advanced in Java so the way I wrote it is probably really basic.
  12. I started out with a little bit of scripting but i realised my knowlege is really keeping me back from good scripts, so I'm looking for an online place to learn some Java. Preferably free. If anyone has some reccomendations that would be nice. Thanks
  13. I'm using this snippet for getting the prices of items from Osbot Im trying to get the best margin of making the potions. So i came up with this. But because of the IOexception in the snippet it doesnt work. Can someone please help me how to fix this? Im still a beginner at scripting and java.
  14. Im making a wilderness looting script. I was wondering if it is possible to make it pickup all items above X gp?
  15. Thank you! It fixed the issue!
  16. NPC Tanner = sI.npcs.closest("Ellis"); Area TANNING_SHOP = new Area(3277,3189,3270,3194); if(TANNING_SHOP.contains(sI.myPosition())) { if(!sI.getWidgets().isVisible(324)) { if(Tanner !=null) { Tanner.interact("Trade"); new ConditionalSleep(2000) { @Override public boolean condition() throws InterruptedException { return sI.getWidgets().isVisible(324); } }.sleep(); } } else { sI.getWidgets().interact(324, 13, "Tan ALL"); new ConditionalSleep(2000) { @Override public boolean condition() throws InterruptedException { return !sI.getWidgets().isVisible(324); } }.sleep(); } } else { sI.getWalking().webWalk(TANNING_SHOP); } Im trying to make a simple tanning script. But sometimes it gets stuck in the widget of tanning the hides. I've tried a lot to fix it but i can't seem to get it to work. Can someone pls help me fix it? Thank you!
  17. Im trying to make a script where it takes stamina potions every two minutes. I've come up with this but it doesnt work. It keeps drinking the potions. Any idea why? public static long staminaPotionIntake = 0; public static long staminaPotionDuration = System.currentTimeMillis() - staminaPotionIntake; public static String[] staminaNames = {"Stamina potion(4)", "Stamina potion(3)", "Stamina potion(2)", "Stamina potion(1)"}; public Banking(Script sI) throws InterruptedException { if(staminaPotionDuration > 120000) { if(sI.getInventory().contains(staminaNames)) { sI.getInventory().interact("Drink", staminaNames); staminaPotionIntake = System.currentTimeMillis(); } }
  18. Yea im still a beginner. Might be helpfull to learn java properly first
  19. public enum Potion { IRIT(259, 101), TOADFLAX(2998, 3002), AVENTOE(261, 103), KWUARM(263, 105), CANDENTINE(265, 107), LANTADYME(2481, 2483); public final int HerbPrice; public final int Margin; public final int UnfinishedPrice; public final String Name; public final int HerbId; public final int UnfinishedId; private final String UnfinishedName; Potion(int herbId, int unfinishedId) { Name = name().substring(0,1).toUpperCase() + name().substring(1).toLowerCase(); UnfinishedName = Name + " potion (unf)"; HerbId = herbId; UnfinishedId = unfinishedId; // TODO: you should make your GE lookup class methods static so you dont need to instiantiate this. GrandExchange ge = new GrandExchange(); HerbPrice = Math.max(ge.getBuyingPrice(HerbId), ge.getSellingPrice(HerbId)); UnfinishedPrice = Math.min(ge.getBuyingPrice(UnfinishedId), ge.getSellingPrice(UnfinishedId)); Margin = UnfinishedPrice - HerbPrice; } } // here is how you would get the current potion you are using Potion highestMarginPotion = Arrays.stream(Potion.values()).max(Comparator.comparingInt(p -> p.Margin)).get(); OK I understand everything so far. But how would I be able to call the price of for example the herb of the highestMarginPotion?
  20. I dont understand it fully. If you would be able to write a quick small example if it would help me a lot.
  21. Hello This is one of the first scripts i have ever made. This is a script for buying the best margin herbs in the GE. There are probably a lot of things I can improve on. Can you guys please give me some feadback? Thank you The script: And the snippet for price checking:
  22. Thank you so much for your tips!
  23. probably gonna completelly start over but all tips are appreciated!
×
×
  • Create New...