eqemu level 65 or so ench, bst, sk

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

eqemu level 65 or so ench, bst, sk

Post by toolisuber » Wed Aug 05, 2015 6:04 pm

|hi, didn't want to post these yet but im gonna put these 3 here too
|some of these macros aren't finished yet ill keep you updated~
|
|these macros are not tested on titanium yet.. they work with underfoot
|they might work with titanium
|
|NOT SAFE FOR LIVE EVER
|
|these macros all load spellset called level 62, they fail without that usually
|they like certain spells on the spellbar

ench.mac
beast.mac
sk.mac
spell_routines.inc
toolismacro.ini
rez.mac
movement functions (copy paste into ur own macros or w/e)
movement.ini
pl.mac
list of commands for /gui toggle and /gui force goto
|
|im not playing atm so these will be fixed when i get around to it
|im very angry at movement, trig, this is maths fault
|
ench is unfinished, her mez requires a copy paste im too lazy to do
ench may be missing /memspellset level 62
ench domez=0 ench will not mez or charm,mez is broken
ench shes good for buffs and nukes
ench will be improved when there is time
ench ndt will be improved in the future
ench charm is going to require coordinate plane work
ench mez is copy paste that's easy im lazy
ench charm is going to require something on my side for cliff/ wall detection

bst is good he does the growl of the leopard, notsure ifthatone isrlly worth it
bst can prolly get growl removed i dont even remember my own code

sk does not autopull, sk doesnottank, sk is dps, bards are the real tanks
sk occasionally harm touches random mobs or something
sk you can type /tell lolth buff hate and she will hatebuff ur bard or cleric

these all require spellroutines.inc, mq2twist and mq2 moveutils
type /gui buff kei group 1 or w/e and the bst and ench and clrs will go at it
type /gui buff virt group 1 clerics, bst/pal, sham will go at it

|NOT SAFE FOR LIVE EVER
|edit:NONE OF THESE MACROS ARE SAFE FOR LIVE
|edit:your characters may try to return to camp after death! endless fun
|these are my macros, I have a lot of characters
|bard clr necro is so fun so ill share these ones, im rlly a cleric
|these macros will get you banned on live plz dont
|these macros are slightly broken kind of like search so

these macros will prolly work with titanium ill check eventually
titanium macroquest and plugins instructions are in eqemu servertransfer macros post
viewforum.php?f=43

underfoot macroquest and plugins instructions are there for now
mq2-20100609 is mq build for underfoot client, its in the wiki - hidden -
http://www.macroquest2.com/downloads/zips.php

spellroutines might work not sure that's hidden in macro snippets\
included my spellroutines in other posts - its way better for running alot

this uses mq2moveutils and mq2twist from vip, donating to mq is good

moveutils for UF I think is june2011 vip plugins development post page 32
moveutils seems to have changed recently mine is 339,968 bytes
moveutils currently has no spaces and is 249,896 bytes

spell_routines for uf I think is 7/05/09 macro snippets- but ill put my own
mq2twist for UF I think is 09/22/09+ vip plugins development
mq2twist is pg26 of post, it is thepost by htw not first posting 09/22/09+....
|
|
|
|my macros are slightly broken they will not switch to the rez macro
|correctly sometimes, its because of them memming spells and I don't
|want an extra second delay for the screen to load when they are rezzed
|I think -right before memspell on all macros or something
|
|the bard will not group invis properly this is easy to fix, I wanted it without
|more variables
|
|the auto movement requires movement.ini I got a lot mapped so far
|you must use /gui force goto zonename or junctionname
|until you fix group invis or I post a fix...
|regular goto zonename is broken after zoning a lot of the time,
|
|bard will sometimes not speed song or invis song, easy fixes starter stuff
|
| there is toggle commands and movement commands
|
|these macros all load spellset called level 62, they fail without that usually
|they like certain spells on the spellbar
|
|toggle is a good read u can easily add toggles if u want, its diff in each
|macro because we don't necessarily have to have /gui toggle stick front
|affecting the clerics and the wizards
|( u may want to add this if u got leet time or tov lewts)
|
|
|my destroy function is (I think very safe) watch out for items when u click
|destroy by accident when waiting for a rez, it reads that as the same
|window, that can prolly be changed if u can get /windows (list windows) to
| work right. the destroy function is good and there is no crazy horrible
|autoinv to drop ur items like that other spell routines...
|
|handle destroy is in the main macros not the uh spell routines... and is
|used for lava orbs, soul orbs, and mod rods... not sure if anything else
| that's all to the best of my memory or whatever thx guys
|
these macros are really fun
|ench and shm don't malo/slow, manually do such its way funner
|then you are in control!
|shm now has /declare for automaticslowing of named, not preferred option
|

ench mez does not work right this sec its very easy copy paste
ench is missing /memspellset level 62 and other macros may be missing this
ench /memspellset level 62 could go in between /echo enchanter macro started and :loop
ench does not charm yet that's rlly dangerous prob is lag and coordinate planes
--------------------------
ench.mac part1
--------------------------

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 GuildAssist "#1#tells the#*#, 'assist me with#*#'"
#Event Wore "Your #1# spell has worn off of #2#."
#Event Buff "#1#tells#*#, 'buff#2#'"
#Event NDT "#1#tells you, 'ndt'"
#Event Toggle "#1#guild, '#2#toggle#3#'"
#Event Movement "#1#guild, '#2#goto#3#'"

#include spell_routines.inc

Sub Main

/declare randomstring    string outer "glitchishere"

/declare nukepause          int    outer 100
/declare stunpauseone       int    outer 350
/declare stunpausetwo       int    outer 68
/declare assistat           int    outer 98
/declare nukeat             int    outer 95
/declare stopnukesat        int    outer 1

/declare domez     int outer 0
/declare doslow    int outer 0
/declare dodebuff  int outer 0
/declare docharm   int outer 0
/declare dorune    int outer 0
/declare donukes   int outer 1
/declare dostun    int outer 0
/declare dostuntwo int outer 0

/declare mezspell       string outer "Sleep"
/declare charmspell     string outer "Command of Druzzil"
/declare slowspell      string outer "Forlorn Deeds"
/declare debuffspell    string outer "Incapacitate"
/declare nukespell      string outer "Ancient: Chaotic Visions"
/declare resistspell    string outer "Guard of Druzzil"
/declare stunspell      string outer "Dementia"
/declare stunspelltwo   string outer "Dyn's Dizzying Draught"
/declare stunspellthree string outer "Whirl till you hurl"
/declare hastespell     string outer "Speed of Vallon"
/declare runespell      string outer "Uproar"
/declare keispell       string outer "Voice of Quellious"

/declare extraspellgem  int outer 5

/declare mezduration    int outer 540
/declare charmduration  int outer 4500
/declare slowduration   int outer 1500
/declare debuffduration int outer 3900
/declare hasteduration  int outer 25200
/declare keiduration    int outer 44400
/declare runeduration   int outer 5200
/declare uproarduration int outer 5200

/declare hastebuffed0   timer outer 0
/declare hastebuffed1   timer outer 0
/declare hastebuffed2   timer outer 0
/declare hastebuffed3   timer outer 0
/declare hastebuffed4   timer outer 0
/declare hastebuffed5   timer outer 0

/declare runebuffed     timer outer 0
/declare keibuffed      timer outer 0

/declare pethasted0     timer outer 0
/declare pethasted1     timer outer 0
/declare pethasted2     timer outer 0
/declare pethasted3     timer outer 0
/declare pethasted4     timer outer 0
/declare pethasted5     timer outer 0

/declare storednpcid         int outer 0
/declare targetarray[8]      int outer 0
/declare targetarraynames[8] string outer empty
/declare storedname          string outer empty
/declare originalrunespell   string outer ${runespell}

/declare meztimer1      timer outer 0
/declare meztimer2      timer outer 0
/declare meztimer3      timer outer 0
/declare meztimer4      timer outer 0
/declare meztimer5      timer outer 0
/declare meztimer6      timer outer 0
/declare meztimer7      timer outer 0
/declare meztimer8      timer outer 0

/declare nukepausetimer    timer outer 0
/declare stunpausetimer    timer outer 0
/declare stunpausetwotimer timer outer 0

/declare makecamploc string outer ${Me.Y},${Me.X}
/declare castrune       int outer 0
/declare oldtarget      int outer 
/declare didstick       int outer 0
/declare gettarget      int outer 1
/declare targetdead     int outer 1
/declare targetid       int outer 
/declare ammoving       int outer 0

/squelch /stick off

/declare mainassist string outer
/varset mainassist ${Param0}

/if (!${Defined[Param0]}) {
    /echo This Macro needs a Main assist to run 
    /end
}

/echo enchanter macro started

:spellsetloop
/if (${NearestSpawn[PC ${Me.Name}].Name.Find[${Me.Name}]}) {
    /memspellset level 62
    /delay 46s !${Window[SpellBookWND].Open}
}
/delay 2
/if (!${NearestSpawn[PC ${Me.Name}].Name.Find[${Me.Name}]}) /goto :spellsetloop

:loop
/doevents
/if (!${ammoving} && ${Bool[${leashloc}]}) /call gotoloc
/if (!${ammoving}) /call cleartarget
/if (${gettarget} && !${ammoving}) /call gettarget
/if (${domez} && !${ammoving})     /call mezadds
/if (${targetid} && !${ammoving})  /call DoCombat
/if (!${ammoving} && ${InvSlot[13].Item.ID}) /call CheckBuffs
/if (!${ammoving}) /call CheckPetBuffs
/if (!${Me.CombatState.Equal[COMBAT]} && ${Me.PctMana} < 95 && ${Me.Standing} && !${Me.Mount.ID} && !${Me.Casting.ID} && !${ammoving} && !${Me.Moving}) /sit
/call checkstuff
/delay 2
/goto :loop

Sub gettarget

/call getids "${mainassist}"
/if (${Spawn[${Macro.Return}].ID} && ${Spawn[id ${Macro.Return}].Distance} < 200) {
    /target ID ${Macro.Return}
    /delay 2
    /assist
    /delay 4
    /if (${Target.Type.Equal[NPC]} && ${Target.Type.NotEqual[CORPSE]} && ${Target.PctHPs} < ${assistat} && ${Target.Distance} < 200) {
        /varset targetid ${Target.ID}
        /varset targetdead 0
        /varset gettarget 0
        /g assisting on %t
        /echo My Target is now ${Target.CleanName}
        /if (${Me.Pet.ID}) /pet attack
    }
}
/return

Sub CheckBuffs

/declare i int local 0 

/if (${dorune}) {
    /if (${Me.CurrentMana} > ${Spell[${runespell}].Mana} && ${Me.SpellReady[${runespell}]} && ${castrune}) {
        /call getids "${mainassist}"
        /if (${Spawn[${Macro.Return}].Distance} < 100 && ${Spawn[${Macro.Return}].Type.Equal[PC]}) {
            /target ID ${Macro.Return}
            /delay 4
            /if (${Target.Type.Equal[PC]}) /call cast ${runespell} 1s gem7
            /if (${Macro.Return.Equal["CAST_SUCCESS"]}) {
                /varset castrune 0
                /if (${runespell.Find[Uproar]}) /varset runebuffed ${uproarduration}
                /if (${runespell.Find[Rune]}) /varset runebuffed ${runeduration}
            }
        }
    }
    /if (${originalrunespell.Find[Rune]} && ${FindItem[Peridot].StackCount} > 20 && ${runespell.Find[Uproar]}) {
        /guildsay switching back to other rune spell now i have peridots
        /varset runespell ${originalrunespell}
    }
}
/if (${Me.SpellReady[${hastespell}]}) {    
    /for i 0 to ${Group}
        /if (${Me.PctMana} > 15 && !${ammoving}) {
	    /if (${Group.Member[${i}].Distance} < 100) {
                /if (${hastebuffed${i}} < 20 && ${Group.Member[${i}].Class.Name.NotEqual[Wizard]} && ${Group.Member[${i}].Class.Name.NotEqual[Magician]} && ${Group.Member[${i}].Class.Name.NotEqual[Enchanter]} && ${Group.Member[${i}].Class.Name.NotEqual[Necromancer]} && ${Group.Member[${i}].Class.Name.NotEqual[Cleric]} && ${Group.Member[${i}].Class.Name.NotEqual[Shaman]}) {     
	            /target ID ${Group.Member[${i}].ID}
                    /delay 2                
                    /gsay ${hastespell} incoming on %T
                    /call cast ${hastespell} 2s
		    /delay 2
		    /if (${Macro.Return.Equal["CAST_SUCCESS"]}) /varset hastebuffed${i} ${hasteduration} 
	        }
                /doevents
            }
        /next i
    }
}	     
/return      	
		
Sub CheckPetBuffs

/declare i int local 0

/if (${Me.SpellReady[${hastespell}]}) {
    /for i 0 to ${Group}
    /if (${Me.PctMana} > 15 && !${ammoving}) {
        /if (${Group.Member[${i}].ID} && ${Group.Member[${i}].Pet.ID}) {				
	    /if (${pethasted${i}} < 20) {
	    /target ID ${Group.Member[${i}].Pet.ID}
                /if (${Target.Distance} < 100 && ${Target.ID} == ${Group.Member[${i}].Pet.ID}) {
                    /g incoming haste on pet %t
                    /call cast ${hastespell} 2s
                    /delay 2s
                    /if (${Macro.Return.Equal["CAST_SUCCESS"]}) /varset pethasted${i} ${hasteduration}
                }
                /doevents
            }
        }
        /next i
    }
}
/return

Sub DoCombat

/if (${Target.ID} != ${targetid} && ${Spawn[${targetid}].Type.NotEqual[CORPSE]}) {
    /target ID ${targetid}
    /delay 2
}
/if (${Target.Type.Equal[NPC]} && ${Target.PctHPs} < ${assistat}) {
    /if (${Target.ID} == ${targetid} && ${donukes} && ${Target.PctHPs} < ${nukeat} && ${Target.Type.NotEqual[CORPSE]} && ${Target.PctHPs} > ${stopnukesat} && ${Me.PctMana} > 5 && !${nukepausetimer}) {
        /call cast ${nukespell} 2s
        /varset nukepausetimer ${nukepause}
    }
     /if (${Target.ID} == ${targetid} && ${dostun} && ${Target.PctHPs} < ${nukeat} && ${Target.Type.NotEqual[CORPSE]} && ${Target.PctHPs} > ${stopnukesat} && ${Me.PctMana} > 5 && !${stunpausetimer}) {
        /call cast ${stunspell} 2s
        /varset stunpausetimer ${stunpauseone}
    }
     /if (${Target.ID} == ${targetid} && ${dostuntwo} && ${Target.PctHPs} < ${nukeat} && ${Target.Type.NotEqual[CORPSE]} && ${Target.PctHPs} > ${stopnukesat} && ${Me.PctMana} > 5 && !${stunpausetwotimer}) {
        /call cast ${stunspelltwo} 2s
        /varset stunpausetwotimer ${stunpausetwo}
    }
}
/return

Sub mezadds

/declare j int local 1
/declare i int local 1

/for i 1 to ${SpawnCount[los radius 200]}
/for j 1 to 8
/if (${targetid} && ${Me.PctMana} >4) {    
    /if (${targetarray[${j}]} && ${meztimer${j}} <12){
	/target ID ${targetarray[${j}]}
        /call cast ${mezspell} 2s
	/if (${Macro.Return.Equal["CAST_SUCCESS"]}) /varset meztimer${j} ${mezduration}
    }
    /if (${NearestSpawn[${i},npc los notid ${targetid}].ID}) {
	/target ID ${NearestSpawn[${i},npc los notid ${targetid}].ID}
	/varset oldtarget ${Target.ID}
	/assist
	/if (${Target.Type.Equal[PC]}) {
	    /target ID ${oldtarget}
	    /if (${Target.Type.Equal[NPC]} && ${Target.ID} != ${targetarray[1]} && ${Target.ID} != ${targetarray[2]} && ${Target.ID} != ${targetarray[3]} && ${Target.ID} != ${targetarray[4]} && ${Target.ID} != ${targetarray[5]} && ${Target.ID} != ${targetarray[6]} && ${Target.ID} != ${targetarray[7]} && ${Target.ID} != ${targetarray[8]}) {
                /varset targetarray[${j}] ${Target.ID}
	        /varset targetarraynames[${j}] ${Target.Name}
                /call cast ${mezspell} 2s
		/if (${Macro.Return.Equal["CAST_SUCCESS"]}) /varset meztimer${j} ${mezduration}
                /next j 
            }
        }
        /call cleartarget
        /next i
    }
}    
/return

Sub checkstuff

/if (${Cursor.Name.Equal[Rod of Mystical Transvergence]}) {
    /if (${Me.FreeInventory} < 1) {
        /guildsay mod rod on cursor but no inventory room
        /return
    }
    /if (${Me.FreeInventory} > 1) /autoinv
}
/if (!${Me.Invis}) {
    /if (${FindItem[=Rod of Mystical Transvergence].ID}) {
        /if (!${FindItem[=Rod of Mystical Transvergence].TimerReady}) {
            /if (!${Cursor.ID} && ${Me.PctMana} < 85 && ${Me.CurrentHPs} > 4000) {
                /call clickitem "Rod of Mystical Transvergence" "inv"
            }
        }
    }
}
/if (!${InvSlot[13].Item.ID}) {
    /if (!${InvSlot[17].Item.ID}) {
        /if (${Zone.ShortName.Equal[poknowledge]} || ${Zone.ShortName.Equal[guildlobby]} || !${InvSlot[18].Item.ID}) {
            /if (${MacroQuest.GameState.NotEqual[INGAME]}) /return
            /if (!${Me.Gem[8].ID}) {
                :spellsetloop
                /if (${NearestSpawn[PC ${Me.Name}].Name.Find[${Me.Name}]}) {
                    /memspellset level 62
                    /delay 46s !${Window[SpellBookWND].Open}
                }
                /delay 2
                /if (!${NearestSpawn[PC ${Me.Name}].Name.Find[${Me.Name}]}) /goto :spellsetloop
            }
            /if (!${Defined[amnaked]}) /declare amnaked int local 100
            /if (!${Window[SpellBookWnd].Open}) /guildsay <==== i died ====>
            /if (!${Window[SpellBookWnd].Open} && ${Defined[amnaked]}) /docommand /mac rez ${mainassist} ${amnaked}
            /if (!${Window[SpellBookWnd].Open}) /docommand /mac rez ${mainassist}
        }
    }
}
/return

Sub cleartarget

/declare i int local 1
/for i 1 to 8

/if (${Spawn[${targetid}].Type.Equal[CORPSE]} && !${targetdead} || !${Spawn[${targetid}].Type.Equal[NPC]} && !${targetdead}) {
    /echo im clearing target
    /varset targetdead 1
    /varset gettarget 1
    /if (${Me.CombatState.NotEqual[COMBAT]} && !${NearestSpawn[1,npc radius 50].ID}) /call returntocamp "face"
}
/if (${Spawn[${targetarray[${i}]}].Type.Equal[CORPSE]} || !${Spawn[${targetarray[${i}]}].Type.Equal[NPC]} && ${Spawn[${targetarray[${i}]}].ID}) {
    /varset targetarray[${i}] 0
    /varset targetarraynames[${i}] empty
}
/if (${targetarray[${i}]} == ${targetid} && ${targetid}) {
    /varset targetarray[${i}] 0
    /varset targetarraynames[${i}] empty
}
/next i
/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 getnpcids(string name)

/declare SpawnID int local
/declare SpawnName string local
/declare i int local

/for i 1 to ${SpawnCount[los radius 200 ${name}]}
/varset SpawnID ${NearestSpawn[${i}, npc los notid ${targetid} ${name}].ID]}
/varset SpawnName ${name}
/target ID ${SpawnID}
/if ${Target.Type.Equal[NPC]} && ${Target.Type.NotEqual[CORPSE]} && ${Target.Animation} != 32) /return ${SpawnID}
/next i
/return

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 Event_GuildAssist(Line, AssistTarget)

/varset AssistTarget ${AssistTarget.Right[-2].Left[-2]}
/call getids "${AssistTarget}"
/if (${Macro.Return} && ${Spawn[id ${Macro.Return}].Distance} < 200) {
    /target ID ${Macro.Return}
    /delay 2
    /assist
    /delay 4
    /if (${Target.Type.Equal[NPC]} && ${Target.Type.NotEqual[CORPSE]} && ${Target.Distance} < 200) {
        /varset targetid ${Target.ID}
        /varset gettarget 0
        /varset targetdead 0
        /varset didstick 0
        /echo My Target is now ${Target.CleanName}
        /if (${Me.Pet.ID}) /pet back off
        /if (${Me.Pet.ID}) /delay 5
        /if (${Me.Pet.ID}) /pet attack
    }
}
/return

Sub Event_NDT(Line, NDTTarget)

