Page 1 of 1

profile <skills>

Posted: Sat Mar 10, 2012 6:38 am
by lisa
I noticed today that the <skills> section of the profile doesn't do a check for if you are the right lvl to use the skill, like the actual class sections do.

Example I made a M/D and it was around 12/1 and with

Code: Select all

	<skills>

		<skill name="DRUID_RECOVER"          		hotkey="MACRO" priority="90" hpper="30" />
		<skill name="DRUID_SAVAGE_BLESSING"         hotkey="MACRO" priority="90" />
		<skill name="DRUID_MOTHER_EARTHS_PROTECTION" hotkey="MACRO" priority="90" />
	</skills>
it repeatedly kept saying it was using savage blessing which it can't yet as the druid side lvl is to low.

hmm maybe it checks against the class1 level and not the actual druid class lvl?
Haven't had time to look into the code but that is my guess at this stage.

Code: Select all

We successfully target NPC Dieve and try to open the dialog window.
Use MACRO: Executing RoMScript "ChoiceOption(4);".
Moving to waypoint #10, (2602, 1042)
Use MACRO: DRUID_SAVAGE_BLESSIN=>   <UNKNOWN> (1000/1000)
Use MACRO: DRUID_SAVAGE_BLESSIN=>   <UNKNOWN> (1000/1000)
Use MACRO: DRUID_SAVAGE_BLESSIN=>   <UNKNOWN> (1000/1000)
Use MACRO: DRUID_SAVAGE_BLESSIN=>   <UNKNOWN> (1000/1000)
Use MACRO: DRUID_SAVAGE_BLESSIN=>   <UNKNOWN> (1000/1000)
Moving to waypoint #11, (2459, 958)
Use MACRO: DRUID_SAVAGE_BLESSIN=>   <UNKNOWN> (1000/1000)
Use MACRO: DRUID_SAVAGE_BLESSIN=>   <UNKNOWN> (1000/1000)
Use MACRO: DRUID_SAVAGE_BLESSIN=>   <UNKNOWN> (1000/1000)
Use MACRO: DRUID_SAVAGE_BLESSIN=>   <UNKNOWN> (1000/1000)
Moving to waypoint #12, (2303, 764)
Use MACRO: DRUID_SAVAGE_BLESSIN=>   <UNKNOWN> (1000/1000)
Use MACRO: DRUID_SAVAGE_BLESSIN=>   <UNKNOWN> (1000/1000)
Use MACRO: DRUID_SAVAGE_BLESSIN=>   <UNKNOWN> (1000/1000)
Use MACRO: DRUID_SAVAGE_BLESSIN=>   <UNKNOWN> (1000/1000)
Use MACRO: DRUID_SAVAGE_BLESSIN=>   <UNKNOWN> (1000/1000)
Use MACRO: Executing RoMScript "}LoginNextToon=true;a={".

Re: profile <skills>

Posted: Sat Mar 10, 2012 6:55 am
by lisa
think I may have found the spot.

settings.lua line 1296

Code: Select all

				-- Check if available
				if skill.aslevel > player.Level then
					skill.Available = false
				else
					skill.Available = true
				end
hmm does this mean if I had the druid skill in mage section it would act the same?

I'll have to test that too I guess.

--=== Added ===--
confirmed, it only checks aslevel against player.Level regardless of if skill is for secondary class.

Re: profile <skills>

Posted: Sat Mar 10, 2012 7:10 am
by lisa
ok first solution that comes to mind looks like this.
As always my first thought is long winded lol

Code: Select all

				if string.find(skill.Name, "WARRIOR") then skill.Class = "CLASS_WARRIOR" end
				if string.find(skill.Name, "SCOUT") then skill.Class = "CLASS_SCOUT" end
				if string.find(skill.Name, "ROGUE") then skill.Class = "CLASS_ROGUE" end
				if string.find(skill.Name, "MAGE") then skill.Class = "CLASS_MAGE" end
				if string.find(skill.Name, "PRIEST") then skill.Class = "CLASS_PRIEST" end
				if string.find(skill.Name, "KNIGHT") then skill.Class = "CLASS_KNIGHT" end
				if string.find(skill.Name, "WARDEN") then skill.Class = "CLASS_WARDEN" end
				if string.find(skill.Name, "DRUID") then skill.Class = "CLASS_DRUID" end
				
				-- Check if available
				if (skill.aslevel > player.Level and skill.Class == player.Class1) or 
				(skill.aslevel > player.Level2 and skill.Class == player.Class2) then

