Files
dsrc/sku.0/sys.server/compiled/game/script/poi/factoryliberation/pirate.script
T

54 lines
1.3 KiB
Plaintext

/**
*
* Title: pirate.script
* Description: script for pirates: POI = factoryliberation
*/
//------------------------------------------------
// Includes
//------------------------------------------------
//------------------------------------------------
// Constants
//------------------------------------------------
const string pirateEmotes[] = { "scratch", "yawn", "fidget", "cough" };
//------------------------------------------------
// Methods
//------------------------------------------------
//------------------------------------------------
// OnLoiterWaiting
//------------------------------------------------
trigger OnLoiterWaiting( modifiable_float time )
{
stop( self );
messageTo( self, "emotePirate", null, 4, false );
return SCRIPT_CONTINUE;
}
//------------------------------------------------
// emotePirate
//------------------------------------------------
messageHandler emotePirate()
{
// There is a chance we'll do a social.
int dosocial = rand( 1, 4 );
if ( dosocial == 1 )
{
// Perform a social.
int whichsocial = rand( 0, 3 );
queueCommand( self, ##"social", null, pirateEmotes[whichsocial], COMMAND_PRIORITY_DEFAULT );
}
messageTo( self, "resumeDefaultCalmBehavior", null, 3, false );
return SCRIPT_CONTINUE;
}