/varset NDTTarget ${NDTTarget.Right[-2].Left[-2]}
/call getids "${NDTTarget}"
/if (!${Me.SpellReady["Night's Dark Terror"]} && ${Me.Book["Night's Dark Terror"]}) {
    /tell ${Spawn[id ${Macro.Return}].Name} ndt not up...
    /if (!${Me.Gem["Night's Dark Terror"]}) {
        /memspell ${extraspellgem} "Night's Dark Terror"
        /delay 2s
    }
    /return
}
/if (${Spawn[id ${Macro.Return}].ID} && ${Spawn[id ${Macro.Return}].Distance} < 100) /target ID ${Macro.Return}
/delay 2
/if (${Me.CurrentMana} > ${Spell["Night's Dark Terror"].Mana} && !${ammoving} && ${Target.ID} == ${Macro.Return} && ${Target.Distance} < 100 && ${Target.Type.Equal[PC]}) {
    /tell ${Spawn[id ${Macro.Return}].Name} ndt inc...
    /call cast "Night's Dark Terror" 2s
    /if (${Macro.Return.Equal["CAST_SUCCESS"]}) /echo ${Target} ndt buffed
}
/return

Sub Event_Wore(Line, SpellName, MyTarget)

/if (${SpellName.Find[Sleep]} || ${SpellName.Find[Bliss]}) {
    /declare i int local
    /echo this worked
    /varset MyTarget ${MyTarget.Right[-2].Left[-2]}
    /call getnpcids ${MyTarget}
    /varset storednpcid ${Macro.Return}
    /for i 1 to 8
    /if (${targetarray[${i}]} == ${storednpcid}) { 
        /varset meztimer${i} 0
        /target ID ${targetarray[${i}]}
        /call cast ${mezspell} 2s
        /if (${Macro.Return.Equal["CAST_SUCCESS"]}) /varset meztimer${j} ${mezduration}
    }
    /next i
    /return
}
/if (${SpellName.Find[Uproar]} || ${SpellName.Find[Bliss]}) {
    /if (${runespell.Find[Rune]} && ${FindItem[Peridot].StackCount} < 25) {
        /guildsay i have ${FindItem[Peridot].StackCount} peridots left
        /if (${FindItem[Peridot].StackCount} == 0 && ${Me.Book[Uproar}) {
            /guildsay i am out of peridots ill use uproar
            /varset runespell "Uproar"
            /if (!${Me.Gem[${runespell}]}) {
                /memspell 7 ${runespell}
                /delay 16s ${Me.Gem[${runespell}]}
            }
        }     
    }
    /if (!${runebuffed} || ${runebuffed} && ${Me.CombatState.Equal[COOLDOWN]} || ${runebuffed} && ${Me.CombatState.Equal[COMBAT]}) {
        /varset castrune 1
    }
    /return
}
/return

Sub Event_Buff(Line, TargetPerson, command)

/varset TargetPerson ${TargetPerson.Right[-2].Left[-2]}
/if (${command.Arg[1,].Equal[kei]} || ${command.Arg[1,].Equal[resist]}) {
    /declare tempvariable string local 
    /declare tempvariabletwo string local
    /if (${command.Arg[1,].Equal[kei]}) {
        /varset command ${command.Right[-4]}
        /varset tempvariable ${keispell}
        /varset tempvariabletwo enchkei
        /declare gemnumber int local 8
    }
    /if (${command.Arg[1,].Find[resist]}) {
        /varset command ${command.Right[-7]}
        /varset tempvariable ${resistspell}
        /varset tempvariabletwo enchresist
        /declare gemnumber int local 5
    }
    /if (${command.Arg[1,].Equal[group]}) {
        /varset command ${command.Right[-6]}
        /if (${Ini[toolismacro,Group${command},member1].NotEqual[empty]} && ${Me.Book[${tempvariable}]} && !${ammoving}) {
            /call getids "${Ini[toolismacro,Group${command},member1]}"
            /if (!${Me.Gem[${tempvariable}]} && !${Cursor.ID}) {
                /memspell ${gemnumber} ${tempvariable}
                /delay 18s !${Window[SpellBookWND].Open}
                /keypress w
            }
            /if (${Spawn[id ${Macro.Return}].Distance} < 100 && ${Me.CurrentMana} > ${Spell[${tempvariable}].Mana} && ${Ini[toolismacro,Values,${tempvariabletwo}buffer].Equal[empty]} || ${Spawn[id ${Macro.Return}].Distance} < 100 && ${Ini[toolismacro,Values,${tempvariabletwo}buffertargetgroup]} != 0 && ${Ini[toolismacro,Values,${tempvariabletwo}buffertargetgroup]} != ${command}) /delay 6s ${Me.SpellReady[${tempvariable}]}
            /if (${Spawn[id ${Macro.Return}].Distance} < 100 && ${Me.SpellReady[${tempvariable}]} && ${Me.CurrentMana} > ${Spell[${tempvariable}].Mana} && ${Ini[toolismacro,Values,${tempvariabletwo}buffer].Equal[empty]} || ${Spawn[id ${Macro.Return}].Distance} < 100 && ${Me.SpellReady[${tempvariable}]} && ${Me.CurrentMana} > ${Spell[${tempvariable}].Mana} && ${Ini[toolismacro,Values,${tempvariabletwo}buffertargetgroup]} != 0 && ${Ini[toolismacro,Values,${tempvariabletwo}buffertargetgroup]} != ${command}) {
                /ini "toolismacro" "Values" "${tempvariabletwo}buffer" "${Me.Name}"
                /ini "toolismacro" "Values" "${tempvariabletwo}buffertargetgroup" "${command}"
                /guildsay ${tempvariable} inc group ${command}
                /target ID ${Macro.Return}
                /delay 2
                /if (${Target.ID} == ${Macro.Return} && ${Target.Distance} < 100 && ${Target.Type.Equal[PC]}) {
                    /tell ${Spawn[id ${Macro.Return}].Name} ${tempvariable} inc...
                    /call cast ${tempvariable} 2s
                    /if (${Macro.Return.Equal["CAST_SUCCESS"]}) /echo ${Target}'s grp has ${tempvariable}
                }
                /if (${Ini[toolismacro,Values,${tempvariabletwo}buffertargetgroup]} == ${command}) {
                    /ini "toolismacro" "Values" "${tempvariabletwo}buffer" "empty"
                    /ini "toolismacro" "Values" "${tempvariabletwo}buffertargetgroup" "0"
                }
            }
        }
    /return
    }
    /call getids "${TargetPerson}"
    /if (${Spawn[id ${Macro.Return}].ID} && ${Spawn[id ${Macro.Return}].Distance} < 100) /target ID ${Macro.Return}
    /delay 2
    /if (${Target.ConColor.Equal[GREY]} || ${Target.ConColor.Equal[GREEN]}) {
        /if (${tempvariable.Equal[${resistspell}]}) /varset tempvariable "Group Magic Resist"
        /if (${tempvariable.Equal[${keispell}]}) /varset tempvariable "Clarity"
    }
    /if (${Me.PctMana} > 15 && !${ammoving} && ${Target.ID} == ${Macro.Return} && ${Target.Distance} < 100 && ${Target.Type.Equal[PC]}) {
        /if (!${Me.Gem[${tempvariable}]} && !${Cursor.ID}) {
            /memspell ${gemnumber} ${tempvariable}
            /delay 18s !${Window[SpellBookWND].Open}
            /keypress w
        }
        /tell ${Spawn[id ${Macro.Return}].Name} ${tempvariable} inc...
        /delay 6s ${Me.SpellReady[${tempvariable}]}
        /call cast ${tempvariable} 1s
        /if (${Macro.Return.Equal["CAST_SUCCESS"]}) /echo ${Target} ${tempvariable} buffed
    }
}
/return

Sub clickitem(ClickItem, ReplaceSlot)

/if (${ReplaceSlot.Find[inv]}) /declare targetslot string local 100
/if (!${ReplaceSlot.Find[inv]}) /declare targetslot int local ${ReplaceSlot}
/if (!${Defined[ClickItem]}) {
    /echo target item not defined - returning
    /return
}
/if (!${Defined[ReplaceSlot]}) {
    /echo replace slot not defined - inv or slot # plz -returning
    /return
}
/if (${Cursor.ID}) {
    /guildsay trying to click item but stuff is on my cursor
    /return
}   
/if (${FindItem[=${ClickItem}].ID} && !${Cursor.ID}) {
    /declare castingtime float local ${FindItem[=${ClickItem}].CastTime}
    /declare slotnumber int local
    /declare packnumber int local
    /declare i int local
    /declare j int local
    /for i 1 to 8
    /for j 1 to 10
    /if (${InvSlot[Pack${i}].Item.Item[${j}].Name.Equal[${ClickItem}]}) {
    /echo found item in bag
        /varset packnumber ${i}
        /varset slotnumber ${j}
        /goto :click
    }
    /next j
    /varset j 0
    /next i
    /varset i 0
    /for i 1 to 8
    /if (${InvSlot[${Math.Calc[22 + ${i}]}].Item.Name.Equal[${ClickItem}]}) {
        /echo found item in main slot
        /varset packnumber ${i}
        /varset targetslot pack${packnumber}
        /declare invitem int local 1
        /goto :click
    }
    /next i
    /varset i 0
    :click
    /if (!${Window[InventoryWindow].Open}) /keypress i
    /if (!${Window[pack${packnumber}].Open} && !${Defined[invitem]}) /nomodkey /itemnotify pack${packnumber} rightmouseup
    /delay 2
    /if (!${Defined[invitem]}) /nomodkey /itemnotify in pack${packnumber} ${slotnumber} leftmouseup
    /if (${Defined[invitem]}) {
        /echo using ${ClickItem}
        /nomodkey /itemnotify ${InvSlot[${Math.Calc[22 + ${packnumber}]}]} rightmouseup
        /delay 2
        /if (${castingtime} > 0.50) /delay ${Math.Calc[${castingtime} * 10]}
        /keypress i
        /deletevar invitem
        /return
    }
    /delay 2
    /if (${Cursor.Name.Equal[${ClickItem}]}) {
        /echo Using ${ClickItem}
        /if (${Defined[targetslot]}) /varset targetslot ${InvSlot[${targetslot}]}
        /if (${targetslot} == 100) /varset targetslot pack${packnumber}
        /nomodkey /itemnotify ${targetslot} leftmouseup
        /delay 2
        /nomodkey /itemnotify ${targetslot} rightmouseup
        /if (${castingtime} > 0.50) /delay ${Math.Calc[${castingtime} * 10]}
        /delay 4
        /if (!${ReplaceSlot.Find[inv]}) /nomodkey /itemnotify ${InvSlot[${targetslot}]} leftmouseup
        /if (${ReplaceSlot.Find[inv]}) /nomodkey /itemnotify ${InvSlot[${Math.Calc[22 + ${packnumber}]}]} leftmouseup
        /delay 4
        /if (${Cursor.Name.Equal[${ClickItem}]}) {
            /nomodkey /itemnotify pack${packnumber} rightmouseup
            /delay 2
            /nomodkey /itemnotify in pack${packnumber} ${slotnumber} leftmouseup
            /delay 2
            /nomodkey /itemnotify pack${packnumber} rightmouseup
            /delay 2
        }
    }
    /keypress i
}    
/return

Sub handledestroy(TargetItem)

/if (!${Defined[TargetItem]}) {
    /echo target item not defined, returning
    /return
}
/if (${FindItem[=${TargetItem}].ID} && !${Cursor.ID}) {
    /declare slotnumber int local
    /declare packnumber int local
    /declare i int local
    /declare j int local
    /for i 1 to 8
    /for j 1 to 10
    /if (${InvSlot[Pack${i}].Item.Item[${j}].Name.Equal[${TargetItem}]}) {
        /echo item is in pack
        /varset packnumber ${i}
        /varset slotnumber ${j}
        /goto :destroy
    }
    /next j
    /varset j 0
    /next i
    /varset i 0
    /for i 1 to 8
    /if (${InvSlot[${Math.Calc[22 + ${i}]}].Item.Name.Equal[${TargetItem}]}) {
        /echo found item in main slot
        /varset packnumber ${i}
        /declare invitem int local 1
        /goto :destroy
    }
    /next i
    /varset i 0
    :destroy
    /if (!${Window[InventoryWindow].Open}) /keypress i
    /if (!${Window[pack${packnumber}].Open} && !${Defined[invitem]}) /nomodkey /itemnotify pack${packnumber} rightmouseup
    /delay 2
    /if (!${Defined[invitem]}) /nomodkey /itemnotify in pack${packnumber} ${slotnumber} leftmouseup
    /if (${Defined[invitem]}) /nomodkey /itemnotify pack${packnumber} leftmouseup
    /delay 2
    /if (${Cursor.Name.Equal[${TargetItem}]}) {
        /echo destroying ${TargetItem}
        /if (${Cursor.Name.Equal[${TargetItem}]}) {
            /echo destroying ${Cursor.Name}
            /destroy
            /if (${Defined[invitem]}) /deletevar invitem
        }
    }
    /if (${Window[pack${packnumber}].Open}) /nomodkey /itemnotify pack${packnumber} rightmouseup
    /delay 2
    /keypress i
}    
/return

Sub Event_Toggle(Line, ChatSender, Targets, action)

/if (!${Bool[${action}]}) /return
/if (${Bool[${Targets}]}) {   
    /if (${Targets.Arg[1,].Equal[group]}) {
        /if (${Targets.Arg[1,].Equal[group]}) {
            /declare groupnumber int local
            /call findgroup
            /varset Targets ${Targets.Right[-6]}
            /for groupnumber 1 to ${Ini[toolismacro,Values,totalgroups]}
            /if (${Targets.Arg[${groupnumber},,]} == ${Macro.Return}) {
                /goto :togglestuff
            } else {
                /next groupnumber 
                /return
            }
        }
    }
    /if (${Targets.Arg[1,].Equal[healers]}) {
        /if (${Me.Class.HealerType}) /goto :togglestuff
        /return
    }
    /if (${Targets.Arg[1,].Equal[casters]}) {
        /if (${Me.Class.PureCaster}) /goto :togglestuff
        /return
    }
    /declare name int local 
    /for name 1 to 12
    /if (${Targets.Arg[${name},].Equal[${Me.Name}]}) /goto :togglestuff
    /next name
    /return
}
:togglestuff
/if (${action.Find[abort]}) {
    /keypress forward
    /varset didinvis 0
    /guildsay !ABORTING!
    /return abort
}
/if (${action.Arg[1,].Equal[leash]}) {
    /varset action ${action.Right[-6]}
    /if (${Bool[${Ini[movement,leash,${action}]}]}) {
        /if (!${Defined[leashloc]}) /declare leashloc string outer
        /declare i int local
        /for i 1 to 10
        /if (${Ini[movement,leash,zoneshortnames].Arg[${i},,].Equal[${Zone.ShortName}]}) {
            /varset leashloc ${Ini[movement,leash,${action}]}
        }
        /next i
    }
/return
}
/if (${action.Arg[1,].Equal[zoneout]}) {
    /varset action ${action.Right[-8]}
    /if (${Bool[${Ini[movement,zoneout,${action}]}]}) {
        /if (!${Defined[zoneoutloc]}) /declare zoneoutloc string outer
        /declare i int local
        /for i 1 to 10
        /if (${Ini[movement,zoneout,zoneshortnames].Arg[${i},,].Equal[${Zone.ShortName}]}) {
            /if (!${Defined[zoneoutcommand]}) /declare zoneoutcommand string outer empty
            /if (${Bool[${Ini[movement,zoneout,${action}command]}]}) /varset zoneoutcommand ${Ini[movement,zoneout,${action}command]}
            /varset zoneoutloc ${Ini[movement,zoneout,${action}]}
            /call gotoloc "${zoneoutloc}" "${zoneoutcommand}"
            /return
        }
        /next i
    }
    /return
}
/if (${action.Arg[1,].Equal[leashoff]}) {
    /if (${Defined[leashloc]}) /deletevar leashloc
    /return  
}
/if (${action.Arg[1,].Equal[tank]}) {
    /if (${action.Arg[1,].Equal[tank]}) /varset action ${action.Right[-5]}
    /varset mainassist ${action}
    /return
}
/if (${action.Find[/mac]}) {
/varset action ${action.Right[-5]}
    /if (${action.Arg[1,].Equal[start]}) {
        /varset action ${action.Right[-6]}
        /if (${Me.Class.Name.Equal[Beastlord]}) /docommand /mac beast ${action}
        /if (${Me.Class.Name.Equal[Shadowknight]}) /docommand /mac sk ${action}
        /if (${Me.Class.Name.Equal[Magician]}) /docommand /mac mage ${action}
        /if (${Me.Class.Name.Equal[Necromancer]}) /docommand /mac necro ${action}
        /if (${Me.Class.Name.Equal[Wizard]}) /docommand /mac wiz ${action}
        /if (${Me.Class.Name.Equal[Enchanter]}) /docommand /mac ench ${action}
        /if (${Me.Class.Name.Equal[Bard]}) /docommand /mac bard ${action}
        /if (${Me.Class.Name.Equal[Cleric]}) /docommand /mac cleric ${action}
        /if (${Me.Class.Name.Equal[Shaman]}) /docommand /mac shaman ${action}
        /if (${Me.Class.Name.Equal[Monk]}) /docommand /mac monk ${action}
        /if (${Me.Class.Name.Equal[Rogue]}) /docommand /mac rogue ${action}
        /if (${Me.Class.Name.Equal[Paladin]}) /docommand /mac paladin ${action}
        /if (${Me.Class.Name.Equal[Ranger]}) /docommand /mac ranger ${action}
        /if (${Me.Class.Name.Equal[Berserker]}) /docommand /mac berserker ${action}
        /if (${Me.Class.Name.Equal[Druid]}) /docommand /mac druid ${action}
    }
    /declare i int local
    /for i 1 to 15
    /if (${Ini[toolismacro,Values,macros].Arg[${i},,].Equal[${action.Arg[1,]}]}) {
        /docommand /mac ${action}
    }
    /next i
    /varset i 0
    /for i 1 to 10
    /if (${Ini[toolismacro,Values,othermacros].Arg[${i},,].Equal[${action.Arg[1,]}]}) {
        /docommand /mac ${action}
    }
    /next i
    /echo Macro not found
    /return
}
/if (${action.Find[nuke]}) {
    /if (${action.Find[dont]} || ${action.Find[off]}) {
        /varset donukes 0
        /echo turning nukes OFF
        /return
    }
    /varset donukes 1
    /echo turning nukes ON
    /return
}
/if (${action.Find[rune]}) {
    /declare i int local
    /declare j int local
    /if (${action.Find[dont]} || ${action.Find[off]}) {          
        /varset dorune 0
        /varset donukes 1
        /echo turning rune OFF
        /echo turning nukes ON
        /return            
    }
    /if (${action.Find[zebuxoruk]} || ${action.Find[zeb]} || ${action.Find[z]}) {
        /echo using Rune of Zebuxoruk
        /varset runespell "Rune of Zebuxoruk"
    }
    /if (${action.Find[v]}) {
        /echo using rune 5
        /varset runespell "Rune V"
    }
    /if (${action.Find[uproar]}) {
        /echo using uproar rune
        /varset runespell "Uproar"
    }
    /if (${runespell.Find[Rune]}) {
        /guildsay i have ${FindItem[Peridot].StackCount} peridots left
        /if (${FindItem[Peridot].StackCount} == 0) {
            /if (${Me.Book[Uproar]}) {
                /varset runespell "Uproar"
                /guildsay changing rune to uproar instead
            } else {
                /guildsay im out of peridots and i dont have uproar
                /return
            }     
        }
        /if (!${Me.Gem[${runespell}]}) {
            /memspell 7 ${runespell}
            /delay 16s ${Me.Gem[${runespell}]}
        }
        /varset dorune 1
        /varset castrune 1
        /varset donukes 0
|        /varset dostun 0
|        /varset dostuntwo 0
        /echo turning nukes OFF
        /echo now doing rune
        /return
    }
    /return
}
/if (${action.Find[accept rez]}) {
    /if (${Window[ConfirmationDialogBox].Open} || !${InvSlot[13].Item.ID}) {
        /docommand /mac rez ${mainassist} 
    }
    /return
}
/if (${action.Find[consent]}) {
    /varset action ${action.Right[-8]}
    /consent ${action}
    /return
}
/if (${action.Find[mod rod]}) {
    /if (${Cursor.ID}) {
        /guildsay ITEM ON CURSOR - MOD RODS COMING
        /return
    }
    /if (${Me.FreeInventory} < 1 && !${FindItem[=Rod of Mystical Transvergence].ID}) {
        /guildsay NO ROOM IN BAGS - MOD RODS COMING
        /return
    }
    /if (${FindItem[=Rod of Mystical Transvergence].ID} && ${FindItem[=Rod of Mystical Transvergence].Charges} < 3) /call handledestroy "Rod of Mystical Transvergence"
    /return
}
/if (${action.Find[rebuff]}) {
    /declare i int local
    /for i 0 to 5
    /declare hastebuffed${i} 0
    /declare pethasted${i} 0
    /next i
    /return
}
/if (${action.Find[pet]}) {
    /if (${action.Find[pet haste]}) {
        /if (${action.Find[dont pet haste]} || ${action.Find[no pet haste]} || ${action.Find[pet haste off]}) { 
            /nomodkey /notify PIW_BuffWindow PetBuff${Math.Calc[(${Me.PetBuff[${petbuffspell}]}+ 1)- 2].Int} leftmouseup
            /varset pethasteoff 1
            /varset pethastetimer 0
            /echo NOT hasting pet
            /return    
        }
        /varset pethasteoff 0
        /echo Hasting pet as normal
        /return
    }
    /if (${action.Find[kill pet]}) {
        /pet leave
        /varset dopet 0
        /return
    }
    /if (${action.Find[do pet]}) {
        /varset dopet 1
        /return
    }
/return
}
/if (${action.Find[anon]}) {
    /docommand /a
    /return
}
/if (${action.Find[camp]}) {
    /if (${Me.Trader}) /return
    /if (${action.Find[desktop]}) {
        /camp desktop
        :action
        /doevents toggle
        /if (${Macro.Return.Equal[cancel]}) /return
        /delay 2
        /goto :action
        /return
    }
    /camp
    :action
    /doevents toggle
    /if (${Macro.Return.Equal[cancel]}) /return
    /delay 2
    /goto :action
/return
}
/if (${action.Find[cancel]}) {
    /return cancel
}
/if (${action.Find[assistat]}) {
    /echo setting assistat to ${action.Arg[2,]}
    /varset assistat ${action.Arg[2,]}
    /if (${Defined[nukeat]}) /varset nukeat ${action.Arg[2,]}
    /return
}
/if (${action.Find[/ex]}) {
    /if (${Me.Trader}) /return
    /docommand /exit
}
/if (${action.Find[throne]}) {
    /aa act Throne of Heroes
    /return
}
/if (${action.Find[infusion]}) {
    /aa act Infusion of the Faithful
    /return
}
/if (${action.Find[lesson]}) {
    /aa act Lesson of the Devoted
    /return
}
/if (${action.Find[intensity]}) {
    /aa act Intensity of the Resolute
    /return
}
/if (${action.Find[expedient]} || ${action.Find[expediant]}) {
    /aa act Expedient Recovery
    /return
}
/if (${action.Find[pagedown]}) {
    /keypress Page_Down hold 
    /delay 1s
    /keypress Page_Down
    /return
}
/return
Last edited by toolisuber on Tue Sep 08, 2015 4:27 am, edited 21 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu level 65 or so ench, bst, sk

Post by toolisuber » Wed Aug 05, 2015 6:05 pm

ench.mac part2
--------------------

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

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu level 65 or so ench, bst, sk

Post by toolisuber » Wed Aug 05, 2015 6:06 pm

beast.mac
-----------------

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 GuildAssist "#1#tells the#*#, 'assist me with#*#'"
#Event Buff "#1#tells#*#, 'buff#2#'"
#Event Enraged  "#1# enraged#*#"
#Event Toggle "#1#guild, '#2#toggle#3#'"
#Event Movement "#1#guild, '#2#goto#3#'"

#include spell_routines.inc

Sub Main

/declare randomstring    string outer "glitchishere"

/declare healspell              string outer "Trushar's Mending"
/declare pethealspell           string outer "Sha's Restoration"
/declare ddspell                string outer "Trushar's Frost"
/declare ddspelltwo             string outer "Frost Spear"
/declare hpspell                string outer "Spiritual Vigor"
/declare beastcrackspell        string outer "Spiritual Dominion"
/declare petspell               string outer "Spirit of Sorsha"
/declare petprocspell           string outer "Spirit of Rellic"
/declare pethastespell          string outer "Arag's Celerity"

/declare cripplespell           string outer "Listless Power"

/declare growlduration          int outer 720
/declare crippleduration        int outer 3300
/declare beastcrackduration     int outer 43200
/declare petprocduration        int outer 28800
/declare pethasteduration       int outer 27000

/declare healclerics            int outer 1
/declare healoutofgroupclerics  int outer 1
/declare doddspell              int outer 1
/declare doddspelltwo           int outer 1
/declare docripple              int outer 0

/declare healat                 int outer 45
/declare nukeat                 int outer 98
/declare crippleat              int outer 98
/declare stopcrippleat          int outer 10
/declare assistat               int outer 98

/declare growltimer             timer outer
/declare crippletimer           timer outer 
/declare beastcracktimer        timer outer
/declare petproctimer           timer outer
/declare pethastetimer          timer outer

/declare sticktype           string outer behindonce loose 8
/declare makecamploc         string outer ${Me.Y},${Me.X}
/declare dopet                  int outer 1
/declare storedpetid            int outer 0
/declare pethasteoff            int outer 0
/declare clericids[6]           int outer 0
/declare didstick               int outer 0
/declare gettarget              int outer 1
/declare targetdead             int outer 1
/declare targetid               int outer 
/declare ammoving               int outer 0

/squelch /stick off

/declare mainassist string outer
/varset mainassist ${Param0}
/if (${Param1} == 1) /varset healoutofgroupclerics 1
/if (${Defined[Param2]}) /varset dopet ${Param2}

/echo beastlord macro started

:spellsetloop
/if (${NearestSpawn[PC ${Me.Name}].Name.Find[${Me.Name}]}) {
    /memspellset level 62
    /delay 46s !${Window[SpellBookWND].Open}
}
/delay 2
/if (!${NearestSpawn[PC ${Me.Name}].Name.Find[${Me.Name}]}) /goto :spellsetloop

:loop
/call checkstuff
/if (!${ammoving} && ${Bool[${leashloc}]}) /call gotoloc
/if (!${ammoving} && ${Me.PctMana} > 20) /call checkpetbuffs
/if (!${ammoving}) /call cleartarget
/if (${gettarget} && !${ammoving}) /call gettarget
/if (${targetid} == ${Target.ID}) /call killtarg
/if (!${ammoving} && ${Me.PctMana} < 95 && !${Me.Moving} && ${Me.Standing} && !${Me.CombatState.Equal[COMBAT]} && !${Me.CombatState.Equal[COOLDOWN]}) /sit
/doevents
/delay 2
/goto :loop


Sub gettarget

/call getids "${mainassist}"
/if (${Spawn[${Macro.Return}].ID} && ${Spawn[id ${Macro.Return}].Distance} < 200) {
    /target ID ${Macro.Return}
    /delay 2
    /assist
    /delay 4
    /if (${Target.Type.Equal[NPC]} && ${Target.Type.NotEqual[CORPSE]} && ${Target.PctHPs} < ${assistat} && ${Target.Distance} < 200) {
        /varset targetid ${Target.ID}
        /varset targetdead 0
        /varset gettarget 0
        /varset didstick 0
        /g assisting on %t
        /echo My Target is now ${Target.CleanName}
        /if (${Me.Pet.ID}) /pet attack
    }
}
/return

Sub killtarg

/if (!${didstick} && ${Target.Type.Equal[NPC]} && ${Target.ID} == ${targetid}) {
    /face fast nolook id ${targetid}
    /attack on
    /stick ${sticktype}
    /if (${Me.Pet.ID}) /pet attack
    /varset didstick 1
    /delay 2
}
/if (${Me.AbilityReady["Kick"]} && ${Target.Type.Equal[NPC]}) {
    /if (!${Defined[dontmelee]}) {
        /doability "Kick"
    }
}
/if (${Me.Pet.ID} && ${Me.Pet.PctHPs} < 20 && ${Me.AltAbilityReady["Mend Companion"]}) {
    /aa act Mend Companion
}
/if (${Me.PctHPs} < 60 && ${Me.CombatAbilityReady["Protective Spirit Discipline"]}) {
    /doability "Protective Spirit Discipline"
}
/if (${Me.CombatAbilityReady["Bestial Fury Discipline"]} && ${Target.PctHPs} < 95 && ${Target.Type.Equal[NPC]}) {
    /doability "Bestial Fury Discipline"
}
/if (${Me.PctMana} > 5) {
    /if (${Me.Pet.ID} && ${growltimer} < 4) {
        /if (${Me.Gem["Growl of the Leopard"]} && !${Me.Moving}) {
            /varset didstick 0
            /call cast "Growl of the Leopard" 1s
            /if (${Macro.Return.Equal["CAST_SUCCESS"]}) /varset growltimer ${growlduration}
        }
    }
    /if (${doddspell}) {
        /if (${Me.SpellReady[${ddspell}]} && ${Me.PctHPs} > 40 && ${Target.Type.Equal[NPC]} && ${Target.Type.NotEqual[CORPSE]} && ${Target.PctHPs} < ${nukeat}) {
        /call cast ${ddspell} 
        }
    }
    /if (${doddspelltwo}) {
        /if (${Me.SpellReady[${ddspelltwo}]} && ${Me.PctHPs} > 40 && ${Target.Type.Equal[NPC]} && ${Target.Type.NotEqual[CORPSE]} && ${Target.PctHPs} < ${nukeat}) {
        /call cast ${ddspelltwo} 
        }
    }
}
/return

Sub cleartarget

/if (${Spawn[${targetid}].Type.Equal[CORPSE]} && !${targetdead} || !${Spawn[${targetid}].Type.Equal[NPC]} && !${targetdead}) {
    /varset targetdead 1
    /varset gettarget 1
    /varset didstick 0
    /stick off
    /attack off
    /if (${Me.CombatState.NotEqual[COMBAT]} && !${NearestSpawn[1,npc radius 50].ID}) /call returntocamp "face"
}
/if (${Target.ID} != ${targetid} && ${Spawn[${targetid}].Type.Equal[NPC]} && ${Spawn[${targetid}].ID}) /target ID ${targetid}
/return

Sub checkpetbuffs

/if (!${Me.Pet.ID} && ${Me.SpellReady[${petspell}]} && ${dopet}) {
    /call cast ${petspell} 2s
    /if (${Macro.Return.Equal["CAST_SUCCESS"]}) {
        /varset storedpetid ${Me.Pet.ID}
        /varset pethastetimer 0
        /varset petproctimer 0
    }
}
/if (${Me.Pet.ID} && ${Me.Pet.ID} != ${storedpetid}) {
    /varset storedpetid ${Me.Pet.ID}
    /varset petproctimer 0
    /varset pethastetimer 0
}
/if (${Me.Pet.ID} && ${petproctimer} < 450 && ${Me.PctMana} > 15 && ${Me.PctHPs} > 60) {
    /call cast ${petprocspell} 2s
    /if (${Macro.Return.Equal["CAST_SUCCESS"]}) /varset petproctimer ${petprocduration}
}
/if (${Me.Pet.ID} && ${pethastetimer} < 450 && ${Me.PctMana} > 15 && ${Me.PctHPs} > 60 && !${pethasteoff}) {
    /call cast ${pethastespell} 2s
    /if (${Macro.Return.Equal["CAST_SUCCESS"]}) /varset pethastetimer ${pethasteduration}       
}
/return

Sub checkstuff

/if (${Cursor.Name.Equal[Rod of Mystical Transvergence]}) {
    /if (${Me.FreeInventory} < 1) {
        /guildsay mod rod on cursor but no inventory room
        /return
    }
    /if (${Me.FreeInventory} > 1) /autoinv
}
/if (!${Me.Invis}) {
    /if (${FindItem[=Rod of Mystical Transvergence].ID}) {
        /if (!${FindItem[=Rod of Mystical Transvergence].TimerReady}) {
            /if (!${Cursor.ID} && ${Me.PctMana} < 85 && ${Me.CurrentHPs} > 4000) {
                /call clickitem "Rod of Mystical Transvergence" "inv"
            }
        }
    }
}
/if (!${InvSlot[13].Item.ID}) {
    /if (!${InvSlot[17].Item.ID}) {
        /if (${Zone.ShortName.Equal[poknowledge]} || ${Zone.ShortName.Equal[guildlobby]} || !${InvSlot[18].Item.ID}) {
            /if (${MacroQuest.GameState.NotEqual[INGAME]}) /return
            /if (!${Me.Gem[8].ID}) {
                :spellsetloop
                /if (${NearestSpawn[PC ${Me.Name}].Name.Find[${Me.Name}]}) {
                    /memspellset level 62
                    /delay 46s !${Window[SpellBookWND].Open}
                }
                /delay 2
                /if (!${NearestSpawn[PC ${Me.Name}].Name.Find[${Me.Name}]}) /goto :spellsetloop
            }
            /if (!${Defined[amnaked]}) /declare amnaked int local 100
            /if (!${Window[SpellBookWnd].Open}) /guildsay <==== i died ====>
            /if (!${Window[SpellBookWnd].Open} && ${Defined[amnaked]} && ${Me.Pet.ID} && ${dopet}) /docommand /mac rez ${mainassist} ${healoutofgroupclerics} ${amnaked} ${dopet}
            /if (!${Window[SpellBookWnd].Open} && ${Defined[amnaked]} && !${Me.Pet.ID} && !${dopet}) /docommand /mac rez ${mainassist} ${healoutofgroupclerics} ${amnaked} ${dopet}
            /if (!${Window[SpellBookWnd].Open} && ${Me.Pet.ID} && ${dopet}) /docommand /mac rez ${mainassist} ${healoutofgroupclerics} ${dopet}
            /if (!${Window[SpellBookWnd].Open} && !${Me.Pet.ID} && !${dopet}) /docommand /mac rez ${mainassist} ${healoutofgroupclerics} ${dopet}
        }
    }
}
/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 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 Event_GuildAssist(Line, AssistTarget)

/varset AssistTarget ${AssistTarget.Right[-2].Left[-2]}
/call getids "${AssistTarget}"
/if (${Macro.Return} && ${Spawn[id ${Macro.Return}].Distance} < 200) {
    /target ID ${Macro.Return}
    /delay 2
    /assist
    /delay 4
    /if (${Target.Type.Equal[NPC]} && ${Target.Type.NotEqual[CORPSE]} && ${Target.Distance} < 200) {
        /varset targetid ${Target.ID}
        /varset gettarget 0
        /varset targetdead 0
        /varset didstick 0
        /echo My Target is now ${Target.CleanName}
        /if (${Me.Pet.ID}) /pet back off
        /if (${Me.Pet.ID}) /delay 5
        /if (${Me.Pet.ID}) /pet attack
    }
}
/return

Sub Event_Buff(Line, TargetPerson, command)

/varset TargetPerson ${TargetPerson.Right[-2].Left[-2]}
/if (${command.Arg[1,].Equal[kei]} || ${command.Arg[1,].Equal[virt]}) {
    /declare tempvariable string local 
    /declare tempvariabletwo string local
    /if (${command.Arg[1,].Equal[kei]}) {
        /varset command ${command.Right[-4]}
        /varset tempvariable ${beastcrackspell}
        /varset tempvariabletwo bstcrack
        /declare gemnumber int local 5
    }
    /if (${command.Arg[1,].Equal[virt]}) {
        /varset command ${command.Right[-5]}
        /varset tempvariable ${hpspell}
        /varset tempvariabletwo bsthp
        /declare gemnumber int local 4
    }
    /if (${command.Arg[1,].Equal[group]}) {
        /varset command ${command.Right[-6]}
        /if (${Ini[toolismacro,Group${command},member1].NotEqual[empty]} && ${Me.Book[${tempvariable}]} && !${ammoving}) {
            /call getids "${Ini[toolismacro,Group${command},member1]}"
            /if (!${Me.Gem[${tempvariable}]} && !${Cursor.ID}) {
                /memspell ${gemnumber} ${tempvariable}
                /delay 18s !${Window[SpellBookWND].Open}
                /keypress w
            }
            /if (${Spawn[id ${Macro.Return}].Distance} < 100 && ${Me.CurrentMana} > ${Spell[${tempvariable}].Mana} && ${Ini[toolismacro,Values,${tempvariabletwo}buffer].Equal[empty]} || ${Spawn[id ${Macro.Return}].Distance} < 100 && ${Ini[toolismacro,Values,${tempvariabletwo}buffertargetgroup]} != 0 && ${Ini[toolismacro,Values,${tempvariabletwo}buffertargetgroup]} != ${command}) /delay 8s ${Me.SpellReady[${tempvariable}]}
            /if (${Spawn[id ${Macro.Return}].Distance} < 100 && ${Me.SpellReady[${tempvariable}]} && ${Me.CurrentMana} > ${Spell[${tempvariable}].Mana} && ${Ini[toolismacro,Values,${tempvariabletwo}buffer].Equal[empty]} || ${Spawn[id ${Macro.Return}].Distance} < 100 && ${Me.SpellReady[${tempvariable}]} && ${Me.CurrentMana} > ${Spell[${tempvariable}].Mana} && ${Ini[toolismacro,Values,${tempvariabletwo}buffertargetgroup]} != 0 && ${Ini[toolismacro,Values,${tempvariabletwo}buffertargetgroup]} != ${command}) {
                /ini "toolismacro" "Values" "${tempvariabletwo}buffer" "${Me.Name}"
                /ini "toolismacro" "Values" "${tempvariabletwo}buffertargetgroup" "${command}"
                /guildsay ${tempvariable} inc group ${command}
                /target ID ${Macro.Return}
                /delay 2
                /if (${Target.ID} == ${Macro.Return} && ${Target.Distance} < 100 && ${Target.Type.Equal[PC]}) {
                    /tell ${Spawn[id ${Macro.Return}].Name} ${tempvariable} inc...
                    /call cast ${tempvariable} 2s
                    /if (${Macro.Return.Equal["CAST_SUCCESS"]}) /echo ${Target}'s grp has ${tempvariable}
                }
                /if (${Ini[toolismacro,Values,${tempvariabletwo}buffertargetgroup]} == ${command}) {
                    /ini "toolismacro" "Values" "${tempvariabletwo}buffer" "empty"
                    /ini "toolismacro" "Values" "${tempvariabletwo}buffertargetgroup" "0"
                }
            }
        }
    /return
    }
    /call getids "${TargetPerson}"
    /if (${Spawn[id ${Macro.Return}].ID} && ${Spawn[id ${Macro.Return}].Distance} < 100) /target ID ${Macro.Return}
    /delay 2
    /if (${Target.ConColor.Equal[GREY]} || ${Target.ConColor.Equal[GREEN]}) {
        /if (${tempvariable.Equal[${hpspell}]}) /varset tempvariable "Talisman of Tnarg"
        /if (${tempvariable.Equal[${bstcrackspell}]}) /varset tempvariable "Spiritual Light"
    }
    /if (${Me.PctMana} > 15 && !${ammoving} && ${Target.ID} == ${Macro.Return} && ${Target.Distance} < 100 && ${Target.Type.Equal[PC]}) {
        /if (!${Me.Gem[${tempvariable}]} && !${Cursor.ID}) {
            /memspell ${gemnumber} ${tempvariable}
            /delay 18s !${Window[SpellBookWND].Open}
            /keypress w
        }
        /tell ${Spawn[id ${Macro.Return}].Name} ${tempvariable} inc...
        /delay 6s ${Me.SpellReady[${tempvariable}]}
        /call cast ${tempvariable} 1s
        /if (${Macro.Return.Equal["CAST_SUCCESS"]}) /echo ${Target} ${tempvariable} buffed
    }
}
/return

Sub Event_Enraged(Line, ChatText)

/echo Event enraged fired
/if (${ChatText.Find[has become]}) {
    /varset ChatText ${ChatText.Left[-11]}
    /if (${NearestSpawn[npc radius 200 "${ChatText}"].ID} == ${targetid}) {
        /declare mobheading float local ${Spawn[id ${targetid}].Heading.Degrees}
        /if (${mobheading} < 90 && ${Me.Heading.Degrees} < ${Math.Calc[360 -(90 - ${mobheading})]} && ${Me.Heading.Degrees} > ${Math.Calc[${mobheading} - 90]} || ${mobheading} > 270 && ${Me.Heading.Degrees} < ${Math.Calc[${mobheading} - 90]} && ${Me.Heading.Degrees} > ${Math.Calc[90 -(360 - ${mobheading}]}) || ${Me.Heading.Degrees} > ${Math.Calc[${mobheading} + 90]} || ${Me.Heading.Degrees} < ${Math.Calc[${mobheading} - 90]}) /return
        /echo >>> ${Spawn[${targetid}].CleanName} is Enraged <<<
        /declare dontmelee int outer 1
        /attack off
    }
    /doevents flush Enraged
    /return
}
/if (${ChatText.Find[is no longer]}) {
    /varset ChatText ${ChatText.Left[-13]}
    /if (${NearestSpawn[npc radius 200 "${ChatText}"].ID} == ${targetid}) {
        /echo >>> ${Spawn[${targetid}].CleanName} is no longer Enraged! <<<
        /deletevar dontmelee
        /attack on
    }
}
/doevents flush Enraged
/return

Sub clickitem(ClickItem, ReplaceSlot)

/if (${ReplaceSlot.Find[inv]}) /declare targetslot string local 100
/if (!${ReplaceSlot.Find[inv]}) /declare targetslot int local ${ReplaceSlot}
/if (!${Defined[ClickItem]}) {
    /echo target item not defined - returning
    /return
}
/if (!${Defined[ReplaceSlot]}) {
    /echo replace slot not defined - inv or slot # plz -returning
    /return
}
/if (${Cursor.ID}) {
    /guildsay trying to click item but stuff is on my cursor
    /return
}   
/if (${FindItem[=${ClickItem}].ID} && !${Cursor.ID}) {
    /declare castingtime float local ${FindItem[=${ClickItem}].CastTime}
    /declare slotnumber int local
    /declare packnumber int local
    /declare i int local
    /declare j int local
    /for i 1 to 8
    /for j 1 to 10
    /if (${InvSlot[Pack${i}].Item.Item[${j}].Name.Equal[${ClickItem}]}) {
    /echo found item in bag
        /varset packnumber ${i}
        /varset slotnumber ${j}
        /goto :click
    }
    /next j
    /varset j 0
    /next i
    /varset i 0
    /for i 1 to 8
    /if (${InvSlot[${Math.Calc[22 + ${i}]}].Item.Name.Equal[${ClickItem}]}) {
        /echo found item in main slot
        /varset packnumber ${i}
        /varset targetslot pack${packnumber}
        /declare invitem int local 1
        /goto :click
    }
    /next i
    /varset i 0
    :click
    /if (!${Window[InventoryWindow].Open}) /keypress i
    /if (!${Window[pack${packnumber}].Open} && !${Defined[invitem]}) /nomodkey /itemnotify pack${packnumber} rightmouseup
    /delay 2
    /if (!${Defined[invitem]}) /nomodkey /itemnotify in pack${packnumber} ${slotnumber} leftmouseup
    /if (${Defined[invitem]}) {
        /echo using ${ClickItem}
        /nomodkey /itemnotify ${InvSlot[${Math.Calc[22 + ${packnumber}]}]} rightmouseup
        /delay 2
        /if (${castingtime} > 0.50) /delay ${Math.Calc[${castingtime} * 10]}
        /keypress i
        /deletevar invitem
        /return
    }
    /delay 2
    /if (${Cursor.Name.Equal[${ClickItem}]}) {
        /echo Using ${ClickItem}
        /if (${Defined[targetslot]}) /varset targetslot ${InvSlot[${targetslot}]}
        /if (${targetslot} == 100) /varset targetslot pack${packnumber}
        /nomodkey /itemnotify ${targetslot} leftmouseup
        /delay 2
        /nomodkey /itemnotify ${targetslot} rightmouseup
        /if (${castingtime} > 0.50) /delay ${Math.Calc[${castingtime} * 10]}
        /delay 4
        /if (!${ReplaceSlot.Find[inv]}) /nomodkey /itemnotify ${InvSlot[${targetslot}]} leftmouseup
        /if (${ReplaceSlot.Find[inv]}) /nomodkey /itemnotify ${InvSlot[${Math.Calc[22 + ${packnumber}]}]} leftmouseup
        /delay 4
        /if (${Cursor.Name.Equal[${ClickItem}]}) {
            /nomodkey /itemnotify pack${packnumber} rightmouseup
            /delay 2
            /nomodkey /itemnotify in pack${packnumber} ${slotnumber} leftmouseup
            /delay 2
            /nomodkey /itemnotify pack${packnumber} rightmouseup
            /delay 2
        }
    }
    /keypress i
}    
/return

Sub handledestroy(TargetItem)

/if (!${Defined[TargetItem]}) {
    /echo target item not defined, returning
    /return
}
/if (${FindItem[=${TargetItem}].ID} && !${Cursor.ID}) {
    /declare slotnumber int local
    /declare packnumber int local
    /declare i int local
    /declare j int local
    /for i 1 to 8
    /for j 1 to 10
    /if (${InvSlot[Pack${i}].Item.Item[${j}].Name.Equal[${TargetItem}]}) {
        /echo item is in pack
        /varset packnumber ${i}
        /varset slotnumber ${j}
        /goto :destroy
    }
    /next j
    /varset j 0
    /next i
    /varset i 0
    /for i 1 to 8
    /if (${InvSlot[${Math.Calc[22 + ${i}]}].Item.Name.Equal[${TargetItem}]}) {
        /echo found item in main slot
        /varset packnumber ${i}
        /declare invitem int local 1
        /goto :destroy
    }
    /next i
    /varset i 0
    :destroy
    /if (!${Window[InventoryWindow].Open}) /keypress i
    /if (!${Window[pack${packnumber}].Open} && !${Defined[invitem]}) /nomodkey /itemnotify pack${packnumber} rightmouseup
    /delay 2
    /if (!${Defined[invitem]}) /nomodkey /itemnotify in pack${packnumber} ${slotnumber} leftmouseup
    /if (${Defined[invitem]}) /nomodkey /itemnotify pack${packnumber} leftmouseup
    /delay 2
    /if (${Cursor.Name.Equal[${TargetItem}]}) {
        /echo destroying ${TargetItem}
        /if (${Cursor.Name.Equal[${TargetItem}]}) {
            /echo destroying ${Cursor.Name}
            /destroy
            /if (${Defined[invitem]}) /deletevar invitem
        }
    }
    /if (${Window[pack${packnumber}].Open}) /nomodkey /itemnotify pack${packnumber} rightmouseup
    /delay 2
    /keypress i
}    
/return

Sub Event_Toggle(Line, ChatSender, Targets, action)

/if (!${Bool[${action}]}) /return
/if (${Bool[${Targets}]}) {   
    /if (${Targets.Arg[1,].Equal[group]}) {
        /if (${Targets.Arg[1,].Equal[group]}) {
            /declare groupnumber int local
            /call findgroup
            /varset Targets ${Targets.Right[-6]}
            /for groupnumber 1 to ${Ini[toolismacro,Values,totalgroups]}
            /if (${Targets.Arg[${groupnumber},,]} == ${Macro.Return}) {
                /goto :togglestuff
            } else {
                /next groupnumber 
                /return
            }
        }
    }
    /if (${Targets.Arg[1,].Equal[healers]}) {
        /if (${Me.Class.HealerType}) /goto :togglestuff
        /return
    }
    /if (${Targets.Arg[1,].Equal[casters]}) {
        /if (${Me.Class.PureCaster}) /goto :togglestuff
        /return
    }
    /declare name int local 
    /for name 1 to 12
    /if (${Targets.Arg[${name},].Equal[${Me.Name}]}) /goto :togglestuff
    /next name
    /return
}
:togglestuff
/if (${action.Find[abort]}) {
    /keypress forward
    /varset didinvis 0
    /guildsay !ABORTING!
    /return abort
}
/if (${action.Arg[1,].Equal[leash]}) {
    /varset action ${action.Right[-6]}
    /if (${Bool[${Ini[movement,leash,${action}]}]}) {
        /if (!${Defined[leashloc]}) /declare leashloc string outer
        /declare i int local
        /for i 1 to 10
        /if (${Ini[movement,leash,zoneshortnames].Arg[${i},,].Equal[${Zone.ShortName}]}) {
            /varset leashloc ${Ini[movement,leash,${action}]}
        }
        /next i
    }
/return
}
/if (${action.Arg[1,].Equal[zoneout]}) {
    /varset action ${action.Right[-8]}
    /if (${Bool[${Ini[movement,zoneout,${action}]}]}) {
        /if (!${Defined[zoneoutloc]}) /declare zoneoutloc string outer
        /declare i int local
        /for i 1 to 10
        /if (${Ini[movement,zoneout,zoneshortnames].Arg[${i},,].Equal[${Zone.ShortName}]}) {
            /if (!${Defined[zoneoutcommand]}) /declare zoneoutcommand string outer empty
            /if (${Bool[${Ini[movement,zoneout,${action}command]}]}) /varset zoneoutcommand ${Ini[movement,zoneout,${action}command]}
            /varset zoneoutloc ${Ini[movement,zoneout,${action}]}
            /call gotoloc "${zoneoutloc}" "${zoneoutcommand}"
            /return
        }
        /next i
    }
    /return
}
/if (${action.Arg[1,].Equal[leashoff]}) {
    /if (${Defined[leashloc]}) /deletevar leashloc  
    /return  
}
/if ( ${action.Arg[1,].Equal[tank]}) {
    /if (${action.Arg[1,].Equal[tank]}) /varset action ${action.Right[-5]}
    /varset mainassist ${action}
    /return
}
/if (${action.Find[/mac]}) {
/varset action ${action.Right[-5]}
    /if (${action.Arg[1,].Equal[start]}) {
        /varset action ${action.Right[-6]}
        /if (${Me.Class.Name.Equal[Beastlord]}) /docommand /mac beast ${action}
        /if (${Me.Class.Name.Equal[Shadowknight]}) /docommand /mac sk ${action}
        /if (${Me.Class.Name.Equal[Magician]}) /docommand /mac mage ${action}
        /if (${Me.Class.Name.Equal[Necromancer]}) /docommand /mac necro ${action}
        /if (${Me.Class.Name.Equal[Wizard]}) /docommand /mac wiz ${action}
        /if (${Me.Class.Name.Equal[Enchanter]}) /docommand /mac ench ${action}
        /if (${Me.Class.Name.Equal[Bard]}) /docommand /mac bard ${action}
        /if (${Me.Class.Name.Equal[Cleric]}) /docommand /mac cleric ${action}
        /if (${Me.Class.Name.Equal[Shaman]}) /docommand /mac shaman ${action}
        /if (${Me.Class.Name.Equal[Monk]}) /docommand /mac monk ${action}
        /if (${Me.Class.Name.Equal[Rogue]}) /docommand /mac rogue ${action}
        /if (${Me.Class.Name.Equal[Paladin]}) /docommand /mac paladin ${action}
        /if (${Me.Class.Name.Equal[Ranger]}) /docommand /mac ranger ${action}
        /if (${Me.Class.Name.Equal[Berserker]}) /docommand /mac berserker ${action}
        /if (${Me.Class.Name.Equal[Druid]}) /docommand /mac druid ${action}
    }
    /declare i int local
    /for i 1 to 15
    /if (${Ini[toolismacro,Values,macros].Arg[${i},,].Equal[${action.Arg[1,]}]}) {
        /docommand /mac ${action}
    }
    /next i
    /varset i 0
    /for i 1 to 10
    /if (${Ini[toolismacro,Values,othermacros].Arg[${i},,].Equal[${action.Arg[1,]}]}) {
        /docommand /mac ${action}
    }
    /next i
    /echo Macro not found
    /return
}
/if (${action.Find[heal clerics]}) {
    /if (${action.Find[dont]}) {
        /varset healoutofgroupclerics 0
        /echo turning off healing clerics
        /return
    }
    /varset healoutofgroupclerics 1
    /echo healing out of group clerics
    /return
}
/if (${action.Find[paragon]}) {
    /if (${Me.AltAbilityReady[Paragon of Spirit]} && ${Me.AltAbilityReady[Mass Group Buff]}) {
        /declare groupnumber int local
        /call findgroup
        /varset groupnumber ${Macro.Return}
        /if (${Ini[toolismacro,Values,bstparagon].Equal[empty]}) {
            /ini "toolismacro" "Values" "bstparagon]" "${Me.Name}"
            /delay 2
            /call checkgrouprange "Paragon of Spirit"
            /if (${Macro.Return} != 0 && ${Ini[toolismacro,Values,bstparagon].Equal[${Me.Name}]}) {
                /target ID ${Macro.Return}
                /delay 2
                /if (${Target.Type.Equal[PC]}) {
                    /aa act Mass Group Buff
                    /delay 2
                    /guildsay Paragon inc...
                    /aa act Paragon of Spirt
                    /delay 6
                }
            }
            /timed 20 /ini "toolismacro" "Values" "bstparagon" "empty"
        }
    }
    /return
}
/if (${action.Find[mod rod]}) {
    /if (${Cursor.ID}) {
        /guildsay ITEM ON CURSOR - MOD RODS COMING
        /return
    }
    /if (${Me.FreeInventory} < 1 && !${FindItem[=Rod of Mystical Transvergence].ID}) {
        /guildsay NO ROOM IN BAGS - MOD RODS COMING
        /return
    }
    /if (${FindItem[=Rod of Mystical Transvergence].ID} && ${FindItem[=Rod of Mystical Transvergence].Charges} < 3) /call handledestroy "Rod of Mystical Transvergence"
    /return
}
/if (${action.Find[accept rez]}) {
    /if (${Window[ConfirmationDialogBox].Open} || !${InvSlot[13].Item.ID}) {
        /docommand /mac rez ${mainassist} ${healoutofgroupclerics}
    }
    /return
}
/if (${action.Find[consent]}) {
    /varset action ${action.Right[-8]}
    /consent ${action}
    /return
}
/if (${action.Find[stick]}) {
    /if (${action.Find[front]}) {
        /echo sticking in front
        /varset sticktype front loose 8
    }
    /if (${action.Find[behind]}) {
        /echo sticking behind
        /varset sticktype behindonce loose 8
    }
    /return
}
/if (${action.Find[healat]}) {
    /varset action ${action.Right[-7]}
    /varset healat ${action}
    /echo now healing at ${action}
    /return
}
/if (${action.Find[pet]}) {
    /if (${action.Find[pet haste]}) {
        /if (${action.Find[dont pet haste]} || ${action.Find[no pet haste]} || ${action.Find[pet haste off]}) { 
            /nomodkey /notify PIW_BuffWindow PetBuff${Math.Calc[(${Me.PetBuff[${petbuffspell}]}+ 1)- 2].Int} leftmouseup
            /varset pethasteoff 1
            /varset pethastetimer 0
            /echo NOT hasting pet
            /return    
        }
        /varset pethasteoff 0
        /echo Hasting pet as normal
        /return
    }
    /if (${action.Find[kill pet]}) {
        /pet leave
        /varset dopet 0
        /return
    }
    /if (${action.Find[do pet]}) {
        /varset dopet 1
        /return
    }
/return
}
/if (${action.Find[rebuff]}) {
    /varset petproctimer 0
    /varset pethastetimer 0
    /return
}
/if (${action.Find[anon]}) {
    /docommand /a
    /return
}
/if (${action.Find[camp]}) {
    /if (${Me.Trader}) /return
    /if (${action.Find[desktop]}) {
        /camp desktop
        :action
        /doevents toggle
        /if (${Macro.Return.Equal[cancel]}) /return
        /delay 2
        /goto :action
        /return
    }
    /camp
    :action
    /doevents toggle
    /if (${Macro.Return.Equal[cancel]}) /return
    /delay 2
    /goto :action
/return
}
/if (${action.Find[cancel]}) {
    /return cancel
}
/if (${action.Find[assistat]}) {
    /echo setting assistat to ${action.Arg[2,]}
    /varset assistat ${action.Arg[2,]}
    /if (${Defined[nukeat]}) /varset nukeat ${action.Arg[2,]}
    /return
}
/if (${action.Find[/ex]}) {
    /if (${Me.Trader}) /return
    /docommand /exit
}
/if (${action.Find[throne]}) {
    /aa act Throne of Heroes
    /return
}
/if (${action.Find[infusion]}) {
    /aa act Infusion of the Faithful
    /return
}
/if (${action.Find[lesson]}) {
    /aa act Lesson of the Devoted
    /return
}
/if (${action.Find[intensity]}) {
    /aa act Intensity of the Resolute
    /return
}
/if (${action.Find[expedient]} || ${action.Find[expediant]}) {
    /aa act Expedient Recovery
    /return
}
/if (${action.Find[pagedown]}) {
    /keypress Page_Down hold 
    /delay 1s
    /keypress Page_Down
    /return
}
/return

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
Last edited by toolisuber on Tue Sep 08, 2015 4:26 am, edited 2 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu level 65 or so ench, bst, sk

Post by toolisuber » Wed Aug 05, 2015 6:07 pm

reserved bst part2
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu level 65 or so ench, bst, sk

Post by toolisuber » Wed Aug 05, 2015 6:08 pm

sk.mac
---------------------

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 GuildAssist "#1#tells the#*#, 'assist me with#*#'"
#Event Enraged  "#1# enraged#*#"
#Event DoHateBuff "#1#tells you, 'buff hate'"
#Event Toggle "#1#guild, '#2#toggle#3#'"
#Event Movement "#1#guild, '#2#goto#3#'"

#include spell_routines.inc

Sub Main

/declare randomstring    string outer "glitchishere"

/declare snarespell            string outer "Festering Darkness"
/declare lifetapspellone       string outer "Touch of Innoruuk"
/declare lifetapspelltwo       string outer "Spirit Tap"
/declare petspell              string outer "Invoke Death"
/declare hatespell             string outer "Terror of Thule"
/declare hatebuffspell         string outer "Voice of Thule"
/declare hpbuffspell           string outer "Cloak of Luclin"
/declare selflifetapbuffspell  string outer "Black Shroud"
/declare invulnspell           string outer "Harmshield"
/declare feigndeathspell       string outer "Death Peace"

/declare snare                 int outer 0
/declare dohatebuffself        int outer 0
/declare dolifetap             int outer 1
/declare doharmtouch           int outer 1
/declare dofeign               int outer 1

/declare lifetapat             int outer 95
/declare lowhpdolifetap        int outer 90
/declare harmtouchat           int outer 80
/declare notenoughforharmtouch int outer 10
/declare feignat               int outer 20
/declare assistat              int outer 98

/declare hatebuffduration    int outer 6000
/declare hpbuffduration      int outer 90000
/declare lifetapbuffduration int outer 36000
/declare snareduration       int outer 1200

/declare unholyauratimer     timer outer
/declare hpbufftimer         timer outer
/declare hatebufftimer       timer outer
/declare lifetapbufftimer    timer outer
/declare pethastetimer       timer outer  

/declare sticktype string outer behindonce loose 8
/declare makecamploc string outer ${Me.Y},${Me.X}
/declare dopet        int outer 1
/declare storedpetid  int outer 0
/declare didstick     int outer 0
/declare gettarget    int outer 1
/declare targetdead   int outer 1
/declare targetid     int outer 0
/declare ammoving     int outer 0

/squelch /stick off

/declare mainassist string outer
/varset mainassist ${Param0}

/echo sk macro started

:spellsetloop
/if (${NearestSpawn[PC ${Me.Name}].Name.Find[${Me.Name}]}) {
    /memspellset level 62
    /delay 46s !${Window[SpellBookWND].Open}
}
/delay 2
/if (!${NearestSpawn[PC ${Me.Name}].Name.Find[${Me.Name}]}) /goto :spellsetloop

:loop
/doevents
/call checkstuff
/if (!${ammoving} && ${Bool[${leashloc}]}) /call gotoloc
/if (!${ammoving}) /call cleartarget
/if (${gettarget} && !${ammoving}) /call gettarget
/if (${targetid} == ${Target.ID} && !${ammoving}) /call killtarg
/if (!${ammoving}) /call checkbuffs
/if (${Me.PctMana} < 95 && !${Me.Casting.ID} && !${ammoving} && ${Me.Standing} && !${Me.Moving} && ${Me.CombatState.NotEqual[COMBAT]}) /sit
/delay 2
/goto :loop


Sub gettarget

/call getids "${mainassist}"
/if (${Spawn[${Macro.Return}].ID} && ${Spawn[id ${Macro.Return}].Distance} < 200) {
    /target ID ${Macro.Return}
    /delay 2
    /assist
    /delay 4
    /if (${Target.Type.Equal[NPC]} && ${Target.Type.NotEqual[CORPSE]} && ${Target.PctHPs} < ${assistat} && ${Target.Distance} < 200) {
        /varset targetid ${Target.ID}
        /varset targetdead 0
        /varset gettarget 0
        /g assisting on %t
        /echo My Target is now ${Target.CleanName}
        /if (${Me.Pet.ID}) /pet attack
    }
}
/return

Sub killtarg

/if (!${didstick} && ${Target.Type.Equal[NPC]} && ${Target.ID} == ${targetid}) {
    /face fast nolook id ${targetid}
    /attack on
    /stick ${sticktype}
    /if (${Me.Pet.ID}) /pet attack
    /varset didstick 1
    /delay 2
}
/if (${Me.AbilityReady["Bash"]} && ${Target.Type.Equal[NPC]}) {
    /if (!${Defined[dontmelee]}) {
        /doability "Bash"
    }
}
/if (${dolifetap}) {
    /if (${Me.PctHPs} < ${lowhpdolifetap} && ${Target.Type.Equal[NPC]} && ${Target.Type.NotEqual[CORPSE]} && ${Target.PctHPs} < ${lifetapat} && ${Me.CurrentMana} > ${Spell[${lifetapspellone}].Mana}) {
    /stick off
    /delay 2
    /call cast ${lifetapspellone} 2s
    /varset didstick 0
    }
}
/if (${Me.CombatAbilityReady["Unholy Aura Discipline"]} && ${Me.PctHPs} < 70 && ${Target.PctHPs} < 97 && ${Target.Type.Equal[NPC]}) {
    /doability "Unholy Aura Discipline"
    /varset unholyauratimer 3000
}
/if (${Me.PctHPs} < 40 && ${Me.CombatAbilityReady["Deflection"]} && ${targetid}) {
    /if (${Math.Calc[360 - ${Me.Heading.Degrees}]} == ${Target.Heading.Degrees} && ${Me.Heading.Degrees} != 180 || ${Me.Heading.Degrees} == 180 && ${Target.Heading.Degrees} == 360 || ${Me.Heading.Degrees} == 180 && ${Target.Heading.Degrees} == 0) {
        /if (${unholyauratimer}) {
            /guildsay clicking off unholy aura disc for deflection
            /nomodkey /notify CombatAbilityWnd CAW_CombatEffectButton leftmouseup
            /delay 2
        }
        /guildsay doing deflection disc
        /doability "Deflection"
        }
}
/if (${Me.PctHPs} < 40 && ${Me.CombatAbilityReady["Soul Guard"]} && ${targetid}) {
    /if (${Math.Calc[360 - ${Me.Heading.Degrees}]} == ${Target.Heading.Degrees} && ${Me.Heading.Degrees} != 180 || ${Me.Heading.Degrees} == 180 && ${Target.Heading.Degrees} == 360 || ${Me.Heading.Degrees} == 180 && ${Target.Heading.Degrees} == 0) {
        /if (${unholyauratimer}) {
            /guildsay clicking off unholy aura disc for soul guard
            /nomodkey /notify CombatAbilityWnd CAW_CombatEffectButton leftmouseup
            /delay 2
        }
        /guildsay doing soul guard disc
        /doability "Soul Guard"
        }
}
/if (${Me.PctHPs} < 40 && ${Me.CombatAbilityReady["Leechcurse Discipline"]} && ${Target.PctHPs} < 95 && ${Target.Type.Equal[NPC]}) {
    /doability "Leechcurse Discipline"
}
/if (${doharmtouch} && ${Me.AltAbilityReady["Harm Touch"]}) {
    /if (${Target.Type.Equal[NPC]} && ${Target.Named} && ${Target.Type.NotEqual[CORPSE]} && ${Target.PctHPs} < ${harmtouchat} && ${Target.PctHPs} > ${notenoughforharmtouch}) {
    /echo Harm Touch on ${Target.Name}
    /aa act Harm Touch
    }
}
/if (${doharmtouch} && ${Me.AltAbilityReady["Leech Touch"]} && ${Me.PctHPs} < 40) {
    /if (${Target.Type.Equal[NPC]} && ${Target.Type.NotEqual[CORPSE]} && ${Target.PctHPs} < ${harmtouchat} && ${Target.PctHPs} > ${notenoughforharmtouch}) {
    /echo Leech Touch on ${Target.Name}
    /aa act Leech Touch
    }
}
/if (${snare} && ${snare} != 4 && ${Spawn[${targetid}].PctHPs} < 20) {
    /if (${Target.Type.Equal[NPC]} && ${Target.Type.NotEqual[CORPSE]}) {
        /call cast ${snarespell} 2s
        /if (${Macro.Return.Equal["CAST_SUCCESS"]}) {
            /varset snare 4
            /gsay ${Target.Name} snared
        }
    }
}
/if (${Me.PctHPs} < ${feignat} && ${dofeign}) {
    /echo  i am at ${Me.PctHPs} percent and feigning death
    /guildsay i am at ${Me.PctHPs} percent and feigning death
    /call cast ${feigndeathspell} 1s
    /if (${Macro.Return.Equal["CAST_SUCCESS"]}) {
        :waitloop1
        /call cast ${feigndeathspell} 1s
        :waitloop2
        /if (${Me.CombatState.Equal[COMBAT]}) {
            /keypress w
            /goto :waitloop1
        }
        /doevents Toggle
        /doevents Follow
        /delay 2
        /if (${Me.State.Equal[FEIGN]}) /goto :waitloop2
    }
}
/return

Sub checkbuffs

/if (!${Me.Pet.ID} && ${Me.PctMana} > 20 && ${FindItem[Bone Chips].StackCount} > 1 && ${dopet}) {
    /call cast ${petspell} 2s
    /if (${Macro.Return.Equal["CAST_SUCCESS"]}) {
        /varset storedpetid ${Me.Pet.ID}
        /varset pethastetimer 0
    }
}
/if (${Me.Pet.ID} && ${Me.Pet.ID} != ${storedpetid}) {
    /varset pethastetimer 0
    /varset storedpetid ${Me.Pet.ID}
}
/if (${lifetapbufftimer} < 450 && ${Me.CombatState.NotEqual[COMBAT]}) {
    /if (${Me.SpellReady[${selflifetapbuffspell}]}) {
        /call cast ${selflifetapbuffspell} 2s
        /if (${Macro.Return.Equal["CAST_SUCCESS"]}) /varset lifetapbufftimer ${lifetapbuffduration}
    }
}
/if (${hpbufftimer} < 450 && ${Me.CombatState.NotEqual[COMBAT]}) {
    /if (${Me.SpellReady[${hpbuffspell}]}) {
    /call cast ${hpbuffspell} 2s
    /if (${Macro.Return.Equal["CAST_SUCCESS"]}) /varset hpbufftimer ${hpbuffduration}
    }
}
/return

Sub checkstuff

/if (${Cursor.Name.Equal[Rod of Mystical Transvergence]}) {
    /if (${Me.FreeInventory} < 1) {
        /guildsay mod rod on cursor but no inventory room
        /return
    }
    /if (${Me.FreeInventory} > 1) /autoinv
}
/if (!${Me.Invis}) {
    /if (${FindItem[=Rod of Mystical Transvergence].ID}) {
        /if (!${FindItem[=Rod of Mystical Transvergence].TimerReady}) {
            /if (!${Cursor.ID} && ${Me.PctMana} < 85 && ${Me.CurrentHPs} > 4000) {
                /call clickitem "Rod of Mystical Transvergence" "inv"
            }
        }
    }
}
/if (!${InvSlot[13].Item.ID}) {
    /if (!${InvSlot[17].Item.ID}) {
        /if (${Zone.ShortName.Equal[poknowledge]} || ${Zone.ShortName.Equal[guildlobby]} || !${InvSlot[18].Item.ID}) {
            /if (${MacroQuest.GameState.NotEqual[INGAME]}) /return
            /if (!${Me.Gem[8].ID}) {
                :spellsetloop
                /if (${NearestSpawn[PC ${Me.Name}].Name.Find[${Me.Name}]}) {
                    /memspellset level 62
                    /delay 46s !${Window[SpellBookWND].Open}
                }
                /delay 2
                /if (!${NearestSpawn[PC ${Me.Name}].Name.Find[${Me.Name}]}) /goto :spellsetloop
            }
            /if (!${Defined[amnaked]}) /declare amnaked int local 100
            /if (!${Window[SpellBookWnd].Open}) /guildsay <==== i died ====>
            /if (!${Window[SpellBookWnd].Open} && ${Defined[amnaked]}) /docommand /mac rez ${mainassist} ${amnaked}
            /if (!${Window[SpellBookWnd].Open}) /docommand /mac rez ${mainassist}
        }
    }
}
/return

Sub cleartarget

/if (${Spawn[${targetid}].Type.Equal[CORPSE]} && !${targetdead} || !${Spawn[${targetid}].Type.Equal[NPC]} && !${targetdead}) {
    /echo im clearing target
    /varset targetdead 1
    /varset gettarget 1
    /varset didstick 0
    /if (${snare} == 4) /varset snare 1
    /if (${Me.CombatState.NotEqual[COMBAT]} && !${NearestSpawn[1,npc radius 50].ID}) /call returntocamp "face"
    /attack off
}
/if (${Target.ID} != ${targetid} && ${Spawn[${targetid}].Type.NotEqual[CORPSE]} && ${Spawn[${targetid}].ID}) /target ID ${targetid}
/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 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 Event_GuildAssist(Line, AssistTarget)

/varset AssistTarget ${AssistTarget.Right[-2].Left[-2]}
/call getids "${AssistTarget}"
/if (${Macro.Return} && ${Spawn[id ${Macro.Return}].Distance} < 200) {
    /target ID ${Macro.Return}
    /delay 2
    /assist
    /delay 4
    /if (${Target.Type.Equal[NPC]} && ${Target.Type.NotEqual[CORPSE]} && ${Target.Distance} < 200) {
        /varset targetid ${Target.ID}
        /varset gettarget 0
        /varset targetdead 0
        /varset didstick 0
        /echo My Target is now ${Target.CleanName}
        /if (${Me.Pet.ID}) /pet back off
        /if (${Me.Pet.ID}) /delay 5
        /if (${Me.Pet.ID}) /pet attack
    }
}
/return

Sub Event_DoHateBuff(Line, HateBuffTarget)

/declare storedtargetid int local
/varset HateBuffTarget ${HateBuffTarget.Right[-2].Left[-2]}
/delay 5
/if (${targetid} && ${Stick.Status.Equal[ON]}) {
    /varset storedtargetid ${targetid}
    /stick off
}
/call getids "${HateBuffTarget}"
/if (${Spawn[id ${Macro.Return}].ID}) /target ID ${Macro.Return}
/if (${Target.ID} == ${Macro.Return} && ${Me.SpellReady[${hatebuffspell}]} && ${Me.PctMana} > 10) {
    /tell ${HateBuffTarget} ${hatebuffspell} inc...
    /call cast ${hatebuffspell} 2s
    /if (${Macro.Return.Equal["CAST_SUCCESS"]}) {
        /varset hatebufftimer ${hatebuffduration}
        /if (${storedtargetid}) {
            /target ID ${storedtargetid}
            /delay 2
            /if (${Target.Type.Equal[NPC]} && ${Target.Type.NotEqual[CORPSE]}) /stick loose 8
        }
    }
} else {
/if (${Spawn[id ${Macro.Return}].Distance} > 150 && ${Me.SpellReady[${hatebuffspell}]}) /tell ${HateBuffTarget} out of range
/if (!${Me.SpellReady[${hatebuffspell}]}) /tell ${HateBuffTarget} hate buff isnt up
/if (${Me.PctMana} < 10) /tell ${HateBuffTarget} oom
}
/return

Sub Event_Enraged(Line, ChatText)

/if (${ChatText.Find[has become]}) {
    /varset ChatText ${ChatText.Left[-11]}
    /if (${NearestSpawn[npc radius 200 "${ChatText}"].ID} == ${targetid}) {
        /declare mobheading float local ${Spawn[id ${targetid}].Heading.Degrees}
        /if (${mobheading} < 90 && ${Me.Heading.Degrees} < ${Math.Calc[360 -(90 - ${mobheading})]} && ${Me.Heading.Degrees} > ${Math.Calc[${mobheading} - 90]} || ${mobheading} > 270 && ${Me.Heading.Degrees} < ${Math.Calc[${mobheading} - 90]} && ${Me.Heading.Degrees} > ${Math.Calc[90 -(360 - ${mobheading})]} || ${Me.Heading.Degrees} > ${Math.Calc[${mobheading} + 90]} || ${Me.Heading.Degrees} < ${Math.Calc[${mobheading} - 90]}) /return
        /echo >>> ${Spawn[${targetid}].CleanName} is Enraged <<<
        /declare dontmelee int outer 1
        /attack off
    }
    /doevents flush Enraged
    /return
}
/if (${ChatText.Find[is no longer]}) {
    /varset ChatText ${ChatText.Left[-13]}
    /if (${NearestSpawn[npc radius 200 "${ChatText}"].ID} == ${targetid}) {
        /echo >>> ${Spawn[${targetid}].CleanName} is no longer Enraged! <<<
        /deletevar dontmelee
        /attack on
    }
}
/doevents flush Enraged
/return

Sub clickitem(ClickItem, ReplaceSlot)

/if (${ReplaceSlot.Find[inv]}) /declare targetslot string local 100
/if (!${ReplaceSlot.Find[inv]}) /declare targetslot int local ${ReplaceSlot}
/if (!${Defined[ClickItem]}) {
    /echo target item not defined - returning
    /return
}
/if (!${Defined[ReplaceSlot]}) {
    /echo replace slot not defined - inv or slot # plz -returning
    /return
}
/if (${Cursor.ID}) {
    /guildsay trying to click item but stuff is on my cursor
    /return
}   
/if (${FindItem[=${ClickItem}].ID} && !${Cursor.ID}) {
    /declare castingtime float local ${FindItem[=${ClickItem}].CastTime}
    /declare slotnumber int local
    /declare packnumber int local
    /declare i int local
    /declare j int local
    /for i 1 to 8
    /for j 1 to 10
    /if (${InvSlot[Pack${i}].Item.Item[${j}].Name.Equal[${ClickItem}]}) {
    /echo found item in bag
        /varset packnumber ${i}
        /varset slotnumber ${j}
        /goto :click
    }
    /next j
    /varset j 0
    /next i
    /varset i 0
    /for i 1 to 8
    /if (${InvSlot[${Math.Calc[22 + ${i}]}].Item.Name.Equal[${ClickItem}]}) {
        /echo found item in main slot
        /varset packnumber ${i}
        /varset targetslot pack${packnumber}
        /declare invitem int local 1
        /goto :click
    }
    /next i
    /varset i 0
    :click
    /if (!${Window[InventoryWindow].Open}) /keypress i
    /if (!${Window[pack${packnumber}].Open} && !${Defined[invitem]}) /nomodkey /itemnotify pack${packnumber} rightmouseup
    /delay 2
    /if (!${Defined[invitem]}) /nomodkey /itemnotify in pack${packnumber} ${slotnumber} leftmouseup
    /if (${Defined[invitem]}) {
        /echo using ${ClickItem}
        /nomodkey /itemnotify ${InvSlot[${Math.Calc[22 + ${packnumber}]}]} rightmouseup
        /delay 2
        /if (${castingtime} > 0.50) /delay ${Math.Calc[${castingtime} * 10]}
        /keypress i
        /deletevar invitem
        /return
    }
    /delay 2
    /if (${Cursor.Name.Equal[${ClickItem}]}) {
        /echo Using ${ClickItem}
        /if (${Defined[targetslot]}) /varset targetslot ${InvSlot[${targetslot}]}
        /if (${targetslot} == 100) /varset targetslot pack${packnumber}
        /nomodkey /itemnotify ${targetslot} leftmouseup
        /delay 2
        /nomodkey /itemnotify ${targetslot} rightmouseup
        /if (${castingtime} > 0.50) /delay ${Math.Calc[${castingtime} * 10]}
        /delay 4
        /if (!${ReplaceSlot.Find[inv]}) /nomodkey /itemnotify ${InvSlot[${targetslot}]} leftmouseup
        /if (${ReplaceSlot.Find[inv]}) /nomodkey /itemnotify ${InvSlot[${Math.Calc[22 + ${packnumber}]}]} leftmouseup
        /delay 4
        /if (${Cursor.Name.Equal[${ClickItem}]}) {
            /nomodkey /itemnotify pack${packnumber} rightmouseup
            /delay 2
            /nomodkey /itemnotify in pack${packnumber} ${slotnumber} leftmouseup
            /delay 2
            /nomodkey /itemnotify pack${packnumber} rightmouseup
            /delay 2
        }
    }
    /keypress i
}    
/return

Sub handledestroy(TargetItem)

/if (!${Defined[TargetItem]}) {
    /echo target item not defined, returning
    /return
}
/if (${FindItem[=${TargetItem}].ID} && !${Cursor.ID}) {
    /declare slotnumber int local
    /declare packnumber int local
    /declare i int local
    /declare j int local
    /for i 1 to 8
    /for j 1 to 10
    /if (${InvSlot[Pack${i}].Item.Item[${j}].Name.Equal[${TargetItem}]}) {
        /echo item is in pack
        /varset packnumber ${i}
        /varset slotnumber ${j}
        /goto :destroy
    }
    /next j
    /varset j 0
    /next i
    /varset i 0
    /for i 1 to 8
    /if (${InvSlot[${Math.Calc[22 + ${i}]}].Item.Name.Equal[${TargetItem}]}) {
        /echo found item in main slot
        /varset packnumber ${i}
        /declare invitem int local 1
        /goto :destroy
    }
    /next i
    /varset i 0
    :destroy
    /if (!${Window[InventoryWindow].Open}) /keypress i
    /if (!${Window[pack${packnumber}].Open} && !${Defined[invitem]}) /nomodkey /itemnotify pack${packnumber} rightmouseup
    /delay 2
    /if (!${Defined[invitem]}) /nomodkey /itemnotify in pack${packnumber} ${slotnumber} leftmouseup
    /if (${Defined[invitem]}) /nomodkey /itemnotify pack${packnumber} leftmouseup
    /delay 2
    /if (${Cursor.Name.Equal[${TargetItem}]}) {
        /echo destroying ${TargetItem}
        /if (${Cursor.Name.Equal[${TargetItem}]}) {
            /echo destroying ${Cursor.Name}
            /destroy
            /if (${Defined[invitem]}) /deletevar invitem
        }
    }
    /if (${Window[pack${packnumber}].Open}) /nomodkey /itemnotify pack${packnumber} rightmouseup
    /delay 2
    /keypress i
}    
/return

Sub Event_Toggle(Line, ChatSender, Targets, action)

/if (!${Bool[${action}]}) /return
/if (${Bool[${Targets}]}) {   
    /if (${Targets.Arg[1,].Equal[group]}) {
        /if (${Targets.Arg[1,].Equal[group]}) {
            /declare groupnumber int local
            /call findgroup
            /varset Targets ${Targets.Right[-6]}
            /for groupnumber 1 to ${Ini[toolismacro,Values,totalgroups]}
            /if (${Targets.Arg[${groupnumber},,]} == ${Macro.Return}) {
                /goto :togglestuff
            } else {
                /next groupnumber 
                /return
            }
        }
    }
    /if (${Targets.Arg[1,].Equal[healers]}) {
        /if (${Me.Class.HealerType}) /goto :togglestuff
        /return
    }
    /if (${Targets.Arg[1,].Equal[casters]}) {
        /if (${Me.Class.PureCaster}) /goto :togglestuff
        /return
    }
    /declare name int local 
    /for name 1 to 12
    /if (${Targets.Arg[${name},].Equal[${Me.Name}]}) /goto :togglestuff
    /next name
    /return
}
:togglestuff
/if (${action.Find[abort]}) {
    /keypress forward
    /varset didinvis 0
    /guildsay !ABORTING!
    /return abort
}
/if (${action.Arg[1,].Equal[leash]}) {
    /varset action ${action.Right[-6]}
    /if (${Bool[${Ini[movement,leash,${action}]}]}) {
        /if (!${Defined[leashloc]}) /declare leashloc string outer
        /declare i int local
        /for i 1 to 10
        /if (${Ini[movement,leash,zoneshortnames].Arg[${i},,].Equal[${Zone.ShortName}]}) {
            /varset leashloc ${Ini[movement,leash,${action}]}
        }
        /next i
    }
/return
}
/if (${action.Arg[1,].Equal[zoneout]}) {
    /varset action ${action.Right[-8]}
    /if (${Bool[${Ini[movement,zoneout,${action}]}]}) {
        /if (!${Defined[zoneoutloc]}) /declare zoneoutloc string outer
        /declare i int local
        /for i 1 to 10
        /if (${Ini[movement,zoneout,zoneshortnames].Arg[${i},,].Equal[${Zone.ShortName}]}) {
            /if (!${Defined[zoneoutcommand]}) /declare zoneoutcommand string outer empty
            /if (${Bool[${Ini[movement,zoneout,${action}command]}]}) /varset zoneoutcommand ${Ini[movement,zoneout,${action}command]}
            /varset zoneoutloc ${Ini[movement,zoneout,${action}]}
            /call gotoloc "${zoneoutloc}" "${zoneoutcommand}"
            /return
        }
        /next i
    }
    /return
}
/if (${action.Arg[1,].Equal[leashoff]}) {
    /if (${Defined[leashloc]}) /deletevar leashloc  
    /return  
}
/if (${action.Arg[1,].Equal[tank]}) {
    /if (${action.Arg[1,].Equal[tank]}) /varset action ${action.Right[-5]}
    /varset mainassist ${action}
    /return
}
/if (${action.Find[/mac]}) {
/varset action ${action.Right[-5]}
    /if (${action.Arg[1,].Equal[start]}) {
        /varset action ${action.Right[-6]}
        /if (${Me.Class.Name.Equal[Beastlord]}) /docommand /mac beast ${action}
        /if (${Me.Class.Name.Find[Shadow]}) /docommand /mac sk ${action}
        /if (${Me.Class.Name.Equal[Magician]}) /docommand /mac mage ${action}
        /if (${Me.Class.Name.Equal[Necromancer]}) /docommand /mac necro ${action}
        /if (${Me.Class.Name.Equal[Wizard]}) /docommand /mac wiz ${action}
        /if (${Me.Class.Name.Equal[Enchanter]}) /docommand /mac ench ${action}
        /if (${Me.Class.Name.Equal[Bard]}) /docommand /mac bard ${action}
        /if (${Me.Class.Name.Equal[Cleric]}) /docommand /mac cleric ${action}
        /if (${Me.Class.Name.Equal[Shaman]}) /docommand /mac shaman ${action}
        /if (${Me.Class.Name.Equal[Monk]}) /docommand /mac monk ${action}
        /if (${Me.Class.Name.Equal[Rogue]}) /docommand /mac rogue ${action}
        /if (${Me.Class.Name.Equal[Paladin]}) /docommand /mac paladin ${action}
        /if (${Me.Class.Name.Equal[Ranger]}) /docommand /mac ranger ${action}
        /if (${Me.Class.Name.Equal[Berserker]}) /docommand /mac berserker ${action}
        /if (${Me.Class.Name.Equal[Druid]}) /docommand /mac druid ${action}
    }
    /declare i int local
    /for i 1 to 15
    /if (${Ini[toolismacro,Values,macros].Arg[${i},,].Equal[${action.Arg[1,]}]}) {
        /docommand /mac ${action}
    }
    /next i
    /varset i 0
    /for i 1 to 10
    /if (${Ini[toolismacro,Values,othermacros].Arg[${i},,].Equal[${action.Arg[1,]}]}) {
        /docommand /mac ${action}
    }
    /next i
    /echo Macro not found
    /return
}
/if (${action.Find[mod rod]}) {
    /if (${Cursor.ID}) {
        /guildsay ITEM ON CURSOR - MOD RODS COMING
        /return
    }
    /if (${Me.FreeInventory} < 1 && !${FindItem[=Rod of Mystical Transvergence].ID}) {
        /guildsay NO ROOM IN BAGS - MOD RODS COMING
        /return
    }
    /if (${FindItem[=Rod of Mystical Transvergence].ID} && ${FindItem[=Rod of Mystical Transvergence].Charges} < 3) /call handledestroy "Rod of Mystical Transvergence"
    /return
}
/if (${action.Find[accept rez]}) {
    /if (${Window[ConfirmationDialogBox].Open} || !${InvSlot[13].Item.ID}) {
        /docommand /mac rez ${mainassist} 
    }
    /return
}
/if (${action.Find[consent]}) {
    /varset action ${action.Right[-8]}
    /consent ${action}
    /return
}
/if (${action.Find[snare]}) {
    /if (${action.Find[dont]}) {
        /echo turning snare off
        /varset snare 0
        /return
    }
    /varset snare 1
    /return
}
/if (${action.Find[stick]}) {
    /if (${action.Find[front]}) {
        /echo sticking in front
        /varset sticktype front loose 8
    }
    /if (${action.Find[behind]}) {
        /echo sticking behind
        /varset sticktype behindonce loose 8
    }
    /return
}
/if (${action.Find[pet]}) {
    /if (${action.Find[pet haste]}) {
        /if (${action.Find[dont pet haste]} || ${action.Find[no pet haste]} || ${action.Find[pet haste off]}) { 
            /nomodkey /notify PIW_BuffWindow PetBuff${Math.Calc[(${Me.PetBuff[${petbuffspell}]}+ 1)- 2].Int} leftmouseup
            /varset pethasteoff 1
            /varset pethastetimer 0
            /echo NOT hasting pet
            /return    
        }
        /varset pethasteoff 0
        /echo Hasting pet as normal
        /return
    }
    /if (${action.Find[kill pet]}) {
        /pet leave
        /varset dopet 0
        /return
    }
    /if (${action.Find[do pet]}) {
        /varset dopet 1
        /return
    }
/return
}
/if (${action.Find[rebuff]}) {
    /varset hpbufftimer 0
    /varset lifetapbufftimer 0
    /varset pethastetimer 0
    /return
}
/if (${action.Find[anon]}) {
    /docommand /a
    /return
}
/if (${action.Find[camp]}) {
    /if (${Me.Trader}) /return
    /if (${action.Find[desktop]}) {
        /camp desktop
        :action
        /doevents toggle
        /if (${Macro.Return.Equal[cancel]}) /return
        /delay 2
        /goto :action
        /return
    }
    /camp
    :action
    /doevents toggle
    /if (${Macro.Return.Equal[cancel]}) /return
    /delay 2
    /goto :action
/return
}
/if (${action.Find[cancel]}) {
    /return cancel
}
/if (${action.Find[assistat]}) {
    /echo setting assistat to ${action.Arg[2,]}
    /varset assistat ${action.Arg[2,]}
    /if (${Defined[nukeat]}) /varset nukeat ${action.Arg[2,]}
    /return
}
/if (${action.Find[/ex]}) {
    /if (${Me.Trader}) /return
    /docommand /exit
}
/if (${action.Find[throne]}) {
    /aa act Throne of Heroes
    /return
}
/if (${action.Find[infusion]}) {
    /aa act Infusion of the Faithful
    /return
}
/if (${action.Find[lesson]}) {
    /aa act Lesson of the Devoted
    /return
}
/if (${action.Find[intensity]}) {
    /aa act Intensity of the Resolute
    /return
}
/if (${action.Find[expedient]} || ${action.Find[expediant]}) {
    /aa act Expedient Recovery
    /return
}
/if (${action.Find[pagedown]}) {
    /keypress Page_Down hold 
    /delay 1s
    /keypress Page_Down
    /return
}
/return

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
Last edited by toolisuber on Tue Sep 08, 2015 4:25 am, edited 2 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu level 65 or so ench, bst, sk

Post by toolisuber » Wed Aug 05, 2015 6:09 pm

reserved for sk.mac part 2
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu level 65 or so ench, bst, sk

Post by toolisuber » Wed Aug 05, 2015 6:10 pm

spell_routines.inc

this version of spell_routines.inc should be faster than other versions
it is almost finished-think castfail, nothold and interrupt can be combined
this would read each line of text 1x vs 3x =)

