I'm a doctor, not a mechanic

Difference between revisions of "UE1:NBSPMsgMutator (Class)"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
m (Created page with '== Purpose == == Variables == == Discussion == == Possible improvements == == Complete source code == <uscript>//============================================================...')
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Purpose ==
 
== Purpose ==
 +
 +
Info class spawned for each player.
  
 
== Variables ==
 
== Variables ==
 +
 +
* var NBSP nbsp;
 +
* var NBSPChecker checker;
 +
* var PlayerPawn PP;
 +
* var int ID;
 +
* var bool IsInitialised, IsInitialised2, IsValid1, IsValid2, IsValid3, IsValid4, ClassValidated;
 +
* var private bool SkinChecked, modschecked, modschecked2, TimeOutChance, playEnabled, CheckInit, DataSent, firstChecks, xCompleted;
 +
* var private float ClassCheck, packagetimer, CanvasCheck, lastAdjust, actortimer, scantimer, ClassCount, CanvasCount, PackageCount, ActorCount, ScanCount, skintimer, SkinCount, MaxTimeOut, DataTime;
 +
* var string LastConsole;
 +
* var int DataCount;
 +
* var float TimeHash; //Time player joined?
 +
* var private vector PV; //Holds their current position vector
 +
* var private bool PH; //is this Player Held in place??
 +
* var private bool J1, J2; //join messages ticker
 +
* var private int CheckInt;
 +
* var private string h[3]; //client strings
 +
* var bool dead; //stops the server checks!!!
 +
* var bool classError;
  
 
== Discussion ==
 
== Discussion ==
Line 10: Line 30:
  
 
<uscript>//=============================================================================
 
<uscript>//=============================================================================
// NBSPMsgMutator ==> NoBullShitPlus v1.09
+
// NBSPPoll ==> NoBullShitPlus v1.09
 
//=============================================================================
 
//=============================================================================
  
class NBSPMsgMutator expands Mutator;
+
/*----------------------------------------
 +
New in v102
 +
  ----------------------------------------
 +
  - Hopefully decrease main server tick, therefore decreasing pings for clients.
 +
  - Run independent for each checker.
 +
  - MUST BE SPAWNED for each client!!!
 +
  ----------------------------------------*/
 +
 
 +
class NBSPPoll extends Info;
  
 
var NBSP nbsp;
 
var NBSP nbsp;
var string cmd[10];
+
var NBSPChecker checker;
 +
var PlayerPawn PP;
 +
var int ID;
 +
var bool IsInitialised, IsInitialised2, IsValid1, IsValid2, IsValid3, IsValid4, ClassValidated;
 +
var private bool SkinChecked, modschecked, modschecked2, TimeOutChance, playEnabled, CheckInit, DataSent, firstChecks, xCompleted;
 +
var private float ClassCheck, packagetimer, CanvasCheck, lastAdjust, actortimer, scantimer, ClassCount, CanvasCount,
 +
                  PackageCount, ActorCount, ScanCount, skintimer, SkinCount, MaxTimeOut, DataTime;
 +
 
 +
var string LastConsole;
 +
var int DataCount;
 +
var float TimeHash; //Time player joined?
 +
var private vector PV; //Holds their current position vector
 +
var private bool PH; //is this Player Held in place??
 +
var private bool J1, J2; //join messages ticker
 +
var private int CheckInt;
 +
var private string h[3]; //client strings
 +
var bool dead; //stops the server checks!!!
 +
var bool classError;
  
function PostBeginPlay()
+
event PostBeginPlay ()
 
{
 
{
Level.Game.RegisterMessageMutator(self);
+
actortimer = Level.TimeSeconds;
Disable('Tick');
+
skintimer = Level.TimeSeconds;
 +
packagetimer = Level.TimeSeconds;
 +
ClassCheck = Level.TimeSeconds;
 
}
 
}
  
function bool MutatorBroadcastMessage( Actor Sender,Pawn Receiver, out coerce string Msg, optional bool bBeep, out optional name Type )
+
function init()
 
{
 
{
local Actor A;
+
GotoState('xxInit');
local bool l;
+
}
A = Sender;
+
  
// Hack ... for AdminLogout() going in PHYS_Walking while state is 'PlayerWaiting'
+
function InitTimeOut()
If (A.IsA('GameInfo') && Receiver != None && Receiver.PlayerReplicationInfo != None
+
{
&& (Receiver.PlayerReplicationInfo.PlayerName@"gave up administrator abilities.") == Msg
+
GotoState('xxTimeOutCheck');
&& (Receiver.GetStateName() == 'PlayerWaiting' || Receiver.PlayerReplicationInfo.bIsSpectator))
+
}
 +
 
 +
function Tick(float a)
 +
{
 +
local inventory Inv;
 +
local string g;
  
 +
//Check for Kicked
 +
if ((checker == None) && (dead))
 
{
 
{
Receiver.GotoState('');
+
//Destroy References
Receiver.GotoState('PlayerWaiting');
+
nbsp.DestroyPI(ID);
}  
+
nbsp.killPoll(ID);
 +
}
  
while (!A.isa('Pawn') && A.Owner != None)
+
if ((checker != None) && (checker.Owner == None))
A=A.Owner;
+
{
 +
//Report Disconnect
 +
g = nbsp.getinfo(ID);
 +
nbsp.reporter.ReportEvent("Player has left:",g);
 +
 +
//Destroy References
 +
checker.Destroy();
 +
nbsp.DestroyPI(ID);
 +
nbsp.killPoll(ID);
 +
}
  
if (A.isa('spectator'))
 
l=((left(msg,len(spectator(A).playerreplicationinfo.playername)+1))==(spectator(A).playerreplicationinfo.playername$":") || A.IsA('MessagingSpectator'));
 
  
if (l)
+
/*----------------------------------------
l=(type=='Event');               
+
    Rewrote Code-v108
+
      Fixed up Initilization Lockup
if (A.isa('Pawn') && !l)
+
----------------------------------------*/
return false;
+
if (!playEnabled)
 +
{
 +
if (PP != None)
 +
{
 +
//Check for hidden mode
 +
if ((nbsp.settings.DisplayLevel < 2) && (!J1 || !J2))
 +
{
 +
J1 = True;
 +
J2 = True;
 +
}
  
      if ( NextMessageMutator != None )
+
if (IsValid1 && IsValid2 && IsValid3 && IsValid4)
      {
+
{
return NextMessageMutator.MutatorBroadcastMessage( Sender,Receiver, Msg, bBeep );
+
if (!J2)
}
+
{
        else             
+
PP.ClientMessage(h[1]);
return Super.MutatorBroadcastMessage( Sender,Receiver, Msg, bBeep );
+
J2=True;
 +
}
  
 +
if (PH)
 +
{
 +
if (!PP.IsA('Spectator'))
 +
{
 +
PP.SetPhysics(PHYS_Walking);
 +
level.Game.RestartPlayer( PP );
 +
}
 +
PH = false;
 +
}
 +
 +
playEnabled=True;
 +
SetTimer(nbsp.settings.SecurityFrequency,True);
 +
return;
 +
}
 +
else
 +
{
 +
if (!J1)
 +
{
 +
PP.ClientMessage(h[0]);
 +
J1=True;
 +
}
 +
 +
if ( (!PP.IsInState('PlayerWaiting')) && (!Level.Game.IsA('RocketArenaGame')) )
 +
{
 +
if (!PH)
 +
{
 +
PH = true;
 +
if (!PP.IsA('Spectator'))
 +
{
 +
PP.Weapon = None;
 +
PP.SelectedItem = None;
 +
for( Inv=PP.Inventory; Inv!=None; Inv=Inv.Inventory )
 +
Inv.Destroy();
 +
 +
PP.bHidden = true;
 +
PP.SetPhysics(PHYS_None);
 +
PP.SetCollision(false,false,false);
 +
PV = PP.Location;
 +
}
 +
}
 +
else
 +
{
 +
if (!PP.IsA('Spectator'))
 +
PP.SetLocation(PV);
 +
}
 +
}
 +
}
 +
}
 +
}
 
}
 
}
  
