Everything posted by MarWo22
-
need some help
This is the enum im using. It uses a snippet to gather the prices for the items
-
need some help
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
- isbot not working
-
isbot not working
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?
-
Trying to make a splasher
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?
-
lvl 55 magic accounts
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
-
Feedback
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>.
-
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.
-
Enum to check margin
could you please write the code i cant seem to get it :]
-
Enum to check margin
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
-
Need someone to give feedback
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.
-
Java courses
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
-
Struggeling with GE prices
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.
-
Pick up items above X gp
ok thank you
-
Pick up items above X gp
Im making a wilderness looting script. I was wondering if it is possible to make it pickup all items above X gp?
-
Script gets stuck
Thank you! It fixed the issue!
-
Script gets stuck
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!
-
Stamina Potions
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(); } }
-
Grand Exchange feedback
Yea im still a beginner. Might be helpfull to learn java properly first
-
Grand Exchange feedback
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?
-
Grand Exchange feedback
I dont understand it fully. If you would be able to write a quick small example if it would help me a lot.
-
Grand Exchange feedback
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:
-
Script review
Thank you so much for your tips!
-
Script review
probably gonna completelly start over but all tips are appreciated!
-
Script review
GrandExchange Snippet: First of all im new to scripting and java. This is one of the first scripts i have ever made. Can you guys please tell me some things to improve in this script and on next scripts in the future. Because my script is really long while it doesnt do that much. Thank you