Page 1 of 1

movement function, movement.ini, automove to zones/spellrou

Posted: Thu Jul 09, 2015 12:34 am
by toolisuber
|if ur a bard this uses twist
|this may use moveutils not sure... im using uf client
|
|when I get back into playing again, these macros will be much better
|im still angry at movement it has permanently traumatized me with trig
|basically one of my ideas will be for your choice of hubs, pok or lobby
|------------------------------------------------------------------------------------
|ok well there is a problem, i dont use ogres or trolls
|had to make a troll berserker.... chars get stuck inside the troll and click the troll
|instead of the pok stones or pop zone ins
|this is not supporting of big races right this min, basically you would prolly
|want to set the distance check on each waypoint to 10 instead of 5, trolls
|should then be behind a bit (5) or so, maybey 12 and (7)...that's an easy fix
|
|:nearestlocloop
|/if (${troll} or ${ogre}) /varset nextlocations +10 or +12 -10 or -12
|is basically your rough answer....
|you might want to consider ${player size} > or something instead of troll/ogre
|in case something goes wrong somewhere
|
|----or----
|
|if (${troll} || ogre || playersize > ) {
|/keypress s hold
|/delay 4
|/keypress w or something watever it is.... correct syntax wise
|
|you may want to consider keypress forward/ keypress back
|in case something goes wrong
|
|if you are worried about something going wrong, you shouldn't be using
|small bank as a hub usually and shouldn't be using these exact locs/paths
|
|there is prolly other methods to fix this, first method is the best
|
|you could shrink ur trolls and ogres but that is like rlly ridiculous
|this will be fixed soon listen my server crashes when I ranged attack
|ths shit has to be tested, and then i gotta update the stuff on 16 macros,
|there is a list of about 40 things that have to be fixed serverwise
|there is a list of 45 things that have to be fixed macrowise for v1 of macros
|there is about 5 things i wanna do with movement, and about 4 diff things
|im gonna have to evolve movement into, im thinking networks and stuff
|object detection or even sht from .map printouts or something
|im gonna get around to it, wrote these macros 1yr ago,
|haven't played for 3 months, been studying ... 8/22/2015? 1:51am est
|------------------------------------------------------------------------------------
|movement code
|movement.ini
|spellroutines.inc
|test.mac
|
|THIS CODE IS NOT SAFE FOR LIVE AND ALSO USES /FACE NOLOOK FAST
|
|It tries to simulate userlike movement and viewing
|this could be much better but more code
|
|ill include my spellroutines
|
|im sure this works with any macroquest build
|mq2forunderfoot - hidden in wiki - MQ20100609
|
|twist version, vip plugins - MQ2Twist 09/22/09+
|
|moveutils version, vip plugins - MQ2MoveUtils june 2011
|
|I like my spellroutines better, it is posted here after movement ini
|spellroutines version, general macro snippets Spell_Routines - 7/05/09
|
|****Instructions!****
|
|this part above sub main -> #Event Movement "#1#guild, '#2#goto#3#'"
|
|you may want to put
|
|/declare didinvis int outer 0
| and
|/declare dotwist int outer 0
|
|in ur macro, below sub main where the declares go, and above ur actual
|macro code
|
|if you are a caster you want spellroutines.inc included prolly
|this part above sub main -> #include spell_routines.inc
|
|if you want toggle abort to abort movement, write it, or get it from one of
|my macro posted, you would have to include #Event Toggle blahblah
| above sub main in ur macro. toggle can be perfected as a starter project
| it currently aborts only at next location ur moving to... it can be
| instantaneous
|
|this is the movement code and functions, it goes at the bottom of ur macro

Code: Select all

Sub page(direction, duration)

/if (${direction.Find[down]}) {
    /keypress Page_Down hold 
    /delay ${duration}
    /keypress Page_Down
}
/if (${direction.Find[up]}) {
    /keypress Page_Up hold 
    /delay ${duration}
    /keypress Page_Up
}
/return

Sub returntocamp(face)

/if (${Bool[${makecamploc}]}) {
    /call gotoloc "${makecamploc}" 
    /if (${Macro.Return} == 1 && ${face.Equal[face]}) {
        /if (${Me.Heading.Degrees} > 179) /face fast heading ${Math.Calc[${Me.Heading.Degrees} - 180]}
        /if (${Me.Heading.Degrees} < 180) /face fast heading ${Math.Calc[${Me.Heading.Degrees} + 180]}
    }
}
/return

Sub gotoloc(loc, command)

/declare locfrom string local
/declare zoneshortname string local ${Zone.ShortName}
/if (!${Bool[${loc}]}) /varset locfrom leashloc
/if (${Bool[${loc}]}) /varset locfrom loc
/declare nextlocationy string local ${${locfrom}.Arg[1,,]}
/declare nextlocationx string local ${${locfrom}.Arg[2,,]}
/declare nextlocationyhigh string local ${Math.Calc[${${locfrom}.Arg[1,,]} + 5]}
/declare nextlocationylow string local ${Math.Calc[${${locfrom}.Arg[1,,]} - 5]}
/declare nextlocationxhigh string local ${Math.Calc[${${locfrom}.Arg[2,,]} + 5]}
/declare nextlocationxlow string local ${Math.Calc[${${locfrom}.Arg[2,,]} - 5]}
/if (${nextlocationy.NotEqual[NULL]} && ${Me.Y} <= ${nextlocationyhigh} && ${Me.Y} >= ${nextlocationylow} && ${Me.X} <= ${nextlocationxhigh} && ${Me.X} >= ${nextlocationxlow}) {
    /if (${command.NotEqual[empty]}) /call ${command}
    /return
}
:travel
/keypress forward hold
/if (${nextlocationy.NotEqual[NULL]} && ${Me.Y} <= ${nextlocationyhigh} && ${Me.Y} >= ${nextlocationylow} && ${Me.X} <= ${nextlocationxhigh} && ${Me.X} >= ${nextlocationxlow}) {
    /keypress forward
    /if (!${Me.Class.PureCaster}) /varset didstick 0
    /if (${command.NotEqual[empty]}) /call ${command}
    /return 1
}
/if (${nextlocationy.NotEqual[NULL]}) {
    /if (${Me.Y} <= ${nextlocationylow} || ${Me.X} <= ${nextlocationxlow} || ${Me.Y} >= ${nextlocationyhigh} || ${Me.X} >= ${nextlocationxhigh}) {
        /face nolook fast loc ${nextlocationy},${nextlocationx}
    }
}
/if (${zoneshortname.NotEqual[${Zone.ShortName}]}) {
    /if (!${InvSlot[17].Item.ID}) {
        /if (!${InvSlot[13].Item.ID} && !${Defined[amnaked]}) {
            /guildsay - i died during movement - 
            /declare amnaked int outer 100
            /keypress forward
            /varset makecamploc ${Me.Y},${Me.X}
            /return
        }
    }
}
/if (${zoneshortname.NotEqual[${Zone.ShortName}]}) {
    /if (${InvSlot[17].Item.ID} || ${amnaked} == 100) {
        /if (${InvSlot[13].Item.ID} && !${Defined[amnaked]} || !${InvSlot[13].Item.ID} && ${amnaked} == 100) {
            /echo ~~ ${Zone.Name} ~~
            /keypress forward
            /deletevar zoneoutloc
            /varset makecamploc ${Me.Y},${Me.X}
            /return
        }
    }
/return
}
/delay 1
/goto :travel
/return

Sub zonedoor

/keypress forward
:doorloop
/keypress u
/delay 2
/keypress u
/delay 1s
/keypress u
/delay 2
/call viewing
/if (${zoneshortname.Equal[${Zone.ShortName}]}) /goto :doorloop
/return

Sub door

/keypress u
/if (!${Me.Moving}) {
    /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc[${j}]door]}]}) {
        /doortarget ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc[${j}]door]}]}
        /face door
        /keypress u
    }
}
/return

Sub viewing

/declare variable string local page_down
:viewing
/if (${zoneshortname.Equal[${Zone.ShortName}]}) {
    /keypress ${variable} hold
    /delay 2
    /keypress ${variable}
    /keypress u
    /if (${zoneshortname.Equal[${Zone.ShortName}]}) {
        /keypress ${variable} hold
        /delay 4
        /keypress ${variable}
        /keypress u
        /if (${zoneshortname.Equal[${Zone.ShortName}]}) {
            /keypress ${variable} hold
            /delay 4
            /keypress ${variable}
            /keypress u
            /if (${variable.Equal[page_down]}) {
                /varset variable page_up
                /goto :viewing
            }
            /if (${variable.Equal[page_up]}) {
                /varset variable page_down
                /goto :viewing
            }
        }
    }
}
/return

Sub findgroup

/declare totalgroups int local
/declare i int local
/declare j int local
/varset totalgroups ${Ini[toolismacro,Values,totalgroups]}
/for i 1 to ${totalgroups}
/for j 1 to 6
/if (${Ini[toolismacro,Group${i},member${j}].Equal[${Me.Name}]}) {
    /return ${i}
}
/next j
/next i
/echo GROUP NOT FOUND ---- returning +1
/return ${Math.Calc[${totalgroups} + 1]}

Sub groupcheck

/declare i int local
/declare grpcheck int local 0
:checkgroup
/for i 0 to ${Group}
/if (${Group.Member[${i}].Distance} < 120 && ${Group.Member[${i}].ID}) /varset grpcheck ${Math.Calc[${grpcheck} + 1]}
/next i
/if (${grpcheck} == ${Group.GroupSize}) {
    /delay 1s
    /return 1
} else {
    /varset grpcheck 0
    /delay 2
    /goto :checkgroup
}
/return

Sub Event_Movement(Line, SenderPerson, targetperson, TargetZone)

/if (${Bool[${targetperson}]}) {
    /declare name int local
    /declare force int local
    /for force 1 to 10
    /if (${targetperson.Arg[${force},].Equal[force]}) {
        /declare forcemove bool local TRUE
    }
    /if (${targetperson.Arg[1,].Equal[force]} && !${Bool[${targetperson.Arg[2,]}]}) /goto :beginning
    /next force
    /if (${targetperson.Arg[1,].Equal[group]}) {
        /if (${targetperson.Arg[1,].Equal[group]}) {
            /declare groupnumber int local
            /call findgroup
            /varset targetperson ${targetperson.Right[-6]}
            /if (${targetperson.Find[force]}) /varset targetperson ${targetperson.Left[-6]}
            /for groupnumber 1 to ${Ini[toolismacro,Values,totalgroups]}
            /if (${targetperson.Arg[${groupnumber},,]} == ${Macro.Return}) {
                /goto :beginning
            } else {
                /next groupnumber 
                /return
            }
        }
    }
    /for name 1 to 10
    /if (${targetperson.Arg[${name},].Equal[${Me.Name}]}) /goto :beginning
    /next name
    /return
}
:beginning
/if (!${Bool[${Ini[movement,${TargetZone},zoneshortnames].Arg[1,,]}]}) {
    /echo Incorrect Destination
    /return
}
/declare zoneshortname     string local ${Zone.ShortName}
/declare savedtargetzone   string local ${TargetZone}
/declare startlocation     string local 0
/declare tempheading       float  local 0
/declare nextlocationx     string local NULL
/declare nextlocationy     string local NULL
/declare nextlocationxhigh string local
/declare nextlocationxlow  string local
/declare nextlocationyhigh string local
/declare nextlocationylow  string local
/declare i int local
/declare j int local
/declare junctions int local
/declare savedvariable int local 0
/if (${Me.Class.Name.NotEqual[Bard]}) /declare didinvis int local 0
/declare grpnumber int local 0

/echo - Starting -
/for junctions 1 to 12
/echo ${junctions} junctions
/for i 1 to 10
/echo ${i} i variable at i loop
:start
/if (${Bool[${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]}]}) {
    /echo ${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]}
    /varset TargetZone ${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]}
    /echo changed targetzone to ${TargetZone}
    /echo ${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]} targetzones junctions
    /echo ${i} i variable in bool junctions
    /varset i 1
}
/if (!${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]} && ${TargetZone.NotEqual[${savedtargetzone}]}) {
    /varset TargetZone ${savedtargetzone}
    /echo changed targetzone to savedtargetzone
    /echo ${junctions} junctions
    /echo ${i} i variable in not bool junctions
    /echo ${j} j 
    /varset i 1  
}
/if (${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]} && ${TargetZone.NotEqual[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]}) {
    /varset TargetZone ${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}
    /echo changed targetzone to savedtargetzone junction arg junctions
    /echo ${junctions}
    /echo ${i} i variable in bool junctions arg junctions
    /echo ${j} j
    /varset i 1
}
/if (${savedvariable} != 1) {
    /if (${Bool[${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,].Equal[${Zone.ShortName}]}]} && ${startlocation.Equal[0]}) {
        /echo found starting zone
        /varset startlocation ${TargetZone},${i},
        /echo ${startlocation}
        /echo ${i} i variable
        /echo ${j} j variable
    }
    /if (${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,].NotEqual[${Zone.ShortName}]} && ${startlocation.NotEqual[0]}) {
        /echo found end of zones
        /varset junctions 1
        /varset savedvariable 1
        /varset TargetZone ${startlocation.Arg[1,,]}
        /varset i ${startlocation.Arg[2,,]}
    }
}
/if (${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[finish]} && ${zoneshortname.Equal[${Zone.ShortName}]}) {
    /keypress w
    /varset didinvis 0
    /echo i have reached my destination
    /guildsay im at target destination
    /varset makecamploc ${Me.Y},${Me.X}
    /return
}
/if (${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,].Equal[${Zone.ShortName}]}) {
    /if (!${forcemove}) {
        /if (${Me.Class.Name.Equal[Bard]} && !${didinvis}) {
            /call groupcheck
        }
        /if (${Me.Class.Name.NotEqual[Bard]} && !${didinvis}) {
            /call findgroup
            /varset grpnumber ${Macro.Return}
            :waitforinvis
            /doevents Toggle
            /if (${Macro.Return.Equal[abort]}) {
                /varset makecamploc ${Me.Y},${Me.X}
                /return
            }
            /if (${Ini[toolismacro,Movement,group${grpnumber}ready].Equal[ready]}) {
                /varset didinvis 1
            }
            /if (${Ini[toolismacro,Movement,group${grpnumber}ready].Equal[empty]}) {
                /delay 2
                /echo waiting for invis
                /goto :waitforinvis
            }
        }
    }
    /if (${Me.Class.Name.Equal[Bard]} && !${didinvis}) {
        /squelch /twist off
        /varset didinvis 1
        /varset dotwist 1
        /if (!${Me.Gem[${travelsong}]} && !${Cursor.ID}) {
                /guildsay sec memming travel song
                /memspell ${travelsonggem} ${travelsong}
                /delay 2s
        }
        /squelch /twist ${travelsonggem}
        /delay 2s
        /if (!${Me.Casting.ID}) {
            /squelch /twist ${speedsonggem}
            /delay 2s
            /if (${Me.Casting.ID}) /delay 1s
            /if (!${Me.Gem[${invissong}]} && !${Cursor.ID}) {
                /guildsay sec memming invis song
                /memspell ${travelsonggem} ${invissong}
                /delay 2s
            }
            /squelch /twist ${travelsonggem}
            /delay 3s 
        }
        /if (${Me.Casting.ID}) /delay 2s
        /call findgroup
        /varset grpnumber ${Macro.Return}
        /ini "toolismacro" "Movement" "group${grpnumber}ready" "ready"
        /delay 6
        /ini "toolismacro" "Movement" "group${grpnumber}ready" "empty"
    }
    /echo ${j} j (before for loop)
    /for j 1 to 30
    /echo ${j} j
    /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}]}]} && ${savedvariable} != 1) {
        /varset savedvariable ${j}
        /varset nextlocationy ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}].Arg[1,,]}
        /varset nextlocationx ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}].Arg[2,,]}
        /varset nextlocationyhigh ${Math.Calc[${nextlocationy} + 75]}
        /varset nextlocationylow ${Math.Calc[${nextlocationy} - 75]}
        /varset nextlocationxhigh ${Math.Calc[${nextlocationx} + 75]}
        /varset nextlocationxlow ${Math.Calc[${nextlocationx} - 75]}
        /if (${Me.Y} <= ${nextlocationyhigh} && ${Me.Y} >= ${nextlocationylow} && ${Me.X} <= ${nextlocationxhigh} && ${Me.X} >= ${nextlocationxlow}) {
            /echo found correct loc
            /varset savedvariable 1
            /goto :end
        }
        /varset nextlocationyhigh ${Math.Calc[${nextlocationy} + 175]}
        /varset nextlocationylow ${Math.Calc[${nextlocationy} - 175]}
        /varset nextlocationxhigh ${Math.Calc[${nextlocationx} + 175]}
        /varset nextlocationxlow ${Math.Calc[${nextlocationx} - 175]}
        /if (${Me.Y} <= ${nextlocationyhigh} && ${Me.Y} >= ${nextlocationylow} && ${Me.X} <= ${nextlocationxhigh} && ${Me.X} >= ${nextlocationxlow}) {
            /echo found nearest loc
            /varset savedvariable 1
            /goto :nearestlocloop
        }
        /echo this didnt work
        /varset nextlocationy NULL
        /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[1,,]}]}) {
            /varset savedvariable ${Math.Calc[${j} + 1]}
            /varset nextlocationy NULL          
            /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[1,,]}]}) {
                /echo next j
                /next j
            }
            /if (${Bool[${Ini[movement,${TargetZone},zoneshortnames].Arg[${Math.Calc[${i} + 1]},,]}]}) {
                /varset j 0
                /next i
            }
            /if (${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]}) {
                /varset j 0
                /echo next junctions instead of j
                /varset TargetZone ${savedtargetzone}
                /next junctions
            }
        }
        /echo this fired
        /varset savedvariable ${Math.Calc[${j} + 1]}
        /delay 2
        /next i
    }
        /if (!${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]} && ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[junction]} || ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[finish]}) {
            /keypress w
            /varset didinvis 0
            /echo i have reached my destination
            /guildsay im at target destination
            /varset makecamploc ${Me.Y},${Me.X}
            /return
        } 
    :end
    /if (${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[junction]}) {
        /keypress forward
        /varset j 1
        /varset TargetZone ${savedtargetzone}
        /if (!${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]}) {
            /varset TargetZone ${startlocation.Arg[1,,]}
            /varset i ${startlocation.Arg[2,,]}
        } 
        /if (${Bool[${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]}]}) {
            /echo changing junctions +1 from hitting a junction
            /next junctions
        }
    }
    /if (${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[zonedoor]} && ${nextlocationy.NotEqual[NULL]}) {
        /keypress forward
        /varset j 1
        :doorloop
        /keypress u
        /delay 2
        /keypress u
        /delay 1s
        /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}zonedoor]}]}) {
            /face nolook loc ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}zonedoor]}
            /keypress u
        }
        /call viewing
        /if (${zoneshortname.Equal[${Zone.ShortName}]}) /goto :doorloop
        /varset nextlocationy NULL
    }
    /if (${zoneshortname.Equal[${Zone.ShortName}]}) {
        /varset tempheading ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,]})
        /if (${Math.Calc[(360 - ${tempheading}) + 45]} > 360 && ${Me.Heading.Degrees} <= ${Math.Calc[(360 - ${tempheading}) - 45]} || ${Math.Calc[(360 - ${tempheading}) + 45]} > 360 && ${Me.Heading.Degrees} <= ${Math.Calc[45 - (360 - ${tempheading})]}) {
            /goto :headingdone
        }
        /if (${Math.Calc[(360 - ${tempheading}) - 45]} < 0 && ${Me.Heading.Degrees} <= ${Math.Calc[(360 - ${tempheading}) + 45]} || ${Math.Calc[(360 - ${tempheading}) - 45]} < 0 && ${Me.Heading.Degrees} <= ${Math.Calc[45 - (360 - ${tempheading})]}) { 
            /goto :headingdone
        }
        /if (${Math.Calc[${Me.Heading.Degrees}]} >= ${Math.Calc[360 - ${tempheading}]} && ${Math.Calc[${Me.Heading.Degrees}]} <= ${Math.Calc[(360 - ${tempheading}) + 45]} || ${Math.Calc[${Me.Heading.Degrees}]} >= ${Math.Calc[(360 - ${tempheading}) - 45]} && ${Math.Calc[${Me.Heading.Degrees}]} <= ${Math.Calc[360 - ${tempheading}]}) {
            /goto :headingdone
        }
            /if (${tempheading} <= 180) {
            /echo Tempheading < 180
                /if (${Me.Heading.Degrees} >= ${Math.Calc[(360 - ${tempheading}) - 180]} && ${Me.Heading.Degrees} <= ${Math.Calc[360 - ${tempheading}]}) {
                    /varset tempheading ${Math.Calc[${tempheading} + 45]}
                    /goto :heading
                } else {
                    /if (${tempheading} <= 45) {
                        /varset tempheading ${Math.Calc[315 + ${tempheading}]}
                        /goto :heading
                    }
                    /varset tempheading ${Math.Calc[${tempheading} - 45]}
                    /goto :heading
                }
            }
            /if (${tempheading} > 180) {
            /echo Tempheading > 180
                /if (${Me.Heading.Degrees} <= ${Math.Calc[(360 - ${tempheading}) + 180]} && ${Me.Heading.Degrees} >= ${Math.Calc[360 - ${tempheading}]}) {
                    /varset tempheading ${Math.Calc[${tempheading} - 45]}
                    /goto :heading
                } else {
                    /if (${tempheading} <= 315) {
                        /varset tempheading ${Math.Calc[${tempheading} + 45]}
                        /goto :heading
                    }
                    /varset tempheading ${Math.Calc[(360 - ${tempheading}) - 45]}
                    /goto :heading
                }
            }
            :heading
            /face heading ${tempheading}
        :headingdone
        /face fast heading ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,]}
    }
    /varset nextlocationy NULL
    /varset nextlocationx NULL
    /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}]}]}) {
        /varset nextlocationy ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}].Arg[1,,]}
        /varset nextlocationx ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}].Arg[2,,]}
    }
    :nearestlocloop
    /doevents Toggle
    /if (${Macro.Return.Equal[abort]}) {
        /varset makecamploc ${Me.Y},${Me.X}
        /return
    }
    /varset nextlocationyhigh ${Math.Calc[${nextlocationy} + 5]}
    /varset nextlocationylow ${Math.Calc[${nextlocationy} - 5]}
    /varset nextlocationxhigh ${Math.Calc[${nextlocationx} + 5]}
    /varset nextlocationxlow ${Math.Calc[${nextlocationx} - 5]}
    :movementloop
    /keypress forward hold
    /if (${nextlocationy.NotEqual[NULL]} && ${Me.Y} <= ${nextlocationyhigh} && ${Me.Y} >= ${nextlocationylow} && ${Me.X} <= ${nextlocationxhigh} && ${Me.X} >= ${nextlocationxlow}) {
        /keypress forward
        /delay 2
        /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}command]}]}) /call ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}command]}
        /next j
    }
    /if (${nextlocationy.NotEqual[NULL]}) {
        /if (${Me.Y} <= ${nextlocationylow} || ${Me.X} <= ${nextlocationxlow} || ${Me.Y} >= ${nextlocationyhigh} || ${Me.X} >= ${nextlocationxhigh}) {
            /face nolook fast loc ${nextlocationy},${nextlocationx}
        }
    }
    /if (${zoneshortname.NotEqual[${Zone.ShortName}]}) {
        /if (!${InvSlot[17].Item.ID}) {
            /if (!${InvSlot[13].Item.ID} && !${Defined[amnaked]}) {
                /guildsay - i died during movement - 
                /declare amnaked int outer 100
                /doevents flush Movement
                /return
            }
        }
        /echo -- ${Zone.Name} --
        /varset nextlocationy NULL
        /keypress forward
        /varset zoneshortname ${Zone.ShortName}
        /varset didinvis 0
        /varset j 1
        /varset i 0
        /delay 2
        /next i
    }
    /delay 1
    /goto :movementloop
}
/delay 2
/if (${Bool[${Ini[movement,${TargetZone},zoneshortnames].Arg[${Math.Calc[${i} + 1]},,]}]}) /next i
/varset i 0
/next junctions
/varset junctions 1
/varset savedvariable 1
/varset TargetZone ${startlocation.Arg[1,,]}
/varset i ${startlocation.Arg[2,,]}
/echo setting targetzone and zone im in
/next junctions
/echo returning
/return

Re: movement function, movement.ini, automove to zones/spell

Posted: Thu Jul 09, 2015 12:39 am
by toolisuber
movement.ini
----------------
|this is my movement files... i did all these especially wakening lands
|im angry at movement right now
|
|edit:movement uses smallbank as a hub, this can be changed
|
|so this is whats broke
|
|greatdivide 1
|stuck on small bank sometimes (18+ chars)
|stuck in lobby (18+chars)
|wakeninglands 4(havefun)
|zonedoor locs not finished
|right near mistmoore the tree cant miss it
|mystery thing cant read my own handwriting
|shadowhaven 5 (definitely a wall) or maybey watery stuff
|trak 21 (have fun)
|there may be more
|still needs GoD, OoW, DoN
|ldons aren't finished
|veksar isn't tested
| /prev w/variable instead of just /next so go backwards! starter project

|
|the part with all the numbers ( those are called arguments )
| is your heading /echo ${Me.Heading}
|
|the other part with all the numbers is ur loc ur trying to goto
|
|junctions is like, goto smallbank first, then westside, then northside, then
| everfrost, then the current one( in this first case everfrostldon)
|
|you end junction= with junction, or finish, or zonedoor (like click pokstone)
|
|zoneshortnames is the zones that this junction(lets say everfrostldon)
|it uses the zoneshortnames so u gotta figure those out its important
|in the case of everfrostldon we are already in everfrost and trying to go to
|the everfrost ldoncamp so the only zone we are in is everfrost with this one
|
|

Code: Select all

[everfrostldon]
junctions=smallbank,westside,northside,everfrost
zoneshortnames=everfrost
everfrost=228,220,251,220,270,345,junction
everfrostloc1=2633,-341
everfrostloc2=2403,-529
everfrostloc3=2265,-926
everfrostloc4=1716,-1368
everfrostloc5=1715,-4995
everfrostloc6=1805,-5019

