HoS_PRC8/_mod/_module/nss/cg_paydues.nss

12 lines
367 B
Plaintext
Raw Normal View History

2024-11-25 19:36:07 -05:00
void main()
{
object oChest=GetObjectByTag("CG_CHEST");
object oPC=GetPCSpeaker();
int nDues=GetLocalInt(oPC,"nDuesOwed");
object oItem;
int nTime=(GetCalendarYear()*365)+(GetCalendarMonth()*30)+GetCalendarDay();
SetLocalInt(oPC,"nCGDues",nTime);
TakeGoldFromCreature(nDues,oPC,TRUE);
oItem=CreateItemOnObject("nw_it_gold001",oChest,nDues);
}