Small Stone Macro - Printable Version +- BBot - The best bot of the world (https://forums.bmega.net) +-- Forum: Scripts & Macros (https://forums.bmega.net/forum-4.html) +--- Forum: Requests (https://forums.bmega.net/forum-17.html) +--- Thread: Small Stone Macro (/thread-20501.html) |
Small Stone Macro - FelixZN - 01-19-2017 HAIL!! would someone please link me with a macro that uses a sword then when the char loots a certain amount of small stone it equips that and once the small stones are finished it equips the sword back. I want to leave my RP training with goblins. RE: SMALL STONE SCRIPT - Catar - 01-19-2017 Ok created macro, made it just a little more advanced, but tested it and, it works as I intended. Macro will PUT ON small stones when you have more than 20 of them, and will keep putting more in the hand if u loot them unitl you run out. When you run out of stones, it will put back a weapon, and wait until u have 20 stones again. What you need to do, is to change SwordID:=3319 to ID of your weapon besides stones and StoneUse:=20 is the number of stones you want to collect before starting using them copy and paste this [macro]400 {StoneSword} StoneID:=1781 SwordID:=3319 StoneUse:=20 StoneQT:=Misc.ItemCountEx(!StoneID!) StoneHandQT:=Self.Inventory.LeftHand.Count() leftH:=Self.Inventory.LeftHand() !StoneQT!>=!StoneUse! [ON] !leftH!<>!StoneID! [a1] Self.Equip.LeftHand(!StoneID!) exit() {a1} !StoneQT!>!StoneHandQT! [b1] Self.Equip.LeftHand(!StoneID!) exit() {b1} exit() {ON} !leftH!<>!StoneID! [a2] !leftH!==0 [b2] Self.Equip.LeftHand(!SwordID!) exit() {b2} !leftH!<>!SwordID! [c1] Self.Equip.LeftHand(!SwordID!) exit() {c1} exit() {a2} Label(a1) exit() [/macro] If you don't know where to copy it, watch video in my thread, link in signature here is a code if someone wants to look at it ;d I know it looks like a mess, but its bunch of loops and IFs conditions Code: StoneID:=1781 RE: Small Stone Macro - FelixZN - 01-19-2017 Thank you so much sensei. Your reputation rating has successfully been added for this user. RE: Small Stone Macro - Catar - 01-19-2017 I just realised it may be risky to use, Bot may - for some reason - accidently put on hand stone directly from goblin, leaving your weapon in body, but i think it shouldn't since the only reason he would put stone ON weapon, is when he have over 20 of them Test it first with something cheap that you don't care to lose, and see if that happens what I assume. If yes, fix it by using Tibia.SendKey(VirtualKeyCode) instead of Self.Equip.LeftHand (below) but you would have to setup Stones and weapon into tibia Hotkeys as EQUIP item example hotlkeys 118=F7 Stones 119=F8 weapon You would have to change macro then to this: [macro]400 {StoneSword} Fstone:=118 Fsword:=119 StoneID:=1781 SwordID:=3319 StoneUse:=20 StoneQT:=Misc.ItemCountEx(!StoneID!) StoneHandQT:=Self.Inventory.LeftHand.Count() leftH:=Self.Inventory.LeftHand() !StoneQT!>=!StoneUse! [ON] !leftH!<>!StoneID! [a1] Tibia.SendKey(!Fstone!) exit() {a1} !StoneQT!>!StoneHandQT! [b1] Tibia.SendKey(!Fstone!) exit() {b1} exit() {ON} !leftH!<>!StoneID! [a2] !leftH!==0 [b2] Tibia.SendKey(!Fsword!) exit() {b2} !leftH!<>!SwordID! [c1] Tibia.SendKey(!Fsword!) exit() {c1} exit() {a2} Label(a1) exit() [/macro] Code: Fstone:=118 RE: Small Stone Macro - FelixZN - 01-19-2017 Catar one last request on this topic, is it possible to change stance, so when with small stone go defensive and when with sword got offensive RE: Small Stone Macro - Catar - 01-19-2017 No, it's not possible, unfortunately RE: Small Stone Macro - FelixZN - 01-20-2017 just tried the macro and so far its excellent !!!!!!!!!!! just a note, it wont stack looted small stones to the ones already being used. another request, sometimes the cavebot stops, whats the macro to keep it on also just noticed that on the macro after the small stones are finished it wont equip sword ok so bbot gave me wrong id for jagged sword, so should be fine now RE: Small Stone Macro - Catar - 01-20-2017 (01-20-2017, 12:31 AM)FelixZN Wrote: just tried the macro and so far its excellent !!!!!!!!!!! just a note, it wont stack looted small stones to the ones already being used. What do you mean? Oh right, equipping with hotkey, wont do it..., that's why I told to test the first version first, if it won't drop weapon in goblin, it would be fine to use one last version, it shuld be good and safe, just remember to setup your ID on SwordID [macro]400 {StoneSword} Fstone:=118 Fsword:=119 StoneID:=1781 SwordID:=3319 StoneUse:=20 StoneQT:=Misc.ItemCountEx(!StoneID!) StoneHandQT:=Self.Inventory.LeftHand.Count() leftH:=Self.Inventory.LeftHand() !StoneQT!>=!StoneUse! [ON] !leftH!<>!StoneID! [a1] Tibia.SendKey(!Fstone!) exit() {a1} !StoneQT!>!StoneHandQT! [b1] Self.Equip.LeftHand(!StoneID!) exit() {b1} exit() {ON} !leftH!<>!StoneID! [a2] !leftH!==0 [b2] Tibia.SendKey(!Fsword!) exit() {b2} !leftH!<>!SwordID! [c1] Tibia.SendKey(!Fsword!) exit() {c1} exit() {a2} Label(a1) exit()[/macro] Changed, If there ARE already stones in hand, it will equip any extra looted normally, with Self.Equip.LeftHand. The only way it would lose weapon, was if it put stones directly ON weapon that is in hand, since, it will use Self.Equip.LeftHand only when stones already in hand, that won't happen. |