*E@<AU>6ϔBM«Ơ<None SetValue SetHelpTextAntiCamper-AH2SetTextCoreAntiCamperClientWindow UpdateListUWindowSystemCreatedClientMessage GetValueSetHelp ModifyPlayerTick SetRangeCheckForCamper CampTimeUMenuExecuteSetNumericOnly MenuHelpCreateControl MenuCaptionEngineAntiCamperModMenuItemNotifyAntiCamperConfigWindow AntiCamper BeginPlay PreBeginPlayPostBeginPlay CampRadiusBotPlayerPositionsClose AntiCampAHCbHiddeniF ScriptText bIsPlayer LocationDamageScaling DeltaTimeOtherMsgbTyping PlayerName bIsSpectator nextPawnOwner PawnList NextMutator PawnLinkUPName PlayerIDSStaticSaveConfigMutator LevelInfoPlayerReplicationInfoLevelActorPawn PlayerPawn ClientClassPlayerConsole bSizableClassUWindowEditControlUWindowHSliderControlUWindowPulldownMenuItemUWindowSmallCloseButtonUWindowSmallButtonUWindowDialogClientWindowUWindowFramedWindowUWindowRootWindowUWindowDialogControlUWindowWindowUWindowPulldownMenuSetSize CreateWindow WindowTitle HelpTextAlign ParentWindow NotifyWindowWinLeft EditBoxWidth WinHeight WinWidthWinTopRoot CancelButton CloseButtonPackageDVector TextBufferObject CHSpectator FunctionVectorUMenuRootWindowUMenuStatusBarUMenuModMenuItem Initialized StatusBar MenuItemBotpackStruct StrPropertyStructPropertyClassPropertyObjectPropertyFloatProperty BoolProperty PlayerLocPPUPDcTimebCheck IntPropertycheckit ByteProperty VDistanceiSpeeddef minSpeedESlider SpreadBoxiTopSval ! @ @@ @ @2*/a•=$:ettt=$:ettt{#Utt> YR@GI&/tt> Yttt{#Uttttt> Ytttt{#Utt{#Ut{#Utte{e{ 68+e{~|[$ta‡|[$taa….'limim{O)imim{Ottt|[$|[$|[$|[$|[$tt|[$|[$|[$|[$|[$ttt7XÖ7XÖ7XÛВВ%"!"<"@ #7#@0@3-2$43ΔMo o  (@';W6-(Uw*  .&7?M&K? --''-( ): %X\C4C?,?, / 1*      > - -'-(u! % , 6 6 6  #6 6 6  # 4 ,+%G=^%d, 666 #%xw*a-w --666   % , 6 %, 666 J, 6 66 -% ?,?,  %\, 66666 6  XF//============================================================================= // AntiCamper-AH by AuKI & HaY-WiRe // - When camping weapons inflict 0 damage //============================================================================= class AntiCamper expands Mutator; var int CampTime; var int CampRadius; 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; } 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; if (!PlayerPawn(PawnLink).Player.Console.bTyping) { if (PawnLink.DamageScaling != 0.0) { PawnLink.DamageScaling = 0.0; msg = "**Camping Detected** Your Damage is now set to 0"; PlayerPawn(PawnLink).ClientMessage(msg, , true); } } } } else { for ( PawnLink=Level.PawnList; PawnLink!=None; PawnLink=PawnLink.nextPawn ) { if ( PawnLink.bIsPlayer ) { if (PawnLink.PlayerReplicationInfo.PlayerID == PP.PlayerID) break; } } if (PawnLink.DamageScaling != PawnLink.default.DamageScaling) { PawnLink.DamageScaling = PawnLink.default.DamageScaling; msg = "**Camping has ceased** Your Damage is now set back to normal"; PlayerPawn(PawnLink).ClientMessage(msg, , true); } } } function ModifyPlayer(Pawn Other) { if (Other.bIsPlayer) { UpdateList(False); Other.DamageScaling = Other.default.DamageScaling; } if ( NextMutator != None ) NextMutator.ModifyPlayer(Other); } k //=========================================================================================== // *** AntiCamper Mutator *** //=========================================================================================== class AntiCamperConfigWindow expands UWindowFramedWindow; function BeginPlay() { Super.BeginPlay(); // Set the title of the Framed Window WindowTitle = "Configure AntiCamper-AH"; // 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; }  &,, & , % , &, .  A?C? . 4C?AA $ ' pA 3%CampTime:%RIf you stand in 'CampRadius' this many seconds you are considered camping.%@@A,,% A% ?%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, ,& HC& ? &A&EThe size of the area that, if you stay in it, you're camping.& S . BC@BA Save1Save these settings and close this window. CC@BACancel5Close this window without saving any changes. 9<25uєϴ;aGնmo  M&AntiCamper-AH]Settings for AntiCamper-AHN9//=========================================================================================== // *** AntiCamper Mutator *** //=========================================================================================== class AntiCamperClientWindow expands UWindowDialogClientWindow config(AntiCampAH); //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; function Created() { local int i; local int iTop; local string s; Super.Created(); if (CampTime < 1) CampTime = 3; if (CampRadius < 1) CampRadius = 20; // Slider for gaps for ( i=0 ;i<2; 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(3,30,3); if (CampTime > 30) Slider[0].SetValue(30); 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)); // 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 DE_Click: // The message sent by buttons switch(C) { case CloseButton: class'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; } } @4U$ "" $ y%D% % S  &D& & S   $  b$  i$fw.*fw.*.  $ w.*w.*.   F//=========================================================================================== // *** AntiCamper Mutator *** //=========================================================================================== class AntiCamperModMenuItem expands UMenuModMenuItem; function Execute() { MenuItem.Owner.Root.CreateWindow(class'AntiCamperConfigWindow',10,10,150,100); }  6:Configure AntiCamper-AH -( 1 6 6 #!x!? w*-6Muw*a/!" u.-u**Camping Detected** Your Damage is now set to 0.   'w*-6**Camping has ceased** Your Damage is now set back to normal.   '  0< $ A ACB dddICISdIKIJIkI~IiIgI@vaIIIvw-IBIDIPI>INItI?IRv@IMImx+IsIwiVIOvoIfv6i=IQvA~;Ixv4IFi Ili w_w^iiv7ILIGrjw]w`ITw\vZiiiUiv5x3vGx'@Yv[sXxHvFi sWs2uEt,uIIrI@x1vpidqIh1( ^";8 j"{ w"; D#F P#z ]#18 j#G w#/( D$4( P$19 \$y h$! u$ A%8I M%2 Y%je%| O-c [-Rh-8& z4*/ G5;0 T5 `5} l5#x5b J64H W6;z c6n p6;e |6! I7;A U78E a7;{ n7g{71 b9+. n9;D z9;: F:;C R:O^:Km;;B x<$ SD= 2W>eI?;) nAdzA*4cF^J$*4v A twbk*4Y9M4< fyr5*4Qk$G|[C5I^