|this is my spellroutines.inc
|it works good and not a lot of chat events, out of mana is commented out
|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
|
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

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 the old version its ok for research purposes this works its 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
Last edited by toolisuber on Thu Aug 20, 2015 10:53 pm, edited 5 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu level 65 or so ench, bst, sk

Post by toolisuber » Wed Aug 05, 2015 6:11 pm

toolismacro.ini

updated 09/06/2015? 5:37pm est
|it needs to be named that or u gotta rewrite a whole bunch of stuff
|there is a find command in notepad and u can find things
|
|this file is very necessary, supports like 12 groups(I variable somewhere)
|
|you can add macros that autoswitch to in othermacros area
|you can change totalgroups to what ur total number of groups are
|you have to add groups if you have more than 4 groups its rlly easy
|just add the entry [Group5] etc and enter in names of chars
|just copy paste orsomething and changethe groupnumber and write names
|

Code: Select all

[Values]
totalgroups=4
totalrotationnumber=0
othermacros=fish,forage,rez,pl
macros=bard,cleric,necro,monk,shaman,mage,sk,ench,beast,paladin,wiz,warrior,rogue,ranger,druid,berserker

shamanhpbuffer=empty
shamanhpbuffertargetgroup=0
shamansowbuffer=empty
shamansowbuffertargetgroup=0
clerichpbuffer=empty
clerichpbuffertargetgroup=0
clerichastebuffer=empty
clerichastebuffertargetgroup=0
druidhpbuffer=empty
druidhpbuffertargetgroup=0
druiddmfbuffer=empty
druiddmfbuffertargetgroup=0
rangerattackonebuffer=empty
rangerattackonebuffertargetgroup=0
rangerattacktwobuffer=empty
rangerattacktwobuffertargetgroup=0
priestregenbuffer=empty
priestregenbuffertargetgroup=0
wizrunebuffer=empty
wizrunebuffertargetgroup=0
necrodmfbuffer=empty
necrodmfbuffertargetgroup=0
magedsbuffer=empty
magedsbuffertargetgroup=0
enchkeibuffer=empty
enchkeibuffertargetgroup=0
enchresistbuffer=empty
enchresistbuffertargetgroup=0
shamanresistbuffer=empty
shamanresistbuffertargetgroup=0
bstcrackbuffer=empty
bstcrackbuffertargetgroup=0
bsthpbuffer=empty
bsthpbuffertargetgroup=0
palhpbuffer=empty
palhpbuffertargetgroup=0

