Jump to content

BF4 Proconrulz - Feature for server admins - who started my server? (working code)


ImportBot

Recommended Posts

Originally Posted by maxdralle*:

 

hi guys

here is a working code for server admins. this code makes a ranking list of the players that have "started" the server (joined on the empty server and played the first round). the players get points for each "server start". you can check the stats with commands at any time.

 

for exemple: your server is empty. the round is not started because no player is on your server. a few hours later your server is running with many players. with this code and the command !server you can see the playernames that have "started" the server (the first 8 players). this is a nice feature for admins and clans.

 

 

HOW TO USE:

it detect automatically when the first server round is starting (every time until 8 players). in this case the current playernames will be stored externally with a ranking score (1 point for each "server start"). you can check the stats (player points) with commands at any time.

 

 

COMMANDS:

!server - shows the playernames that have "started" the server

!points - shows the ranking score (points) from current player

!points - shows the ranking score (points) from target player

!resetplayerpoints - clean/reset all points form all players (only for admins)

 

 

CODE FOR PROCONRULZ - part 1

Code:

####       SERVER FIRST ROUND PLAYER COUNTER   -   Part 1   -   by maxdralle        #######################################################
# This code makes a ranking list of the players that have "started" the server (joined on the empty server and played the first round). they get points for each "server start"
# COMMANDS: !server, !points, !points <playername>, !resetplayerpoints (only for admins)

On Kill; if %score% > 1; if %ts1% + %ts2% < 8; PlayerFirst; if %server_global_53[%reasytosetpoints%]% <> 1; if %server_global_53[%reasytosetpoints%]% <> 2; Set %server_global_53[%reasytosetpoints%]% 1;Log SERVER FIRST ROUND COUNTER: Round started until 8 players. Ready to set VIP points...
On Kill; if %score% > 1;if %ts1% + %ts2% > 8;PlayerFirst; if %server_global_53[%reasytosetpoints%]% <> 1; if %server_global_53[%reasytosetpoints%]% <> 2; Set %server_global_53[%reasytosetpoints%]% 2
On Spawn; if %server_global_53[%reasytosetpoints%]% == 1; if %tmpRankReg% <> 1; 
    if %server_global_58[%tmproundstarted%]% <> 1; Set %ini_firstroundcounter% 0; Set %ini_firstroundcounter_datetime% %ymd%__%hms%; Set %server_global_58[%tmproundstarted%]% 1
    if %tmpRankReg% <> 1;if %ini_firstroundcounter_player1% == 0; Set %tmpRankReg% 1 ;Set %ini_firstroundcounter_player1% %p%;Set %ini_ranking_%p%% 1+ %ini_ranking_%p%%; PlayerSay %p% thank you for playing the first round! (VIP points: %tmpVIPScore%/10)
    if %tmpRankReg% <> 1;if %ini_firstroundcounter_player2% == 0; Set %tmpRankReg% 1 ;Set %ini_firstroundcounter_player2% %p%;Set %ini_ranking_%p%% 1+ %ini_ranking_%p%%; PlayerSay %p% thank you for playing the first round! (VIP points: %tmpVIPScore%/10)
    if %tmpRankReg% <> 1;if %ini_firstroundcounter_player3% == 0; Set %tmpRankReg% 1 ;Set %ini_firstroundcounter_player3% %p%;Set %ini_ranking_%p%% 1+ %ini_ranking_%p%%; PlayerSay %p% thank you for playing the first round! (VIP points: %tmpVIPScore%/10)
    if %tmpRankReg% <> 1;if %ini_firstroundcounter_player4% == 0; Set %tmpRankReg% 1 ;Set %ini_firstroundcounter_player4% %p%;Set %ini_ranking_%p%% 1+ %ini_ranking_%p%%; PlayerSay %p% thank you for playing the first round! (VIP points: %tmpVIPScore%/10)
    if %tmpRankReg% <> 1;if %ini_firstroundcounter_player5% == 0; Set %tmpRankReg% 1 ;Set %ini_firstroundcounter_player5% %p%;Set %ini_ranking_%p%% 1+ %ini_ranking_%p%%; PlayerSay %p% thank you for playing the first round! (VIP points: %tmpVIPScore%/10)
    if %tmpRankReg% <> 1;if %ini_firstroundcounter_player6% == 0; Set %tmpRankReg% 1 ;Set %ini_firstroundcounter_player6% %p%;Set %ini_ranking_%p%% 1+ %ini_ranking_%p%%; PlayerSay %p% thank you for playing the first round! (VIP points: %tmpVIPScore%/10)
    if %tmpRankReg% <> 1;if %ini_firstroundcounter_player7% == 0; Set %tmpRankReg% 1 ;Set %ini_firstroundcounter_player7% %p%;Set %ini_ranking_%p%% 1+ %ini_ranking_%p%%; PlayerSay %p% thank you for playing the first round! (VIP points: %tmpVIPScore%/10)
    if %tmpRankReg% <> 1;if %ini_firstroundcounter_player8% == 0; Set %tmpRankReg% 1 ;Set %ini_firstroundcounter_player8% %p%;Set %ini_ranking_%p%% 1+ %ini_ranking_%p%%; PlayerSay %p% thank you for playing the first round! (VIP points: %tmpVIPScore%/10)
    if %ini_firstroundcounter_player8% <> 0; Set %server_global_53[%reasytosetpoints%]% 2; Log SERVER FIRST ROUND: Set VIP points: %ini_firstroundcounter_player1%, %ini_firstroundcounter_player2%, %ini_firstroundcounter_player3%, %ini_firstroundcounter_player4%, %ini_firstroundcounter_player5%, %ini_firstroundcounter_player6%, %ini_firstroundcounter_player7%, %ini_firstroundcounter_player8%

