So say you are botting and you want to make sure your char switches weapons and does not start punching mobs, use this macro. Execute the script alongside any bot you have and it will switch weapons after the allotted time has passed. I worked out the value for the Timer based on a 2k dura T-Bow. It takes around 45 minutes to use up all of the dura. So I set the Timer to 40 minutes, the bows usually end on 200 duraa at which point they are switched. This also depends on the area you hunt in, if there is not a constant stream of mobs then you can increase the time. Other Macros should not be a problem as this script will pause and resume them. One last thing, i've experienced a couple of crashes with this script, it could be something to do with the macro.pause and macro.resume instructions. The macro is a constant loop. It will click every box in the inventory and then scroll down to click the next two rows of boxes. The macro does not stop, but with so many bows it would take along time to get through your inventory, in which time you should have checked up on the bot. Enjoy! Code: begin Macro.Start stopwatch("Timer") Variable.Set("WhichBow", "0") end begin loop() Macro.Read stopwatch("Timer", "Timer") if Variable.Is greater than (Math)("Timer", "2400000") begin Macro.Restart stopwatch("Timer") Variable.Add (Math)("WhichBow", "1") Function.Execute("WhichBow") end end
function("WhichBow") begin if Variable.Is equal to("WhichBow", "1") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "90", "CoordsY", "415") end if Variable.Is equal to("WhichBow", "2") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "145", "CoordsY", "415") end if Variable.Is equal to("WhichBow", "3") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "200", "CoordsY", "415") end if Variable.Is equal to("WhichBow", "4") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "255", "CoordsY", "415") end if Variable.Is equal to("WhichBow", "5") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "310", "CoordsY", "415") end if Variable.Is equal to("WhichBow", "6") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "90", "CoordsY", "471") end if Variable.Is equal to("WhichBow", "7") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "145", "CoordsY", "471") end if Variable.Is equal to("WhichBow", "8") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "200", "CoordsY", "471") end if Variable.Is equal to("WhichBow", "9") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "255", "CoordsY", "471") end if Variable.Is equal to("WhichBow", "10") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "310", "CoordsY", "471") end if Variable.Is equal to("WhichBow", "11") begin Macro.Pause all other macros() Keyboard.Press key("{<f10>}") Macro.Pause("2000") Window.Calculate absolute coordinates("Soma Mythological Biography", "yes", "350", "502", "ClickX", "ClickY") Mouse.Click at coordinate("{ClickX}", "{ClickY}", "Left") Macro.Pause("2000") Mouse.Click at coordinate("{ClickX}", "{ClickY}", "Left") Variable.Set("WhichBow", "0") Macro.Pause("1000") Keyboard.Press key("{<f10>}") Macro.Pause("1000") Macro.Resume all paused macros() end end function
function("BowChange") begin Macro.Pause all other macros() Keyboard.Press key("{<f10>}") Macro.Pause("1000") Window.Calculate absolute coordinates("Soma Mythological Biography", "yes", "{CoordsX}", "{CoordsY}", "ClickX", "ClickY") Mouse.Click at coordinate("{ClickX}", "{ClickY}", "Right") Macro.Pause("1000") Keyboard.Press key("{<f10>}") Macro.Pause("1000") Macro.Resume all paused macros() end function
So say you are botting and you want to make sure your char switches weapons and does not start punching mobs, use this macro.
Execute the script alongside any bot you have and it will switch weapons after the allotted time has passed.
I worked out the value for the Timer based on a 2k dura T-Bow. It takes around 45 minutes to use up all of the dura. So I set the Timer to 40 minutes, the bows usually end on 200 duraa at which point they are switched. This also depends on the area you hunt in, if there is not a constant stream of mobs then you can increase the time.
Other Macros should not be a problem as this script will pause and resume them.
One last thing, i've experienced a couple of crashes with this script, it could be something to do with the macro.pause and macro.resume instructions.
The macro is a constant loop. It will click every box in the inventory and then scroll down to click the next two rows of boxes. The macro does not stop, but with so many bows it would take along time to get through your inventory, in which time you should have checked up on the bot.
Enjoy!
[code] begin Macro.Start stopwatch("Timer") Variable.Set("WhichBow", "0") end begin loop() Macro.Read stopwatch("Timer", "Timer") if Variable.Is greater than (Math)("Timer", "2400000") begin Macro.Restart stopwatch("Timer") Variable.Add (Math)("WhichBow", "1") Function.Execute("WhichBow") end end
function("WhichBow") begin if Variable.Is equal to("WhichBow", "1") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "90", "CoordsY", "415") end if Variable.Is equal to("WhichBow", "2") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "145", "CoordsY", "415") end if Variable.Is equal to("WhichBow", "3") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "200", "CoordsY", "415") end if Variable.Is equal to("WhichBow", "4") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "255", "CoordsY", "415") end if Variable.Is equal to("WhichBow", "5") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "310", "CoordsY", "415") end if Variable.Is equal to("WhichBow", "6") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "90", "CoordsY", "471") end if Variable.Is equal to("WhichBow", "7") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "145", "CoordsY", "471") end if Variable.Is equal to("WhichBow", "8") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "200", "CoordsY", "471") end if Variable.Is equal to("WhichBow", "9") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "255", "CoordsY", "471") end if Variable.Is equal to("WhichBow", "10") begin Function.Execute setting 2 variables("BowChange", "CoordsX", "310", "CoordsY", "471") end if Variable.Is equal to("WhichBow", "11") begin Macro.Pause all other macros() Keyboard.Press key("{<f10>}") Macro.Pause("2000") Window.Calculate absolute coordinates("Soma Mythological Biography", "yes", "350", "502", "ClickX", "ClickY") Mouse.Click at coordinate("{ClickX}", "{ClickY}", "Left") Macro.Pause("2000") Mouse.Click at coordinate("{ClickX}", "{ClickY}", "Left") Variable.Set("WhichBow", "0") Macro.Pause("1000") Keyboard.Press key("{<f10>}") Macro.Pause("1000") Macro.Resume all paused macros() end end function
function("BowChange") begin Macro.Pause all other macros() Keyboard.Press key("{<f10>}") Macro.Pause("1000") Window.Calculate absolute coordinates("Soma Mythological Biography", "yes", "{CoordsX}", "{CoordsY}", "ClickX", "ClickY") Mouse.Click at coordinate("{ClickX}", "{ClickY}", "Right") Macro.Pause("1000") Keyboard.Press key("{<f10>}") Macro.Pause("1000") Macro.Resume all paused macros() end function [/code]
|