Page 1 of 1

SendQuestArrow off problem

Posted: Mon Jan 09, 2017 7:32 am
by guialtran
I have a problem.

I can not remove the arrow!! :(

Program mySendQuestArrowON( character )
var mytarget:= Target( character, TGTOPT_CHECK_LOS+TGTOPT_NEUTRAL);//On an object or other person
SendQuestArrow(character , character.x, character.y, mytarget);
Endprogram

................

Program mySendQuestArrowOff( character )
var mytarget:= Target( character, TGTOPT_CHECK_LOS+TGTOPT_NEUTRAL);//On an object or other person
SendSysMessage(character,""+SendQuestArrow(character , -1, -1, mytarget)); //return 1
Endprogram


OR

SendQuestArrow(character , character.x, character.y, character); //self test
sleep(1);
SendSysMessage( character , "" + SendQuestArrow( character , -1 , -1 , character ) ); //return 1



I think it's some problem in the pol.exe
Should not I get 4 parameters?//mytarget?????

uomod.cpp

BObjectImp* UOExecutorModule::mf_SendQuestArrow()
{
Character* chr;
int x, y;
UObject* target = nullptr;

if ( getCharacterParam( exec, 0, chr ) && getParam( 1, x, -1, 1000000 ) &&
getParam( 2, y, -1, 1000000 ) ) // max values checked below


https://docs.polserver.com/packets/inde ... acket=0xBA
Could someone be observed correctly? ty all

Re: SendQuestArrow off problem

Posted: Mon Jan 09, 2017 9:18 am
by guialtran
There is a problem

When I send this package it works.

Character, x, and, item.serial


var tgt:= Target( character , TGTOPT_CHECK_LOS+TGTOPT_NEUTRAL );

var packet := CreatePacket(0xBA,10); //0 BYTE[1] cmd
//packet.SetInt8 (0, 0xBA); //0 BYTE[1] cmd
packet.SetInt8 (1, 0); //1 BYTE[1] active (1=on, 0=off)
packet.SetInt16(2, 0); //2 BYTE[2] xLoc
packet.SetInt16(4, 0); //4 BYTE[2] yLoc
packet.SetInt32(6, tgt.serial); //BYTE[4] serial
packet.sendpacket(character);


//NOTE:(SetInt32 = 4bytes) currently there's a compiler problem setting 0xFFFFFFFF, it gets converted to 0x7FFFFFFF.

Re: SendQuestArrow off problem

Posted: Mon Jan 09, 2017 12:38 pm
by Harley
Check this:

Code: Select all

					SendQuestArrow(who, critter.x, critter.y);
					sleep(5);
					SendQuestArrow(who, -1, -1);
					

Re: SendQuestArrow off problem

Posted: Mon Jan 09, 2017 1:00 pm
by guialtran
Harley wrote:Check this:

Code: Select all

					SendQuestArrow(who, critter.x, critter.y);
					sleep(5);
					SendQuestArrow(who, -1, -1);
					




SendQuestArrow(who, -1, -1); ->>>>>>>>>return Error "No valid target for HSA client"

Re: SendQuestArrow off problem

Posted: Sun Jan 22, 2017 1:19 pm
by Turley
Yes it's a core bug. Should be fixed in the latest version. Thx for reporting.