Vish Egg/Mournful direction caller

bendical

New member
Joined
Aug 26, 2006
Messages
5
Reaction score
0
Points
0
Egg and mournful Spirit Directional Caller I made so guildies without MQ2 knew what direction a Mournful spirit or A Tainted egg was

Code:
|Egg and Mourn Caller
|by Bendical

Sub Main
	/declare mourns int outer
 	:mainloop
		/if (${Spawn[egg].ID} > 0 ) {
	  	 /call Egg 
		}
		/if ( ${Spawn[mournful_spirit].ID} > 0 ) {
		/call Mourn
	  	/delay 5s  
		}
		
	/goto :mainloop
	/return



Sub Egg
	/if (${Spawn[egg].PctHPs} > 0) {
		/if (${Spawn[egg].Distance} <= 70) {
		   /fake /1 [[A Tainted Egg in Camp]] 
		} else /if (${Spawn[egg].HeadingTo.DegreesCCW} <= 80) {
		  /fake /1 [[A Tainted Egg is to the north]] 
		} else /if ( (${Spawn[egg].HeadingTo.DegreesCCW} >= 100) && (${Spawn[egg].HeadingTo.DegreesCCW} <= 260) ) {
		  /fake /1 [[A Tainted Egg is to the South]] 
		} else /if (${Spawn[egg].HeadingTo.DegreesCCW} >= 280) {
		  /fake /1 [[A Tainted Egg is to the north]]
		}
	}
	:loop
		/call Mourn
		/delay 5s
		/if ( ${Spawn[egg].PctHPs} == 0) {
		  /return 
		}
	/goto :loop
/return



Sub Mourn
	/varset mourns ${SpawnCount[mournful_spirit]}
	/for mourns 0 to 7
		/if (${Spawn[mournful_spirit0${mourns}].HeadingTo.DegreesCCW} <= 45) {
		  /fake /1 [[Mournful Spirit is to the north]] 
		} 
		/if (${Spawn[mournful_spirit0${mourns}].HeadingTo.DegreesCCW} > 45 && ${Spawn[mournful_spirit0${mourns}].HeadingTo.DegreesCCW} <= 135) {
		  /fake /1 [[Mournful Spirit near Drakes]]
		}
		/if (${Spawn[mournful_spirit0${mourns}].HeadingTo.DegreesCCW} > 135 && ${Spawn[mournful_spirit0${mourns}].HeadingTo.DegreesCCW} <= 225) {
		  /fake /1 [[Mournful Spirit is to the South]]
		}
		/if (${Spawn[mournful_spirit0${mourns}].HeadingTo.DegreesCCW} > 225 && ${Spawn[mournful_spirit0${mourns}].HeadingTo.DegreesCCW} <= 315) {
		  /fake /1 [[Mournful Spirit is behind Vishimatar]]
		}
		/if (${Spawn[mournful_spirit0${mourns}].HeadingTo.DegreesCCW} >= 315) {
		  /fake /1 [[Mournful Spirit is to the North]]
		}
	/next mourns
	/return
 
Ok i got this to work but with issues it calls out morunfuls when none are up was dead on on the eggs but at 50% was calling mournfuls with none even close to spawning
 
Last edited:
Fixed, will call correctly now

Code:
|Egg and Mourn Caller
|by Bendical

#Event Vish2 "#1# goes pale."


Sub Main
	/declare mourns int outer
 	:mainloop
		/doevents
		/if (${Spawn[egg].ID} > 0 ) {
	  	 /call Egg 
		}
		/if ( ${Spawn[mournful_spirit].ID} > 0 ) {
		/call Mourn
	  	/delay 2s  
		}
		
	/goto :mainloop
	/return



Sub Egg
	/if (${Spawn[egg].PctHPs} > 0) {
		/if (${Spawn[egg].Distance} <= 70) {
		   /fake /rsay [[A Tainted Egg in Camp]] 
		} else /if (${Spawn[egg].HeadingTo.DegreesCCW} <= 80) {
		  /fake /rsay [[A Tainted Egg is to the north]] 
		} else /if ( (${Spawn[egg].HeadingTo.DegreesCCW} >= 100) && (${Spawn[egg].HeadingTo.DegreesCCW} <= 260) ) {
		  /fake /rsay [[A Tainted Egg is to the South]] 
		} else /if (${Spawn[egg].HeadingTo.DegreesCCW} >= 280) {
		  /fake /rsay [[A Tainted Egg is to the north]]
		}
	}
	:loop
		/doevents
		/call Mourn
		/delay 2s
		/if ( ${Spawn[egg].PctHPs} == 0) {
		  /return 
		}
	/goto :loop
/return



Sub Mourn
	/for mourns 0 to 7
	  /if (${Spawn[mournful_spirit0${mourns}].ID} > 0) {	
		/if (${Spawn[mournful_spirit0${mourns}].HeadingTo.DegreesCCW} <= 45) {
		  /fake /rsay [[Mournful Spirit is to the north]] 
		} 
		/if (${Spawn[mournful_spirit0${mourns}].HeadingTo.DegreesCCW} > 45 && ${Spawn[mournful_spirit0${mourns}].HeadingTo.DegreesCCW} <= 135) {
		  /fake /rsay [[Mournful Spirit near Drakes]]
		}
		/if (${Spawn[mournful_spirit0${mourns}].HeadingTo.DegreesCCW} > 135 && ${Spawn[mournful_spirit0${mourns}].HeadingTo.DegreesCCW} <= 225) {
		  /fake /rsay [[Mournful Spirit is to the South]]
		}
		/if (${Spawn[mournful_spirit0${mourns}].HeadingTo.DegreesCCW} > 225 && ${Spawn[mournful_spirit0${mourns}].HeadingTo.DegreesCCW} <= 315) {
		  /fake /rsay [[Mournful Spirit is behind Vishimatar]]
		}
		/if (${Spawn[mournful_spirit0${mourns}].HeadingTo.DegreesCCW} >= 315) {
		  /fake /rsay [[Mournful Spirit is to the North]]
		}
	  }
	  /delay 3
	/next mourns
	/return

Sub Event_Vish2(string Line, string vishName)
	/echo VISHMITAR DT ON ${vishName} ! Sending tell to let them know.
	/delay 15
	/t ${vishName} You have DT on you... Look for A Mournful Spirit @ ${NearestSpawn[1,Mourn].HeadingTo} and ${NearestSpawn[2,Mourn].HeadingTo} from main camp.
	/delay 10
	/rs ${vishName} has the DT on them.  (${SpawnCount[npc mournful spirit]} up!)
/return
 
Tried running this mac, and I was met with the following error

DoCommand - Couldn't parse 'fake /1
[[Mournful Spirit is to the north]]
vishi.mac@47 (Mourn): /fake /1
[[Mournful Spirit is to the north]]
vishi.mac@33 (Egg): /call Mourn
vishi.mac@8 (Main): /call Egg
 
Tried running this mac, and I was met with the following error

DoCommand - Couldn't parse 'fake /1
[[Mournful Spirit is to the north]]
vishi.mac@47 (Mourn): /fake /1
[[Mournful Spirit is to the north]]
vishi.mac@33 (Egg): /call Mourn
vishi.mac@8 (Main): /call Egg

you need mq2fakelink loaded.