[everfrost]
junctions=smallbank,westside,northside
zoneshortnames=poknowledge,everfrost
poknowledge=0,335,0,zonedoor
poknowledgeloc1=586,273
poknowledgeloc2=884,132
poknowledgeloc3=899,132
poknowledgezonedoor=909,131
everfrost=junction

[butcherdungeon]
junctions=smallbank,westside,northside,gfay,lfayarea,lfay
zoneshortnames=lfaydark
lfaydark=45,10,109,135,finish
lfaydarkloc1=-543,3599
lfaydarkloc2=-40,3686
lfaydarkloc3=-94,3843
lfaydarkloc3command=page down 4
lfaydarkloc4=-116,3865

[mistmoore]
junctions=smallbank,westside,northside,gfay,lfayarea,lfay,steamfontarea,darkelfarea
zoneshortnames=lfaydark,mistmoore
lfaydark=170,100,20
lfaydarkloc1=-1161,3236
lfaydarkloc2=-1179,3346
mistmoore=finish

[mistmoorearea]
junctions=smallbank,westside,northside,gfay,lfayarea,lfay,steamfontarea,darkelfarea
zoneshortnames=lfaydark
lfaydark=160,95,90,75,105,80,108,junction
lfaydarkloc1=-875,1360
lfaydarkloc2=-892,1567
lfaydarkloc3=-892,2329
lfaydarkloc4=-843,2507
lfaydarkloc5=-904,2739
lfaydarkloc6=-864,2954
lfaydarkloc7=-941,3195
lfaydarkloc8=-894,529
lfaydarkloc9=-813,822
lfaydarkloc10=-712,995
lfaydarkloc11=-682,1275
lfaydarkloc12=-930,2839

[darkelfarea]
junctions=smallbank,westside,northside,gfay,lfayarea,lfay,steamfontarea
zoneshortnames=lfaydark
lfaydark=225,180,160,180,100,90,60,90,75,60,85,junction
lfaydarkloc1=904,-1974
lfaydarkloc2=-324,-1972
lfaydarkloc3=-415,-1938
lfaydarkloc4=-872,-1937
lfaydarkloc5=-940,-1326
lfaydarkloc6=-939,-46
lfaydarkloc7=-894,30
lfaydarkloc8=-894,529
lfaydarkloc9=-813,822
lfaydarkloc10=-712,995
lfaydarkloc11=-682,1275

[steamfontarea]
junctions=smallbank,westside,northside,gfay,lfayarea,lfay
zoneshortnames=lfaydark
lfaydark=135,220,180,225,junction
lfaydarkloc1=2083,-1111
lfaydarkloc2=1477,-1585
lfaydarkloc3=1255,-1623
lfaydarkloc4=992,-1886

[lfay]
junctions=smallbank,westside,northside,gfay,lfayarea
zoneshortnames=gfaydark,lfaydark
gfaydark=160,225,145
gfaydarkloc1=-2547,-1025
gfaydarkloc2=-2627,-1117
lfaydark=junction

[butcherblockldon]
junctions=smallbank,westside,northside,gfay,lfayarea,butcherblock
zoneshortnames=butcher
butcher=40,325,20,75,98,finish
butcherloc1=-1284,-3053
butcherloc2=-1220,-3098
butcherloc3=-1139,-3071
butcherloc4=-1075,-2839
butcherloc5=-1119,-2505

[butcherblock]
junctions=smallbank,westside,northside,gfay,lfayarea
zoneshortnames=gfaydark,butcher
gfaydark=105,55,70,95,75,91,70,82,92,45,95,155,90
gfaydarkloc1=-2327,-904
gfaydarkloc2=-2088,-565
gfaydarkloc3=-1983,-283
gfaydarkloc4=-2038,178
gfaydarkloc5=-1995,333
gfaydarkloc6=-1991,786
gfaydarkloc7=-1848,1171
gfaydarkloc8=-1800,1492
gfaydarkloc9=-1814,2043
gfaydarkloc10=-1526,2331
gfaydarkloc11=-1550,2612
gfaydarkloc12=-1662,2664
butcher=junction

[lfayarea]
junctions=smallbank,westside,northside,gfay
zoneshortnames=gfaydark
gfaydark=92,junction
gfaydarkloc1=-2269,-1124

[gfay]
junctions=smallbank,westside,northside
zoneshortnames=poknowledge,gfaydark
poknowledge=355,270,zonedoor
poknowledgeloc1=810,249
poknowledgeloc2=810,46
poknowledgezonedoor=812,38
gfaydark=junction

[northside]
junctions=smallbank,westside
zoneshortnames=poknowledge
poknowledge=355,25,63,1,junction
poknowledgeloc1=-28,-258
poknowledgeloc2=185,-111
poknowledgeloc3=384,271
poknowledgeloc4=556,274

[sroldon]
junctions=smallbank,southside,innothule,gukarea,sroarea,sro
zoneshortnames=sro
sro=285,40,349,5,340,39,finish
sroloc1=-3184,1024
sroloc2=-2867,1284
sroloc3=-2173,1155
sroloc4=-2017,1169
sroloc5=-1503,978
sroloc6=-1428,1040

[sro]
junctions=smallbank,southside,innothule,gukarea,sroarea
zoneshortnames=innothule,sro
innothule=355,330,15,40,12,70,0,260
innothuleloc1=1514,958
innothuleloc2=1859,757
innothuleloc3=2148,833
innothuleloc4=2292,952
innothuleloc5=2432,981
innothuleloc6=2495,1150
innothuleloc7=2592,1150
sro=junction

[sroarea]
junctions=smallbank,southside,innothule,gukarea
zoneshortnames=innothule
innothule=51,355,45,63,75,54,85,junction
innothuleloc1=363,-440
innothuleloc2=501,-452
innothuleloc3=678,-275
innothuleloc4=863,80
innothuleloc5=995,556
innothuleloc6=1175,799
innothuleloc7=1194,990

[guk]
junctions=smallbank,southside,innothule,gukarea
zoneshortnames=innothule,guktop
innothule=270,180,270
innothuleloc1=170,-818
innothuleloc2=140,-818
guktop=junction

[gukarea]
junctions=smallbank,southside,innothule
zoneshortnames=innothule
innothule=320,302,342,junction
innothuleloc1=-568,-172
innothuleloc2=-372,-489
innothuleloc3=172,-670

[innothule]
junctions=smallbank,southside
zoneshortnames=poknowledge,innothule
poknowledge=285,258,268,zonedoor
poknowledgeloc1=-706,500
poknowledgeloc2=-810,112
poknowledgeloc3=-813,44
poknowledgezonedoor=-813,35
innothule=junction

[veksar]
junctions=smallbank,southside,fob,cabalis,cabaliswest,loio,veksararea
zoneshortnames=lakeofillomen,veksar
lakeofillomen=111,200,270,270,200,270
lakeofillomenloc1=853,977
lakeofillomenloc1command=page up 4
lakeofillomenloc2=-386,533
lakeofillomenloc2command=page down 8
lakeofillomenloc3=-384,45
lakeofillomenloc4=-380,-48
lakeofillomenloc5=-418,-62
veksar=finish

[veksararea]
junctions=smallbank,southside,fob,cabalis,cabaliswest,loio
zoneshortnames=lakeofillomen
lakeofillomen=210,125,155,130,122,111,120,90,155,junction
lakeofillomenloc1=6402,-6685
lakeofillomenloc2=6134,-6294
lakeofillomenloc3=4838,-5681
lakeofillomenloc4=3870,-4502
lakeofillomenloc5=3073,-3208
lakeofillomenloc6=2782,-2424
lakeofillomenloc7=2664,-2217
lakeofillomenloc8=2656,-1582
lakeofillomenloc9=1623,-1093

[loio]
junctions=smallbank,southside,fob,cabalis,cabaliswest
zoneshortnames=cabwest,lakeofillomen
cabwest=90,6,48,90,130,180,220,260,270,183,149,270,140,185,111,140,90,180
cabwestloc1=-91,354
cabwestloc2=-26,360
cabwestloc3=-10,378
cabwestloc4=-10,422
cabwestloc5=-21,436
cabwestloc6=-85,436
cabwestloc7=-98,425
cabwestloc8=-101,408
cabwestloc9=-102,361
cabwestloc10=-342,351
cabwestloc10command=page up 4
cabwestloc11=-418,396
cabwestloc11command=page down 4
cabwestloc12=-418,368
cabwestloc13=-545,458
cabwestloc14=-758,438
cabwestloc15=-769,467
cabwestloc16=-779,477
cabwestloc17=-779,769
lakeofillomen=junction

[cabaliswest]
junctions=smallbank,southside,fob,cabalis
zoneshortnames=cabeast,cabwest
cabeast=180,95,154,180,160,180,265,210,160,130,180,90,175,92,115,90,70,90,140,180,94
cabeastloc1=1142,-410
cabeastloc2=1137,-351
cabeastloc3=1078,-322
cabeastloc4=916,-324
cabeastloc5=866,-306
cabeastloc6=735,-306
cabeastloc7=723,-421
cabeastloc8=605,-488
cabeastloc9=390,-408
cabeastloc10=320,-322
cabeastloc11=56,-322
cabeastloc12=56,-277
cabeastloc13=-19,-270
cabeastloc14=-25,1
cabeastloc15=-33,18
cabeastloc16=-33,60
cabeastloc17=-23,86
cabeastloc18=-23,212
cabeastloc19=-42,228
cabeastloc20=-87,229
cabwest=junction

[cabalis]
junctions=smallbank,southside,fob
zoneshortnames=fieldofbone,cabeast
fieldofbone=0,68,60,105,128,55,90
fieldofboneloc1=-2359,1850
fieldofboneloc2=-2163,2323
fieldofboneloc3=-2012,2581
fieldofboneloc4=-2099,2911
fieldofboneloc5=-2625,3590
fieldofboneloc6=-2561,3674
cabeast=junction

[goodcamp]
junctions=smallbank,southside,nek,lavastorm,solarea
zoneshortnames=lavastorm
lavastorm=340,0,0,60,330,280,355,20,330,290,junction
lavastormloc1=2245,619
lavastormloc2=2759,618
lavastormloc3=2909,610
lavastormloc4=3029,811
lavastormloc5=3179,724
lavastormloc6=3202,588
lavastormloc7=3335,581
lavastormloc8=3484,640
lavastormloc9=3638,550
lavastormloc10=3649,521

[solb]
junctions=smallbank,southside,nek,lavastorm,solarea
zoneshortnames=lavastorm,soldungb
lavastorm=320,5,295,245,180
lavastormloc1=2064,415
lavastormloc2=2314,434
lavastormloc3=2387,270
lavastormloc4=2326,122
soldungb=finish

[sola]
junctions=smallbank,southside,nek,lavastorm,solarea
zoneshortnames=lavastorm,soldunga
lavastorm=75,115,190,252,180
lavastormloc1=1531,983
lavastormloc2=1479,1098
lavastormloc3=1347,1075
lavastormloc4=1297,923
soldunga=finish

[solarea]
junctions=smallbank,southside,nek,lavastorm
zoneshortnames=lavastorm
lavastorm=20,55,0,junction
lavastormloc1=1006,299
lavastormloc2=1416,880
lavastormloc3=1503,880

[lavastorm]
junctions=smallbank,southside,nek
zoneshortnames=nektulos,lavastorm
nektulos=25,52,40,52,37,28,0,12,340,20,55,0,0
nektulosloc1=-641,-753
nektulosloc2=-400,-452
nektulosloc3=155,3
nektulosloc4=202,62
nektulosloc5=515,292
nektulosloc6=725,401
nektulosloc7=987,401
nektulosloc8=1223,451
nektulosloc9=1661,288
nektulosloc10=2049,425
nektulosloc11=2245,730
nektulosloc12=2260,730
lavastorm=junction

[nek]
junctions=smallbank,southside
zoneshortnames=poknowledge,nektulos
poknowledge=285,205,180,zonedoor
poknowledgeloc1=-646,244
poknowledgeloc2=-890,133
poknowledgeloc3=-897,133
poknowledgezonedoor=-907,132
nektulos=junction

[vp]
junctions=smallbank,southside,ot,outpost,skyfireent,skyfire
zoneshortnames=skyfire,veeshanspeak
skyfire=140,90,70,45,70,95,0,40,90,45,90,0,zonedoor
skyfireloc1=-1153,-4268
skyfireloc2=-1150,-3903
skyfireloc3=-959,-3388
skyfireloc3command=page up 2
skyfireloc4=-257,-2689
skyfireloc5=308,-1380
skyfireloc6=215,-301
skyfireloc7=533,-301
skyfireloc8=2103,987
skyfireloc9=2103,1303
skyfireloc10=2394,1593
skyfireloc11=2394,2988
skyfireloc12=2777,2996
skyfireloc12command=page down 6
veeshanspeak=finish

[pofear]
junctions=smallbank,southside,feerrott
zoneshortnames=feerrott,fearplane
feerrott=157,120,160,135,192,120,90,52,95,180,176,75,94,149,170,255,300,245,320,260,175,173,173
feerrottloc1=654,-64
feerrottloc2=411,364
feerrottloc3=-699,794
feerrottloc4=-906,1001
feerrottloc5=-1249,925
feerrottloc6=-1460,1304
feerrottloc7=-1467,2407
feerrottloc8=-1387,2507
feerrottloc9=-1403,2696
feerrottloc10=-1542,2693
feerrottloc11=-1666,2703
feerrottloc12=-1634,2856
feerrottloc13=-1643,3002
feerrottloc14=-1703,3039
feerrottloc15=-1908,3079
feerrottloc16=-1946,2931
feerrottloc17=-1924,2891
feerrottloc18=-2005,2720
feerrottloc19=-1912,2640
feerrottloc20=-1926,2563
feerrottloc21=-2153,2571
feerrottloc22=-2366,2604
fearplane=finish

[cazicthule]
junctions=smallbank,southside,feerrott
zoneshortnames=feerrott,cazicthule
feerrott=205,190,195,135,140,180,210,180,240,240
feerrottloc1=574,-289
feerrottloc2=160,-361
feerrottloc3=-137,-440
feerrottloc4=-278,-299
feerrottloc5=-651,14
feerrottloc6=-1209,14
feerrottloc7=-1344,-58
feerrottloc8=-1439,-58
feerrottloc9=-1457,-89
cazicthule=finish

[feerrott]
junctions=smallbank,southside
zoneshortnames=poknowledge,feerrott
poknowledge=285,175,180,zonedoor
poknowledgeloc1=-694,429
poknowledgeloc2=-853,445
poknowledgeloc3=-896,445
poknowledgezonedoor=-907,444
feerrott=junction


[ww]
junctions=smallbank,westside,potranqstone,potranqcircle,pov
zoneshortnames=povalor
povalor=330,327,30,355,0,55,100,20,300,15,52,0,0,107,180,finish
povalorloc1=-1616,159
povalorloc2=-998,-103
povalorloc3=-760,31
povalorloc4=-257,-17
povalorloc4command=door
povalorloc5=-101,-17
povalorloc6=-76,17
povalorloc7=-110,220
povalorloc8=76,287
povalorloc9=357,-208
povalorloc10=506,-169
povalorloc10command=page down 2
povalorloc11=680,48
povalorloc12=707,48
povalorloc12command=door
povalorloc13=781,48
povalorloc14=722,241
povalorloc15=603,241

[oc]
junctions=smallbank,westside,potranqstone,potranqcircle,pov,skeletons
zoneshortnames=povalor
povalor=98,40
povalorloc1=-1536,1242
povalorloc2=-1477,1290

[skeletons]
junctions=smallbank,westside,potranqstone,potranqcircle,pov
zoneshortnames=povalor
povalor=80,345,junction
povalorloc1=-1552,825
povalorloc2=-1476,803

[droga]
junctions=smallbank,southside,ot,outpost,skyfireent,fm
zoneshortnames=frontiermtns,droga
frontiermtns=180,165,180,120,170,185,132,25,95,170,112,180,180
frontiermtnsloc1=5149,1423
frontiermtnsloc2=4678,1553
frontiermtnsloc3=3907,1553
frontiermtnsloc4=3861,1652
frontiermtnsloc5=3522,1716
frontiermtnsloc6=3365,1703
frontiermtnsloc7=3111,2001
frontiermtnsloc8=3537,2193
frontiermtnsloc9=3482,2872
frontiermtnsloc10=3322,2895
frontiermtnsloc11=3301,2963
frontiermtnsloc12=3276,2963
droga=junction

[fm]
junctions=smallbank,southside,ot,outpost,skyfireent
zoneshortnames=overthere,frontiermtns
overthere=200,220,240,220,240,180,185
overthereloc1=-1932,3374
overthereloc2=-2902,2578
overthereloc3=-3051,2322
overthereloc4=-3469,1979
overthereloc5=-3722,1545
overthereloc6=-5954,1544
frontiermtns=junction

[skyfire]
junctions=smallbank,southside,ot,outpost,skyfireent
zoneshortnames=overthere,skyfire
overthere=90,47
overthereloc1=-1047,4155
skyfire=junction

[skyfireent]
junctions=smallbank,southside,ot,outpost
zoneshortnames=overthere
overthere=180,120,180,240,180,junction
overthereloc1=2179,1839
overthereloc2=1052,3827
overthereloc3=-838,3827
overthereloc4=-929,3670
overthereloc5=-1047,3670

[bags]
junctions=smallbank,southside,ot,outpost
zoneshortnames=overthere
overthere=95,130,95,55,355,finish
overthereloc1=2767,2153
overthereloc2=2643,2305
overthereloc3=2626,2502
overthereloc3command=door
overthereloc4=2683,2584
overthereloc5=2685,2583

[outpost]
junctions=smallbank,southside,ot
zoneshortnames=overthere
overthere=205,180,junction
overthereloc1=2954,1839
overthereloc2=2794,1839

[ot]
junctions=smallbank,southside
zoneshortnames=poknowledge,overthere
poknowledge=100,176,zonedoor
poknowledgeloc1=-798,875
poknowledgeloc2=-900,882
poknowledgezonedoor=-908,883
overthere=junction

[dranikscar]
junctions=smallbank
zoneshortnames=poknowledge
poknowledge=180,92,65,42,0,275,180,90,0,275,180,90,0,275,180,90,0,275,320,271,355,finish
poknowledgeloc1=-356,852
poknowledgeloc2=-361,1047
poknowledgeloc3=-271,1233
poknowledgeloc4=-253,1249
poknowledgeloc5=-227,1249
poknowledgeloc6=-227,1211
poknowledgeloc7=-267,1211
poknowledgeloc8=-267,1252
poknowledgeloc9=-227,1252
poknowledgeloc10=-227,1211
poknowledgeloc11=-268,1211
poknowledgeloc12=-268,1252
poknowledgeloc13=-227,1252
poknowledgeloc14=-227,1211
poknowledgeloc15=-268,1211
poknowledgeloc16=-268,1252
poknowledgeloc17=-227,1252
poknowledgeloc18=-226,1214
poknowledgeloc19=-192,1188
poknowledgeloc20=-184,592
poknowledgeloc21=34,570

[research]
junctions=smallbank,westside
zoneshortnames=poknowledge,crescent
poknowledge=355,60,88,zonedoor
poknowledgeloc1=15,-261
poknowledgeloc2=58,-187
poknowledgeloc3=61,-164
poknowledgezonedoor=60,-156
crescent=105,95,120,50,120,finish
crescentloc1=-1298,-2411
crescentloc2=-1334,-1999
crescentloc3=-1430,-1830
crescentloc4=-1299,-1674
crescentloc5=-1416,-1469

[seb]
junctions=smallbank,southside,fob,ej,trakent,trak
zoneshortnames=trakanon,sebelis
trakanon=205,225,215,200,215,195,175,203,190,165,268,245,280,255,270,260,225,290,265,200,270,265,255,295,268,359,zonedoor
trakanonloc1=3461,1304
trakanonloc2=3040,884
trakanonloc3=2413,454
trakanonloc4=1997,305
trakanonloc5=1700,101
trakanonloc6=1436,32
trakanonloc7=1223,53
trakanonloc8=-26,-464
trakanonloc9=-655,-573
trakanonloc10=-1366,-376
trakanonloc11=-1386,-915
trakanonloc12=-1619,-1410
trakanonloc13=-1563,-1733
trakanonloc14=-1643,-2022
trakanonloc15=-1650,-2583
trakanonloc16=-1679,-2737
trakanonloc17=-1837,-2895
trakanonloc18=-1797,-3008
trakanonloc19=-1821,-3260
trakanonloc20=-2003,-3324
trakanonloc21=-2003,-3467
trakanonloc22=-2022,-3662
trakanonloc23=-2141,-4092
trakanonloc24=-2049,-4292
trakanonloc24command=page down 4
trakanonloc25=-2067,-4756
trakanonloc26=-1587,-4767
sebelis=finish

[trak]
junctions=smallbank,southside,fob,ej,trakent
zoneshortnames=emeraldjungle,trakanon
emeraldjungle=200
trakanon=junction

[com]
junctions=smallbank,southside,fob,ej,trakent
zoneshortnames=emeraldjungle,citymist
emeraldjungle=288,327,302,325,295,320,288,335,355,335,280,5,72,90
emeraldjungleloc1=-3226,1465
emeraldjungleloc2=-2826,1204
emeraldjungleloc3=-2188,170
emeraldjungleloc4=-1763,-129
emeraldjungleloc5=-1643,-391
emeraldjungleloc6=-1150,-805
emeraldjungleloc7=-892,-1622
emeraldjungleloc8=-425,-1849
emeraldjungleloc9=-186,-1873
emeraldjungleloc10=15,-1968
emeraldjungleloc11=28,-2049
emeraldjungleloc12=281,-2027
emeraldjungleloc13=322,-1891
citymist=finish

[trakent]
junctions=smallbank,southside,fob,ej
zoneshortnames=emeraldjungle
emeraldjungle=320,300,275,200,300,200,320,220,200,225,180,200,220,190,249,180,245,280,249,220,junction
emeraldjungleloc1=-1467,4984
emeraldjungleloc2=-1308,4704
emeraldjungleloc3=-1242,3906
emeraldjungleloc4=-1276,3894
emeraldjungleloc4command=page down 4
emeraldjungleloc5=-1249,3872
emeraldjungleloc6=-1301,3853
emeraldjungleloc7=-1216,3774
emeraldjungleloc8=-1376,3633
emeraldjungleloc9=-1470,3609
emeraldjungleloc10=-1610,3430
emeraldjungleloc11=-1802,3361
emeraldjungleloc12=-1976,3219
emeraldjungleloc13=-2365,3151
emeraldjungleloc14=-2481,2850
emeraldjungleloc15=-2939,2850
emeraldjungleloc16=-3115,2479
emeraldjungleloc17=-3079,2272
emeraldjungleloc18=-3232,1876
emeraldjungleloc19=-3278,1628
emeraldjungleloc20=-3344,1576

[ej]
junctions=smallbank,southside,fob
zoneshortnames=fieldofbone,emeraldjungle
fieldofbone=340,267,345,310,265,235,180,280
fieldofboneloc1=-2316,1589
fieldofboneloc2=-2377,602
fieldofboneloc3=-1420,337
fieldofboneloc4=-1124,-23
fieldofboneloc5=-1206,-851
fieldofboneloc6=-1443,-1188
fieldofboneloc7=-1870,-1188
emeraldjungle=junction

[fob]
junctions=smallbank,southside
zoneshortnames=poknowledge,fieldofbone
poknowledge=285,270,0,zonedoor
poknowledgeloc1=-639,243
poknowledgeloc2=-639,35
poknowledgeloc3=-610,35
poknowledgezonedoor=-596,35
fieldofbone=junction

[southside]
junctions=smallbank
zoneshortnames=poknowledge
poknowledge=200,220,180,junction
poknowledgeloc1=-422,791
poknowledgeloc2=-515,718
poknowledgeloc3=-764,718

[bazaugs]
junctions=lobbyent,bazent,nearbazaugs
zoneshortnames=bazaar
bazaar=25,3,272,finish
bazaarloc1=25,-320
bazaarloc2=105,-317
bazaarloc3=105,-341

[nearbazaugs]
junctions=lobbyent,bazent
zoneshortnames=bazaar
bazaar=90,junction
bazaarloc1=-4,-334

[baz]
junctions=lobbyent,bazent,nearbazaugs
bazaar=90,20,320,40,52,finish
bazaarloc1=3,-76
bazaarloc2=55,-58
bazaarloc3=180,-163
bazaarloc4=282,-81
bazaarloc5=299,-60

[bazent]
junctions=lobbyent
zoneshortnames=poknowledge,bazaar
poknowledge=70,0,310,40,zonedoor
poknowledgeloc1=-252,1511
poknowledgeloc2=178,1511
poknowledgeloc3=278,1390
poknowledgeloc4=346,1445
bazaar=junction

[translocator]
junctions=lobbyent,lobby
zoneshortnames=guildlobby
guildlobby=75,0,305,290,350,finish
guildlobbyloc1=383,137
guildlobbyloc2=515,137
guildlobbyloc3=571,55
guildlobbyloc4=590,3
guildlobbyloc5=600,1

[rez]
junctions=lobbyent,lobby
zoneshortnames=guildlobby
guildlobby=75,60,175,finish
guildlobbyloc1=369,96
guildlobbyloc2=435,208
guildlobbyloc3=363,215

[lobby]
zoneshortnames=poknowledge,guildlobby
junctions=lobbyent
poknowledge=115,135,zonedoor
poknowledgeloc1=-348,1383
poknowledgeloc2=-374,1410
guildlobby=340,5,60,340,0,junction
guildlobbyloc1=14,-4
guildlobbyloc2=51,-1
guildlobbyloc3=67,26
guildlobbyloc4=161,-0
guildlobbyloc5=352,-3

[lobbyent]
zoneshortnames=poknowledge
poknowledge=180,95,87,junction
poknowledgeloc1=-352,843
poknowledgeloc2=-357,908
poknowledgeloc3=-321,1324

