scn zzTKScript
float fquestdelaytime
short keyclock
short keysave
short keymenu
short hour
short min
ref precell
ref curcell
int interiorlast
int interiornow
int interiorswitch
short pressing
short keypress
short bountymsg
short bounty
short famemsg
short fame
short infamymsg
short infamy
short savehalf
short shcount
float keytimer
float clocktimer
float savetimer
float pcbtimer
float passed
float health
begin gamemode
if fquestdelaytime != .001
set fquestdelaytime to .001
endif
set interiorlast to interiornow
set interiornow to player.isininterior
if interiorlast != interiornow
set interiorswitch to 1
else
set interiorswitch to 0
endif
set passed to getsecondspassed
if pressing != 0
set keypress to getkeypress 0
if keypress == 0 || keypress >= 1000
set keytimer to keytimer + passed
if keytimer > 2
set keytimer to 0
if pressing == 1
message "Bitte drückt die Taste, mit der Ihr die Uhrzeit anzeigen lassen wollt." 1
elseif pressing == 2
message "Bitte drückt die Taste, mit der Ihr automatisch Speichern wollt." 1
else
message "Bitte drückt die Taste, mit der Ihr in dieses Menü zurückkehren wollt." 1
endif
endif
return
else
if pressing == 1
message "Eure neue Taste zur Uhrzeitanzeige ist: %.0f." keypress 1
set zzTKKeyClock to keypress
set keypress to 0
set pressing to 0
elseif pressing == 2
message "Eure neue Autospeicher-Taste ist: %.0f." keypress 1
set zzTKKeySave to keypress
set keypress to 0
set pressing to 0
else
message "Eure neue Taste, um in dieses Menü zurückzukehren ist: %.0f." keypress 1
set zzTKKeyMenu to keypress
set keypress to 0
set pressing to 0
endif
enableplayercontrols
set zzTKQMenu.menu to 1
set zzTKQMenu.button to 4
endif
endif
if zzTKQMenu.clockinterval == -1 && player.isspelltarget zzTKContinuous == 0
player.addspell zzTKContinuous
elseif zzTKQMenu.clockinterval != -1 && player.isspelltarget zzTKContinuous != 0
player.removespell zzTKContinuous
endif
if zzTKQMenu.clockinterval > 0
set clocktimer to clocktimer + passed
if clocktimer >= zzTKQMenu.clockinterval && player.isincombat == 0
set clocktimer to 0
set hour to gamehour
set min to (60 * (gamehour - hour))
If hour < 23
If min > 9
Message "%.0f:%.0f", hour, min, 10
Else
Message "%.0f:0%.0f", hour, min, 10
EndIf
ElseIf hour > 23
set hour to hour - 23
If min > 9
Message "%.0f:%.0f", hour, min, 10
Else
Message "%.0f:0%.0f", hour, min, 10
EndIf
EndIf
endif
endif
if zzTKQMenu.saveinterval > 0
set health to player.getav health / player.getbaseav health * 100
if health > zzTKQMenu.asHealthLimit
set savetimer to savetimer + passed
if savetimer >= zzTKQMenu.saveinterval && player.isincombat == 0
set savetimer to 0
if savehalf == 1 && shcount == 0 && player.isininterior == 0
set shcount to 1
elseif savehalf == 1 && shcount == 1 && player.isininterior == 0
set shcount to 0
autosave
else
autosave
endif
endif
endif
endif
if zzTKQMenu.pcbinterval > 0
set pcbtimer to pcbtimer + passed
if pcbtimer >= zzTKQMenu.pcbinterval
set pcbtimer to 0
pcb
endif
endif
if bountymsg == 1
if bounty < player.getcrimegold && bounty <= 0
set bounty to player.getcrimegold
Message "Kopfgeld: %.0f", bounty
endif
set bounty to player.getcrimegold
endif
if famemsg == 2
set fame to getpcfame
set famemsg to 1
elseif famemsg == 1
if getpcfame < fame
set fame to getpcfame
Message "Euer Ruhm ist auf %.0f gesunken.", fame
elseif getpcfame > fame
set fame to getpcfame
Message "Euer Ruhm hat sich auf %.0f erhöht.", fame
endif
set fame to getpcfame
endif
if infamymsg == 2
set infamy to getpcinfamy
set infamymsg to 1
elseif infamymsg == 1
if getpcinfamy < infamy
set infamy to getpcinfamy
Message "Eure Infamie ist auf %.0f gesunken.", infamy
elseif getpcinfamy > infamy
set infamy to getpcinfamy
Message "Eure Infamie hat sich auf %.0f erhöht.", infamy
endif
set fame to getpcfame
endif
if iskeypressed2 zzTKKeyClock && keyclock == 0
set keyclock to 1
elseif iskeypressed2 zzTKKeyClock == 0 && keyclock == 1
set keyclock to 0
set hour to gamehour
set min to (60 * (gamehour - hour))
If hour < 23
If min > 9
Message "%.0f:%.0f", hour, min, 5
Else
Message "%.0f:0%.0f", hour, min, 5
EndIf
ElseIf hour > 23
set hour to hour - 23
If min > 9
Message "%.0f:%.0f", hour, min, 5
Else
Message "%.0f:0%.0f", hour, min, 5
EndIf
EndIf
endif
if iskeypressed2 zzTKKeySave && keysave == 0
set keysave to 1
elseif iskeypressed2 zzTKKeySave == 0 && keysave == 1
set keysave to 0
autosave
endif
if iskeypressed2 zzTKKeyMenu && keymenu == 0
set keymenu to 1
elseif iskeypressed2 zzTKKeyMenu == 0 && keymenu == 1
set keymenu to 0
set zzTKQMenu.menu to -1
set zzTKQMenu.button to 0
endif
set curcell to player.getparentcell
if curcell != precell
if zzTKQMenu.coTime
if (zzTKQMenu.coTx && interiorswitch) || zzTKQMenu.coTx == 0
set hour to gamehour
set min to (60 * (gamehour - hour))
If hour < 23
If min > 9
Message "%.0f:%.0f", hour, min, 10
Else
Message "%.0f:0%.0f", hour, min, 10
EndIf
ElseIf hour > 23
ElseIf hour > 23
set hour to hour - 23
If min > 9
Message "%.0f:%.0f", hour, min, 10
Else
Message "%.0f:0%.0f", hour, min, 10
EndIf
EndIf
Endif
endif
if zzTKQMenu.coSave
if (zzTKQMenu.coSx && interiorswitch) || zzTKQMenu.coSx == 0
autosave
endif
endif
if zzTKQMenu.coPcb
if (zzTKQMenu.coPx && interiorswitch) || zzTKQMenu.coPx == 0
pcb
endif
endif
endif
set precell to curcell
end