cocoons

Got any custom JavaScript additions/tweaks you think other people would like to see? Post 'em here!
Post Reply
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

cocoons

Post by dragon slayer »

You ever wanted to save those poor poeple in the cocoon. well here is your chance to.

Code: Select all

function onUseChecked( pUser, iUsed )
{
	var socket = pUser.socket;
	if( socket && iUsed && iUsed.isItem )
	{
           switch( RandomNumber( 0, 4 ) ) 
           {
	         case 0: pUser.SysMessage( "You free the noble and he teleports back to town" );
                         iUsed.Delete(); break;
	         case 1: var nSpawned = SpawnNPC( "f_brigand", iUsed.x, iUsed.y, iUsed.z, iUsed.worldnumber );
                         iUsed.Delete(); break;
	         case 2: pUser.SysMessage( "You free the noble and she teleports back to town" );
                         iUsed.Delete(); break;
	         case 3: var nSpawned = SpawnNPC( "m_brigand", iUsed.x, iUsed.y, iUsed.z, iUsed.worldnumber );
                         iUsed.Delete(); break;
              default: pUser.SysMessage( "You free the noble and she teleports back to town" );
                       iUsed.Delete(); break;
           }
	}
	return false;
}
Mindless Automaton
UOX3 Apprentice
Posts: 189
Joined: Wed May 10, 2006 3:48 am
Has thanked: 0
Been thanked: 1 time
Contact:

Post by Mindless Automaton »

When does the alien burst out of their chests? ;P
Mindless Automaton
Linux - UOX3 - 0.99.5 dev branch
Win10Pro 19042.572 - UOX3 0.99.3a; Razor 1.0.14; Client 7.0.87.11 or 4.0.11c (Patch 0)
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

Post by dragon slayer »

LOL.
Post Reply