Initial upload
Initial upload
This commit is contained in:
33
_module/nss/spawn_gem.nss
Normal file
33
_module/nss/spawn_gem.nss
Normal file
@@ -0,0 +1,33 @@
|
||||
/*--------------------------------------------------------
|
||||
|
||||
Script Name: spawn_gem
|
||||
----------------------------------------------------------
|
||||
Created By: Genisys(Guile)
|
||||
Created On: 4/17/09
|
||||
----------------------------------------------------------
|
||||
|
||||
This goes in the OnOpen Event ONLY of a chest or placeable object
|
||||
|
||||
----------------------------------------------------------*/
|
||||
|
||||
|
||||
//We only run this script one time for each PC for Each Chest!
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
string sName = GetName(oPC);
|
||||
int n = GetLocalInt(OBJECT_SELF, "GSC" + sName);
|
||||
|
||||
if(!GetIsPC(oPC))
|
||||
return;
|
||||
|
||||
if(n==1)
|
||||
{return;}
|
||||
|
||||
else
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, "GSC" + sName, 1);
|
||||
|
||||
ExecuteScript("gen_geg_treas", OBJECT_SELF);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user