[templeofveeshan]
junctions=smallbank,westside,greatdivide,eastwastes,kael,wakeninglands,growtharea,skyshrine,cobaltscar,sirensgrotto,westwastes
zoneshortnames=westwastes
westwastes=90,355,20,5,85,0,300,finish
westwastesloc1=-5156,-3813
westwastesloc2=-4893,-3839
westwastesloc3=-4757,-3790
westwastesloc4=-3907,-3717
westwastesloc5=-3314,2283
westwastesloc6=-430,2283
westwastesloc7=469,688

[westwastes]
junctions=smallbank,westside,greatdivide,eastwastes,kael,wakeninglands,growtharea,skyshrine,cobaltscar,sirensgrotto
zoneshortnames=sirens,westwastes
sirens=300,25,0,280,310,90,330,275,355,270,20
sirensloc1=-565,12
sirensloc1command=page down 2
sirensloc2=-400,88
sirensloc3=-218,171
sirensloc4=-149,170
sirensloc4command=page up 4
sirensloc5=-144,137
sirensloc6=-75,64
sirensloc6command=page down 4
sirensloc7=76,49
sirensloc8=63,185
sirensloc9=110,152
sirensloc10=110,107
sirensloc11=198,98
sirensloc12=198,-92
westwastes=junction

[sirensgrotto]
junctions=smallbank,westside,greatdivide,eastwastes,kael,wakeninglands,growtharea,skyshrine,cobaltscar
zoneshortnames=cobaltscar,sirens
cobaltscar=272,75,290,60,0,52,0,0,0,0,60
cobaltscarloc1=-930,419
cobaltscarloc2=-909,496
cobaltscarloc3=-892,451
cobaltscarloc3command=page up 4
cobaltscarloc4=443,1327
cobaltscarloc5=631,1327
cobaltscarloc6=825,1581
cobaltscarloc6command=page down 12
cobaltscarloc7=1045,1571
cobaltscarloc7command=page up 7
cobaltscarloc8=1176,1574
cobaltscarloc9=1199,1576
cobaltscarloc10=1571,1572
sirens=junction

[cobaltscar]
junctions=smallbank,westside,greatdivide,eastwastes,kael,wakeninglands,growtharea,skyshrine
zoneshortnames=skyshrine,cobaltscar
skyshrine=360,70,5,1,90,1,90,1,90,180,90,1,90,1,359,zonedoor
skyshrineloc1=-105,-734
skyshrineloc2=-80,-668
skyshrineloc2command=page down 2
skyshrineloc3=72,-656
skyshrineloc3command=door
skyshrineloc4=120,-656
skyshrineloc5=120,-566
skyshrineloc5command=page up 2
skyshrineloc6=170,-565
skyshrineloc7=170,-531
skyshrineloc8=260,-530
skyshrineloc9=260,-455
skyshrineloc10=215,-455
skyshrineloc11=215,-419
skyshrineloc12=262,-419
skyshrineloc13=262,-324
skyshrineloc14=390,-328
skyshrineloc14command=door
skyshrineloc15=543,-327
skyshrineloc15command=page up 2
cobaltscar=junction

[skyshrine]
junctions=smallbank,westside,greatdivide,eastwastes,kael,wakeninglands,growtharea
zoneshortnames=wakening,skyshrine
wakening=117,95,85,60,72,50,62,55,40,55,90,112,90,120,90,75,70
wakeningloc1=-109,-998
wakeningloc2=-160,-387
wakeningloc3=-86,360
wakeningloc4=213,875
wakeningloc5=415,1484
wakeningloc6=600,1705
wakeningloc7=744,1964
wakeningloc8=943,2239
wakeningloc9=1014,2297
wakeningloc10=1574,3075
wakeningloc11=1574,3206
wakeningloc12=1474,3480
wakeningloc13=1458,3746
wakeningloc14=1351,3934
wakeningloc15=1353,4169
wakeningloc16=1459,4585
skyshrine=junction

[growth]
junctions=smallbank,westside,greatdivide,eastwastes,kael,wakeninglands,growtharea
zoneshortnames=wakening,growthplane
wakening=320,37,85,55,180,55,152,210,270,332,30,90,152,210,270,342,zonedoor
wakeningloc1=352,-1628
wakeningloc1command=page up 4
wakeningloc2=712,-1370
wakeningloc3=729,-1202
wakeningloc4=853,-1025
wakeningloc5=511,-1025
wakeningloc6=532,-992
wakeningloc7=462,-955
wakeningloc8=400,-990
wakeningloc9=402,-1066
wakeningloc10=466,-1100
wakeningloc11=529,-1065
wakeningloc12=529,-987
wakeningloc13=466,-953
wakeningloc14=406,-986
wakeningloc15=406,-1048
wakeningloc16=461,-1066
growthplane=finish

[growtharea]
junctions=smallbank,westside,greatdivide,eastwastes,kael,wakeninglands
zoneshortnames=wakening
wakening=145,91,55,95,65,40,70,junction
wakeningloc1=-680,-4968
wakeningloc2=-735,-3627
wakeningloc3=-377,-3090
wakeningloc4=-417,-2572
wakeningloc5=-192,-2097
wakeningloc6=-69,-1996
wakeningloc7=122,-1459

[wakeninglands]
junctions=smallbank,westside,greatdivide,eastwastes,kael
zoneshortnames=kael,wakening
kael=150,65,80,65,125,220,105,55,80,60,120,100,125,85,120,55
kaelloc1=-224,-538
kaelloc2=-35,-138
kaelloc3=37,253
kaelloc4=205,607
kaelloc5=89,778
kaelloc6=-139,590
kaelloc7=-216,883
kaelloc8=-149,978
kaelloc9=-98,1261
kaelloc10=28,1483
kaelloc11=-136,1774
kaelloc12=-156,1892
kaelloc13=-242,2017
kaelloc14=-229,2120
kaelloc15=-522,2637
wakening=junction

[kael]
junctions=smallbank,westside,greatdivide,eastwastes
zoneshortnames=eastwastes,kael
eastwastes=270,200,93,93,75
eastwastesloc1=-1833,5085
eastwastesloc2=-6277,3495
eastwastesloc2command=page down 5
eastwastesloc3=-6331,4626
eastwastesloc4=-6432,6672
kael=160,junction
kaelloc1=-46,-640

[eastwastes]
junctions=smallbank,westside,greatdivide
zoneshortnames=greatdivide,eastwastes
greatdivide=258,275
greatdivideloc1=-1829,-3635
eastwastes=270,junction
eastwastesloc1=-1833,5085

[velks]
junctions=smallbank,westside,greatdivide,thurgarea
zoneshortnames=greatdivide,velketor
greatdivide=140,155,140,180,125,180,125,180,45,90,160
greatdivideloc1=-2489,652
greatdivideloc2=-2543,677
greatdivideloc3=-4113,1958
greatdivideloc4=-5999,1958
greatdivideloc5=-6445,2551
greatdivideloc6=-6777,2551
greatdivideloc7=-6777,2613
greatdivideloc8=-6899,2780
greatdivideloc9=-6756,2959
greatdivideloc10=-6756,3318
velketor=finish

[ssra]
junctions=smallbank,westside,nexus,netherbian,mseru,thegrey
zoneshortnames=thegrey,ssratemple
thegrey=310,40,350,20,320,100,165,80
thegreyloc1=-2056,284
thegreyloc2=-1965,351
thegreyloc3=-370,-97
thegreyloc4=-222,-25
thegreyloc5=60,-187
thegreyloc5command=page down 5
thegreyloc6=69,-97
thegreyloc7=33,-80
ssratemple=finish

[thegrey]
junctions=smallbank,westside,nexus,netherbian,mseru
zoneshortnames=letalis,thegrey,ssra
letalis=24,24
letalisloc1=1382,-27
letalisloc1command=page down 5
thegrey=junction


[umbral]
junctions=smallbank,westside,nexus,netherbian,dawnshroud,maiden
zoneshortnames=maiden,umbral
maiden=265,230,282,295,220
maidenloc1=138,-1030
maidenloc2=-353,-1617
maidenloc3=-293,-1879
maidenloc4=-221,-2037
umbral=finish

[akheva]
junctions=smallbank,westside,nexus,netherbian,dawnshroud,maiden
zoneshortnames=maiden,akheva
maiden=150,180,165,220,245,265,180,165
maidenloc1=45,1725
maidenloc2=-296,1715
maidenloc3=-1115,1897
maidenloc4=-1399,1649
maidenloc5=-1530,334
maidenloc6=-1621,336
maidenloc7=-1851,150
akheva=finish

[maidenseye]
junctions=smallbank,westside,nexus,netherbian,dawnshroud,maiden
zoneshortnames=maiden
maiden=finish

[griegsend]
junctions=smallbank,westside,nexus,netherbian,dawnshroud
zoneshortnames=dawnshroud,griegsend
dawnshroud=197,182,165
dawnshroudloc1=-1606,-868
dawnshroudloc2=-1930,-878
griegsend=finish

[pofire]
junctions=smallbank,westside,potranqstone
zoneshortnames=potranquility,pofire
potranquility=220,270,251,305,zonedoor
potranquilityloc1=247,-1652
potranquilityloc2=245,-2040
potranquilityloc3=214,-2114
potranquilityloc4=246,-2175
pofire=finish

[tactics]
junctions=smallbank,westside,potranqstone,potranqcircle
zoneshortnames=potranquility,potactics
potranquility=75
potranquilityloc1=-155,-28
potactics=finish

[hoh]
junctions=smallbank,westside,potranqstone,potranqcircle
zoneshortnames=potranquility,hohonora
potranquility=87,zonedoor
potranquilityloc1=-163,7
hohonora=finish

[pov]
junctions=smallbank,westside,potranqstone,potranqcircle
zoneshortnames=potranquility,povalor
potranquility=142,zonedoor
potranquilityloc1=-225,-2
povalor=junction

[paw]
junctions=smallbank,westside
zoneshortnames=poknowledge,qeynos2,qeytoqrg,qey2hh1,northkarana,southkarana,paw
poknowledge=352,277,zonedoor
poknowledgeloc1=142,-288
poknowledgeloc2=147,-326
poknowledgezonedoor=147,-331
qeynos2=353
qeytoqrg=315,275,310,230
qeytoqrgloc1=1301.00,-1186.00,15
qeytoqrgloc2=1363.00,-1908.00,-1
qeytoqrgloc3=1533.00,-2111.00,-1
qey2hh1=230,310,270
qey2hh1loc1=-222.00,-270.00,-3
qey2hh1loc2=4.00,-546.00,-3
northkarana=212,180
northkaranaloc1=-3211.00,1211.00,16
southkarana=178,295,55,5,80
southkaranaloc1=-3618.00,1121.00,1
southkaranaloc2=-3396.00,634.00,5
southkaranaloc2command=page down 4
southkaranaloc3=-3232.00,858.00,-8
southkaranaloc4=-3165.00,861.00,-8
paw=finish

[smallbank]
zoneshortnames=guildlobby,poknowledge
guildlobby=240,255,175,177,265,180,160,180,175,zonedoor
guildlobbyloc1=440,221
guildlobbyloc2=311,5
guildlobbyloc3=221,1
guildlobbyloc4=77,26
guildlobbyloc5=58,0
guildlobbyloc6=32,-2
guildlobbyloc7=-16,3
guildlobbyloc8=-46,19
guildlobbyloc9=-60,22
poknowledge=260,300,275,300,junction
poknowledgeloc1=-385,970
poknowledgeloc2=-377,952
poknowledgeloc3=-374,913
poknowledgeloc4=-335,840

[westside]
junctions=smallbank
zoneshortnames=poknowledge
poknowledge=175,280,300,270,300,junction
poknowledgeloc1=-357,841
poknowledgeloc2=-265,313
poknowledgeloc3=-190,189
poknowledgeloc3command=page down 1
poknowledgeloc4=-187,-173
poknowledgeloc5=-147,-243

[greatdivide]
junctions=smallbank,westside
zoneshortnames=poknowledge,greatdivide
poknowledge=350,20,360,zonedoor
poknowledgeloc1=251,-303
poknowledgeloc2=437,-235
poknowledgeloc3=454,-235
poknowledgezonedoor=459,-235
greatdivide=junction

[thurgarea]
junctions=smallbank,westside
zoneshortnames=greatdivide
greatdivide=180,125,junction
greatdivideloc1=-150,-1798
greatdivideloc2=-1115,-454

[potranqstone]
junctions=smallbank,westside
zoneshortnames=poknowledge,potranquility
poknowledge=270,zonedoor
poknowledgeloc1=-148,-327
poknowledgezonedoor=-147,-332
potranquility=140,93,junction
potranquilityloc1=712,-1395
potranquilityloc2=706,-1285

[potranqcircle]
junctions=smallbank,westside,potranqstone
zoneshortnames=potranquility
potranquility=145,53,90,junction
potranquilityloc1=-356,-542
potranquilityloc2=-165,-290
potranquilityloc3=-165,-60

[nexus]
junctions=smallbank,westside
zoneshortnames=poknowledge,nexus
poknowledge=345,5,70,350,zonedoor
poknowledgeloc1=89,-308
poknowledgeloc2=349,-283
poknowledgeloc3=425,-77
poknowledgeloc4=453,-77
poknowledgezonedoor=461,-76
nexus=260,220,325,junction
nexusloc1=25,307
nexusloc2=-50,243
nexusloc3=238,40

[netherbian]
junctions=smallbank,westside,nexus
zoneshortnames=nexus,netherbian
nexus=320,30
nexusloc1=356,-59
netherbian=110,180,junction
netherbianloc1=1924,-8
netherbianloc2=503,4

[dawnshroud]
junctions=smallbank,westside,nexus,netherbian
zoneshortnames=netherbian,dawnshroud
netherbian=200,180,144,84,351,247
netherbianloc1=466,-13
netherbianloc2=-595,-13
netherbianloc3=-779,84
netherbianloc4=-765,-54
netherbianloc5=-667,-57
dawnshroud=260,170,189,junction
dawnshroudloc1=2066,-180
dawnshroudloc2=1921,-149
dawnshroudloc3=-372,-495

[maiden]
junctions=smallbank,westside,nexus,netherbian,dawnshroud
zoneshortnames=dawnshroud,maiden
dawnshroud=252,275,330
dawnshroudloc1=-796,-1757
dawnshroudloc2=-773,-2021
maiden=200,269,210,junction
maidenloc1=940,2020
maidenloc2=933,1738
maidenloc3=486,1470

[mseru]
junctions=smallbank,westside,nexus,netherbian
zoneshortnames=netherbian,mseru,letalis
netherbian=95,73
netherbianloc1=432,800
mseru=145,85,10,350,355,60,320
mseruloc1=512,-1783
mseruloc2=565,-1244
mseruloc3=1557,-1084
mseruloc4=1662,-1059
mseruloc5=1831,-1077
mseruloc6=1894,-968
letalis=55,340,22,60,10,10,75,300,24,junction
letalisloc1=-1332,-590
letalisloc2=-691,-877
letalisloc3=-163,-674
letalisloc4=-56,-491
letalisloc5=535,-378
letalisloc6=1172,-378
letalisloc7=1293,37
letalisloc7command=page down 4
letalisloc8=1340,-45

[shadowhaven]
junctions=smallbank,westside,nexus
zoneshortnames=nexus,shadowhaven
nexus=235,220,295,270
nexusloc1=4,-287
nexusloc2=-64,-346
nexusloc3=-43,-380
shadowhaven=180,275,300,240,junction
shadowhavenloc1=58,1571
shadowhavenloc2=92,1182
shadowhavenloc3=163,1056
shadowhavenloc4=62,866

[shadowhavenecho]
junctions=smallbank,westside,nexus,shadowhaven
zoneshortnames=shadowhaven
shadowhaven=270,290,270,180,195,junction
shadowhavenloc1=57,696
shadowhavenloc2=99,580
shadowhavenloc3=99,279
shadowhavenloc4=-42,279
shadowhavenloc5=-488,156

[echo]
junctions=smallbank,westside,nexus,shadowhaven,shadowhavenecho
zoneshortnames=shadowhaven,echo
shadowhaven=200,200,270,90,90
shadowhavenloc1=-526,140
shadowhavenloc1command=page down 8
shadowhavenloc2=-637,101
shadowhavenloc3=-637,68
shadowhavenloc4=-637,119
shadowhavenloc4command=page up 10
echo=junction

[deepbridge]
junctions=smallbank,westside,nexus,shadowhaven,shadowhavenecho,echo,thedeep
zoneshortnames=thedeep
thedeep=70,28,90,111,0,15,90,109,15,0,100,155,125,10,70,149,188,175,junction
thedeeploc1=-361,-671
thedeeploc2=-267,-622
thedeeploc3=-267,-525
thedeeploc4=-340,-328
thedeeploc5=-273,-333
thedeeploc6=-36,-271
thedeeploc7=-36,-104
thedeeploc8=-63,-28
thedeeploc9=144,26
thedeeploc10=249,26
thedeeploc11=209,256
thedeeploc12=49,332
thedeeploc13=-66,501
thedeeploc14=115,529
thedeeploc15=339,1130
thedeeploc16=271,1169
thedeeploc17=124,1151
thedeeploc18=62,1158

[thedeep]
junctions=smallbank,westside,nexus,shadowhaven,shadowhavenecho,echo
zoneshortnames=echo,thedeep
echo=75,0,90,111,75,100,175,130,180
echoloc1=-1289,149
echoloc1command=page down 6
echoloc2=-999,149
echoloc3=-999,421
echoloc4=-1111,722
echoloc5=-1049,945
echoloc6=-1135,1425
echoloc7=-1625,1474
echoloc8=-1737,1609
thedeep=junction

[paludal]
junctions=smallbank,westside,nexus,shadowhaven,shadowhavenecho
zoneshortnames=shadowhaven,paludal
shadowhaven=170
paludal=junction

[hollowshade]
junctions=smallbank,westside,nexus,shadowhaven,shadowhavenecho,paludal
zoneshortnames=paludal,hollowshade
paludal=220,310,35,70,360,330,300,360,250,300,330,335,280,360,340,5,345,265,325,0,75,20,355,55
paludalloc1=-2260,945
paludalloc2=-2155,817
paludalloc3=-2065,878
paludalloc4=-2002,1045
paludalloc5=-1946,1011
paludalloc6=-1620,999
paludalloc7=-1471,744
paludalloc8=-834,767
paludalloc9=-922,534
paludalloc10=-899,481
paludalloc11=-704,389
paludalloc12=-670,200
paludalloc13=-322,200
paludalloc14=-274,61
paludalloc15=457,-108
paludalloc16=603,-91
paludalloc17=847,-157
paludalloc18=808,-603
paludalloc19=963,-711
paludalloc20=1240,-683
paludalloc21=1286,-518
paludalloc22=1356,-493
paludalloc23=1525,-509
hollowshade=190,260,300,junction
hollowshadeloc1=-1807,2998
hollowshadeloc2=-1828,2841
hollowshadeloc3=-1011,2548

[grimling]
junctions=smallbank,westside,nexus,shadowhaven,shadowhavenecho,paludal,hollowshade
zoneshortnames=hollowshade,grimling
hollowshade=308,0,290,300,280,286,245,290,300,340,300,355,50,320
hollowshadeloc1=-603,1999
hollowshadeloc2=-241,2001
hollowshadeloc3=311,545
hollowshadeloc4=474,217
hollowshadeloc5=579,-423
hollowshadeloc6=664,-725
hollowshadeloc7=577,-917
hollowshadeloc8=768,-1444
hollowshadeloc9=1076,-2003
hollowshadeloc10=2146,-2394
hollowshadeloc11=2219,-2523
hollowshadeloc12=3115,-2599
hollowshadeloc13=3254,-2431
grimling=40,355,junction
grimlingloc1=-1687,-1124
grimlingloc2=-1397,-1170

[acrylia]
junctions=smallbank,westside,nexus,shadowhaven,shadowhavenecho,paludal,hollowshade,grimling
zoneshortnames=grimling,acrylia
grimling=40,80,70,45,60,45,345,90,175,80,180,280,180,85,355,5,60,160
grimlingloc1=-469,-412
grimlingloc2=-419,-207
grimlingloc3=-391,-167
grimlingloc4=-433,-93
grimlingloc5=-372,103
grimlingloc6=401,1023
grimlingloc7=862,1000
grimlingloc7command=page down 6
grimlingloc8=862,1235
grimlingloc9=613,1268
grimlingloc10=625,1469
grimlingloc11=443,1469
grimlingloc12=443,1342
grimlingloc13=104,1342
grimlingloc14=138,1694
grimlingloc15=361,1671
grimlingloc16=793,1709
grimlingloc16command=page up 2
grimlingloc17=886,1943
acrylia=finish

[sseru]
junctions=smallbank,westside,nexus,netherbian,dawnshroud
zoneshortnames=dawnshroud,sseru
dawnshroud=85,80
dawnshroudloc1=-252,736
sseru=finish

[bastionarea]
junctions=smallbank,westside,potranqstone
zoneshortnames=potranquility
potranquility=140,155,junction
potranquilityloc1=-705,-609
potranquilityloc2=-1193,-380

[postorms]
junctions=smallbank,westside,potranqstone,bastionarea,postormsarea
zoneshortnames=potranquility,postorms
potranquility=100,140,30,zonedoor
potranquilityloc1=-663,1050
potranquilityloc2=-807,1171
potranquilityloc3=-789,1182
postorms=junction

[postormsarea]
junctions=smallbank,westside,potranqstone,bastionarea
zoneshortnames=potranquility
potranquility=40,62,80,junction
potranquilityloc1=-930,-162
potranquilityloc2=-704,260
potranquilityloc3=-613,750

[bot]
junctions=smallbank,westside,potranqstone,bastionarea,postormsarea
zoneshortnames=potranquility,bastion
potranquility=105,73,zonedoor
potranquilityloc1=-799,1469
potranquilityloc2=-698,1788
bastion=finish

[solrotower]
junctions=smallbank,westside,potranqstone,potranqcircle
zoneshortnames=potranquility,solrotower
potranquility=111,zonedoor
potranquilityloc1=-194,20
solrotower=finish

[pon]
junctions=smallbank,westside,potranqstone
zoneshortnames=potranquility,ponightmare
potranquility=160,260,320,20,68,340,280,zonedoor
potranquilityloc1=-610,-789
potranquilityloc2=-681,-1172
potranquilityloc3=-479,-1342
potranquilityloc4=-345,-1295
potranquilityloc5=-311,-1202
potranquilityloc6=-190,-1247
potranquilityloc7=-185,-1274
ponightmare=finish

[pojustice]
junctions=smallbank,westside,potranqstone
zoneshortnames=potranquility,pojustice
potranquility=145,59,zonedoor
potranquilityloc1=-22,-762
potranquilityloc1command=page up 4
potranquilityloc2=37,-651
pojustice=finish

[cod]
junctions=smallbank,westside,potranqstone,tormentarea,diseasearea
zoneshortnames=potranquility,cryptofdecay
potranquility=350,97,30,300,195,123,zonedoor
potranquilityloc1=1931,-1416
potranquilityloc2=1885,-1001
potranquilityloc3=2031,-919
potranquilityloc4=2136,-1104
potranquilityloc5=1932,-1159
potranquilityloc6=1900,-1109
cryptofdecay=finish

[podisease]
junctions=smallbank,westside,potranqstone,tormentarea,diseasearea
zoneshortnames=potranquility,podisease
potranquility=330,280
potranquilityloc1=1722,-1427
podisease=finish

[diseasearea]
junctions=smallbank,westside,potranqstone,tormentarea
zoneshortnames=potranquility
potranquility=32,332,330,junction
potranquilityloc1=1323,-1206
potranquilityloc2=1513,-1305
potranquilityloc3=1596,-1353

[potorment]
junctions=smallbank,westside,potranqstone,tormentarea
zoneshortnames=potranquility,potorment
potranquility=223,zonedoor
potranquilityloc1=708,-1643
potorment=finish

[tormentarea]
junctions=smallbank,westside,potranqstone
zoneshortnames=potranquility
potranquility=320,junction
potranquilityloc1=910,-1456

[poair]
junctions=smallbank,westside,potranqstone
zoneshortnames=potranquility,poair
potranquility=95,0,zonedoor
potranquilityloc1=654,-680
potranquilityloc2=829,-680
poair=finish

[poearth]
junctions=smallbank,westside,potranqstone,bastionarea,timearea
zoneshortnames=potranquility,poearth
potranquility=74,130,40,12,zonedoor
potranquilityloc1=-1497,1831
potranquilityloc2=-1667,2038
potranquilityloc3=-1448,2191
potranquilityloc4=-1342,2213
poearth=finish

[powater]
junctions=smallbank,westside,potranqstone,bastionarea,timearea
zoneshortnames=potranquility,powater
potranquility=16,131,zonedoor
potranquilityloc1=-1070,876
potranquilityloc2=-1169,993
powater=finish

[potime]
juntions=smallbank,westside,potranqstone,bastionarea,innovationarea,timearea
zoneshortnames=potranquility,potime
potranquility=127,85,190,270,zonedoor
potranquilityloc1=-2164,1094
potranquilityloc2=-2142,1314
potranquilityloc3=-2258,1295
potranquilityloc4=-2256,1243
potime=finish

[timearea]
juntions=smallbank,westside,potranqstone,bastionarea,innovationarea
zoneshortnames=potranquility
potranquility=125,junction
potranquilityloc1=-1836,658

[innovationarea]
junctions=smallbank,westside,potranqstone,bastionarea
zoneshortnames=potranquility
potranquility=120,junction
potranquilityloc1=-1424,57

[poi]
junctions=smallbank,westside,potranqstone,bastionarea,innovationarea
zoneshortnames=potranquility,poinnovation
potranquility=170,295,180,zonedoor
potranquilityloc1=-1560,109
potranquilityloc2=-1505,-5
potranquilityloc3=-1547,-5
potranquilityloc3command=page up 4
poinnovation=finish

[crossbridge]
zoneshortnames=thedeep
thedeep=90,70,160,180,finish
thedeeploc1=127,552
thedeeploc2=350,1142
thedeeploc3=232,1176
thedeeploc4=89,1158

