@LocalFire: If you don't have the Framework installed then you will need to install the notebook into your party's cloneObject definition yourself. It looks like you are calling the script, but you are not passing it the correct value from your onDrawGui hook. The problem is that cloneObject will redefine any functions you add, overwriting other functions you may have added in previous cloneObject calls.
You're probably best off not using one of the pre-defined install scripts (one of them works out of the box with the framework, the other works out of the box if you don't have any other party hooks). To integrate the NoteBook where you have other party hooks defined, you will need to first import the items and sounds using the following two lines of code in one of your init scripts...
Code: Select all
import "mod_assets/notebook/scripts/items.lua"
import "mod_assets/notebook/scripts/sounds.lua"
Then, where you have your cloneObject for your party, add the following lines of code to your onDrawGui = function(g) code. Note that it's important that the (g) being passed to the notebook script has the same name as the (g) in your function. So, if you have onDrawGui = function(somethingElse) then you need to change the line to nb_main_script:onDrawGui(somethingElse);
Code: Select all
-- Start NoteBook Mod Hook
if ( nb_main_script ~= nil and nb_main_script.onDrawGui ~= nil ) then
nb_main_script:onDrawGui(g);
end
-- End NoteBook Mod Hook
Now, if you also want to disable moving, turning and resting, add the following code to those functions...
Code: Select all
-- Start NoteBook Mod Hook
if ( nb_main_script ~= nil and nb_main_script.isNoteBookShowing() ) then
return false;
end
-- End NoteBook Mod Hook
Hope this makes sense! It's pretty simple in essence, but messy to explain.