Help with macro, Cast Storm Gust on ground on nearest Monste

Private server support - Only post connectivity issues in the subforum!

Moderator: Moderators

Message
Author
krispaul27
Human
Human
Posts: 49
Joined: 09 Dec 2009, 13:04
Noob?: No

Help with macro, Cast Storm Gust on ground on nearest Monste

#1 Post by krispaul27 »

How can i cast Storm Gust on nearest monster with a 15 cell distance?


Code: Select all

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.

Code: Select all

r~/bot/
[/b][/color]

User avatar
fadreus
The Kore Devil
The Kore Devil
Posts: 708
Joined: 17 Nov 2017, 23:32
Noob?: No
Location: Genting Highland, Malaysia
Contact:

Re: Help with macro, Cast Storm Gust on ground on nearest Monste

#2 Post by fadreus »

Aside from

Code: Select all

do sl SG
Which should be skill number, what's the problem?

You can set use SG on yourself while setting the distance 6 as other alternative.

iRO Supporter.
Read before you ask is the wisest thing human can do.
Unless you're a cat.
Image

krispaul27
Human
Human
Posts: 49
Joined: 09 Dec 2009, 13:04
Noob?: No

Re: Help with macro, Cast Storm Gust on ground on nearest Monste

#3 Post by krispaul27 »

fadreus wrote:Aside from

Code: Select all

do sl SG
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.

Code: Select all

r~/bot/
[/b][/color]

User avatar
fadreus
The Kore Devil
The Kore Devil
Posts: 708
Joined: 17 Nov 2017, 23:32
Noob?: No
Location: Genting Highland, Malaysia
Contact:

Re: Help with macro, Cast Storm Gust on ground on nearest Monste

#4 Post by fadreus »

So what about that macro you posted?
Seems fine..

iRO Supporter.
Read before you ask is the wisest thing human can do.
Unless you're a cat.
Image

krispaul27
Human
Human
Posts: 49
Joined: 09 Dec 2009, 13:04
Noob?: No

Re: Help with macro, Cast Storm Gust on ground on nearest Monste

#5 Post by krispaul27 »

fadreus wrote:So what about that macro you posted?
Seems fine..

The problem was the kore doesnt cast on ground. Still casting on monster position.

Code: Select all

r~/bot/
[/b][/color]

User avatar
fadreus
The Kore Devil
The Kore Devil
Posts: 708
Joined: 17 Nov 2017, 23:32
Noob?: No
Location: Genting Highland, Malaysia
Contact:

Re: Help with macro, Cast Storm Gust on ground on nearest Monste

#6 Post by fadreus »

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.
Image

Post Reply