function bool MutatorBroadcastLocalizedMessage( Actor Sender, Pawn Receiver, out class<LocalMessage> Message, out optional int Switch, out optional PlayerReplicationInfo RelatedPRI_1, out optional PlayerReplicationInfo RelatedPRI_2, out optional Object OptionalObject )
+
function Timer ()
 
{
 
{
local Actor A;
+
local int i, x;
 +
local float f, sm, st, sv;
 +
local string a;
  
A = Sender;
+
if (dead)
while (!A.isa('Pawn') && A.Owner != None)  
+
return;
  A=A.Owner;
+
  
if (A.isa('Pawn'))
+
if (checker.Owner != None)
return false;
+
{
 +
nbsp.fa(checker,PP);
  
      if ( NextMessageMutator != None )
+
if (classError)
      {
+
{
return NextMessageMutator.MutatorBroadcastLocalizedMessage( Sender, Receiver, Message, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject );
+
nbsp.worker.hd(checker,PP,2,checker.replyClass2);
}
+
return;
else
+
}
return Super.MutatorBroadcastLocalizedMessage( Sender, Receiver, Message, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject );
+
  
} // MutatorBroadcastLocalizedMessage
+
//CheckData - Help Fix Timeout
 
+
if ((!checker.CV) && (DataSent))
function bool MutatorTeamMessage (Actor Sender, Pawn Receiver, PlayerReplicationInfo PRI, coerce string S, name Type, optional bool bBeep)
+
{
{
+
if (!xCompleted)
if ( (Sender != None) && (Receiver != None) )
+
{
{
+
if ((Level.TimeSeconds - DataTime) > 1.000000)
if ((Sender.IsA('PlayerPawn')) && (Receiver.IsA('PlayerPawn')) && (nbsp.xx()))
+
{  
+
      if (!Sender.IsA('Spectator'))
+
      {
+
S=ets(S,PlayerPawn(Sender));
+
        if (NextMessageMutator != None)
+
        {
+
          if (NextMessageMutator.MutatorTeamMessage(Sender,Receiver,PRI,S,Type,bBeep))
+
          {
+
            Receiver.TeamMessage(PRI,S,Type,bBeep);
+
          }
+
            }
+
else
+
 
{
 
{
            Receiver.TeamMessage(PRI,S,Type,bBeep);
+
DataTime = Level.TimeSeconds;
            }
+
checker.ValidateConsole();
 +
}
 
}
 
}
 
else
 
else
 
{
 
{
if ( NextMessageMutator != None )
+
//Valid console Hack. No data Recieved.
        {
+
nbsp.worker.hd(checker,PP,8,"");
          if ( NextMessageMutator.MutatorTeamMessage(Sender,Receiver,PRI,S,Type,bBeep) )
+
return;
          {
+
}
            Receiver.TeamMessage(PRI,S,Type,bBeep);
+
}
          }
+
 
        }
+
//Log Client & CHECK CRC
else
+
if ((checker.CV) && (!IsInitialised))
 +
{
 +
nbsp.logclient(ID);
 +
IsInitialised = True;
 +
x = nbsp.getVersion(ID);
 +
nbsp.worker.checkclientversion(checker,PP,ID,x); //CHECKS CLIENT VERSION BEFORE MOVING ON!!!!
 +
for (i=0; i<8; i++)
 +
{
 +
if ((len(nbsp.packages.CRC[i].P) != 0) && (!dead))
 
{
 
{
          Receiver.TeamMessage(PRI,S,Type,bBeep);
+
x = nbsp.returnCRC(ID,i);
        }
+
nbsp.worker.checkCRC(checker,PP,i,x);
      }
+
}
      return False;            
+
}
                }
+
IsValid1 = True;
else
+
}
 +
 
 +
//Run Level 1 CHECKS
 +
if ((IsValid1) && (!dead))
 
{
 
{
      if ( NextMessageMutator != None )
+
//Run the SkinCheck
      {
+
if (!SkinChecked)
        return NextMessageMutator.MutatorTeamMessage(Sender,Receiver,PRI,S,Type,bBeep);
+
      }
+
else
+
 
{
 
{
        return True;
+
SkinChecked = True;
      }
+
nbsp.worker.SkinCheck(checker,PP);
 +
}
 +
 
 +
//Check Core System Paths
 +
if (!IsInitialised2)
 +
{
 +
IsInitialised2 = True;
 +
if (nbsp.settings.CheckPaths)
 +
{
 +
a = nbsp.returnPaths(ID);
 +
nbsp.worker.checkpaths(checker,PP,a);
 +
}
 +
}
 +
 
 +
//Check Classes
 +
if ((Level.TimeSeconds - ClassCheck) > ClassCount)
 +
{
 +
ClassCheck = Level.TimeSeconds;
 +
checker.TestClasses();
 +
}
 
}
 
}
}
 
}
 
  
function float DistanceFrom (Actor P1, Actor P2)
+
//Run Level 2 Checks
{
+
if ((IsValid2) && (!dead))
local float dx;
+
{
local float dy;
+
//Checks Packages
local float dz;
+
if ((!IsValid3) && (nbsp.settings.CheckPackages))
local float ad;
+
{
 +
packagetimer = Level.TimeSeconds;
 +
nbsp.checkPackages(checker,PP,ID);
 +
}
 +
else
 +
IsValid3 = True;
  
dx=P1.Location.X - P2.Location.X;
+
//Check Canvas
dy=P1.Location.Y - P2.Location.Y;
+
if ((Level.TimeSeconds - CanvasCheck) > CanvasCount)
dz=P1.Location.Z - P2.Location.Z;
+
{
ad=Sqrt(Square(dx) + Square(dy) + Square(dz));
+
CanvasCheck = Level.TimeSeconds;
return ad;
+
a = checker.encode(nbsp.worker.h[4]);
}
+
checker.CheckCanvas(a);
 +
}
  
function string NearestObj (PlayerPawn s)
+
//Check Mods
{
+
if (nbsp.settings.CheckMods)
local FortStandard F;
+
{
local FortStandard nf;
+
if (!modschecked)
local float dt;
+
{
local float tf;
+
modschecked = True;
 +
nbsp.checkmods(checker,PP,ID);
 +
}
 +
if ((modschecked) && (!modschecked2))
 +
{
 +
modschecked2 = True;
 +
if (nbsp.packages.BDMa2 > 0)
 +
nbsp.checkmods2(checker,PP,ID);
 +
}
 +
}
 +
}
  
dt=0.00;
+
//Run Level 3 Checks
foreach AllActors(Class'FortStandard',F)
+
if ((IsValid3) && (!dead))
{
+
tf=DistanceFrom(s,F);
+
if ( (dt == 0) || (tf < dt) )
+
 
{
 
{
nf=F;
+
//Set FireAdjust
dt=tf;
+
if ((nbsp.xx()) && ((Level.TimeSeconds - lastAdjust) > (nbsp.settings.SecurityFrequency)))
 +
{
 +
lastAdjust = Level.TimeSeconds;
 +
if ((PP != None) && (PP.Weapon != None) && (TournamentWeapon(PP.Weapon) != None))
 +
{
 +
//if (nocmd)
 +
//nbsp.worker.killInv(checker,PP);
 +
 
 +
f = TournamentWeapon(PP.Weapon).FireAdjust;
 +
sm = TournamentWeapon(PP.Weapon).shakemag;
 +
st = TournamentWeapon(PP.Weapon).shaketime;
 +
sv = TournamentWeapon(PP.Weapon).shakevert;
 +
checker.adjust(f,sm,st,sv);
 +
}
 +
}
 +
 
 +
//ReRun Package Check
 +
if ((nbsp.settings.RestrictPackages) && ((Level.TimeSeconds - packagetimer) > PackageCount))
 +
{
 +
packagetimer = Level.TimeSeconds;
 +
checker.getPackages();
 +
}
 +
 
 +
//Run BadActorScan || (FIX = Run More Times when Validating...)
 +
if (((Level.TimeSeconds - actortimer) > ActorCount) && (!dead))
 +
{
 +
checker.TestForBadActors();
 +
actortimer = Level.TimeSeconds;
 +
}
 +
 
 +
//Check for class validation
 +
if (!ClassValidated)
 +
{
 +
if (len(checker.replyObj) != 0)
 +
{
 +
a = checker.decode(checker.replyObj);
 +
if (a != nbsp.worker.h[9])
 +
{
 +
nbsp.worker.hd(checker,PP,7,a);
 +
return;
 +
}
 +
 
 +
ClassValidated = True;
 +
}
 +
else if (IsValid4)
 +
{
 +
nbsp.worker.hd(checker,PP,0,"");
 +
return;
 +
}
 +
}
 
}
 
}
}
+
 
if ( nf.FortName == "Assault Target" )
+
//Run Level 4 Checks
{
+
if ((IsValid4) && (!dead))
return string(nf);
+
}
+
else
+
{
+
if ( (nf.FortName == "") || (nf.FortName == " ") )
+
 
{
 
{
return string(nf);
+
if (nbsp.settings.CheckSkins)
 +
{
 +
//Check Skins
 +
if ((nbsp.xx()) && ((Level.TimeSeconds - skintimer) > SkinCount))
 +
{
 +
checker.CheckSkins();
 +
nbsp.worker.SkinCheckAdv(checker,PP);
 +
skintimer = Level.TimeSeconds;
 +
}
 +
}
 +
 
 +
//Scan Console
 +
if ((Level.TimeSeconds - scantimer) > ScanCount)
 +
{
 +
scantimer = Level.TimeSeconds;
 +
a = checker.replyConsole;
 +
if ((a != "") && (LastConsole != a))
 +
{
 +
nbsp.ScanConsole(checker,PP,self,a);
 +
LastConsole = a;
 +
}
 +
}
 
}
 
}
else
+
 
 +
//NBSP Timeout
 +
if (((!IsValid1) || (!IsValid2) || (!IsValid3) || (!IsValid4) || (!ClassValidated)) && (!dead))
 
{
 
{
return nf.FortName;
+
if (((Level.TimeSeconds - TimeHash) > MaxTimeOut) && (xCompleted))
 +
{
 +
nbsp.worker.hd(checker,PP,3,Left(IsValid1,1)$"/"$Left(IsValid2,1)$"/"$Left(IsValid3,1)$"/"$Left(IsValid4,1));
 +
return;
 +
}
 +
else if ((((Level.TimeSeconds - TimeHash) > (MaxTimeOut / 2)) && (!TimeOutChance)) && (firstChecks))
 +
{
 +
TimeOutChance = True;
 +
nbsp.reporter.ReportEvent(PP.PlayerReplicationInfo.PlayerName$" is not responding:","Re-attempting checks.");
 +
if (nbsp.settings.DisplayLevel > 1)
 +
PP.ClientMessage(h[2]);
 +
 
 +
actortimer = Level.TimeSeconds;
 +
skintimer = Level.TimeSeconds;
 +
packagetimer = Level.TimeSeconds;
 +
ClassCheck = Level.TimeSeconds;
 +
 
 +
InitTimeOut();
 +
}
 
}
 
}
 
}
 
}
 
}
 
}
  
