generated from Jaysyn/ModuleTemplate
Initial commit
Initial commit
This commit is contained in:
47
_module/nss/tal_scryingstart.nss
Normal file
47
_module/nss/tal_scryingstart.nss
Normal file
@@ -0,0 +1,47 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Talus Menu on Rest
|
||||
// tal_scryingstart
|
||||
// OPW Integration and Clean Up By Don Anderson
|
||||
// dandersonru@msn.com
|
||||
//
|
||||
// Used in Rest Menu Conversation
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC=GetPCSpeaker();
|
||||
int oPage=GetLocalInt(oPC,"scryingpage");
|
||||
if(oPage==0)
|
||||
{
|
||||
SetLocalInt(oPC,"scryingpage",1);
|
||||
oPage=GetLocalInt(oPC,"scryingpage");
|
||||
}
|
||||
|
||||
SetCustomToken(8009,IntToString(oPage));
|
||||
|
||||
object oTarget;
|
||||
if(oPage==1) oTarget =GetFirstPC();
|
||||
|
||||
int n=0;
|
||||
while (n<7)
|
||||
{
|
||||
int i;
|
||||
if(oPage>1) for(i=0;i<(oPage-1)*7;i++) GetNextPC();
|
||||
|
||||
if(GetIsObjectValid(oTarget))
|
||||
{
|
||||
SetLocalObject(GetPCSpeaker(),"scrytarg"+IntToString(n),oTarget);
|
||||
SetCustomToken(8000+n,GetName(oTarget));
|
||||
}
|
||||
else
|
||||
{
|
||||
SetLocalString(GetPCSpeaker(),"scrytarg"+IntToString(n),"none");
|
||||
SetCustomToken(8000+n,"[Empty] ");
|
||||
}
|
||||
n++;
|
||||
oTarget = GetNextPC();
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
Reference in New Issue
Block a user