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:
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:
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:
If you want it to sell more items just add second Macro just after the first one.
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.