Page 1 of 1

Script Help Req: Custom Player options

Posted: Thu Nov 08, 2012 5:04 pm
by Cindy
So I am working on a script to level housemaids, and there are a couple things I need to know that are character specific, and hence would like to add them as options in the profile:

Code: Select all

		<option name="MAID_COUNT"           value="4"/>
		<option name="MAID_UNBRIDLED"       value="Annie Haysley"/>
then in the script file I want to do this:

Code: Select all

	<!-- #  1 --><waypoint x="6" z="17" y="0">	
	-- In house, talk to Housekeeper, and leave house
	local maid_ctr = settings.options.MAID_COUNT;
	local maid_unbridled = settings.options.MAID_UNBRIDLED;
	cprintf(cli.yellow, "Maid Count "..settings.options.MAID_COUNT.."\n")
	cprintf(cli.yellow, "Maid Unbridled "..maid_unbridled.."\n)
          .  .  .
I plan on cycling through all maids, check their stats, see what needs leveling, figure out how many I can do and level them. I want to be able to put in which maid is my unbridled pot maid (I dont want to level the Affinity of those past 30ish)

I got an error on the above quote, with "attempt to concatenate field 'MAID_COUNT' (a nil value)"

Note, I tried both with local variable, or the settings bit directly.

Any suggestions on what am I missing?

Re: Script Help Req: Custom Player options

Posted: Thu Nov 08, 2012 6:27 pm
by lisa

Code: Select all

settings.profile.options.MAID_COUNT