Page 1 of 1

SendQuestArrow

Posted: Thu May 23, 2019 2:52 am
by gh0sterZA
Hi

using core 100 complied in the last month. Client ver 7.0.75.6 (updated recently as well)

I can create the quest arrow, can even create multiple arrows pointing to different targets, however I do not seem able to remove/cancel the quest arrows.
This is me trying the options I could think of to remove the arrow.

Code: Select all

		SendQuestArrow( who, -1, -1, ref );	
		SendQuestArrow( who, -1 , -1, "" );
		SendQuestArrow( who );
Any suggestions appreciated.

Code: Select all

use uo;

program findCorpse( who, text );

	var x := GetObjProperty( who, "#x_corpse" );
	var y := GetObjProperty( who, "#y_corpse" );
	var z := GetObjProperty( who, "#z_corpse" );
	var r := GetObjProperty( who, "#r_corpse" );
	var serial := GetObjProperty( who, "#serial_corpse" );
	var ref := SystemFindObjectBySerial( CInt( serial ) );

	var on_off := lower(text);
	if ( on_off == "off" )
		SendQuestArrow( who, -1, -1, ref );	
		SendQuestArrow( who, -1 , -1, "" );
		SendQuestArrow( who );
		return;
	endif
	
	if ( on_off == "on" )
		SendQuestArrow( who, x , y, ref );
		SendSysMessage( who, "Arrow on: Realm = " + r +" at: " +x +" / " +y );
		return;
	endif
	
	if (( on_off != "on" ) && ( on_off != "off" ))
		SendSysMessage( who, "usage is \".findcorpse on\" or \".findcorpse off\" ");
		return;
	endif
	
endprogram;
from the documentation below:
SendQuestArrow(to_whom, x := -1, y := -1, target := "")
Parameters:
Name Type
to_whom Character reference the arrow shows to
x Integer world coordinates
y Integer world coordinates
target Item or Character reference
Explanation
Sends a "quest arrow" to the player that points at x,y
Passing 'x' and 'y' within map bounds will set the Quest Arrow to point at that location.
Passing -1 as 'x' and 'y' (ie. by just called SendQuestArrow(to_whom)) will remove it.
If the client is HSA (client version > 7.0.9), "target" is required. Otherwise it will be ignored.
Return values
1 on success
Errors
"No client attached"
"Invalid parameter"
"No valid target for HSA client"
Related
Character
regards

Re: SendQuestArrow

Posted: Tue Jun 18, 2019 5:01 pm
by DevGIB
There is currently an open pull request to fix this.
I'm happy for more people to test before its merged.
You can download the branch here:
https://ci.appveyor.com/api/buildjobs/5 ... 18-bin.zip

The update to the docs is below:
SendQuestArrow(to_whom, x := -1, y := -1, arrowid := 0)

params:
"to_whom" =Character reference the arrow shows to
"x" =Integer world coordinates
"y"=Integer world coordinates
"arrowid"=Integer

Explanation:
Sends a "quest arrow" to the player that points at x,y
Passing 'x' and 'y' within map bounds will set the Quest Arrow to point at that location.
If the client is HSA (client version > 7.0.9), Multiple arrows can exist at one time. You can specify an id using the arrowid param otherwise one will be generated by the core.
Pass an 'x' and 'y' value of -1 well cancel the arrow, for HSA clients an arrow id is required to clear that specific arrow.

Returns: arrowid on success

Errors:
"No client attached"
"Invalid parameter"
"ArrowID out of range"
"ArrowID must be supplied for cancellation."

Re: SendQuestArrow

Posted: Tue Jun 18, 2019 5:21 pm
by guialtran
thank you friend!
:deadhorse: this bug is dead!

Re: SendQuestArrow

Posted: Tue Jun 18, 2019 6:31 pm
by DevGIB
This has now been merged into the master branch for POL100.

Re: SendQuestArrow

Posted: Tue Jun 18, 2019 8:25 pm
by gh0sterZA
much appreciated
Thank you DevGIB

Re: SendQuestArrow

Posted: Wed Jun 19, 2019 8:47 am
by Yukiko
I will get the new Core build posted today. Been busy with car troubles the past 2 days