EN4_PRC8/_module/nss/qst_random.nss
Jaysyn904 b464d8da05 Initial Commit
Initial Commit [v1.32PRC8]
2025-04-03 13:38:45 -04:00

26 lines
493 B
Plaintext

#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);
}