Difference between revisions of "User talk:Lisselli"
Jump to navigation
Jump to search
no edit summary
imported>Lisselli |
imported>Lisselli |
||
Line 2: | Line 2: | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
Scriptname SimpleTestScript extends ObjectReference | |||
Actor property PlayerRef auto | |||
Message property SimpleMessage auto | |||
Float CurrentPlayerLevel | |||
Int iCount | |||
Bool bLockLevel = true | |||
Event OnRead() | |||
Menu() | |||
EndEvent | |||
Function Menu(Int aiButton=0) | |||
aiButton = SimpleMessage.Show() | |||
; before doing anything we need to check the player's level for any level ups. | |||
if (CurrentPlayerLevel != 0) | |||
if CurrentPlayerLevel < PlayerRef.GetLevel() | |||
; Unlock | |||
bLocklevel = false | |||
; reset iCount | |||
iCount = 0 | |||
endif | |||
endif | |||
if aiButton == 0 ; Advance skill. | |||
AdvanceSkillEx("Destruction", 450.0, 5) | |||
elseif aiButton == 1 ; Cancel. | |||
return | |||
endif | |||
EndFunction | |||
Function AdvanceSkillEx(String asSkillName, Float afValue, Int aiClampValue=0) | Function AdvanceSkillEx(String asSkillName, Float afValue, Int aiClampValue=0) | ||
if (bLockLevel == true) | if (bLockLevel == true) | ||
Line 23: | Line 55: | ||
endif | endif | ||
EndFunction | EndFunction | ||
</source> | </source> |