Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Guide] New Refiller macros
#1
Exclamation 
Not exactly new, but anyway ppl should know about it, so they can edit the old script or create new ones with refreshed macro.

So here's a quick tutorial.

Withdrawiing money

1. First of all you need to place a Fixed waypoint in front of NPC. If NPC is walking around just find a place in the center of his walking area. You add a fixed waypoint it by clicking right mouse button in cavebot section and choosing Add-->Fixed.

2. Next thing. You need to add messages. Do it by clicking right mouse button and add Messages-->Say and also NPC Say. In Say type in "hi" and in NPC Say "withdraw"

3. Now you put in withdraw macro but in shorted version. Again click right mouse button in cavebot section and choose Codes/Labels-->Macro

1000 {Withdraw} VarSetEx(Total, X) VarSet(Potnow) Misc.ItemCountEx(Y) VarSub(Total, !Potnow!) VarMult(Total, Z) HUD.Display(!Total!) NPC.Say(!Total!)

Where:
X - number of potions
Y - ID of the potion (Press ALT+F8 and click at the potion if you want to know the ID of it. It will display in left top corner)
Z - price of a single potion

4. Last thing. NPC needs your confitmation to withdraw the money. So just add another NPC Say function and type in just "yes"

Example:

Code:
Fixed (32338 32836 7)
Say (32338 32836 7:hi)
NPCSay (32338 32836 7:withdraw)
Macro (32338 32836 7:1000 {Withdraw} VarSetEx(Total, 100) VarSet(Potnow) Misc.ItemCountEx(268) VarSub(Total, !Potnow!) VarMult(Total, 50) HUD.Display(!Total!) NPC.Say(!Total!))
NPCSay (32338 32836 7:yes)

If you want it to withdraw money also for MPs and HPs you need to repeat steps 2-4 without the Say function

Buying potios

1. First of all you need to place a Fixed waypoint in front of NPC. If NPC is walking around just find a place in the center of his walking area. You add a fixed waypoint it by clicking right mouse button in cavebot section and choosing Add-->Fixed.

2. Next thing. You need to add messages. Do it by clicking right mouse button and add Messages-->Say and also NPC Say. In Say type in "hi" and in NPC Say "trade"

3. Now you put in withdraw macro but in shorted version. Again click right mouse button in cavebot section and choose Codes/Labels-->Macro

1000 {Potions Reffiler} VarSetEx(Total, X) VarSet(Potnow) Misc.ItemCountEx(Y) VarSub(Total, !Potnow!) HUD.Display(!Total!) NPC.Buy(Y, !Total!, 1)

Where:
X - number of potions
Y - ID of the potion (Press ALT+F8 and click at the potion if you want to know the ID of it. It will display in left top corner)

4. At the end add NPC Say and type in "bye". That will close the trade window and your conversation with NPC. I personally add it, because I always add ResetBackpacks function just after refilling. So this way it won't collide.

Example:
Code:
Fixed (32345 32810 7)
Say (32345 32810 7:hi)
NPCSay (32345 32810 7:trade)
Macro (32345 32810 7:1000 {Potions Reffiler} VarSetEx(Total, 100) VarSet(Potnow) Misc.ItemCountEx(268) VarSub(Total, !Potnow!) HUD.Display(!Total!) NPC.Buy(268, !Total!, 1))
NPCSay (32345 32810 7:bye)

If you want it to buy also MPs and HPs just add second Macro just after the first one.


Seller

1. First of all you need to place a Fixed waypoint in front of NPC. If NPC is walking around just find a place in the center of his walking area. You add a fixed waypoint it by clicking right mouse button in cavebot section and choosing Add-->Fixed.

2. Next thing. You need to add messages. Do it by clicking right mouse button and add Messages-->Say and also NPC Say. In Say type in "hi" and in NPC Say "trade"

3. Now you put in withdraw macro but in shorted version. Again click right mouse button in cavebot section and choose Codes/Labels-->Macro

1000 {Seller} NPC.Sell(X, -1)

Where:
X - ID of the item (Press ALT+F8 and click at the item if you want to know the ID of it. It will display in left top corner)
-1 - Don't change it. It means that all items with X ID will be sold.

Example:
Code:
Fixed (32293 32818 7)
Say (32293 32818 7:hi)
NPCSay (32293 32818 7:trade)
Macro (32293 32818 7:1000 {Crossbow} NPC.Sell(3349, -1))

If you want it to sell more items just add second Macro just after the first one.
#2
Nice topic napster!

Sticked. Big Grin
#3
Amazing.
#4
thats a true tutorial, gj man and thx Smile
#5
Hey. great guide but can You tell me how to make refill spear? bot have to refill spear for full cap.
Thanks for answer.
#6
This was requested and I had yet to see it here. It helps, and works for me. Sorry that it is not in the same format as yours Napp.

1000 {Spears} VarSetEx(item, 7378) VarSet(cap) Self.Capacity VarDiv(cap, 25) Self.Say(hi) Macro.Wait(2000) HUD.Display(!item!/!cap!) NPC.Say(trade) NPC.Buy(!item!, !cap!, 1) NPC.Say(bye)


~ZacharyGG
May you have the hindsight to know where you've been
the foresight to know where you're going
and the insight to know when you're going too far.


ZacharyGG
#7
well done! But i dont seems to get it to work. I follow every step and know how to do it and such but somehow my bbot wont use any macros?? is there any button i have to agree for the bot to use macros or what's going on?
#8
This tutorial is not necessary anymore as the Cavebot now have the functions: Withdraw/Buy/Sell with easy-config.

Closed.


Forum Jump:


Users browsing this thread: 1 Guest(s)