AxlDave Posted April 16, 2014 Share Posted April 16, 2014 So I've been working on a script to handle reputation, and I have posted the end result below. This post should explain what the script is for. It works, for the most part, though there are a few bugs. What I'd like to know is, are those bugs a result of slightly off scripting, or are they to be expected when dealing with reputation / lengthy scripts? As the topic title suggests, I am wondering if it is to do with the timing set up of the script. It is a Quest script, with the Processing Delay set to 0.001. Can anyone advise if the timing of the delay or the fTimer could do with adjusting? Of course, any advice on improvements is welcome. Script is here: scn MyScriptshort DoOnceshort Toggleint iStagefloat fTimerfloat fFreesideFCount1float fFreesideFCount2float fFreesideFTrackerfloat fFreesideICount1float fFreesideICount2float fFreesideITrackerfloat fGoodspringsFCount1float fGoodspringsFCount2float fGoodspringsFTrackerfloat fGoodspringsICount1float fGoodspringsICount2float fGoodspringsITrackerfloat fNovacFCount1float fNovacFCount2float fNovacFTrackerfloat fNovacICount1float fNovacICount2float fNovacITrackerfloat fPrimmFCount1float fPrimmFCount2float fPrimmFTrackerfloat fPrimmICount1float fPrimmICount2float fPrimmITrackerfloat fTheStripFCount1float fTheStripFCount2float fTheStripFTrackerfloat fTheStripICount1float fTheStripICount2float fTheStripITrackerfloat fBoomerFCount1float fBoomerFCount2float fBoomerFTrackerfloat fBoomerICount1float fBoomerICount2float fBoomerITrackerfloat fGreatKhansFCount1float fGreatKhansFCount2float fGreatKhansFTrackerfloat fGreatKhansICount1float fGreatKhansICount2float fGreatKhansITrackerfloat fWhiteGlovesFCount1float fWhiteGlovesFCount2float fWhiteGlovesFTrackerfloat fWhiteGlovesICount1float fWhiteGlovesICount2float fWhiteGlovesITrackerfloat fPowderGangerFCount1float fPowderGangerFCount2float fPowderGangerFTrackerfloat fPowderGangerICount1float fPowderGangerICount2float fPowderGangerITrackerfloat fFollowersFCount1float fFollowersFCount2float fFollowersFTrackerfloat fFollowersICount1float fFollowersICount2float fFollowersITrackerfloat fBrotherhoodFCount1float fBrotherhoodFCount2float fBrotherhoodFTrackerfloat fBrotherhoodICount1float fBrotherhoodICount2float fBrotherhoodITrackerfloat fNCRFCount1float fNCRFCount2float fNCRFTrackerfloat fNCRICount1float fNCRICount2float fNCRITrackerfloat fCaesarsLegionFCount1float fCaesarsLegionFCount2float fCaesarsLegionFTrackerfloat fCaesarsLegionICount1float fCaesarsLegionICount2float fCaesarsLegionITrackerBEGIN GameMode if ( Player.GetEquipped MyArmour == 1 ) if ( Toggle == 0 ) set fTimer to 2 Player.SetReputation RepNVFreeside 1 fFreesideFTracker Player.SetReputation RepNVFreeside 0 fFreesideITracker Player.SetReputation RepNVGoodsprings 1 fGoodspringsFTracker Player.SetReputation RepNVGoodsprings 0 fGoodspringsITracker Player.SetReputation RepNVNovac 1 fNovacFTracker Player.SetReputation RepNVNovac 0 fNovacITracker Player.SetReputation RepNVPrimm 1 fPrimmFTracker Player.SetReputation RepNVPrimm 0 fPrimmITracker Player.SetReputation RepNVTheStrip 1 fTheStripFTracker Player.SetReputation RepNVTheStrip 0 fTheStripITracker Player.SetReputation RepNVBoomer 1 fBoomerFTracker Player.SetReputation RepNVBoomer 0 fBoomerITracker Player.SetReputation RepNVGreatKhans 1 fGreatKhansFTracker Player.SetReputation RepNVGreatKhans 0 fGreatKhansITracker Player.SetReputation RepNVWhiteGloveSociety 1 fWhiteGlovesFTracker Player.SetReputation RepNVWhiteGloveSociety 0 fWhiteGlovesITracker Player.SetReputation RepNVPowderGanger 1 fPowderGangerFTracker Player.SetReputation RepNVPowderGanger 0 fPowderGangerITracker Player.SetReputation RepNVFollowers 1 fFollowersFTracker Player.SetReputation RepNVFollowers 0 fFollowersITracker Player.SetReputation RepNVBrotherhood 1 fBrotherhoodFTracker Player.SetReputation RepNVBrotherhood 0 fBrotherhoodITracker Player.SetReputation RepNVNCR 1 fNCRFTracker Player.SetReputation RepNVNCR 0 fNCRITracker Player.SetReputation RepNVCaesarsLegion 1 fCaesarsLegionFTracker Player.SetReputation RepNVCaesarsLegion 0 fCaesarsLegionITracker set Toggle to 1 endif if ( Toggle == 1 ) if ( fTimer > 0 ) set fTimer to ( fTimer - GetSecondsPassed ) elseif ( iStage == 0 ) set fFreesideFCount1 to ( Player.GetReputation RepNVFreeside 1 ) set fFreesideICount1 to ( Player.GetReputation RepNVFreeside 0 ) set fGoodspringsFCount1 to ( Player.GetReputation RepNVGoodsprings 1 ) set fGoodspringsICount1 to ( Player.GetReputation RepNVGoodsprings 0 ) set fNovacFCount1 to ( Player.GetReputation RepNVNovac 1 ) set fNovacICount1 to ( Player.GetReputation RepNVNovac 0 ) set fPrimmFCount1 to ( Player.GetReputation RepNVPrimm 1 ) set fPrimmICount1 to ( Player.GetReputation RepNVPrimm 0 ) set fTheStripFCount1 to ( Player.GetReputation RepNVTheStrip 1 ) set fTheStripICount1 to ( Player.GetReputation RepNVTheStrip 0 ) set fBoomerFCount1 to ( Player.GetReputation RepNVBoomer 1 ) set fBoomerICount1 to ( Player.GetReputation RepNVBoomer 0 ) set fGreatKhansFCount1 to ( Player.GetReputation RepNVGreatKhans 1 ) set fGreatKhansICount1 to ( Player.GetReputation RepNVGreatKhans 0 ) set fWhiteGlovesFCount1 to ( Player.GetReputation RepNVWhiteGloveSociety 1 ) set fWhiteGlovesICount1 to ( Player.GetReputation RepNVWhiteGloveSociety 0 ) set fPowderGangerFCount1 to ( Player.GetReputation RepNVPowderGanger 1 ) set fPowderGangerICount1 to ( Player.GetReputation RepNVPowderGanger 0 ) set fFollowersFCount1 to ( Player.GetReputation RepNVFollowers 1 ) set fFollowersICount1 to ( Player.GetReputation RepNVFollowers 0 ) set fBrotherhoodFCount1 to ( Player.GetReputation RepNVBrotherhood 1 ) set fBrotherhoodICount1 to ( Player.GetReputation RepNVBrotherhood 0 ) set fNCRFCount1 to ( Player.GetReputation RepNVNCR 1 ) set fNCRICount1 to ( Player.GetReputation RepNVNCR 0 ) set fCaesarsLegionFCount1 to ( Player.GetReputation RepNVCaesarsLegion 1 ) set fCaesarsLegionICount1 to ( Player.GetReputation RepNVCaesarsLegion 0 ) set iStage to 1 set fTimer to 0.01 elseif ( iStage == 1 ) set fFreesideFCount2 to ( Player.GetReputation RepNVFreeside 1 ) set fFreesideICount2 to ( Player.GetReputation RepNVFreeside 0 ) set fGoodspringsFCount2 to ( Player.GetReputation RepNVGoodsprings 1 ) set fGoodspringsICount2 to ( Player.GetReputation RepNVGoodsprings 0 ) set fNovacFCount2 to ( Player.GetReputation RepNVNovac 1 ) set fNovacICount2 to ( Player.GetReputation RepNVNovac 0 ) set fPrimmFCount2 to ( Player.GetReputation RepNVPrimm 1 ) set fPrimmICount2 to ( Player.GetReputation RepNVPrimm 0 ) set fTheStripFCount2 to ( Player.GetReputation RepNVTheStrip 1 ) set fTheStripICount2 to ( Player.GetReputation RepNVTheStrip 0 ) set fBoomerFCount2 to ( Player.GetReputation RepNVBoomer 1 ) set fBoomerICount2 to ( Player.GetReputation RepNVBoomer 0 ) set fGreatKhansFCount2 to ( Player.GetReputation RepNVGreatKhans 1 ) set fGreatKhansICount2 to ( Player.GetReputation RepNVGreatKhans 0 ) set fWhiteGlovesFCount2 to ( Player.GetReputation RepNVWhiteGloveSociety 1 ) set fWhiteGlovesICount2 to ( Player.GetReputation RepNVWhiteGloveSociety 0 ) set fPowderGangerFCount2 to ( Player.GetReputation RepNVPowderGanger 1 ) set fPowderGangerICount2 to ( Player.GetReputation RepNVPowderGanger 0 ) set fFollowersFCount2 to ( Player.GetReputation RepNVFollowers 1 ) set fFollowersICount2 to ( Player.GetReputation RepNVFollowers 0 ) set fBrotherhoodFCount2 to ( Player.GetReputation RepNVBrotherhood 1 ) set fBrotherhoodICount2 to ( Player.GetReputation RepNVBrotherhood 0 ) set fNCRFCount2 to ( Player.GetReputation RepNVNCR 1 ) set fNCRICount2 to ( Player.GetReputation RepNVNCR 0 ) set fCaesarsLegionFCount2 to ( Player.GetReputation RepNVCaesarsLegion 1 ) set fCaesarsLegionICount2 to ( Player.GetReputation RepNVCaesarsLegion 0 ) set iStage to 0 set fTimer to 0 endif endif if ( fFreesideFCount2 > fFreesideFCount1 ) set fFreesideFTracker to ( fFreesideFTracker + ( fFreesideFCount2 - fFreesideFCount1 ) ) endif if ( fFreesideICount2 > fFreesideICount1 ) set fFreesideITracker to ( fFreesideITracker + ( fFreesideICount2 - fFreesideICount1 ) ) endif if ( fGoodspringsFCount2 > fGoodspringsFCount1 ) set fGoodspringsFTracker to ( fGoodspringsFTracker + ( fGoodspringsFCount2 - fGoodspringsFCount1 ) ) endif if ( fGoodspringsICount2 > fGoodspringsICount1 ) set fGoodspringsITracker to ( fGoodspringsITracker + ( fGoodspringsICount2 - fGoodspringsICount1 ) ) endif if ( fNovacFCount2 > fNovacFCount1 ) set fNovacFTracker to ( fNovacFTracker + ( fNovacFCount2 - fNovacFCount1 ) ) endif if ( fNovacICount2 > fNovacICount1 ) set fNovacITracker to ( fNovacITracker + ( fNovacICount2 - fNovacICount1 ) ) endif if ( fPrimmFCount2 > fPrimmFCount1 ) set fPrimmFTracker to ( fPrimmFTracker + ( fPrimmFCount2 - fPrimmFCount1 ) ) endif if ( fPrimmICount2 > fPrimmICount1 ) set fPrimmITracker to ( fPrimmITracker + ( fPrimmICount2 - fPrimmICount1 ) ) endif if ( fTheStripFCount2 > fTheStripFCount1 ) set fTheStripFTracker to ( fTheStripFTracker + ( fTheStripFCount2 - fTheStripFCount1 ) ) endif if ( fTheStripICount2 > fTheStripICount1 ) set fTheStripITracker to ( fTheStripITracker + ( fTheStripICount2 - fTheStripICount1 ) ) endif if ( fBoomerFCount2 > fBoomerFCount1 ) set fBoomerFTracker to ( fBoomerFTracker + ( fBoomerFCount2 - fBoomerFCount1 ) ) endif if ( fBoomerICount2 > fBoomerICount1 ) set fBoomerITracker to ( fBoomerITracker + ( fBoomerICount2 - fBoomerICount1 ) ) ShowMessage AXL1 ShowMessage AXL2 endif if ( fGreatKhansFCount2 > fGreatKhansFCount1 ) set fGreatKhansFTracker to ( fGreatKhansFTracker + ( fGreatKhansFCount2 - fGreatKhansFCount1 ) ) endif if ( fGreatKhansICount2 > fGreatKhansICount1 ) set fGreatKhansITracker to ( fGreatKhansITracker + ( fGreatKhansICount2 - fGreatKhansICount1 ) ) endif if ( fWhiteGlovesFCount2 > fWhiteGlovesFCount1 ) set fWhiteGlovesFTracker to ( fWhiteGlovesFTracker + ( fWhiteGlovesFCount2 - fWhiteGlovesFCount1 ) ) endif if ( fWhiteGlovesICount2 > fWhiteGlovesICount1 ) set fWhiteGlovesITracker to ( fWhiteGlovesITracker + ( fWhiteGlovesICount2 - fWhiteGlovesICount1 ) ) endif if ( fPowderGangerFCount2 > fPowderGangerFCount1 ) set fPowderGangerFTracker to ( fPowderGangerFTracker + ( fPowderGangerFCount2 - fPowderGangerFCount1 ) ) endif if ( fPowderGangerICount2 > fPowderGangerICount1 ) set fPowderGangerITracker to ( fPowderGangerITracker + ( fPowderGangerICount2 - fPowderGangerICount1 ) ) endif if ( fFollowersFCount2 > fFollowersFCount1 ) set fFollowersFTracker to ( fFollowersFTracker + ( fFollowersFCount2 - fFollowersFCount1 ) ) endif if ( fFollowersICount2 > fFollowersICount1 ) set fFollowersITracker to ( fFollowersITracker + ( fFollowersICount2 - fFollowersICount1 ) ) endif if ( fBrotherhoodFCount2 > fBrotherhoodFCount1 ) set fBrotherhoodFTracker to ( fBrotherhoodFTracker + ( fBrotherhoodFCount2 - fBrotherhoodFCount1 ) ) endif if ( fBrotherhoodICount2 > fBrotherhoodICount1 ) set fBrotherhoodITracker to ( fBrotherhoodITracker + ( fBrotherhoodICount2 - fBrotherhoodICount1 ) ) endif if ( fNCRFCount2 > fNCRFCount1 ) set fNCRFTracker to ( fNCRFTracker + ( fNCRFCount2 - fNCRFCount1 ) ) endif if ( fNCRICount2 > fNCRICount1 ) set fNCRITracker to ( fNCRITracker + ( fNCRICount2 - fNCRICount1 ) ) endif if ( fCaesarsLegionFCount2 > fCaesarsLegionFCount1 ) set fCaesarsLegionFTracker to ( fCaesarsLegionFTracker + ( fCaesarsLegionFCount2 - fCaesarsLegionFCount1 ) ) endif if ( fCaesarsLegionICount2 > fCaesarsLegionICount1 ) set fCaesarsLegionITracker to ( fCaesarsLegionITracker + ( fCaesarsLegionICount2 - fCaesarsLegionICount1 ) ) endif if ( DoOnce == 0 ) || ( DoOnce == 2 ) if ( Player.GetAV Karma >= 500 ) set iStage to 2 if ( DoOnce == 2 ) Player.SetReputation RepNVFreeside 0 fFreesideITracker Player.SetReputation RepNVGoodsprings 0 fGoodspringsITracker Player.SetReputation RepNVNovac 0 fNovacITracker Player.SetReputation RepNVPrimm 0 fPrimmITracker Player.SetReputation RepNVTheStrip 0 fTheStripITracker Player.SetReputation RepNVBoomer 1 fBoomerFTracker Player.SetReputation RepNVBoomer 0 fBoomerITracker Player.SetReputation RepNVGreatKhans 1 fGreatKhansFTracker Player.SetReputation RepNVGreatKhans 0 fGreatKhansITracker Player.SetReputation RepNVWhiteGloveSociety 1 fWhiteGlovesFTracker Player.SetReputation RepNVWhiteGloveSociety 0 fWhiteGlovesITracker Player.SetReputation RepNVPowderGanger 1 fPowderGangerFTracker Player.SetReputation RepNVFollowers 0 fFollowersITracker Player.SetReputation RepNVBrotherhood 0 fBrotherhoodITracker Player.SetReputation RepNVNCR 0 fNCRITracker Player.SetReputation RepNVCaesarsLegion 1 fCaesarsLegionFTracker endif Player.AddReputationExact RepNVFreeside 1 70 Player.AddReputationExact RepNVGoodsprings 1 15 Player.AddReputationExact RepNVNovac 1 20 Player.AddReputationExact RepNVPrimm 1 30 Player.AddReputationExact RepNVTheStrip 1 40 Player.AddReputationExact RepNVBoomer 1 8 Player.AddReputationExact RepNVBoomer 0 8 Player.AddReputationExact RepNVGreatKhans 1 5 Player.AddReputationExact RepNVGreatKhans 0 5 Player.AddReputationExact RepNVWhiteGloveSociety 1 2 Player.AddReputationExact RepNVWhiteGloveSociety 0 5 Player.AddReputationExact RepNVPowderGanger 0 15 Player.AddReputationExact RepNVFollowers 1 25 Player.AddReputationExact RepNVBrotherhood 1 10 Player.AddReputationExact RepNVBrotherhood 0 10 Player.AddReputationExact RepNVNCR 1 40 Player.AddReputationExact RepNVNCR 0 12 Player.RemoveReputationExact RepNVCaesarsLegion 1 100 Player.AddReputationExact RepNVCaesarsLegion 0 100 set DoOnce to 1 set iStage to 0 ShowMessage AXL1 endif endif if ( DoOnce == 0 ) || ( DoOnce == 1 ) if ( Player.GetAV Karma <= -500 ) set iStage to 2 if ( DoOnce == 1 ) Player.SetReputation RepNVFreeside 1 fFreesideFTracker Player.SetReputation RepNVGoodsprings 1 fGoodspringsFTracker Player.SetReputation RepNVNovac 1 fNovacFTracker Player.SetReputation RepNVPrimm 1 fPrimmFTracker Player.SetReputation RepNVTheStrip 1 fTheStripFTracker Player.SetReputation RepNVBoomer 1 fBoomerFTracker Player.SetReputation RepNVBoomer 0 fBoomerITracker Player.SetReputation RepNVGreatKhans 1 fGreatKhansFTracker Player.SetReputation RepNVGreatKhans 0 fGreatKhansITracker Player.SetReputation RepNVWhiteGloveSociety 1 fWhiteGlovesFTracker Player.SetReputation RepNVWhiteGloveSociety 0 fWhiteGlovesITracker Player.SetReputation RepNVPowderGanger 0 fPowderGangerITracker Player.SetReputation RepNVFollowers 1 fFollowersFTracker Player.SetReputation RepNVBrotherhood 1 fBrotherhoodFTracker Player.SetReputation RepNVBrotherhood 0 fBrotherhoodITracker Player.SetReputation RepNVNCR 1 fNCRFTracker Player.SetReputation RepNVNCR 0 fNCRITracker Player.SetReputation RepNVCaesarsLegion 0 fCaesarsLegionITracker endif Player.AddReputationExact RepNVFreeside 0 70 Player.AddReputationExact RepNVGoodsprings 0 15 Player.AddReputationExact RepNVNovac 0 20 Player.AddReputationExact RepNVPrimm 0 30 Player.AddReputationExact RepNVTheStrip 0 40 Player.AddReputationExact RepNVBoomer 1 8 Player.AddReputationExact RepNVBoomer 0 8 Player.AddReputationExact RepNVGreatKhans 1 5 Player.AddReputationExact RepNVGreatKhans 0 5 Player.AddReputationExact RepNVWhiteGloveSociety 1 5 Player.AddReputationExact RepNVWhiteGloveSociety 0 2 Player.AddReputationExact RepNVPowderGanger 1 30 Player.AddReputationExact RepNVFollowers 0 25 Player.AddReputationExact RepNVBrotherhood 0 10 Player.AddReputationExact RepNVNCR 0 80 Player.AddReputationExact RepNVCaesarsLegion 1 100 Player.RemoveReputationExact RepNVCaesarsLegion 0 100 set DoOnce to 2 set iStage to 0 ShowMessage AXL2 endif endif elseif ( Player.GetEquipped MyArmour == 0 ) set DoOnce to 0 set Toggle to 0 endifEND Thanks in advance. Link to comment Share on other sites More sharing options...
Recommended Posts