settings.lua

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

settings.lua

#1 Post by lisa »

Trying to add more tags to skills

Code: Select all

			-- Over-ride attributes
			local priority, maxhpper, maxmanaper, cooldown, inbattle, pullonly, maxuse, autouse, rebuffcut, minxx ;
I've added another tag in the skills and it works just fine but when I try to add another then it just won't register it as being there. Is there a maximum number of things to have in it??

If so how can I work around this to add another or are there any that arn't used anymore that I can replace?
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
User avatar
Administrator
Site Admin
Posts: 5353
Joined: Sat Jan 05, 2008 4:21 pm

Re: settings.lua

#2 Post by Administrator »

What do you mean? Did you add the code to actually read the information out of the XML?
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: settings.lua

#3 Post by lisa »

I added in the minxx

then added in a value in the profile skills

Code: Select all

		<skill name="PRIEST_WAVE_ARMOR"  modifier="" hotkey="VK_9" priority="60" minlvl="2"   minxx="5" />
Then added in a function in functions.lua

Code: Select all

function checkclass2()

for k,v in pairs(settings.profile.skills) do
		if v.minxx ~= 4 then
            settings.profile.skills[k].AutoUse = false
        else
            settings.profile.skills[k].AutoUse = true
        end


end
then added in a call to the function in profile

Code: Select all

	<onLoad><![CDATA[

		checkclass2()

	]]></onLoad>
So now I can stop the bot from trying to use any skills from second class even though the skills are setup in it's profile.

Code I put on forum is just a small picture just to give you an idea, there is obviously a lot more to it to cover all classes. Although the usage might not seem clear it really doesn't matter, the important thing is it only lets me add 1 more tag to the skill sets.

Edit:
I spent half a day trying to work out a way to make the name="PRIEST_WAVE_ARMOR" something I could use to detect the class for the skill. In the end I decided it would be much easier to just add another tag, I also wanted to add another tag for a different reason so it seemed logical to put my efforts into that avenue.
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
User avatar
Administrator
Site Admin
Posts: 5353
Joined: Sat Jan 05, 2008 4:21 pm

Re: settings.lua

#4 Post by Administrator »

On line 870, you'll see where it checks the tag and calls the appropriate function. Have you added some code here?
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: settings.lua

#5 Post by lisa »

Think I just got a bit tired, sorry.

I have the 2 options working perfectly now, only trouble is the way it's set up at the moment when I call the functions to do what they do they over write each other, which may have been why I was never getting both working at same time. Thought I tested that but I was getting pretty tired by that stage.

I'll use mage as an example of what is happening.

I call first function and it disables all skills from table with lvl requirements above character lvl.
I then call the next function and it disables all skills except mage, this is however re-enabling the skills above character lvl.
I might need to rethink how I approach this.
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