This page is located on the SimsWiki. To view it in it's original form, click here.
This article is imported from the old MTS2 wiki. You can help Sims2Wiki by cleaning it up. It's original page with comments can be found at http://old_wiki.modthesims2.com/LUAAdvisors
The New Advisor Definitions Script. Defines the Advisor Details. Spec follows

File 25094


Starting Block
dofile("filename.lua") -- usual dofile includes before parsing

advisor_base_template = create_template -- Creates a base template which can have values declared in the advisors block for each advisor
({
   class_id = 0,
   id = 0, 
   advice_type = 0,
   caption = "",
   name = "",
})

advisors = {n = 0} -- Set current advisor num to 0 to begin file.

function advisors : new (init_table, base_table, flat) -- function definition
   local t = advisor_base_template : new (init_table, base_table, flat)
   local i = getn(self) +1
   self[i] = t -- add the table to the main advisors' repository
   self . n = self . n + 1 -- update the table count
   return t
end

Advisors Block (repeating)
mysim_advisor = advisors : new -- creates a new advisor type for use in other sections.
({
   class_id = hex2dec('4a1dbbbf'), -- Class ID for this advisor type
   id = advisor_ids.NULL, -- this one will be ingnored by the game
}, nil, nil) -- Unused since this is creating a type.

advisors : new 
({
   class_id = hex2dec('6a5f8755'), -- Class ID used ingame for the advisor
   id = advisor_ids.HEALTH_EDUCATION,  -- Type from definitions LUA
   advice_type = advice_types.HEALTH_EDUCATION, -- Type from LUA
   caption = "text@aa49638aHealth & Education Advisor", -- Text of Advisor title
   name = "text@0a75f82b", -- Text of advisor Name
}
, department_advisor -- Advisor type as defined in above type section
,1) -- Flat value, model treated as flat model or not. No real noticable difference from changing this.