automacro castSG { #name of the macro
timeout 10 #I want to run it once by monster
exclusive 1 #override AI
monster Grand Peco, #on monster Grand Peco
call useSG #run the macro called "useSG"
}
macro useSG { #The macro called and its actions
$px = @arg ("$.pos", 1) #get char position X
$py = @arg ("$.pos", 2) #get char position Y
$mx = @arg ("$.lastMonsterPos", 1) #get monster position X
$my = @arg ("$.lastMonsterPos", 2) #get monster position Y
$distance = 12 i changed distance so you can clearly understand. #The distance from the monster => deleted see edit
$ThisX = @eval($mx-$distance) #calculate the position coordinate from the monster X => deleted see edit
$ThisY = @eval($my-$distance) #calculate the position coordinate from the monster Y => deleted see edit
$CurrentMap = @arg ("$.map", 1) #In the current map => deleted see edit
do move $ThisX $ThisY $CurrentMap #move on those coordinates in this map => deleted see edit
$Xzone = @eval($px+$mx)
$Yzone = @eval($py+$my)
do sl SG $Xzone $Yzone 10 #Cast Storm Gust lvl 10 on near coordinates
}
Last edited by krispaul27 on 22 Jan 2020, 12:24, edited 2 times in total.
fadreus wrote:Which should be skill number, what's the problem?
i just used SG but in my macro it was Storm Gust
You can set use SG on yourself while setting the distance 6 as other alternative.
What i mean is,
Example
I want to cast sg on ground location near the distance of monster position, while in config.txt the distance was limited to 10cell. I want to overideAI. So even the distance of monster was in 12cell away on my char macro automatically cast on ground 10cell so that i can still hit the monster.
Last edited by krispaul27 on 22 Jan 2020, 12:30, edited 1 time in total.
I dont have any server to test on right now but if I were you, I just use log on each new arg to see the value and determine which line is not working before modifying it.
iRO Supporter. Read before you ask is the wisest thing human can do. Unless you're a cat.