The following warnings occurred:
Warning [2] Undefined array key "extra" - Line: 100 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 100 errorHandler->error
/inc/plugins/google_seo.php 317 require_once
/inc/class_plugins.php 38 require_once
/inc/init.php 239 pluginSystem->load
/global.php 20 require_once
/printthread.php 16 require_once
Warning [2] Undefined variable $location - Line: 1250 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 1250 errorHandler->error
/inc/plugins/google_seo/url.php 174 google_seo_url_hook
/inc/plugins/google_seo.php 317 require_once
/inc/class_plugins.php 38 require_once
/inc/init.php 239 pluginSystem->load
/global.php 20 require_once
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 573 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 752 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 752 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 34 - File: global.php(956) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/global.php(956) : eval()'d code 34 errorHandler->error
/global.php 956 eval
/printthread.php 16 require_once
Warning [2] Undefined variable $messagestyle - Line: 45 - File: global.php(959) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/global.php(959) : eval()'d code 45 errorHandler->error
/global.php 959 eval
/printthread.php 16 require_once
Warning [2] Undefined variable $boardmessage - Line: 45 - File: global.php(959) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/global.php(959) : eval()'d code 45 errorHandler->error
/global.php 959 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 1024 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 1024 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5342 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 5342 errorHandler->error
/global.php 1024 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$bottomlinks_returncontent - Line: 7 - File: global.php(1059) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/global.php(1059) : eval()'d code 7 errorHandler->error
/global.php 1059 eval
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 606 - File: inc/plugins/simpleckeditor.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/simpleckeditor.php 606 errorHandler->error
/inc/plugins/simpleckeditor.php 517 simpleckeditor_is_allowed
/inc/class_plugins.php 142 setCKeditor
/global.php 1253 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 606 - File: inc/plugins/simpleckeditor.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/simpleckeditor.php 606 errorHandler->error
/inc/plugins/simpleckeditor.php 233 simpleckeditor_is_allowed
/inc/plugins/simpleckeditor.php 521 simpleckeditor
/inc/class_plugins.php 142 setCKeditor
/global.php 1253 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1381 google_seo_url_cache
/inc/functions.php 6219 google_seo_url_forum
/printthread.php 213 get_forum_link
/printthread.php 67 makeprintablenav
Warning [2] Trying to access array offset on value of type null - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1381 google_seo_url_cache
/inc/functions.php 6219 google_seo_url_forum
/printthread.php 213 get_forum_link
/printthread.php 67 makeprintablenav
Warning [2] Undefined array key 156 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1381 google_seo_url_cache
/inc/functions.php 6219 google_seo_url_forum
/printthread.php 213 get_forum_link
/printthread.php 218 makeprintablenav
/printthread.php 67 makeprintablenav
Warning [2] Undefined array key 162 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1381 google_seo_url_cache
/inc/functions.php 6219 google_seo_url_forum
/printthread.php 213 get_forum_link
/printthread.php 218 makeprintablenav
/printthread.php 218 makeprintablenav
/printthread.php 67 makeprintablenav
Warning [2] Undefined array key 4 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1412 google_seo_url_cache
/inc/functions.php 6251 google_seo_url_thread
/printthread.php 124 get_thread_link
Warning [2] Trying to access array offset on value of type null - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1412 google_seo_url_cache
/inc/functions.php 6251 google_seo_url_thread
/printthread.php 124 get_thread_link
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key 1 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1347 google_seo_url_cache
/inc/functions.php 6136 google_seo_url_profile
/inc/functions.php 6204 get_profile_link
/printthread.php 177 build_profile_link
Warning [2] Trying to access array offset on value of type null - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1347 google_seo_url_cache
/inc/functions.php 6136 google_seo_url_profile
/inc/functions.php 6204 get_profile_link
/printthread.php 177 build_profile_link
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key 62 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1347 google_seo_url_cache
/inc/functions.php 6136 google_seo_url_profile
/inc/functions.php 6204 get_profile_link
/printthread.php 177 build_profile_link
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Silgrad Tower from the Ashes
Bookseller Display Script - Printable Version

