Page 1 of 1

Changing skills variables

Posted: Mon Mar 29, 2010 9:43 pm
by rock5
I've been trying to figure out how to do this with no success.

I'd like to change the minrange value of MAGE_LIGHTING from within my profile.

Is there a command to do this or a variable I can change?

The reason:
Usually the value of 75 is good because Lightning is only really useful to keep mobs from reaching you but I have Icewind Blade so I always need it for the Lightning Rod debuff even if the mobs are in melee range.

Edit:
Never mind. I figured out that I had to use MinRange instead of minrange eg. database.skills.MAGE_LIGHTNING.MinRange. Haven't tested it yet but at least I'm getting the correct value.

Re: Changing skills variables

Posted: Mon Mar 29, 2010 10:10 pm
by rock5
Doesn't seem to work.

Changed database.skills.MAGE_LIGHTNING.MinRange to 0 in the onLoad section of my profile but Lightning doesn't caste when up close.

Any ideas?

Re: Changing skills variables

Posted: Mon Mar 29, 2010 10:40 pm
by Administrator
You should be changing settings.profile.skills.MAGE_LIGHTNING, not the database.

Re: Changing skills variables

Posted: Tue Mar 30, 2010 1:05 am
by rock5
Administrator wrote:You should be changing settings.profile.skills.MAGE_LIGHTNING, not the database.
If I display settings.profile.skills.MAGE_LIGHTNING it says it's nil.

On further investigations it looks as though the skills are stored by number. eg; settings.profile.skills[5] for me is MAGE_LIGHTNING. So to change the minrange value I have to change settings.profile.skills[5].MinRange.

Looks like I will have to search for the skill before I can change the minrange value.

I did it like this;

Code: Select all

for k,v in pairs(settings.profile.skills) do
	if v.Name == "MAGE_LIGHTNING" then
		v.MinRange = 0
	end
end
Now it says it casts it after my Bone Chill but doesn't. Not sure what the problem is now.

Edit: Actually it looks like it casts Lightning sometimes. May be a timing or lag issue. I think I'll try an onSkillCast check for Bone Chill and cast Lightning from there.