After doing some pretty simple scripting I've come to really appreciate how complex DayZ is.

Here's the script in case anyone was curious. In a few cases it passes off to another script but most of the other scripts are redundant.

if not inrange 'pet' 10 playmacro 'getpet' endif //Check to see if bandages and bolts are stocked, go to bank if not if counter 'cntr-4' < 100 or counter 'cntr-5' < 150 playmacro 'bank' endif msg 'All Guard' '0259' //set pet if not findalias 'pet' headmsg 'Select first pet' promptalias 'pet' endif //Check pet and heal pet before leaving while hits 'pet' <= 95 headmsg 'Your pet needs to heal' msg 'All Follow Me' '0259' pause 5000 if hits 'self' != maxhits pause 5000 endif endwhile feed 'pet' '0x9f1' any 5 pause 1000 //Recall into farm spot //wyrm rune 0x400026c1 while waitingfortarget or targetexists 'server' endwhile autotargetobject 0x400026c1 cast recall pause 2500 for 4 walk 'South' endfor if not findobject 'lefthand' togglehands left endif pause 1000 //ancient wyrm graphic 0x2e //Wait for ancient wyrm, constantly checking while not @findtype 0x2e '0' 'ground' '1' '40' pause 1000 endwhile //Kill command wyrm while waitingfortarget or targetexists 'server' endwhile autotargettype 0x2e 'any' 40 msg! "All kill" pause 1500 cleartargetqueue canceltarget //update found alias to enemy and attack if @findtype '0x2e' 0 0 0 40 setalias 'enemy' 'found' pause 600 attack enemy endif pause 1000 //move to pet if inrange 'pet' 30 sysmsg 'Pet is in range' '0259' endif while not inrange 'pet' 10 for 2 walk "north" endfor endwhile msg 'All Follow Me' '0659' pause 4000 while waitingfortarget or targetexists 'server' endwhile autotargetenemy msg! "All kill" canceltarget //emergency recall if hits < 90 playmacro 'emergency' endif //emergencyrecall //Wait next to pet to heal if inrange 'pet' 2 pause 8000 endif //emergency recall if hits < 90 playmacro 'emergency' endif //emergencyrecall //Move towards pet while enemy is alive while inrange 'enemy' 40 pause 700 //emergency recall if hits < 90 playmacro 'emergency' endif //emergencyrecall canceltarget while not inrange 'pet' 1 or hits < 100 while inrange 'enemy' 40 //emergency recall if hits < 90 playmacro 'emergency' endif //emergencyrecall if @x 'pet' > x 'self' and @y 'pet' > y 'self' walk 'Southeast' if inrange 'pet' 2 pause 5000 endif canceltarget //emergency recall if hits < 90 playmacro 'emergency' endif //emergencyrecall elseif @x 'pet' < x 'self' and @y 'pet' > y 'self' walk 'Southwest' if inrange 'pet' 2 pause 5000 endif canceltarget //emergency recall if hits < 90 playmacro 'emergency' endif //emergencyrecall elseif @x 'pet' > x 'self' and @y 'pet' < y 'self' walk 'Northeast' if inrange 'pet' 2 pause 5000 endif canceltarget //emergency recall if hits < 90 playmacro 'emergency' endif //emergencyrecall elseif @x 'pet' < x 'self' and @y 'pet' < y 'self' walk 'Northwest' if inrange 'pet' 2 pause 5000 endif canceltarget //emergency recall if hits < 90 playmacro 'emergency' endif //emergencyrecall elseif @x 'pet' > x 'self' and @y 'pet' == y 'self' walk 'West' if inrange 'pet' 2 pause 5000 endif canceltarget //emergency recall if hits < 90 playmacro 'emergency' endif //emergencyrecall walk 'East' if inrange 'pet' 2 pause 5000 endif //emergency recall if hits < 90 playmacro 'emergency' endif //emergencyrecall elseif @x 'pet' < x 'self' and @y 'pet' == y 'self' walk 'West' if inrange 'pet' 2 pause 5000 endif //emergency recall if hits < 90 playmacro 'emergency' endif //emergencyrecall elseif @x 'pet' == x 'self' and @y 'pet' > y 'self' walk 'South' if inrange 'pet' 2 pause 5000 endif //emergency recall if hits < 90 playmacro 'emergency' endif //emergencyrecall elseif @x 'pet' == x 'self' and @y 'pet' < y 'self' walk 'North' if inrange 'pet' 2 pause 5000 endif //emergency recall if hits < 90 playmacro 'emergency' endif //emergencyrecall endwhile if not inrange 'enemy' 40 playmacro 'findcorpse' endif endif endwhile endwhile endwhile canceltarget pause 1000 //ancient wyrm graphic 0x2e //friendly wyrm serial 0xa4c7 //wyrm corpse 0x2006 //emergency recall if hits < 90 playmacro 'emergency' endif //emergencyrecall if timerexists 'walk' removetimer 'walk' endif msg 'All Guard' '0259' findtype 0x2006 '0' 'ground' '1' '40' if inrange 'found' 1 pause 1000 endif //search for corpse phase 1 //search for corpse phase 1 //timer part 1 begin if not timerexists 'walk' createtimer 'walk' else settimer 'walk' 0 endif //timer part 1 end while not inrange 'found' 1 and timer 'walk' <= 5000 if @x 'found' > x 'self' and @y 'found' > y 'self' walk 'Southeast' elseif @x 'found' < x 'self' and @y 'found' > y 'self' walk 'Southwest' elseif @x 'found' > x 'self' and @y 'found' < y 'self' walk 'Northeast' elseif @x 'found' < x 'self' and @y 'found' < y 'self' walk 'Northwest' elseif @x 'found' > x 'self' and @y 'found' == y 'self' walk 'East' elseif @x 'found' < x 'self' and @y 'found' == y 'self' walk 'West' elseif @x 'found' == x 'self' and @y 'found' > y 'self' walk 'South' elseif @x 'found' == x 'self' and @y 'found' < y 'self' walk 'North' endif endwhile //timer part 2 begin if not @inrange 'found' 1 for 4 walk 'North' walk 'North' walk 'west' walk 'west' walk 'west' endfor pause 700 endif //endtimer part 2 end //search for corpse phase 2 //timer part 1 begin if not timerexists 'walk' createtimer 'walk' else settimer 'walk' 0 endif //timer part 1 end while not inrange 'found' 1 and timer 'walk' <= 5000 if @x 'found' > x 'self' and @y 'found' > y 'self' walk 'Southeast' elseif @x 'found' < x 'self' and @y 'found' > y 'self' walk 'Southwest' elseif @x 'found' > x 'self' and @y 'found' < y 'self' walk 'Northeast' elseif @x 'found' < x 'self' and @y 'found' < y 'self' walk 'Northwest' elseif @x 'found' > x 'self' and @y 'found' == y 'self' walk 'East' elseif @x 'found' < x 'self' and @y 'found' == y 'self' walk 'West' elseif @x 'found' == x 'self' and @y 'found' > y 'self' walk 'South' elseif @x 'found' == x 'self' and @y 'found' < y 'self' walk 'North' endif endwhile

/r/dayz Thread