What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

[PB]How to interact with an item?

Battler624

Member
Joined
Feb 9, 2012
Messages
472
Reaction score
0
I'm wondering how do i make PB interact with "Sparkling Shard" to make "Serpent's Eye"?
i usually use a macro "/use Sparkling Shard" but when you have over 200 stacks thats much for a macro.
 
Found it

this is what i used Lua.DoString("RunMacro('Sparkling Shard')");
this runs the macro named Sparkling Shard.... but now i have another question, will it use the macro till all shards are finished or just once? while i was searching i used a keypress program so idk
 
just use While condition and put InBagCount(sparkling shard ID) >= 10 as condition and put Lua.DoString("RunMacro('Sparkling Shard')"); in the While loop
 
^^ yea done that, was looking at some shufflebuddy code and used some of it now its working.

another question is it possible for the bot to extract an exact amount of 3 items "the gems" using the lowest amount one? for example i have 65x blue , 80 yellow and 63 orange gems "forgot the names xD" can i make the bot take 63 out of each? and the rest stays in the bank ofcourse.
 
Lua.DoString("UseItemByName(ItemID)"); should work aswell.
 
^^ yea done that, was looking at some shufflebuddy code and used some of it now its working.

another question is it possible for the bot to extract an exact amount of 3 items "the gems" using the lowest amount one? for example i have 65x blue , 80 yellow and 63 orange gems "forgot the names xD" can i make the bot take 63 out of each? and the rest stays in the bank ofcourse.

here's some simple pseudo-code
declare var1 = 0 ;

if (inBagCount(blueGemItemId) < var1) var1= inBagCount(blueGemItemId);
if (inBagCount(yellowGemsItemId) < var1) var1= inBagCount(yellowGemsItemId);
if (inBagCount(orangeGemsItemId) < var1) var1= inBagCount(orangeGemsItemId);

//now var1 stores the lowest "InbagCount" value encountered.

withdraw blue gems for var1 amount
withdraw gem2 for var1 amount
withdraw gem3 for var1 amount

do crafts
 
Last edited:
Could you post what exactly u want to do ? I mean the whole process .

I think there might be an easier way to do what u want to do

If im guessing right , what u want is the bot to withdraw Blue , Yellow and Orange gems from your bank and craft Ornate Band.

Why don't you do it something like this.


Withdraw 50 Blue Gems
Withdraw 50 Yellow Gems
Withdraw 50 Orange Gems
While ( Blue Gems > 1 && Yellow Gems > 1 and Orange Gems > 1 )
----- Craft Ornate Band
Deposit Blue, Yellow , Orange Gems to Bank
 
Last edited:
How do I put:

Lua.DoString("RunMacro('Sparkling Shard')");

Into the while loop? I'm not sure which action I would use.

Also, when I make a while loop of: " InBagCount(90407) >= 10 "

I get a compile error: "The name 'InBagCount' does not exist in the current context"

Please help!
 
<If Condition="InbagCount(90407) >= 10" IgnoreCanRun="True">
<While Condition="InbagCount(90407) >=10" IgnoreCanRun="True">
<CustomAction Code="Lua.DoString("UseItemByName(90407)"); " />
</While>
 
How do I put:

Lua.DoString("RunMacro('Sparkling Shard')");

Into the while loop? I'm not sure which action I would use.

Also, when I make a while loop of: " InBagCount(90407) >= 10 "

I get a compile error: "The name 'InBagCount' does not exist in the current context"

Please help!

check the documentation, it's InbagCount(itemID) :)

Code:
while InbagCount(itemID) >= 10
[COLOR=#333333]           customcode(Lua.DoString("UseItemByName([/COLOR]90407[COLOR=#333333])"))[/COLOR]
 
Back
Top