Openkore.com

OpenKore Forums
It is currently 04 Apr 2020, 21:07

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Help with macro, Cast Storm Gust on ground on nearest Monste
PostPosted: 21 Jan 2020, 22:39 
Offline
Plain Yogurt
Plain Yogurt
User avatar

Joined: 09 Dec 2009, 13:04
Posts: 54
How can i cast Storm Gust on nearest monster with a 15 cell distance?



Code:
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

}

_________________
Code:
r~/bot/


Last edited by krispaul27 on 22 Jan 2020, 12:24, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Help with macro, Cast Storm Gust on ground on nearest Monste
PostPosted: 22 Jan 2020, 07:42 
Offline
The Kore Devil
The Kore Devil
User avatar

Joined: 17 Nov 2017, 23:32
Posts: 726
Location: Genting Highland, Malaysia
Aside from

Code:
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


Top
 Profile  
 
 Post subject: Re: Help with macro, Cast Storm Gust on ground on nearest Monste
PostPosted: 22 Jan 2020, 12:16 
Offline
Plain Yogurt
Plain Yogurt
User avatar

Joined: 09 Dec 2009, 13:04
Posts: 54
fadreus wrote:
Aside from

Code:
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.

_________________
Code:
r~/bot/


Last edited by krispaul27 on 22 Jan 2020, 12:30, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Help with macro, Cast Storm Gust on ground on nearest Monste
PostPosted: 22 Jan 2020, 12:28 
Offline
The Kore Devil
The Kore Devil
User avatar

Joined: 17 Nov 2017, 23:32
Posts: 726
Location: Genting Highland, Malaysia
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


Top
 Profile  
 
 Post subject: Re: Help with macro, Cast Storm Gust on ground on nearest Monste
PostPosted: 22 Jan 2020, 12:34 
Offline
Plain Yogurt
Plain Yogurt
User avatar

Joined: 09 Dec 2009, 13:04
Posts: 54
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:
r~/bot/


Top
 Profile  
 
 Post subject: Re: Help with macro, Cast Storm Gust on ground on nearest Monste
PostPosted: 24 Jan 2020, 01:54 
Offline
The Kore Devil
The Kore Devil
User avatar

Joined: 17 Nov 2017, 23:32
Posts: 726
Location: Genting Highland, Malaysia
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group