function string NearestTeamMate (PlayerPawn s)
+
function CSet()
 
{
 
{
local PlayerPawn PP, xPP;
+
//Set Timers
local float dtx, tpd;
+
ClassCount = ClassCount * nbsp.settings.SecurityFrequency;
 +
CanvasCount = CanvasCount * nbsp.settings.SecurityFrequency;
 +
PackageCount = PackageCount * nbsp.settings.SecurityFrequency;
 +
ActorCount = ActorCount * nbsp.settings.SecurityFrequency;
 +
SkinCount = SkinCount * nbsp.settings.SecurityFrequency;
 +
ScanCount = ScanCount * nbsp.settings.SecurityFrequency;
 +
MaxTimeOut = nbsp.settings.MaxTimeout + (nbsp.settings.InitialCheckFrequency * 4);
  
dtx=0.00;
+
//Start Timer
foreach AllActors(Class'PlayerPawn',PP)
+
SetTimer(0.500000,True);
{
+
tpd=DistanceFrom(s,PP);
+
if ( (PP != s) && (PP.PlayerReplicationInfo.Team == s.PlayerReplicationInfo.Team) && ((dtx == 0) || (tpd < dtx)) )
+
{
+
xPP=PP;
+
dtx=tpd;
+
}
+
}
+
if ( xPP != None )
+
{
+
return xPP.PlayerReplicationInfo.PlayerName;
+
}
+
else
+
{
+
return "NO TEAM MATES";
+
}
+
 
}
 
}
  