bstparagon=empty
druidparagon=empty
modrods=empty
clericward=empty
druidward=empty
group1cure=empty
group2cure=empty
group3cure=empty
group4cure=empty
group1regen=empty
group2regen=empty
group3regen=empty
group4regen=empty


[Movement]
group1ready=empty
group2ready=empty
group3ready=empty
group4ready=empty

[Group1]
member1=Tooli
member2=Toolis
member3=Chloroform
member4=Lateralus
member5=Opiate
member6=Evildeedlit

[Group2]
member1=Leviath
member2=Undertow
member3=Lolth
member4=Zhzh
member5=Atoms
member6=Parabola

[Group3]
member1=Finhmi
member2=Schism
member3=Abyssal
member4=Nocturnity
member5=Deedlit
member6=Ticksandleeches

[Group4]
member1=Sengir
member2=Intolerance
member3=Chronal
member4=Severely
member5=Astraldeva
member6=Parabol
Last edited by toolisuber on Sun Sep 06, 2015 5:43 pm, edited 3 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu level 65 or so ench, bst, sk

Post by toolisuber » Wed Aug 05, 2015 6:11 pm

rez.mac
--------------
|i forgot rez macro this is necessary kinda too
|its kinda broken easy fix
|
|if u rlly wanna get into it, you can write macros like this and call them
|in ur macros and they will switch to the macro, and switch back and stuff
| if you do it right
|
|edit:this macro is ESPECIALLY NOT SAFE FOR LIVE IT IS INHUMANLY FAST
|edit:this macro detects that u died and waits for rez and loots and switches
|edit:back to the uh regular macro u were running like determined by ur
|edit:eq class name (cleric, sk, ench, etc etc
|edit: this is vital and ur macros may turn off when u die without it
|
|edit:for a starter project you can make the bags loot first, then click a heal
| potion if you are in combat and that would be really good
|
--------------
rez.mac
--------------

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 Toggle "#1#guild, '#2#toggle#3#'"
#Event Movement "#1#guild, '#2#goto#3#'"

#include spell_routines.inc

Sub Main

/declare randomvariable string outer "thisisaglitch"
/declare mainassist     string outer ${Param0}
/declare makecamploc    string outer ${Me.Y},${Me.X}
/declare amrezzed       int    outer 0
/declare amnaked        int    outer 4
/declare ammoving       int    outer 0

/if (${Me.Class.Name.Equal[Bard]}) /squelch /twist off
/if (${Me.Class.Name.Equal[Bard]}) /declare dotwist        int    outer 0
/if (${Me.Class.Name.Equal[Bard]}) /declare didinvis       int    outer 0

/if (!${Defined[Param0]}) {
    /echo no paramater of main assist set, defaulting to myself
    /varset mainassist  string outer ${Me.Name}
}
/if (${Defined[Param1]}) {
    /if (${Param1} == 100) /varset amnaked 100
    /if (${Param1} != 100 && ${Param1.NotEqual[NULL]}) {
        /echo second paramater given! it is ${Param1}
        /declare savedparamater int outer ${Param1}
    }
}
/if (${Defined[Param2]}) {
    /if (${Param2} == 100) /varset amnaked 100
    /if (${Param2} != 100 && ${Param1.NotEqual[NULL]}) {
        /echo third paramater given! it is ${Param2}
        /if (${Defined[savedparamater]}) /declare savedparamatertwo int outer ${Param2}
        /if (!${Defined[savedparamater]}) /declare savedparamater int outer ${Param2}
    }
}
/if (${Defined[Param3]}) {
    /if (${Param2} != 100 && ${Param1.NotEqual[NULL]}) {
        /echo fourth paramater given! it is ${Param3}
        /if (${Defined[savedparamatertwo]}) /declare savedparamaterthree int outer ${Param3}
        /if (!${Defined[savedparamatertwo]}) /declare savedparamatertwo int outer ${Param3}
    }
}

/echo **** -|_ Rez Macro Initiated _|- ****
:rezloop
/call waitrez
/call checkstuff
/if (${NearestSpawn[corpse radius 100 "${Me.Name}"].ID} && ${amrezzed}) /call lootcorpse
/delay 2
/doevents
/goto :rezloop

Sub waitrez

/if (${Window[ConfirmationDialogBox].Open} && !${Me.Casting.ID} && !${Cursor.ID}) {
    /if (${Window[ConfirmationDialogBox].FirstChild.Next.Next.Next.Next.Text.Find[destroy]}) {
        /nomodkey /notify ConfirmationDialogBox CD_No_Button leftmouseup
        /return
    }
    /if (${Window[ConfirmationDialogBox].FirstChild.Next.Next.Next.Next.Text.Find[upon you.]}) {
        /if (${Window[ConfirmationDialogBox].FirstChild.Next.Next.Next.Next.Text.Find[destroy]}) {
            /nomodkey /notify ConfirmationDialogBox CD_No_Button leftmouseup
            /return
        }
        /if (!${Cursor.ID}) /nomodkey /notify ConfirmationDialogBox CD_Yes_Button leftmouseup
        /delay 1s
        /if (!${Window[ConfirmationDialogBox].Open}) /varset amrezzed 1
    }
}
/return

Sub checkstuff

/if (${Me.State.Equal[BIND]} && !${InvSlot[13].Item.ID} && !${Bool[${diedagain}]} && !${NearestSpawn[corpse radius 100 "${Me.Name}"].ID} && ${amrezzed}) {
    /varset amrezzed 0
    /declare diedagain int outer 1
    /guildsay i died again
    /echo i have died -- returning
    /return
}
/if (${Cursor.Name.Equal[Rod of Mystical Transvergence]}) {
    /autoinv
    /call handledestroy "Rod of Mystical Transvergence"
}
/if (${Bool[${corpsedone}]} && ${InvSlot[13].Item.ID} && ${Bool[${abandoncorpse}]}) {
    /if (${Me.Level} < 64) /docommand /mac pl ${mainassist} ${savedparamater}
    /if (${Me.Class.Name.Equal[Beastlord]}) /docommand /mac beast ${mainassist} ${savedparamater} ${savedparamatertwo}
    /if (${Me.Class.Name.Equal[Shadowknight]}) /docommand /mac sk ${mainassist} ${savedparamater}
    /if (${Me.Class.Name.Equal[Magician]}) /docommand /mac mage ${mainassist} ${savedparamater} ${savedparamatertwo}
    /if (${Me.Class.Name.Equal[Necromancer]}) /docommand /mac necro ${mainassist} ${savedparamater} ${savedparamatertwo}
    /if (${Me.Class.Name.Equal[Wizard]}) /docommand /mac wiz ${mainassist} ${savedparamater}
    /if (${Me.Class.Name.Equal[Enchanter]}) /docommand /mac ench ${mainassist} ${savedparamater}
    /if (${Me.Class.Name.Equal[Bard]}) /docommand /mac bard ${mainassist} ${savedparamater}
    /if (${Me.Class.Name.Equal[Cleric]}) /docommand /mac cleric ${mainassist} ${savedparamater}
    /if (${Me.Class.Name.Equal[Shaman]}) /docommand /mac shaman ${mainassist} ${savedparamater} ${savedparamatertwo}
    /if (${Me.Class.Name.Equal[Monk]}) /docommand /mac monk ${mainassist} ${savedparamater}
    /if (${Me.Class.Name.Equal[Rogue]}) /docommand /mac rogue ${mainassist} ${savedparamater}
    /if (${Me.Class.Name.Equal[Paladin]}) /docommand /mac paladin ${mainassist} ${savedparamater}
    /if (${Me.Class.Name.Equal[Ranger]}) /docommand /mac ranger ${mainassist} ${savedparamater}
    /if (${Me.Class.Name.Equal[Berserker]}) /docommand /mac berserker ${mainassist} ${savedparamater}
    /if (${Me.Class.Name.Equal[Druid]}) /docommand /mac druid ${mainassist} ${savedparamater}
}   
/if (${amrezzed} && !${NearestSpawn[1,corpse radius 100 "${Me.Name}"].ID} || ${NearestSpawn[1,corpse radius 100 "${Me.Name}"].ID} && ${Defined[stuffoncorpse]}) {
    /if (!${NearestSpawn[2,corpse radius 100 "${Me.Name}"].ID}) {
        /if (!${Defined[corpsedone]}) /declare corpsedone int outer 1
        /if (!${Defined[abandoncorpse]}) /declare abandoncorpse int outer 1
    }
}   
/return


Sub lootcorpse

/declare i int local
/declare justaname string local
:lootcorpse
/target ${NearestSpawn[1,corpse radius 100 "${Me.Name}"].CleanName}
/delay 2
/if (${Target.Type.Equal[CORPSE]} && !${Cursor.ID}) {
    /delay 1s
    /loot
    /if (${Window[LootWnd].Open}) {
        /for i 1 to 30
        :lootitem
        /if (${InvSlot[loot31].Item.ID}) {
            /echo there is still stuff on my corpse !
            /guildsay !! There is still stuff on my corpse !!
            /declare stuffoncorpse int outer 1
            /declare abandoncorpse int outer 1
        }
        /if (${InvSlot[loot${i}].Item.ID}) {
            /varset justaname (${InvSlot[loot${i}].Item.Name})
            /varset justaname ${justaname.Right[-1].Left[-1]}
            /nomodkey /itemnotify ${InvSlot[loot${i}]} rightmouseup
            /delay 2
            /if (!${FindItem[=${justaname}].ID}) {
                /echo this fired in rez macro - ${justaname}
                /goto :lootitem
            }
            /next i
        }
        /nomodkey /notify LootWnd LW_DoneButton leftmouseup
        /delay 2
        /if (${NearestSpawn[1,corpse radius 100 "${Me.Name}"].ID} && !${stuffoncorpse}) {
            /goto :lootcorpse
        }
        /if (!${NearestSpawn[2,corpse radius 100 "${Me.Name}"].ID}) {
            /if (!${Defined[corpsedone]}) /declare corpsedone int outer 1
            /if (!${Defined[abandoncorpse]}) /declare abandoncorpse int outer 1
        }
    }
}
/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 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 didinvis 0
        /varset makecamploc ${Me.Y},${Me.X}
    }
    /return
}
/stick off
/varset ammoving 0
/varset didinvis 0
/varset makecamploc ${Me.Y},${Me.X}
/return

