Jump to content

Help me with this, please!


xtlk

Recommended Posts

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 :D)

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;
}  
Link to comment
Share on other sites

 

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 biggrin.png)

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...