Author Topic: Anticamp v1.2  (Read 5338 times)

0 Members and 1 Guest are viewing this topic.

Offline Mr

  • Inactive Soldat Developer
  • Soldier
  • ******
  • Posts: 166
Anticamp v1.2
« on: February 24, 2008, 06:53:05 am »
Script Name: Anticamp
Script Description: If someone camps .... boom
Original Author(s): Mr
Core Version: 2.6.3
Code: [Select]
If Distance(GetPlayerStat(ID,'X'),GetPlayerStat(ID,'Y'),Players[ID].PosX,Players[ID].PosY) < CHECKDIST Then Begin
writeConsole(ID, '[Anticamp] You got killed because you camped', RGB(219,59,169));
WriteLn('[Anticamp] killed player because he camped: ' + IDToName(ID));
CreateBullet(GetPlayerStat(ID, 'X'), GetPlayerStat(ID, 'Y'), 0, 0, 999999, 10, ID); // blows the camper up
DoDamage(ID, 50000); // and kills him
Players[ID].Warnings := Players[ID].Warnings + 1;
end;


Hi All, this is my second script and I think a lot of you will use it. I think it's clear how it works: If someone camps, he'll get killed.

How to use it:
Install it and have fun at watching the campers how they are blown up.

Commands:
/anticamp enable - enables the anticamp script
/anticamp disable - disables the anticamp script
/anticamp debug on/off - switches the debug mode on or off
/anticamp status - shows the status of the anticamp script

These commands can be used in game by an admin or from the admin panel. You can set the default values in the script file, but i think that isn't needed.
After 4 (or the value that you set) warnings, the player gets kicked.

YOU ARE USING THIS SCRIPT AT YOUR OWN RISK!

Have fun and please give me feedback!


You can try this script at soldat://opero.ath.cx:23073/


KNOWN BUGS:

- the script kills spectators
- if the game is paused, it blows up all
- if a command is used in the admin pannel, a error message is shown. this bug doesn't cause problems, so just ignore it
- if the script is disabled and someone unpauses the game, it gets enabled again
- at the end of a game, the game stops for ~6 seconds. in this time someone can get kicked.


VERSIONS:

1.1 (24.12.08):
- Spectator bug fixed

1.2 (25.12.08):
- Pause bug fixed
- New command: /anticamp status
« Last Edit: May 18, 2008, 06:04:14 am by Mr »

Offline Laser Guy

  • Veteran
  • *****
  • Posts: 1679
Re: Anticamp v1.0
« Reply #1 on: February 24, 2008, 07:21:23 am »
Well, Mr, it was nice talking 2 ya on the server but it keeps on killing the spectators, right :D (LightSniper here)
Text goes here...

Offline Mr

  • Inactive Soldat Developer
  • Soldier
  • ******
  • Posts: 166
Re: Anticamp v1.0
« Reply #2 on: February 24, 2008, 07:25:02 am »
yes, i'm working on an update now xD
just w8 5 minutes, i'll restart the server then and all will be fine :P
(recompile wont work on this server - dont know why but it always says error (i think not enough ram xD)

edit: FIXED  8)
« Last Edit: February 24, 2008, 07:38:50 am by Mr »

Offline Laser Guy

  • Veteran
  • *****
  • Posts: 1679
Re: Anticamp v1.1
« Reply #3 on: February 24, 2008, 07:41:18 am »
Works fine now :D
Text goes here...

Offline rhide

  • Major
  • *
  • Posts: 60
  • Coffee-addict
    • Vrastar-Hai soldat clan
Re: Anticamp v1.1
« Reply #4 on: February 24, 2008, 10:39:20 am »
What the heck.... this is soldat! not CS! Camping does NOT destroy the game - it makes it better!

Once you have found a camper he's as good as dead if you are player good enough. Imo only newbies and bad loosers complain about campers - and I dont like having scripts preventing it. There are SEVERAL anti camp tactics, such as grenades, sniper rifles, LAW, team attack etc etc - there IS NO NEED for anti camp scripts.

