45 lines
1.4 KiB
Plaintext
45 lines
1.4 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: 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;
|
|
}
|