[leash]
zoneshortnames=griegsend,templeveeshan,poknowledge
vyemm=-363,-117
grieg=473,2339
smallbank=-438,889

[zoneout]
zoneshortnames=templeveeshan,westwastes,necropolis,thedeep,ssratemple,thegrey,scarlet,fungusgrove,twilight,griegsend,dawnshroud,netherbian,acrylia,emeraldjungle
northwing=1225,-1860
eastwing=-556,-1696
westwing=-1190,1425
tov=1431,676
tovcommand=zonedoor
dn=-2832,445
dncommand=zonedoor
westwastes=-65,1986
westwastescommand=zonedoor
deeptossra=-825,3075
sorizbasement=-948,-404
sorizbasementcommand=door
sorizbasementout=-946,9384
sorizbasementoutcommand=door
ssraexit=-35,-40
greyscarlet=629,-2065
scarlettwilight=-1140,-1790
fungustwilight=1956,2345
fungustwilightcommand=zonedoor
twilightkatta=-184,-2020
griegdawnshroud=-16,3540
dawnshroudnetherbian=2125,-249
netherbiannexus=2100,-440
castlestone=-695,151
castlestonecommand=door
traktoej=3990,1560
|
|/gui toggle zoneout tov
|^would make all chars zone into tov if ur near tov... its limited somewhere
| I=30 as in I = number of zoneouts to search for (so easily changed)
|

Re: movement function, movement.ini, automove to zones/spell

Posted: Thu Jul 09, 2015 12:44 am
by toolisuber
|this is my spellroutines.inc

hi guys update ---- not doing it yet but you can feel free to change
/if (${Defined[Subroutine]} && ${Me.Casting.ID}) /call ${Subroutine}
to
/if (${Subroutine.Length} > 1 && ${Me.Casting.ID}) /call ${Subroutine}

Defined causes some sort of lag for me....not noticible
.Length should make things prolly the best possible
this may work with .Length > 0 !
ill update this eventually

|it works good and not a lot of chat events, out of mana is commented out
|
|this spellroutines.inc is ideal for running more than 12 characters because
|it has severely less chat events being read
|
|you do not want 60 characters reading every line of text 16times each24/7
|
|for a starter project you can turn this into 1 chat event instead of 3...
|plenty examples within toggle and prolly other macros
|
|i had to look at the original copy of spell routines to get some ideas cause i
|was totally new and lost but then i made it really good
|
|you include spellroutines with like #include spellroutines.inc
|at the top of ur macro
|
|spell routines reads things like a hp check or whatever u want
|
|this is an EXAMPLE of How this works
|
|you would call these like this
|
|/call cast ${healrotspell} 2s checkhealedtwo
|
|the 2s is the amount of time to try to recast the spell ( like jamming the
| cast button for 2s
|
|this is an example of a sub that uses spellroutines to check if a healspell
|should be interrupted.... next one is spellroutines.inc

Code: Select all

Sub checkhealed

/if (${Target.PctHPs} > 90 && ${casttimer} < ${Math.Calc[(${casttime} * 10)/ 2]}) {
/stopcast
/echo ${Target.PctHPs} attempting interrupt...
/echo ${casttimer} (ms) cast time left...
/call Interrupt
}
/return


Sub checkhealedtwo

/if (${Target.PctHPs} > 90 && ${casttimer} < ${Math.Calc[(${casttime} * 10)/ 4]}) {
/stopcast
/echo ${Target.PctHPs} attempting interrupt...
/echo ${casttimer} (ms) cast time left...
/call Interrupt
}
/return
spellroutines.inc
this is my spellroutines.inc its faster and efficient it could be better very soon!

this is ideal for raiding with alot of chars or watever fastest

this is the newest version i think this is very close to perfection ----UNTESTED
this reads 1xperline 1-2line 1line w/returns for efficiency
old version reads 3xperline 1-2line

nothold is done by default in this version as a success so no repeated casts
nothold done by default the second /varset castreturn CAST_SUCCESS is unnecessary keeping it for research purposes

you want it teh bestest???!? remove the commented out stuff -outofrange outofmana uselessness

you could also disable your focus effect chat spew ingame filters

if u wanna get rlly specul with this u can remove the "cannot be" line and make
a seperate spellroutines for ench and brd? that mez/charm mobs ---- 1xperline 1-2line // 1xperline 1-2line 1line
don't forget to #include spell_routines.inc in ur macro
or liek #include spell_routines_full.inc in ench && brd? macros if u make a seperate one for charm/mez
spellroutines.inc ---- current/ untested really
-------------------

Code: Select all

#turbo 40



#Event spellroutines "Your#1#"
|#Event OutOfMana "Insufficient Mana to cast this spell!#*#"

Sub cast(string SpellName,string Recast,string SpellSlot,string Subroutine)

/if (!${Defined[castreturn]}) /declare castreturn string outer
/if (!${Defined[casttime]}) /declare casttime float outer ${Spell[${SpellName}].MyCastTime}
/if (!${Defined[casttimer]}) /declare casttimer timer outer
/if (!${Defined[recasttimer]}) /declare recasttimer timer outer 

/varset casttime ${Spell[${SpellName}].MyCastTime}
/if (${Defined[Recast]}) { 
    /if (${Recast.Find[gem]}) {
        /declare SpellSlot string local ${Recast}
    }
    /varset Recast ${Recast.Left[-1]}
} else {
    /declare Recast string local 0
}
/if (${Defined[SpellSlot]}) {
    /if (!${SpellSlot.Find[gem]}) {
        /declare Subroutine string local
        /varset Subroutine ${SpellSlot}
        /varset SpellSlot ${Me.Gem[${SpellName}]}
    }
    /if (${SpellSlot.Find[gem]}) {
        /varset SpellSlot ${SpellSlot.Right[-3]}
    }
}
:start
/if (!${Me.Gem[${SpellName}]} && !${Cursor.ID}) {
    /memspell ${SpellSlot} "${SpellName}"
    /delay 10s ${Me.SpellReady[${SpellName}]}
}
/delay 1
/if (!${Me.SpellReady[${SpellName}]}) /goto :start
/varset recasttimer ${Math.Calc[${Recast} * 10]}
:cast
/if (${Me.SpellReady[${SpellName}]}) {
    /varset casttimer ${Math.Calc[${casttime} * 10]}
    /if (${Spell[${SpellName}].TargetType.Equal[Self]} || ${Spell[${SpellName}].TargetType.Equal[PB AE]} || ${Spell[${SpellName}].TargetType.Equal[Pet]}) {
        /echo Casting ${SpellName} >>><<<
    } else {
        /echo Casting ${SpellName} >>> ${Target.CleanName} <<<
    }
    /cast "${SpellName}"
} else {
/delay 1
/goto :cast
}
:check
/if (!${Me.Casting.ID} && !${recasttimer}) /goto :finish
/if (${Defined[Subroutine]} && ${Me.Casting.ID}) /call ${Subroutine}
/delay 1
/if (!${Me.Casting.ID} && ${recasttimer}) /goto :cast
/if (${Me.Casting.ID}) /goto :check
:finish
/varset castreturn CAST_SUCCESS
/doevents spellroutines
/if (${castreturn.NotEqual[CAST_SUCCESS]}) /echo ${castreturn}
/return ${castreturn}

Sub Interrupt

/stopcast
/varset recasttimer 0
/delay 1
/return

Sub Event_spellroutines(Line, spellstring)

/if (${spellstring.Find[spell]}) {
    /if (${spellstring.Find[interrupted]}) {
        /varset castreturn CAST_INTERRUPTED
        /return
    }
    /if (${spellstring.Find[resisted the]}) {
        /varset castreturn CAST_RESISTED
        /return
    }
|    /varset castreturn CAST_SUCCESS
    /return
}
|    /if (${spellstring.Find[is out of]}) {
|        /varset castreturn CAST_OUTOFRANGE
|        /return
|    }
/if (${spellstring.Find[cannot be]}) {
    /varset castreturn CAST_IMMUNE
}
/return

|Sub Event_OutOfMana(Line)
|
|/varset castreturn CAST_OOM
|/return


this is older version of spellroutines.inc ---- this works tested

Code: Select all

#turbo 40



#Event Interrupt "Your#*#interrupted#*#"
#Event CastFail "Your target#2#"
#Event NotHold "Your spell did not take hold#*#"
|#Event OutOfMana "Insufficient Mana to cast this spell!#*#"

Sub cast(string SpellName,string Recast,string SpellSlot,string Subroutine)

/if (!${Defined[castreturn]}) /declare castreturn string outer
/if (!${Defined[casttime]}) /declare casttime float outer ${Spell[${SpellName}].MyCastTime}
/if (!${Defined[casttimer]}) /declare casttimer timer outer
/if (!${Defined[recasttimer]}) /declare recasttimer timer outer 

/varset casttime ${Spell[${SpellName}].MyCastTime}
/if (${Defined[Recast]}) { 
    /if (${Recast.Find[gem]}) {
        /declare SpellSlot string local ${Recast}
    }
    /varset Recast ${Recast.Left[-1]}
} else {
    /declare Recast string local 0
}
/if (${Defined[SpellSlot]}) {
    /if (!${SpellSlot.Find[gem]}) {
        /declare Subroutine string local
        /varset Subroutine ${SpellSlot}
        /varset SpellSlot ${Me.Gem[${SpellName}]}
    }
    /if (${SpellSlot.Find[gem]}) {
        /varset SpellSlot ${SpellSlot.Right[-3]}
    }
}
:start
/if (!${Me.Gem[${SpellName}]} && !${Cursor.ID}) {
    /memspell ${SpellSlot} "${SpellName}"
    /delay 10s ${Me.SpellReady[${SpellName}]}
}
/delay 1
/if (!${Me.SpellReady[${SpellName}]}) /goto :start
/varset recasttimer ${Math.Calc[${Recast} * 10]}
:cast
/if (${Me.SpellReady[${SpellName}]}) {
    /varset casttimer ${Math.Calc[${casttime} * 10]}
    /if (${Spell[${SpellName}].TargetType.Equal[Self]} || ${Spell[${SpellName}].TargetType.Equal[PB AE]} || ${Spell[${SpellName}].TargetType.Equal[Pet]}) {
        /echo Casting ${SpellName} >>><<<
    } else {
        /echo Casting ${SpellName} >>> ${Target.CleanName} <<<
    }
    /cast "${SpellName}"
} else {
/delay 1
/goto :cast
}
:check
/if (!${Me.Casting.ID} && !${recasttimer}) /goto :finish
/if (${Defined[Subroutine]} && ${Me.Casting.ID}) /call ${Subroutine}
/delay 1
/if (!${Me.Casting.ID} && ${recasttimer}) /goto :cast
/if (${Me.Casting.ID}) /goto :check
:finish
/varset castreturn CAST_SUCCESS
/doevents Interrupt
/doevents NotHold
/doevents CastFail
/if (${castreturn.NotEqual[CAST_SUCCESS]}) /echo ${castreturn}
/return ${castreturn}

Sub Interrupt

/stopcast
/varset recasttimer 0
/delay 1
/return

Sub Event_CastFail(Line, FailText)

|/if (${FailText.Find[is out of]}) {
|    /varset castreturn CAST_OUTOFRANGE
|    /return
|}
/if (${FailText.Find[resisted the]}) {
    /varset castreturn CAST_RESISTED
    /return
}
/if (${FailText.Find[cannot be]}) {
    /varset castreturn CAST_IMMUNE
    /return
}
/return

Sub Event_Interrupt(Line)

/varset castreturn CAST_INTERRUPTED
/return

Sub Event_NotHold(Line)

/varset castreturn CAST_SUCCESS
/return

Sub Event_OutOfMana(Line)

/varset castreturn CAST_OOM
/return


Re: movement function, movement.ini, automove to zones/spell

Posted: Thu Jul 09, 2015 12:53 am
by toolisuber
|this is test macro
|
|ill put follow and makecamp in it too
| it has movement so you can
/
|/gui force goto zonename or /gui group 1 force goto zonename
|
|you can type things like /gui follow /gui make camp
| you can type things like group 2 follow or group 3 make camp
|
|it also contains getids for getting the id of the person you want to target
| so you don't have problems with /target tooli and /target toolis
|with toolis being closer than tooli, and it doesn't read the s on toolis
|
|you call getids with /call getids "${FollowTarget}" or /call getids "Toolis"
|
|getids returns an ID number, NOT a NAME
| after getids you would put /target ID ${Macro.Return}
|-to target the person that is the return
|
|test.mac (great starting template)
----------------------------------------

Code: Select all

#turbo 40

#chat tell
#chat group
#chat guild

#Event Follow "#1#tells the#*#, '#2#follow'"
#Event MakeCamp "#*#tells the#*#, '#2#make camp'"
#Event Movement "#1#guild, '#2#goto#3#'"

Sub Main

/declare dotwist int outer 1
/declare didinvis int outer 0

:testloop
/delay 2s
/if (${Me.Name.Find[${Me.Name}]}) /echo searching $.{Me.Name} for my own name ! FOUND !
/doevents
/goto :testloop

Sub Event_Follow(Line, FollowTarget, ChatText)

/if (!${Bool[${ChatText}]}) {
    /varset FollowTarget ${FollowTarget.Right[-2].Left[-2]}
    /call getids "${FollowTarget}"
    /if (${Spawn[id ${Macro.Return}].ID} && ${Spawn[id ${Macro.Return}].Distance} < 200) {
        /target ID ${Macro.Return}
        /delay 2
        /if (${Target.Type.Equal[PC]}) {
            /varset ammoving 1
            /keypress w
            /face fast  
            /stick loose 5
        }
    }
/return
}
/if (${ChatText.Find[group]}) {
    /varset ChatText ${ChatText.Right[-6]}
    /call findgroup
    /declare i int local 
    /for i 1 to ${Ini[toolismacro,Values,totalgroups]}
    /if (${Macro.Return} == ${ChatText.Arg[${i},,]}) {
        /varset FollowTarget ${FollowTarget.Right[-2].Left[-2]}
        /call getids "${FollowTarget}"
        /if (${Spawn[id ${Macro.Return}].ID} && ${Spawn[id ${Macro.Return}].Distance} < 200) {
            /target ID ${Macro.Return}
            /delay 2
            /if (${Target.Type.Equal[PC]}) {
                /varset ammoving 1
                /keypress w
                /face fast  
                /stick loose 5
            }
        }
    }
    /next i
    /return
}
/if (${ChatText.Find[healers]}) {
    /if (${Me.Class.HealerType}) {
        /varset FollowTarget ${FollowTarget.Right[-2].Left[-2]} 
        /call getids "${FollowTarget}"
        /if (${Spawn[id ${Macro.Return}].ID} && ${Spawn[id ${Macro.Return}].Distance} < 200) {
            /target ID ${Macro.Return}
            /delay 2
            /if (${Target.Type.Equal[PC]}) {
                /varset ammoving 1
                /keypress w
                /face fast  
                /stick loose 5
            }
        }
    }
    /return
}
/if (${ChatText.Find[${Me.Name}]}) {
    /declare i int local 
    /for i 1 to 12 
    /if (${ChatText.Arg[${i},].Equal[${Me.Name}]}) {
        /varset FollowTarget ${FollowTarget.Right[-2].Left[-2]}
        /call getids "${FollowTarget}"
        /if (${Spawn[id ${Macro.Return}].ID} && ${Spawn[id ${Macro.Return}].Distance} < 200) {
            /target ID ${Macro.Return}
            /delay 2
            /if (${Target.Type.Equal[PC]}) {
                /varset ammoving 1
                /keypress w
                /face fast  
                /stick loose 5
            }
        }
    }
    /next i
    /return
}
/return

Sub Event_MakeCamp(Line, ChatText)

/if (${ChatText.Find[group]}) {
    /varset ChatText ${ChatText.Right[-6]}
    /call findgroup
    /if (${Macro.Return.Equal[${ChatText}]}) {
        /stick off
        /varset ammoving 0
        /varset makecamploc ${Me.Y},${Me.X}
    }
    /return
}
/stick off
/varset ammoving 0
/varset makecamploc ${Me.Y},${Me.X}
/return

Sub getids(string name)

/declare SpawnID int local
/declare SpawnName string local
/declare i int local
/for i 1 to 4
/varset SpawnID ${NearestSpawn[${i}, pc ${name}].ID}
/varset SpawnName ${NearestSpawn[${i}, pc ${name}]}	
	/if (${NearestSpawn[${i}, pc ${name}].Name.Equal[${name}]}) /return ${SpawnID}
/next i
/return 0

Sub page(direction, duration)

/if (${direction.Find[down]}) {
    /keypress Page_Down hold 
    /delay ${duration}
    /keypress Page_Down
}
/if (${direction.Find[up]}) {
    /keypress Page_Up hold 
    /delay ${duration}
    /keypress Page_Up
}
/return

Sub returntocamp(face)

/if (${Bool[${makecamploc}]}) {
    /call gotoloc "${makecamploc}" 
    /if (${Macro.Return} == 1 && ${face.Equal[face]}) {
        /if (${Me.Heading.Degrees} > 179) /face fast heading ${Math.Calc[${Me.Heading.Degrees} - 180]}
        /if (${Me.Heading.Degrees} < 180) /face fast heading ${Math.Calc[${Me.Heading.Degrees} + 180]}
    }
}
/return

Sub gotoloc(loc, command)

/declare locfrom string local
/declare zoneshortname string local ${Zone.ShortName}
/if (!${Bool[${loc}]}) /varset locfrom leashloc
/if (${Bool[${loc}]}) /varset locfrom loc
/declare nextlocationy string local ${${locfrom}.Arg[1,,]}
/declare nextlocationx string local ${${locfrom}.Arg[2,,]}
/declare nextlocationyhigh string local ${Math.Calc[${${locfrom}.Arg[1,,]} + 5]}
/declare nextlocationylow string local ${Math.Calc[${${locfrom}.Arg[1,,]} - 5]}
/declare nextlocationxhigh string local ${Math.Calc[${${locfrom}.Arg[2,,]} + 5]}
/declare nextlocationxlow string local ${Math.Calc[${${locfrom}.Arg[2,,]} - 5]}
/if (${nextlocationy.NotEqual[NULL]} && ${Me.Y} <= ${nextlocationyhigh} && ${Me.Y} >= ${nextlocationylow} && ${Me.X} <= ${nextlocationxhigh} && ${Me.X} >= ${nextlocationxlow}) {
    /if (${command.NotEqual[empty]}) /call ${command}
    /return
}
:travel
/keypress forward hold
/if (${nextlocationy.NotEqual[NULL]} && ${Me.Y} <= ${nextlocationyhigh} && ${Me.Y} >= ${nextlocationylow} && ${Me.X} <= ${nextlocationxhigh} && ${Me.X} >= ${nextlocationxlow}) {
    /keypress forward
    /if (!${Me.Class.PureCaster}) /varset didstick 0
    /if (${command.NotEqual[empty]}) /call ${command}
    /return 1
}
/if (${nextlocationy.NotEqual[NULL]}) {
    /if (${Me.Y} <= ${nextlocationylow} || ${Me.X} <= ${nextlocationxlow} || ${Me.Y} >= ${nextlocationyhigh} || ${Me.X} >= ${nextlocationxhigh}) {
        /face nolook fast loc ${nextlocationy},${nextlocationx}
    }
}
/if (${zoneshortname.NotEqual[${Zone.ShortName}]}) {
    /if (!${InvSlot[17].Item.ID}) {
        /if (!${InvSlot[13].Item.ID} && !${Defined[amnaked]}) {
            /guildsay - i died during movement - 
            /declare amnaked int outer 100
            /keypress forward
            /varset makecamploc ${Me.Y},${Me.X}
            /return
        }
    }
}
/if (${zoneshortname.NotEqual[${Zone.ShortName}]}) {
    /if (${InvSlot[17].Item.ID} || ${amnaked} == 100) {
        /if (${InvSlot[13].Item.ID} && !${Defined[amnaked]} || !${InvSlot[13].Item.ID} && ${amnaked} == 100) {
            /echo ~~ ${Zone.Name} ~~
            /keypress forward
            /deletevar zoneoutloc
            /varset makecamploc ${Me.Y},${Me.X}
            /return
        }
    }
/return
}
/delay 1
/goto :travel
/return

Sub zonedoor

/keypress forward
:doorloop
/keypress u
/delay 2
/keypress u
/delay 1s
/keypress u
/delay 2
/call viewing
/if (${zoneshortname.Equal[${Zone.ShortName}]}) /goto :doorloop
/return

Sub door

/keypress u
/if (!${Me.Moving}) {
    /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc[${j}]door]}]}) {
        /doortarget ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc[${j}]door]}]}
        /face door
        /keypress u
    }
}
/return

Sub viewing

/declare variable string local page_down
:viewing
/if (${zoneshortname.Equal[${Zone.ShortName}]}) {
    /keypress ${variable} hold
    /delay 2
    /keypress ${variable}
    /keypress u
    /if (${zoneshortname.Equal[${Zone.ShortName}]}) {
        /keypress ${variable} hold
        /delay 4
        /keypress ${variable}
        /keypress u
        /if (${zoneshortname.Equal[${Zone.ShortName}]}) {
            /keypress ${variable} hold
            /delay 4
            /keypress ${variable}
            /keypress u
            /if (${variable.Equal[page_down]}) {
                /varset variable page_up
                /goto :viewing
            }
            /if (${variable.Equal[page_up]}) {
                /varset variable page_down
                /goto :viewing
            }
        }
    }
}
/return

Sub findgroup

/declare totalgroups int local
/declare i int local
/declare j int local
/varset totalgroups ${Ini[toolismacro,Values,totalgroups]}
/for i 1 to ${totalgroups}
/for j 1 to 6
/if (${Ini[toolismacro,Group${i},member${j}].Equal[${Me.Name}]}) {
    /return ${i}
}
/next j
/next i
/echo GROUP NOT FOUND ---- returning +1
/return ${Math.Calc[${totalgroups} + 1]}

Sub groupcheck

/declare i int local
/declare grpcheck int local 0
:checkgroup
/for i 0 to ${Group}
/if (${Group.Member[${i}].Distance} < 120 && ${Group.Member[${i}].ID}) /varset grpcheck ${Math.Calc[${grpcheck} + 1]}
/next i
/if (${grpcheck} == ${Group.GroupSize}) {
    /delay 1s
    /return 1
} else {
    /varset grpcheck 0
    /delay 2
    /goto :checkgroup
}
/return

Sub Event_Movement(Line, SenderPerson, targetperson, TargetZone)

/if (${Bool[${targetperson}]}) {
    /declare name int local
    /declare force int local
    /for force 1 to 10
    /if (${targetperson.Arg[${force},].Equal[force]}) {
        /declare forcemove bool local TRUE
    }
    /if (${targetperson.Arg[1,].Equal[force]} && !${Bool[${targetperson.Arg[2,]}]}) /goto :beginning
    /next force
    /if (${targetperson.Arg[1,].Equal[group]}) {
        /if (${targetperson.Arg[1,].Equal[group]}) {
            /declare groupnumber int local
            /call findgroup
            /varset targetperson ${targetperson.Right[-6]}
            /if (${targetperson.Find[force]}) /varset targetperson ${targetperson.Left[-6]}
            /for groupnumber 1 to ${Ini[toolismacro,Values,totalgroups]}
            /if (${targetperson.Arg[${groupnumber},,]} == ${Macro.Return}) {
                /goto :beginning
            } else {
                /next groupnumber 
                /return
            }
        }
    }
    /for name 1 to 10
    /if (${targetperson.Arg[${name},].Equal[${Me.Name}]}) /goto :beginning
    /next name
    /return
}
:beginning
/if (!${Bool[${Ini[movement,${TargetZone},zoneshortnames].Arg[1,,]}]}) {
    /echo Incorrect Destination
    /return
}
/declare zoneshortname     string local ${Zone.ShortName}
/declare savedtargetzone   string local ${TargetZone}
/declare startlocation     string local 0
/declare tempheading       float  local 0
/declare nextlocationx     string local NULL
/declare nextlocationy     string local NULL
/declare nextlocationxhigh string local
/declare nextlocationxlow  string local
/declare nextlocationyhigh string local
/declare nextlocationylow  string local
/declare i int local
/declare j int local
/declare junctions int local
/declare savedvariable int local 0
/if (${Me.Class.Name.NotEqual[Bard]}) /declare didinvis int local 0
/declare grpnumber int local 0

