Page 1 of 1

cocoons

Posted: Fri Feb 17, 2012 7:43 pm
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;
}

Re: cocoons

Posted: Fri Feb 17, 2012 11:02 pm
by Mindless Automaton
When does the alien burst out of their chests? ;P

Re: cocoons

Posted: Sat Feb 18, 2012 3:44 am
by dragon slayer
LOL.