Help - Search - Members - Calendar
Full Version: Macro issues
AC Tools Everything Macro > AC Tool Macros > Other Macros
azalinsob
Below is the macro i wrote for a game called Darkfall Online. It is a two client macro that casts a spell till im out of mana, switches to a second client to cast a mana heal 5 times then switches back. The switching clients works as ive used it before in my previous macros but for some reason when i start this macro it just Sits at line 1 and spins. I think its an issue with loadRGB at the bottom. I dont have alot of experience with this function and i think i might be using it wrong. Any help is appreciated.

CODE
SetActiveWindow Darkfall Online
// 2 client macro to cast untill you are out of mana, then switch clients to lend mana.


procedure Casting
delay 2000
Isblack 27,436 // target the round circle to check if your weapon is equiped
call EquipStaff
delay 2000
else
delay 1000
keys 1
delay 300
leftclick
delay 3000
end
end

procedure EquipStaff
// Procedure to equip a staff if yours breaks
delay 1000
keys l
delay 2000
MousePos 79,952 // location of staves in bag
LeftMouseDown
delay 2000
MousePos 25,101 // location of the staves in the hotbar
LeftMouseUp
delay 2000
keys l
delay 2000
keys 2
delay 2000
keys r
delay 2000
end




//procedure EquipStaff2
// Procedure to equip a staff if yours breaks on the second account
//delay 1000
//keys l
//delay 2000
//MousePos 80,954 // location of staves in bag
//LeftMouseDown
//delay 2000
//MousePos 21,102 // location of the staves in the hotbar
//LeftMouseUp
//delay 2000
//keys l
//delay 2000
//keys 1
//delay 2000
//keys r
//delay 2000
//end



procedure LendMana
SetActiveWindow Darkfall Online 2
delay 500
isblack 24,442 // Check to see if staff is equipped
call EquipStaff2
delay 2000
else
leftclick
delay 3000
loop 5
end
end

//Check mana, if below 10% will stop and switch clients to lend mana
loadRGB 651,68
if {RGBblue} > 90
call Casting
else
call LendMana
end
end
azalinsob
This is the final product. It "works" althought its pretty patched together.


For some reason when I wanted it to loop 5 times, it would loop 3, so i just set the loop artificially higher just to get the desired results.


CODE
SetActiveWindow Darkfall Online
// 2 client macro to cast untill you are out of mana, then switch clients to lend mana.


procedure casting
delay 2000
Isblack 27,436 // target the round circle to check if your weapon is equiped
call EquipStaff
delay 2000
else
delay 1000
keys 3
delay 300
leftclick
delay 3000
end
end

procedure EquipStaff
//Procedure to equip a staff if yours breaks
delay 1000
keys l
delay 2000
MousePos 80,957 // location of staves in bag
LeftMouseDown
delay 2000
MousePos 25,101 // location of the staves in the hotbar
LeftMouseUp
delay 2000
keys l
delay 2000
keys 2
delay 2000
keys r
delay 2000
end


procedure lendstaff
//Procedure to equip a staff if yours breaks on the second account
delay 1000
keys l
delay 2000
MousePos 80,954 // location of staves in bag
LeftMouseDown
delay 2000
MousePos 21,102 // location of the staves in the hotbar
LeftMouseUp
delay 2000
keys l
delay 2000
keys 1
delay 2000
keys r
delay 2000
end



procedure lend
delay 500
isblack 24,442 // Check to see if staff is equipped
call lendstaff
delay 1000
else
loop 7
leftclick
delay 3000
end
end
end

//Check mana, if below 10% will stop and switch clients to lend mana
SetActiveWindow Darkfall Online
delay 500
loadRGB 622,69
if {RGBBlue} > 100
call casting
else
SetActiveWindow Darkfall Online 2
delay 500
call lend
end

azalinsob
Also for some reason my procedures are loading incorrectly.

My cast prodceure calls equipstaff
my lend prodceure calls lendstaff
but in reality when i run it, the cast procedure it calls the lendstaff procedure.

I know this is true because i changed the code on Equipstaff and I couldnt figure out why it wasnt refelcting the changes, but it was a mirror image of the lendstaff. I changed the lendstaff section to mirror equipstaff even though I dont use it, and its working flawlessly now. It works, but my macro is still possessed.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.