Initial Commit
Initial Commit [v1.32PRC8]
This commit is contained in:
26
_module/nss/qst_random.nss
Normal file
26
_module/nss/qst_random.nss
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "utl_i_sqluuid"
|
||||
|
||||
void main()
|
||||
{
|
||||
int iRandom;
|
||||
int iMax;
|
||||
int iLastQuest;
|
||||
|
||||
iMax = 13;
|
||||
iRandom = Random(iMax)+1;
|
||||
|
||||
iLastQuest = GetLocalInt(GetPCSpeaker(),"LastQuest");
|
||||
|
||||
if (iRandom == iLastQuest)
|
||||
{
|
||||
iRandom++;
|
||||
if (iRandom > iMax)
|
||||
iRandom = 1;
|
||||
}
|
||||
|
||||
//Lvl 40 characters should get the main questline until finished.
|
||||
if (SQLocalsUUID_GetInt(GetPCSpeaker(),"OverallQuest") < 4 && GetHitDice(GetPCSpeaker()) > 39)
|
||||
iRandom =11;
|
||||
|
||||
SetLocalInt(OBJECT_SELF,"RandomStep",iRandom);
|
||||
}
|
Reference in New Issue
Block a user