/echo - Starting -
/for junctions 1 to 12
/echo ${junctions} junctions
/for i 1 to 10
/echo ${i} i variable at i loop
:start
/if (${Bool[${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]}]}) {
    /echo ${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]}
    /varset TargetZone ${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]}
    /echo changed targetzone to ${TargetZone}
    /echo ${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]} targetzones junctions
    /echo ${i} i variable in bool junctions
    /varset i 1
}
/if (!${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]} && ${TargetZone.NotEqual[${savedtargetzone}]}) {
    /varset TargetZone ${savedtargetzone}
    /echo changed targetzone to savedtargetzone
    /echo ${junctions} junctions
    /echo ${i} i variable in not bool junctions
    /echo ${j} j 
    /varset i 1  
}
/if (${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]} && ${TargetZone.NotEqual[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]}) {
    /varset TargetZone ${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}
    /echo changed targetzone to savedtargetzone junction arg junctions
    /echo ${junctions}
    /echo ${i} i variable in bool junctions arg junctions
    /echo ${j} j
    /varset i 1
}
/if (${savedvariable} != 1) {
    /if (${Bool[${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,].Equal[${Zone.ShortName}]}]} && ${startlocation.Equal[0]}) {
        /echo found starting zone
        /varset startlocation ${TargetZone},${i},
        /echo ${startlocation}
        /echo ${i} i variable
        /echo ${j} j variable
    }
    /if (${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,].NotEqual[${Zone.ShortName}]} && ${startlocation.NotEqual[0]}) {
        /echo found end of zones
        /varset junctions 1
        /varset savedvariable 1
        /varset TargetZone ${startlocation.Arg[1,,]}
        /varset i ${startlocation.Arg[2,,]}
    }
}
/if (${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[finish]} && ${zoneshortname.Equal[${Zone.ShortName}]}) {
    /keypress w
    /varset didinvis 0
    /echo i have reached my destination
    /guildsay im at target destination
    /varset makecamploc ${Me.Y},${Me.X}
    /return
}
/if (${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,].Equal[${Zone.ShortName}]}) {
    /if (!${forcemove}) {
        /if (${Me.Class.Name.Equal[Bard]} && !${didinvis}) {
            /call groupcheck
        }
        /if (${Me.Class.Name.NotEqual[Bard]} && !${didinvis}) {
            /call findgroup
            /varset grpnumber ${Macro.Return}
            :waitforinvis
            /doevents Toggle
            /if (${Macro.Return.Equal[abort]}) {
                /varset makecamploc ${Me.Y},${Me.X}
                /return
            }
            /if (${Ini[toolismacro,Movement,group${grpnumber}ready].Equal[ready]}) {
                /varset didinvis 1
            }
            /if (${Ini[toolismacro,Movement,group${grpnumber}ready].Equal[empty]}) {
                /delay 2
                /echo waiting for invis
                /goto :waitforinvis
            }
        }
    }
    /if (${Me.Class.Name.Equal[Bard]} && !${didinvis}) {
        /squelch /twist off
        /varset didinvis 1
        /varset dotwist 1
        /if (!${Me.Gem[${travelsong}]} && !${Cursor.ID}) {
                /guildsay sec memming travel song
                /memspell ${travelsonggem} ${travelsong}
                /delay 2s
        }
        /squelch /twist ${travelsonggem}
        /delay 2s
        /if (!${Me.Casting.ID}) {
            /squelch /twist ${speedsonggem}
            /delay 2s
            /if (${Me.Casting.ID}) /delay 1s
            /if (!${Me.Gem[${invissong}]} && !${Cursor.ID}) {
                /guildsay sec memming invis song
                /memspell ${travelsonggem} ${invissong}
                /delay 2s
            }
            /squelch /twist ${travelsonggem}
            /delay 3s 
        }
        /if (${Me.Casting.ID}) /delay 2s
        /call findgroup
        /varset grpnumber ${Macro.Return}
        /ini "toolismacro" "Movement" "group${grpnumber}ready" "ready"
        /delay 6
        /ini "toolismacro" "Movement" "group${grpnumber}ready" "empty"
    }
    /echo ${j} j (before for loop)
    /for j 1 to 30
    /echo ${j} j
    /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}]}]} && ${savedvariable} != 1) {
        /varset savedvariable ${j}
        /varset nextlocationy ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}].Arg[1,,]}
        /varset nextlocationx ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}].Arg[2,,]}
        /varset nextlocationyhigh ${Math.Calc[${nextlocationy} + 75]}
        /varset nextlocationylow ${Math.Calc[${nextlocationy} - 75]}
        /varset nextlocationxhigh ${Math.Calc[${nextlocationx} + 75]}
        /varset nextlocationxlow ${Math.Calc[${nextlocationx} - 75]}
        /if (${Me.Y} <= ${nextlocationyhigh} && ${Me.Y} >= ${nextlocationylow} && ${Me.X} <= ${nextlocationxhigh} && ${Me.X} >= ${nextlocationxlow}) {
            /echo found correct loc
            /varset savedvariable 1
            /goto :end
        }
        /varset nextlocationyhigh ${Math.Calc[${nextlocationy} + 175]}
        /varset nextlocationylow ${Math.Calc[${nextlocationy} - 175]}
        /varset nextlocationxhigh ${Math.Calc[${nextlocationx} + 175]}
        /varset nextlocationxlow ${Math.Calc[${nextlocationx} - 175]}
        /if (${Me.Y} <= ${nextlocationyhigh} && ${Me.Y} >= ${nextlocationylow} && ${Me.X} <= ${nextlocationxhigh} && ${Me.X} >= ${nextlocationxlow}) {
            /echo found nearest loc
            /varset savedvariable 1
            /goto :nearestlocloop
        }
        /echo this didnt work
        /varset nextlocationy NULL
        /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[1,,]}]}) {
            /varset savedvariable ${Math.Calc[${j} + 1]}
            /varset nextlocationy NULL          
            /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[1,,]}]}) {
                /echo next j
                /next j
            }
            /if (${Bool[${Ini[movement,${TargetZone},zoneshortnames].Arg[${Math.Calc[${i} + 1]},,]}]}) {
                /varset j 0
                /next i
            }
            /if (${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]}) {
                /varset j 0
                /echo next junctions instead of j
                /varset TargetZone ${savedtargetzone}
                /next junctions
            }
        }
        /echo this fired
        /varset savedvariable ${Math.Calc[${j} + 1]}
        /delay 2
        /next i
    }
        /if (!${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]} && ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[junction]} || ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[finish]}) {
            /keypress w
            /varset didinvis 0
            /echo i have reached my destination
            /guildsay im at target destination
            /varset makecamploc ${Me.Y},${Me.X}
            /return
        } 
    :end
    /if (${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[junction]}) {
        /keypress forward
        /varset j 1
        /varset TargetZone ${savedtargetzone}
        /if (!${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]}) {
            /varset TargetZone ${startlocation.Arg[1,,]}
            /varset i ${startlocation.Arg[2,,]}
        } 
        /if (${Bool[${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]}]}) {
            /echo changing junctions +1 from hitting a junction
            /next junctions
        }
    }
    /if (${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[zonedoor]} && ${nextlocationy.NotEqual[NULL]}) {
        /keypress forward
        /varset j 1
        :doorloop
        /keypress u
        /delay 2
        /keypress u
        /delay 1s
        /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}zonedoor]}]}) {
            /face nolook loc ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}zonedoor]}
            /keypress u
        }
        /call viewing
        /if (${zoneshortname.Equal[${Zone.ShortName}]}) /goto :doorloop
        /varset nextlocationy NULL
    }
    /if (${zoneshortname.Equal[${Zone.ShortName}]}) {
        /varset tempheading ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,]})
        /if (${Math.Calc[(360 - ${tempheading}) + 45]} > 360 && ${Me.Heading.Degrees} <= ${Math.Calc[(360 - ${tempheading}) - 45]} || ${Math.Calc[(360 - ${tempheading}) + 45]} > 360 && ${Me.Heading.Degrees} <= ${Math.Calc[45 - (360 - ${tempheading})]}) {
            /goto :headingdone
        }
        /if (${Math.Calc[(360 - ${tempheading}) - 45]} < 0 && ${Me.Heading.Degrees} <= ${Math.Calc[(360 - ${tempheading}) + 45]} || ${Math.Calc[(360 - ${tempheading}) - 45]} < 0 && ${Me.Heading.Degrees} <= ${Math.Calc[45 - (360 - ${tempheading})]}) { 
            /goto :headingdone
        }
        /if (${Math.Calc[${Me.Heading.Degrees}]} >= ${Math.Calc[360 - ${tempheading}]} && ${Math.Calc[${Me.Heading.Degrees}]} <= ${Math.Calc[(360 - ${tempheading}) + 45]} || ${Math.Calc[${Me.Heading.Degrees}]} >= ${Math.Calc[(360 - ${tempheading}) - 45]} && ${Math.Calc[${Me.Heading.Degrees}]} <= ${Math.Calc[360 - ${tempheading}]}) {
            /goto :headingdone
        }
            /if (${tempheading} <= 180) {
            /echo Tempheading < 180
                /if (${Me.Heading.Degrees} >= ${Math.Calc[(360 - ${tempheading}) - 180]} && ${Me.Heading.Degrees} <= ${Math.Calc[360 - ${tempheading}]}) {
                    /varset tempheading ${Math.Calc[${tempheading} + 45]}
                    /goto :heading
                } else {
                    /if (${tempheading} <= 45) {
                        /varset tempheading ${Math.Calc[315 + ${tempheading}]}
                        /goto :heading
                    }
                    /varset tempheading ${Math.Calc[${tempheading} - 45]}
                    /goto :heading
                }
            }
            /if (${tempheading} > 180) {
            /echo Tempheading > 180
                /if (${Me.Heading.Degrees} <= ${Math.Calc[(360 - ${tempheading}) + 180]} && ${Me.Heading.Degrees} >= ${Math.Calc[360 - ${tempheading}]}) {
                    /varset tempheading ${Math.Calc[${tempheading} - 45]}
                    /goto :heading
                } else {
                    /if (${tempheading} <= 315) {
                        /varset tempheading ${Math.Calc[${tempheading} + 45]}
                        /goto :heading
                    }
                    /varset tempheading ${Math.Calc[(360 - ${tempheading}) - 45]}
                    /goto :heading
                }
            }
            :heading
            /face heading ${tempheading}
        :headingdone
        /face fast heading ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,]}
    }
    /varset nextlocationy NULL
    /varset nextlocationx NULL
    /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}]}]}) {
        /varset nextlocationy ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}].Arg[1,,]}
        /varset nextlocationx ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}].Arg[2,,]}
    }
    :nearestlocloop
    /doevents Toggle
    /if (${Macro.Return.Equal[abort]}) {
        /varset makecamploc ${Me.Y},${Me.X}
        /return
    }
    /varset nextlocationyhigh ${Math.Calc[${nextlocationy} + 5]}
    /varset nextlocationylow ${Math.Calc[${nextlocationy} - 5]}
    /varset nextlocationxhigh ${Math.Calc[${nextlocationx} + 5]}
    /varset nextlocationxlow ${Math.Calc[${nextlocationx} - 5]}
    :movementloop
    /keypress forward hold
    /if (${nextlocationy.NotEqual[NULL]} && ${Me.Y} <= ${nextlocationyhigh} && ${Me.Y} >= ${nextlocationylow} && ${Me.X} <= ${nextlocationxhigh} && ${Me.X} >= ${nextlocationxlow}) {
        /keypress forward
        /delay 2
        /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}command]}]}) /call ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}command]}
        /next j
    }
    /if (${nextlocationy.NotEqual[NULL]}) {
        /if (${Me.Y} <= ${nextlocationylow} || ${Me.X} <= ${nextlocationxlow} || ${Me.Y} >= ${nextlocationyhigh} || ${Me.X} >= ${nextlocationxhigh}) {
            /face nolook fast loc ${nextlocationy},${nextlocationx}
        }
    }
    /if (${zoneshortname.NotEqual[${Zone.ShortName}]}) {
        /if (!${InvSlot[17].Item.ID}) {
            /if (!${InvSlot[13].Item.ID} && !${Defined[amnaked]}) {
                /guildsay - i died during movement - 
                /declare amnaked int outer 100
                /doevents flush Movement
                /return
            }
        }
        /echo -- ${Zone.Name} --
        /varset nextlocationy NULL
        /keypress forward
        /varset zoneshortname ${Zone.ShortName}
        /varset didinvis 0
        /varset j 1
        /varset i 0
        /delay 2
        /next i
    }
    /delay 1
    /goto :movementloop
}
/delay 2
/if (${Bool[${Ini[movement,${TargetZone},zoneshortnames].Arg[${Math.Calc[${i} + 1]},,]}]}) /next i
/varset i 0
/next junctions
/varset junctions 1
/varset savedvariable 1
/varset TargetZone ${startlocation.Arg[1,,]}
/varset i ${startlocation.Arg[2,,]}
/echo setting targetzone and zone im in
/next junctions
/echo returning
/return

Re: movement function, movement.ini, automove to zones/spell

Posted: Thu Jul 09, 2015 1:12 am
by toolisuber
|this is my broken part of movement function
|
|edit:YOU DO NOT WANT TO ADD THIS TO UR MACROS RLLY
|edit:ITS NOT FULLY FUNCTIONAL
|it does not fully detect walls unless you add another variable
|I do not know geometry or trig and I think this is trig it is my first attempt
|at finding the correct location and points of a triangle to detect walls
|without vision, it did not work at all 4 points around the triangle, only 3...
|and im still angry and that is 2 months ago
|
|you basically need another variable for target location or something and uh
|im still really, really angry
|
|edit:this is where I found out what absolute zero is and means and I had
|edit:it done the hard way
|edit:my macros usually use west side of lobby, this works for detecting
|edit:all those walls and going to the correct loc kinda
|
|edit:ok basically it determines messed up geometry and determines there
|edit:is walls to avoid and goes to the correct locations, without vision
|edit: it just needs 1 more simple variable for one of the locations,because
|edit:it has problems determining walls are in the way from the pinnacle
|edit:(or top) of the triangle... all it needs is like asimple variable grrrr
|
|edit2:ok so basically the fix is to correct the distance from the 2 areas that
|edit2:are basically the base of the triangle, and read that distance and do
|edit2:things with the distance (requires another variable) Ijustremembered
|edit2: so basically a comparison and read of point a and point c if point b
|edit2: is top of the triangle... so that all points around b read correct loc to
|edit2:go to, to avoid walls. a great starter project im still very angry now
|edit2: this is math's fault
|
|edit:please don't post a fix to this if I am wrong I think that is impossible
|edit:but I want to figure it out myself and this is a neat starter project for
|edit:someone if they are interested

Code: Select all

    /echo ${j} j (before for loop)
    /for j 1 to 30
    /echo ${j} j
    /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}]}]} && ${savedvariable} != 1) {
        /varset savedvariable ${j}
        /if (${Defined[savedloc]}) /deletevar savedloc
        /echo ${j} j in right before nearestloc ${savedvariable} savedvariable
        :nearestloc
        /if (${Bool[${savedloc.Arg[3,,]}]}) {
            /if (${savedvariable} >= ${Math.Calc[${savedloc.Arg[3,,]} + 3]}) /goto :finishloc
        }
        /varset nextlocationy ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[1,,]}
        /varset nextlocationx ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[2,,]}
        /varset nextlocationyhigh ${Math.Calc[${nextlocationy} + 145]}
        /varset nextlocationylow ${Math.Calc[${nextlocationy} - 145]}
        /varset nextlocationxhigh ${Math.Calc[${nextlocationx} + 145]}
        /varset nextlocationxlow ${Math.Calc[${nextlocationx} - 145]}
        /if (${Me.Y} <= ${nextlocationyhigh} && ${Me.Y} >= ${nextlocationylow} && ${Me.X} <= ${nextlocationxhigh} && ${Me.X} >= ${nextlocationxlow}) {
            /if (${savedvariable} == ${j}) {
                /echo savedvariable == j / savedloc not defined -- searching nearest loc
                /declare savedloc string local ${nextlocationy},${nextlocationx},${savedvariable}
                /varset savedvariable ${Math.Calc[${savedvariable} + 1]}
                /goto :nearestloc                   
            }
            /if (${savedvariable} != ${j}) {
                /if (${Math.Abs[${Math.Calc[${nextlocationy} - ${Me.Y}]}]} <= ${Math.Abs[${Math.Calc[${savedloc.Arg[1,,]} - ${Me.Y}]}]} && ${Math.Abs[${Math.Calc[${nextlocationx} - ${Me.X}]}]} <= ${Math.Abs[${Math.Calc[${savedloc.Arg[2,,]} - ${Me.X}]}]}) {
                    /echo found a closer location searching for more
                    /varset j ${savedvariable}
                    /varset savedvariable ${Math.Calc[${savedvariable} + 1]}
                    /varset savedloc ${nextlocationy},${nextlocationx},${savedloc.Arg[3,,]}
                    /echo ${j} j ${savedvariable} savedvariable ${savedloc} savedloc
                    /goto :nearestloc
                }
                /if (${savedvariable} < ${Math.Calc[${savedloc.Arg[3,,]} + 2]}) {
                    /varset savedvariable ${Math.Calc[${savedvariable} + 1]}
                    /echo ${savedvariable} savedvariable
                    /echo checking for 3rd loc
                    /goto :nearestloc
                }
                :finishloc
                /varset savedvariable ${savedloc.Arg[3,,]}
                /echo ${savedvariable} savedvariable        
                /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[1,,]}]}) {
                    /varset savedvariable ${savedloc.Arg[3,,]}
                    /varset nextlocationy ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[1,,]}
                    /varset nextlocationx ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[2,,]}
                    /varset savedvariable ${Math.Calc[${savedvariable} + 2]}
                    /varset savedloc ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}]}
                    /echo ---------------------------|| savedvariable firstlocfound + 2
                    /echo -------j ${j}  ---------------${savedvariable} savedvariable   

                    /echo this worked - s${savedvariable} ${savedloc} -- first area
/echo if s3 < s1
                    /echo ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[1,,]} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[2,,]} - ${Me.X}]}]}]}]} < ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationy} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationx} - ${Me.X}]}]}]}]}
                    /if (${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[1,,]} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[2,,]} - ${Me.X}]}]}]}]} < ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationy} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationx} - ${Me.X}]}]}]}]}) {
                        /varset savedvariable ${Math.Calc[(${savedvariable} + 10)- 11]}
                        /varset savedloc ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}]} 
/echo s3 < s1                 
                        /echo ${savedvariable} savedvariable -- ${j} j
/echo if s1 < s2
                        /echo ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationy} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationx} - ${Me.X}]}]}]}]} < ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[1,,]} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[2,,]} - ${Me.X}]}]}]}]}
                        /if (${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationy} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationx} - ${Me.X}]}]}]}]} < ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[1,,]} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[2,,]} - ${Me.X}]}]}]}]}) {
/echo s1 < s2
                            /varset savedvariable ${Math.Calc[${savedvariable} + 1]}
                            /varset nextlocationy ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[1,,]}
                            /varset nextlocationx ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[2,,]}
/echo if s2 > s3
                            /echo ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[1,,]} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[2,,]} - ${Me.X}]}]}]}]} > ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationy} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationx} - ${Me.X}]}]}]}]}
                            /if (${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[1,,]} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[2,,]} - ${Me.X}]}]}]}]} > ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationy} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationx} - ${Me.X}]}]}]}]}) {
                                /echo s2 > s3
                                /varset j ${Math.Calc[(${j} + 10)- 11]}
                                /varset j ${Math.Calc[(${j} + 10)- 11]}
                                /varset savedvariable 1
                                /echo possible object in the way, really think i found a better route
                                /deletevar savedloc
                                /goto :end
                            }
                        }
/echo if s1 > s2
                        /echo ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationy} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationx} - ${Me.X}]}]}]}]} > ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[1,,]} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[2,,]} - ${Me.X}]}]}]}]}
                        /if (${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationy} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationx} - ${Me.X}]}]}]}]} > ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[1,,]} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[2,,]} - ${Me.X}]}]}]}]}) {
/echo s1 > s2
                            /varset savedvariable ${Math.Calc[${savedvariable} + 1]}
                            /varset nextlocationy ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[1,,]}
                            /varset nextlocationx ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[2,,]}
/echo if s2 < s3
                            /echo ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[1,,]} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[2,,]} - ${Me.X}]}]}]}]} < ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationy} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationx} - ${Me.X}]}]}]}]}
                            /if (${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[1,,]} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[2,,]} - ${Me.X}]}]}]}]} < ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationy} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationx} - ${Me.X}]}]}]}]}) {
                                /echo s2 < s3
                                |/varset j ${Math.Calc[(${j} + 10)- 11]}
                                /varset savedvariable 1
                                /echo possible object in the way, really think i found a better route
                                /deletevar savedloc
                                /goto :end
                            }
                        }
                        /echo ${savedvariable} savedvariable -- ${j} j
                        /echo aaaa
                        /echo reverting to nearest loc !!!!
                        /varset savedvariable 1
                        /deletevar savedloc
                        /goto :end
                    }
                }
                    /echo this worked - s${savedvariable} ${savedloc} -- second area
/echo if s3 > s1 2ndarea
                    /echo ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[1,,]} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[2,,]} - ${Me.X}]}]}]}]} > ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationy} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationx} - ${Me.X}]}]}]}]}
                    /if (${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[1,,]} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[2,,]} - ${Me.X}]}]}]}]} > ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationy} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationx} - ${Me.X}]}]}]}]}) {
                        /varset savedvariable ${Math.Calc[(${savedvariable} + 10)- 11]}
                        /varset savedloc ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}]} 
/echo s3 > s1 2ndarea                 
                        /echo ${savedvariable} savedvariable -- ${j} j
/echo if s1 > s2 2ndarea
                        /echo ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationy} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationx} - ${Me.X}]}]}]}]} > ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[1,,]} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[2,,]} - ${Me.X}]}]}]}]}
                        /if (${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationy} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationx} - ${Me.X}]}]}]}]} > ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[1,,]} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[2,,]} - ${Me.X}]}]}]}]}) {
/echo s1 > s2 2ndarea
                            /varset savedvariable ${Math.Calc[${savedvariable} + 1]}
                            /varset nextlocationy ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[1,,]}
                            /varset nextlocationx ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[2,,]}
/echo if s2 < s3 2ndarea
                            /echo ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[1,,]} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[2,,]} - ${Me.X}]}]}]}]} < ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationy} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationx} - ${Me.X}]}]}]}]}
                            /if (${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[1,,]} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${savedloc.Arg[2,,]} - ${Me.X}]}]}]}]} < ${Math.Calc[${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationy} - ${Me.Y}]}]}]} + ${Math.Calc[${Math.Abs[${Math.Calc[${nextlocationx} - ${Me.X}]}]}]}]}) {
                                /echo s2 > s3
                                /varset j ${Math.Calc[(${j} + 10)- 11]}
                                /varset savedvariable 1
                                /echo possible object in the way, really think i found a better route
                                /deletevar savedloc
                                /goto :end
                            }
                        }
                        /echo ${savedvariable} savedvariable -- ${j} j
                        /echo aaaa
                        /echo reverting to nearest loc !!!!
                        /varset savedvariable 1
                        /deletevar savedloc
                        /goto :end
                    }
            }
            /if (${savedvariable} != ${j}) {
                /echo ending loc loop
                /varset savedvariable 1
                /deletevar savedloc
                /goto :end
            }
        }          
        /echo this didnt work
        /varset nextlocationy NULL
        /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[1,,]}]}) {
            /varset savedvariable ${Math.Calc[${j} + 1]}
            /varset nextlocationy NULL          
            /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[1,,]}]}) {
                /echo next j
                /next j
            }
            /if (${Bool[${Ini[movement,${TargetZone},zoneshortnames].Arg[${Math.Calc[${i} + 1]},,]}]}) {
                /varset j 0
                /next i
            }
            /if (${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]}) {
                /varset j 0
                /echo next junctions instead of j
                /varset TargetZone ${savedtargetzone}
                /next junctions
            }
        }
        /echo this fired
        /varset savedvariable ${Math.Calc[${j} + 1]}
        /delay 2
        /next i
    }
        /if (!${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]} && ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[junction]} || ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[finish]}) {
            /keypress w
            /varset didinvis 0
            /echo i have reached my destination
            /guildsay im at target destination
            /if (${Defined[stuckdirection]}) /deletevar stuckdirection
            /varset makecamploc ${Me.Y},${Me.X}
            /return
        } 
    :end

Re: movement function, movement.ini, automove to zones/spell

Posted: Wed Aug 05, 2015 7:11 pm
by toolisuber
reserved!

Re: movement function, movement.ini, automove to zones/spell

Posted: Wed Aug 05, 2015 8:27 pm
by toolisuber
reserved2!

Re: movement function, movement.ini, automove to zones/spell

Posted: Sat Aug 22, 2015 2:14 am
by toolisaccount
reserved1
thinking this will be a diff version of Sub Event_Movement


sorry rl is distracting and there is like a very heavy oil fume leak
should be fairly good now

ok well server appears to be fixed, so crashing wont prevent testing
feel so bad im late... i am obligated to finish this in a timely manner and it is not working out...worse i am behind c++ and should be doing that
complete and utter lack of motivation, finishing is so easy too like 1hr

this is in the process of being finished very soon
eventually it will work so that characters can move together invis correctly
its not perfect and its definately not working
as of now they creep together very awkwardly and uh
they glitch and u gotta move them manually, was trying to figure it out with 2 chars
you can also use /gui toggle abort

it may end up involving the heading,
it may end up involving the distances,
it may end up involving locs / coordinate planes
it may end up involving all of this

this prolly still doesn't work
right now working with
distance to player, distance to loc, false distance to loc, and math var
trying not to get toooo far into this
the mathvar calculation with distance is reading 2 diff locs at times
not wanting to do an ini entry or whatever, no chat spam
not wanting to use a heading check

this auto shuts down at 75 distance and makes an ini file called movementerror.ini
the movementerror.ini is for my debugging of this

this requires the other 7 or so movement function things in the other post too
only one of them is updated and in this post

this is having problems in great divide at some hill or something, and now in
pok some times
im not finished yet

due to complete misuse of the string top level object, it has been removed
no such float member find

im not sure what goes on in c++/cpu/ram as for things like anything
or more specifically things like ${Math.Abs[]}
or the differences in using say a ${Defined[]} and a ${Bool[]}
or the differences between straight code and calling a subroutine


im thinking defined somehow clogs my computer in comparison to bool
there is some extra math.abs in this one
-------------------------------------------------------------------------------------
what im working on here is distances between locs and characters,
this will let the characters move together invis properly

the heading check is redundant and unused basically, there for reference
im thinking the heading check in upper portion of macro is slightly incorrect
that portion is for /facing fast if ur within 45 degrees of ur next heading
that kind of simulated userlike move/mouselook and makes things faster

the second part of the distance checking for ${Me.Y} / ${Me.X}
could be more neatly written with an additional variable ${mathvar3}
reusing ${mathvar2} and using ${mathvar3} takes like 20 paragraphs
out of the macro

as for moving together invis
you could do this maybey easily with stick, or prolly simple distance checks

the uh way the uh locations distances are checked are wrong, this would
not be functional for advanced 3d movement
this is simple and should (untested) check the locations distances
e.g. targetloc 340 , 200... char loc -140, 200 ... the the 140 reads as 140
the 140 should read as -140....

this is simple shortcut lazy way of doing this ... the code determines
if 140 < 340 or if 140 is > 340
in this same example
we could take a loc of -1000 and a target loc of 340
the -1000 is FAR BELOW 340... but reads as 1000 > 340
ill prolly use this as an example in the future