function int GetArmourAmount (Pawn P)
+
/*------------------------------------------
 +
    STATES - CLIENT CHECKS
 +
  ------------------------------------------*/
 +
state xxInit
 
{
 
{
local int a;
+
function runInitChecks()
local Inventory v;
+
{
 +
local int i, c;
 +
local private string d, e;
 +
 
 +
//Init Client
 +
d = checker.encode(nbsp.worker.h[0]);
 +
checker.InitClient(d);
 +
CheckInit=true;
 +
 
 +
//Get Info
 +
d = checker.encode(nbsp.worker.h[2]);
 +
checker.GetInformation(d);
 +
}
  
v=P.Inventory;
+
Begin:
while (v != None)
+
while (true)
 
{
 
{
if ( v.bIsAnArmor )
+
if (!CheckInit)
 
{
 
{
a += v.Charge;
+
runInitChecks();
 +
}
 +
else
 +
{
 +
GotoState('xxCheck');
 
}
 
}
v=v.Inventory;
 
 
}
 
}
return a;
 
 
}
 
}
  
function string ets (string t, PlayerPawn s)
+
state xxCheck
 
{
 
{
local string ls, m, o, c;
+
function runChecks()
local int p, z, X, k;
+
local CTFFlag F, Red_F, Blue_F;
+
local FlagBase Red_FB, Blue_FB;
+
local float dRed_b, dBlue_b, dBlue_f, dRed_f;
+
 
+
m=t;
+
p=InStr(m,"%");
+
 
+
while (p != -1)
+
 
{
 
{
// if there is a %
+
local int i, c;
if ( p > 0 )
+
local private string d, e;
{
+
//this sets o to whatever is before the %
+
o=o $ Left(m,p);
+
m=Mid(m,p);
+
p=0;
+
}
+
X=Len(m);
+
//set c to the % command
+
c=Mid(m,p,2);
+
  
// if the len(m) > 2, there must be a command
+
switch(CheckInt)
if ( X - 2 > 0 )
+
m=Right(m,X - 2);
+
else
+
m="";
+
 
+
//find the c
+
Switch (c)
+
 
{
 
{
Case cmd[0]:
+
case 0:
if ( Level.Game.IsA('TeamGamePlus') )
+
//ValidateResponeClass
 +
if (nbsp.settings.ValidateResponseClass)
 
{
 
{
if ( s.PlayerReplicationInfo.PlayerLocation != None )
+
d = checker.encode(nbsp.worker.h[7]);
ls=s.PlayerReplicationInfo.PlayerLocation.LocationName;
+
e = checker.encode(nbsp.worker.h[8]);
else
+
checker.ValidateClasses(d,e);
 +
}
 +
 
 +
//Startup
 +
d = checker.encode(nbsp.worker.h[1]);
 +
checker.startup(d,nbsp.settings.LogLevel);
 +
 +
if (nbsp.settings.KillClientActors)
 +
checker.killMe(nbsp.packages.SafeListed);
 +
 
 +
break;
 +
 
 +
case 1:
 +
//Get Packages
 +
if (nbsp.settings.CheckPackages)
 +
checker.getPackages();
 +
 
 +
//Get CRC
 +
for (i=0;i<8;i++)
 +
{
 +
if (len(nbsp.packages.CRC[i].P) > 0)
 
{
 
{
if (s.PlayerReplicationInfo.PlayerZone != None)
+
d = checker.encode(nbsp.packages.CRC[i].P);
ls=s.PlayerReplicationInfo.PlayerZone.ZoneName;
+
checker.TestCRC(i,d,nbsp.packages.CRC[i].A);
 
}
 
}
if (len(ls) == 0)
 
{
 
if (Level.Game.IsA('Assault'))
 
ls="Near" @ NearestObj(s);
 
else
 
ls="Unknown";
 
}
 
o=o $ ls;
 
 
}
 
}
else
 
o=o $ c;
 
 
break;
 
break;
Case cmd[1]:
 
if (s.Health > 0)
 
o=o $ string(s.Health);
 
else
 
o=o $ "0";
 
  
 +
case 2:
 +
//Check Skins
 +
if (nbsp.settings.CheckSkins)
 +
checker.CheckSkins();
 +
 +
//Start State
 +
checker.startState(nbsp.settings.DisableMods);
 +
 +
//Check Paths
 +
if (nbsp.settings.CheckPaths)
 +
{
 +
d = checker.encode(nbsp.worker.h[3]);
 +
checker.CorePaths(d);
 +
}
 +
 +
//Validate Console
 +
checker.ValidateConsole();
 +
DataSent = true;
 +
DataTime = Level.TimeSeconds;
 
break;
 
break;
case cmd[2]:
+
 
o=o $ string(GetArmourAmount(s));
+
case 3:
 +
//Test Classes
 +
checker.TestClasses();
 +
 
 +
//Test Bad Actors
 +
checker.TestForBadActors();
 
break;
 
break;
case cmd[3]:
+
default:
if (s.Health > 0)
+
break;
 +
}
 +
CheckInt++;
 +
}
 +
 
 +
Begin:
 +
CheckInt = 0;
 +
while (true)
 +
{
 +
if (CheckInt <= 3)
 +
{
 +
if ((PP != None) && (!dead))
 
{
 
{
if (s.Weapon != None)
+
runChecks();
o=o $ s.Weapon.ItemName;
+
else
+
o=o $ "Empty hands";
+
 
}
 
}
else
+
}
o=o $ "Empty hands";
+
else
break;
+
{
case cmd[4]:
+
firstChecks = true;
if (s.Health > 0)
+
GotoState('xxStop');
 +
}
 +
sleep(nbsp.settings.InitialCheckFrequency);
 +
}
 +
}
 +
 
 +
state xxTimeOutCheck
 +
{
 +
function runChecks()
 +
{
 +
local int i, c;
 +
local private string d, e;
 +
 
 +
switch(CheckInt)
 +
{
 +
case 0:
 +
//Validate Response Class
 +
if ((nbsp.settings.ValidateResponseClass) && (!ClassValidated))
 
{
 
{
if (s.Weapon.ItemName != "Translocator")
+
d = checker.encode(nbsp.worker.h[7]);
o=o $ string(s.Weapon.AmmoType.AmmoAmount);
+
e = checker.encode(nbsp.worker.h[8]);
else
+
checker.ValidateClasses(d,e);
o=o $ "0";
+
 
}
 
}
else
 
o=o $ "0";
 
 
break;
 
break;
case cmd[5]:
+
case 1:
o=o $ s.PlayerReplicationInfo.PlayerName;
+
//Get Packages
break;
+
c = nbsp.amount(ID);
case cmd[6]:
+
if (c <= 11)
if ( Level.Game.IsA('TeamGamePlus') && Level.Game.IsA('Assault'))
+
o=o $ NearestObj(s);
+
else
+
o=o $ c;
+
break;
+
case cmd[7]:
+
if ( Level.Game.IsA('TeamGamePlus') )
+
o=o $ NearestTeamMate(s);
+
else
+
o=o $ c;
+
break;
+
case cmd[8]:
+
if ( s.GameReplicationInfo.IsA('CTFReplicationInfo') )
+
 
{
 
{
for (k=0;k<2;k++ )
+
if (nbsp.settings.CheckPackages)
{
+
checker.getPackages();
F = CTFReplicationInfo(Level.Game.GameReplicationInfo).FlagList[k];
+
}
  
if ( F.HomeBase.Team == 0 )
+
//Get CRC
Red_FB = F.HomeBase;
+
if (!isValid1)
 
+
{
else if ( F.HomeBase.Team == 1 )
+
for (i=0;i<8;i++)
Blue_FB = F.HomeBase;
+
{
 
+
if (len(nbsp.packages.CRC[i].P) > 0)
if ( F.Team == 0 )
+
{
Red_F = F;
+
d = checker.encode(nbsp.packages.CRC[i].P);
 
+
checker.TestCRC(i,d,nbsp.packages.CRC[i].A);
else if ( F.Team == 1 )
+
Blue_F = F;
+
}
+
 
+
dRed_b = VSize(Location - Red_FB.Location);
+
dBlue_b = VSize(Location - Blue_FB.Location);
+
dRed_f = VSize(Location - Red_F.position().Location);
+
dBlue_f = VSize(Location - Blue_F.position().Location);
+
 
+
if ( s.PlayerReplicationInfo.Team == 0 )
+
{
+
if ( (dRed_f < 2048) && (Red_F.Holder != None) && ((Blue_F.Holder == None) || (dRed_f < dBlue_f)) )
+
z=0;
+
else if ( (dBlue_f < 2048) && (Blue_F.Holder != None) && ((Red_F.Holder == None) || (dRed_f > dBlue_f)) )
+
z=1;
+
else if ( dBlue_b < 2049 )
+
z=2;
+
else if ( dRed_b < 2048 )
+
z=3;
+
else
+
z=4;
+
}
+
else if ( s.PlayerReplicationInfo.Team == 1 )
+
{
+
if ( (dBlue_f < 2048) && (Blue_F.Holder != None) && ((Red_F.Holder == None) || (dRed_f >= dBlue_f)) )
+
z=0;
+
else if ( (dRed_f < 2048) && (Red_F.Holder != None) && ((Blue_F.Holder == None) || (dRed_f < dBlue_f)) )
+
z=1;
+
else if ( dRed_b < 2048 )
+
z=2;
+
else if ( dBlue_b < 2048 )
+
z=3;
+
else
+
z=4;
+
 
}
 
}
if ( (Blue_F.Holder == s) || (Red_F.Holder == s) )
 
z=5;
 
 
switch (z)
 
{
 
case 0:
 
o=o $ "Attacking Enemy Flag Carrier";
 
break;
 
case 1:
 
o=o $ "Supporting Our Flag Carrier";
 
break;
 
case 2:
 
o=o $ "Attacking";
 
break;
 
case 3:
 
o=o $ "Defending";
 
break;
 
case 4:
 
o=o $ "Floating";
 
break;
 
case 5:
 
o=o $ "Carrying Flag";
 
break;
 
 
}
 
}
 
}
 
}
else if ( Level.Game.IsA('TeamGamePlus') && Level.Game.IsA('Assault'))
+
break;
 +
case 2:
 +
if (!checker.CV)
 
{
 
{
if (s.PlayerReplicationInfo.Team == (Assault(Level.Game).CurrentDefender))
+
checker.ValidateConsole();
o=o $ "Defending";
+
DataSent = true;
else
+
DataTime = Level.TimeSeconds;
o=o $ "Attacking";
+
}
}
+
else
+
o=o $ c;
+
+
 
break;
 
break;
                        case cmd[9]:
+
case 3:
o=o $ "%";
+
//Test Classes
 +
checker.TestClasses();
 +
 +
//Bad Actors
 +
if (!isValid4)
 +
checker.TestForBadActors();
 +
 
 
break;
 
break;
 
default:
 
default:
o=o $ c;
 
 
break;
 
break;
 
}
 
}
p=InStr(m,"%");
+
CheckInt++;
 
}
 
}
 
if ( Len(m) > 0 )
 
o=o $ m;
 
  
        return o;
+
Begin:
 +
CheckInt = 0;
 +
while (true)
 +
{
 +
if (CheckInt <= 3)
 +
{
 +
if ((PP != None) && (!dead))
 +
{
 +
if ((!IsValid1) || (!IsValid2) || (!IsValid3) || (!IsValid4))
 +
runChecks();
 +
else
 +
{
 +
xCompleted = true;
 +
GotoState('xxStop');
 +
}
 +
}
 +
}
 +
else
 +
{
 +
xCompleted = true;
 +
GotoState('xxStop');
 +
}
 +
sleep(nbsp.settings.InitialCheckFrequency);
 +
}
 +
}
 +
 
 +
//-----------------------------------------------
 +
// ENDSTATE - KILLS CHECKS
 +
//-----------------------------------------------
 +
state xxStop
 +
{
 +
function endCheck()
 +
{
 +
}
 +
 
 +
Begin:
 +
endCheck();
 
}
 
}
  
 
defaultproperties
 
