Initial Upload
Initial Upload
This commit is contained in:
44
_module/nss/asg_rul_testop00.nss
Normal file
44
_module/nss/asg_rul_testop00.nss
Normal file
@@ -0,0 +1,44 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name(ASG_RULE) Reaearch: Book in Lecuturn?
|
||||
//:: FileName
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
This works with the any Lecturn desigend for research
|
||||
checks to see if lecturn is within 15m, and if a book is in it.
|
||||
It does not care wich book at this time.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Donny Wilbanks
|
||||
//:: Created On: 09/07/02
|
||||
//:://////////////////////////////////////////////
|
||||
#include "nw_i0_plot"
|
||||
int StartingConditional()
|
||||
{
|
||||
int iResult = FALSE;
|
||||
object oLecturn =GetNearestObjectByTag("ASG_LECTURN");
|
||||
object oSelf = OBJECT_SELF;
|
||||
object oPC = GetPCSpeaker();
|
||||
float fDist = GetDistanceBetween(oLecturn,oSelf);
|
||||
int vCurrentDay = GetCalendarDay();
|
||||
int vResearched = GetLocalInt(oPC,"ASG_RESEARCHEDTODAY");
|
||||
if (fDist <=15.0)
|
||||
{
|
||||
object oItem = GetFirstItemInInventory(oLecturn);
|
||||
if (GetIsObjectValid(oItem))
|
||||
{
|
||||
string sTag = GetTag(oItem);
|
||||
string sLtag = GetStringLeft(sTag,4);
|
||||
if (sLtag=="BOOK") iResult=TRUE;
|
||||
}
|
||||
}
|
||||
// if (vCurrentDay==vResearched) iResult=FALSE;
|
||||
// Check for Parchemnt
|
||||
int vCount = GetNumItems(oPC,"Parchment");
|
||||
if (vCount<1)
|
||||
{
|
||||
iResult=FALSE;
|
||||
ActionSpeakString("You will need a Peice of Parchment to write your DESIGN down.");
|
||||
}
|
||||
return iResult;
|
||||
}
|
Reference in New Issue
Block a user