also tried to do this without using another variable
-------------------------------------------------------------------------------------

Code: Select all

Sub groupcheck

/declare i int local
/declare grpcheck int local 0
:checkgroup
/for i 0 to ${Group}
/if (${NearestSpawn[id ${Group.Member[${i}].ID}].Name.Find[${Group.Member[${i}].Name}]} && ${Group.Member[${i}].Distance} < 120) /varset grpcheck ${Math.Calc[${grpcheck} + 1]}
/next i
/if (${grpcheck} == ${Group.GroupSize}) {
    /delay 2
    /return 1
} else {
    /varset grpcheck 0
    /delay 2
    /goto :checkgroup
}
/return

Sub Event_Movement(Line, SenderPerson, targetperson, TargetZone)

/if (${Bool[${targetperson}]}) {
    /declare name int local
    /declare force int local
    /for force 1 to 10
    /if (${targetperson.Arg[${force},].Equal[force]}) {
        /declare forcemove bool local TRUE
    }
    /if (${targetperson.Arg[1,].Equal[force]} && !${Bool[${targetperson.Arg[2,]}]}) /goto :beginning
    /next force
    /if (${targetperson.Arg[1,].Equal[group]}) {
        /if (${targetperson.Arg[1,].Equal[group]}) {
            /declare groupnumber int local
            /call findgroup
            /varset targetperson ${targetperson.Right[-6]}
            /if (${targetperson.Find[force]}) /varset targetperson ${targetperson.Left[-6]}
            /for groupnumber 1 to ${Ini[toolismacro,Values,totalgroups]}
            /if (${targetperson.Arg[${groupnumber},,]} == ${Macro.Return}) {
                /goto :beginning
            } else {
                /next groupnumber 
                /return
            }
        }
    }
    /for name 1 to 10
    /if (${targetperson.Arg[${name},].Equal[${Me.Name}]}) /goto :beginning
    /next name
    /return
}
:beginning
/if (!${Bool[${Ini[movement,${TargetZone},zoneshortnames].Arg[1,,]}]}) {
    /echo Incorrect Destination
    /return
}
/declare zoneshortname     string local ${Zone.ShortName}
/declare savedtargetzone   string local ${TargetZone}
/declare startlocation     string local 0
/declare tempheading       int  local 0
/declare nextlocationx     string local NULL
/declare nextlocationy     string local NULL
/declare nextlocationxhigh string local
/declare nextlocationxlow  string local
/declare nextlocationyhigh string local
/declare nextlocationylow  string local
/declare i int local
/declare j int local
/declare junctions int local
/declare savedvariable int local 0
/if (${Me.Class.Name.NotEqual[Bard]}) /declare didinvis int local 0
/declare invisleader int local 0
/declare tempdistance int local 0
/declare grpnumber int local 0
/declare mathvar int local 0
/declare mathvar2 int local 0

