Jump to content

1m osrs to person fixes it. (To lazy and busy to do myself)


Jueix

Recommended Posts

So I was re-developing my potato script so it's better and removed something in it and now the make potato part is playing up and when he first uses the potato on the butter then the wait part happens it just keeps trying to use the potato on the butter. Can't be fucked figuring out what I removed by mistake but before I done some updates it worked fine ( Think I made some of the sleep(Randoms) to actual conditional. (Few left in though).

[code]

private void MakeItems() throws InterruptedException {

/* This part of the script makes the baked potato's into Buttered baked potato's.

*/

log("Attempting to make the items");

if(inventory.contains("Baked potato") && inventory.contains("Pat of butter")) {

randomclicks = random(1,5);

log("Random clicks = " + randomclicks);

if(randomclicks < 3) {

ScriptStatus = "Using butter on potato.";

log("uses butter before the baked.");

getInventory().interact("Use", "Pat of butter");

sleep(random(100, 1500));

getInventory().interact("Use", "Baked Potato");

sleep(random(100,1200));

log("Dialog after it's shown");

sleep(random(100,1700));

getKeyboard().typeKey((char)32);

log("Dialog after space");

new ConditionalSleep(20000) {

@Override

public boolean condition() {

return !inventory.contains("Baked Potato") || !inventory.contains("Pat of butter") || !getDialogues().isPendingContinuation();

}

}.sleep();

if(!inventory.contains("Pat of butter") || !inventory.contains("Baked Potato")) {

Stage = 3;

}

}

else if(randomclicks >= 3) {

ScriptStatus = "Using potato on butter.";

log("Uses baked before the butter.");

getInventory().interact("Use", "Baked Potato");

sleep(random(100, 1000));

getInventory().interact("Use", "Pat of butter");

sleep(random(100,2000));

log("Dialog after it's shown");

sleep(random(500,1500));

getKeyboard().typeKey((char)32);

log("Dialog after space");

new ConditionalSleep(20000) {

@Override

public boolean condition() {

return !inventory.contains("Baked Potato") || !inventory.contains("Pat of butter") || !getDialogues().isPendingContinuation();

}

}.sleep();

if(!inventory.contains("Pat of butter") || !inventory.contains("Baked Potato")) {

Stage = 3;

}

}

}

}

[/code]

Link to comment
Share on other sites

  • 1 month later...

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...