+- Silgrad Tower from the Ashes (https://www.silgradmodding.net/forum)
+-- Forum: Archived (closed boards) Silgrad TES IV & TES III & General discussions (https://www.silgradmodding.net/forum/Forum-Archived-closed-boards-Silgrad-TES-IV-TES-III-General-discussions)
+--- Forum: Silgrad Tower for TES III (https://www.silgradmodding.net/forum/Forum-Silgrad-Tower-for-TES-III)
+---- Forum: TES3 Faq Board (https://www.silgradmodding.net/forum/Forum-TES3-Faq-Board)
+---- Thread: Bookseller Display Script (/Thread-Bookseller-Display-Script)



Bookseller Display Script - bob196045 - 07-02-2008

Howdy

We have need for a script which will change the bookseller's display book once every game week

This script will simply change the book ID each week to the next book in the list


I will provide the list of books, 3 or 4 books is all thats needed


let me know

Enjoy
Bob


RE: Bookseller Display Script - abot - 07-11-2008

Hello, hope this helps! Smile
Code:
begin ab01bookSwapScript

; example of global script
; should randomly swap/cycle weekly (PERSISTENT)
; ab01BookA1, ab01BookA2, ab01BookA3, ab01BookA4
; and ab01BookB1, ab01BookB2, ab01BookB3, ab01BookB4


short myDay
short myDaysPassed
short i1
short i2
short state
short z1
short z2

if ( myDay == Day )
    return
endif
; a day has passed
set myDay to Day

set myDaysPassed to ( myDaysPassed + 1 )
if ( myDaysPassed <= 7 )
    return
endif

; a week has passed
set myDaysPassed to 0 ; reset week counter

if ( state == 0 )
    set state to 1 ; random books by default
    ; set state to 2 ; uncomment this to cycle books instead of randomize

    ; one time storage of book start position
    set z1 to ( ab01BookA1->GetPos Z )
    set z2 to ( ab01BookB1->GetPos Z )
endif

if ( state == 1 )
    ; assign random books by default
    set i1 to Random 10001
    set i1 to ( i1 * 0.0003 ) ; 0 <= i1 <= 3
    set i2 to Random 1001
    set i2 to ( i2 * 0.003 ) ; 0 <= i2 <= 3
elseif  ( state == 2 )
    ; cycle books
    set i1 to ( i1 + 1 )
    if ( i1 > 3 )
        set i1 to 0
    endif
    set i2 to ( i2 + 1 )
    if ( i2 > 3 )
        set i2 to 0
    endif
endif

if ( i1 == 0 )
    ab01BookA4->SetPos Z -300 ; move it to avoid collision problems
    ab01BookA4->Disable ; then disable
    ab01BookA3->SetPos Z -300
    ab01BookA3->Disable
    ab01BookA2->SetPos Z -300
    ab01BookA2->Disable
    ab01BookA1->SetPos Z z1 ; move the book to right position
    ab01BookA1->Enable ; display it
elseif ( i1 == 1 )
    ab01BookA4->SetPos Z -300
    ab01BookA4->Disable
    ab01BookA3->SetPos Z -300
    ab01BookA3->Disable
    ab01BookA1->SetPos Z -300
    ab01BookA1->Disable
    ab01BookA2->SetPos Z z1
    ab01BookA2->Enable
elseif ( i1 == 2 )
    ab01BookA4->SetPos Z -300
    ab01BookA4->Disable
    ab01BookA2->SetPos Z -300
    ab01BookA2->Disable
    ab01BookA1->SetPos Z -300
    ab01BookA1->Disable
    ab01BookA3->SetPos Z z1
    ab01BookA3->Enable
else ; if ( i1 == 3 )
    ab01BookA3->SetPos Z -300
    ab01BookA3->Disable
    ab01BookA2->SetPos Z -300
    ab01BookA2->Disable
    ab01BookA1->SetPos Z -300
    ab01BookA1->Disable
    ab01BookA4->SetPos Z z1
    ab01BookA4->Enable
endif

if ( i2 == 0 )
    ab01BookB4->SetPos Z -300
    ab01BookB4->Disable
    ab01BookB3->SetPos Z -300
    ab01BookB3->Disable
    ab01BookB2->SetPos Z -300
    ab01BookB2->Disable
    ab01BookB1->SetPos Z z2
    ab01BookB1->Enable
    return
elseif ( i2 == 1 )
    ab01BookB4->SetPos Z -300
    ab01BookB4->Disable
    ab01BookB3->SetPos Z -300
    ab01BookB3->Disable
    ab01BookB1->SetPos Z -300
    ab01BookB1->Disable
    ab01BookB2->SetPos Z z2
    ab01BookB2->Enable
    return
elseif ( i2 == 2 )
    ab01BookB4->SetPos Z -300
    ab01BookB4->Disable
    ab01BookB2->SetPos Z -300
    ab01BookB2->Disable
    ab01BookB1->SetPos Z -300
    ab01BookB1->Disable
    ab01BookB3->SetPos Z z2
    ab01BookB3->Enable
    return
else ; if ( i2 == 3 )
    ab01BookB3->SetPos Z -300
    ab01BookB3->Disable
    ab01BookB2->SetPos Z -300
    ab01BookB2->Disable
    ab01BookB1->SetPos Z -300
    ab01BookB1->Disable
    ab01BookB4->SetPos Z z2
    ab01BookB4->Enable
endif

end
Cheers!
[edit]test .esp attached, test books are just outside the Census office in Setyda Neen, there is an autostart script (Tribunal or better engine required) that increases Day when sneaking to help testing


- bob196045 - 07-12-2008

Super


Thanks Abot, I will give your example esp a go and let you know if we run into any trouble


Thanks Much


Enjoy
Bob