I have a couple of ideas I want to look into, but until I can get some sort of working knowledge, I'm stuck.
TYIA
if (ar_HasKey READ sName_of_book_being_read == 0) let read[sName_of_book_being_read] := 1endifkind of
short InvPosref pInvObjref pCont ref refNameBegin gamemode set pCont to player set InvPos to 0 Label set pInvObj to (pCont.GetInventoryObject InvPos) if pInvObj set InvPos to (InvPos + 1) set refName to GetName pInvObj; if IsBook pInvObj == 1 && GetBookIsScroll pInvObj == 0 printc "Invetory item position %0.f is %z, FormID is %i" InvPos, refName, pInvObj; endif Goto endif stopquest aaaaaend
if (ar_HasKey READ sName_of_book_being_read == 0) let read[sName_of_book_being_read] := 1endifkind of
short doOnceshort InvPosref pInvObjref pCont string_var refBookNamearray_var CarriedBegin gamemode if GetGameLoaded && doOnce == 0 let Carried := ar_Construct StringMap set pCont to player set InvPos to 0 Label set pInvObj to (pCont.GetInventoryObject InvPos) if pInvObj set InvPos to (InvPos + 1) set refBookName to GetName pInvObj if IsBook pInvObj == 1 && GetBookIsScroll pInvObj == 0 printc "the book name is %z" refBookName if eval ar_HasKey Carried refBookName printc "Book name already stored." else let Carried refBookName := 1 <<<<<<<<<<<<<<<<<<<<<<<<<<<<< This is what won't save printc "book name stored" endif printc "Invetory item position %0.f is %z, FormID is %i" InvPos, refName, pInvObj endif Goto endif set doOnce to 1endifend
...sniplet Carried refBookName := 1 <<<<<<<<<<<<<<<<<<<<<<<<<<<<< This is what won't save ...snip
let carried[refBookName] := 1
let carried[refBookName] := 1
scn aaaaBookScript array_var Readarray_var Whenfloat fQuestDelayTimefloat PointsEarnedfloat PointsRequiredref refBookshort Daysshort Debugshort doOnceshort readingstring_var refNameBegin gamemode ;========== Initial setup of arrays and variables if GetGameLoaded && doOnce == 0 let Read := ar_Construct StringMap let When := ar_Construct StringMap set doOnce to 1 printc "Smarter Intelligence arrays constructed." endif if debug == 1 printc "Debug >> Game Mode " set PointsRequired to 4 endif endBegin Menumode set fQuestDelayTime to 1 if menumode 1026 set refBook to GetActiveMenuObject ;========= Get the object that activated the menu set refName to GetName refBook if debug == 1 printc "Debug >> MenuMode 1026 active object: %z, FormID %i." refName, refBook endif if Player.GetItemCount refBook == 1 ;======= Check to see if book is in player's inventory. if not, it won't count - skip processing if debug == 1 printc "Debug >> Active object is in inventory. Begin processing." endif if eval ar_HasKey Read refName if debug == 1 printc "Debug >> %z was already in the array." refName endif message "I have already read this. Maybe I should read it again later." else let Read[refName] := 1 let When[refName] := GameDaysPassed if debug == 1 printc "Debug >> %z added to the array." refName endif message " I have finished reading this." endif else if debug == 1 printc "Debug >> Active object is not in inventory. Not processed." endif message " I should pick this up and find a quiet place to read it." endif endif if debug == 1 ar_dump Read ar_dump When endifend
scn aaaaBookScript array_var Readarray_var Whenfloat fQuestDelayTimefloat PointsEarnedfloat PointsRequiredref refBookshort Daysshort Debugshort doOnceshort readingstring_var refNameBegin gamemode ;========== Initial setup of arrays and variables if GetGameLoaded && doOnce == 0 let Read := ar_Construct StringMap let When := ar_Construct StringMap set doOnce to 1 printc "Smarter Intelligence arrays constructed." endif if debug == 1 printc "Debug >> Game Mode " set PointsRequired to 4 endif endBegin Menumode set fQuestDelayTime to 1 if menumode 1026 set refBook to GetActiveMenuObject ;========= Get the object that activated the menu set refName to GetName refBook if debug == 1 printc "Debug >> MenuMode 1026 active object: %z, FormID %i." refName, refBook endif if Player.GetItemCount refBook == 1 ;======= Check to see if book is in player's inventory. if not, it won't count - skip processing if debug == 1 printc "Debug >> Active object is in inventory. Begin processing." endif if eval ar_HasKey Read refName if debug == 1 printc "Debug >> %z was already in the array." refName endif message "I have already read this. Maybe I should read it again later." else let Read[refName] := 1 let When[refName] := GameDaysPassed if debug == 1 printc "Debug >> %z added to the array." refName endif message " I have finished reading this." endif else if debug == 1 printc "Debug >> Active object is not in inventory. Not processed." endif message " I should pick this up and find a quiet place to read it." endif endif if debug == 1 ar_dump Read ar_dump When endifend
if eval ar_HasKey Read refName returnbut I am not sure what you want to achieve
Begin Menumode 1026except if I miss something
if eval ar_HasKey Read refName returnbut I am not sure what you want to achieve
Begin Menumode 1026except if I miss something
===============================================Game Instance : 1 | Time : 08-09-2010 07-43-05===============================================Smarter Intelligence arrays constructed.tdtDebug Text -> Onset a1.debug to 1set Debug >> 1** Dumping Array #1 **Owner 01: New Mod.esp** Dumping Array #2 **Owner 01: New Mod.esp** Dumping Array #1 **Owner 01: New Mod.esp** Dumping Array #2 **Owner 01: New Mod.esp** Dumping Array #1 **Owner 01: New Mod.esp** Dumping Array #2 **Owner 01: New Mod.esp** Dumping Array #1 **Owner 01: New Mod.esp** Dumping Array #2 **Owner 01: New Mod.espDebug >> Game Mode Debug >> Game Mode Debug >> Game Mode Debug >> Game Mode Debug >> Game Mode Debug >> Game Mode Debug >> MenuMode 1026 active object: Guide to Leyawiin, FormID 00024560. <<<<<<<<< first instance of opening the book.Debug >> Active object is not in inventory. Not processed. <<<<<<<<< does what is expected.** Dumping Array #1 **Owner 01: New Mod.esp** Dumping Array #2 **Owner 01: New Mod.espDebug >> MenuMode 1026 active object: Guide to Leyawiin, FormID 00024560. <<<<<<<<< now it's in a loopDebug >> Active object is not in inventory. Not processed. <<<<<<<<< with the book not in the player** Dumping Array #1 ** <<<<<<<<< inventory, this is okOwner 01: New Mod.esp** Dumping Array #2 **Owner 01: New Mod.espDebug >> MenuMode 1026 active object: Guide to Leyawiin, FormID 00024560.Debug >> Active object is not in inventory. Not processed.** Dumping Array #1 **Owner 01: New Mod.esp** Dumping Array #2 **Owner 01: New Mod.espDebug >> MenuMode 1026 active object: Guide to Leyawiin, FormID 00024560.Debug >> Active object is not in inventory. Not processed.** Dumping Array #1 **Owner 01: New Mod.esp** Dumping Array #2 **Owner 01: New Mod.espDebug >> MenuMode 1026 active object: Guide to Leyawiin, FormID 00024560.Debug >> Active object is not in inventory. Not processed.** Dumping Array #1 **Owner 01: New Mod.esp** Dumping Array #2 **Owner 01: New Mod.espDebug >> MenuMode 1026 active object: Guide to Leyawiin, FormID 00024560.Debug >> Active object is not in inventory. Not processed.** Dumping Array #1 **Owner 01: New Mod.esp** Dumping Array #2 **Owner 01: New Mod.espDebug >> MenuMode 1026 active object: Guide to Leyawiin, FormID 00024560.Debug >> Active object is not in inventory. Not processed.** Dumping Array #1 **Owner 01: New Mod.esp** Dumping Array #2 **Owner 01: New Mod.espDebug >> Game Mode <<<<<<<<< closed the bookDebug >> Game Mode Debug >> Game Mode ** Dumping Array #1 **Owner 01: New Mod.esp** Dumping Array #2 **Owner 01: New Mod.esp** Dumping Array #1 **Owner 01: New Mod.esp** Dumping Array #2 **Owner 01: New Mod.esp** Dumping Array #1 **Owner 01: New Mod.esp** Dumping Array #2 **Owner 01: New Mod.esp** Dumping Array #1 **Owner 01: New Mod.esp** Dumping Array #2 **Owner 01: New Mod.espDebug >> MenuMode 1026 active object: The Pig Children, FormID 00024590. <<<<<<<<<<< opened book from invetoryDebug >> Active object is in inventory. Begin processing.Debug >> The Pig Children added to the array. <<<<<<<<<< added to array = good** Dumping Array #1 **Owner 01: New Mod.esp[ The Pig Children ] : 1.000000 <<<<<<<<<< array dump - it's there = good** Dumping Array #2 **Owner 01: New Mod.esp[ The Pig Children ] : 2.000000Debug >> MenuMode 1026 active object: The Pig Children, FormID 00024590. <<<<<<<<<< 2nd run of block in same sessionDebug >> Active object is in inventory. Begin processing.Debug >> The Pig Children was already in the array. <<<<<<<<<< this is good in that it shows the array** Dumping Array #1 ** <<<<<<<<<< check works. But it doesn't fit becauseOwner 01: New Mod.esp <<<<<<<<<< it is in the same session. [ The Pig Children ] : 1.000000** Dumping Array #2 **Owner 01: New Mod.esp[ The Pig Children ] : 2.000000Debug >> MenuMode 1026 active object: The Pig Children, FormID 00024590.Debug >> Active object is in inventory. Begin processing.Debug >> The Pig Children was already in the array.** Dumping Array #1 **Owner 01: New Mod.esp[ The Pig Children ] : 1.000000** Dumping Array #2 **Owner 01: New Mod.esp[ The Pig Children ] : 2.000000Debug >> MenuMode 1026 active object: The Pig Children, FormID 00024590.Debug >> Active object is in inventory. Begin processing.Debug >> The Pig Children was already in the array.** Dumping Array #1 **Owner 01: New Mod.esp[ The Pig Children ] : 1.000000** Dumping Array #2 **Owner 01: New Mod.esp[ The Pig Children ] : 2.000000Debug >> MenuMode 1026 active object: The Pig Children, FormID 00024590.Debug >> Active object is in inventory. Begin processing.Debug >> The Pig Children was already in the array.** Dumping Array #1 **Owner 01: New Mod.esp[ The Pig Children ] : 1.000000** Dumping Array #2 **Owner 01: New Mod.esp[ The Pig Children ] : 2.000000Debug >> MenuMode 1026 active object: The Pig Children, FormID 00024590.Debug >> Active object is in inventory. Begin processing.Debug >> The Pig Children was already in the array.** Dumping Array #1 **Owner 01: New Mod.esp[ The Pig Children ] : 1.000000** Dumping Array #2 **Owner 01: New Mod.esp[ The Pig Children ] : 2.000000Debug >> MenuMode 1026 active object: The Pig Children, FormID 00024590.Debug >> Active object is in inventory. Begin processing.Debug >> The Pig Children was already in the array.** Dumping Array #1 **Owner 01: New Mod.esp[ The Pig Children ] : 1.000000** Dumping Array #2 **Owner 01: New Mod.esp[ The Pig Children ] : 2.000000Debug >> MenuMode 1026 active object: The Pig Children, FormID 00024590.Debug >> Active object is in inventory. Begin processing.Debug >> The Pig Children was already in the array.** Dumping Array #1 **Owner 01: New Mod.esp[ The Pig Children ] : 1.000000** Dumping Array #2 **Owner 01: New Mod.esp[ The Pig Children ] : 2.000000Debug >> MenuMode 1026 active object: The Pig Children, FormID 00024590.Debug >> Active object is in inventory. Begin processing.Debug >> The Pig Children was already in the array.** Dumping Array #1 **Owner 01: New Mod.esp[ The Pig Children ] : 1.000000** Dumping Array #2 **Owner 01: New Mod.esp[ The Pig Children ] : 2.000000Debug >> MenuMode 1026 active object: The Pig Children, FormID 00024590.Debug >> Active object is in inventory. Begin processing.Debug >> The Pig Children was already in the array.** Dumping Array #1 **Owner 01: New Mod.esp[ The Pig Children ] : 1.000000** Dumping Array #2 **Owner 01: New Mod.esp[ The Pig Children ] : 2.000000Debug >> MenuMode 1026 active object: The Pig Children, FormID 00024590.Debug >> Active object is in inventory. Begin processing.Debug >> The Pig Children was already in the array.** Dumping Array #1 **Owner 01: New Mod.esp[ The Pig Children ] : 1.000000** Dumping Array #2 **Owner 01: New Mod.esp[ The Pig Children ] : 2.000000** Dumping Array #1 **Owner 01: New Mod.esp[ The Pig Children ] : 1.000000** Dumping Array #2 **Owner 01: New Mod.esp[ The Pig Children ] : 2.000000** Dumping Array #1 **Owner 01: New Mod.esp[ The Pig Children ] : 1.000000** Dumping Array #2 **Owner 01: New Mod.esp[ The Pig Children ] : 2.000000Debug >> Game Mode ** Dumping Array #1 **Owner 01: New Mod.esp[ The Pig Children ] : 1.000000** Dumping Array #2 **Owner 01: New Mod.esp[ The Pig Children ] : 2.000000** Dumping Array #1 **Owner 01: New Mod.esp[ The Pig Children ] : 1.000000** Dumping Array #2 **Owner 01: New Mod.esp[ The Pig Children ] : 2.000000** Dumping Array #1 **Owner 01: New Mod.esp[ The Pig Children ] : 1.000000** Dumping Array #2 **Owner 01: New Mod.esp[ The Pig Children ] : 2.000000qqqBye.
scn IBook1short ReadModefloat fQuestDelayTimefloat TimerBEGIN OnEquipIf ( IB.Book1 != -1 ) set Timer to 0 set ReadMode to 1 set IB.CurrentBook to 1else set ReadMode to 0 Message "I've already read this book."EndifENDBEGIN MenuMode 1026IF ( ReadMode == 1 ) && ( IB.CurrentBook == 1 ) If Timer == 0 set fQuestDelayTime to 1 set Timer to IB.Book1 Endif Set Timer to Timer + GetSecondsPassed Set IB.Book1 to Timer If ( IB.Book1 >= 48.5 ) set Readmode to 0 set IB.Book1 to -1 set IB.IntCounter to IB.IntCounter + 1 Message "I have finished reading this book." if ( IB.IntCounter == IStart.BookReq ) ModPCAttribute Intelligence 1 Message "I have expanded my knowledge and sharpened my mind by reading. (+1 Intelligence)" set IB.IntCounter to 0 endif Endif Else Set fQuestDelayTime to 50 EndIFEND
scn aaaaBookScript array_var Readarray_var Whenfloat fQuestDelayTimefloat PointsEarnedfloat PointsRequiredref refBookshort Daysshort Debugshort doOnceshort doOnce2short readingstring_var refNameBegin gamemode ;========== Initial setup of arrays and variables if GetGameLoaded && doOnce == 0 let Read := ar_Construct StringMap let When := ar_Construct StringMap set doOnce to 1 printc "Smarter Intelligence arrays constructed." set PointsRequired to 4 set fQuestDelayTime to 1 endif if debug == 1 printc "Debug >> Game Mode " endif if doOnce2 set doOnce2 to 0 endifendBegin Menumode 1026 if doOnce2 == 0 set refBook to GetActiveMenuObject ;========= Get the object that activated the menu set refName to GetName refBook if debug == 1 printc "Debug >> MenuMode 1026 active object: %z, FormID %i." refName, refBook endif if Player.GetItemCount refBook == 1 ;======= Check to see if book is in player's inventory. if not, it won't count - skip processing if debug == 1 printc "Debug >> Active object is in inventory. Begin processing." endif if eval ar_HasKey Read refName if debug == 1 printc "Debug >> %z was already in the array." refName endif message "I have already read this. Maybe I should read it again later." else let Read[refName] := 1 let When[refName] := GameDaysPassed if debug == 1 printc "Debug >> %z added to the array." refName endif message " I have finished reading this." endif else if debug == 1 printc "Debug >> Active object is not in inventory. Not processed." endif message " I should pick this up and find a quiet place to read it." endif set doOnce2 to 1 endif if debug == 1 && doOnce2 == 1 ar_dump Read ar_dump When set doOnce2 to 2 endif returnendbegin MenuMode if doOnce2 set doOnce2 to 0 endifend
scn UDUNaaaaBookScriptarray_var Readarray_var Whenfloat fQuestDelayTimefloat PointsEarnedfloat PointsRequiredref refBookshort Daysshort Debugshort doOnceshort doOnce2short readingstring_var refNameBegin gamemode ;========== Initial setup of arrays and variables if GetGameLoaded && doOnce == 0 let Read := ar_Construct StringMap let When := ar_Construct StringMap set doOnce to 1 printc "Smarter Intelligence arrays constructed." set PointsRequired to 4 set fQuestDelayTime to 1 ;performance friendly but a bit slow maybe (?) set debug to 1 ;use setDebugMode instead endif if debug == 1 printc "Debug >> Game Mode " endif if doOnce2 set doOnce2 to 0 endifendBegin Menumode 1026 ; beware of console if doOnce2 == 0 && doOnce ; if it has not initialized yet set refBook to GetActiveMenuObject 1026 ;========= Get the object that activated the menu ; 1026 set refName to GetName refBook if debug == 1 printc "Debug >> MenuMode 1026 active object: %z, FormID %i." refName, refBook endif if Player.GetItemCount refBook == 1 ;======= Check to see if book is in player's inventory. if not, it won't count - skip processing if debug == 1 printc "Debug >> Active object is in inventory. Begin processing." endif if eval ar_HasKey Read refName if debug == 1 printc "Debug >> %z was already in the array." refName endif message "I have already read this. Maybe I should read it again later." else let Read[refName] := 1 let When[refName] := GameDaysPassed if debug == 1 printc "Debug >> %z added to the array." refName endif message " I have finished reading this." endif else if debug == 1 printc "Debug >> Active object is not in inventory. Not processed." endif message " I should pick this up and find a quiet place to read it." 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 endif if debug == 1 && doOnce2 == 1 ar_dump Read ar_dump When set doOnce2 to 2 endif return ; Imortant !endbegin MenuMode if doOnce2 set doOnce2 to 0 endifend
Debug >> Game Mode Debug >> Game Mode Debug >> Game Mode Debug >> Game Mode Debug >> Game Mode Debug >> Game Mode Debug >> MenuMode 1026 active object: HOD: Yurn's 2nd Passage, FormID 6B00B66C.Debug >> Active object is in inventory. Begin processing.Debug >> HOD: Yurn's 2nd Passage added to the array.** Dumping Array #4 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ HOD: Yurn's 2nd Passage ] : 1.000000** Dumping Array #302 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ HOD: Yurn's 2nd Passage ] : 581.000000Debug >> MenuMode 1026 active object: HOD: Yurn's 2nd Passage, FormID 6B00B66C.Debug >> Active object is in inventory. Begin processing.Debug >> HOD: Yurn's 2nd Passage was already in the array.** Dumping Array #4 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ HOD: Yurn's 2nd Passage ] : 1.000000** Dumping Array #302 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ HOD: Yurn's 2nd Passage ] : 581.000000Debug >> MenuMode 1026 active object: HOD: A scrap of paper, FormID 6B0698F9.Debug >> Active object is in inventory. Begin processing.Debug >> HOD: A scrap of paper added to the array.** Dumping Array #4 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ HOD: A scrap of paper ] : 1.000000[ HOD: Yurn's 2nd Passage ] : 1.000000** Dumping Array #302 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ HOD: A scrap of paper ] : 581.000000[ HOD: Yurn's 2nd Passage ] : 581.000000Debug >> MenuMode 1026 active object: Ervvin Austel's First Journal, FormID 5800C579.Debug >> Active object is in inventory. Begin processing.Debug >> Ervvin Austel's First Journal added to the array.** Dumping Array #4 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 1.000000[ HOD: A scrap of paper ] : 1.000000[ HOD: Yurn's 2nd Passage ] : 1.000000** Dumping Array #302 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 581.000000[ HOD: A scrap of paper ] : 581.000000[ HOD: Yurn's 2nd Passage ] : 581.000000Debug >> MenuMode 1026 active object: Mysterious Letter, FormID 3A003837.Debug >> Active object is in inventory. Begin processing.Debug >> Mysterious Letter added to the array.** Dumping Array #4 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 1.000000[ HOD: A scrap of paper ] : 1.000000[ HOD: Yurn's 2nd Passage ] : 1.000000[ Mysterious Letter ] : 1.000000** Dumping Array #302 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 581.000000[ HOD: A scrap of paper ] : 581.000000[ HOD: Yurn's 2nd Passage ] : 581.000000[ Mysterious Letter ] : 581.000000Debug >> Game Mode Debug >> Game Mode Debug >> Game Mode Debug >> Game Mode Debug >> Game Mode Debug >> MenuMode 1026 active object: HOD: Yurn's 2nd Passage, FormID 6B00B66C.Debug >> Active object is in inventory. Begin processing.Debug >> HOD: Yurn's 2nd Passage was already in the array.** Dumping Array #4 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 1.000000[ HOD: A scrap of paper ] : 1.000000[ HOD: Yurn's 2nd Passage ] : 1.000000[ Mysterious Letter ] : 1.000000** Dumping Array #302 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 581.000000[ HOD: A scrap of paper ] : 581.000000[ HOD: Yurn's 2nd Passage ] : 581.000000[ Mysterious Letter ] : 581.000000Debug >> MenuMode 1026 active object: The Ayleid Steps, FormID 5800C57E.Debug >> Active object is in inventory. Begin processing.Debug >> The Ayleid Steps added to the array.** Dumping Array #4 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 1.000000[ HOD: A scrap of paper ] : 1.000000[ HOD: Yurn's 2nd Passage ] : 1.000000[ Mysterious Letter ] : 1.000000[ The Ayleid Steps ] : 1.000000** Dumping Array #302 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 581.000000[ HOD: A scrap of paper ] : 581.000000[ HOD: Yurn's 2nd Passage ] : 581.000000[ Mysterious Letter ] : 581.000000[ The Ayleid Steps ] : 581.000000Debug >> Game Mode Debug >> Game Mode Debug >> MenuMode 1026 active object: Implements of Violence, FormID 06011574.Debug >> Active object is in inventory. Begin processing.Debug >> Implements of Violence added to the array.** Dumping Array #4 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 1.000000[ HOD: A scrap of paper ] : 1.000000[ HOD: Yurn's 2nd Passage ] : 1.000000[ Implements of Violence ] : 1.000000[ Mysterious Letter ] : 1.000000[ The Ayleid Steps ] : 1.000000** Dumping Array #302 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 581.000000[ HOD: A scrap of paper ] : 581.000000[ HOD: Yurn's 2nd Passage ] : 581.000000[ Implements of Violence ] : 581.000000[ Mysterious Letter ] : 581.000000[ The Ayleid Steps ] : 581.000000Debug >> MenuMode 1026 active object: Mystery of Talara, v 3, FormID 000243FB.Debug >> Active object is in inventory. Begin processing.Debug >> Mystery of Talara, v 3 added to the array.** Dumping Array #4 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 1.000000[ HOD: A scrap of paper ] : 1.000000[ HOD: Yurn's 2nd Passage ] : 1.000000[ Implements of Violence ] : 1.000000[ Mysterious Letter ] : 1.000000[ Mystery of Talara, v 3 ] : 1.000000[ The Ayleid Steps ] : 1.000000** Dumping Array #302 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 581.000000[ HOD: A scrap of paper ] : 581.000000[ HOD: Yurn's 2nd Passage ] : 581.000000[ Implements of Violence ] : 581.000000[ Mysterious Letter ] : 581.000000[ Mystery of Talara, v 3 ] : 581.000000[ The Ayleid Steps ] : 581.000000Debug >> Game Mode Debug >> Game Mode Debug >> Game Mode
scn UDUNaaaaBookScriptarray_var Readarray_var Whenfloat fQuestDelayTimefloat PointsEarnedfloat PointsRequiredref refBookshort Daysshort Debugshort doOnceshort doOnce2short readingstring_var refNameBegin gamemode ;========== Initial setup of arrays and variables if GetGameLoaded && doOnce == 0 let Read := ar_Construct StringMap let When := ar_Construct StringMap set doOnce to 1 printc "Smarter Intelligence arrays constructed." set PointsRequired to 4 set fQuestDelayTime to 1 ;performance friendly but a bit slow maybe (?) set debug to 1 ;use setDebugMode instead endif if debug == 1 printc "Debug >> Game Mode " endif if doOnce2 set doOnce2 to 0 endifendBegin Menumode 1026 ; beware of console if doOnce2 == 0 && doOnce ; if it has not initialized yet set refBook to GetActiveMenuObject 1026 ;========= Get the object that activated the menu ; 1026 set refName to GetName refBook if debug == 1 printc "Debug >> MenuMode 1026 active object: %z, FormID %i." refName, refBook endif if Player.GetItemCount refBook == 1 ;======= Check to see if book is in player's inventory. if not, it won't count - skip processing if debug == 1 printc "Debug >> Active object is in inventory. Begin processing." endif if eval ar_HasKey Read refName if debug == 1 printc "Debug >> %z was already in the array." refName endif message "I have already read this. Maybe I should read it again later." else let Read[refName] := 1 let When[refName] := GameDaysPassed if debug == 1 printc "Debug >> %z added to the array." refName endif message " I have finished reading this." endif else if debug == 1 printc "Debug >> Active object is not in inventory. Not processed." endif message " I should pick this up and find a quiet place to read it." 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 endif if debug == 1 && doOnce2 == 1 ar_dump Read ar_dump When set doOnce2 to 2 endif return ; Imortant !endbegin MenuMode if doOnce2 set doOnce2 to 0 endifend
Debug >> Game Mode Debug >> Game Mode Debug >> Game Mode Debug >> Game Mode Debug >> Game Mode Debug >> Game Mode Debug >> MenuMode 1026 active object: HOD: Yurn's 2nd Passage, FormID 6B00B66C.Debug >> Active object is in inventory. Begin processing.Debug >> HOD: Yurn's 2nd Passage added to the array.** Dumping Array #4 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ HOD: Yurn's 2nd Passage ] : 1.000000** Dumping Array #302 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ HOD: Yurn's 2nd Passage ] : 581.000000Debug >> MenuMode 1026 active object: HOD: Yurn's 2nd Passage, FormID 6B00B66C.Debug >> Active object is in inventory. Begin processing.Debug >> HOD: Yurn's 2nd Passage was already in the array.** Dumping Array #4 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ HOD: Yurn's 2nd Passage ] : 1.000000** Dumping Array #302 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ HOD: Yurn's 2nd Passage ] : 581.000000Debug >> MenuMode 1026 active object: HOD: A scrap of paper, FormID 6B0698F9.Debug >> Active object is in inventory. Begin processing.Debug >> HOD: A scrap of paper added to the array.** Dumping Array #4 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ HOD: A scrap of paper ] : 1.000000[ HOD: Yurn's 2nd Passage ] : 1.000000** Dumping Array #302 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ HOD: A scrap of paper ] : 581.000000[ HOD: Yurn's 2nd Passage ] : 581.000000Debug >> MenuMode 1026 active object: Ervvin Austel's First Journal, FormID 5800C579.Debug >> Active object is in inventory. Begin processing.Debug >> Ervvin Austel's First Journal added to the array.** Dumping Array #4 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 1.000000[ HOD: A scrap of paper ] : 1.000000[ HOD: Yurn's 2nd Passage ] : 1.000000** Dumping Array #302 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 581.000000[ HOD: A scrap of paper ] : 581.000000[ HOD: Yurn's 2nd Passage ] : 581.000000Debug >> MenuMode 1026 active object: Mysterious Letter, FormID 3A003837.Debug >> Active object is in inventory. Begin processing.Debug >> Mysterious Letter added to the array.** Dumping Array #4 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 1.000000[ HOD: A scrap of paper ] : 1.000000[ HOD: Yurn's 2nd Passage ] : 1.000000[ Mysterious Letter ] : 1.000000** Dumping Array #302 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 581.000000[ HOD: A scrap of paper ] : 581.000000[ HOD: Yurn's 2nd Passage ] : 581.000000[ Mysterious Letter ] : 581.000000Debug >> Game Mode Debug >> Game Mode Debug >> Game Mode Debug >> Game Mode Debug >> Game Mode Debug >> MenuMode 1026 active object: HOD: Yurn's 2nd Passage, FormID 6B00B66C.Debug >> Active object is in inventory. Begin processing.Debug >> HOD: Yurn's 2nd Passage was already in the array.** Dumping Array #4 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 1.000000[ HOD: A scrap of paper ] : 1.000000[ HOD: Yurn's 2nd Passage ] : 1.000000[ Mysterious Letter ] : 1.000000** Dumping Array #302 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 581.000000[ HOD: A scrap of paper ] : 581.000000[ HOD: Yurn's 2nd Passage ] : 581.000000[ Mysterious Letter ] : 581.000000Debug >> MenuMode 1026 active object: The Ayleid Steps, FormID 5800C57E.Debug >> Active object is in inventory. Begin processing.Debug >> The Ayleid Steps added to the array.** Dumping Array #4 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 1.000000[ HOD: A scrap of paper ] : 1.000000[ HOD: Yurn's 2nd Passage ] : 1.000000[ Mysterious Letter ] : 1.000000[ The Ayleid Steps ] : 1.000000** Dumping Array #302 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 581.000000[ HOD: A scrap of paper ] : 581.000000[ HOD: Yurn's 2nd Passage ] : 581.000000[ Mysterious Letter ] : 581.000000[ The Ayleid Steps ] : 581.000000Debug >> Game Mode Debug >> Game Mode Debug >> MenuMode 1026 active object: Implements of Violence, FormID 06011574.Debug >> Active object is in inventory. Begin processing.Debug >> Implements of Violence added to the array.** Dumping Array #4 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 1.000000[ HOD: A scrap of paper ] : 1.000000[ HOD: Yurn's 2nd Passage ] : 1.000000[ Implements of Violence ] : 1.000000[ Mysterious Letter ] : 1.000000[ The Ayleid Steps ] : 1.000000** Dumping Array #302 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 581.000000[ HOD: A scrap of paper ] : 581.000000[ HOD: Yurn's 2nd Passage ] : 581.000000[ Implements of Violence ] : 581.000000[ Mysterious Letter ] : 581.000000[ The Ayleid Steps ] : 581.000000Debug >> MenuMode 1026 active object: Mystery of Talara, v 3, FormID 000243FB.Debug >> Active object is in inventory. Begin processing.Debug >> Mystery of Talara, v 3 added to the array.** Dumping Array #4 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 1.000000[ HOD: A scrap of paper ] : 1.000000[ HOD: Yurn's 2nd Passage ] : 1.000000[ Implements of Violence ] : 1.000000[ Mysterious Letter ] : 1.000000[ Mystery of Talara, v 3 ] : 1.000000[ The Ayleid Steps ] : 1.000000** Dumping Array #302 **Refs: 1 Owner B0: UDUNaellisBookTest.esp[ Ervvin Austel's First Journal ] : 581.000000[ HOD: A scrap of paper ] : 581.000000[ HOD: Yurn's 2nd Passage ] : 581.000000[ Implements of Violence ] : 581.000000[ Mysterious Letter ] : 581.000000[ Mystery of Talara, v 3 ] : 581.000000[ The Ayleid Steps ] : 581.000000Debug >> Game Mode Debug >> Game Mode Debug >> Game Mode