So I took a little detour as I usually do and decided to write the packet and shoved it into a dot command, while it does not really have any application I can think of right now, it might be something to throw into your pile of stuff for future reference.
It is quite simple, it just turns the targeted mobile's graphic blue, what is quite neat about it is it only displays it for other characters who have received this packet and are within range, the actual player being 'Smurfed' has no indication that he has been turned blue and on his screen he just appears as normal.
This is a simple packet to write and figured maybe others will have some use for it, could be perhaps part of a manhunt system or perhaps part of a hallucination package, who knows, so here it be. The function that handles the smurfing is just a small function at the bottom so it is easily able to be pulled out and put anywhere.
(I know hardly what I would consider a good and very useful release, just a release.)
Code: Select all
use uo;
use os;
use polsys;
program smurfit_textcmd( mobile )
SendSysMessage( mobile, "Whom do you wish to smurf?", 0x3, 0x42 );
var player := Target( mobile );
if( !player )
SendSysMessage( mobile, "Canceled", 0x3, 0x22 );
return 0;
endif
var smurfed := GetObjProperty( player, "#Smurfed" );
if( !smurfed )
SetObjProperty( player, "#Smurfed", 0x1 );
SmurfIt( player, 1 );
return 1;
else
EraseObjProperty( player, "#Smurfed" );
SmurfIt( player, 0 );
return 0;
endif
endprogram
function SmurfIt( player, setting := 1 )
/*
Packet: 0xC4
Sent By: Server
Size: 6 Bytes
Packet Build
BYTE[1] cmd
BYTE[4] ID - Mobile Serial
BYTE[1] Toggle {1/0}
*/
var packet := CreatePacket( 0xC4, 6 );
packet.SetInt32( 1, player.serial );
packet.SetInt8( 5, setting );
packet.SendAreaPacket( player.x, player.y, 19, player.realm );
return 1;
endfunction