Re: profile <skills>

Posted: Sat Mar 10, 2012 7:14 am
by rock5
I guess we could just check the tab number of the skill. If it's 3 then compare against player.Level2 else compare to player.Level.

Re: profile <skills>

Posted: Sat Mar 10, 2012 8:21 am
by lisa
lol that would be the easy way

Code: Select all

				-- Check if available
				if skill.skilltab == 3 then
					if skill.aslevel > player.Level2 then
						skill.Available = false
					else
						skill.Available = true
					end
				else
					if skill.aslevel > player.Level then
						skill.Available = false
					else
						skill.Available = true
					end	
				end

--=== added ===--
nope other class skills come up as skilltab = 0

Re: profile <skills>

Posted: Sat Mar 10, 2012 8:32 am
by lisa
hmm next theory is it only gets the current class skill info from memory.
So the secondary class only uses info from skills database.

This is from my M/D 60/50 which uses Recover

Code: Select all

1:      table: 04CA51F0
        NoBuffTarget:   player
        BuffName:       503797
        MinRange:       0
        Mana:   56
        Range:  250
        MaxHpPer:       30
        TPToLevel:      0
        Blocking:       false
        AutoUse:        true
        TargetMaxHp:    9999999
        Rage:   0
        Type:   1
        CastTime:       2
        aslevel:        0
        NoBuffCount:    0
        MinManaPer:     0
        used:   0
        Cooldown:       0
        maxuse: 0
        LastCastTime:   table: 04CA5218
                low:    0
                high:   0
        Nature: 0
        MaxManaPer:     100
        ReqBuffCount:   0
        Concentration:  0
        Target: 2
        Level:  1
        skilltab:       0
        TargetMaxHpPer: 100
        Toggled:        false
        ReqBuffTarget:  player
        priority:       90
        hotkey: MACRO
        rebuffcut:      0
        pullonly:       false
        ReqBuffName:
        Toggleable:     false
        NoBuffName:
        Name:   DRUID_RECOVER
        skillnum:       0
        pull:   false
        ManaInc:        5.4
        Energy: 0
        Id:     493528
Doesn't appear to have gotten any info directly from memory.
Since aslevel = 0 then previous code I posted won't work either.

Re: profile <skills>

Posted: Sat Mar 10, 2012 8:48 am
by lisa
Added a print to see if it could read tab 3 info.

Code: Select all

if tab == 3 and tmpData.Name ~= nil and tmpData.Name ~= "" then print(tmpData.Name) else print("tab 3 not working") end
and it printed

Code: Select all

tab 3 not working
tab 3 not working
tab 3 not working
tab 3 not working
tab 3 not working
tab 3 not working
Recover
Antidote
Savage Blessing
Earth Pulse
Knowledge of Nature
Mother Earth's Protection
tab 3 not working
tab 3 not working
tab 3 not working
tab 3 not working
So it definately had info for the skills direct from memory.
looking futher along now.

Re: profile <skills>

Posted: Sat Mar 10, 2012 8:55 am
by rock5
I don't know. The function that gets the info from memory, settings.updateSkillsAvailability(), does tabs 2 to 4. So it should be updating the second class memory info too.

I just tested it on my wd/s while it is botting.

Code: Select all

Command> s=settings.profile.skills[1] print(s.Name,s.Level,s.aslevel)
SCOUT_SHOT      70      1
Command> s=settings.profile.skills[2] print(s.Name,s.Level,s.aslevel)
WARDEN_BRIAR_SHIELD     50      4
Command> s=settings.profile.skills[3] print(s.Name,s.Level,s.aslevel)
WARDEN_FRANTIC_BRIAR    55      26
That seems to be correct.

Re: profile <skills>

Posted: Sat Mar 10, 2012 8:58 am
by lisa
bah I must be tired, the prints I was doing were from skilldata and not skills.....

This works fine

Code: Select all

				-- Check if available
				if skill.skilltab == 3 then 
					if skill.aslevel > player.Level2  then
						skill.Available = false
					else
						skill.Available = true
					end
				else
					if skill.aslevel > player.Level  then
						skill.Available = false
					else
						skill.Available = true
					end
				end	

Re: profile <skills>

Posted: Sat Mar 10, 2012 9:04 pm
by lisa
fixed in rev 699