Sub clickitem(ClickItem, ReplaceSlot)

/if (${ReplaceSlot.Find[inv]}) /declare targetslot string local 100
/if (!${ReplaceSlot.Find[inv]}) /declare targetslot int local ${ReplaceSlot}
/if (!${Defined[ClickItem]}) {
    /echo target item not defined - returning
    /return
}
/if (!${Defined[ReplaceSlot]}) {
    /echo replace slot not defined - inv or slot # plz -returning
    /return
}
/if (${Cursor.ID}) {
    /guildsay trying to click item but stuff is on my cursor
    /return
}   
/if (${FindItem[=${ClickItem}].ID} && !${Cursor.ID}) {
    /declare castingtime float local ${FindItem[=${ClickItem}].CastTime}
    /declare slotnumber int local
    /declare packnumber int local
    /declare i int local
    /declare j int local
    /for i 1 to 8
    /for j 1 to 10
    /if (${InvSlot[Pack${i}].Item.Item[${j}].Name.Equal[${ClickItem}]}) {
    /echo found item in bag
        /varset packnumber ${i}
        /varset slotnumber ${j}
        /goto :click
    }
    /next j
    /varset j 0
    /next i
    /varset i 0
    /for i 1 to 8
    /if (${InvSlot[${Math.Calc[22 + ${i}]}].Item.Name.Equal[${ClickItem}]}) {
        /echo found item in main slot
        /varset packnumber ${i}
        /varset targetslot pack${packnumber}
        /declare invitem int local 1
        /goto :click
    }
    /next i
    /varset i 0
    :click
    /if (!${Window[InventoryWindow].Open}) /keypress i
    /if (!${Window[pack${packnumber}].Open} && !${Defined[invitem]}) /nomodkey /itemnotify pack${packnumber} rightmouseup
    /delay 2
    /if (!${Defined[invitem]}) /nomodkey /itemnotify in pack${packnumber} ${slotnumber} leftmouseup
    /if (${Defined[invitem]}) {
        /echo using ${ClickItem}
        /nomodkey /itemnotify ${InvSlot[${Math.Calc[22 + ${packnumber}]}]} rightmouseup
        /delay 2
        /if (${castingtime} > 0.50) /delay ${Math.Calc[${castingtime} * 10]}
        /keypress i
        /deletevar invitem
        /return
    }
    /delay 2
    /if (${Cursor.Name.Equal[${ClickItem}]}) {
        /echo Using ${ClickItem}
        /if (${Defined[targetslot]}) /varset targetslot ${InvSlot[${targetslot}]}
        /if (${targetslot} == 100) /varset targetslot pack${packnumber}
        /nomodkey /itemnotify ${targetslot} leftmouseup
        /delay 2
        /nomodkey /itemnotify ${targetslot} rightmouseup
        /if (${castingtime} > 0.50) /delay ${Math.Calc[${castingtime} * 10]}
        /delay 4
        /if (!${ReplaceSlot.Find[inv]}) /nomodkey /itemnotify ${InvSlot[${targetslot}]} leftmouseup
        /if (${ReplaceSlot.Find[inv]}) /nomodkey /itemnotify ${InvSlot[${Math.Calc[22 + ${packnumber}]}]} leftmouseup
        /delay 4
        /if (${Cursor.Name.Equal[${ClickItem}]}) {
            /nomodkey /itemnotify pack${packnumber} rightmouseup
            /delay 2
            /nomodkey /itemnotify in pack${packnumber} ${slotnumber} leftmouseup
            /delay 2
            /nomodkey /itemnotify pack${packnumber} rightmouseup
            /delay 2
        }
    }
    /keypress i
}    
/return

