![]() |
problem with macro command NPC.Buy - Printable Version +- BBot - The best bot of the world (https://forums.bmega.net) +-- Forum: BBot (https://forums.bmega.net/forum-3.html) +--- Forum: General (https://forums.bmega.net/forum-19.html) +--- Thread: problem with macro command NPC.Buy (/thread-13758.html) |
problem with macro command NPC.Buy - Bbotone - 01-28-2014 When I run the macros on cavebot, it doesnt buy potions on one npc, nor buy rope and shovel in other npc, but it works fine when I debug the script near the npcs. I added a "Self.Say(!qtmp! !qthp!)" to debug, it says "8 8" on default, which is the quantity of potions that Npc.Buy uses as value. It's weird because it says "hi"/"trade" to npc, and "8 8" on default, and when I debug the macros near the npcs, it buys the potions correctly anyone can help? thanks in advance ------------------------------------- CAVEBOT PART ... Point (32345 31818 7) Point (32349 31819 7) Point (32350 31824 7) Point (32348 31827 7) Fixed (32345 31828 7) Label (32345 31828 7:npcpotion) Macro (32345 31828 7:checksupplies) Delay (32345 31828 7:2) Macro (32345 31828 7:buysupplies) Delay (32345 31828 7:3) Point (32350 31827 7) Point (32350 31823 7) Point (32350 31818 7) Point (32346 31817 7) Point (32342 31815 7) Point (32339 31812 7) Fixed (32339 31812 7) MapTool (32339 31812 7:Target: 9352 Use: 0 Pos: 32338 31812 7) Point (32335 31810 7) Fixed (32335 31809 7) Macro (32334 31809 7:buyropeshovel) Fixed (32337 31812 7) MapTool (32337 31812 7:Target: 9352 Use: 0 Pos: 32338 31812 7) Point (32340 31812 7) Point (32340 31808 7) ... ----------------------------------------- GLOBAL VARIABLES PART: ... idmp=268 idhp=266 pricemp=50 pricehp=45 qtmp=8 qthp=8 refilhp=1 refilmp=1 refilcap=10 idrope=3003 idshovel=3457 rope=1 shovel=1 ... ---------------------------------------- MACRO buysupplies: Macro.Wait(700) Self.Say(hi) Macro.Wait(700) NPC.Say(trade) Macro.Wait(2000) Self.Say(!qtmp! !qthp!) NPC.Buy(!idmp!, !qtmp!, 0) Macro.Wait(700) NPC.Buy(!idhp!, !qthp!, 0) Macro.Wait(1000) ----------------------------------- MACRO buyropeshovel Self.Say(hi) Macro.Wait(700) NPC.Say(trade) Macro.Wait(1500) ropeqt:=Misc.ItemCountEx(!idrope!) shovelqt:=Misc.ItemCountEx(!idshovel!) !rope!==1 [checkshovel] !ropeqt!==0 [checkshovel] NPC.Buy(!idrope!, !rope!, 0) Macro.Wait(1500) {checkshovel} !shovel!==1 !shovelqt!==0 NPC.Buy(!idshovel!, !shovel!, 0) Macro.Wait(2000) --------------------------------------------- btw, it is to function on carlin potion shop RE: problem with macro command NPC.Buy - erykans - 01-28-2014 WHy use all this ? and all these variables? all you have to do is , Npc say hi / trade , then click Add -> trade -> Buy, just say how much potions in total to buy and there you go done -.- wtf is the point of all this crap you did? same with rope . just Add -> trade -> Buy , Id rope and how much ropes to buy ... If i helped a rep+ would be nice , thanks. RE: problem with macro command NPC.Buy - Bbotone - 01-28-2014 I agree, I reduced the macro "buyropeshovel" but I still want to know why didn't work RE: problem with macro command NPC.Buy - erykans - 01-28-2014 Hehe ![]() Variables is a new feature in Bbot , im not good with them yet but im getting there, Wait untill somebody who is good with variables answer and then you will know ![]() |