• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Line of Sight - LOS says True but "Cannot See Your Target"

Joined
Dec 14, 2006
RedCents
692¢
I have searched both MQ2 and this site for help without success.

I have a little hunting macro that targets a mob, attempts to pull it by range attack first and then pulls it to the group. If the mob is behind a boulder, slightly over a rise, or behind a tree ${Target.LineOfSight} echos True with this line:

Rich (BB code):
		/echo LOS=${Target.LineOfSight}
But my chat window says "You can't hit them from here.", "You cannot see your target.", or "Your target is too far away." My ranger just sits there and still attempts to fire away because it won't turn to False. I have seen it turn to False on some occasions but it is not consistent.

So, since I can't use LOS, I have attempted to use events:

Rich (BB code):
#Event SeeTarget "#*#cannot see#*#"
#Event TooFar "#*#too far away#*#"

Rich (BB code):
| SUB: Event TooFar
|Move to Mob (with random adjustment)
		/echo The target is too far away.
		/call RandomMove
		/varcalc MoveToX ${Target.X}+${RandMove}
		/call RandomMove
		/varcalc MoveToY ${Target.Y}+${RandMove}
		/call MoveToLoc
/return

| SUB: Event SeeTarget
|Move to Mob (with random adjustment)
		/echo I cannot see the target.
		/call RandomMove
		/varcalc MoveToX ${Target.X}+${RandMove}
		/call RandomMove
		/varcalc MoveToY ${Target.Y}+${RandMove}
		/call MoveToLoc
/return

They are being called from here:
Rich (BB code):
| SUB: Line of Sight Check
Sub LOS
	:LOSight
	/face fast
	| Move towards target if not Line of Sight
		/echo LOS=${Target.LineOfSight}
		/IF (!${Target.LineOfSight}) {
			/keypress forward hold
			/delay 30 ${Target.Distance}<${RV_Range}
			/keypress forward
			/ranged
			/delay 5s
			/doevents SeeTarget
			/doevents TooFar
			/goto :LOSight
			}
		/IF (${Target.LineOfSight}) {
			/ranged
			/echo Delay for SeeTarget and TooFar
			/delay 5s
			/doevents SeeTarget
			/doevents TooFar
			}
	/return

The Delay for SeeTarget and TooFar echos, but no movement.

If anyone has any suggestions for either issue, LOS or the Events, I would greatly appreciate it.

The RandMove is a 10-50 point random addition to the X and Y to prevent exact LOC movement.
 
Last edited:
First 3 things i see that are wrong is your event code. Either wrong or its missing the sub heading.
You have the the event commented out and the syntax is wrong. lose the pipe | , colon : and event are connected with an underscore _

Rich (BB code):
| SUB: Event TooFar

should be

Rich (BB code):
SUB Event_TooFar
 
The previous post fixed the Event issue. There are some endless loops occurring that I just need time to track down but my remaining question is the LOS issue. Is there a fix for the LOS returning true sometimes when the mob moves behind a boulder, hill or tree? Or is this just an error that I have to put up with?

Thanks
 
Line of Sight - LOS says True but "Cannot See Your Target"

Users who are viewing this thread

Back
Top
Cart