generated from Jaysyn/ModuleTemplate
Initial commit
Initial commit
This commit is contained in:
31
_module/nss/opw_cr_monster.nss
Normal file
31
_module/nss/opw_cr_monster.nss
Normal file
@@ -0,0 +1,31 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Create Creature at Waypoint When Opening Chest/Coffin Etc
|
||||
// opw_cr_monster
|
||||
// by Don Anderson
|
||||
// dandersonru@msn.com
|
||||
//
|
||||
// Place this on the On Open Event
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
object oSelf = OBJECT_SELF;
|
||||
|
||||
string sCreature = GetLocalString(oSelf,"CREATURE");
|
||||
if(sCreature != "")
|
||||
{
|
||||
object oWP = GetNearestObjectByTag("CREATURE",oSelf,1);
|
||||
location lWP = GetLocation(oWP);
|
||||
|
||||
object oCreature = CreateObject(OBJECT_TYPE_CREATURE,sCreature,lWP,TRUE,"");
|
||||
|
||||
//Now Remove the Local String So it can not be done again
|
||||
DeleteLocalString(oSelf,"CREATURE");
|
||||
}
|
||||
else
|
||||
{
|
||||
SpeakString("*You see nothing of interest in here*");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user