Initial Upload
Initial Upload
This commit is contained in:
39
_module/nss/asg_racanebk.nss
Normal file
39
_module/nss/asg_racanebk.nss
Normal file
@@ -0,0 +1,39 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name Random Arcane Book Generator
|
||||
//:: FileName asg_racanebk
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Used to create a single random arcane book.
|
||||
used:
|
||||
|
||||
ExecuteScript("asg_racanebk",oContianer);
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Donny Wilbanks
|
||||
//:: Created On: 4/27/03
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = OBJECT_SELF;
|
||||
object oArcaneBooks = GetObjectByTag("ASG_ACCHEST");
|
||||
int iCount = 0;
|
||||
int iRandom;
|
||||
int iK;
|
||||
object oBook = GetFirstItemInInventory(oArcaneBooks);
|
||||
while (GetIsObjectValid(oBook))
|
||||
{
|
||||
iCount++;
|
||||
oBook = GetNextItemInInventory(oArcaneBooks);
|
||||
}
|
||||
iRandom = Random(iCount);
|
||||
oBook = GetFirstItemInInventory(oArcaneBooks);
|
||||
for (iK=0;iK<=iRandom;iK++)
|
||||
{
|
||||
oBook = GetNextItemInInventory(oArcaneBooks);
|
||||
}
|
||||
object oNewBook = CopyObject(oBook,GetLocation(oPC),oPC);
|
||||
SetIdentified(oNewBook,TRUE);
|
||||
}
|
Reference in New Issue
Block a user