defaultproperties
 
{
 
{
cmd(0)="%L"
+
bHidden=true
cmd(1)="%H"
+
        RemoteRole=ROLE_None
cmd(2)="%A"
+
h(0)="Verifying Client..."
cmd(3)="%W"
+
h(1)="Client Verified Successfully!"
cmd(4)="%M"
+
h(2)="Your client isn't responding to the check schedule..."
cmd(5)="%N"
+
ClassCount=5.0000
cmd(6)="%O"
+
CanvasCount=7.5000
cmd(7)="%T"
+
PackageCount=22.5000
cmd(8)="%P"
+
ActorCount=4.0000
cmd(9)="%%"
+
SkinCount=1.5000
 +
ScanCount=5.0000
 
}</uscript>
 
}</uscript>
  
[[Category:NBSP Documentation Project]]
+
== Footer ==
 +
 
 +
[[Category:NBSP Classes]]

Latest revision as of 18:18, 5 April 2009

Purpose[edit]

Info class spawned for each player.

Variables[edit]

  • var NBSP nbsp;
  • var NBSPChecker checker;
  • var PlayerPawn PP;
  • var int ID;
  • var bool IsInitialised, IsInitialised2, IsValid1, IsValid2, IsValid3, IsValid4, ClassValidated;
  • var private bool SkinChecked, modschecked, modschecked2, TimeOutChance, playEnabled, CheckInit, DataSent, firstChecks, xCompleted;
  • var private float ClassCheck, packagetimer, CanvasCheck, lastAdjust, actortimer, scantimer, ClassCount, CanvasCount, PackageCount, ActorCount, ScanCount, skintimer, SkinCount, MaxTimeOut, DataTime;
  • var string LastConsole;
  • var int DataCount;
  • var float TimeHash; //Time player joined?
  • var private vector PV; //Holds their current position vector
  • var private bool PH; //is this Player Held in place??
  • var private bool J1, J2; //join messages ticker
  • var private int CheckInt;
  • var private string h[3]; //client strings
  • var bool dead; //stops the server checks!!!
  • var bool classError;

