Jump to content

xVirtus

Members
  • Posts

    73
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by xVirtus

  1. haha, basically i figured out that it would enter the last else if statement, before running the previous one when using else if, rather than if. I will try using your snippet later and see if it works the same. Then probrably keep using that later. Only been messing with this since last night, and already made a functioning kebab buyer with GE selling
  2. if i exchange the if, if, if with if, else if, else if then it breaks the program
  3. I did something sort of like this, and that worked and i finally figured out how to work the GE too, so my script is fully working right now. Dont know if i should release it or whatever, its still lacking stuff that could be improved, but it works. Buys kebabs untill out of cash in inventory then sells it on the GE This is what i ended up doing. Else-ifs were causing some errors, due to later statements would be executed out of order if (!getBank().isOpen()) { getBank().open(); if(!getInventory().isEmpty()) getBank().depositAll(); getBank().enableMode(Bank.BankMode.WITHDRAW_NOTE); } if (getBank().contains("Kebab")) { getBank().withdrawAll("Kebab"); Sleep.sleepUntil(() -> !getBank().contains("Kebab"),5000); } if(getInventory().contains("Kebab")){ getBank().close(); } instasell("Kebab"); private void instasell(String item){ NPC geClerk = npcs.closest("Grand Exchange Clerk"); if (getInventory().contains(item) && geClerk != null && geClerk.interact("Exchange")) { Sleep.sleepUntil(() -> (getGrandExchange().isOpen()), 5000); } if (getInventory().contains(item) && getGrandExchange().isOpen()){ Sleep.sleepUntil(() -> getInventory().getItem(item).interact("Offer"), 5000); .....
  4. ah of course, i'm a bit new to "async" programming like this botting API stuff, so i appreciate the help :). It does withdraw the kebabs without the GE code, which is why i was confused
  5. I tried doing this if (!getBank().isOpen()) { getBank().open(); getBank().enableMode(Bank.BankMode.WITHDRAW_NOTE); } else if (getBank().contains("Kebab")) { getBank().withdrawAll("Kebab"); Sleep.sleepUntil(() -> !getBank().contains("Kebab"),5000); } else if(getInventory().contains("Kebab")){ getBank().close(); } NPC geClerk = npcs.closest("Grand Exchange Clerk"); if (geClerk != null && geClerk.interact("Exchange")) { Sleep.sleepUntil(() -> (getGrandExchange().isOpen()), 5000); } else if (getGrandExchange().isOpen()){ getGrandExchange().sellItem(1971, 1, (int) getInventory().getAmount("Kebab")); Sleep.sleepUntil(this::canCollect, 5000); } But it still skips over the withdrawal of the kebabs from the bank. It seems to skip over the Sleep.sleepUntil(() -> !getBank().contains("Kebab"),5000); statement
  6. of course, thanks for the help guys @BravoTaco my next line in the code was actually to wait untill the GE was open, but i chose not to include that part in the example just to make it a bit clearer, but i didnt have the interact call in the if statement
  7. Hello, im quite new to writing these scripts, and just been messing with it this evening. I quickly stumbled into a problem when trying to script selling an item to the grand exchange, and i could not find any example on how to do this, so i experimented. My issue is, that an item does not get withdrawn from the bank properly, because of lack of sleeps or whatever, im not completely sure. if (!getBank().isOpen()) { getBank().open(); getBank().enableMode(Bank.BankMode.WITHDRAW_NOTE); } else if (getBank().contains("Kebab")) { Sleep.sleepUntil(() -> (getBank().withdrawAll("Kebab")), 5000); getBank().close(); } NPC geClerk = npcs.closest("Grand Exchange Clerk"); if (geClerk != null) { Sleep.sleepUntil(() -> (geClerk.interact("Exchange")), 5000); } If i have the code above, the kebabs will not be withdrawn when i have the geClerk interact line. Without it, it gets withdrawn fine, but with that line, it skips over the withdrawal and instantly opens the GE window instead. Hope i explained my issue well enough, and someone can give a helping hand. (if anyone has a code snippet that just grabs whatever item in a Note and lists it on GE for insta-sell price then that would be perfect too)
  8. i wholeheartedly support this cause
  9. xVirtus

    Mio

    u sure about that, it should be one. imagine the answer when people ask how people met.
  10. loool thats pretty low of him ngl
  11. fuck off dude, prove urself not a scammer and u would be unbanned
  12. Do you Agree to the terms of service?: Yes What is your skype name?: remaake Your Partners Skype name?: mrnalbo Type of trade?: paypal for 07gp Do you have me on Skype Already?: yes
  13. we are not exactly on a forum that follows the rules, but i do agree that its a scummy thing.
  14. weak admins? or just not enough proof
×
×
  • Create New...