/echo - Starting -
/for junctions 1 to 12
/echo ${junctions} junctions
/for i 1 to 10
/echo ${i} i variable at i loop
:start
/if (${Bool[${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]}]}) {
    /echo ${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]}
    /varset TargetZone ${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]}
    /echo changed targetzone to ${TargetZone}
    /echo ${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]} targetzones junctions
    /echo ${i} i variable in bool junctions
    /varset i 1
}
/if (!${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]} && ${TargetZone.NotEqual[${savedtargetzone}]}) {
    /varset TargetZone ${savedtargetzone}
    /echo changed targetzone to savedtargetzone
    /echo ${junctions} junctions
    /echo ${i} i variable in not bool junctions
    /echo ${j} j 
    /varset i 1  
}
/if (${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]} && ${TargetZone.NotEqual[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]}) {
    /varset TargetZone ${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}
    /echo changed targetzone to savedtargetzone junction arg junctions
    /echo ${junctions}
    /echo ${i} i variable in bool junctions arg junctions
    /echo ${j} j
    /varset i 1
}
/if (${savedvariable} != 1) {
    /if (${Bool[${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,].Equal[${Zone.ShortName}]}]} && ${startlocation.Equal[0]}) {
        /echo found starting zone
        /varset startlocation ${TargetZone},${i},
        /echo ${startlocation}
        /echo ${i} i variable
        /echo ${j} j variable
    }
    /if (${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,].NotEqual[${Zone.ShortName}]} && ${startlocation.NotEqual[0]}) {
        /echo found end of zones
        /varset junctions 1
        /varset savedvariable 1
        /varset TargetZone ${startlocation.Arg[1,,]}
        /varset i ${startlocation.Arg[2,,]}
    }
}
/if (${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[finish]} && ${zoneshortname.Equal[${Zone.ShortName}]}) {
    /keypress w
    /varset didinvis 0
    /echo i have reached my destination
    /guildsay im at target destination
    /varset makecamploc ${Me.Y},${Me.X}
    /return
}
/if (${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,].Equal[${Zone.ShortName}]}) {
    /if (!${forcemove}) {
        /if (${invisleader} == 0) {
            /call groupcheck
            /for j 0 to ${Group}
            /if (${Group.Member[${j}].Class.Name.Equal[bard]}) /varset invisleader ${Group.Member[${j}].ID}
            /if (${invisleader} == 0) /next j
            /echo invisleader id ${invisleader}  j ${j}
            /varset j 0
        }
|        /if (${Me.Class.Name.Equal[Bard]} && !${didinvis}) {
|            /call groupcheck
|        }
        /if (${Me.Class.Name.NotEqual[Bard]} && !${didinvis}) {
            /call findgroup
            /varset grpnumber ${Macro.Return}
            :waitforinvis
            /doevents Toggle
            /if (${Macro.Return.Equal[abort]}) {
                /varset makecamploc ${Me.Y},${Me.X}
                /return
            }
            /if (${Ini[toolismacro,Movement,group${grpnumber}ready].Equal[ready]}) {
                /varset didinvis 1
                /delay 2
            }
            /if (${Ini[toolismacro,Movement,group${grpnumber}ready].Equal[empty]}) {
                /delay 2
                /echo waiting for invis
                /goto :waitforinvis
            }
        }
    }
    /if (${Me.Class.Name.Equal[Bard]} && !${didinvis}) {
        |/squelch /twist off
        |/varset didinvis 1
        |/varset dotwist 1
        |/if (!${Me.Gem[${travelsong}]} && !${Cursor.ID}) {
        |        /guildsay sec memming travel song
        |        /memspell ${travelsonggem} ${travelsong}
        |        /delay 16s ${Me.SpellReady[${travelsong}]}
        |}
        |/squelch /twist ${travelsonggem}
        |/delay 2s
        |/if (!${Me.Casting.ID}) {
        |    /squelch /twist off
        |    /delay 2
        |    /squelch /twist ${speedsonggem}
        |    /delay 2s
        |    /if (${Me.Casting.ID}) /delay 2s
        |    /squelch /twist off
        |    /if (!${Me.Gem[${invissong}]} && !${Cursor.ID}) {
        |        /guildsay sec memming invis song
        |        /memspell ${travelsonggem} ${invissong}
        |        /delay 16s ${Me.SpellReady[${invissong}]}
        |    }
        |    /squelch /twist ${travelsonggem}
        |    /delay 3s 
        |}
        |/if (${Me.Casting.ID}) /delay 2s
        /call findgroup
        /varset grpnumber ${Macro.Return}
        /ini "toolismacro" "Movement" "group${grpnumber}ready" "ready"
        /delay 2
        /timed 35 /ini "toolismacro" "Movement" "group${grpnumber}ready" "empty"
    }
    /echo ${j} j (before for loop)
    /for j 1 to 30
    /echo ${j} j
    /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}]}]} && ${savedvariable} != 1) {
        /varset savedvariable ${j}
        /varset nextlocationy ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}].Arg[1,,]}
        /varset nextlocationx ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}].Arg[2,,]}
        /varset nextlocationyhigh ${Math.Calc[${nextlocationy} + 75]}
        /varset nextlocationylow ${Math.Calc[${nextlocationy} - 75]}
        /varset nextlocationxhigh ${Math.Calc[${nextlocationx} + 75]}
        /varset nextlocationxlow ${Math.Calc[${nextlocationx} - 75]}
        /if (${Me.Y} <= ${nextlocationyhigh} && ${Me.Y} >= ${nextlocationylow} && ${Me.X} <= ${nextlocationxhigh} && ${Me.X} >= ${nextlocationxlow}) {
            /echo found correct loc
            /varset savedvariable 1
            /goto :end
        }
        /varset nextlocationyhigh ${Math.Calc[${nextlocationy} + 175]}
        /varset nextlocationylow ${Math.Calc[${nextlocationy} - 175]}
        /varset nextlocationxhigh ${Math.Calc[${nextlocationx} + 175]}
        /varset nextlocationxlow ${Math.Calc[${nextlocationx} - 175]}
        /if (${Me.Y} <= ${nextlocationyhigh} && ${Me.Y} >= ${nextlocationylow} && ${Me.X} <= ${nextlocationxhigh} && ${Me.X} >= ${nextlocationxlow}) {
            /echo found nearest loc
            /varset savedvariable 1
            /goto :nearestlocloop
        }
        /echo this didnt work
        /varset nextlocationy NULL
        /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[1,,]}]}) {
            /varset savedvariable ${Math.Calc[${j} + 1]}
            /varset nextlocationy NULL          
            /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[1,,]}]}) {
                /echo next j
                /next j
            }
            /if (${Bool[${Ini[movement,${TargetZone},zoneshortnames].Arg[${Math.Calc[${i} + 1]},,]}]}) {
                /varset j 0
                /next i
            }
            /if (${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]}) {
                /varset j 0
                /echo next junctions instead of j
                /varset TargetZone ${savedtargetzone}
                /next junctions
            }
        }
        /echo this fired
        /varset savedvariable ${Math.Calc[${j} + 1]}
        /delay 2
        /next i
    }
        /if (!${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]} && ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[junction]} || ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[finish]}) {
            /keypress w
            /varset didinvis 0
            /echo i have reached my destination
            /guildsay im at target destination
            /varset makecamploc ${Me.Y},${Me.X}
            /return
        } 
    :end
    /if (${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[junction]}) {
        /keypress forward
        /varset j 1
        /varset TargetZone ${savedtargetzone}
        /if (!${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]}) {
            /varset TargetZone ${startlocation.Arg[1,,]}
            /varset i ${startlocation.Arg[2,,]}
        } 
        /if (${Bool[${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]}]}) {
            /echo changing junctions +1 from hitting a junction
            /next junctions
        }
    }
    /if (${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[zonedoor]} && ${nextlocationy.NotEqual[NULL]}) {
        /keypress forward
        /varset j 1
        :doorloop
        /keypress u
        /delay 2
        /keypress u
        /delay 1s
        /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}zonedoor]}]}) {
            /face nolook loc ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}zonedoor]}
            /keypress u
        }
        /call viewing
        /if (${zoneshortname.Equal[${Zone.ShortName}]}) /goto :doorloop
        /varset nextlocationy NULL
    }
    /if (${zoneshortname.Equal[${Zone.ShortName}]}) {
        /varset tempheading ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,]})
        /if (${Math.Calc[(360 - ${tempheading}) + 45]} > 360 && ${Me.Heading.Degrees} <= ${Math.Calc[(360 - ${tempheading}) - 45]} || ${Math.Calc[(360 - ${tempheading}) + 45]} > 360 && ${Me.Heading.Degrees} <= ${Math.Calc[45 - (360 - ${tempheading})]}) {
            /goto :headingdone
        }
        /if (${Math.Calc[(360 - ${tempheading}) - 45]} < 0 && ${Me.Heading.Degrees} <= ${Math.Calc[(360 - ${tempheading}) + 45]} || ${Math.Calc[(360 - ${tempheading}) - 45]} < 0 && ${Me.Heading.Degrees} <= ${Math.Calc[45 - (360 - ${tempheading})]}) { 
            /goto :headingdone
        }
        /if (${Math.Calc[${Me.Heading.Degrees}]} >= ${Math.Calc[360 - ${tempheading}]} && ${Math.Calc[${Me.Heading.Degrees}]} <= ${Math.Calc[(360 - ${tempheading}) + 45]} || ${Math.Calc[${Me.Heading.Degrees}]} >= ${Math.Calc[(360 - ${tempheading}) - 45]} && ${Math.Calc[${Me.Heading.Degrees}]} <= ${Math.Calc[360 - ${tempheading}]}) {
            /goto :headingdone
        }
            /if (${tempheading} <= 180) {
            /echo Tempheading < 180
                /if (${Me.Heading.Degrees} >= ${Math.Calc[(360 - ${tempheading}) - 180]} && ${Me.Heading.Degrees} <= ${Math.Calc[360 - ${tempheading}]}) {
                    /varset tempheading ${Math.Calc[${tempheading} + 45]}
                    /goto :heading
                } else {
                    /if (${tempheading} <= 45) {
                        /varset tempheading ${Math.Calc[315 + ${tempheading}]}
                        /goto :heading
                    }
                    /varset tempheading ${Math.Calc[${tempheading} - 45]}
                    /goto :heading
                }
            }
            /if (${tempheading} > 180) {
            /echo Tempheading > 180
                /if (${Me.Heading.Degrees} <= ${Math.Calc[(360 - ${tempheading}) + 180]} && ${Me.Heading.Degrees} >= ${Math.Calc[360 - ${tempheading}]}) {
                    /varset tempheading ${Math.Calc[${tempheading} - 45]}
                    /goto :heading
                } else {
                    /if (${tempheading} <= 315) {
                        /varset tempheading ${Math.Calc[${tempheading} + 45]}
                        /goto :heading
                    }
                    /varset tempheading ${Math.Calc[(360 - ${tempheading}) - 45]}
                    /goto :heading
                }
            }
            :heading
            /face heading ${tempheading}
        :headingdone
        /face fast heading ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,]}
    }
    /varset nextlocationy NULL
    /varset nextlocationx NULL
    /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}]}]}) {
        /varset nextlocationy ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}].Arg[1,,]}
        /varset nextlocationx ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}].Arg[2,,]}
    }
    :nearestlocloop
    /doevents Toggle
    /if (${Macro.Return.Equal[abort]}) {
        /varset makecamploc ${Me.Y},${Me.X}
        /return
    }
    /varset nextlocationyhigh ${Math.Calc[${nextlocationy} + 5]}
    /varset nextlocationylow ${Math.Calc[${nextlocationy} - 5]}
    /varset nextlocationxhigh ${Math.Calc[${nextlocationx} + 5]}
    /varset nextlocationxlow ${Math.Calc[${nextlocationx} - 5]}
    :movementloop
    /keypress forward hold
    /if (${nextlocationy.NotEqual[NULL]} && ${Me.Y} <= ${nextlocationyhigh} && ${Me.Y} >= ${nextlocationylow} && ${Me.X} <= ${nextlocationxhigh} && ${Me.X} >= ${nextlocationxlow}) {
        /keypress forward
        /delay 2
        /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}command]}]}) /call ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}command]}
        /next j
    }
    /if (${nextlocationy.NotEqual[NULL]}) {
        /if (${Me.Y} <= ${nextlocationylow} || ${Me.X} <= ${nextlocationxlow} || ${Me.Y} >= ${nextlocationyhigh} || ${Me.X} >= ${nextlocationxhigh}) {
            /face nolook fast loc ${nextlocationy},${nextlocationx}
        }
    }
    /if (${zoneshortname.NotEqual[${Zone.ShortName}]}) {
        /if (!${InvSlot[17].Item.ID}) {
            /if (!${InvSlot[13].Item.ID} && !${Defined[amnaked]}) {
                /guildsay - i died during movement - 
                /declare amnaked int outer 100
                /doevents flush Movement
                /return
            }
        }
        /echo -- ${Zone.Name} --
        /varset nextlocationy NULL
        /keypress forward
        /varset zoneshortname ${Zone.ShortName}
        /varset tempdistance 0
        /varset invisleader 0
        /varset didinvis 0
        /varset j 1
        /varset i 0
        /delay 2
        /next i
    }
    /if (!${forcemove}) {
        /if (${invisleader}) {
            /if (${Spawn[id ${invisleader}].Distance} > 35) {
                /varset tempheading ${Spawn[id ${invisleader}].HeadingTo.Degrees}
                /varset grpnumber ${invisleader}
                /goto :grpmove
            }
            /if (${invisleader} == ${Me.ID}) {
                /varset grpnumber 0
                /for grpnumber 1 to 5
                /if (${Group.Member[${grpnumber}].Distance} > 35) {
                    /varset tempheading ${Spawn[id ${Group.Member[${grpnumber}].ID}].HeadingTo.Degrees}
                    /varset grpnumber ${Group.Member[${grpnumber}].ID}
                    :grpmove
                    /echo ${Spawn[id ${grpnumber}].Name} is out of range
                    |/echo ${Spawn[id ${grpnumber}].Heading.Degrees} their heading
                    |/echo ${Me.Heading.Degrees} my heading
                    /if (${Spawn[${grpnumber}].Distance} > 75) {
                        /echo distance > 75 waiting ><
                        |/keypress forward
                        |/goto :grpmovewaitloop
                    }
                    /if (${tempheading} >= 270) {
                        /if (${Me.Heading.Degrees} >= ${Math.Calc[${tempheading} - 90]}) {
/echo tempheading /goto
                            /keypress forward
                            /goto :grpmovewaitloop
                        }
                        /if (${Me.Heading.Degrees} >= ${Math.Calc[90 -(360 - ${tempheading})]}) {
/echo tempheading /goto
                            /keypress forward
                            /goto :grpmovewaitloop
                        }
                    }
                    /if (${tempheading} <= 90) {
                        /if (${Me.Heading.Degrees} >= ${Math.Calc[${tempheading} + 90]}) {
/echo tempheading /goto
                            /keypress forward
                            /goto :grpmovewaitloop
                        }
                        /if (${Me.Heading.Degrees} <= ${Math.Calc[360 -(90 - ${tempheading})]}) {
/echo tempheading /goto
                            /keypress forward
                            /goto :grpmovewaitloop
                        }
                    }
                    /if (${tempheading} > 90 && ${tempheading} < 270) {
                        /if (${Me.Heading.Degrees} >= ${Math.Calc[${tempheading} - 90]} && ${Me.Heading.Degrees} <= ${Math.Calc[${tempheading} + 90]}) {
                            /keypress forward
                            /goto :grpmovewaitloop
                        }
                    }
                    /echo think i've fallen behind
                    /delay 1
                    |/goto :movementloop
                    /keypress forward
                    :grpmovewaitloop
                    /delay 1
                    /if (${tempdistance} == 0) {
                        /delay 2
                        /varset tempdistance ${Spawn[id ${grpnumber}].Distance}
                        /delay 2
                        /if (${Spawn[id ${grpnumber}].Distance} == ${tempdistance}) {
                            /echo still behind, continuing
                            |/keypress forward hold
                            |/delay 1s ${Spawn[id ${grpnumber}].Distance} < 30
                            |/varset tempdistance 0
                            |/goto :movementloop
                        }
                        |/varset tempdistance 0
                    }
                    /if (${Spawn[id ${grpnumber}].Distance} < ${tempdistance}) {
                        |/echo waiting, continuing
                        |/keypress forward hold
                        /if (${Spawn[id ${grpnumber}].Distance} <= 15) {
/echo distance < tempdistance /goto
                            /varset tempdistance 0
                            /goto :movementloop
                        }
                        |/varset tempdistance 0
                    }
                    /varset tempheading 0
                    /for tempheading 1 to ${Group}
                    /if (${Spawn[id ${grpnumber}].ID}) {
                        /varset mathvar ${Spawn[id ${grpnumber}].Loc.Arg[1,,]}
                        /varset mathvar2 ${Spawn[id ${grpnumber}].Loc.Arg[2,,]}
                        /if (${Math.Abs[${mathvar}]} >= ${Math.Abs[${nextlocationy}]}) {
                            /if (${Math.Abs[${mathvar2}]} >= ${Math.Abs[${nextlocationx}]}) {
                            /varset mathvar ${Math.Calc[${Math.Abs[${mathvar}]} - ${Math.Abs[${nextlocationy}]}]}
                            /varset mathvar2 ${Math.Calc[${Math.Abs[${mathvar2}]} - ${Math.Abs[${nextlocationx}]}]}
                            /if (${Spawn[id ${grpnumber}].Loc.Arg[1,,].Find[-]} && !${nextlocationy.Find[-]}) /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[1,,]}]}]}
                            /if (!${Spawn[id ${grpnumber}].Loc.Arg[1,,].Find[-]} && ${nextlocationy.Find[-]}) /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[1,,]}]}]}
                            /if (${Spawn[id ${grpnumber}].Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[2,,]}]}]}
                            /if (!${Spawn[id ${grpnumber}].Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[2,,]}]}]}
                            /echo ${mathvar} mathvar
                            /echo ${mathvar2} mathvar2
                            /goto :mathvarfinish
                            }
                            /if (${Math.Abs[${mathvar2}]} < ${Math.Abs[${nextlocationx}]}) {
                            /varset mathvar ${Math.Calc[${Math.Abs[${mathvar}]} - ${Math.Abs[${nextlocationy}]}]}
                            /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} - ${Math.Abs[${mathvar2}]}]}
                            /if (${Spawn[id ${grpnumber}].Loc.Arg[1,,].Find[-]} && !${nextlocationy.Find[-]}) /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[1,,]}]}]}
                            /if (!${Spawn[id ${grpnumber}].Loc.Arg[1,,].Find[-]} && ${nextlocationy.Find[-]}) /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[1,,]}]}]}
                            /if (${Spawn[id ${grpnumber}].Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[2,,]}]}]}
                            /if (!${Spawn[id ${grpnumber}].Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[2,,]}]}]}
                            /echo ${mathvar} mathvar
                            /echo ${mathvar2} mathvar2
                            /goto :mathvarfinish
                            }
                        }
                        /if (${Math.Abs[${mathvar}]} < ${Math.Abs[${nextlocationy}]}) {
                            /if (${Math.Abs[${mathvar2}]} >= ${Math.Abs[${nextlocationx}]}) {
                            /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} - ${Math.Abs[${mathvar}]}]}
                            /varset mathvar2 ${Math.Calc[${Math.Abs[${mathvar2}]} - ${Math.Abs[${nextlocationx}]}]}
                            /if (${Spawn[id ${grpnumber}].Loc.Arg[1,,].Find[-]} && !${nextlocationy.Find[-]}) /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[1,,]}]}]}
                            /if (!${Spawn[id ${grpnumber}].Loc.Arg[1,,].Find[-]} && ${nextlocationy.Find[-]}) /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[1,,]}]}]}
                            /if (${Spawn[id ${grpnumber}].Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[2,,]}]}]}
                            /if (!${Spawn[id ${grpnumber}].Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[2,,]}]}]}
                            /echo ${mathvar} mathvar
                            /echo ${mathvar2} mathvar2
                            /goto :mathvarfinish
                            }
                            /if (${Math.Abs[${mathvar2}]} < ${Math.Abs[${nextlocationx}]}) {
                            /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} - ${Math.Abs[${mathvar}]}]}
                            /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} - ${Math.Abs[${mathvar2}]}]}
                            /if (${Spawn[id ${grpnumber}].Loc.Arg[1,,].Find[-]} && !${nextlocationy.Find[-]}) /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[1,,]}]}]}
                            /if (!${Spawn[id ${grpnumber}].Loc.Arg[1,,].Find[-]} && ${nextlocationy.Find[-]}) /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[1,,]}]}]}
                            /if (${Spawn[id ${grpnumber}].Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[2,,]}]}]}
                            /if (!${Spawn[id ${grpnumber}].Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[2,,]}]}]}
                            /echo ${mathvar} mathvar
                            /echo ${mathvar2} mathvar2
                            /goto :mathvarfinish
                            }
                        }
                        :mathvarfinish
                        /varset mathvar ${Math.Calc[${mathvar} + ${mathvar2}]}
                        |/if (${Spawn[id ${grpnumber}].Distance} >= ${mathvar}) {
                        |    /echo GRP MEMBER > MATHVAR
                        |    /keypress forward hold
                        |    /delay 1
                        |    /varset tempdistance 0
                        |    /goto :movementloop
                        |}
                        |/if (${mathvar} <= 75) {
                        |    /if (${Spawn[id ${grpnumber}].Distance} < 75) {
                        |        /echo about to next tempheading
                        |        /next tempheading
                        |        /echo GRP MEMBER < mathvar, possible miscalc @ j waypoint
                        |        /keypress forward hold
                        |        /delay 1
                        |        /varset tempdistance 0
                        |        /goto :movementloop
                        |    }
                        |}
                        /if (${Spawn[id ${grpnumber}].Distance} > 75) {
                            /ini "movementerror" "movementerrorcount" "count" "${Math.Calc[${Ini[movementerror,movementerrorcount,count]} + 1].Int}"
                            /ini "movementerror" "movementerror${Ini[movementerror,movementerrorcount,count]}" "name" "${Me.Name}"
                            /ini "movementerror" "movementerror${Ini[movementerror,movementerrorcount,count]}" "data1" "->locy ${Me.Y} locx ${Me.X} |||| nexty ${nextlocationy} nextx ${nextlocationx}"
                            /ini "movementerror" "movementerror${Ini[movementerror,movementerrorcount,count]}" "data2" "->targetdist ${Spawn[id ${grpnumber}].Distance} mathvar ${mathvar} "
                            /ini "movementerror" "movementerror${Ini[movementerror,movementerrorcount,count]}" "data3" "->->->->->->->->->->->->"
                            /ini "movementerror" "movementerror${Ini[movementerror,movementerrorcount,count]}" "data4" "->grplocy ${Spawn[id ${grpnumber}].Loc.Arg[1,,]} |||| grplocx ${Spawn[id ${grpnumber}].Loc.Arg[2,,]}"
                            /ini "movementerror" "movementerror${Ini[movementerror,movementerrorcount,count]}" "data5" ""
                            /end
                        }
                        /if (${Math.Abs[${Me.Y}]} > ${Math.Abs[${nextlocationy}]}) {
                            /if (${Math.Abs[${Me.X}]} > ${Math.Abs[${nextlocationx}]}) {
                                /if (${Me.Loc.Arg[1,,].Find[-]} && !${nextlocationy.Find[-]}) {
                                    /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | > x |-| | >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | > x | |-| >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} - ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | > x | | | >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                    }
                                }
                                /if (!${Me.Loc.Arg[1,,].Find[-]} && ${nextlocationy.Find[-]}) {
                                    /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| > x |-| | >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| > x | |-| >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} - ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| > x | | | >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                    }
                                }
                                /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} - ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | > x |-| | >
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                    }
                                }
                                /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} - ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| > x | |-| >
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                    }
                                }
                                /if (${Math.Calc[(${Math.Abs[${Me.Y}]} - ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} - ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | | | > x | | | >
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                }
                            }
                            /if (${Math.Abs[${Me.X}]} < ${Math.Abs[${nextlocationx}]}) {
                                /if (${Me.Loc.Arg[1,,].Find[-]} && !${nextlocationy.Find[-]}) {
                                    /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | > x |-| | <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | > x | |-| <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${nextlocationx}]} - ${Math.Abs[${Me.X}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | > x | | | <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                    }
                                }
                                /if (!${Me.Loc.Arg[1,,].Find[-]} && ${nextlocationy.Find[-]}) {
                                    /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| > x |-| | <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| > x | |-| <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${nextlocationx}]} - ${Math.Abs[${Me.X}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| > x | | | <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                    }
                                }
                                /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} - ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | > x |-| | <
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                    }
                                }
                                /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} - ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| > x | |-| <
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                    }
                                }
                                /if (${Math.Calc[(${Math.Abs[${Me.Y}]} - ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${nextlocationx}]} - ${Math.Abs[${Me.X}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | | | > x | | | <
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                }
                            }
                        }
                        /if (${Math.Abs[${Me.Y}]} < ${Math.Abs[${nextlocationy}]}) {
                            /if (${Math.Abs[${Me.X}]} > ${Math.Abs[${nextlocationx}]}) {
                                /if (${Me.Loc.Arg[1,,].Find[-]} && !${nextlocationy.Find[-]}) {
                                    /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | < x |-| | >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | < x | |-| >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} - ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | < x | | | >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                    }
                                }
                                /if (!${Me.Loc.Arg[1,,].Find[-]} && ${nextlocationy.Find[-]}) {
                                    /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| < x |-| | >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| < x | |-| >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} - ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| < x | | | >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                    }
                                }
                                /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                    /if (${Math.Calc[(${Math.Abs[${nextlocationy}]} - ${Math.Abs[${Me.Y}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | < x |-| | >
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                    }
                                }
                                /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                    /if (${Math.Calc[(${Math.Abs[${nextlocationy}]} - ${Math.Abs[${Me.Y}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| < x | |-| >
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                    }
                                }
                                /if (${Math.Calc[(${Math.Abs[${nextlocationy}]} - ${Math.Abs[${Me.Y}]}) + (${Math.Abs[${Me.X}]} - ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | | | < x | | | >
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                }
                            }
                            /if (${Math.Abs[${Me.X}]} < ${Math.Abs[${nextlocationx}]}) {
                                /if (${Me.Loc.Arg[1,,].Find[-]} && !${nextlocationy.Find[-]}) {
                                    /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | < x |-| | <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | < x | |-| <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${nextlocationx}]} - ${Math.Abs[${Me.X}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | < x | | | <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                    }
                                }
                                /if (!${Me.Loc.Arg[1,,].Find[-]} && ${nextlocationy.Find[-]}) {
                                    /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| < x |-| | <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| < x | |-| <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${nextlocationx}]} - ${Math.Abs[${Me.X}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| < x | | | <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                    }
                                }
                                /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                    /if (${Math.Calc[(${Math.Abs[${nextlocationy}]} - ${Math.Abs[${Me.Y}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | < x |-| | <
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                    }
                                }
                                /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                    /if (${Math.Calc[(${Math.Abs[${nextlocationy}]} - ${Math.Abs[${Me.Y}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| < x | |-| <
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                    }
                                }
                                /if (${Math.Calc[(${Math.Abs[${nextlocationy}]} - ${Math.Abs[${Me.Y}]}) + (${Math.Abs[${nextlocationx}]} - ${Math.Abs[${Me.X}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | | | < x | | | <
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                }
                            }
                        }
                    }
                    /next tempheading
                    /if (${Spawn[id ${grpnumber}].Distance} > 25) /goto :grpmovewaitloop
                    /echo continuing
                    /varset tempdistance 0
                    /goto :movementloop
                }
|/echo next grpnumber
                /next grpnumber
                /varset grpnumber 0
            }
        }
    }
    /delay 1
    /goto :movementloop
}
/delay 2
/if (${Bool[${Ini[movement,${TargetZone},zoneshortnames].Arg[${Math.Calc[${i} + 1]},,]}]}) /next i
/varset i 0
/next junctions
/varset junctions 1
/varset savedvariable 1
/varset TargetZone ${startlocation.Arg[1,,]}
/varset i ${startlocation.Arg[2,,]}
/echo setting targetzone and zone im in
/next junctions
/echo returning
/return

Re: movement function, movement.ini, automove to zones/spell

Posted: Sat Aug 22, 2015 2:14 am
by toolisaccount
reserved2
thinking this will be a diff version of Sub Event_Movement

hi well I guess im working a little bit with trig and coordinate planes as of today...

Code: Select all

coordinate planes
               |                    |                         arg1)  <-  (+)      ->   (-)
          +,+  | -,+             a  |  b
          -----|-----          -----|-----                    arg2)          ^   (+)         |   (-)
          +,-  | -,-             c  |  d                                     |               V
               |                    |


                                                                                0
                                                                 +2000          cb            -2000
sector a = +,+        sector b  = -,+                              _____________________________
    sector d = -,-        sector c = +,-                          |                            | +2000
                                                                  |                            |
sector a  = +,+       sector b = -,+                              |                            |
    sector c =  +,-         sector d = -,-                        |                            |
a +,+                                                             |            kelethin        |
d -,-                                                             |            0,0             |  0
b -,+                                                             |                            |
c +,-                                                             |                            |
             +,+     -,+                                          |                            |felwith
                \   /                                     bbm     |                            | -2000
                 0,0                                              ------------------------------
                /   \                                                                   lfay
             +,-     -,-

im having some serious issues right now with this everquest client

there is tooli , toolis , chloroform in the faydarks

this is my setup

tooli loc -179, -744
toolis loc -269 , -566
chloro loc -186, -543

Code: Select all

---------------------------------------------------------
---------------------------------------------------------
hey hacked my keyoad                                
ooli headin o oolis 23.29 ,headin o chlooom 267.89   !!
oolis headin o ooli 63.16, headin o chlooom 3.3      !!
chlooom headin o ooli 87.87, headin o oolis 16.8     !!
                                                     !!
chlooom {Me.Headin.Deees} 16.8(oolis)                !!
oolis aeed chlooom {ae.Headin.Deees} 16.9            !! 
                                                                          
ooli {Me.Headin.Deees} 23.29 (oolis)                 ()
oolis aeed ooli {ae.Headin.Deees 23.6                 
---------------------------------------------------------
---------------------------------------------------------
ok my server may have headings backwards use power of 180 lol
i.e 243.29 = 63.29....prtty sure headings are supposed clockwise

tooli heading to toolis 243.29 ,heading to chloroform 267.89
toolis heading to tooli 63.16, heading to chloroform 345.53
chloroform heading to tooli 87.87, heading to toolis 165.48

----this is not good -----------------------------
chloroform {Me.Heading.Degrees} 165.48(facing toolis)
toolis targeted chloroform {target.Heading.Degrees} 165.59

tooli {Me.Heading.Degrees} 243.29 (facing toolis)
toolis targeted tooli {target.Heading.Degrees 243.46

ok headings and locs are showing slight differences between
${Target.Loc} and /loc
and
${Target.Heading.Degrees} and ${Me.Heading.Degrees}

Heading appears to be wrong counter clockwise on current open server files
that's rlly thoughtful This has to be fixed
brbafk latr keybord fix then examples
hi Norton fixes good one time got a virus on p1999 and they trained me
and Norton fixed that one good its free u gotta turn it .exe file and Norton not anything else
im floored right now from fumes and had to leave but im back now and
its kickin in here gimme a min this post will b cleaned up more eventually

hi my computer is still hacked Norton fixed but then stopped working
after I turned it off
its ganna be a min im defenseless this was so not fair lol
https://community.norton.com/en/forums/ ... s-detected
trying to hlep them

onscn keyoad sill no un o compue/esa compue
acdehijlmnopqsuwxyz12367890 sill oke
es i am ip o all my keys in poes o ak sanak slauhe
es sanak and pooka ae anin close in how cue hey ae
---------------------------------------------------------
tooli loc -179, -744
toolis loc -269 , -566
chloro loc -186, -543

so we take tooli loc vs toolis loc, (744 - 566) = 178 + (269 - 179) = 90
178 + 90 = 268
we end up with a calc of 268 when distance is showing up 200
where are these 68 units of measurement coming from????
is location supposed to be accurate to units of measurement in realistic optimality????
which is the best way for us to perform these types of triangulation calculations????

im hoping to assume that the diagonal slant is perhaps
intersecting/sucking up some sort of distance

but im also a firm believer that math is a very flawed system
this is where i think im leaving off for now

Code: Select all

                  .(chloroform)
            .(toolis)


                    .(tooli)
thx this pic shld be flipped 90 deg to the left
.--------o
_.
am hoping to use our flips in some triangulation and location determination
correlating headings and found locations say as if there was location determination failure
im somewhere around pondering 49 methodologies of finding locations

toolis is 200 feet from tooli
chloro is 200 feet from tooli
toolis is 85 feet from chloro
well we have a problem....
according to the math of the locations diagnals are causing interference in the calculation of the difference of /loc locations
but there is a more serious problem,
if you examine the picture, you notice toolis is slightly closer to tooli
than chloroform is
both toolis and chloroform are reading a distance of 200 ...
apparently this diagnal from tooli is causing a degradation of 5 or so distance from the actual locations of the characters

how is this diagonal adding 5 distance it makes no sense to me, plz no answers

the characters are on level ground, ive not tested otherwise yet
(z in relation to ${Target.Distance})

in school they say the shortest distance between 2 points is a straight line? no
well the char is in alignment of a straight line between each of the two
other chars no matter which way you analyze the situation

this is either macroquest or eqclient or math...
im guessing could test this with casting a spell w/o extended range
im doubting that this is macroquests doing at this point
a distance of 5 like this could make or break someones formulas....

if someone were developing mathematical formulas for robotics,
this math would not be slightly helpful!

maybey im just dumb
just tested with a cigarette and a pen && paper,
unless im missing something important from my brain, it appears diagnals subtract from actual distance (make the distance shorter)
but we take an object with a length of 10
regardless of it being diagonal or north/south, its length is still 10
traversing this object, is a straight line no matter what,
and the distance should be 10

important though, our object with a length of 10,
at its maximum reach - follows the outline of a circle,
so im assuming our mathematics are based circular/or this canbeused as a common guide
the circle seems to be misleading, this appears to be human perception of distance
we are still travelling the distance of 10 but diagonally,
this appears to not be getting us as far as north/south

im kinda understanding where toolis is on this circular outline, her distance is still 200
we will find the math behind this
we will find the math behind the distance loss of this
but not making the connection yet where we take our locations math and
it equals 268 yet our distance is 200
still work to be done but the answer exists somewhere in this

im understanding where our formulas/points for triangulating a position
may change due to a changing location of our main object

this suggest circular based geometry/trig possibly and
everquest may have the formula incorrect for distance loss

it appears diagonal lines are taking more length to
travel through set units of measurement

my cig has 63.4 lines on it (this is not a reliable thing)
the difference of distance loss (diagonally)
from line a to line b appears to be 13.4 lines
this may involve the heading numbers of the a and b
the distance from a to b appears to be 50 cig lines of measurement

Code: Select all

                      a             | b        
                           \        |
                             \      |
                               \    |
                                \   |
                                 \  |
                                   \| 
                                    \                               
next i have taken a cup
the cig has 63.4 cig lines

Code: Select all

----------------------------------------------------------------===================
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
----------------------------------------------------------------===================
from about 270 its 45 cig lines going straight up to reach the end of line a,
from about 270 its 40 cig lines eastward to reach the beginning of line a&b
this is not perfect
my brain died sometime during this
line a is at about 270 +45 (315 degrees)... line b is at 360/0 degrees

the distance from the center to reach the cups outline
(from start of lines a and b) is 37 cig lines

Code: Select all

                      a             | b        
                          |\        |
        48 cig lines      |  \      |
      from 270            |   \     |                    
  going straight                \   |
                                 \  |
                                   \| 
                      270           \       90        
definately was not ready for this nor am ready... gonna be a min guess im have to convert and eventually make graph paper

was trying to determine object location and triangulation with loc of 0,0 at all times
and mapping locations of objects in case of location identification failure

how our calculation is ending up 268 when distance is reading 200, is still unsolved!
plz no answers

im blew my brain on trying to figure out all the aspects of a pen moving
inside of a square, the base of triangles relation to the distance its sucking up
and some crazy other stuff wow ill be back

Re: movement function, movement.ini, automove to zones/spell

Posted: Sat Aug 22, 2015 2:15 am
by toolisaccount
reserved3
thinking this will be a diff version of Sub Event_Movement
11/15/2015? 8:45pm est
hihi this is toolis nice to be back in action, hacked keyboard cost me 3 weeks and then ive been slacking for another 2 weeks or so !~

about to be back, in the meantime im taken it upon myself to continue to the next step of movement~!

now to reiterate -> im working on invis pack travel
I got distracted into location awareness and redetection and remapping location for (?advancedrobotics?)

we are gonna use all that stuff soon!

we are gonna want to use that maybey
(because things have worked out well in terms of fate and moreso concerning my advancement in studies, than anything else)
ok well - we are going to use fake locations maybey next to account for
my not putting a loc of the zoneline in movement!
meaning they are using only a heading to hit the zoneline, there is no loc past the zoneline

so we will prolly need to create fake locations -> which is infinitely useful
for all robotics

---------------------------------------------------------------------
so working on invis pack travel
distracted into location awareness
then distracted by comp being hacked!
then distracted by real life
but ive managed to get this far!

so here is the next steps! sorry for kinda putting last stuff typed in middle of post.... that was the section was ready to type next in

ok
here is our debug spew ( which could be very much better with math calcs but gotta memorize things/learn better)

it appears to simply put, zonegravity may be our culprit !
this guy put the zonegravity in ----> it is like post 2012 rof2 feature
zonegravity may be our culprit causing our momentum to cause us to skid
when going down a hill, thus breaking our wanted 75 distance leash range for invis pack travel movement
causing debug spew and macro end!
this has got to be very easy to fix but leads us to our next steps

Code: Select all

[movementerrorcount]
count=3
------------------------------------------------------------------------------------------------------------------------
|
|
|Tooli, Toolis, Chloroform near westwastes zoneline, chloro on a hill toolis on a hill, it appears chloro has skidded
|and toolis has skidded downwards due to zonegravity which shouldnt exist....
|
|chloro skidded first and triggered movementerror, tooli recognized and toolis skidded furthest...
|it appears toolis built momentum the msot going downhill the farthest distance and skidded farthest
|
|
[movementerror1]
name=Chloroform
data1=->locy -1731.61 locx -5019.14 |||| nexty NULL nextx NULL
data2=->targetdist 78.01 mathvar 6678 
data3=->->->->->->->->->->->->
data4=->grplocy -1737.75 |||| grplocx  -4941.38
data5=
[movementerror2]
name=Tooli
data1=->locy -1737.77 locx -4941.49 |||| nexty NULL nextx NULL
data2=->targetdist 81.11 mathvar 6755 
data3=->->->->->->->->->->->->
data4=->grplocy -1733.75 |||| grplocx  -5022.50
data5=
[movementerror3]
name=Toolis
data1=->locy -1733.56 locx -5025.02 |||| nexty NULL nextx NULL
data2=->targetdist 83.75 mathvar 6678 
data3=->->->->->->->->->->->->
data4=->grplocy -1737.75 |||| grplocx  -4941.38
data5=
------------------------------------------------------------------------------------------------------------------------

Re: movement function, movement.ini, automove to zones/spell

Posted: Sat Aug 22, 2015 2:16 am
by toolisaccount
reserved4
thinking this will be a diff version of Sub Event_Movement

11/15/2015? 8:54pm est

CANT WAIT TO GET BACK TO STUDYING ITS BEEN LIEK 2MONTHS
??more??
this is the next step for movement
we might be using zstuff to check against other grpmembers zdistance (height)
we would be trying to figure out if we are on a hill about to skid down
zstuff might not be in the correct place .... did this while very distracted

Code: Select all

Sub Event_Movement(Line, SenderPerson, targetperson, TargetZone)

/if (${Bool[${targetperson}]}) {
    /declare name int local
    /declare force int local
    /for force 1 to 10
    /if (${targetperson.Arg[${force},].Equal[force]}) {
        /declare forcemove bool local TRUE
    }
    /if (${targetperson.Arg[1,].Equal[force]} && !${Bool[${targetperson.Arg[2,]}]}) /goto :beginning
    /next force
    /if (${targetperson.Arg[1,].Equal[group]}) {
        /if (${targetperson.Arg[1,].Equal[group]}) {
            /declare groupnumber int local
            /call findgroup
            /varset targetperson ${targetperson.Right[-6]}
            /if (${targetperson.Find[force]}) /varset targetperson ${targetperson.Left[-6]}
            /for groupnumber 1 to ${Ini[toolismacro,Values,totalgroups]}
            /if (${targetperson.Arg[${groupnumber},,]} == ${Macro.Return}) {
                /goto :beginning
            } else {
                /next groupnumber 
                /return
            }
        }
    }
    /for name 1 to 10
    /if (${targetperson.Arg[${name},].Equal[${Me.Name}]}) /goto :beginning
    /next name
    /return
}
:beginning
/if (!${Bool[${Ini[movement,${TargetZone},zoneshortnames].Arg[1,,]}]}) {
    /echo Incorrect Destination
    /return
}
/declare zoneshortname     string local ${Zone.ShortName}
/declare savedtargetzone   string local ${TargetZone}
/declare startlocation     string local 0
/declare tempheading       int  local 0
/declare nextlocationx     string local NULL
/declare nextlocationy     string local NULL
/declare nextlocationxhigh string local
/declare nextlocationxlow  string local
/declare nextlocationyhigh string local
/declare nextlocationylow  string local
/declare i int local
/declare j int local
/declare junctions int local
/declare savedvariable int local 0
/if (${Me.Class.Name.NotEqual[Bard]}) /declare didinvis int local 0
/declare invisleader int local 0
/declare tempdistance int local 0
/declare grpnumber int local 0
/declare mathvar int local 0
/declare mathvar2 int local 0

/echo - Starting -
/for junctions 1 to 12
/echo ${junctions} junctions
/for i 1 to 10
/echo ${i} i variable at i loop
:start
/if (${Bool[${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]}]}) {
    /echo ${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]}
    /varset TargetZone ${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]}
    /echo changed targetzone to ${TargetZone}
    /echo ${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]} targetzones junctions
    /echo ${i} i variable in bool junctions
    /varset i 1
}
/if (!${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]} && ${TargetZone.NotEqual[${savedtargetzone}]}) {
    /varset TargetZone ${savedtargetzone}
    /echo changed targetzone to savedtargetzone
    /echo ${junctions} junctions
    /echo ${i} i variable in not bool junctions
    /echo ${j} j 
    /varset i 1  
}
/if (${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]} && ${TargetZone.NotEqual[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]}) {
    /varset TargetZone ${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}
    /echo changed targetzone to savedtargetzone junction arg junctions
    /echo ${junctions}
    /echo ${i} i variable in bool junctions arg junctions
    /echo ${j} j
    /varset i 1
}
/if (${savedvariable} != 1) {
    /if (${Bool[${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,].Equal[${Zone.ShortName}]}]} && ${startlocation.Equal[0]}) {
        /echo found starting zone
        /varset startlocation ${TargetZone},${i},
        /echo ${startlocation}
        /echo ${i} i variable
        /echo ${j} j variable
    }
    /if (${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,].NotEqual[${Zone.ShortName}]} && ${startlocation.NotEqual[0]}) {
        /echo found end of zones
        /varset junctions 1
        /varset savedvariable 1
        /varset TargetZone ${startlocation.Arg[1,,]}
        /varset i ${startlocation.Arg[2,,]}
    }
}
/if (${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[finish]} && ${zoneshortname.Equal[${Zone.ShortName}]}) {
    /keypress w
    /varset didinvis 0
    /echo i have reached my destination
    /guildsay im at target destination
    /varset makecamploc ${Me.Y},${Me.X}
    /return
}
/if (${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,].Equal[${Zone.ShortName}]}) {
    /if (!${forcemove}) {
        /if (${invisleader} == 0) {
            /call groupcheck
            /for j 0 to ${Group}
            /if (${Group.Member[${j}].Class.Name.Equal[bard]}) /varset invisleader ${Group.Member[${j}].ID}
            /if (${invisleader} == 0) /next j
            /echo invisleader id ${invisleader}  j ${j}
            /varset j 0
        }
|        /if (${Me.Class.Name.Equal[Bard]} && !${didinvis}) {
|            /call groupcheck
|        }
        /if (${Me.Class.Name.NotEqual[Bard]} && !${didinvis}) {
            /call findgroup
            /varset grpnumber ${Macro.Return}
            :waitforinvis
            /doevents Toggle
            /if (${Macro.Return.Equal[abort]}) {
                /varset makecamploc ${Me.Y},${Me.X}
                /return
            }
            /if (${Ini[toolismacro,Movement,group${grpnumber}ready].Equal[ready]}) {
                /varset didinvis 1
                /delay 2
            }
            /if (${Ini[toolismacro,Movement,group${grpnumber}ready].Equal[empty]}) {
                /delay 2
                /echo waiting for invis
                /goto :waitforinvis
            }
        }
    }
    /if (${Me.Class.Name.Equal[Bard]} && !${didinvis}) {
        |/squelch /twist off
        |/varset didinvis 1
        |/varset dotwist 1
        |/if (!${Me.Gem[${travelsong}]} && !${Cursor.ID}) {
        |        /guildsay sec memming travel song
        |        /memspell ${travelsonggem} ${travelsong}
        |        /delay 16s ${Me.SpellReady[${travelsong}]}
        |}
        |/squelch /twist ${travelsonggem}
        |/delay 2s
        |/if (!${Me.Casting.ID}) {
        |    /squelch /twist off
        |    /delay 2
        |    /squelch /twist ${speedsonggem}
        |    /delay 2s
        |    /if (${Me.Casting.ID}) /delay 2s
        |    /squelch /twist off
        |    /if (!${Me.Gem[${invissong}]} && !${Cursor.ID}) {
        |        /guildsay sec memming invis song
        |        /memspell ${travelsonggem} ${invissong}
        |        /delay 16s ${Me.SpellReady[${invissong}]}
        |    }
        |    /squelch /twist ${travelsonggem}
        |    /delay 3s 
        |}
        |/if (${Me.Casting.ID}) /delay 2s
        /call findgroup
        /varset grpnumber ${Macro.Return}
        /ini "toolismacro" "Movement" "group${grpnumber}ready" "ready"
        /delay 2
        /timed 35 /ini "toolismacro" "Movement" "group${grpnumber}ready" "empty"
    }
    /echo ${j} j (before for loop)
    /for j 1 to 30
    /echo ${j} j
    /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}]}]} && ${savedvariable} != 1) {
        /varset savedvariable ${j}
        /varset nextlocationy ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}].Arg[1,,]}
        /varset nextlocationx ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}].Arg[2,,]}
        /varset nextlocationyhigh ${Math.Calc[${nextlocationy} + 75]}
        /varset nextlocationylow ${Math.Calc[${nextlocationy} - 75]}
        /varset nextlocationxhigh ${Math.Calc[${nextlocationx} + 75]}
        /varset nextlocationxlow ${Math.Calc[${nextlocationx} - 75]}
        /if (${Me.Y} <= ${nextlocationyhigh} && ${Me.Y} >= ${nextlocationylow} && ${Me.X} <= ${nextlocationxhigh} && ${Me.X} >= ${nextlocationxlow}) {
            /echo found correct loc
            /varset savedvariable 1
            /goto :end
        }
        /varset nextlocationyhigh ${Math.Calc[${nextlocationy} + 175]}
        /varset nextlocationylow ${Math.Calc[${nextlocationy} - 175]}
        /varset nextlocationxhigh ${Math.Calc[${nextlocationx} + 175]}
        /varset nextlocationxlow ${Math.Calc[${nextlocationx} - 175]}
        /if (${Me.Y} <= ${nextlocationyhigh} && ${Me.Y} >= ${nextlocationylow} && ${Me.X} <= ${nextlocationxhigh} && ${Me.X} >= ${nextlocationxlow}) {
            /echo found nearest loc
            /varset savedvariable 1
            /goto :nearestlocloop
        }
        /echo this didnt work
        /varset nextlocationy NULL
        /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[1,,]}]}) {
            /varset savedvariable ${Math.Calc[${j} + 1]}
            /varset nextlocationy NULL          
            /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${savedvariable}].Arg[1,,]}]}) {
                /echo next j
                /next j
            }
            /if (${Bool[${Ini[movement,${TargetZone},zoneshortnames].Arg[${Math.Calc[${i} + 1]},,]}]}) {
                /varset j 0
                /next i
            }
            /if (${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]}) {
                /varset j 0
                /echo next junctions instead of j
                /varset TargetZone ${savedtargetzone}
                /next junctions
            }
        }
        /echo this fired
        /varset savedvariable ${Math.Calc[${j} + 1]}
        /delay 2
        /next i
    }
        /if (!${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]} && ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[junction]} || ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[finish]}) {
            /keypress w
            /varset didinvis 0
            /echo i have reached my destination
            /guildsay im at target destination
            /varset makecamploc ${Me.Y},${Me.X}
            /return
        } 
    :end
    /if (${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[junction]}) {
        /keypress forward
        /varset j 1
        /varset TargetZone ${savedtargetzone}
        /if (!${Bool[${Ini[movement,${savedtargetzone},junctions].Arg[${junctions},,]}]}) {
            /varset TargetZone ${startlocation.Arg[1,,]}
            /varset i ${startlocation.Arg[2,,]}
        } 
        /if (${Bool[${Ini[movement,${TargetZone},junctions].Arg[${junctions},,]}]}) {
            /echo changing junctions +1 from hitting a junction
            /next junctions
        }
    }
    /if (${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,].Equal[zonedoor]} && ${nextlocationy.NotEqual[NULL]}) {
        /keypress forward
        /varset j 1
        :doorloop
        /keypress u
        /delay 2
        /keypress u
        /delay 1s
        /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}zonedoor]}]}) {
            /face nolook loc ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}zonedoor]}
            /keypress u
        }
        /call viewing
        /if (${zoneshortname.Equal[${Zone.ShortName}]}) /goto :doorloop
        /varset nextlocationy NULL
    }
    /if (${zoneshortname.Equal[${Zone.ShortName}]}) {
        /varset tempheading ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,]})
        /if (${Math.Calc[(360 - ${tempheading}) + 45]} > 360 && ${Me.Heading.Degrees} <= ${Math.Calc[(360 - ${tempheading}) - 45]} || ${Math.Calc[(360 - ${tempheading}) + 45]} > 360 && ${Me.Heading.Degrees} <= ${Math.Calc[45 - (360 - ${tempheading})]}) {
            /goto :headingdone
        }
        /if (${Math.Calc[(360 - ${tempheading}) - 45]} < 0 && ${Me.Heading.Degrees} <= ${Math.Calc[(360 - ${tempheading}) + 45]} || ${Math.Calc[(360 - ${tempheading}) - 45]} < 0 && ${Me.Heading.Degrees} <= ${Math.Calc[45 - (360 - ${tempheading})]}) { 
            /goto :headingdone
        }
        /if (${Math.Calc[${Me.Heading.Degrees}]} >= ${Math.Calc[360 - ${tempheading}]} && ${Math.Calc[${Me.Heading.Degrees}]} <= ${Math.Calc[(360 - ${tempheading}) + 45]} || ${Math.Calc[${Me.Heading.Degrees}]} >= ${Math.Calc[(360 - ${tempheading}) - 45]} && ${Math.Calc[${Me.Heading.Degrees}]} <= ${Math.Calc[360 - ${tempheading}]}) {
            /goto :headingdone
        }
            /if (${tempheading} <= 180) {
            /echo Tempheading < 180
                /if (${Me.Heading.Degrees} >= ${Math.Calc[(360 - ${tempheading}) - 180]} && ${Me.Heading.Degrees} <= ${Math.Calc[360 - ${tempheading}]}) {
                    /varset tempheading ${Math.Calc[${tempheading} + 45]}
                    /goto :heading
                } else {
                    /if (${tempheading} <= 45) {
                        /varset tempheading ${Math.Calc[315 + ${tempheading}]}
                        /goto :heading
                    }
                    /varset tempheading ${Math.Calc[${tempheading} - 45]}
                    /goto :heading
                }
            }
            /if (${tempheading} > 180) {
            /echo Tempheading > 180
                /if (${Me.Heading.Degrees} <= ${Math.Calc[(360 - ${tempheading}) + 180]} && ${Me.Heading.Degrees} >= ${Math.Calc[360 - ${tempheading}]}) {
                    /varset tempheading ${Math.Calc[${tempheading} - 45]}
                    /goto :heading
                } else {
                    /if (${tempheading} <= 315) {
                        /varset tempheading ${Math.Calc[${tempheading} + 45]}
                        /goto :heading
                    }
                    /varset tempheading ${Math.Calc[(360 - ${tempheading}) - 45]}
                    /goto :heading
                }
            }
            :heading
            /face heading ${tempheading}
        :headingdone
        /face fast heading ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}].Arg[${j},,]}
    }
    /varset nextlocationy NULL
    /varset nextlocationx NULL
    /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}]}]}) {
        /varset nextlocationy ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}].Arg[1,,]}
        /varset nextlocationx ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}].Arg[2,,]}
    }
    :nearestlocloop
    /doevents Toggle
    /if (${Macro.Return.Equal[abort]}) {
        /varset makecamploc ${Me.Y},${Me.X}
        /return
    }
    /varset nextlocationyhigh ${Math.Calc[${nextlocationy} + 5]}
    /varset nextlocationylow ${Math.Calc[${nextlocationy} - 5]}
    /varset nextlocationxhigh ${Math.Calc[${nextlocationx} + 5]}
    /varset nextlocationxlow ${Math.Calc[${nextlocationx} - 5]}
    :movementloop
    /keypress forward hold
    /if (${nextlocationy.NotEqual[NULL]} && ${Me.Y} <= ${nextlocationyhigh} && ${Me.Y} >= ${nextlocationylow} && ${Me.X} <= ${nextlocationxhigh} && ${Me.X} >= ${nextlocationxlow}) {
        /keypress forward
        /delay 2
        /if (${Bool[${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}command]}]}) /call ${Ini[movement,${TargetZone},${Ini[movement,${TargetZone},zoneshortnames].Arg[${i},,]}loc${j}command]}
        /next j
    }
    /if (${nextlocationy.NotEqual[NULL]}) {
        /if (${Me.Y} <= ${nextlocationylow} || ${Me.X} <= ${nextlocationxlow} || ${Me.Y} >= ${nextlocationyhigh} || ${Me.X} >= ${nextlocationxhigh}) {
            /face nolook fast loc ${nextlocationy},${nextlocationx}
        }
    }
    /if (${zoneshortname.NotEqual[${Zone.ShortName}]}) {
        /if (!${InvSlot[17].Item.ID}) {
            /if (!${InvSlot[13].Item.ID} && !${Defined[amnaked]}) {
                /guildsay - i died during movement - 
                /declare amnaked int outer 100
                /doevents flush Movement
                /return
            }
        }
        /echo -- ${Zone.Name} --
        /varset nextlocationy NULL
        /keypress forward
        /varset zoneshortname ${Zone.ShortName}
        /varset tempdistance 0
        /varset invisleader 0
        /varset didinvis 0
        /varset j 1
        /varset i 0
        /delay 2
        /next i
    }
    /if (!${forcemove}) {
        /if (${invisleader}) {
            /if (${Spawn[id ${invisleader}].Distance} > 35) {
                /varset tempheading ${Spawn[id ${invisleader}].HeadingTo.Degrees}
                /varset grpnumber ${invisleader}
                /goto :grpmove
            }
            /if (${invisleader} == ${Me.ID}) {
                /varset grpnumber 0
                /for grpnumber 1 to 5
                /if (${Group.Member[${grpnumber}].Distance} > 35) {
                    /varset tempheading ${Spawn[id ${Group.Member[${grpnumber}].ID}].HeadingTo.Degrees}
                    /varset grpnumber ${Group.Member[${grpnumber}].ID}
                    :grpmove
                    /echo ${Spawn[id ${grpnumber}].Name} is out of range
                    |/echo ${Spawn[id ${grpnumber}].Heading.Degrees} their heading
                    |/echo ${Me.Heading.Degrees} my heading
                    /if (${Spawn[${grpnumber}].Distance} > 75) {
                        /echo distance > 75 waiting ><
                        |/keypress forward
                        |/goto :grpmovewaitloop
                    }
                    /if (${tempheading} >= 270) {
                        /if (${Me.Heading.Degrees} >= ${Math.Calc[${tempheading} - 90]}) {
/echo tempheading /goto
                            /keypress forward
                            /goto :grpmovewaitloop
                        }
                        /if (${Me.Heading.Degrees} >= ${Math.Calc[90 -(360 - ${tempheading})]}) {
/echo tempheading /goto
                            /keypress forward
                            /goto :grpmovewaitloop
                        }
                    }
                    /if (${tempheading} <= 90) {
                        /if (${Me.Heading.Degrees} >= ${Math.Calc[${tempheading} + 90]}) {
/echo tempheading /goto
                            /keypress forward
                            /goto :grpmovewaitloop
                        }
                        /if (${Me.Heading.Degrees} <= ${Math.Calc[360 -(90 - ${tempheading})]}) {
/echo tempheading /goto
                            /keypress forward
                            /goto :grpmovewaitloop
                        }
                    }
                    /if (${tempheading} > 90 && ${tempheading} < 270) {
                        /if (${Me.Heading.Degrees} >= ${Math.Calc[${tempheading} - 90]} && ${Me.Heading.Degrees} <= ${Math.Calc[${tempheading} + 90]}) {
                            /keypress forward
                            /goto :grpmovewaitloop
                        }
                    }
                    /echo think i've fallen behind
                    /delay 1
                    |/goto :movementloop
                    /keypress forward
                    :grpmovewaitloop
                    /delay 1
                    /if (${tempdistance} == 0) {
                        /delay 2
                        /varset tempdistance ${Spawn[id ${grpnumber}].Distance}
                        /delay 2
                        /if (${Spawn[id ${grpnumber}].Distance} == ${tempdistance}) {
                            /echo still behind, continuing
                            |/keypress forward hold
                            |/delay 1s ${Spawn[id ${grpnumber}].Distance} < 30
                            |/varset tempdistance 0
                            |/goto :movementloop
                        }
                        |/varset tempdistance 0
                    }
                    /if (${Spawn[id ${grpnumber}].Distance} < ${tempdistance}) {
                        |/echo waiting, continuing
                        |/keypress forward hold
                        /if (${Spawn[id ${grpnumber}].Distance} <= 15) {
/echo distance < tempdistance /goto
                            /varset tempdistance 0
                            /goto :movementloop
                        }
                        |/varset tempdistance 0
                    }
                    /varset tempheading 0
                    /for tempheading 1 to ${Group}
                    /if (${Spawn[id ${grpnumber}].ID}) {
                        /varset mathvar ${Spawn[id ${grpnumber}].Loc.Arg[1,,]}
                        /varset mathvar2 ${Spawn[id ${grpnumber}].Loc.Arg[2,,]}
                        /if (${Math.Abs[${mathvar}]} >= ${Math.Abs[${nextlocationy}]}) {
                            /if (${Math.Abs[${mathvar2}]} >= ${Math.Abs[${nextlocationx}]}) {
                            /varset mathvar ${Math.Calc[${Math.Abs[${mathvar}]} - ${Math.Abs[${nextlocationy}]}]}
                            /varset mathvar2 ${Math.Calc[${Math.Abs[${mathvar2}]} - ${Math.Abs[${nextlocationx}]}]}
                            /if (${Spawn[id ${grpnumber}].Loc.Arg[1,,].Find[-]} && !${nextlocationy.Find[-]}) /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[1,,]}]}]}
                            /if (!${Spawn[id ${grpnumber}].Loc.Arg[1,,].Find[-]} && ${nextlocationy.Find[-]}) /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[1,,]}]}]}
                            /if (${Spawn[id ${grpnumber}].Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[2,,]}]}]}
                            /if (!${Spawn[id ${grpnumber}].Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[2,,]}]}]}
                            /echo ${mathvar} mathvar
                            /echo ${mathvar2} mathvar2
                            /goto :mathvarfinish
                            }
                            /if (${Math.Abs[${mathvar2}]} < ${Math.Abs[${nextlocationx}]}) {
                            /varset mathvar ${Math.Calc[${Math.Abs[${mathvar}]} - ${Math.Abs[${nextlocationy}]}]}
                            /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} - ${Math.Abs[${mathvar2}]}]}
                            /if (${Spawn[id ${grpnumber}].Loc.Arg[1,,].Find[-]} && !${nextlocationy.Find[-]}) /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[1,,]}]}]}
                            /if (!${Spawn[id ${grpnumber}].Loc.Arg[1,,].Find[-]} && ${nextlocationy.Find[-]}) /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[1,,]}]}]}
                            /if (${Spawn[id ${grpnumber}].Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[2,,]}]}]}
                            /if (!${Spawn[id ${grpnumber}].Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[2,,]}]}]}
                            /echo ${mathvar} mathvar
                            /echo ${mathvar2} mathvar2
                            /goto :mathvarfinish
                            }
                        }
                        /if (${Math.Abs[${mathvar}]} < ${Math.Abs[${nextlocationy}]}) {
                            /if (${Math.Abs[${mathvar2}]} >= ${Math.Abs[${nextlocationx}]}) {
                            /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} - ${Math.Abs[${mathvar}]}]}
                            /varset mathvar2 ${Math.Calc[${Math.Abs[${mathvar2}]} - ${Math.Abs[${nextlocationx}]}]}
                            /if (${Spawn[id ${grpnumber}].Loc.Arg[1,,].Find[-]} && !${nextlocationy.Find[-]}) /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[1,,]}]}]}
                            /if (!${Spawn[id ${grpnumber}].Loc.Arg[1,,].Find[-]} && ${nextlocationy.Find[-]}) /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[1,,]}]}]}
                            /if (${Spawn[id ${grpnumber}].Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[2,,]}]}]}
                            /if (!${Spawn[id ${grpnumber}].Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[2,,]}]}]}
                            /echo ${mathvar} mathvar
                            /echo ${mathvar2} mathvar2
                            /goto :mathvarfinish
                            }
                            /if (${Math.Abs[${mathvar2}]} < ${Math.Abs[${nextlocationx}]}) {
                            /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} - ${Math.Abs[${mathvar}]}]}
                            /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} - ${Math.Abs[${mathvar2}]}]}
                            /if (${Spawn[id ${grpnumber}].Loc.Arg[1,,].Find[-]} && !${nextlocationy.Find[-]}) /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[1,,]}]}]}
                            /if (!${Spawn[id ${grpnumber}].Loc.Arg[1,,].Find[-]} && ${nextlocationy.Find[-]}) /varset mathvar ${Math.Calc[${Math.Abs[${nextlocationy}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[1,,]}]}]}
                            /if (${Spawn[id ${grpnumber}].Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[2,,]}]}]}
                            /if (!${Spawn[id ${grpnumber}].Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) /varset mathvar2 ${Math.Calc[${Math.Abs[${nextlocationx}]} + ${Math.Abs[${Spawn[id ${grpnumber}].Loc.Arg[2,,]}]}]}
                            /echo ${mathvar} mathvar
                            /echo ${mathvar2} mathvar2
                            /goto :mathvarfinish
                            }
                        }
                        :mathvarfinish
                        /varset mathvar ${Math.Calc[${mathvar} + ${mathvar2}]}
