

shaba123
Members-
Posts
105 -
Joined
-
Last visited
-
Feedback
100%
Everything posted by shaba123
-
Hey iv just bought this script, can u add looting bag support pls?
-
does script support looting bag?
-
does script support looting bag?
-
It just spent 8 hours trying to buy absorb pots with points I didn't have
-
It runs out of prayer after about an hour to 2 hours. Not mirror mode. /Response time set as default.
-
It sometimes leaves rapid heal on for too long causing prayer to drop.
-
bot does special attack even though combat tab isnt open. Will this get me banned ?
-
Thanks for this very helpful, cant find many other in detail gui guides on the forum
-
This is what i am using to bank and withdraw my items, it works but i know its not the proper way. This is what i use : if (chestArea.contains(myPosition()) & !getBank().isOpen() & !getInventory().contains(bankItems)) { getObjects().closest("Bank chest").interact("Use"); new ConditionalSleep(5000) { // If in bank area and bank isnt open and inventory contains - public boolean condition() { // certain items, open the bank. return getBank().isOpen(); } }.sleep();} else log("Banking"); if (getBank().contains(amuletFilter)) { //If the bank contains amulet then - bank.depositAll(); // deposit everything inventItems.forEach((e) -> bank.withdraw(e, 1)); // withdraw my array of items getBank().withdraw(amuletFilter, 1); // withdraw amulet getBank().withdraw(duelRing, 1); // withdraw ring if (!getEquipment().isWearingItem(EquipmentSlot.RING, "Ring of wealth")) { // if im not wearing a ring of wealth then getBank().withdraw(ringOfWealth, 1); // withdraw a ring of wealth aswell as the other items } getBank().close(); //close the bank } else { log("Out of supplies!"); //else if any of that is not possible, stop script. stop(); }
-
Hey what do you mean by using getters in your GUI to return desired value? Id be really grateful if you could explain this or give an example, thank you.
-
Thanks a lot for this, really helpful. Will you be expanding on the GUI section at any point? or can you point me to a tutorial you think is useful for GUI's?
-
Do i have to save the array list to a string like this : String[] items = new String[] (initial); then it would be : if (getBank().isOpen()) { for (int i = 0; i < inventory.getItems().length; i++) { Item current = inventory.getItems()[i]; Item in = item[i]; if (in.getAmount() != current.getAmount()) { log("Invent is not the same"); return; } Im watching some video tutorials on java now i have lots of learning to do. EDIT: could a mod merge my last 3 posts please im making a mess of the forums! EDIT: i managed to solve it , thanks for everyones help.
-
How do i use my arrayList, im trying to check that my inventory has not chnaged since i started the script,would it be like so : edit: i know what i have done is not correct i just dont know how to use the array of items if (getBank().isOpen()) { for (int i = 0; i < inventory.getItems().length; i++) { Item current = inventory.getItems()[i]; Item in = Arrays.toString(initial)[i]; if (in.getAmount() != current.getAmount()) { log("Invent is different"); // code to withdraw initial from bank return; } } }
-
Thank you for your help
-
Im trying to store my inventory on start up and everytime i go to the bank i want to check if my inventory is the same as onstart, if not, withdraw items from bank to match. This is what i have so far : public void onStart() { Item[]initial = getInventory().getItems(); log(initial); } This must be an incorrect way to grab items as this is what comes up in the log : [INFO][Bot #1][05/25 10:06:18 AM]: [Lorg.osbot.rs07.api.model.Item;@122d063 Do i need to display the results differently? And this is what im doing to check for any changes in the inventory: if (getBank().isOpen()) { for (int i = 0; i < inventory.getItems().length; i++) { Item current = inventory.getItems()[i]; Item in = initial[i]; if (in.getAmount() != current.getAmount()) { log("Invent is different"); // code to withdraw initial from bank return; } } } I believe im just grabbing the initial inventory items wrong onstart which makes the code to check for inventory changes obsolete. Please correct my errors and tell me where im going wrong, thank you.
-
Thank you sir
-
I said i added the null check, thanks
-
Line 113 is as so : wornItems.add(i.getName()); You were correct, works fine now with null check. Thank u sir
-
Hey that example worked but threw up some errors. Do you know why? [INFO][Bot #1][05/24 03:09:45 PM]: Equipment Item Added: Blue wizard hat [INFO][Bot #1][05/24 03:09:45 PM]: Equipment Item Added: Fire cape [INFO][Bot #1][05/24 03:09:45 PM]: Equipment Item Added: Amulet of strength [INFO][Bot #1][05/24 03:09:45 PM]: Equipment Item Added: Granite maul [INFO][Bot #1][05/24 03:09:45 PM]: Equipment Item Added: Monk's robe top [ERROR][Bot #1][05/24 03:09:45 PM]: Error in script onStart(): newScript java.lang.NullPointerException at core.Main.grabEquipment(Main.java:113) at core.Main.onStart(Main.java:103) at org.osbot.rs07.event.ScriptExecutor.iiIiiiiiIiiI(kl:120) at org.osbot.rs07.event.ScriptExecutor.start(kl:129) at org.osbot.UB.run(dw:194) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
-
I want to get worn equipment onStart and save the items to a string so i can re gear later on. Is this possible? Something like : String wornItems = getEquipment().getItems(); then later on i can do, if not wearing wornItems then bank, withdraw and equip wornItems. Is it possible to use strings in this way, thanks in advance any help is appreciated
-
Thank you so much, i understand what you are saying, i knew what i was doing wasn't the correct way but i did it anyway, silly me! This can get really frustrating when you cant work something out but it pays off when you finally understand why something is not working! This is what i have now can you have a look and tell me whats wrong please, im still having the same problem, the dialogue is open but it doesn't click anything : if (dialogues.isPendingOption()){ // if dialogue is waiting for option dialogues.selectOption("Lava Maza"); // if "lava maze" is on dialogue, click it. sleep(random(200, 600));} else if (dialogues.isPendingOption()) { //else dialogues.selectOption("Okay, teleport to level 41 Wilderness."); // if "Okay, teleport to level 41 Wilderness." is on dialogue, click it. sleep(random(200, 600));} else { //else if dialogue is not open, rub amulet item.interact("Rub"); sleep(random(1000, 1500)); I left little notes at the side to show what im trying to achieve and what i thought i had done correctly.
-
Im using a burning amulet to teleport to the lava maze. It rubs the amulet, then i need to click "Lava Maze" then "Okay, teleport to level 41 Wilderness." But it just keeps rubbing the amulet instead of handling the dialogues. This is my code: for (Item item : getInventory().getItems()) { if (item != null && item.getName().contains("Burning") && item.getName().matches(".*\\d+.*")) { item.interact("Rub"); sleep(random(600, 1100)); if (dialogues.isPendingOption()){ dialogues.selectOption("Lava Maza"); sleep(random(800, 1100));} if (dialogues.isPendingOption()){ dialogues.selectOption("Okay teleport to level 41 Wilderness."); sleep(random(800, 1100));} } }
-
Thanks both of you, i appreciate your help
-
How would i go about withdrawing a glory from the bank? withdraw Amulet of glory (*)