Help- Adding OnDraw hooks to party object
Posted: Sat Mar 29, 2014 11:15 am
So I just played ORRR2 and I loved it, particularly the notebook in this case since I decided that my mod needs it (It has allot of scrolls) so I tried to add it and now theres a probelm with my init.lua that stops me from openning the editor, namely "} expected to close line blah (it's the last line), Can someone look at this and tell me what I'm doing wrong cause I suck at code
It should be noted that all the hooks not relating to the notebook work fine, its just the new ones that seem to messing things up. I'm also using the journal in this mod so its using the onDraw hook too.
Code: Select all
cloneObject {
name == "party",
baseObject = "party",
onDamage = function (self, item)
DefendScript.ItemChecker (self, item)
RevengeScript.ItemChecker (self, item)
WindyScript.ItemChecker (self, item)
end,
onAttack = function(champion, weapon)
return attackingWeaponScripts.specialWeaponAttacks(champion, weapon, skill)
end,
onDrawGui = function(ctx)
mdConversationList.onDraw(ctx)
if ( nb_main_script ~= nil and nb_main_script.onDrawGui ~= nil ) then
nb_main_script:onDrawGui(g);
end,
onMove = function(party, direction)
if ( nb_main_script ~= nil and nb_main_script.isNoteBookShowing() ) then
return false;
end,
onTurn = function(party, direction)
if ( nb_main_script ~= nil and nb_main_script.isNoteBookShowing() ) then
return false;
end,
onRest = function(party)
if ( nb_main_script ~= nil and nb_main_script.isNoteBookShowing() ) then
return false;
end,
}