May 12, 20178 yr 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?
May 12, 20178 yr 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 May 12, 20178 yr by harrypotter
May 12, 20178 yr Author 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 May 12, 20178 yr by TheGreatests
May 12, 20178 yr int x = random(1,10) if (inventory.getAmount("item") == x) { bury } Edited May 12, 20178 yr by Charlotte
May 12, 20178 yr Author sA.inventory.contains(data.bone== 3 ) doesn't count the items? nether does yours...?
May 12, 20178 yr 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?
May 12, 20178 yr Author 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.
May 12, 20178 yr 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?
May 12, 20178 yr I'd probably make it bury every 1, 2 or 3 bones with the amount of buries for each number of bones be most for 1 and least for 3 sets of bones.
May 12, 20178 yr the most humanlike thing would probably be if (getInventory().isFull() && getInventory().contains("bones")) { bones.interact("bury"); } Edited May 12, 20178 yr by Shudsy
May 12, 20178 yr 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 May 12, 20178 yr by harrypotter
May 13, 20178 yr 7 minutes ago, harrypotter said: Wont this only bury 1 bone? the inventory will no longer be full after the first iteration. if (getInventory().contains("bones")) { bones.interact("bury"); } oh shit 2 am brainderp
May 13, 20178 yr Author 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.
May 13, 20178 yr Author 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.
Create an account or sign in to comment