SendQuestArrow off problem

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.

Moderator: POL Developer

Post Reply
guialtran
Grandmaster Poster
Posts: 120
Joined: Wed Jul 30, 2008 12:42 pm

SendQuestArrow off problem

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

Re: SendQuestArrow off problem

Post 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.
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am
Location: Germany

Re: SendQuestArrow off problem

Post by Harley »

Check this:

Code: Select all

					SendQuestArrow(who, critter.x, critter.y);
					sleep(5);
					SendQuestArrow(who, -1, -1);
					
guialtran
Grandmaster Poster
Posts: 120
Joined: Wed Jul 30, 2008 12:42 pm

Re: SendQuestArrow off problem

Post 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"
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: SendQuestArrow off problem

Post by Turley »

Yes it's a core bug. Should be fixed in the latest version. Thx for reporting.
Post Reply