|
|INSERT zradius check here ....  /varset mathvar2 spawn[id grpnumber].z
|                                /if my z .find - && mathvar2.find -
|                                    /if my z > mathvar2
|                                        /if math.calc[my z - mathvar2] > 10
|                                            delay for distance closer or change leash variable to lesser value
|                                            /goto :mathvar2finish
|                                    /if my z < mathvar2
|                                        /if math.calc[mathvar2 - my z] > 10
|                                            delay for distance closer or change leash variable to lesser value
|                                            /goto :mathvar2finish
|                                /if my z .find + && mathvar2.find +
|                                    /if my z > mathvar2
|                                        /if math.calc[my z - mathvar2] > 10
|                                            delay for distance closer or change leash variable to lesser value
|                                            /goto :mathvar2finish
|                                    /if my z < mathvar2
|                                        /if math.calc[mathvar2 - my z] > 10
|                                            delay for distance closer or change leash variable to lesser value
|                                            /goto :mathvar2finish
|                                /if my z .find + && mathvar2.find -
|                                    /if my z > mathvar2
|                                        /if math.calc[my z - mathvar2] > 10
|                                            delay for distance closer or change leash variable to lesser value
|                                            /goto :mathvar2finish
|                                    /if my z < mathvar2
|                                        /if math.calc[mathvar2 - my z] > 10
|                                            delay for distance closer or change leash variable to lesser value
|                                            /goto :mathvar2finish
|                                /if my z .find - && mathvar2.find +
|                                    /if my z > mathvar2
|                                        /if math.calc[my z - mathvar2] > 10
|                                            delay for distance closer or change leash variable to lesser value
|                                            /goto :mathvar2finish
|                                    /if my z < mathvar2
|                                        /if math.calc[mathvar2 - my z] > 10
|                                            delay for distance closer or change leash variable to lesser value
|                                            /goto :mathvar2finish
                        :mathvar2finish
                        |/if (${Spawn[id ${grpnumber}].Distance} >= ${mathvar}) {
                        |    /echo GRP MEMBER > MATHVAR
                        |    /keypress forward hold
                        |    /delay 1
                        |    /varset tempdistance 0
                        |    /goto :movementloop
                        |}
                        |/if (${mathvar} <= 75) {
                        |    /if (${Spawn[id ${grpnumber}].Distance} < 75) {
                        |        /echo about to next tempheading
                        |        /next tempheading
                        |        /echo GRP MEMBER < mathvar, possible miscalc @ j waypoint
                        |        /keypress forward hold
                        |        /delay 1
                        |        /varset tempdistance 0
                        |        /goto :movementloop
                        |    }
                        |}
                        /if (${Spawn[id ${grpnumber}].Distance} > 75) {
                            /ini "movementerror" "movementerrorcount" "count" "${Math.Calc[${Ini[movementerror,movementerrorcount,count]} + 1].Int}"
                            /ini "movementerror" "movementerror${Ini[movementerror,movementerrorcount,count]}" "name" "${Me.Name}"
                            /ini "movementerror" "movementerror${Ini[movementerror,movementerrorcount,count]}" "data1" "->locy ${Me.Y} locx ${Me.X} |||| nexty ${nextlocationy} nextx ${nextlocationx}"
                            /ini "movementerror" "movementerror${Ini[movementerror,movementerrorcount,count]}" "data2" "->targetdist ${Spawn[id ${grpnumber}].Distance} mathvar ${mathvar} "
                            /ini "movementerror" "movementerror${Ini[movementerror,movementerrorcount,count]}" "data3" "->->->->->->->->->->->->"
                            /ini "movementerror" "movementerror${Ini[movementerror,movementerrorcount,count]}" "data4" "->grplocy ${Spawn[id ${grpnumber}].Loc.Arg[1,,]} |||| grplocx ${Spawn[id ${grpnumber}].Loc.Arg[2,,]}"
                            /ini "movementerror" "movementerror${Ini[movementerror,movementerrorcount,count]}" "data5" ""
                            /end
                        }
                        /if (${Math.Abs[${Me.Y}]} > ${Math.Abs[${nextlocationy}]}) {
                            /if (${Math.Abs[${Me.X}]} > ${Math.Abs[${nextlocationx}]}) {
                                /if (${Me.Loc.Arg[1,,].Find[-]} && !${nextlocationy.Find[-]}) {
                                    /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | > x |-| | >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | > x | |-| >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} - ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | > x | | | >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                    }
                                }
                                /if (!${Me.Loc.Arg[1,,].Find[-]} && ${nextlocationy.Find[-]}) {
                                    /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| > x |-| | >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| > x | |-| >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} - ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| > x | | | >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                    }
                                }
                                /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} - ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | > x |-| | >
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                    }
                                }
                                /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} - ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| > x | |-| >
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                    }
                                }
                                /if (${Math.Calc[(${Math.Abs[${Me.Y}]} - ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} - ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | | | > x | | | >
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                }
                            }
                            /if (${Math.Abs[${Me.X}]} < ${Math.Abs[${nextlocationx}]}) {
                                /if (${Me.Loc.Arg[1,,].Find[-]} && !${nextlocationy.Find[-]}) {
                                    /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | > x |-| | <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | > x | |-| <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${nextlocationx}]} - ${Math.Abs[${Me.X}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | > x | | | <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                    }
                                }
                                /if (!${Me.Loc.Arg[1,,].Find[-]} && ${nextlocationy.Find[-]}) {
                                    /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| > x |-| | <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| > x | |-| <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${nextlocationx}]} - ${Math.Abs[${Me.X}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| > x | | | <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                    }
                                }
                                /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} - ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | > x |-| | <
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                    }
                                }
                                /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} - ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| > x | |-| <
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                    }
                                }
                                /if (${Math.Calc[(${Math.Abs[${Me.Y}]} - ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${nextlocationx}]} - ${Math.Abs[${Me.X}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | | | > x | | | <
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                }
                            }
                        }
                        /if (${Math.Abs[${Me.Y}]} < ${Math.Abs[${nextlocationy}]}) {
                            /if (${Math.Abs[${Me.X}]} > ${Math.Abs[${nextlocationx}]}) {
                                /if (${Me.Loc.Arg[1,,].Find[-]} && !${nextlocationy.Find[-]}) {
                                    /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | < x |-| | >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | < x | |-| >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} - ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | < x | | | >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                    }
                                }
                                /if (!${Me.Loc.Arg[1,,].Find[-]} && ${nextlocationy.Find[-]}) {
                                    /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| < x |-| | >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| < x | |-| >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} - ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| < x | | | >
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                    }
                                }
                                /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                    /if (${Math.Calc[(${Math.Abs[${nextlocationy}]} - ${Math.Abs[${Me.Y}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | < x |-| | >
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                    }
                                }
                                /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                    /if (${Math.Calc[(${Math.Abs[${nextlocationy}]} - ${Math.Abs[${Me.Y}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| < x | |-| >
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                    }
                                }
                                /if (${Math.Calc[(${Math.Abs[${nextlocationy}]} - ${Math.Abs[${Me.Y}]}) + (${Math.Abs[${Me.X}]} - ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | | | < x | | | >
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                }
                            }
                            /if (${Math.Abs[${Me.X}]} < ${Math.Abs[${nextlocationx}]}) {
                                /if (${Me.Loc.Arg[1,,].Find[-]} && !${nextlocationy.Find[-]}) {
                                    /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | < x |-| | <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | < x | |-| <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${nextlocationx}]} - ${Math.Abs[${Me.X}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | < x | | | <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                    }
                                }
                                /if (!${Me.Loc.Arg[1,,].Find[-]} && ${nextlocationy.Find[-]}) {
                                    /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| < x |-| | <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                        /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| < x | |-| <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                        }
                                    }
                                    /if (${Math.Calc[(${Math.Abs[${Me.Y}]} + ${Math.Abs[${nextlocationy}]}) + (${Math.Abs[${nextlocationx}]} - ${Math.Abs[${Me.X}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| < x | | | <
                                        /keypress forward hold
                                        /delay 1
                                        /varset tempdistance 0
                                        /goto :movementloop
                                    }
                                }
                                /if (${Me.Loc.Arg[2,,].Find[-]} && !${nextlocationx.Find[-]}) {
                                    /if (${Math.Calc[(${Math.Abs[${nextlocationy}]} - ${Math.Abs[${Me.Y}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y |-| | < x |-| | <
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                    }
                                }
                                /if (!${Me.Loc.Arg[2,,].Find[-]} && ${nextlocationx.Find[-]}) {
                                    /if (${Math.Calc[(${Math.Abs[${nextlocationy}]} - ${Math.Abs[${Me.Y}]}) + (${Math.Abs[${Me.X}]} + ${Math.Abs[${nextlocationx}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | |-| < x | |-| <
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                    }
                                }
                                /if (${Math.Calc[(${Math.Abs[${nextlocationy}]} - ${Math.Abs[${Me.Y}]}) + (${Math.Abs[${nextlocationx}]} - ${Math.Abs[${Me.X}]})]} > ${Math.Calc[${mathvar} + 20]}) {
/echo me.y | | | < x | | | <
                                    /keypress forward hold
                                    /delay 1
                                    /varset tempdistance 0
                                    /goto :movementloop
                                }
                            }
                        }
                    }
                    /next tempheading
|
|if spawn id tempheading.ID { do all these checks 
|is missing a check if the distance > leash break range
|we would want to cycle through all group members to make sure all are within distance
|
|but i think due to these mechanics, all group members would have been all waiting at leash break range
|they would check properly to group leader
|
|but group leader would be checking???? only first group member and continuing if in range
|
|she is going to glitch to first person being in range for 1ms, then latch onto 2nd or 3rd w/e person being out of range
|she will stop dead and continue checking for that distance
|
|Is nextlocationy //// nextlocationx going NULL causing error in movement and chars to stop/continue wrongly
|
|should we use coordinate planes to create a fake nextlocationy //// nextlocationx continuously if none is given
|
|
|missing >= //// <= in the locations checking vs mathvar area
|
|do we use our actual tempheading to create new fake coordinate plane nextlocationy //// nextlocationx????
|we have about 59 other methods of establishing our location for real robotics //// how much use //// is necessary in game
|
|
|is there another method to glitch or manipulate for loops and already used variables to thoroughly check all grp members
|
|we can use math calc tempheading + 1000 and math calc tempheading - 1000
|to make a count of group members in range or not in range //// more calculations vs memory
|
                    /if (${Spawn[id ${grpnumber}].Distance} > 25) /goto :grpmovewaitloop
                    /echo continuing
                    /varset tempdistance 0
                    /goto :movementloop
                }
|/echo next grpnumber
                /next grpnumber
                /varset grpnumber 0
            }
        }
    }
    /delay 1
    /goto :movementloop
}
/delay 2
/if (${Bool[${Ini[movement,${TargetZone},zoneshortnames].Arg[${Math.Calc[${i} + 1]},,]}]}) /next i
/varset i 0
/next junctions
/varset junctions 1
/varset savedvariable 1
/varset TargetZone ${startlocation.Arg[1,,]}
/varset i ${startlocation.Arg[2,,]}
/echo setting targetzone and zone im in
/next junctions
/echo returning
/return

Re: movement function, movement.ini, automove to zones/spell

Posted: Sat Aug 22, 2015 2:17 am
by toolisaccount
reserved1

Re: movement function, movement.ini, automove to zones/spell

Posted: Sat Aug 22, 2015 2:19 am
by toolisaccount
reserved2

Re: movement function, movement.ini, automove to zones/spell

Posted: Sat Aug 22, 2015 2:19 am
by toolisaccount
reserved3

Re: movement function, movement.ini, automove to zones/spell

Posted: Sat Aug 22, 2015 2:21 am
by toolisaccount
reserved4