Sub handledestroy(TargetItem)

/if (!${Defined[TargetItem]}) {
    /echo target item not defined, returning
    /return
}
/if (${FindItem[=${TargetItem}].ID} && !${Cursor.ID}) {
    /declare slotnumber int local
    /declare packnumber int local
    /declare i int local
    /declare j int local
    /for i 1 to 8
    /for j 1 to 10
    /if (${InvSlot[Pack${i}].Item.Item[${j}].Name.Equal[${TargetItem}]}) {
        /echo item is in pack
        /varset packnumber ${i}
        /varset slotnumber ${j}
        /goto :destroy
    }
    /next j
    /varset j 0
    /next i
    /varset i 0
    /for i 1 to 8
    /if (${InvSlot[${Math.Calc[22 + ${i}]}].Item.Name.Equal[${TargetItem}]}) {
        /echo found item in main slot
        /varset packnumber ${i}
        /declare invitem int local 1
        /goto :destroy
    }
    /next i
    /varset i 0
    :destroy
    /if (!${Window[InventoryWindow].Open}) /keypress i
    /if (!${Window[pack${packnumber}].Open} && !${Defined[invitem]}) /nomodkey /itemnotify pack${packnumber} rightmouseup
    /delay 2
    /if (!${Defined[invitem]}) /nomodkey /itemnotify in pack${packnumber} ${slotnumber} leftmouseup
    /if (${Defined[invitem]}) /nomodkey /itemnotify pack${packnumber} leftmouseup
    /delay 2
    /if (${Cursor.Name.Equal[${TargetItem}]}) {
        /echo destroying ${TargetItem}
        /if (${Cursor.Name.Equal[${TargetItem}]}) {
            /echo destroying ${Cursor.Name}
            /destroy
            /if (${Defined[invitem]}) /deletevar invitem
        }
    }
    /if (${Window[pack${packnumber}].Open}) /nomodkey /itemnotify pack${packnumber} rightmouseup
    /delay 2
    /keypress i
}    
/return

