*E@BVSSXFG{:HjlBNone SetValue SetHelpTextSetTextAntiCamperClientWindow GetValue SetRange anticamperCore UpdateListUWindowClientMessageSystemSetHelpmonkeyCheckForCamperTickCreated ModifyPlayerPlayerPositionsCreateControl CampRadiusAntiCamperModMenuItemAntiCamperConfigWindowNotify MenuCaption MenuHelpExecute CampTime BeginPlay PreBeginPlayPostBeginPlay CampDamage PlayDeathHitFatnessspeedmentals_mutatorsDiedUMenuCloseEngineSetNumericOnlybHiddenFC bIsPlayerClassES DeltaTimei ScriptText PlayerName bIsSpectatorStaticSaveConfig nextPawnOwner PawnList NextMutator PawnLinkUPName PlayerID NextState GroundSpeed LocationHealthStructOtherFloatPropertyActorLevel TextBufferMsg NamePropertyPackage IntPropertyObject FunctionUWindowPulldownMenuItemUWindowSmallCloseButtonUWindowSmallButtonUWindowDialogClientWindowUWindowFramedWindowUWindowRootWindowUWindowDialogControlUWindowWindowUWindowPulldownMenuSetSize CreateWindow WindowTitle HelpTextAlign ParentWindow NotifyWindowWinLeft EditBoxWidth WinHeight WinWidthWinTopRoot CancelButton CloseButtonMutatorDVector LevelInfoPlayerReplicationInfo CHSpectatorObjectPropertyPawnUMenuRootWindowUMenuStatusBarUMenuModMenuItem Initialized StatusBar MenuItemBotpackStructProperty PlayerPawn BytePropertyVector BoolProperty StrProperty ClientClass PlayerLocPPUPDcTimebCheckClassPropertycheckit bSizable VDistanceiSpeeddef minSpeedUWindowEditControlSlider SpreadBoxiTopSvalUWindowHSliderControl) @ @A3: s=$:egggg=$:eqUmggg{#Uggg{#Ugggg Ʉgggggg Ʉgggggg ɝqUmgggg{#Ugg{#Ug{#Ugg Yne Yne Yne Yne Yne( ;>L Yne~|[$t s|[$t s|[$t s|[$t s|[$t s s.'limim{O)imim{Ottt|[$|[$|[$|[$|[$tt|[$|[$|[$|[$|[$ttt|[$|[$|[$|[$|[$tt|[$|[$|[$|[$|[$tt|[$|[$|[$|[$|[$tt7XØ7XØ7XÜВВ $""d """#" %$!@@@@@ @@"&,#'-=(*.@@@ <4218%Mo o   70 N^%d, 666#% xw *a -w   - -6 6 6    %, 6%, 666J, 666-0?,?,%\, 666666 6b (`w*  5&X\C4C?,?,  :7Configure AntiCamper -( 2+ %*6+6.)*#)?&w*-6+M#w*-f%!*! A#!#%*!# %pCamper! Your health was reduced by S.   '::,:#,$1=#?:??,d?%ppCamper! Your Fatness is now U, percent above normal..   'D#??$D???' #<!D?u?!?$?$?!???,d#?%ppCamper! Your Speed is now U, percent below normal..   ' ?/>M/K? - - ' '- ( K//============================================================================= // AntiCamper v1.05 by Patrick Freeman // - punishes camping //============================================================================= class AntiCamperModMenuItem expands UMenuModMenuItem; function Execute() { MenuItem.Owner.Root.CreateWindow(class'AntiCamperConfigWindow',10,10,150,100); } 8B29=ͷ;aGնmo &  ] &AntiCamper]Settings for AntiCamper ,,-&,?%%Q%%c%% %; ,% &, .  A?%C? . 4C?%AA $ )' pA j%CampTime:%RIf you stand in 'CampRadius' this many seconds you are considered camping.%@pA&,% pA % ?%RIf you stand in 'CampRadius' this many seconds you are considered camping.% S&CampRadius:&EThe size of the area that, if you stay in it, you're camping.&AHC,0,& HCG& ?&A&EThe size of the area that, if you stay in it, you're camping.& S,CampDamage:,FThe amount of health to take off a player for each 'CampTime'.,HB,y,2, HB, ?,FThe amount of health to take off a player for each 'CampTime'., S,Fatness:,EThe amount of fatness to add to a player for each 'CampTime'.,HB, ,2, HB, ?,EThe amount of fatness to add to a player for each 'CampTime'., S,Speed:,VThe percentage of normal speed to take away from a player for each 'CampTime'.,A,,, A, ?,VThe percentage of normal speed to take away from a player for each 'CampTime'., S. BC@BA Save1Save these settings and close this window". CC@BA"Cancel"5Close this window without saving any changes. BY//============================================================================= // AntiCamper v1.05 by Patrick Freeman // - punishes camping //============================================================================= class AntiCamperClientWindow expands UWindowDialogClientWindow config(mentals_mutators); //var UWindowCheckBox Checkbox; var UWindowHSliderControl Slider[5]; var UWindowSmallButton CloseButton; var UWindowSmallCloseButton CancelButton; var UWindowEditControl SpreadBox[5]; var() config int CampTime; var() config int CampRadius; var() config int CampDamage; var() config int Fatness; var() config int Speed; function Created() { local int i; local int iTop; local string s; Super.Created(); if (CampTime < 2) CampTime = 2; if (CampRadius < 1) CampRadius = 20; if (CampDamage < 0) CampDamage = 0; if (Fatness < 0) Fatness = 0; if (Speed < 0) Speed = 0; // Slider for gaps for ( i=0 ;i<5; i++ ) { iTop = (i+1)*20; Slider[i] = UWindowHSliderControl(CreateControl(class'UWindowHSliderControl', 10, iTop, 150, 1)); SpreadBox[i] = UWindowEditControl(CreateWindow(class'UWindowEditControl', 180, iTop, 30, 16)); SpreadBox[i].Align = TA_Center; SpreadBox[i].SetNumericOnly(true); SpreadBox[i].EditBoxWidth = 15; } //CampTime Slider[0].SetText("CampTime:"); Slider[0].SetHelpText("If you stand in 'CampRadius' this many seconds you are considered camping."); Slider[0].SetRange(2,15,1); if (CampTime > 15) Slider[0].SetValue(15); else Slider[0].SetValue(CampTime); SpreadBox[0].SetHelpText("If you stand in 'CampRadius' this many seconds you are considered camping."); SpreadBox[0].SetValue(string(CampTime)); //CampRadius Slider[1].SetText("CampRadius:"); Slider[1].SetHelpText("The size of the area that, if you stay in it, you're camping."); Slider[1].SetRange(20,200,20); if (CampRadius > 200) Slider[1].SetValue(200); else Slider[1].SetValue(CampRadius); SpreadBox[1].EditBoxWidth = 20; SpreadBox[1].SetHelpText("The size of the area that, if you stay in it, you're camping."); SpreadBox[1].SetValue(string(CampRadius)); //CampDamage Slider[2].SetText("CampDamage:"); Slider[2].SetHelpText("The amount of health to take off a player for each 'CampTime'."); Slider[2].SetRange(0,50,5); if (CampDamage > 50) Slider[2].SetValue(50); else Slider[2].SetValue(CampDamage); SpreadBox[2].SetHelpText("The amount of health to take off a player for each 'CampTime'."); SpreadBox[2].SetValue(string(CampDamage)); //Fatness Slider[3].SetText("Fatness:"); Slider[3].SetHelpText("The amount of fatness to add to a player for each 'CampTime'."); Slider[3].SetRange(0,50,10); if (Fatness > 50) Slider[3].SetValue(50); else Slider[3].SetValue(Fatness); SpreadBox[3].SetHelpText("The amount of fatness to add to a player for each 'CampTime'."); SpreadBox[3].SetValue(string(Fatness)); //Speed Slider[4].SetText("Speed:"); Slider[4].SetHelpText("The percentage of normal speed to take away from a player for each 'CampTime'."); Slider[4].SetRange(0,30,5); if (Speed > 30) Slider[4].SetValue(30); else Slider[4].SetValue(Speed); SpreadBox[4].SetHelpText("The percentage of normal speed to take away from a player for each 'CampTime'."); SpreadBox[4].SetValue(string(Speed)); // Update button CloseButton = UWindowSmallButton(CreateWindow(class'UWindowSmallButton', 94 , 130, 48, 16)); CloseButton.SetText("Save"); CloseButton.SetHelpText("Save these settings and close this window"); CloseButton.NotifyWindow = Self; // Doesn't seem to work otherwise. // Cancel button CancelButton = UWindowSmallCloseButton(CreateWindow(class'UWindowSmallCloseButton', 152, 130, 48, 16)); CancelButton.SetText("Cancel"); CancelButton.SetHelpText("Close this window without saving any changes."); } function Notify(UWindowDialogControl C, byte E) { local int Sval; Super.Notify( C, E ); switch(E) { case DE_Change: // The message sent by sliders and checkboxes switch(C) { case slider[0]: Sval = Slider[0].GetValue(); SpreadBox[0].SetValue(string(Sval)); CampTime = Sval; class'AntiCamper'.static.StaticSaveConfig(); break; case slider[1]: Sval = Slider[1].GetValue(); SpreadBox[1].SetValue(string(Sval)); CampRadius = Sval; class'AntiCamper'.static.StaticSaveConfig(); break; case slider[2]: Sval = Slider[2].GetValue(); SpreadBox[2].SetValue(string(Sval)); CampDamage = Sval; class'AntiCamper'.static.StaticSaveConfig(); break; case slider[3]: Sval = Slider[3].GetValue(); SpreadBox[3].SetValue(string(Sval)); Fatness = Sval; class'AntiCamper'.static.StaticSaveConfig(); break; case slider[4]: Sval = Slider[4].GetValue(); SpreadBox[4].SetValue(string(Sval)); Speed = Sval; class'AntiCamper'.static.StaticSaveConfig(); break; } case DE_Click: // The message sent by buttons switch(C) { case CloseButton: class'AntiCamper.AntiCamper'.static.StaticSaveConfig(); SaveConfig(); ParentWindow.Close(); break; } case DE_MouseMove: if(UMenuRootWindow(Root) != None) if(UMenuRootWindow(Root).StatusBar != None) UMenuRootWindow(Root).StatusBar.SetHelp(C.HelpText); break; case DE_MouseLeave: if(UMenuRootWindow(Root) != None) if(UMenuRootWindow(Root).StatusBar != None) UMenuRootWindow(Root).StatusBar.SetHelp(""); break; } } l //============================================================================= // AntiCamper v1.05 by Patrick Freeman // - punishes camping //============================================================================= class AntiCamperConfigWindow expands UWindowFramedWindow; function BeginPlay() { Super.BeginPlay(); // Set the title of the Framed Window WindowTitle = "Configure AntiCamper"; // The class of the Windows content ClientClass = class'AntiCamperClientWindow'; bSizable = false; } function Created() { Super.Created(); SetSize(220, 180); WinLeft = (Root.WinWidth - WinWidth) / 2; WinTop = (Root.WinHeight - WinHeight) / 2; } @:,, $ y%D%% S  &D&& S  (,D,, S  ,D,, S  ,D,, S  $  b' t$qw.*qw.*.  $ w.*w.*.   @5f &  # '    j -( -('- (u! % , 6 6 6 #6 6 6 # 4 R]//============================================================================= // AntiCamper v1.05 by Patrick Freeman // - punishes camping //============================================================================= class AntiCamper expands Mutator; var int CampTime; var int CampRadius; var int CampDamage; var int Fatness; var int Speed; var bool Initialized; struct PlayerPositions { var int PlayerID; var string PlayerName; var vector PlayerLoc; }; var PlayerPositions PP[32], UPD[32]; var float cTime; var bool bCheck; event PreBeginPlay() { local int i; if (Initialized) return; Initialized = True; bCheck = False; cTime = 0.0; Enable('Tick'); for (i=0; i<32; i++) { PP[i].PlayerID = -1; PP[i].PlayerName = ""; PP[i].PlayerLoc = vect(0, 0, 0); UPD[i].PlayerID = -1; UPD[i].PlayerName = ""; UPD[i].PlayerLoc = vect(0, 0, 0); } } function PostBeginPlay() { CampTime = class'AntiCamperClientWindow'.Default.CampTime; CampRadius = class'AntiCamperClientWindow'.Default.CampRadius; CampDamage = class'AntiCamperClientWindow'.Default.CampDamage; Fatness = class'AntiCamperClientWindow'.Default.Fatness; Speed = class'AntiCamperClientWindow'.Default.Speed; } function Tick(float DeltaTime) { cTime += DeltaTime; if (cTime > CampTime && !bCheck) { bCheck = True; UpdateList(True); bCheck = False; cTime = 0.0; } } function UpdateList(bool checkit) { local Pawn PawnLink; local int i, u; // cleanup the UPD list for (i=0; i<32; i++) { UPD[i].PlayerID = -1; UPD[i].PlayerName = ""; UPD[i].PlayerLoc = vect(0, 0, 0); } // add ALL Players to the UPD list i = 0; for ( PawnLink=Level.PawnList; PawnLink!=None; PawnLink=PawnLink.nextPawn ) { if ( ( PawnLink.bIsPlayer && PawnLink.class != class'CHSpectator' ) && ( !PawnLink.PlayerReplicationInfo.bIsSpectator ) && ( !PawnLink.bHidden ) ) { UPD[i].PlayerID = PawnLink.PlayerReplicationInfo.PlayerID; UPD[i].PlayerName = PawnLink.PlayerReplicationInfo.PlayerName; UPD[i].PlayerLoc = PawnLink.Location; i++; } } // check the PP list for the UPD-Players for (u=0; u<32 && UPD[u].PlayerID != -1; u++) { for (i=0; i<32 && PP[i].PlayerID != -1; i++) { if (PP[i].PlayerID == UPD[u].PlayerID) break; } // if the player is not found insert it if (i < 32 && PP[i].PlayerID == -1) { PP[i] = UPD[u]; } // or if it is found update it and check for camping else if (PP[i].PlayerID == UPD[u].PlayerID) { if (checkit) { CheckForCamper(PP[i], UPD[u]); } else { if (cTime > CampTime/2) cTime = CampTime/2; } PP[i] = UPD[u]; } } // clean up the PP-List removing all players not existing anymore... // just copy the complete UPD list ;) for (i=0; i<32; i++) { PP[i].PlayerID = UPD[i].PlayerID; PP[i].PlayerName = UPD[i].PlayerName; PP[i].PlayerLoc = UPD[i].PlayerLoc; } } function CheckForCamper(PlayerPositions PP, PlayerPositions UPD) { local Pawn PawnLink; local float VDistance; local Vector DVector; local float f; local int iSpeed; local int def; local int minSpeed; local string pName; local string msg; DVector = PP.PlayerLoc - UPD.PlayerLoc; VDistance = VSize(DVector); if (VDistance < CampRadius) { for ( PawnLink=Level.PawnList; PawnLink!=None; PawnLink=PawnLink.nextPawn ) { if ( PawnLink.bIsPlayer ) { if (PawnLink.PlayerReplicationInfo.PlayerID == PP.PlayerID) break; } } if (PawnLink != None) { //if (PawnLink.IsA('Bot')) //return; PawnLink.Health -= CampDamage; pName = PawnLink.PlayerReplicationInfo.PlayerName; // from TakeDamage() if (PawnLink.Health <= 0) { PawnLink.NextState = ''; PawnLink.PlayDeathHit(10, vect(0,0,0), 'monkey', vect(0,0,0)); PawnLink.Died(None, 'monkey', vect(0,0,0)); return; } if (CampDamage > 0) { msg = "Camper! Your health was reduced by "$CampDamage; PlayerPawn(PawnLink).ClientMessage(msg, , true); } def = PawnLink.Default.Fatness; if (PawnLink.Fatness < 240) { if (PawnLink.Fatness + Fatness >= 240) PawnLink.Fatness = 240; else PawnLink.Fatness += Fatness; f = ((PawnLink.Fatness - def)/def) * 100; if (f > 0) { //$PawnLink.Fatness$", def="$def msg = "Camper! Your Fatness is now "$left(string(f),2)$" percent above normal."; //log("AntiCamper-"$pName$" fatness="$PawnLink.Fatness); PlayerPawn(PawnLink).ClientMessage(msg, , true); } } def = PawnLink.Default.GroundSpeed; //log("defspeed="$def); if (PawnLink.GroundSpeed > (0.50 * def)) { minSpeed = 0.50 * def; f = Speed * 0.01; iSpeed = f * def; //log("f="$f$", campspeed="$speed$", minSpeed="$minSpeed$", iSpeed="$iSpeed); if ((PawnLink.GroundSpeed - iSpeed) <= minSpeed) PawnLink.GroundSpeed = minSpeed; else PawnLink.GroundSpeed -= iSpeed; //log("AntiCamper-"$pName$" speed="$PawnLink.GroundSpeed); f = ((def - PawnLink.GroundSpeed)/def) * 100; if (f > 0) { msg = "Camper! Your Speed is now "$ left(string(f),2) $" percent below normal."; //log("AntiCamper-"$pName$" speed="$PawnLink.GroundSpeed); PlayerPawn(PawnLink).ClientMessage(msg, , true); } } } } } function ModifyPlayer(Pawn Other) { //local PlayerReplicationInfo PRI; UpdateList(False); //PRI = Other.PlayerReplicationInfo; //log("player "$PRI.PlayerName$" fatness="$Other.Fatness$", default="$Other.Default.Fatness); Other.Fatness = Other.Default.Fatness; Other.GroundSpeed = Other.Default.GroundSpeed; if ( NextMutator != None ) NextMutator.ModifyPlayer(Other); }  5< 1 A ACB K K(K.m.M.V.HK&.L...F.n.M.N.jld.lw"E@.S.gN6.u.Q.v.Ulj.P.iNY.z.E.plr.H.R.T.yl7l:z4l9LB.oEbEaL>lGE`.Oy-NCxNNNE_l].WEcN.Cy*Ny5w\l^z[yCA.NXzZl8A{NuA.wJ?NlsNKt.k I \#22 i#6; u# J B$ ~ O$>L \$> h$ } t$N A%N O.2; ]::2 j:@2 v:6F B;2< N;6+ Z;| f;  s; " ;  K<  W< # c<  o<4 {<6I G= f S=3D `= m=  =>, K>  X> @ d>6E p> e |> " I?6G U?:K a?  m? # y? q E@6D Q@6h ]@6} j@>/ w@6= DA6~ PA71 ]A2B iAguA b\C U~K1TSM1DgN x kO Kc[934Vn\^Dc zbe 34MY\134w i:0 ` al TM fa 34]]G9Id