/edit suggestion for use in tamriel
[url]http://forums.tamriel-rebuilt.org/viewtopic.php?p=50383#50383[/url]
http://forums.tamriel-rebuilt.org/viewtopic.php?p=50383#50383
Code: Select all
begin degeneration
short lastday
short skillnamelast
short skillnametimer
if (day = lastday)
return
elseif (PCwolf == 1)
return
endif
set lastday to day
;begin check for 1 skill
if (get skillname > skillnamelast) ; if you lvl this skill up, no need to lvl it down
set skillnamelast to get skillname
set skillnametimer to 100/getskillname*30
elseif (get skillname =< skillnamelast) ;if you didnt lvl up you have to do it in a couple of days
set skillnametime to skillnametime - 1 ;counting down the days you have left
if (skillnametime =< 0) ;your time to lvl up has gone, you will go down 1 lvl
set skillname to getskillname -1
set skillnamelast to get skillname
set skillnametime to 100/getskillname*30 ;this formula makes a skill at lvl 100 lvl down in 30 days, 1 at lvl 50 in 60, 25 in 120, ect.
endif
endif
;end check for 1 skill, repeat for every skill.
end degeneration