BBot - The best bot of the world
Question about a function in cavebot - Printable Version

+- BBot - The best bot of the world (https://forums.bmega.net)
+-- Forum: Support (https://forums.bmega.net/forum-6.html)
+--- Forum: Support & Help (https://forums.bmega.net/forum-8.html)
+--- Thread: Question about a function in cavebot (/thread-15616.html)



Question about a function in cavebot - Armando - 07-22-2014

Hello, as you can see im a newbie using bbot, but I want to improve to make my own scripts and cavebots, so...

How "Trade> Bank withdraw" function works
(right click in cavebot screen)
We need to setup with
ID:
UnitPrice:
Total:

This will withdraw what we need to buy x item (such as potions)?
Well, is better then deposit all; whitdraw x; buy potions; deposit all .

Sorry if someon already ask this or have an "new tutorial". I seach on google and in bbot forum but dont find.
Will be nice if have in http://bbot.bmega.net/features.html an "mini tutorial" explaining all the bbot functions. The only official tutorial I found have this an footnote "cavebot.txt ยท Last modified: 2013/02/19 16:43 by dexter"


RE: Question about a function in cavebot - mr. Kris - 07-22-2014

Better for script when You make Variables.
My example:
Code:
Say (33451 31309 8:hi)
NPCSay (33451 31309 8:deposit all)
NPCSay (33451 31309 8:yes)
NPCSay (33451 31309 8:withdraw)
Withdraw (33451 31309 8:!vialmID! !vialmP! !vialmMAX!)
NPCSay (33451 31309 8:yes)
NPCSay (33451 31309 8:withdraw)
Withdraw (33451 31309 8:!vialhID! !vialhP! !vialhMAX!)
NPCSay (33451 31309 8:yes)
NPCSay (33451 31309 8:balance)
My function first deposit all money then withdraw money.
BBot withdrawing money for all items singly (You can see that in example)

!vialmID! - mana potion ID
!vialmP! - mana potion price
!vialmMAX! - mana potion max (for full check You must add one more variable "vialmMIN")
!vialhID! - health potion ID
!vialhP! - health potion price
!vialhMAX! - health potion max (full check You must add one more variable "vialhMIN")
Yoiu can add variables for SD or bolts etc...
BBot first checkhow much You have supply "vialmMAX - vialmMIN = how much vials You must buy" and multiply per vialmP

Ex. Variable by Erleo:
Code:
#Mana Vial Settings#
vialmID=268
vialmP=50
vialmMAX=1500
vialmLEAVE=100

#Health Vial Settings#
vialhID=7643
vialhP=310
vialhMAX=200
vialhLEAVE=70

So BBot withdraw only what You need money