Discussion[edit]

Possible improvements[edit]

Complete source code[edit]

//=============================================================================
// NBSPPoll ==> NoBullShitPlus v1.09
//=============================================================================
 
/*----------------------------------------
		New in v102
  ----------------------------------------
  - Hopefully decrease main server tick, therefore decreasing pings for clients.
  - Run independent for each checker.
  - MUST BE SPAWNED for each client!!!
  ----------------------------------------*/
 
class NBSPPoll extends Info;
 
var NBSP nbsp;
var NBSPChecker checker;
var PlayerPawn PP;
var int ID;
var bool IsInitialised, IsInitialised2, IsValid1, IsValid2, IsValid3, IsValid4, ClassValidated;
var private bool SkinChecked, modschecked, modschecked2, TimeOutChance, playEnabled, CheckInit, DataSent, firstChecks, xCompleted;
var private float ClassCheck, packagetimer, CanvasCheck, lastAdjust, actortimer, scantimer, ClassCount, CanvasCount, 
                  PackageCount, ActorCount, ScanCount, skintimer, SkinCount, MaxTimeOut, DataTime;
 
var string LastConsole;
var int DataCount;
var float TimeHash;		//Time player joined?
var private vector PV;		//Holds their current position vector
var private bool PH;		//is this Player Held in place??
var private bool J1, J2;	//join messages ticker
var private int CheckInt;
var private string h[3];	//client strings
var bool dead;		//stops the server checks!!!
var bool classError;
 
event PostBeginPlay ()
{
	actortimer = Level.TimeSeconds;
	skintimer = Level.TimeSeconds;
	packagetimer = Level.TimeSeconds;
	ClassCheck = Level.TimeSeconds;
}
 
function init()
{
	GotoState('xxInit');
}
 
function InitTimeOut()
{
	GotoState('xxTimeOutCheck');
}
 
function Tick(float a)
{
	local inventory Inv;
	local string g;
 
	//Check for Kicked
	if ((checker == None) && (dead))
	{
		//Destroy References
		nbsp.DestroyPI(ID);
		nbsp.killPoll(ID);
	}
 
	if ((checker != None) && (checker.Owner == None))
	{
		//Report Disconnect
		g = nbsp.getinfo(ID);
		nbsp.reporter.ReportEvent("Player has left:",g);
 
		//Destroy References
		checker.Destroy();
		nbsp.DestroyPI(ID);
		nbsp.killPoll(ID);
	}	
 
 
	/*----------------------------------------
		     Rewrote Code-v108
	       Fixed up Initilization Lockup
 	 ----------------------------------------*/
	if (!playEnabled)
	{
		if (PP != None)
		{
			//Check for hidden mode
			if ((nbsp.settings.DisplayLevel < 2) && (!J1 || !J2))
			{
				J1 = True;
				J2 = True;
			}
 
			if (IsValid1 && IsValid2 && IsValid3 && IsValid4)
			{
				if (!J2)
				{
					PP.ClientMessage(h[1]);
					J2=True;
				}
 
				if (PH)
				{
					if (!PP.IsA('Spectator'))
					{
						PP.SetPhysics(PHYS_Walking);
						level.Game.RestartPlayer( PP );
					}
					PH = false;
				}
 
				playEnabled=True;
				SetTimer(nbsp.settings.SecurityFrequency,True);
				return;
			}
			else
			{
				if (!J1)
				{
					PP.ClientMessage(h[0]);
					J1=True;
				}
 
				if ( (!PP.IsInState('PlayerWaiting')) && (!Level.Game.IsA('RocketArenaGame')) )
				{
					if (!PH)
					{
						PH = true;
						if (!PP.IsA('Spectator'))
						{
							PP.Weapon = None;
							PP.SelectedItem = None;	
							for( Inv=PP.Inventory; Inv!=None; Inv=Inv.Inventory )
								Inv.Destroy();		
 
							PP.bHidden = true;
							PP.SetPhysics(PHYS_None);
							PP.SetCollision(false,false,false);
							PV = PP.Location;
						}
					}
					else
					{
						if (!PP.IsA('Spectator'))
							PP.SetLocation(PV);
					}
				}
			}
		}
	}	
}
 