# IN GAME COMMANDS - !server, !points, !points <playername>
On Say; Text !server; PlayerSay SERVER FIRST ROUND: %ini_firstroundcounter_datetime%; PlayerSay WITH PLAYERS: %ini_firstroundcounter_player1%, %ini_firstroundcounter_player2%; PlayerSay %ini_firstroundcounter_player3%, %ini_firstroundcounter_player4%, %ini_firstroundcounter_player5%; PlayerSay %ini_firstroundcounter_player6%, %ini_firstroundcounter_player7%, %ini_firstroundcounter_player8%; Set %tmpplayer% none; Set %tmpplayer% %targettext%
On Say; Text !point;
    if %part2active% == 0; Set %part2active% ""
    if %targettext% == 0; PlayerSay FIRST ROUND COUNTER: You have %ini_ranking_%p%% vip points %part2active%
    if %targettext% <> 0; if %ini_ranking_%targettext%% <> 0; PlayerSay FIRST ROUND COUNTER: %targettext% have %ini_ranking_%targettext%% vip points
    if %targettext% <> 0; if %ini_ranking_%targettext%% == 0; PlayerSay FIRST ROUND COUNTER: Player %targettext% not found. Type !points <playername> 

#CLEAN/RESET DB WITH POINTS FROM ALL PLAYERS - admin only command: !resetplayerpoints
On Say; Admin; Text !resetplayerpoints; Set %ini_firstroundcounter% 0; Set %ini_ranking% 0; PlayerSay FIRST ROUND COUNTER: Player database with all points are reseted; Log ^1^bFIRST ROUND COUNTER:^0^n Player database with all points are reseted by %p% (admin)
EXTRA FEATURE

and here is a optional extra feature. i call it part 2. this optional part 2 gives players with min. 10 vip points the power to use the command !lead to take squad leader position. its a little gift :biggrin:

if you want this optional feature, then put this code (part 2) under the code form part 1.

 

 

COMMANDS:

!lead - take squad leader position (only for players with min. 10 points, admins, players from custom list)

 

 

CODE FOR PROCONRULZ - part 2 (optional)

Code:

####       SERVER FIRST ROUND PLAYER COUNTER   -   Part 2 (optional)  -   by maxdralle        #######################################################
# This optional part 2 gives players with min. 10 vip points the power to use the command !lead to take squad leader position. its a little gift ;-)
# Part 2 is optional. if you want this optional feature, then put this code (part 2) under the code form part 1.
# COMMAND: !lead  -  (only for players with min. 10 points, admins, players from custom list)

# SETTINGS:
On Spawn; PlayerFirst;
    Set %pointsneeded% 10
    Admin; Set %vipadmin% 1
    Set %CustomListForLead% "@@Playername1@@PlayerNAME2@@Playername3@@PlayerName4@@"
    If %CustomListForLead% contains @@%p%@@; Set %vipadmin% 1
	Set %part2active% ". With %pointsneeded% points you can type !lead to take Squad Leader position"
    If %ini_ranking_%p%% >= %pointsneeded%; Set %tmpvip% 1; PlayerSay VIP: %p% you can type !lead to take Squad Leader position; PlayerSay VIP: %p% you have %ini_ranking_%p%% vip points!;
    If %ini_ranking_%p%% < %pointsneeded%; if %vipadmin% == 1; PlayerSay VIP: %p% you can type !lead to take Squad Leader position
    If %ts1% + %ts2% < 4; If %tmpvip% <> 1; If %vipadmin% <> 1; PlayerSay %p% tanks for joining! Please wait for more players. When the round starts you will get VIP points!; PlayerSay With %pointsneeded% points you can type !lead to take Squad Leader position (Your points %tmpVIPScore%/%pointsneeded%)

