Difference between revisions of "User talk:Lisselli"

1,615 bytes added ,  01:36, 6 August 2017
no edit summary
imported>Lisselli
imported>Lisselli
Line 87: Line 87:
     return 31.0
     return 31.0
endif
endif
EndFunction
</source>
<source lang="papryus">
Int Function GetNumMaxSkills(bool abGetNonMaxed=false)
; returns the number of skills that are capped.
Actor Player = Game.GetPlayer()
Float[] fSkills = new Float[18]
fSkills[0] = Player.GetActorValue("Alteration")
fSkills[1] = Player.GetActorValue("Alchemy")
fSkills[2] = Player.GetActorValue("Block")
fSkills[3] = Player.GetActorValue("Conjuration")
fSkills[4] = Player.GetActorValue("Destruction")
fSkills[5] = Player.GetActorValue("Enchanting")
fSkills[6] = Player.GetActorValue("HeavyArmor")
fSkills[7] = Player.GetActorValue("Illusion")
fSkills[8] = Player.GetActorValue("Lockpicking")
fSkills[9] = Player.GetActorValue("LightArmor")
fSkills[10] = Player.GetActorValue("Marksman")
fSkills[11] = Player.GetActorValue("OneHanded")
fSkills[12] = Player.GetActorValue("Pickpocket")
fSkills[13] = Player.GetActorValue("TwoHanded")
fSkills[14] = Player.GetActorValue("Restoration")
fSkills[15] = Player.GetActorValue("Sneak")
fSkills[16] = Player.GetActorValue("Smithing")
fSkills[17] = Player.GetActorValue("Speechcraft")
Int index = fSkills.Length
Int iCount
if abGetNonMaxed
While index
index -= 1                  ; Start from the last index
if fSkills[index] == 100.0  ; Find any skill that is lvl 100.
iCount += 1            ; record how many were found.
endif
EndWhile
else
While index
index -= 1                  ; Start from the last index
if fSkills[index] < 100.0  ; Find any skill that is lvl 100.
iCount += 1            ; record how many were found.
endif
EndWhile
endif
return iCount
EndFunction
EndFunction
</source>
</source>
Anonymous user