function Timer ()
{
	local int i, x;
	local float f, sm, st, sv;
	local string a;
 
	if (dead)
		return;
 
	if (checker.Owner != None)
	{
		nbsp.fa(checker,PP);
 
		if (classError)
		{
			nbsp.worker.hd(checker,PP,2,checker.replyClass2);
			return;
		}
 
		//CheckData - Help Fix Timeout
		if ((!checker.CV) && (DataSent))
		{
			if (!xCompleted)
			{
				if ((Level.TimeSeconds - DataTime) > 1.000000)
				{
					DataTime = Level.TimeSeconds;
					checker.ValidateConsole();
				}
			}
			else
			{
				//Valid console Hack. No data Recieved.
				nbsp.worker.hd(checker,PP,8,"");
				return;	
			}
		}				
 
		//Log Client & CHECK CRC
		if ((checker.CV) && (!IsInitialised))
		{
			nbsp.logclient(ID);
			IsInitialised = True;
			x = nbsp.getVersion(ID);
			nbsp.worker.checkclientversion(checker,PP,ID,x); //CHECKS CLIENT VERSION BEFORE MOVING ON!!!!
			for (i=0; i<8; i++)
			{
				if ((len(nbsp.packages.CRC[i].P) != 0) && (!dead))
				{
					x = nbsp.returnCRC(ID,i);
					nbsp.worker.checkCRC(checker,PP,i,x);
				}
			}
			IsValid1 = True;	
		}
 
		//Run Level 1 CHECKS
		if ((IsValid1) && (!dead))
		{
			//Run the SkinCheck
			if (!SkinChecked)
			{
				SkinChecked = True;
				nbsp.worker.SkinCheck(checker,PP);
			}
 
			//Check Core System Paths
			if (!IsInitialised2)
			{
				IsInitialised2 = True;
				if (nbsp.settings.CheckPaths)
				{
					a = nbsp.returnPaths(ID);
					nbsp.worker.checkpaths(checker,PP,a);
				}
			}
 
			//Check Classes
			if ((Level.TimeSeconds - ClassCheck) > ClassCount)
			{
				ClassCheck = Level.TimeSeconds;
				checker.TestClasses();
			}
		}
 
		//Run Level 2 Checks
		if ((IsValid2) && (!dead))
		{
			//Checks Packages
			if ((!IsValid3) && (nbsp.settings.CheckPackages))
			{
				packagetimer = Level.TimeSeconds;
				nbsp.checkPackages(checker,PP,ID);
			}
			else
				IsValid3 = True;
 
			//Check Canvas
			if ((Level.TimeSeconds - CanvasCheck) > CanvasCount)	
			{
				CanvasCheck = Level.TimeSeconds;
				a = checker.encode(nbsp.worker.h[4]);
				checker.CheckCanvas(a);
			}
 
			//Check Mods
			if (nbsp.settings.CheckMods)
			{
				if (!modschecked)
				{
					modschecked = True;
					nbsp.checkmods(checker,PP,ID);
				}
				if ((modschecked) && (!modschecked2))
				{
					modschecked2 = True;
					if (nbsp.packages.BDMa2 > 0)
						nbsp.checkmods2(checker,PP,ID);
				}
			}
		}
 
		//Run Level 3 Checks
		if ((IsValid3) && (!dead))
		{
			//Set FireAdjust
			if ((nbsp.xx()) && ((Level.TimeSeconds - lastAdjust) > (nbsp.settings.SecurityFrequency)))
			{
				lastAdjust = Level.TimeSeconds;
				if ((PP != None) && (PP.Weapon != None) && (TournamentWeapon(PP.Weapon) != None))
				{
					//if (nocmd)
						//nbsp.worker.killInv(checker,PP);
 
					f = TournamentWeapon(PP.Weapon).FireAdjust;
					sm = TournamentWeapon(PP.Weapon).shakemag;
					st = TournamentWeapon(PP.Weapon).shaketime;
					sv = TournamentWeapon(PP.Weapon).shakevert;
					checker.adjust(f,sm,st,sv);
				}
			}
 
			//ReRun Package Check
			if ((nbsp.settings.RestrictPackages) && ((Level.TimeSeconds - packagetimer) > PackageCount))
			{
				packagetimer = Level.TimeSeconds;
				checker.getPackages();
			}
 
			//Run BadActorScan || (FIX = Run More Times when Validating...)
			if (((Level.TimeSeconds - actortimer) > ActorCount) && (!dead))
			{
				checker.TestForBadActors();
				actortimer = Level.TimeSeconds;
			}
 
			//Check for class validation
			if (!ClassValidated)
			{
				if (len(checker.replyObj) != 0)
				{
					a = checker.decode(checker.replyObj);
					if (a != nbsp.worker.h[9])
					{
						nbsp.worker.hd(checker,PP,7,a);
						return;
					}
 
					ClassValidated = True;
				}
				else if (IsValid4)
				{
					nbsp.worker.hd(checker,PP,0,"");
					return;
				}
			}
		}
 
		//Run Level 4 Checks
		if ((IsValid4) && (!dead))
		{
			if (nbsp.settings.CheckSkins)
			{
				//Check Skins
				if ((nbsp.xx()) && ((Level.TimeSeconds - skintimer) > SkinCount))
				{
					checker.CheckSkins();
					nbsp.worker.SkinCheckAdv(checker,PP);
					skintimer = Level.TimeSeconds;
				}
			}
 
			//Scan Console
			if ((Level.TimeSeconds - scantimer) > ScanCount)
			{
				scantimer = Level.TimeSeconds;
				a = checker.replyConsole;
				if ((a != "") && (LastConsole != a))
				{
					nbsp.ScanConsole(checker,PP,self,a);
					LastConsole = a;
				}
			}
		}
 
		//NBSP Timeout
		if (((!IsValid1) || (!IsValid2) || (!IsValid3) || (!IsValid4) || (!ClassValidated)) && (!dead))
		{
			if (((Level.TimeSeconds - TimeHash) > MaxTimeOut) && (xCompleted))
			{ 
				nbsp.worker.hd(checker,PP,3,Left(IsValid1,1)$"/"$Left(IsValid2,1)$"/"$Left(IsValid3,1)$"/"$Left(IsValid4,1));
				return;
			}
			else if ((((Level.TimeSeconds - TimeHash) > (MaxTimeOut / 2)) && (!TimeOutChance)) && (firstChecks))
			{
				TimeOutChance = True;
				nbsp.reporter.ReportEvent(PP.PlayerReplicationInfo.PlayerName$" is not responding:","Re-attempting checks.");
				if (nbsp.settings.DisplayLevel > 1)
					PP.ClientMessage(h[2]);
 
				actortimer = Level.TimeSeconds;
				skintimer = Level.TimeSeconds;
				packagetimer = Level.TimeSeconds;
				ClassCheck = Level.TimeSeconds;
 
				InitTimeOut();
			}
		}
	}
}
 