# IN GAME COMMAND - !lead
On Say; Text !lead,!squadlead;
    If %tmpvip% == 1; If %vipadmin% <> 1; PlayerSay VIP: %p% you have %ini_ranking_%p%% VIP points!; Exec squad.leader %ptk% %psk% %p%
    If %vipadmin% == 1; Exec squad.leader %ptk% %psk% %p%
    If %tmpvip% <> 1; If %vipadmin% <> 1; PlayerSay !lead to take Squad Leader position is only for VIPs; PlayerSay Join on our empty server and play the first round. After %pointsneeded% times you are a VIP (Your points %tmpVIPScore%/%pointsneeded%)
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Brodatv*:

 

Awesome idea, bro :smile: It's always a nice reward for first players on the server.

I've small question for you - maybe you know, maybe not - I'm writing ASDL (Advanced Sniper/DMR Limit) and I would like to integrate your code into mine. Without stealing it, without coping it :biggrin: I would like to write additional lines for my code that would support your main features. For example, if server owner will run both codes - players will be able to buy sniperslot for one round using your idea. What do you think? :smile:

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by maxdralle*:

 

hi brodatv,

 

thanks for your feedback! :biggrin:

 

yes, you can integrate the code in your stuff. it sounds great!

 

 

i have also written a sniper/dmr limit. i send you a PM with the code. maybe its interesting for you...

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Brodatv*:

 

I will add some of your variables as features in my sniperlimit, so people that got point for starting the server will be rewarded. They will be able to buy sniper/dmr slot for one round. I think it should be "coded" in next 2-3 days.

BUT, you have to code something in your code - so far it's easy to abuse. People can join and rejoin empty server to farm points. You should add some variables that are "IF-ing". For example if player will get 15 kills during normal round after starting server, something like that. Or is this code for sure anti-abuse-able? :P

 

Also I've small request - can you change command !server to something else? Because it's facking up with my ASDL where all commands started by !s are used for sniperlimit. So when someone will try to check out sniperslots, it will show your !server too :-x

 

So far I'm thinking that ONE point for round start would be great for one sniper/dmr slot (1 round). What do you think?

 

Thanks for your sniperlimit, so far your code is looking good, but it isn't advanced :smile:

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by maxdralle*:

 

...so far it's easy to abuse. People can join and rejoin empty server to farm points. You should add some variables that are "IF-ing"...

it is included. its not possible to farm points. a player can not get more than 1 point for 1 server start (if %tmpRankReg% 1).

 

the code detect a "server start" when:

- a new round starts until 8 players

- AND a team have a real teamscore more then 1 (no score on empty server with 1P)

- AND a new round is not started with more than 8 players

 

i thinks its secure enough...

 

 

 

...Because it's facking up with my ASDL where all commands started by !s are used for sniperlimit. So when someone will try to check out sniperslots, it will show your !server too :-x...

mhh, its possible. but what is with the command !stats?

maybe its better to optimize this part in your code, like:

 

YOUR CURRENT CODE

On Say;Text !s

 

REPLACE WITH THIS

On Say;Text !s; if %text% == !s

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Brodatv*:

 

YOUR CURRENT CODE

On Say;Text !s

 

REPLACE WITH THIS

On Say;Text !s; if %text% == !s

It's so easy and I'm so stupid sometimes :biggrin: I will add it to next update. Thanks.

Also I will add some screens to my ADSL how it's working and how it looks. Try to do the same, your code is one of the best ideas for Procon and Proconrulz. Advertise it, for example by short link, I've bit.ly/sniperlimit :smile: If you can, try to add some kind of download-able file. For example I've ADSL in normal .txt and you can download it as file, proconrulz can read rulz from itself or from .txt files uploaded to Procon server. Files are much easier, because long codes like mine + yours can be too long for just copy-pasta.

* Restored post. It could be that the author is no longer active.
Link to comment
  • 2 years later...

Originally Posted by Talzac*:

 

Hi,

I was looking at this thread and the code you have made, here nice!

I am not a good programmer could you please make a modified script that uses the VIP slot manager plugin?

When a player reaches 5 points they get 1-week free VIP and the points is "destroyed"?

That would be nice! Here is a start:

Say /vsm-addvip %p% +7; Set %Server_population% 2;

Thanks!

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Talzac*:

 

Will this work?

 

# SETTINGS:

On Spawn; PlayerFirst;

Set %pointsneeded% 5

Admin; Set %vipadmin% 1

Set %part2active% ". With %pointsneeded% points you get 1 week !VIP SLOT"

If %ini_ranking_%p%% >= %pointsneeded%; Set %tmpvip% 1; PlayerSay VIP: %p% Congrats! You got 1 week VIP SLOT for populating the server!; Say /vsm-addvip %p% +7;Set %ini_ranking_%p%% 0

