Issues with UOX3's targeting handling
Posted: Sun Jan 15, 2006 2:47 pm
There are most definitely some issues with how UOX3 handles targeting stuff using the target cursor in UO. I've repeatedly noticed that sometimes the effects I want to give a specific targeted object, are instead performed on my own character.
Basically it seems that every now and then UOX3 doesn't read what you target correctly, and somehow defaults it to your own character instead.
This was most easily visible when I used the 'RREMOVE command I have written earlier (after modifying it to accept characters as well as items) to remove multiple NPCs, and my own character was deleted (while I was online!) instead of the targeted NPC character. I had no checks in the command for if the target was my own character, but still - I targeted another character, not my own.
The modified command, goes in UOX3\JS\COMMANDS\CUSTOM\repeatingcmds.js:
The error seems to be happening mostly when the targeted object is a character, from my testing.
Basically it seems that every now and then UOX3 doesn't read what you target correctly, and somehow defaults it to your own character instead.
This was most easily visible when I used the 'RREMOVE command I have written earlier (after modifying it to accept characters as well as items) to remove multiple NPCs, and my own character was deleted (while I was online!) instead of the targeted NPC character. I had no checks in the command for if the target was my own character, but still - I targeted another character, not my own.
The modified command, goes in UOX3\JS\COMMANDS\CUSTOM\repeatingcmds.js:
Code: Select all
//Repeated Command: REMOVE
function command_RREMOVE( pSock, execString )
{
pUser = pSock.currentChar;
pUser.CustomTarget( 7, "Which object do you wish to remove?" );
}
function onCallback7( pSock, myTarget )
{
var pUser = pSock.currentChar;
if( !pSock.GetWord( 1 ))
myTarget.Delete();
else
pUser.SysMessage( "That's not an object you can remove!" );
pUser.CustomTarget( 7, "Which object do you wish to remove?" );
}