43 lines
1.3 KiB
Plaintext
43 lines
1.3 KiB
Plaintext
|
//::///////////////////////////////////////////////
|
||
|
//:: Store Open Script
|
||
|
//:: asg_radvopen
|
||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||
|
//:://////////////////////////////////////////////
|
||
|
/*
|
||
|
Recommend keeping this Merchant his own store, books only.
|
||
|
*/
|
||
|
//:://////////////////////////////////////////////
|
||
|
//:: Created By: Donny Wilbanks
|
||
|
//:: Created On: 4/27/03
|
||
|
//:://////////////////////////////////////////////
|
||
|
void main()
|
||
|
{
|
||
|
object oStore = OBJECT_SELF;
|
||
|
int iNow = (10000*GetCalendarYear())+(1000*GetCalendarMonth())+(100*GetCalendarDay())+GetTimeHour();
|
||
|
int iLast = GetLocalInt(oStore,"ASG_LASTOPENED");
|
||
|
if (iNow>=iLast)
|
||
|
{
|
||
|
SetLocalInt(oStore,"ASG_LASTOPENED",iNow+24);
|
||
|
int iK;
|
||
|
// Clean out Book Store
|
||
|
object oItem = GetFirstItemInInventory(oStore);
|
||
|
while (GetIsObjectValid(oItem))
|
||
|
{
|
||
|
DestroyObject(oItem);
|
||
|
oItem = GetNextItemInInventory(oStore);
|
||
|
}
|
||
|
// Add 5 Books from Arcane, Add 5 Books from the Divine.
|
||
|
// Add Arcane Books
|
||
|
for (iK=0;iK<=4;iK++)
|
||
|
{
|
||
|
ExecuteScript("asg_racanebk",oStore);
|
||
|
}
|
||
|
// Add Divine Books
|
||
|
for (iK=0;iK<=4;iK++)
|
||
|
{
|
||
|
ExecuteScript("asg_rdivinebk",oStore);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|