here is the code;
Code:
begin
Color.Limit area of interest to window("Myth of Soma : The Rise of Gorshak", "Yes")
// Set Top left and bottom right coords of the area we want the bot to stay inside
// check SomaInfo file for cords fo hunting areas
Variable.Set("LeftX", "521")
Variable.Set("RightX", "550")
Variable.Set("TopY", "342")
Variable.Set("BottomY", "376")
// Move or not when attacking(Hold shift). {<end>} = no {<lshiftkey>} = yes
// Daylight RGB Mobs
Variable.Set("DRed", "165")
Variable.Set("DGreen", "113")
Variable.Set("DBlue", "107")
// VoD RGB Mobs
Variable.Set("NRed", "173")
Variable.Set("NGreen", "150")
Variable.Set("NBlue", "66")
Variable.Set("PixelSearchDistance", "350")
Variable.Set("NearPixelSearchDistance", "230")
Variable.Set("MovePause", "333")
Variable.Set("PixelRange", "5")
Variable.Set("OldMover", "1")
Memory.Get value("SomaWindow", "00536788", "4", "CharCoordsY")
Memory.Get value("SomaWindow", "00536784", "4", "CharCoordsX")
// activates other macros. You have to deactivate these manually even when you stop this macro
end
begin loop()
Color.Limit area of interest to window("Myth of Soma : The Rise of Gorshak", "Yes")
Memory.Get value("SomaWindow", "00536788", "4", "CharCoordsY")
Memory.Get value("SomaWindow", "00536784", "4", "CharCoordsX")
Window.Calculate absolute coordinates("Myth of Soma : The Rise of Gorshak", "yes", "400", "300", "CharX", "CharY")
Macro.Pause("4")
if Color.Near coordinate is (RGB)("{DRed}", "{DGreen}", "{DBlue}", "400", "300", "{PixelSearchDistance}")
begin
Variable.Set("FightSearch", "0")
while Variable.Is less than (Math)("FightSearch", "5")
begin
Color.Find coordinate of occurrence on screen closest to coordinate (RGB)("{DRed}", "{DGreen}", "{DBlue}", "{PixelRange}", "400", "300", "MobX", "MobY")
if Variable.Exists("MobX")
begin
Mouse.Set coordinate("{MobX}", "{MobY}")
Macro.Pause("4")
if Color.Near coordinate is within (RGB range)("255", "162", "0", "10", "{MobX}", "{MobY}", "100")
begin
Variable.Set("FightSearch", "6")
Function.Execute("Attack")
end
if Color.Near coordinate is not within (RGB range)("255", "162", "0", "10", "{MobX}", "{MobY}", "100")
begin
Variable.Remove("MobX")
Variable.Increment (Math)("FightSearch")
end
end
end
end
if Color.Near coordinate is (RGB)("255", "255", "107", "400", "300", "{PixelSearchDistance}")
begin
Variable.Set("Pause", "0")
Variable.Set("Status", "CollectingDrops")
Mouse.Click at color closest to coordinate (RGB)("0", "255", "255", "{PixelRange}", "400", "300", "Left")
Macro.Pause("2000")
end
if Variable.Is less than (Math)("CharCoordsX", "{LeftX}")
begin
Function.Execute("MoveRight")
end
if Variable.Is equal to("CharCoordsX", "{LeftX}")
begin
Function.Execute("MoveRight")
end
if Variable.Is greater than (Math)("CharCoordsX", "{RightX}")
begin
Function.Execute("MoveLeft")
end
if Variable.Is equal to("CharCoordsX", "{RightX}")
begin
Function.Execute("MoveLeft")
end
if Variable.Is less than (Math)("CharCoordsY", "{TopY}")
begin
Function.Execute("MoveDown")
end
if Variable.Is equal to("CharCoordsY", "{TopY}")
begin
Function.Execute("MoveDown")
end
if Variable.Is greater than (Math)("CharCoordsY", "{BottomY}")
begin
Function.Execute("MoveUp")
end
if Variable.Is equal to("CharCoordsY", "{BottomY}")
begin
Function.Execute("MoveUp")
end
Variable.Set random number("Mover", "1", "4")
If Variable.Is equal to("Mover", "1")
begin
if Variable.Is not equal to("OldMover", "2")
begin
Function.Execute("MoveUp")
end
end
If Variable.Is equal to("Mover", "2")
begin
if Variable.Is not equal to("OldMover", "1")
begin
Function.Execute("MoveDown")
end
end
If Variable.Is equal to("Mover", "3")
begin
if Variable.Is not equal to("OldMover", "4")
begin
Function.Execute("MoveLeft")
end
end
If Variable.Is equal to("Mover", "4")
begin
if Variable.Is not equal to("OldMover", "3")
begin
Function.Execute("MoveRight")
end
end
Variable.Set("OldMover", "{Mover}")
end
function("MoveUp")
begin
Window.Calculate absolute coordinates("Myth of Soma : The Rise of Gorshak", "yes", "400", "260", "MoveUpX", "MoveUpY")
Mouse.Move to coordinate("{MoveUpX}", "{MoveUpY}")
Mouse.Click at coordinate("{MoveUpX}", "{MoveUpY}", "Left")
Macro.Pause("{MovePause}")
end
function
function("MoveDown")
begin
Window.Calculate absolute coordinates("Myth of Soma : The Rise of Gorshak", "yes", "400", "350", "MoveDownX", "MoveDownY")
Mouse.Move to coordinate("{MoveDownX}", "{MoveDownY}")
Mouse.Click at coordinate("{MoveDownX}", "{MoveDownY}", "Left")
Macro.Pause("{MovePause}")
end
function
function("MoveLeft")
begin
Window.Calculate absolute coordinates("Myth of Soma : The Rise of Gorshak", "yes", "300", "305", "MoveLeftX", "MoveLeftY")
Mouse.Move to coordinate("{MoveLeftX}", "{MoveLeftY}")
Mouse.Click at coordinate("{MoveLeftX}", "{MoveLeftY}","Left")
Macro.Pause("{MovePause}")
end
function
function("MoveRight")
begin
Window.Calculate absolute coordinates("Myth of Soma : The Rise of Gorshak", "yes", "500", "305", "MoveRightX", "MoveRightY")
Mouse.Move to coordinate("{MoveRightX}", "{MoveRightY}")
Mouse.Click at coordinate("{MoveRightX}", "{MoveRightY}", "Left")
Macro.Pause("{MovePause}")
end
function
function("Attack")
begin
if Color.Near coordinate is within (RGB range)("255", "162", "0", "10", "{MobX}", "{MobY}", "100")
begin
Mouse.Hold button("Left")
Variable.Set("Count", "1")
Variable.Set("OldMobX", "{MobX}")
Variable.Set("OldMobY", "{MobY}")
Variable.Remove("MobX")
Color.Find coordinate of occurrence on screen closest to coordinate (RGB)("{DRed}", "{DGreen}", "{DBlue}", "{PixelRange}", "400", "300", "MobX", "MobY")
if Variable.Exists("MobX")
begin
while Variable.Is less than (Math)("Count", "15")
begin
Variable.Calculate difference (Math)("OldMobX", "MobX", "Xdif")
Variable.Calculate difference (Math)("OldMobY", "MobY", "Ydif")
Variable.Evaluate (Math)("{Ydif}+{Xdif}", "MobDistance")
if Variable.Is greater than (Math)("MobDistance", "40")
begin
Mouse.Move to coordinate("{MobX}", "{MobY}")
Macro.Pause("150")
Variable.Increment (Math)("Count")
end
if Variable.Is less than (Math)("MobDistance", "39")
begin
Macro.Pause("1000")
Variable.Increment (Math)("Count")
Variable.Increment (Math)("Count")
end
If Color.Near coordinate is not within (RGB range)("255", "162", "0", "20", "{MobX}", "{MobY}", "150")
begin
Variable.Set("Count", "240")
Mouse.Release button("Left")
end
end
Mouse.Click("Left")
end
if Variable.Does not exist("MobX")
begin
Variable.Set("MobX", "{OldMobX}")
Mouse.Release button("Left")
end
end
end
function