Smurfen Turf

Post your Custom Scripts or Packages.

Moderator: POL Developer

Post Reply
Distro Developer
Posts: 97
Joined: Sun Jul 17, 2016 1:29 am

Smurfen Turf

Post by ThisIsMe » Sun Oct 07, 2018 5:52 pm

So I was poking around last night at context menus, this led me to UO Fiddler whereby I was grabbing the clilocs for the context menu entries. One of the entries was 'Smurf It!' so being that I have spent countless wasted hours looking at packet guides from both the pol docs and the ruosi site, I remembered one of these packets was called SmurfIt! in the poldocs.

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 :bacondance: 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;

	var smurfed := GetObjProperty( player, "#Smurfed" );
	if( !smurfed )
		SetObjProperty( player, "#Smurfed", 0x1 );
		SmurfIt( player, 1 );
		return 1;
		EraseObjProperty( player, "#Smurfed" );
		SmurfIt( player, 0 );
		return 0;

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;

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

Re: Smurfen Turf

Post by guialtran » Sun Oct 07, 2018 6:19 pm

interesting thanks :) :whip:

I think this could be used to mark an NPC that you should give him some object to complete a quest + Packet 0xBA - Quest Arrow.

or indicate that a thief is stealing his backpack.

User avatar
Apprentice Poster
Posts: 52
Joined: Mon Jan 22, 2007 6:06 am

Re: Smurfen Turf

Post by Pumpkins » Tue Oct 09, 2018 6:50 am

Nice stuff. Thanks for sharing it with us.

Distro Developer
Posts: 97
Joined: Sun Jul 17, 2016 1:29 am

Re: Smurfen Turf

Post by ThisIsMe » Tue Oct 09, 2018 11:34 am

You are welcome.

If you store an array of serials in the cprop for #Smurfed, this definitely would be useful for an objective type system and on an npcs onenter event just check the mobiles serial against your array.

I wish we had a way to put in player onenter/please events because not just for this would there be some usefulness there, maybe in the form of a syshook or something tied to uoclient.cfg but I'm going off topic now.

Let me know how you guys implement this in the future I'm curious to see some neat ideas.

Post Reply