Jump to content

Need help optimizing the script.


Recommended Posts

I managed to trim the script to the minimum size. But could you just take a visual look at the final scenario? Is there anything superfluous there?

 

 

Scriptname SexLab_Monitor extends Quest  

SexLabFramework Property SexLab Auto

GlobalVariable Property SexlabStatAggressor Auto
GlobalVariable Property SexlabStatAnal Auto
GlobalVariable Property SexlabStatCreatures Auto
GlobalVariable Property SexlabStatFemales Auto
GlobalVariable Property SexlabStatMales Auto
GlobalVariable Property SexlabStatMasturbation Auto
GlobalVariable Property SexlabStatOral Auto
GlobalVariable Property SexlabStatVaginal Auto
GlobalVariable Property SexlabStatVictim Auto

Actor Property PlayerRef Auto


Event OnInit()
    RegisterFunction()
EndEvent

Function RegisterFunction()
    RegisterForCrosshairRef()
    RegisterForSexLabEvents()
EndFunction

Function RegisterForSexLabEvents()
    RegisterForModEvent("HookAnimationEnd", "SexlabEnd")
EndFunction


Event SexlabEnd(int tid, bool HasPlayer)

    sslBaseAnimation anim = sexlab.HookAnimation(tid)
    
    if !HasPlayer
        return
    endif

SexlabStatAggressor.setvalue(SexLab.Stats.GetInt(SexLab.PlayerRef, "Aggressor"))
SexlabStatAnal.setvalue(SexLab.Stats.GetInt(SexLab.PlayerRef, "AnalCount"))
SexlabStatCreatures.setvalue(SexLab.Stats.GetInt(SexLab.PlayerRef, "Creatures"))
SexlabStatFemales.setvalue(SexLab.Stats.GetInt(SexLab.PlayerRef, "Females"))
SexlabStatMales.setvalue(SexLab.Stats.GetInt(SexLab.PlayerRef, "Males"))
SexlabStatMasturbation.setvalue(SexLab.Stats.GetInt(SexLab.PlayerRef, "Masturbation"))
SexlabStatOral.setvalue(SexLab.Stats.GetInt(SexLab.PlayerRef, "OralCount"))
SexlabStatVaginal.setvalue(SexLab.Stats.GetInt(SexLab.PlayerRef, "VaginalCount"))
SexlabStatVictim.setvalue(SexLab.Stats.GetInt(SexLab.PlayerRef, "Victim"))

EndEvent

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use