Got a quick question? Post here for a quick response.
Begin OnEquip player Message " " Message " " Do something hereEnd
scn aaior01qs; This script sets up arrays and IOR Global Varsarray_var StartedToReadarray_var HasReadForarray_var BookTypearray_var Thymanededarray_var SkillTaughtarray_var EditIDshort doOnceshort NumBooksReadBegin gamemode if doOnce == 0 let StartedTORead := ar_Construct StringMap let HasReadFor := ar_Construct StringMap let BookType := ar_Construct StringMap let Thymaneded := ar_Construct StringMap let SkillTaught := ar_Construct StringMap let EditID := ar_Construct StringMap printc "IOR arrays constructed." set doOnce to 1 endif startquest aaior02 stopquest aaior01end
scn aaior02qsfloat Timerfloat fQuestDelayTimeref refBookshort doOnceshort doOnce2short Skillstring_var refNameBegin gamemode set fQuestDelayTime to 1 set Timer to 0 if doOnce2 set doOnce2 to 0 endifendBegin Menumode 1026 ; Open for reading ;Start tracking time while reading set Timer to Timer + GetSecondsPassed ;Find out what player is reading if doOnce2 == 0 set refBook to GetActiveMenuObject 1026 set refName to GetName refBook set Skill to GetBookSkillTaught refBook printc "Debug >> MenuMode 1026 active object: %z, FormID %i, Timer Started: %.5f" refName, refBook, Timer ;Check if reading from player's inventory. If not, it won't count so skip processing. if Player.GetItemCount refBook == 1 && doOnce == 0 printc "Debug >> Active object is in inventory. Begin processing." ;Check if book has been read before. if eval ar_HasKey aaior01.StartedToRead refName printc "Debug >> Object: '%z' was already in arrays." refName message "I may have already read this. Maybe I should read it again later." else ;set common array variables let aaior01.StartedToRead[refName] := 1 let aaior01.Thymaneded[refName] := 1 let aaior01.SkillTaught[refName] := Skill let aaior01.EditID[refName] := refBook if GetBookIsScroll refBook let aaior01.BookType[refName] := 3 printc "Debug >> Scroll: '%z' added to the arrays." refName elseif Skill > -1 let aaior01.BookType[refName] := 2 printc "Debug >> SkillBook: '%z' added to the arrays." refName else let aaior01.BookType[refName] := 1 printc "Debug >> Book: '%z' added to arrays." refName endif endif else; printc "Debug >> Active object is not in inventory. Not processed."; message " I should pick this up and find a quiet place to read it." endif endif if refBook ; if command in line 46 does not work (if I got your OBSE thread post) set doOnce2 to 1 set refBook to 0 endif let aaior01.HasReadFor[refName] := Timer return ; Imortant !endbegin MenuMode ; clear temp variables after closing book ; printc "Debug >> MenuMode (includes Console Access.)" set Timer to 0 if doOnce2; set refBook to 0 set doOnce2 to 0 ar_dump aaior01.StartedToRead ar_dump aaior01.HasReadFor ar_dump aaior01.BookType ar_dump aaior01.Thymaneded ar_dump aaior01.SkillTaught ar_dump aaior01.EditID endifend
if GetGameLoaded || GetGameRestarted;do stuffendif
if GetGameLoaded || GetGameRestarted;do stuffendif