Everything posted by whipz
-
Some beginner Scripts w Source
Nice work mate !
- need quick jad help
-
lvl 29 mining bots in al kharid - every world
HAHAHA THIS IS THE BEST hahaa
- Budget Harambe
-
OSBot CLI Script Creator - Manage your bots easily
Looks good (: cant wait till its a little more advanced !
-
Now's the time to buy bonds
hasnt it been around 2.3 m for weeks ?
-
Normal day at Ogres
haha heavy days ): its like that on every f2p world tho haha fucking bots everywhere xD
-
[PAINT] Enfilade's Easel
Thanks mate appreciate it sorry went afk on chat
-
Explv's OSBot Manager
love it works a treat !
-
Script help [This script will remain Open Source for others to learn]
Edit fixed it ! script works now !
-
Script help [This script will remain Open Source for others to learn]
Sweet gonna test now thanks mate
-
Script help [This script will remain Open Source for others to learn]
Player muleAccount = getPlayers().closest(o -> o.getName().replaceAll("\\u00a0", " ").equalsIgnoreCase("Insert your UserName")); give this error Multiple markers at this line - o cannot be resolved - Syntax error on token "-", -- expected - o cannot be resolved - o cannot be resolved to a variable - o cannot be resolved to a variable any ideas ?
-
Script help [This script will remain Open Source for others to learn]
I have uninstalled all other versions of java and jdk, and yet I still cant get 1.8 to work with my eclipse; is there another way ? if not looks like im going to have format -.- Player muleAccount = getPlayers().closest(o --> o.getName().replaceAll("\\u00a0", " ").equalsIgnoreCase("Insert your UserName")); On this line still getting this error Multiple markers at this line - o cannot be resolved to a variable - o cannot be resolved - o cannot be resolved to a variable - o cannot be resolved
-
Script help [This script will remain Open Source for others to learn]
I did that but when I did it the way the guy at the top said It said I have 1.5 ? even though i did what was suggested by the guy underneath i still have the error? is it just better to get rid of all old javas ?
-
Script help [This script will remain Open Source for others to learn]
yeah man eclipse; How can i tell what java eclipse is running ? as I need a lower lvl java for another application on my computer and it hasnt been updated; however i have both. EVERYONE QUICK THE MISSES IS COOKING HELP WHILE I HAVE 15 mins HAHAHAHAH *as she reads over my should cooking next to me hahaa
-
Script help [This script will remain Open Source for others to learn]
OMG thanks mate; I have been looking for something like that for so long ! Thanks so much mate; Ill get on to adding that and ill update my top post; Like i keep saying this script will be permanently so people can learn; I will go threw and add //comments once its fully functional Hey mate; I am now getting this error ? o cannot be resolved to a variable
-
Script help [This script will remain Open Source for others to learn]
Doing what you suggested I will update in the morning misses is angry I have been on computer to much today hahaha night guys keep you updated tomorrow
-
Script help [This script will remain Open Source for others to learn]
Hey guys; Sorry to keep posting new threads this will be the last thread; I thought I might as well post it all so everyone can learn as there isnt to many open source scripts; I will keep this one open source but will not be adding anything else to the script as I just wanted to learn a few features for other scripts I want to release to the community; I mainly made this script to test my cooking script which is finished I just have nothing to cook with lol. Its an AIO that supports lumby falador edgeville and alkharid which will also be released on SDN as soon as i can finish testing it; which is why i need this script finished lol Everything works now; So mainly looking for feedback on how to improve this script; I will add a GUI within the day or so ! As i said this script will remain open source and free obviously as its open source ! Going over the script in the next few days to add comments to make it easier for someone to learn off; here is the code so far: import org.osbot.rs07.api.Bank; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.model.GroundItem; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.model.Player; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; @ScriptManifest(author = "Whipz", info = "Picks up Beef and trades to a Mule", logo = "", name = "BeefMule", version = 0.1) public class main extends Script { Area cowArea = new Area( new int[][]{ { 3253, 3255 }, { 3265, 3255 }, { 3265, 3296 }, { 3263, 3298 }, { 3260, 3299 }, { 3257, 3299 }, { 3256, 3298 }, { 3241, 3298 }, { 3240, 3296 }, { 3241, 3295 }, { 3241, 3294 }, { 3242, 3293 }, { 3242, 3292 }, { 3242, 3290 }, { 3242, 3288 }, { 3241, 3287 }, { 3241, 3286 }, { 3241, 3284 }, { 3242, 3283 }, { 3243, 3282 }, { 3244, 3281 }, { 3245, 3280 }, { 3246, 3278 }, { 3247, 3278 }, { 3248, 3278 }, { 3249, 3278 }, { 3250, 3278 }, { 3251, 3276 }, { 3253, 3272 } } ); Area muleArea = new Area(3265, 3173, 3272, 3161); private enum State { PICKUP, WALKTOMULE, TRADE, WALKTOPICKUP, BANK, STOP, WAIT }; private State getState() { if (!inventory.isFull() && cowArea.contains(myPlayer())) return State.PICKUP; if (inventory.isFull() && !muleArea.contains(myPlayer())) return State.WALKTOMULE; if(inventory.contains(2132, 1739) || bank.contains("Raw beef", "Cowhide") && muleArea.contains(myPlayer())) return State.BANK; if(inventory.contains(2133, 1740) || trade.isCurrentlyTrading() && muleArea.contains(myPlayer())) return State.TRADE; if (!inventory.isFull() && !bank.isOpen() && !bank.contains("Raw beef") && !cowArea.contains(myPlayer())) return State.WALKTOPICKUP; return State.WAIT; } public void onStart() throws InterruptedException { } public void onExit() { log("Thanks for using beefMule"); } @[member=Override] public int onLoop() throws InterruptedException { switch (getState()) { case PICKUP: doPickUp(); break; case WALKTOMULE: getWalking().webWalk(muleArea); break; case BANK: getNotedItems(); break; case TRADE: tradeMule(); offerItems(); acceptTrade1(); acceptTrade2(); break; case WALKTOPICKUP: getWalking().webWalk(cowArea); break; case STOP: this.stop(); break; case WAIT: sleep(random(200, 300)); break; } return random(200, 300); } private void doPickUp() throws InterruptedException { GroundItem loot = getGroundItems().closest("Raw beef", "Cowhide"); if (!inventory.isFull() && cowArea.contains(myPlayer()) && (loot != null) && !myPlayer().isAnimating()) { loot.interact("Take"); log("Picking up Raw Beef"); sleep(random(750, 1500)); new ConditionalSleep(5000) { @[member=Override] public boolean condition() throws InterruptedException { return !myPlayer().isMoving(); } }.sleep(); } } private void tradeMule() throws InterruptedException { @SuppressWarnings("unchecked") Player muleAccount = getPlayers().closest(o -> o.getName().replaceAll("\\u00a0", " ").equalsIgnoreCase("FlippingGold")); if (muleAccount != null && muleAccount.isVisible() && muleArea.contains(myPlayer()) && inventory.contains("Raw beef")) { log("Trying to trade mule"); if(muleAccount.interact("Trade with")){ log("Waiting for other player to accept trade"); } sleep(random(750, 1500)); new ConditionalSleep(5000) { @[member=Override] public boolean condition() throws InterruptedException { return trade.isFirstInterfaceOpen(); } }.sleep(); } } private void offerItems() throws InterruptedException { if(trade.isFirstInterfaceOpen() && trade.isCurrentlyTrading()) { log("Offering Loot"); getInventory().getItem("Raw beef").interact("Offer-All"); getInventory().getItem("Cowhide").interact("Offer-All"); sleep(random(750, 1500)); new ConditionalSleep(5000) { @[member=Override] public boolean condition() throws InterruptedException { return trade.getOurOffers().toString() == "Raw beef"; } }.sleep(); } } private void acceptTrade1() throws InterruptedException { if(trade.isFirstInterfaceOpen()) { trade.acceptTrade(); new ConditionalSleep(5000) { @[member=Override] public boolean condition() throws InterruptedException { return trade.isSecondInterfaceOpen(); } }.sleep(); } } private void acceptTrade2() { if(trade.isSecondInterfaceOpen()) { trade.acceptTrade(); new ConditionalSleep(5000) { @[member=Override] public boolean condition() throws InterruptedException { return !trade.isCurrentlyTrading(); } }.sleep(); } } private void getNotedItems() throws InterruptedException { NPC closestBanker = getNpcs().closest("Banker"); Entity closestBankBooth = objects.closest("Bank Booth"); if (bank.isOpen()) { if(inventory.isEmpty()) { if (getBank().getWithdrawMode().equals( Bank.BankMode.WITHDRAW_NOTE)) { getBank().withdrawAll("Raw beef"); getBank().withdrawAll("Cowhide"); sleep(random(750, 1500)); bank.close(); log("Withdrawing Noted Beef"); sleep(random(750, 1500)); } else { bank.enableMode(Bank.BankMode.WITHDRAW_NOTE); log("changing to withdraw note mode"); sleep(random(750, 1500)); } } else { bank.depositAll(); } sleep(random(1000, 2500)); } else { int rand = random(3); if (rand == 1) { closestBankBooth.interact("Bank"); log("Using Bank Booth"); sleep(random(750, 1500)); } else { closestBanker.interact("Bank"); log("Using NPC Banker"); sleep(random(750, 1500)); } sleep(random(1000, 2500)); log("Opening Bank"); } } } So any help is appreciated thanks to everyone who has helped so far;
-
Code being skipped ?
I thought that was what you ment; wasnt sure if you wanted me to make another state to check bank haha sorry all new to this stuff; been a long time last time i did it we used nodes; im testing it now (: if (!inventory.isFull() && !bank.isOpen() && !bank.contains("Raw beef") && !cowArea.contains(myPlayer())) return State.WALKTOPICKUP; So I have done this now; and now it just sits at the bank with it open; can close opened new thread open sourced
- Code being skipped ?
-
Code being skipped ?
Yeah I just noticed it before that was the reason for edit; But i cant think of a way to get around it now while still needing to be in the same area to trade the mule; If i was to add to that line that your on now that you quoted and added !bank.isOpen(); would that fix my problem ?
-
Code being skipped ?
Yeah mate, it does the deposit all then runs back to cows
-
Code being skipped ?
Thanks I have done that with this yet I still seem to have the problem it seems to skip it if (bank.isOpen()) { if(inventory.isEmpty()) { if (getBank().getWithdrawMode().equals( Bank.BankMode.WITHDRAW_NOTE)) { getBank().withdrawAll("Raw beef"); log("Withdrawing Noted Beef"); sleep(random(750, 1500)); } else { bank.enableMode(Bank.BankMode.WITHDRAW_NOTE); log("changing to withdraw note mode"); sleep(random(750, 1500)); } } else { bank.depositAll(); } sleep(random(1000, 2500)); } else { int rand = random(3); if (rand == 1) { closestBankBooth.interact("Bank"); log("Using Bank Booth"); sleep(random(750, 1500)); } else { closestBanker.interact("Bank"); log("Using NPC Banker"); sleep(random(750, 1500)); } sleep(random(1000, 2500)); log("Opening Bank"); } } } Its fine in my ide I just wasnt using the code thing at the top i was just using code in [] EDIT: I just realised it could be with my states; private State getState() { if (!inventory.isFull() && cowArea.contains(myPlayer())) return State.PICKUP; if (inventory.contains("Raw Beef") && muleArea.contains(myPlayer())) return State.TRADE; if (!inventory.isFull() && !cowArea.contains(myPlayer())) return State.WALKTOPICKUP; if (inventory.isFull() && !muleArea.contains(myPlayer())) return State.WALKTOMULE; return State.WAIT; } public int onLoop() throws InterruptedException { switch (getState()) { case PICKUP: doPickUp(); break; case WALKTOMULE: getWalking().webWalk(muleArea); break; case TRADE: getNotedItems(); tradeMule(); offerItems(); acceptTrade(); break; case WALKTOPICKUP: getWalking().webWalk(cowArea); break; case STOP: this.stop(); break; case WAIT: sleep(random(200, 300)); break; } return random(200, 300); }
-
[Gold Farm]Automatic Farming w/ Database
I'll pm you
-
Code being skipped ?
Hey guys; I thought I should re-edit and make it a bit neater; Here is my problem, this bit of code keeps getting skipped. if (bank.isOpen()) { if(inventory.isEmpty()) { if (getBank().getWithdrawMode().equals( Bank.BankMode.WITHDRAW_NOTE)) { getBank().withdrawAll("Raw beef"); log("Withdrawing Noted Beef"); sleep(random(750, 1500)); } else { bank.enableMode(Bank.BankMode.WITHDRAW_NOTE); log("changing to withdraw note mode"); sleep(random(750, 1500)); } } else { bank.depositAll(); } sleep(random(1000, 2500)); The withdraw as a note method just constantly gets skipped; I have a feeling its to do with my states, which are here; private State getState() { if (!inventory.isFull() && cowArea.contains(myPlayer())) return State.PICKUP; if (inventory.contains("Raw Beef") && muleArea.contains(myPlayer())) return State.TRADE; if (!inventory.isFull() && !cowArea.contains(myPlayer())) return State.WALKTOPICKUP; if (inventory.isFull() && !muleArea.contains(myPlayer())) return State.WALKTOMULE; return State.WAIT; } and switch (getState()) { case PICKUP: doPickUp(); break; case WALKTOMULE: getWalking().webWalk(muleArea); break; case TRADE: getNotedItems(); tradeMule(); offerItems(); acceptTrade(); break; case WALKTOPICKUP: getWalking().webWalk(cowArea); break; case STOP: this.stop(); break; case WAIT: sleep(random(200, 300)); break; } return random(200, 300); } See I want to withdraw them as a note obviously so I can trade to my mule; however I think my return state for trade fails as I only want it to be recognized as a noted item; but it obviously just skips back to thinking it needs to walk back to cowarea which is not needed to be done till after its finished the trade method; Any help would be appreciated as im stuck as lol