BBot - The best bot of the world

Full Version: Help with Macro
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I'm trying to make macro and i dont know how to do it in bbot so i wrote it in PHP to show you what im trying to do.

if(Self.Inventory.Ammunition(3277) < 2){
Self.Equip.LeftHand(3208);
Exit;
}
else{
Self.Equip.LeftHand(3277)
Exit;
}
How to make from it BBOT Macro??

Ill give reputation for fastest answer
[macro]1000 {change ID} Self.Inventory.Ammunition(3277)<=2 [else] Self.Equip.LeftHand(3208) {else} Self.Equip.LeftHand(3277)[/macro]

Between brackets is the label/"else" you want to skip if the result of the previous command is false. If the result is false he jumps to the label between braces.
Thank for help Smile Reputation ++

ok, ive got such macro:
Self.Inventory.Ammunition.Count(3277)<=2[else]
Self.Equip.LeftHand(3297)
{else}
Self.Equip.LeftHand(3277)

and it doesnt changes my spears when are only 2 to serpent sword ;(
(01-08-2013, 02:24 PM)Dexter Wrote: [ -> ][macro]1000 {change ID} Self.Inventory.Ammunition(3277)<=2 [else] Self.Equip.LeftHand(3208) {else} Self.Equip.LeftHand(3277)[/macro]

Between brackets is the label/"else" you want to skip if the result of the previous command is false. If the result is false he jumps to the label between braces.

[macro]1000 {change ID} Self.Inventory.Ammunition(3277)<=2 [else] Self.Equip.LeftHand(3208) Exit {else} Self.Equip.LeftHand(3277)[/macro]
(01-08-2013, 04:02 PM)MegaNo0body Wrote: [ -> ]
(01-08-2013, 02:24 PM)Dexter Wrote: [ -> ][macro]1000 {change ID} Self.Inventory.Ammunition(3277)<=2 [else] Self.Equip.LeftHand(3208) {else} Self.Equip.LeftHand(3277)[/macro]

Between brackets is the label/"else" you want to skip if the result of the previous command is false. If the result is false he jumps to the label between braces.

[macro]1000 {change ID} Self.Inventory.Ammunition(3277)<=2 [else] Self.Equip.LeftHand(3208) Exit {else} Self.Equip.LeftHand(3277)[/macro]

Doesn't Work ;s
Try this:

[macro]1000 {change ID} Self.Inventory.Ammunition(3277)<=2 [else] Self.Equip.LeftHand(3208) Exit() {else} Self.Equip.LeftHand(3277)[/macro]