generated from Jaysyn/ModuleTemplate
Initial upload
Initial upload
This commit is contained in:
46
_mod/_module/nss/generic_loadmod.nss
Normal file
46
_mod/_module/nss/generic_loadmod.nss
Normal file
@@ -0,0 +1,46 @@
|
||||
///////////// Generic Load Module
|
||||
|
||||
void main()
|
||||
{
|
||||
object oMod=GetModule();
|
||||
int nSync;
|
||||
int nC;
|
||||
object oWP;
|
||||
object oCP;
|
||||
if (GetLocalInt(oMod,"nInProgress")!=TRUE)
|
||||
{ // game nor in progress
|
||||
ExecuteScript("rts_load_mod",OBJECT_SELF);
|
||||
SetLocalInt(oMod,"nMaxPlayers",20);
|
||||
SetLocalInt(oMod,"nInProgressJoins",TRUE);
|
||||
SetLocalInt(oMod,"nGameType",1);
|
||||
SetLocalInt(oMod,"nMaxSouls",50);
|
||||
SetLocalInt(oMod,"nAIDelay",4);
|
||||
SetLocalFloat(oMod,"fXPMultiplier",6.0);
|
||||
nSync=Random(99999)+1; // sync key used for rejoining characters
|
||||
SetLocalInt(oMod,"nRTSSync",nSync);
|
||||
SetLocalInt(oMod,"nManaGoldMultiplier",1);
|
||||
nC=1;
|
||||
while(nC<5)
|
||||
{ // place control shaft
|
||||
oWP=GetWaypointByTag("CONTROL_POINT"+IntToString(nC));
|
||||
if (oWP!=OBJECT_INVALID)
|
||||
{ // control point found
|
||||
oCP=CreateObject(OBJECT_TYPE_PLACEABLE,"controlna",GetLocation(oWP));
|
||||
SetLocalObject(oWP,"oShaft",oCP);
|
||||
SetLocalString(oWP,"sTeamID","NA");
|
||||
SetLocalInt(oWP,"nNum",nC);
|
||||
SetLocalInt(oCP,"nNum",nC);
|
||||
SetLocalString(oCP,"sTeamID","NA");
|
||||
} // control point found
|
||||
nC++;
|
||||
} // place control shaft
|
||||
} // game not in progress
|
||||
else
|
||||
{ // game is in progress
|
||||
PrintString("Module continuing from saved game...");
|
||||
int nInstanceID=GetLocalInt(oMod,"nInstanceID");
|
||||
int nR=d100();
|
||||
while(nR==nInstanceID) { nR=d100(); }
|
||||
SetLocalInt(oMod,"nInstanceID",nR);
|
||||
} // game is in progress
|
||||
}
|
||||
Reference in New Issue
Block a user