![]() |
Hard help - 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: Hard help (/thread-19366.html) |
Hard help - lukasze - 02-14-2016 Hello Could someone fix the macro it work?
Quote:x:=Self.X() RE: Hard help - Catar - 02-14-2016 U can only have one [else] then u need use {else} then u can put inside of that [else2] clsoe it with{else2} and go on go on Ill show u example of use.. Here is my macro that puts Magma amulet on, when it drops one from monster. And when its used, it puts other amulet back on. Until it finds another magma [macro]1000 {magma amulet} camu:=Self.Inventory.Amulet() !camu!<>817 [else] Misc.ItemCountEx(817)>=1 [else2] !camu!==21170 [else3] Self.UnEquip.Amulet(0) Exit() {else3} Self.Equip.Amulet(817) Exit() {else2} !camu!<>21170 [else4] Self.Equip.Amulet(21170) Exit() {else4} Exit() {else} Exit() [/macro] As u can see each one has to be open[] and closed {} There is another example. My macro that puts on 2 handed slayer when fighting hellhounds, and changes to 1hand + shield when fighting anything else (dont ask why I use one like that, not ur business) [macro]200 {weapon change hel} #Weapons 1hand=16175 2hand=20069 shield=16116 lreka:=Self.Inventory.LeftHand() preka:=Self.Inventory.RightHand() hellh:=Creatures.ByRangeName(2, Hellhound) !hellh!==1 [v1] !lreka!<>!2hand! [v2] Tibia.SendKey(120) exit() {v2} exit() {v1} !preka!<>!shield! [v4] !lreka!<>!1hand! [v5] Tibia.SendKey(117) exit() {v5} Tibia.SendKey(118) exit() {v4} !lreka!<>!1hand! Tibia.SendKey(117) exit() [/macro] Ok, lets go to another issue. After every Map.HasID(4246, !x!, !y!, !z!) you need to define what value you looking for for example Map.HasID(4246, !x!, !y!, !z!)==1 if 4246 matches the ID found on the location After that u have to put condition is True or False, that is [bracket] for True value, and {bracket}for false value Bot will then do things under [bracket] when 4246 is what on the floor, and {bracket}when not. Work on it, figure it out. I go take a bath |