So this is a script I've made in order to know how much time left for reaching GM status and how much skill points per hour are gained.
The idea it's to execute it in other tab different from the main script.
But I don't know exactly why, after a while the UO ends crashing and I have to close it after a time using the script.
Hope someone finds wich could be the problem.
;=================================================================
; Script Name: Skill Gaining Calculator
; Author: VicVega
; Version: 0.1
; Shard OSI / FS: UO Legends
; Revision Date: 26/5/2009
; Purpose: Shows in the UO title bar the skill per hour points you are gaining
; Also shows the time left to achieve GM level
; Globals: None
;=================================================================
; Instructions: Set the skill you want to check in %skill variable
;************************ Setup **********************************
gosub setup
;*********************** Main Loop *******************************
repeat
set %skillGained #skill - %startingSkill
set %timePassed #scnt - %startingTime
set %skillPerHour ( 3600 * %skillGained ) / %timePassed
gosub timeLeftToGM
setuotitle S/H: %skillPerHour GM: %timeLeftToGM S: %skillGained T: %timePassed
wait 10s
until #charGhost = yes
;************************* Subs **********************************
sub setup
set %skill anim
chooseskill %skill
set %startingSkill #skill
set %startingTime #scnt
return
sub timeLeftToGM
if %skillGained > 0
{
set %timeLeftToGMSecs ( ( 1000 - #skill ) * %timePassed ) / %skillGained
gosub ConvertTimeHourMinSec %timeLeftToGMSecs
set %timeLeftToGM #strres
}
return
; %1 = input - Time to convert
; #RESULT - Time converted to H:MM:SS format
sub ConvertTimeHourMinSec
namespace push
namespace local ctime
set !hourpart %1 / 3600
set !secpart ( %1 % 3600 ) % 60
set !minpart ( ( %1 % 3600 ) / 60 )
if !hourpart >= 10
set #STRRES !hourpart , :
else
set #STRRES 0 , !hourpart , :
if !minpart < 10
set #STRRES #STRRES , 0
set #STRRES #STRRES , !minpart , :
if !secpart < 10
set #STRRES #STRRES , 0
set #STRRES #STRRES , !secpart
namespace pop
return