Script Help Req: Custom Player options

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Script Help Req: Custom Player options

#1 Post 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?
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Script Help Req: Custom Player options

#2 Post by lisa »

Code: Select all

settings.profile.options.MAID_COUNT
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Post Reply