; quest scriptscn postOfficeScr; when you have a new letter you want delivered, add it to this arrayarray_var letters; initialization first time the mod is installedbegin gamemode let letters := ar_Construct Array stopQuest PostOfficeend
; attached to all mailboxesscn mailboxScrref letterbegin onActivate player ; check the mail while (ar_size PostOffice.letters) > 0 let letter := PostOffice.letters[0] addItem letter 1 ; letter delivered ar_Erase PostOffice.letters 0 loop ; open the mailbox, letters will be inside Activateend
begin OnActivate if myLetterGBL == 0 ;do nothing elseif myLetterGBL == 1 set myLetterGBL to 0 addItem myLetter001 1 elseif myLetterGBL == 2 set myLetterGBL to 0 addItem myLetter002 1 elseif myLetterGBL == 3 set myLetterGBL to 0 addItem myLetter003 1 endif Activateend