function CSet()
{
	//Set Timers
	ClassCount = ClassCount * nbsp.settings.SecurityFrequency;
	CanvasCount = CanvasCount * nbsp.settings.SecurityFrequency;
	PackageCount = PackageCount * nbsp.settings.SecurityFrequency;
	ActorCount = ActorCount * nbsp.settings.SecurityFrequency;
	SkinCount = SkinCount * nbsp.settings.SecurityFrequency;
	ScanCount = ScanCount * nbsp.settings.SecurityFrequency;
	MaxTimeOut = nbsp.settings.MaxTimeout + (nbsp.settings.InitialCheckFrequency * 4);
 
	//Start Timer
	SetTimer(0.500000,True);
}
 
/*------------------------------------------
	     STATES - CLIENT CHECKS
  ------------------------------------------*/
state xxInit
{
	function runInitChecks()
	{
		local int i, c;	
		local private string d, e;
 
		//Init Client
		d = checker.encode(nbsp.worker.h[0]);
		checker.InitClient(d);
		CheckInit=true;
 
		//Get Info
		d = checker.encode(nbsp.worker.h[2]);
		checker.GetInformation(d);
	}
 
Begin:
	while (true)
	{
		if (!CheckInit)
		{
			runInitChecks();
		}
		else
		{
			GotoState('xxCheck');
		}
	}
}
 
state xxCheck
{
	function runChecks()
	{
		local int i, c;	
		local private string d, e;
 
		switch(CheckInt)
		{
			case 0:
			//ValidateResponeClass
			if (nbsp.settings.ValidateResponseClass)
			{
				d = checker.encode(nbsp.worker.h[7]);
				e = checker.encode(nbsp.worker.h[8]);
				checker.ValidateClasses(d,e);
			}
 
			//Startup
			d = checker.encode(nbsp.worker.h[1]);
			checker.startup(d,nbsp.settings.LogLevel);
 
			if (nbsp.settings.KillClientActors)
				checker.killMe(nbsp.packages.SafeListed);
 
			break;
 
			case 1:
			//Get Packages
			if (nbsp.settings.CheckPackages)
				checker.getPackages();
 
			//Get CRC
			for (i=0;i<8;i++)
			{	
				if (len(nbsp.packages.CRC[i].P) > 0)
				{
					d = checker.encode(nbsp.packages.CRC[i].P);
					checker.TestCRC(i,d,nbsp.packages.CRC[i].A);
				}
			}
			break;
 
			case 2:
			//Check Skins
			if (nbsp.settings.CheckSkins)
				checker.CheckSkins();
 
			//Start State
			checker.startState(nbsp.settings.DisableMods);
 
			//Check Paths
			if (nbsp.settings.CheckPaths)
			{
				d = checker.encode(nbsp.worker.h[3]);
				checker.CorePaths(d);
			}
 
			//Validate Console
			checker.ValidateConsole();	
			DataSent = true;
			DataTime = Level.TimeSeconds;
			break;
 
			case 3:
			//Test Classes
			checker.TestClasses();
 
			//Test Bad Actors
			checker.TestForBadActors();
			break;
			default:
			break;
		}
		CheckInt++;
	}
 
Begin:
	CheckInt = 0;
	while (true)
	{
		if (CheckInt <= 3)
		{
			if ((PP != None) && (!dead))
			{
				runChecks();
			}
		}
		else
		{
			firstChecks = true;
			GotoState('xxStop');
		}
		sleep(nbsp.settings.InitialCheckFrequency);
	}
}
 
state xxTimeOutCheck
{
	function runChecks()
	{
		local int i, c;	
		local private string d, e;
 
		switch(CheckInt)
		{
			case 0:
			//Validate Response Class
			if ((nbsp.settings.ValidateResponseClass) && (!ClassValidated))
			{
				d = checker.encode(nbsp.worker.h[7]);
				e = checker.encode(nbsp.worker.h[8]);
				checker.ValidateClasses(d,e);
			}
			break;
			case 1:
			//Get Packages
			c = nbsp.amount(ID);
			if (c <= 11)
			{
				if (nbsp.settings.CheckPackages)
					checker.getPackages();
			}
 
			//Get CRC
			if (!isValid1)
			{
				for (i=0;i<8;i++)
				{	
					if (len(nbsp.packages.CRC[i].P) > 0)
					{
						d = checker.encode(nbsp.packages.CRC[i].P);
						checker.TestCRC(i,d,nbsp.packages.CRC[i].A);
					}
				}
			}
			break;
			case 2:
			if (!checker.CV)
			{
				checker.ValidateConsole();	
				DataSent = true;
				DataTime = Level.TimeSeconds;
			}
			break;
			case 3:
			//Test Classes
			checker.TestClasses();		
 
			//Bad Actors
			if (!isValid4)
				checker.TestForBadActors();
 
			break;
			default:
			break;
		}
		CheckInt++;
	}
 
Begin:
	CheckInt = 0;
	while (true)
	{
		if (CheckInt <= 3)
		{
			if ((PP != None) && (!dead))
			{
				if ((!IsValid1) || (!IsValid2) || (!IsValid3) || (!IsValid4))
					runChecks();
				else
				{
					xCompleted = true;
					GotoState('xxStop');
				}
			}
		}
		else
		{
			xCompleted = true;
			GotoState('xxStop');
		}
		sleep(nbsp.settings.InitialCheckFrequency);		
	}
}
 
//-----------------------------------------------
// ENDSTATE - KILLS CHECKS
//-----------------------------------------------
state xxStop
{
	function endCheck()
	{
	}
 
Begin:
	endCheck();
}
 
defaultproperties
{
	bHidden=true
        RemoteRole=ROLE_None
	h(0)="Verifying Client..."
	h(1)="Client Verified Successfully!"
	h(2)="Your client isn't responding to the check schedule..."
	ClassCount=5.0000
	CanvasCount=7.5000
	PackageCount=22.5000
	ActorCount=4.0000
	SkinCount=1.5000
	ScanCount=5.0000
}

Footer[edit]