Files
dsrc/sku.0/sys.server/compiled/game/script/working/jfreeman/makepet.script
T

32 lines
626 B
Plaintext

//attach this script to the thing you want to make a pet
include library.pet_lib;
include library.ai_lib;
trigger OnAttach()
{
debugSpeakMsg( self, "attached." );
return SCRIPT_CONTINUE;
}
trigger OnHearSpeech(obj_id speaker, string text)
{
if ( pet_lib.hasMaster( self ) )
return SCRIPT_CONTINUE;
if ( ai_lib.isAiDead( self ) )
return SCRIPT_CONTINUE;
if ( text.equals( "pet" ))
{
//pet_lib.makePet(self, speaker);
dictionary params = new dictionary();
params.put( "pet", self );
params.put( "master", speaker );
messageTo( self, "handleAddMaster", params, 1, true );
}
return SCRIPT_CONTINUE;
}