Hue Command and Multi Hue Command

Post your Custom Scripts or Packages.

Moderator: POL Developer

Post Reply
runtest
Grandmaster Poster
Posts: 194
Joined: Sat Aug 05, 2006 11:43 am

Hue Command and Multi Hue Command

Post by runtest »

Call it .color or whatever you would like. I made this simple hue command. It works nicely I think. Should be comp. with 95+.

Code: Select all

use uo;

program textcmd_Hue(who, text)

	SendSysMessage( who, "What do you want to hue?" ,3,65 );
	
	var coloritem := text;
	coloritem := CInt( coloritem );
	var targ := Target( who );
	
	targ.color := coloritem;

	if ( !targ )
		SendSysMessage( who, "Cancelled.",3,65 );
		return 0;
	endif

	return 1;

Endprogram
Last edited by runtest on Thu Oct 04, 2007 11:24 am, edited 2 times in total.
runtest
Grandmaster Poster
Posts: 194
Joined: Sat Aug 05, 2006 11:43 am

Post by runtest »

Oh I forgot to mention, just copy and paste that in a text editor and save it as

Code: Select all

hue.src
Then drop it in the seer folder in textcmd located in pkg/commands. It will compile with the latest distro.

Note: Will hue mobiles too.
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Re: Hue Command

Post by Austin »

097/distro/pkg/commands/props/setprop.src

.setprop color 1234

runtest wrote:Call it .color or whatever you would like. I could not find a color command with the 97off. release so I made this simple hue command. It works nicely I think. Should be comp. with 95+.

Code: Select all

use uo;
use os;

program textcmd_Hue(who, text)

	SendSysMessage( who, "What do you want to hue?" ,3,65 );
	
	var coloritem := text;
	coloritem := CInt( coloritem );
	var targ := Target( who );
	
	targ.color := coloritem;

	if ( !targ )
		SendSysMessage( who, "Cancelled.",3,65 );
		return 0;
	endif

	return 1;

Endprogram
runtest
Grandmaster Poster
Posts: 194
Joined: Sat Aug 05, 2006 11:43 am

Post by runtest »

Yeah, but its not .hue. :P Just thought it would be cool for me. Thought hey, why not, lets give it out to learn off, use, or whatever.
runtest
Grandmaster Poster
Posts: 194
Joined: Sat Aug 05, 2006 11:43 am

Post by runtest »

Here be a nice multi hue command me mattes.

Code: Select all

use uo;

program textcmd_MHue(who, text)

	SendSysMessage( who, "What do you want to hue?" ,3,65 );
	
	var coloritem := text;
	coloritem := CInt( coloritem );
	
	while( who.connected )

	var targ := Target( who );

		if( targ )
			var result := targ.color := coloritem;
			SendSysMessage( who,"Target's color was changed to " + coloritem + ".",3,65 );
				if( !result )
					SendSysMessage( who,result.errortext );
				endif
			else
			break;
		endif
	endwhile

	SendSysMessage( who,"Cancelled.",3,65 );

	return 1;

Endprogram
Hint: Save this one as "mhue.src".
Post Reply