Dont download and use this PLEASE.
 >:(
Warning! Division by zero seriously injures yourself and the people in your surroundings.

Proud member of Vrastar-Hai:
http://www.guldheden.com/~erga050/vrastar-hai

Offline ghg

  • Camper
  • ***
  • Posts: 411
  • Village Idiot
Re: Anticamp v1.1
« Reply #5 on: February 24, 2008, 11:16:20 am »
Full team camping is the only annoyance I see. But this script still is fine for people who don't like campers on their servers.
« Last Edit: February 24, 2008, 01:44:45 pm by ghg »
-=Gradius wuz you=-

Offline Mr

  • Inactive Soldat Developer
  • Soldier
  • ******
  • Posts: 166
Re: Anticamp v1.1
« Reply #6 on: February 24, 2008, 01:01:05 pm »
If you don't like it - don't use it. But for some ones it's annoying, so i wrote a script for them. Be happy about such a script, it's a very good example for checking players places. And sry, but the onliest thing i can say to you, rihide, is stfu, because it seems that you are too stupid to see how hard coding is.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Anticamp v1.1
« Reply #7 on: February 24, 2008, 09:30:11 pm »
Look at it this way: increase/decrease of popularity, stickiness (wanting to come back to the server; there a word for that?), happiness of ppl in the server
Server owners should aim for increase in all of those

Adding this script to your server may do different things depending on the server:
If its a server with many campers, decrease in everything; except then after time, people who dislike campers will increase popularity and stick to the server
Otherwise if the server has few campers, the few campers that are in the server may leave (or learn to not camp); more camper-haters will join in, camper-haters who are already stickied to the server's happiness will go up
People who don't like to be around people who complain will increase (may cause other issues if theres another thing people complain about)
Keep in mind that if your server is extremely popular, a loss of players for an increase of happiness may be good.

Being an rs player, we never really had much of an issue relating to people complaining about campers. I can say that if you are putting this into an RS server, it will upset those who camp and decrease # of peeps in the server

This is all just theoretical though. The effect will probably by slim for some of the mentioned things.


So basically: If you are hosting a server, don't put something in it just because you want to (like if you hate campers, putting this script on your server); put it in if it will benefit your server.

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Anticamp v1.1
« Reply #8 on: February 25, 2008, 02:12:19 am »
KNOWN BUGS:

- if the game is paused, it blows up all

do a check in OnCommand, if Text contains 'pause' or something, then disable kicking temporarily. And enable again after it's typed again

Offline poopdogg

  • Camper
  • ***
  • Posts: 326
  • Graffiti 4 ever
Re: Anticamp v1.1
« Reply #9 on: February 25, 2008, 02:39:06 am »
Mr you have a good idea in making this.....(no camping :o sooo cool...in this case all will have "Dog fighting"  ;D (thats what i like most))

(Sorry if I am unintelligent, since the knowledge I have only comes from a school text book...)

Offline Mr

  • Inactive Soldat Developer
  • Soldier
  • ******
  • Posts: 166
Re: Anticamp v1.1
« Reply #10 on: February 25, 2008, 09:49:35 am »
I don't hate campers ;)
but someones don't want them, so here's a script for them. on my server, the default value for enabled is false, so ... ^^

KNOWN BUGS:

- if the game is paused, it blows up all

do a check in OnCommand, if Text contains 'pause' or something, then disable kicking temporarily. And enable again after it's typed again

y, i wanted to do it like this, and i did --> new version ;)

Offline Laser Guy

  • Veteran
  • *****
  • Posts: 1679
Re: Anticamp v1.2
« Reply #11 on: February 28, 2008, 11:03:20 am »
Huston, we have a problem. I tried restarting the server, recompiling but nothing worked...
Text goes here...

Offline Mr

  • Inactive Soldat Developer
  • Soldier
  • ******
  • Posts: 166
Re: Anticamp v1.2
« Reply #12 on: February 29, 2008, 09:25:46 am »
if i use the command ingame, it works. but if i use it from the admin pannel, i get the same error. but this error doesn't cause problems .... and i dont know how to fix it xD
so just ignore it :-P

Offline Laser Guy

  • Veteran
  • *****
  • Posts: 1679
Re: Anticamp v1.2
« Reply #13 on: February 29, 2008, 02:49:24 pm »
if i use the command ingame, it works. but if i use it from the admin pannel, i get the same error. but this error doesn't cause problems .... and i dont know how to fix it xD
so just ignore it :-P
Ok, thx :D
Text goes here...

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Anticamp v1.2
« Reply #14 on: February 29, 2008, 04:47:05 pm »
if i use the command ingame, it works. but if i use it from the admin pannel, i get the same error. but this error doesn't cause problems .... and i dont know how to fix it xD
so just ignore it :-P
check if ID <> 255 and only then execute the stuff with writeConsole(ID... in OnCommand (255 is a remote admin). Might help =P
Also, try using a case statement instead of that humongous list of ifs =F

Offline Mr

  • Inactive Soldat Developer
  • Soldier
  • ******
  • Posts: 166
Re: Anticamp v1.2
« Reply #15 on: February 29, 2008, 05:08:21 pm »
uhh, y, k xD
its logical that a error apears ^^
i will fix this later, my head seems to explode now ._.

Offline rhide

  • Major
  • *
  • Posts: 60
  • Coffee-addict
    • Vrastar-Hai soldat clan
Re: Anticamp v1.2
« Reply #16 on: February 29, 2008, 05:55:34 pm »
There are two aspects of this thread I belive. First the very interesting technical part (although it is a very simple script to write), and secondly the aspect of using it or not.
I think DorkeyDear summarises all that very well in his post:
"If you are hosting a server, don't put something in it just because you want to (like if you hate campers, putting this script on your server); put it in if it will benefit your server"
I couldnt agree more.

Use with care and precaution. You may just as well loose players because some people actually like campers!
Warning! Division by zero seriously injures yourself and the people in your surroundings.

Proud member of Vrastar-Hai:
http://www.guldheden.com/~erga050/vrastar-hai

Offline Laser Guy

  • Veteran
  • *****
  • Posts: 1679
Re: Anticamp v1.2
« Reply #17 on: March 01, 2008, 04:38:10 am »
Another known bug I found. I changes the checking time from 10 to 5 seconds, so u can't stay in one place for more than 5 seconds. Problem is that at the end of game when it feezes and the score table appears, anticamp still is working and killing people... Shouldn't be much of a problem since every new game the ban points reset but if someone got 3/4 banpoints and the end of game comes... WHOOPS, he gets banned.
Text goes here...

Offline Mr

  • Inactive Soldat Developer
  • Soldier
  • ******
  • Posts: 166
Re: Anticamp v1.2
« Reply #18 on: March 01, 2008, 06:46:54 am »
y, thats true (laser guy and rhide ^^)

and i found another bug in my script: if the script is disabled and you unpause the game, it's enabled again. i'll fix this 2 bugs today (hmm .... maybe i check the gametime?) and upload the new script.

Offline Laser Guy

  • Veteran
  • *****
  • Posts: 1679
Re: Anticamp v1.2
« Reply #19 on: March 05, 2008, 01:12:08 pm »
Whoops, another one. If you happen to step on a polybug and get extra speed or just stop, anticamp counts it as camping... dunno y.

Date Posted: March 01, 2008, 10:14:11 am
Update?
Text goes here...