Initial upload
Initial upload
This commit is contained in:
49
_module/nss/create_gems.nss
Normal file
49
_module/nss/create_gems.nss
Normal file
@@ -0,0 +1,49 @@
|
||||
/*--------------------------------------------------------
|
||||
|
||||
Script Name: securedoorscript
|
||||
----------------------------------------------------------
|
||||
Created By: Genisys(Guile)
|
||||
Created On: 2/09/09
|
||||
----------------------------------------------------------
|
||||
|
||||
This goes in the OnEnter Event for a tracks trigger or Area
|
||||
Basically it creates ALL of the gems on the player, one time.
|
||||
This should be used by DMs for testing only...
|
||||
----------------------------------------------------------*/
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables..
|
||||
int i;
|
||||
object oPC = GetEnteringObject();
|
||||
string sPCName = GetName(oPC);
|
||||
|
||||
|
||||
if(!GetIsPC(oPC))
|
||||
{
|
||||
//DMs get the gems too!
|
||||
if(GetIsDM(oPC))
|
||||
{} //continue the script...
|
||||
else
|
||||
{return;}
|
||||
}
|
||||
|
||||
int n = GetLocalInt(OBJECT_SELF, "ONCE_DONE" + sPCName);
|
||||
if(n==1)
|
||||
{ return; }
|
||||
|
||||
string sName = "gen_gem_";
|
||||
string sItem;
|
||||
|
||||
//Set this to only happen one time for each player!
|
||||
SetLocalInt(OBJECT_SELF, "ONCE_DONE" + sPCName , 1);
|
||||
|
||||
//Create ALL of the gems on the player
|
||||
for(i=0; i<216; i++)
|
||||
{
|
||||
//The resref name of the gem..
|
||||
sItem = sName + IntToString(i);
|
||||
CreateItemOnObject(sItem, oPC, 1);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user