If %ts1% + %ts2% 1; If %vipadmin% 1; PlayerSay %p% tanks for joining! Please wait for more players. When the round starts you will get VIP points!; PlayerSay With %pointsneeded% points you get 1 week !VIP SLOT! (Your points %tmpVIPScore%/%pointsneeded%)

 

I am sure you can strip this code down a bit, and make it better.... I am new to this.

* Restored post. It could be that the author is no longer active.
Link to comment

Archived

This topic is now archived and is closed to further replies.



  • Our picks

    • Game Server Hosting:

      We're happy to announce that EZRCON will branch out into the game server provider scene. This is a big step for us so please having patience if something doesn't go right in this area. Now, what makes us different compared to other providers? Well, we're going with the idea of having a scaleable server hosting and providing more control in how you set up your server. For example, in Minecraft, you have the ability to control how many CPU cores you wish your server to have access to, how much RAM you want to use, how much disk space you want to use. This type of control can't be offered in a single service package so you're able to configure a custom package the way you want it.

      You can see all the available games here. Currently, we have the following games available.

      Valheim (From $1.50 USD)


      Rust (From $3.20 USD)


      Minecraft (Basic) (From $4.00 USD)


      Call of Duty 4X (From $7.00 USD)


      OpenTTD (From $4.00 USD)


      Squad (From $9.00 USD)


      Insurgency: Sandstorm (From $6.40 USD)


      Changes to US-East:

      Starting in January 2022, we will be moving to a different provider that has better support, better infrastructure, and better connectivity. We've noticed that the connection/routes to this location are not ideal and it's been hard getting support to correct this. Our contract for our two servers ends in March/April respectively. If you currently have servers in this location you will be migrated over to the new provider. We'll have more details when the time comes closer to January. The new location for this change will be based out of Atlanta, GA. If you have any questions/concerns please open a ticket and we'll do our best to answer them.
      • 5 replies
    • Hello All,

      I wanted to give an update to how EZRCON is doing. As of today we have 56 active customers using the services offered. I'm glad its doing so well and it hasn't been 1 year yet. To those that have services with EZRCON, I hope the service is doing well and if not please let us know so that we can improve it where possible. We've done quite a few changes behind the scenes to improve the performance hopefully. 

      We'll be launching a new location for hosting procon layers in either Los Angeles, USA or Chicago, IL. Still being decided on where the placement should be but these two locations are not set in stone yet. We would like to get feedback on where we should have a new location for hosting the Procon Layers, which you can do by replying to this topic. A poll will be created where people can vote on which location they would like to see.

      We're also looking for some suggestions on what else you would like to see for hosting provider options. So please let us know your thoughts on this matter.
      • 4 replies
    • Added ability to disable the new API check for player country info


      Updated GeoIP database file


      Removed usage sending stats


      Added EZRCON ad banner



      If you are upgrading then you may need to add these two lines to your existing installation in the file procon.cfg. To enable these options just change False to True.

      procon.private.options.UseGeoIpFileOnly False
      procon.private.options.BlockRssFeedNews False



       
      • 2 replies
    • I wanted I let you know that I am starting to build out the foundation for the hosting services that I talked about here. The pricing model I was originally going for wasn't going to be suitable for how I want to build it. So instead I decided to offer each service as it's own product instead of a package deal. In the future, hopefully, I will be able to do this and offer discounts to those that choose it.

      Here is how the pricing is laid out for each service as well as information about each. This is as of 7/12/2020.

      Single MySQL database (up to 30 GB) is $10 USD per month.



      If you go over the 30 GB usage for the database then each additional gigabyte is charged at $0.10 USD each billing cycle. If you're under 30GB you don't need to worry about this.


      Databases are replicated across 3 zones (regions) for redundancy. One (1) on the east coast of the USA, One (1) in Frankfurt, and One (1) in Singapore. Depending on the demand, this would grow to more regions.


      Databases will also be backed up daily and retained for 7 days.




      Procon Layer will be $2 USD per month.


      Each layer will only allow one (1) game server connection. The reason behind this is for performance.


      Each layer will also come with all available plugins installed by default. This is to help facilitate faster deployments and get you up and running quickly.


      Each layer will automatically restart if Procon crashes. 


      Each layer will also automatically restart daily at midnight to make sure it stays in tip-top shape.


      Custom plugins can be installed by submitting a support ticket.




      Battlefield Admin Control Panel (BFACP) will be $5 USD per month


      As I am still working on building version 3 of the software, I will be installing the last version I did. Once I complete version 3 it will automatically be upgraded for you.





      All these services will be managed by me so you don't have to worry about the technical side of things to get up and going.

      If you would like to see how much it would cost for the services, I made a calculator that you can use. It can be found here https://ezrcon.com/calculator.html

       
      • 11 replies
    • I have pushed out a new minor release which updates the geodata pull (flags in the playerlisting). This should be way more accurate now. As always, please let me know if any problems show up.

       
      • 9 replies
×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.