Sub Event_Toggle(Line, ChatSender, Targets, action)

/if (!${Bool[${action}]}) /return
/if (${Bool[${Targets}]}) {   
    /if (${Targets.Arg[1,].Equal[group]}) {
        /if (${Targets.Arg[1,].Equal[group]}) {
            /declare groupnumber int local
            /call findgroup
            /varset Targets ${Targets.Right[-6]}
            /for groupnumber 1 to ${Ini[toolismacro,Values,totalgroups]}
            /if (${Targets.Arg[${groupnumber},,]} == ${Macro.Return}) {
                /goto :togglestuff
            } else {
                /next groupnumber 
                /return
            }
        }
    }
    /if (${Targets.Arg[1,].Equal[healers]}) {
        /if (${Me.Class.HealerType}) /goto :togglestuff
        /return
    }
    /if (${Targets.Arg[1,].Equal[casters]}) {
        /if (${Me.Class.PureCaster}) /goto :togglestuff
        /return
    }
    /declare name int local 
    /for name 1 to 12
    /if (${Targets.Arg[${name},].Equal[${Me.Name}]}) /goto :togglestuff
    /next name
    /return
}
:togglestuff
/if (${action.Find[abort]}) {
    /keypress forward
    /varset didinvis 0
    /guildsay !ABORTING!
    /return abort
}
/if (${action.Arg[1,].Equal[leash]}) {
    /varset action ${action.Right[-6]}
    /if (${Bool[${Ini[movement,leash,${action}]}]}) {
        /if (!${Defined[leashloc]}) /declare leashloc string outer
        /declare i int local
        /for i 1 to 10
        /if (${Ini[movement,leash,zoneshortnames].Arg[${i},,].Equal[${Zone.ShortName}]}) {
            /varset leashloc ${Ini[movement,leash,${action}]}
        }
        /next i
    }
    /return
}
/if (${action.Arg[1,].Equal[zoneout]}) {
    /varset action ${action.Right[-8]}
    /if (${Bool[${Ini[movement,zoneout,${action}]}]}) {
        /if (!${Defined[zoneoutloc]}) /declare zoneoutloc string outer
        /declare i int local
        /for i 1 to 10
        /if (${Ini[movement,zoneout,zoneshortnames].Arg[${i},,].Equal[${Zone.ShortName}]}) {
            /if (!${Defined[zoneoutcommand]}) /declare zoneoutcommand string outer empty
            /if (${Bool[${Ini[movement,zoneout,${action}command]}]}) /varset zoneoutcommand ${Ini[movement,zoneout,${action}command]}
            /varset zoneoutloc ${Ini[movement,zoneout,${action}]}
            /call gotoloc "${zoneoutloc}" "${zoneoutcommand}"
            /return
        }
        /next i
    }
    /return
}
/if (${action.Arg[1,].Equal[leashoff]}) {
    /if (${Defined[leashloc]}) /deletevar leashloc  
    /return  
}
/if (${action.Arg[1,].Equal[tank]}) {
    /if (${action.Arg[1,].Equal[tank]}) /varset action ${action.Right[-5]}
    /varset mainassist ${action}
    /return
}
/if (${action.Find[/mac]}) {
/varset action ${action.Right[-5]}
    /if (${action.Arg[1,].Equal[start]}) {
        /varset action ${action.Right[-6]}
        /if (${Me.Level} < 60) /docommand /mac pl ${action} ${savedparamater}
        /if (${Me.Class.Name.Equal[Beastlord]}) /docommand /mac beast ${action} ${savedparamater}
        /if (${Me.Class.Name.Find[Shadow]}) /docommand /mac sk ${action} ${savedparamater}
        /if (${Me.Class.Name.Equal[Magician]}) /docommand /mac mage ${action} ${savedparamater}
        /if (${Me.Class.Name.Equal[Necromancer]}) /docommand /mac necro ${action} ${savedparamater}
        /if (${Me.Class.Name.Equal[Wizard]}) /docommand /mac wiz ${action} ${savedparamater}
        /if (${Me.Class.Name.Equal[Enchanter]}) /docommand /mac ench ${action} ${savedparamater}
        /if (${Me.Class.Name.Equal[Bard]}) /docommand /mac bard ${action} ${savedparamater}
        /if (${Me.Class.Name.Equal[Cleric]}) /docommand /mac cleric ${action} ${savedparamater}
        /if (${Me.Class.Name.Equal[Shaman]}) /docommand /mac shaman ${action} ${savedparamater}
        /if (${Me.Class.Name.Equal[Monk]}) /docommand /mac monk ${action} ${savedparamater}
        /if (${Me.Class.Name.Equal[Rogue]}) /docommand /mac rogue ${action} ${savedparamater}
        /if (${Me.Class.Name.Equal[Paladin]}) /docommand /mac paladin ${action} ${savedparamater}
        /if (${Me.Class.Name.Equal[Ranger]}) /docommand /mac ranger ${action} ${savedparamater}
        /if (${Me.Class.Name.Equal[Berserker]}) /docommand /mac berserker ${action} ${savedparamater}
        /if (${Me.Class.Name.Equal[Druid]}) /docommand /mac druid ${action} ${savedparamater}
    }
    /declare i int local
    /for i 1 to 15
    /if (${Ini[toolismacro,Values,macros].Arg[${i},,].Equal[${action.Arg[1,]}]}) {
        /docommand /mac ${action}
    }
    /next i
    /varset i 0
    /for i 1 to 10
    /if (${Ini[toolismacro,Values,othermacros].Arg[${i},,].Equal[${action.Arg[1,]}]}) {
        /docommand /mac ${action}
    }
    /next i
    /echo Macro not found
    /return
}
/if (${action.Find[mod rod]}) {
    /if (${Cursor.ID}) {
        /guildsay ITEM ON CURSOR - MOD RODS COMING
        /return
    }
    /if (${Me.FreeInventory} < 1 && !${FindItem[=Rod of Mystical Transvergence].ID}) {
        /guildsay NO ROOM IN BAGS - MOD RODS COMING
        /return
    }
    /if (${FindItem[=Rod of Mystical Transvergence].ID} && ${FindItem[=Rod of Mystical Transvergence].Charges} < 3) /call handledestroy "Rod of Mystical Transvergence"
    /return
}
/if (${action.Arg[1,].Equal[rez]}) {
    /varset action ${action.Right[-4]}
    /if (${Me.Gem["Reviviscence"]}) {
        /if (!${Me.SpellReady["Reviviscence"]}) {
            /guildsay rez not up yet, returning
            /return
        }
        /target ${action}'s corpse
        /delay 2
        /call cast "Reviviscence" 1s
        /if (${Macro.Return.Equal["CAST_SUCCESS"]}) /guildsay ${Target} rezzed!
    }
    /return
}
/if (${action.Find[consent]}) {
    /varset action ${action.Right[-8]}
    /consent ${action}
    /return
}
/if (${action.Find[anon]}) {
    /docommand /a
    /return
}
/if (${action.Find[camp]}) {
    /if (${Me.Trader}) /return
    /if (${action.Find[desktop]}) {
        /camp desktop
        :action
        /doevents toggle
        /if (${Macro.Return.Equal[cancel]}) /return
        /delay 2
        /goto :action
        /return
    }
    /camp
    :action
    /doevents toggle
    /if (${Macro.Return.Equal[cancel]}) /return
    /delay 2
    /goto :action
/return
}
/if (${action.Find[cancel]}) {
    /return cancel
}
/if (${action.Find[/ex]}) {
    /if (${Me.Trader}) /return
    /docommand /exit
}
/if (${action.Find[pagedown]}) {
    /keypress Page_Down hold 
    /delay 1s
    /keypress Page_Down
    /return
}
/if (${action.Find[throne]}) {
    /aa act Throne of Heroes
    /return
}
/if (${action.Find[infusion]}) {
    /aa act Infusion of the Faithful
    /return
}
/if (${action.Find[lesson]}) {
    /aa act Lesson of the Devoted
    /return
}
/if (${action.Find[intensity]}) {
    /aa act Intensity of the Resolute
    /return
}
/if (${action.Find[expedient]} || ${action.Find[expediant]}) {
    /aa act Expedient Recovery
    /varset amrezzed 1
    /return
}
/return

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

/if (${Bool[${makecamploc}]}) {
    /call gotoloc "${makecamploc}"
    /if (${Macro.Return} == 1) {
        /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
    /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]}) /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
            /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
        }
        /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]}) /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
                /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
Last edited by toolisuber on Mon Sep 07, 2015 1:56 am, edited 3 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu level 65 or so ench, bst, sk

Post by toolisuber » Wed Aug 05, 2015 6:14 pm

movement functions ( copy paste this in the bottom of ur own macros if u want)

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

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu level 65 or so ench, bst, sk

Post by toolisuber » Wed Aug 05, 2015 6:15 pm

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
| /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
Last edited by toolisuber on Wed Aug 05, 2015 6:48 pm, edited 1 time in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu level 65 or so ench, bst, sk

Post by toolisuber » Wed Aug 05, 2015 6:16 pm

reserved for movement.ini part2
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu level 65 or so ench, bst, sk

Post by toolisuber » Wed Aug 05, 2015 6:24 pm

pl.mac
----------
|this is good for lower level chars i feel i should include this
|you can change the words with the variables like what spells to use
|
|you can use this when u just want to /stick or something too -no bs
|(with moveutils plugin of course)
|
pl.mac
----------

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 Enraged  "#1# enraged#*#"
#Event GuildAssist "#1#tells#*#, 'assist me with#*#'"
#Event Toggle "#1#guild, '#2#toggle#3#'"
#Event Movement "#1#guild, '#2#goto#3#'"

#include spell_routines.inc

Sub Main

/declare randomstring    string outer "glitchishere"
/declare assistat        int outer 98
/if (${Me.Class.HealerType} && ${Me.Book[${healspell}]})                      /declare doheal           int outer 1
/if (${Me.Class.HealerType})                                                  /declare healat           int outer 85
/if (${Me.Class.Name.Equal[Necromancer]} || ${Me.Class.Name.Equal[Magician]}) /declare pethasteduration int outer 36000

/if (${Me.Class.Name.Equal[Warrior]}) /declare dotaunt int outer 0
/if (${Me.Class.Name.Find[Shadow]})   /declare dotaunt int outer 0
/if (${Me.Class.Name.Equal[Paladin]}) /declare dotaunt int outer 0

/if (${Me.Class.Name.Equal[Bard]})    /declare speedsonggem  int outer 4
/if (${Me.Class.Name.Equal[Bard]})    /declare travelsonggem int outer 6
/if (${Me.Class.Name.Equal[Bard]} && ${Me.Level} == 51) /stick set autopause off

/if (${Me.Class.Name.Equal[Necromancer]}) /declare petspell         string outer "Saryrn's Companion"
/if (${Me.Class.Name.Equal[Necromancer]}) /declare pethastespell    string outer "Rune of Death"
/if (${Me.Class.Name.Equal[Necromancer]}) /declare nukespell        string outer "Gangrenous Touch of Zum`uul"

/if (${Me.Class.Name.Equal[Magician]})    /declare petspell         string outer "Servant of Marr"
/if (${Me.Class.Name.Equal[Magician]})    /declare pethastespell    string outer "Burnout V"
/if (${Me.Class.Name.Equal[Magician]})    /declare nukespell        string outer "Shock of Fiery Blades"

/if (${Me.Class.Name.Equal[Beastlord]})   /declare petspell         string outer
/if (${Me.Class.Name.Equal[Beastlord]})   /declare pethastespell    string outer
/if (${Me.Class.Name.Equal[Beastlord]})   /declare healspell        string outer
 
/if (${Me.Class.Name.Equal[Shaman]})      /declare petspell         string outer "True Spirit"
/if (${Me.Class.Name.Equal[Shaman]})      /declare pethastespell    string outer 
/if (${Me.Class.Name.Equal[Shaman]})      /declare healspell        string outer "Tnarg's Mending"

/if (${Me.Class.Name.Equal[Cleric]})      /declare healspell        string outer "Ethereal Light"

/if (${Me.Class.Name.Equal[Necromancer]} || ${Me.Class.Name.Equal[Magician]}) /declare pethastetimer timer outer
/declare makecamploc  string outer ${Me.Y},${Me.X}
/declare sticktype    string outer behindonce loose 8
/declare canlev          int outer 1
/declare didinvis        int outer 0
/declare didstick        int outer 0
/declare gettarget       int outer 1
/declare targetdead      int outer 1
/declare targetid        int outer 0
/declare ammoving        int outer 0

/squelch /stick off
/squelch /assist off

/declare mainassist string outer
/varset mainassist ${Param0}

/if (${Defined[Param0]}) {
/echo My main assist is set to ${mainassist}
} else {
/echo This Macro needs a Main assist to run ... try /mac monk Tanksname ....
/end
}
/echo pl macro started
/memspellset level 62

:loop
/if (${ammoving} && ${Me.Class.Name.Equal[Bard]}) /call travelstuff
|/if (!${ammoving} && ${Bool[${leashloc}]}) /call gotoloc
/if (!${ammoving}) /call cleartarget
/if (!${ammoving}) /call checkstuff
/if (!${ammoving} && ${Bool[${petspell}]}) /call summonpet
/if (${gettarget} && !${ammoving}) /call gettarget
/if (${targetid} == ${Target.ID}) /call killtarg
/if (!${ammoving} && ${Me.CombatState.NotEqual[COMBAT]}) { 
    /if (!${Me.Casting.ID} && ${Me.Standing} && !${Me.Moving})  /sit
}
/if (!${ammoving} && ${doheal}) /call checkheals
/doevents
/delay 2
/goto :loop

Sub gettarget

/call getids "${mainassist}"
/if (${Spawn[${Macro.Return}].ID} && ${Spawn[id ${Macro.Return}].Distance} < 200) {
    /target ID ${Macro.Return}
    /delay 2
    /assist
    /delay 2
    /if (${Target.Type.Equal[NPC]} && ${Target.Type.NotEqual[CORPSE]} && ${Target.PctHPs} < ${assistat} && ${Target.Distance} < 200) {
        /varset targetid ${Target.ID}
        /varset targetdead 0
        /varset gettarget 0
        /varset didstick 0
        /g assisting on %t
        /echo My Target is now ${Target.CleanName}
        /if (${Me.Pet.ID}) /pet attack
    }
}
/return 

Sub killtarg

/if (!${didstick} && ${Target.Type.Equal[NPC]} && ${Target.ID} == ${targetid} && !${Me.Class.PureCaster}) {
    /face fast nolook id ${targetid}
    /stick ${sticktype}
    /if (${Me.Pet.ID}) /pet attack
    /attack on
    /varset didstick 1
    /delay 2
}
/if (${Me.AbilityReady["Kick"]} && ${Target.Type.Equal["NPC"]}) {
    /if (!${Defined[dontmelee]}) {
        /doability "Kick"
    }
}
/if (${dotaunt}) {
    /if (${Me.AbilityReady["Taunt"]} && ${Target.Type.Equal["NPC"]}) {
        /doability "Taunt"
    }
}
/if (${Bool[${nukespell}]}) {
    /if (${Me.SpellReady[${nukespell}]} && ${Me.CurrentMana} > ${Spell[${nukespell}].Mana}) {
        /if (${Target.ID} == ${targetid} && ${Target.PctHPs} < ${assistat} && ${Target.PctHPs} > 10) {
            /call cast ${nukespell} 1s checkhps
        }
    }
}
/return

Sub travelstuff

/declare i int local
/if (${Cursor.ID} && !${cursorwarningtimer}) {
    /echo i cant travel through lev / no lev zones properly with shit on my cursor
    /guildsay i cant travel through lev / no lev zones properly with shit on my cursor
    /declare cursorwarningtimer timer outer 100
}
/if (!${didinvis} && ${canlev}) {
    /if (!${Me.Gem["Selo's Song of Travel"]} && !${Cursor.ID}) {
        /guildsay sec memming invis travel song
        /memspell 6 "Selo's Song of Travel"
        /delay 2s
    }
    /twist ${travelsonggem}
    /varset didinvis 1
}
/if (!${didinvis} && !${canlev}) {
    /if (!${Me.Gem["Shauri's Sonorous Clouding"]} && !${Cursor.ID}) {
        /guildsay sec memming invis song
        /memspell 4 "Shauri's Sonorous Clouding"
        /delay 2s
    }
    /call groupcheck
    /if (${Macro.Return.Equal[1]}) {
        /twist ${speedsonggem}
        /delay 3s
        /twist ${travelsonggem}
        /varset didinvis 1
    }
}

/return

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 cleartarget

/if (${Spawn[${targetid}].Type.Equal[CORPSE]} && !${targetdead} || !${Spawn[${targetid}].Type.Equal[NPC]} && !${targetdead}) {
/varset targetdead 1
/varset gettarget 1
/varset didstick 0
/attack off
/if (${Me.CombatState.NotEqual[COMBAT]} && !${NearestSpawn[1,npc radius 50].ID}) /call returntocamp "face"
}
/if (${Target.ID} != ${targetid} && ${Spawn[${targetid}].Type.NotEqual[CORPSE]} && ${Spawn[${targetid}].ID}) /target ID ${targetid}
/return

Sub checkstuff

/if (${Cursor.Name.Equal[Rod of Mystical Transvergence]}) {
    /if (${Me.FreeInventory} < 1) {
        /guildsay mod rod on cursor but no inventory room
        /return
    }
}
/if (${Cursor.Name.Equal[Rod of Mystical Transvergence]}) {
    /if (${Me.FreeInventory} > 1) {
        /autoinv
        /call handledestroy "Rod of Mystical Transvergence"
    }
}
/if (!${InvSlot[13].Item.ID}) {
    /if (!${InvSlot[17].Item.ID}) {
        /if (${Zone.ShortName.Equal[poknowledge]} || ${Zone.ShortName.Equal[guildlobby]} || !${InvSlot[18].Item.ID}) {
            /if (${MacroQuest.GameState.NotEqual[INGAME]}) /return
            /if (!${Defined[amnaked]}) /declare amnaked int local 100
            /if (!${Window[SpellBookWnd].Open}) /guildsay <==== i died ====>
            /if (!${Window[SpellBookWnd].Open}) /memspellset level 62
            /if (${Window[SpellBookWnd].Open} && !${Me.Gem[8].ID}) /delay 1s
            /if (!${Window[SpellBookWnd].Open} && ${Defined[amnaked]}) /docommand /mac rez ${mainassist} ${amnaked}
            /if (!${Window[SpellBookWnd].Open}) /docommand /mac rez ${mainassist}
        }
    }
}
/return

Sub checkheals

/declare i int local 
/if (${Me.CurrentMana} > ${Spell[${healspell}].Mana}) {
    /call getids "${mainassist}"
    /if (${Spawn[id ${Macro.Return}].Distance} < 125 && ${Spawn[id ${Macro.Return}].ID}) {
        /target ID ${Macro.Return}
        /delay 2
        /if (${Target.PctHPs} < ${healat} && ${Target.Type.Equal[PC]}) {
            /gsay heal incoming on ${Target}
            /call cast ${healspell} 1s checkhealed
        }
    }
}
/for i 0 to ${Group}
/if (${Group.Member[${i}].PctHPs} < ${healat} && ${Me.CurrentMana} > ${Spell[${healspell}].Mana}) {
    /if (${Group.Member[${i}].Distance} < 125 && ${Group.Member[${i}].Type.NotEqual[CORPSE]} && ${Group.Member[${i}].ID}) {
        /target ID ${Group.Member[${i}].ID}
        /delay 2
        /if (${Target.Type.Equal[PC]}) {
            /gsay incoming heal on ${Target}
            /call cast ${healspell} 1s checkhealed
        }
    }
}
/next i
/return

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 checkhps

/if (${Target.PctHPs} < 4 && !${Target.Named}) {
/stopcast
/echo ${Target.PctHPs} attempting interrupt...
/echo ${casttimer} (ms) cast time left...
/call Interrupt
}
/return

Sub summonpet

