Ganbatine, Spell Area Postion

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

pacoid
Noob
Noob
Posts: 3
Joined: 26 Nov 2010, 17:44
Noob?: No

Ganbatine, Spell Area Postion

#1 Post by pacoid »

This is a macro I been trying to get to work.
What I want it to do is Ganbatine Area Spells, such as Storm Gust, Lord of Vermillion, Pneuma ETC.
The whole code it self works...exept using Ganbatine...
you see $.areaPos return the location of the spell, but also the map name(Example, 103 204 Pay_dun03 )... All I need is the Location
is there any way I could work around this? or another way I could get my character to Ganbatine those spells?

Code: Select all

automacro Ganbatine {
areaSpell Pneuma , Storm Gust , Lord of Vermillion, Meteor Storm , Lord of Vermillion, Meteor Storm ,  Land Protector , Magnetic Earth , Quagmire

#####Checks for the following characters, if they summoned do not Ganbatine that spell

var .lastMatch1 != *******
var .lastMatch1 != *******
var .lastMatch1 != *******
var .lastMatch1 != *******
var .lastMatch1 != *******


call {

 ######         ######
#####  Help Here  #####
 ######         ######

####do Spell Ganbetine (483) on area ______
	do sl 483 $.areaPos


####do Party : Kill ____ players ID so other bots reciver the message through party and kills the player or Monster
	do p kill $.areaSourceID
####kill ____ if its a player
	do kill $.areaSourceID
####Kill _____ if its a monster
	do a $.areaSourceID
}
	
}
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Ganbatine, Spell Area Postion

#2 Post by EternalHarvest »

pacoid wrote:you see $.areaPos return the location of the spell, but also the map name(Example, 103 204 Pay_dun03 )... All I need is the Location
Use something like

Code: Select all

$pos = @eval(($.areaPos =~ /(\d+ \d+)/)[0])