Okay so the concealed member for characters work nicely. but.... there was something I did notice strange about this.
Character A conceals himself with level 3.
Character B has cmdlevel 3 and see character A.
Character B changes cmdlevel to 2 and still see Character A. until Character A does something with his character that updates the mobile for Character B.
other way.
Character A conceals himself with level 3.
Character B has cmdlevel 2 and doesnt see Character A.
Character B changes cmdlevel to 3 and still doesnt see Character A. until Character A does something with his character that updates the mobile for Character B.
Any way to fix this by scripts ?? ( without packethooks )
Problems with character.concealed member
Moderator: POL Developer
Re: Problems with character.concealed member
I just found this function....
09-08 Turley:
Added: uo::UpdateMobile(mob)
Sends to mobiles in visual range UpdatePlayer packet of mob, for example to
inform of notority changes
I will try if using this should help with the problem.
09-08 Turley:
Added: uo::UpdateMobile(mob)
Sends to mobiles in visual range UpdatePlayer packet of mob, for example to
inform of notority changes
I will try if using this should help with the problem.
Re: Problems with character.concealed member
okay tried with that function without succes.
I'm starting to think if this has to do with new ObjectCache packets, that will be the next test.
EDIT: that was not the problem either.
I'm starting to think if this has to do with new ObjectCache packets, that will be the next test.
EDIT: that was not the problem either.
Re: Problems with character.concealed member
This problem seems to be fixable with adding 2 MoveObjectToLocation calls in the command that changes cmdlevel, beause as long as you are in range of the character who conceal, it will not update for you when you change cmdlevel.
Re: Problems with character.concealed member
Same problem seems to appear with privileges and hidden characters.
EDIT: And same FIX for this one too.
I assume this will happen with invisible items, ghosts and all everything that is controlled by privileges aswell.
EDIT: And same FIX for this one too.
I assume this will happen with invisible items, ghosts and all everything that is controlled by privileges aswell.
Re: Problems with character.concealed member
For as long as I've know it, concealed and hidden things will not suddenly become visible or invisible just because you have gained or lost a privilege.
It's a curious thing that old sets of scripts resorted to instantly transporting you away and back again when you toggled seeing invisible items. The update when entering a new area did the trick but I am sure you won't like than as a solution.
It's a curious thing that old sets of scripts resorted to instantly transporting you away and back again when you toggled seeing invisible items. The update when entering a new area did the trick but I am sure you won't like than as a solution.
Re: Problems with character.concealed member
Yes for now Im using the following functions
But the core should chek if some of these privileges or levels are changing and update everything in the characters visibility range that time.
AFAIK this is affecting the following members and methdos changes:
object.cmdlevel := cmdlevel;
object.SetCmdLevel( "cmdlevel_string" );
object.enable( "privilege_string" );
object.disable( "privilege_string" );
And yes OldnGrey, these updates should be handled in core, not by 2 move functions, that's why Im reporting it here.
EDIT: this post should be moved to Core bugs instead of Scripting help.
Code: Select all
function EnablePrivilege( object, privilege )
var x := CInt( object.x );
var y := CInt( object.y );
var z := CInt( object.z );
object.enable( CStr( privilege ) );
MoveObjectToLocation( object, 1, 1, 0, object.realm, MOVEOBJECT_FORCELOCATION );
Sleepms( 2 );
MoveObjectTOLocation( object, x, y, z, object.realm, MOVEOBJECT_FORCELOCATION );
endfunction
function DisablePrivilege( object, privilege )
var x := CInt( object.x );
var y := CInt( object.y );
var z := CInt( object.z );
object.disable( CStr( privilege ) );
MoveObjectToLocation( object, 1, 1, 0, object.realm, MOVEOBJECT_FORCELOCATION );
Sleepms( 2 );
MoveObjectTOLocation( object, x, y, z, object.realm, MOVEOBJECT_FORCELOCATION );
endfunction
function ChangeCmdLevel( object, cmdlevel )
var x := CInt( object.x );
var y := CInt( object.y );
var z := CInt( object.z );
object.cmdlevel( CInt( cmdlevel ) );
MoveObjectToLocation( object, 1, 1, 0, object.realm, MOVEOBJECT_FORCELOCATION );
Sleepms( 2 );
MoveObjectTOLocation( object, x, y, z, object.realm, MOVEOBJECT_FORCELOCATION );
endfunction
AFAIK this is affecting the following members and methdos changes:
object.cmdlevel := cmdlevel;
object.SetCmdLevel( "cmdlevel_string" );
object.enable( "privilege_string" );
object.disable( "privilege_string" );
And yes OldnGrey, these updates should be handled in core, not by 2 move functions, that's why Im reporting it here.
EDIT: this post should be moved to Core bugs instead of Scripting help.
Re: Problems with character.concealed member
If I remember correctly this was addressed a long time ago and it was decided that it was, at that time, a client issue. I remember the same fix that OnG mentioned, ie. moving a character away and back again, being posted as the fix; that was pre-POL 0.96. Similar issues crop up in the client regarding Multi ghosts like sails and masts being vissible after dry-docking a boat and the odd one I found with Multis being ghosted in the first two maps. One would think sending an update character packet should fix this but I guess the client doesn't update properly unles it receives some sort of indication that the character has moved.
Re: Problems with character.concealed member
Use this
Code: Select all
CONST PACKET_ID := 0x1D;
CONST PACKET_LENGTH := 0x5;
CONST BYTE_SERIAL := 0x1;
CONST RANGE := 0x24;
function RemoveObjectFromScene (object, flag := 0x01)
var pessoas := listmobilesnearlocationex (object.x, object.y, object.z, RANGE, flag, object.realm);
foreach mobile in pessoas
if (mobile.connected)
SendDestroyPacket(object.serial, mobile);
endif
endforeach
endfunction
function SendDestroyPacket (serial, who)
var pacote := createpacket(PACKET_ID, PACKET_LENGTH);
pacote.setint32(BYTE_SERIAL, serial);
pacote.sendpacket(who);
endfunction