SendQuestArrow

Here you can post threads on the development of the current release of the core (100)

Moderator: POL Developer

Post Reply
gh0sterZA
Neophyte Poster
Posts: 35
Joined: Thu Nov 19, 2015 11:36 am
Location: Cape Town

SendQuestArrow

Post 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
DevGIB
Grandmaster Poster
Posts: 248
Joined: Mon Feb 06, 2006 6:12 am

Re: SendQuestArrow

Post 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."
guialtran
Grandmaster Poster
Posts: 120
Joined: Wed Jul 30, 2008 12:42 pm

Re: SendQuestArrow

Post by guialtran »

thank you friend!
:deadhorse: this bug is dead!
DevGIB
Grandmaster Poster
Posts: 248
Joined: Mon Feb 06, 2006 6:12 am

Re: SendQuestArrow

Post by DevGIB »

This has now been merged into the master branch for POL100.
gh0sterZA
Neophyte Poster
Posts: 35
Joined: Thu Nov 19, 2015 11:36 am
Location: Cape Town

Re: SendQuestArrow

Post by gh0sterZA »

much appreciated
Thank you DevGIB
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: SendQuestArrow

Post by Yukiko »

I will get the new Core build posted today. Been busy with car troubles the past 2 days
Post Reply