xtlk Posted June 20, 2015 Share 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; } Quote Link to comment Share on other sites More sharing options...
Extreme Scripts Posted June 20, 2015 Share Posted June 20, 2015 This isn't even a script... Just methods. Quote Link to comment Share on other sites More sharing options...
OSBOT Jack Posted June 20, 2015 Share Posted June 20, 2015 is it hard to learn the OSBOT API? Quote Link to comment Share on other sites More sharing options...
Twin Posted June 20, 2015 Share 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. Quote Link to comment Share on other sites More sharing options...
OSBOT Jack Posted June 20, 2015 Share 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 Quote Link to comment Share on other sites More sharing options...
Mysteryy Posted June 20, 2015 Share Posted June 20, 2015 Oh boy. 3 Quote Link to comment Share on other sites More sharing options...
Botre Posted June 20, 2015 Share Posted June 20, 2015 Oh boy. Quote Link to comment Share on other sites More sharing options...
OSBOT Jack Posted June 20, 2015 Share Posted June 20, 2015 leave me alone! Quote Link to comment Share on other sites More sharing options...