home *** CD-ROM | disk | FTP | other *** search
- /* Consolidate skill list to eliminate unused skills */
- /* Works on currently selected character */
- options results
- src=2
- dest=1
- shell player
- 'lock'
- do until src>43
- /* Check if a skill line is unused */
- say 'Checking skill line' dest
- 'get skill' dest 'num'
- if result=0 then do
- /* Find the next skill which is used, stop if end is passed */
- 'get skill' src 'num'
- do while result=0 & src<43
- src=src+1
- 'get skill' src 'num'
- end
- /* If we exited because we found a skill, move it into unused slot */
- if result~=0 then do
- say 'Replacing line' dest 'with line' src
- 'get skill' src 'num'
- 'set skill' dest 'num' result
- 'get skill' src 'name'
- 'set skill' dest 'name' result
- do z=1 to 4
- 'get skill' src 'prime' z
- 'set skill' dest 'prime' z result
- 'get skill' src 'weight' z
- 'set skill' dest 'weight' z result
- end
- 'get skill' src 'tp'
- 'set skill' dest 'tp' result
- 'set skill' src 'num 0'
- end
- end
- dest=dest+1
- src=src+1
- end
-
- /* Recalculate and redisplay */
- 'redisplay'
- 'unlock'
- exit
-