Jump to content

Few questions


TheGreatests

Recommended Posts

8 minutes ago, TheGreatests said:

Was wondering, how can I add a random number to to start buring bones. 

 

sA.inventory.contains(data.bone== 3 ) and also how to count items?

 

I've no idea what you're asking in your first question.

As for getting the amount of an item your inventory has:

inventory.getAmount("raw shrimps");

All this is well documented in the API docs: https://osbot.org/api/

Edited by harrypotter
Link to comment
Share on other sites

18 minutes ago, harrypotter said:

I've no idea what you're asking in your first question.

As for getting the amount of an item your inventory has:


inventory.getAmount("raw shrimps");

All this is well documented in the API docs: https://osbot.org/api/

.... I am trying to pick a random number to bury from... your 

inventory.getAmount("raw shrimps") is exactly what I already have??

 

Edited by TheGreatests
Link to comment
Share on other sites

1 minute ago, TheGreatests said:

.... I am trying to pick a random number to bury from... your 

inventory.getAmount("raw shrimps") is exactly what I already have??

 

Why would you pick a random number to bury from? 

No where in the snippet you showed us did you use the

getAmount() 

method? If you're already using this then why are you asking how to get the amount :???:

I don't understand what you're trying to do?

Link to comment
Share on other sites

sA.inventory.getAmount(data.bone) <= 3 worked, tyvm man! now onto finding a random number to input there. 

1 minute ago, harrypotter said:

Why would you pick a random number to bury from? 

No where in the snippet you showed us did you use the


getAmount() 

method? If you're already using this then why are you asking how to get the amount :???:

I don't understand what you're trying to do?

Make it more human like, not everyone buries bones at 2, or a full inventory. 

Link to comment
Share on other sites

2 minutes ago, TheGreatests said:

sA.inventory.getAmount(data.bone) <= 3 worked, tyvm man! now onto finding a random number to input there. 

Make it more human like, not everyone buries bones at 2, or a full inventory. 

No human buries bones in a random fashion, you could end up burying bone 2 then jumping to bone 24. This is probably more likely to get you banned than burying as normal will?

  • Like 1
Link to comment
Share on other sites

33 minutes ago, Shudsy said:

the most humanlike thing would probably be

 

if (getInventory().isFull() && getInventory().contains("bones")) {

bones.interact("bury");

}

Wont this only bury 1 bone? the inventory will no longer be full after the first iteration.

if (getInventory().contains("bones")) {
	bones.interact("bury");
}

 

Edited by harrypotter
Link to comment
Share on other sites

Random rnum = new Random();
  int num = rnum.nextInt(20 +1);
  return   sA.inventory.getAmount(data.bone) <= num&& data.Chickenbarn.contains(sA.players.myPlayer());
 }

 

Yes humans bury bones in random numbers, out better then pattern based scripts you guys are dishing out banning 95% of the damn community. If you cant play the game and evaluate how you play it, don't script it.

Link to comment
Share on other sites

Damn I felt alittle mean here. Sorry guys, I seriously think you guys need to implement better features into your scripts though. There is virtually no reason to argue with me on my random generation of of burying, I evaluated how I would play the game. Majority of the people are continuously look at the inventory. 

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