Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Commit

Permalink
Revert "Revert "Merge pull request #22 from totles/release""
Browse files Browse the repository at this point in the history
This reverts commit 795e57e.
  • Loading branch information
Riccardo H committed Jul 31, 2019
1 parent 4381c12 commit ec32bed
Show file tree
Hide file tree
Showing 19 changed files with 107 additions and 208 deletions.
70 changes: 67 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,76 @@
# z4lab-SurfTimer v2.4 for CS:GO
# z4lab-SurfTimer 2.6 for CS:GO

## features added so far
## installation and requirements
you will need [SourceMod 1.9](https://www.sourcemod.net/downloads.php?branch=stable), [MetaMod 1.10](https://www.sourcemm.net/downloads.php/?branch=stable), [SteamWorks](https://forums.alliedmods.net/showthread.php?t=229556), [SMJansson](https://forums.alliedmods.net/showthread.php?t=184604) and a working MySQL instance, other dependencies like `DHooks` and `Cleaner` are already included

* download the latest version from the release page [here](https://github.com/totles/z4lab-surftimer/releases/latest)
* copy the files to your csgo directory
* import the `surftimer.sql` to your database
* edit configs (mysql db, etc, to do)

## features added
* added discord bonus announcement
* added prestrafe chat info option
* new [NORD](https://www.nordtheme.com/) color scheme

## bugs fixed in this version
* fixed "S1 to S2 record glitch"
* fixed custom Clantags in Scoreboard which weren't working
* prestrafe message option is now saved correctly

## point system
<details>
<summary>explanation</summary>

The points system has seen a massive overhaul from the original ckSurf; it is now a percentile tiered system. Points are now distributed in two ways: (1) map completion, and (2) map ranking. Map completion points will be given to all players who complete a specific and are dependent on the tier.
* Tier 1: 25
* Tier 2: 50
* Tier 3: 100
* Tier 4: 200
* Tier 5: 400
* Tier 6: 600

Map ranking points are dependent upon the individuals ranking on the map. This is done firstly by calculation of the WR points for the map. WR points per tier are calculated as follows:
* Tier 1: WR = (1.75 * Number of Completes) / 6
* Tier 2: WR = (2.8 * Number of Completes) / 5
* Tier 3: WR = MAX(350, (3.5 * Number of Completes) / 4)
* Tier 4: WR = MAX(400, (5.74 * Number of Completes) / 4)
* Tier 5: WR = MAX(500, (7 * Number of Completes) / 4)
* Tier 6: WR = MAX(600, (14 * Number of Completes) / 4)

Once the WR points are calculated the top 10 are points are calculated by multiplying the WR points by a factor. These factors are:
* Rank 2 = WR * 0.8
* Rank 3 = WR * 0.75
* Rank 4 = WR * 0.7
* Rank 5 = WR * 0.65
* Rank 6 = WR * 0.6
* Rank 7 = WR * 0.55
* Rank 8 = WR * 0.5
* Rank 9 = WR * 0.45
* Rank 10 = WR * 0.4

Players who are not in the top 10 but are above the 50th percentile in map ranking will be sorted into 5 groups – with each higher group giving proportionally more points. These groups and their point distribution are as follows:
* Group 1 (top 3.125%) = WR * 0.25
* Group 2 (top 6.25%) = (Group 1) / 1.5
* Group 3 (top 12.5%) = (Group 2) / 1.5
* Group 4 (top 25%) = (Group 3) / 1.5
* Group 5 (top 50%) = (Group 4) / 1.5

Take surf_aircontrol_nbv for example: (You can use sm_mi to see this menu)
<img src="http://puu.sh/ykaR8/7520a6b0d6.jpg" width="372" height="469" />

###### Credit to NDiamond for theory crafting this point system, I just implemented his idea

</details>

## fork from fluffys - credits
## credits
<details>
<summary>forked from fluffys - contributors</summary>

* Jonitaikaponi - Original ckSurf creator
* nikooo777 - ckSurf 1.19 Fork
* <a href="http://steamcommunity.com/id/fluffystko/">fluffys</a>
* Jakeey802
* Grandpa Goose

</details>
12 changes: 6 additions & 6 deletions addons/sourcemod/configs/surftimer/default_titles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"title" "{default}[{green}Admin{default}]"
"type" "both"
}
// "2"
// {
// "steamid" "STEAM_1:0:20019070"
// "title" "[test]"
"type" "both"
// }
"2"
{
"steamid" "STEAM_1:0:27661072"
"title" "{default}[{gold}VIP{default}]"
"type" "both"
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Assign whitelists to the default title function here
// Put each users steamid on a new line in STEAM_1:X:YYYYYYYYY format (SteamID32)
STEAM_1:0:20019070
// assign whitelists to the default title function here
// put each users steamid on a new line in STEAM_1:X:YYYYYYYYY format (SteamID32) like:
STEAM_1:0:27661072
55 changes: 19 additions & 36 deletions addons/sourcemod/configs/surftimer/skillgroups.cfg
Original file line number Diff line number Diff line change
@@ -1,119 +1,102 @@
// Skillgroups file

// Max rank name length is 32 characters (not including colours)
// Available Colours: {default}, {darkred}, {purple}, {green}, {lightgreen}, {lime}, {red}, {gray}, {grey}, {yellow}, {orange}, {darkgrey}, {blue}, {darkblue}, {lightblue}, {pink}, {lightred}

// Skillgroup types
// "rankTitle" -> name of the rank title
// "nameColour" -> colour of the players name (Default: {default})

// Rank requirements (choose ONE per rank)
// "points" -> flat amount of points the player must have to obtain this rank (Use a hyphen if you want to use a range, e.g "points" "1000-1499")
// "percentage" -> the percentage of maximum points required to obtain this rank (default ckSurf calculation)
// "rank" -> the rank requirement the player must have to be this rank (Use a hypen if you want to add a range, e.g "rank" "25-50")

// You can also use {style} to put the current players style in their rank

// Always keep ranks in descending order while also following this order of
// (rank -> points / percentage)

// This example replicates the KSF ranks
// skillgroups file
// more information in the readme.md file
// max rank name length is 32 characters (not including colors)

"SkillGroups"
{
"1"
{
"rankTitle" "{default}[{style}{darkred}Emperor{default}]"
"rankTitle" "{default}[{style}{darkred}GENERAL{default}]"
"nameColour" "{darkred}"
"rank" "1"
}
"2"
{
"rankTitle" "{default}[{red}Sir{default}]"
"rankTitle" "{default}[{red}COLONEL{default}]"
"nameColour" "{red}"
"rank" "2"
}
"3"
{
"rankTitle" "{default}[{lightred}Duke{default}]"
"rankTitle" "{default}[{lightred}MAJOR{default}]"
"nameColour" "{lightred}"
"rank" "3"
}
"4"
{
"rankTitle" "{default}[{pink}Master{default}]"
"rankTitle" "{default}[{pink}LEGEND{default}]"
"nameColour" "{pink}"
"rank" "4-10"
}
"5"
{
"rankTitle" "{default}[{purple}Elite{default}]"
"rankTitle" "{default}[{purple}ELITE{default}]"
"nameColour" "{purple}"
"rank" "11-25"
}
"6"
{
"rankTitle" "{default}[{orange}Veteran{default}]"
"rankTitle" "{default}[{orange}VETERAN{default}]"
"nameColour" "{orange}"
"rank" "26-50"
}
"7"
{
"rankTitle" "{default}[{yellow}Pro{default}]"
"rankTitle" "{default}[{yellow}PRO{default}]"
"nameColour" "{yellow}"
"rank" "51-100"
}
"8"
{
"rankTitle" "{default}[{green}Expert{default}]"
"rankTitle" "{default}[{green}SEMIPRO{default}]"
"nameColour" "{green}"
"rank" "101-200"
}
"9"
{
"rankTitle" "{default}[{lime}Hotshot{default}]"
"rankTitle" "{default}[{lime}EXPERT{default}]"
"nameColour" "{lime}"
"rank" "201-350"
}
"10"
{
"rankTitle" "{default}[{lightgreen}Exceptional{default}]"
"rankTitle" "{default}[{lightgreen}SKILLED{default}]"
"nameColour" "{lightgreen}"
"rank" "351-500"
}
"11"
{
"rankTitle" "{default}[{darkblue}Experienced{default}]"
"rankTitle" "{default}[{darkblue}CASUAL{default}]"
"nameColour" "{darkblue}"
"points" "3000"
}
"12"
{
"rankTitle" "{default}[{blue}Skilled{default}]"
"rankTitle" "{default}[{blue}WANNABE{default}]"
"nameColour" "{blue}"
"points" "1500-2999"
}
"13"
{
"rankTitle" "{default}[{lightblue}Casual{default}]"
"rankTitle" "{default}[{lightblue}BEGINNER{default}]"
"nameColour" "{lightblue}"
"points" "1000-1499"
}
"14"
{
"rankTitle" "{default}[{gray2}Beginner{default}]"
"rankTitle" "{default}[{gray2}TRAINEE{default}]"
"nameColour" "{gray2}"
"points" "300-999"
}
"15"
{
"rankTitle" "{default}[{gray}Rookie{default}]"
"rankTitle" "{default}[{gray}ROOKIE{default}]"
"nameColour" "{gray}"
"points" "1-299"
}
"16"
{
"rankTitle" "{default}[Unranked]"
"rankTitle" "{default}[UNRANKED]"
"nameColour" "{default}"
"points" "0"
}
Expand Down
4 changes: 2 additions & 2 deletions addons/sourcemod/scripting/SurfTimer.sp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#pragma semicolon 1

// Plugin Info
#define VERSION "2.4"
#define VERSION "2.6"

// Database Definitions
#define MYSQL 0
Expand Down Expand Up @@ -1915,7 +1915,7 @@ public void OnAutoConfigsBuffered()

// map config
char szPath[256];
Format(szPath, sizeof(szPath), "sourcemod/surftimer/map_types/%s_.cfg", szPrefix[0]);
Format(szPath, sizeof(szPath), "sourcemod/surftimer/%s_.cfg", szPrefix[0]);
char szPath2[256];
Format(szPath2, sizeof(szPath2), "cfg/%s", szPath);
if (FileExists(szPath2))
Expand Down
99 changes: 0 additions & 99 deletions addons/sourcemod/scripting/ckSurf-telefinder.sp

This file was deleted.

2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/surftimer/misc.sp
Original file line number Diff line number Diff line change
Expand Up @@ -4422,7 +4422,7 @@ public void totalTimeForHumans(int unix, char[] buffer, int size)
}
}

public void sendDiscordAnnouncement(char szName[32], char szMapName[128], char szTime[32])
public void sendDiscordAnnouncement(char szName[128], char szMapName[128], char szTime[32])
{
char webhook[1024];
GetConVarString(g_hRecordAnnounceDiscord, webhook, 1024);
Expand Down
Loading

0 comments on commit ec32bed

Please sign in to comment.