/if (!${Me.Pet.ID}) {
    /if (${Me.CurrentMana} > ${Spell[${petspell}].Mana}) {
        /if (${Me.Class.Name.Equal[Magician]} || ${Me.Class.Name.Equal[Necromancer]}) {
            /if (${FindItem[=Bone Chips].StackCount} > 0 && ${Me.Class.Name.Equal[Necromancer]} || ${FindItem[=Malachite].StackCount} > 0 && ${Me.Class.Name.Equal[Magician]}) {
                /call cast ${petspell} 1s
                /delay 2
                /if (${targetid}) {
                    /target ID ${targetid}
                    /delay 4
                    /pet attack
                }
            }
            /return
        }
        /call cast ${petspell} 1s
        /delay 2
        /if (${targetid}) {
            /target ID ${targetid}
            /delay 4
            /pet attack
        }
    }
}
/if (${Me.Pet.ID}) {
    /if (${Me.Book[${pethastespell}]}) {
        /if (!${Me.PetBuff[${pethastespell}]} || ${pethastetimer} < 600) {
            /if (${Me.CurrentMana} > ${Spell[${pethastespell}].Mana}) {
                /call cast ${pethastespell} 1s
                /if (${Macro.Return.Equal["CAST_SUCCESS"]}) { 
                    /varset pethastetimer ${pethasteduration}
                }
            }
        }
    }
}       
/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 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 Event_GuildAssist(Line, AssistTarget)

/varset AssistTarget ${AssistTarget.Right[-2].Left[-2]}
/call getids "${AssistTarget}"
/if (${Macro.Return} && ${Spawn[id ${Macro.Return}].Distance} < 200) {
    /target ID ${Macro.Return}
    /delay 2
    /assist
    /delay 4
    /if (${Target.Type.Equal[NPC]} && ${Target.Type.NotEqual[CORPSE]} && ${Target.Distance} < 200) {
        /varset targetid ${Target.ID}
        /varset gettarget 0
        /varset targetdead 0
        /varset didstick 0
        /echo My Target is now ${Target.CleanName}
        /if (${Me.Pet.ID}) /pet back off
        /if (${Me.Pet.ID}) /delay 5
        /if (${Me.Pet.ID}) /pet attack
    }
}
/return

Sub Event_Enraged(Line, ChatText)

/if (${ChatText.Find[has become]}) {
    /varset ChatText ${ChatText.Left[-11]}
    /if (${NearestSpawn[npc radius 200 "${ChatText}"].ID} == ${targetid}) {
        /declare mobheading float local ${Spawn[id ${targetid}].Heading.Degrees}
        /if (${mobheading} < 90 && ${Me.Heading.Degrees} < ${Math.Calc[360 -(90 - ${mobheading})]} && ${Me.Heading.Degrees} > ${Math.Calc[${mobheading} - 90]} || ${mobheading} > 270 && ${Me.Heading.Degrees} < ${Math.Calc[${mobheading} - 90]} && ${Me.Heading.Degrees} > ${Math.Calc[90 -(360 - ${mobheading}]}) || ${Me.Heading.Degrees} > ${Math.Calc[${mobheading} + 90]} || ${Me.Heading.Degrees} < ${Math.Calc[${mobheading} - 90]}) /return
        /echo >>> ${Spawn[${targetid}].CleanName} is Enraged <<<
        /declare dontmelee int outer 1
        /attack off
    }
    /doevents flush Enraged
    /return
}
/if (${ChatText.Find[is no longer]}) {
    /varset ChatText ${ChatText.Left[-13]}
    /if (${NearestSpawn[npc radius 200 "${ChatText}"].ID} == ${targetid}) {
        /echo >>> ${Spawn[${targetid}].CleanName} is no longer Enraged! <<<
        /deletevar dontmelee
        /attack on
    }
}
/doevents flush Enraged
/return

Sub clickitem(ClickItem, ReplaceSlot)

/if (${ReplaceSlot.Find[inv]}) /declare targetslot string local 100
/if (!${ReplaceSlot.Find[inv]}) /declare targetslot int local ${ReplaceSlot}
/if (!${Defined[ClickItem]}) {
    /echo target item not defined - returning
    /return
}
/if (!${Defined[ReplaceSlot]}) {
    /echo replace slot not defined - inv or slot # plz -returning
    /return
}
/if (${Cursor.ID}) {
    /guildsay trying to click item but stuff is on my cursor
    /return
}   
/if (${FindItem[=${ClickItem}].ID} && !${Cursor.ID}) {
    /declare castingtime float local ${FindItem[=${ClickItem}].CastTime}
    /declare slotnumber int local
    /declare packnumber int local
    /declare i int local
    /declare j int local
    /for i 1 to 8
    /for j 1 to 10
    /if (${InvSlot[Pack${i}].Item.Item[${j}].Name.Equal[${ClickItem}]}) {
    /echo found item in bag
        /varset packnumber ${i}
        /varset slotnumber ${j}
        /goto :click
    }
    /next j
    /varset j 0
    /next i
    /varset i 0
    /for i 1 to 8
    /if (${InvSlot[${Math.Calc[22 + ${i}]}].Item.Name.Equal[${ClickItem}]}) {
        /echo found item in main slot
        /varset packnumber ${i}
        /varset targetslot pack${packnumber}
        /declare invitem int local 1
        /goto :click
    }
    /next i
    /varset i 0
    :click
    /if (!${Window[InventoryWindow].Open}) /keypress i
    /if (!${Window[pack${packnumber}].Open} && !${Defined[invitem]}) /nomodkey /itemnotify pack${packnumber} rightmouseup
    /delay 2
    /if (!${Defined[invitem]}) /nomodkey /itemnotify in pack${packnumber} ${slotnumber} leftmouseup
    /if (${Defined[invitem]}) {
        /echo using ${ClickItem}
        /nomodkey /itemnotify ${InvSlot[${Math.Calc[22 + ${packnumber}]}]} rightmouseup
        /delay 2
        /if (${castingtime} > 0.50) /delay ${Math.Calc[${castingtime} * 10]}
        /keypress i
        /deletevar invitem
        /return
    }
    /delay 2
    /if (${Cursor.Name.Equal[${ClickItem}]}) {
        /echo Using ${ClickItem}
        /if (${Defined[targetslot]}) /varset targetslot ${InvSlot[${targetslot}]}
        /if (${targetslot} == 100) /varset targetslot pack${packnumber}
        /nomodkey /itemnotify ${targetslot} leftmouseup
        /delay 2
        /nomodkey /itemnotify ${targetslot} rightmouseup
        /if (${castingtime} > 0.50) /delay ${Math.Calc[${castingtime} * 10]}
        /delay 4
        /if (!${ReplaceSlot.Find[inv]}) /nomodkey /itemnotify ${InvSlot[${targetslot}]} leftmouseup
        /if (${ReplaceSlot.Find[inv]}) /nomodkey /itemnotify ${InvSlot[${Math.Calc[22 + ${packnumber}]}]} leftmouseup
        /delay 4
        /if (${Cursor.Name.Equal[${ClickItem}]}) {
            /nomodkey /itemnotify pack${packnumber} rightmouseup
            /delay 2
            /nomodkey /itemnotify in pack${packnumber} ${slotnumber} leftmouseup
            /delay 2
            /nomodkey /itemnotify pack${packnumber} rightmouseup
            /delay 2
        }
    }
    /keypress i
}    
/return

Sub handledestroy(TargetItem)

/if (!${Defined[TargetItem]}) {
    /echo target item not defined, returning
    /return
}
/if (${FindItem[=${TargetItem}].ID} && !${Cursor.ID}) {
    /declare slotnumber int local
    /declare packnumber int local
    /declare i int local
    /declare j int local
    /for i 1 to 8
    /for j 1 to 10
    /if (${InvSlot[Pack${i}].Item.Item[${j}].Name.Equal[${TargetItem}]}) {
        /echo item is in pack
        /varset packnumber ${i}
        /varset slotnumber ${j}
        /goto :destroy
    }
    /next j
    /varset j 0
    /next i
    /varset i 0
    /for i 1 to 8
    /if (${InvSlot[${Math.Calc[22 + ${i}]}].Item.Name.Equal[${TargetItem}]}) {
        /echo found item in main slot
        /varset packnumber ${i}
        /declare invitem int local 1
        /goto :destroy
    }
    /next i
    /varset i 0
    :destroy
    /if (!${Window[InventoryWindow].Open}) /keypress i
    /if (!${Window[pack${packnumber}].Open} && !${Defined[invitem]}) /nomodkey /itemnotify pack${packnumber} rightmouseup
    /delay 2
    /if (!${Defined[invitem]}) /nomodkey /itemnotify in pack${packnumber} ${slotnumber} leftmouseup
    /if (${Defined[invitem]}) /nomodkey /itemnotify pack${packnumber} leftmouseup
    /delay 2
    /if (${Cursor.Name.Equal[${TargetItem}]}) {
        /echo destroying ${TargetItem}
        /if (${Cursor.Name.Equal[${TargetItem}]}) {
            /echo destroying ${Cursor.Name}
            /destroy
            /if (${Defined[invitem]}) /deletevar invitem
        }
    }
    /if (${Window[pack${packnumber}].Open}) /nomodkey /itemnotify pack${packnumber} rightmouseup
    /delay 2
    /keypress i
}    
/return

Sub Event_Toggle(Line, ChatSender, Targets, action)

/if (!${Bool[${action}]}) /return
/if (${Bool[${Targets}]}) {   
    /if (${Targets.Arg[1,].Equal[group]}) {
        /if (${Targets.Arg[1,].Equal[group]}) {
            /declare groupnumber int local
            /call findgroup
            /varset Targets ${Targets.Right[-6]}
            /for groupnumber 1 to ${Ini[toolismacro,Values,totalgroups]}
            /if (${Targets.Arg[${groupnumber},,]} == ${Macro.Return}) {
                /goto :togglestuff
            } else {
                /next groupnumber 
                /return
            }
        }
    }
    /if (${Targets.Arg[1,].Equal[healers]}) {
        /if (${Me.Class.HealerType}) /goto :togglestuff
        /return
    }
    /if (${Targets.Arg[1,].Equal[casters]}) {
        /if (${Me.Class.PureCaster}) /goto :togglestuff
        /return
    }
    /declare name int local 
    /for name 1 to 12
    /if (${Targets.Arg[${name},].Equal[${Me.Name}]}) /goto :togglestuff
    /next name
    /return
}
:togglestuff
/if (${action.Find[abort]}) {
    /keypress forward
    /varset didinvis 0
    /guildsay !ABORTING!
    /return abort
}
/if (${action.Arg[1,].Equal[leash]}) {
    /varset action ${action.Right[-6]}
    /if (${Bool[${Ini[movement,leash,${action}]}]}) {
        /if (!${Defined[leashloc]}) /declare leashloc string outer
        /declare i int local
        /for i 1 to 10
        /if (${Ini[movement,leash,zoneshortnames].Arg[${i},,].Equal[${Zone.ShortName}]}) {
            /varset leashloc ${Ini[movement,leash,${action}]}
        }
        /next i
    }
    /return
}
/if (${action.Arg[1,].Equal[zoneout]}) {
    /varset action ${action.Right[-8]}
    /if (${Bool[${Ini[movement,zoneout,${action}]}]}) {
        /if (!${Defined[zoneoutloc]}) /declare zoneoutloc string outer
        /declare i int local
        /for i 1 to 10
        /if (${Ini[movement,zoneout,zoneshortnames].Arg[${i},,].Equal[${Zone.ShortName}]}) {
            /if (!${Defined[zoneoutcommand]}) /declare zoneoutcommand string outer empty
            /if (${Bool[${Ini[movement,zoneout,${action}command]}]}) /varset zoneoutcommand ${Ini[movement,zoneout,${action}command]}
            /varset zoneoutloc ${Ini[movement,zoneout,${action}]}
            /call gotoloc "${zoneoutloc}" "${zoneoutcommand}"
            /return
        }
        /next i
    }
    /return
}
/if (${action.Arg[1,].Equal[leashoff]}) {
    /if (${Defined[leashloc]}) /deletevar leashloc 
    /return  
}
/if (${action.Arg[1,].Equal[clickies]}) {
    /if (${FindItem[=Reaper's Ring].ID}) /call clickitem "Reaper's Ring" "inv"
/return
}
/if (${action.Arg[1,].Equal[tank]}) {
    /if (${action.Arg[1,].Equal[mainassist]}) /varset action ${action.Right[-11]}
    /if (${action.Arg[1,].Equal[tank]}) /varset action ${action.Right[-5]}
    /varset mainassist ${action}
    /return
}
/if (${action.Find[/mac]}) {
/varset action ${action.Right[-5]}
    /if (${action.Arg[1,].Equal[start]}) {
        /varset action ${action.Right[-6]}
        /if (${Me.Class.Name.Equal[Beastlord]}) /docommand /mac beast ${action}
        /if (${Me.Class.Name.Equal[Shadowknight]}) /docommand /mac sk ${action}
        /if (${Me.Class.Name.Equal[Magician]}) /docommand /mac mage ${action}
        /if (${Me.Class.Name.Equal[Necromancer]}) /docommand /mac necro ${action}
        /if (${Me.Class.Name.Equal[Wizard]}) /docommand /mac wiz ${action}
        /if (${Me.Class.Name.Equal[Enchanter]}) /docommand /mac ench ${action}
        /if (${Me.Class.Name.Equal[Bard]}) /docommand /mac bard ${action}
        /if (${Me.Class.Name.Equal[Cleric]}) /docommand /mac cleric ${action}
        /if (${Me.Class.Name.Equal[Shaman]}) /docommand /mac shaman ${action}
        /if (${Me.Class.Name.Equal[Monk]}) /docommand /mac monk ${action}
        /if (${Me.Class.Name.Equal[Rogue]}) /docommand /mac rogue ${action}
        /if (${Me.Class.Name.Equal[Paladin]}) /docommand /mac paladin ${action}
        /if (${Me.Class.Name.Equal[Ranger]}) /docommand /mac ranger ${action}
        /if (${Me.Class.Name.Equal[Berserker]}) /docommand /mac berserker ${action}
        /if (${Me.Class.Name.Equal[Druid]}) /docommand /mac druid ${action}
    }
    /declare i int local
    /for i 1 to 15
    /if (${Ini[toolismacro,Values,macros].Arg[${i},,].Equal[${action.Arg[1,]}]}) {
        /docommand /mac ${action}
    }
    /next i
    /varset i 0
    /for i 1 to 10
    /if (${Ini[toolismacro,Values,othermacros].Arg[${i},,].Equal[${action.Arg[1,]}]}) {
        /docommand /mac ${action}
    }
    /next i
    /echo Macro not found
    /return
}
/if (${action.Find[mod rod]}) {
    /if (${Cursor.ID}) {
        /guildsay ITEM ON CURSOR - MOD RODS COMING
        /return
    }
    /if (${Me.FreeInventory} < 1 && !${FindItem[=Rod of Mystical Transvergence].ID}) {
        /guildsay NO ROOM IN BAGS - MOD RODS COMING
        /return
    }
    /if (${FindItem[=Rod of Mystical Transvergence].ID} && ${FindItem[=Rod of Mystical Transvergence].Charges} < 3) /call handledestroy "Rod of Mystical Transvergence"
    /return
}
/if (${action.Find[accept rez]}) {
    /if (${Window[ConfirmationDialogBox].Open} || !${InvSlot[13].Item.ID}) {
        /docommand /mac rez ${mainassist} 
    }
    /return
}
/if (${action.Find[consent]}) {
    /varset action ${action.Right[-8]}
    /consent ${action}
    /return
}
/if (${action.Find[stick]}) {
    /if (${action.Find[front]}) {
        /echo sticking in front
        /varset sticktype front loose 8
    }
    /if (${action.Find[behind]}) {
        /echo sticking behind
        /varset sticktype behindonce loose 8
    }
    /return
}
/if (${action.Find[anon]}) {
    /docommand /a
    /return
}
/if (${action.Find[camp]}) {
    /if (${Me.Trader}) /return
    /if (${action.Find[desktop]}) {
        /camp desktop
        :action
        /doevents toggle
        /if (${Macro.Return.Equal[cancel]}) /return
        /delay 2
        /goto :action
        /return
    }
    /camp
    :action
    /doevents toggle
    /if (${Macro.Return.Equal[cancel]}) /return
    /delay 2
    /goto :action
/return
}
/if (${action.Find[cancel]}) {
    /return cancel
}
/if (${action.Find[assistat]}) {
    /echo setting assistat to ${action.Arg[2,]}
    /varset assistat ${action.Arg[2,]}
    /if (${Defined[nukeat]}) /varset nukeat ${action.Arg[2,]}
    /return
}
/if (${action.Find[/ex]}) {
    /if (${Me.Trader}) /return
    /docommand /exit
}
/if (${action.Find[pagedown]}) {
    /keypress Page_Down hold 
    /delay 1s
    /keypress Page_Down
    /return
}
/if (${action.Find[throne]}) {
    /aa act Throne of Heroes
    /return
}
/if (${action.Find[infusion]}) {
    /twist off
    /varset dotwist 1
    /aa act Infusion of the Faithful
    /return
}
/if (${action.Find[lesson]}) {
    /twist off
    /varset dotwist 1
    /aa act Lesson of the Devoted
    /return
}
/if (${action.Find[intensity]}) {
    /twist off
    /varset dotwist 1
    /aa act Intensity of the Resolute
    /return
}
/if (${action.Find[expedient]} || ${action.Find[expediant]}) {
    /twist off
    /varset dotwist 1
    /aa act Expedient Recovery
    /return
}
/return

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
Last edited by toolisuber on Wed Aug 05, 2015 7:23 pm, edited 2 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu level 65 or so ench, bst, sk

Post by toolisuber » Wed Aug 05, 2015 6:38 pm

list of commands for /gui toggle and /gui force goto

this is a list of my toggle commands -some may not be available w/these macros depending which one ur running...

toggle list may not be complete
zones/junctions list may not be complete

-----------------------------------------

Code: Select all

toggle accepts - casters, healers, names, group(s) ==  ,
    group 1,2 toggle etc etc
    casters toggle etc etc
    blank toggle is all running chars
----
toggle (nameoffunction) e.g. toggle abort

abort
leash
leashoff
cure (not fixed, radiant cure)
regen (not fixed, celestial regen)

mainassist
    or tank (e.g. /gui toggle tank tooli or toggle mainassist tooli =same thing

/mac macroname e.g. /gui healers toggle /mac fish
    /mac start (restarts all running chars to their classname macros)

nuke , donuke? do nuke? nuke on? e.g. not sure... 
    /gui casters toggle do nukes

rune , do rune? rune on? they may all work, that's an ench thing neways

setrot ---- oh I forgot that's important heal rots! 
e.g.healers toggle set rot 15 = 1.5    sec delay between heals during healrot


healrot ----
     e.g. healers toggle healrot
     e.g healers toggle don't healrot ( without the ' to stop rotting)

so like ur about to engage the vadynn but hes way too hard but he might have the robe or a toetwister and
    you would type healers or tooli toolis parabola parabol toggle set rot 15
    then u would type healers or tooli toolis parabola parabol toggle healrot

    then when vadynn is dead u loot the items and type
        tooli toolis parabola parabol toggle don't healrot
        heal rot may be spaced I don't think so its been a long time
        I was able to use level 58 ethereal light and 61 or 62 heal light to
            kill the bot tower mob when I had w/ 12

ill just summarize things not explaining all
mod rods
lava orb? or lavaorb? 
    (default is on) (or maybey its just to remake current lava orb)
heal clerics

heal out of group ( VERY IMPORTANT for multiple healers to heal ppl)
    e.g. healers toggle heal out of group

pet haste?
twitch? twitch name? not sure
/ex
speed
kill pet
do pet
rez name( rezzes name )
accept rez ( not sure why I even have this)
clickies? predefined clickies in toggle section
assistat %
healat %
camp desktop? campdesktop?
camp
anon ( for killing leet mobsz that u autowalk to
cancel ( not sure but this may be important)
throne
infusion
lesson
intensity
expedient? expedient?
pagedown (useful to destroy lag on all!)
there may be more
----====----====----====----
zones and junctions that have paths in movement.ini

tactics     poair
hoh         potorment
pov         podisease
*poi          cod
potime    pojustice
poearth   pon
powater  solrotower
bot         pofire
postorms

akheva         maiden
sseru           netherbian
acrylia         nexus
grimling       griegsend
hollowshade umbral
paludal        thegrey
thedeep       ssra
echo
shadowhaven
mseru
dawnshroud

paw ( I was so angry that's how movement was created)

greatdivide             
velks
eastwastes
kael
wakeninglands
skyshrine
cobaltscar
sirensgrotto
westwastes
templeofveeshan

fob 
ej
com
trak
seb
ot
fm
skyfire

growth
lobby
rez ( lobby west side)
baz
research
bags
goodcamp

feerrott
cazicthule
pofear
nek
lavastorm
sola
solb
innothule
guk
sro
gfay
butcherblock
lfay
mistmoore
everfrost
sroldon
butcherblockldon
everfrostldon
butcherdungeon

smallbank ( hub for movement? u can make one,will eventually longtime)

bazaugs

junctions---- u go to these like any normal zone 
     /gui force goto targetareaname

westside
southside
northside
potranqstone
potranqcircle
innovationarea
timearea
tormentarea
diseasearea
postormsarea
bastionarea
deepbridge (there is a goto thing or whatever for crossing bridge)
shadowhavenecho
maidenseye

nearbazaugs
thurgarea
growtharea
lobbyent
translocator
bazent
trakent
outpost
skyfireent
solaria
veksararea
gukarea
sroarea
lfayarea
steamfontarea
darkelfarea
mistmoorearea
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------