xtlk Posted June 20, 2015 Posted June 20, 2015 Hi there. I ve got a raw script. but i dont know how to run it. Maybe i need to compile it? Could somebody help me with that? heres script (prayer potion drinker. i ve just copied it from the forum ) public void drinkPotion() throws InterruptedException { if (containsPotion() == true) { if (client.getSkills().getCurrentLevel(Skill.PRAYER) <= 12) { for (int i = 0; i < 4; i++) { if (client.getInventory().interactWithName( "Prayer potion(" + i + ")", "Drink")) { sleep(random(600, 900)); } } } } } public boolean containsPotion() { for (int i = 0; i < 4; i++) { if (client.getInventory().contains("Prayer potion(" + i + ")")) { return true; } } return false; }
Twin Posted June 20, 2015 Posted June 20, 2015 Hi there. I ve got a raw script. but i dont know how to run it. Maybe i need to compile it? Could somebody help me with that? heres script (prayer potion drinker. i ve just copied it from the forum ) public void drinkPotion() throws InterruptedException { if (containsPotion() == true) { if (client.getSkills().getCurrentLevel(Skill.PRAYER) <= 12) { for (int i = 0; i < 4; i++) { if (client.getInventory().interactWithName( "Prayer potion(" + i + ")", "Drink")) { sleep(random(600, 900)); } } } } } public boolean containsPotion() { for (int i = 0; i < 4; i++) { if (client.getInventory().contains("Prayer potion(" + i + ")")) { return true; } } return false; } you need to put that into the onLoop of the script skeleton then compile it. But I didn't take the time to go through and see if that actually works. is it hard to learn the OSBOT API? No, it should only take an afternoon. Learning what you can do with it though takes a lot longer.
OSBOT Jack Posted June 20, 2015 Posted June 20, 2015 I can code in VB, but I'm not sure whether or not it's worth learning, IE I have a basic understanding of code and can understand different functions etc and algorithms juts don't know if it's complicated to learn the API