Garry's Mod

Garry's Mod

27 ratings
Luk's ULX Karma Betting for TTT
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Server content
Addon Tags: Fun
File Size
Posted
Updated
11.546 KB
20 Dec, 2016 @ 9:52am
9 Apr, 2017 @ 5:29am
6 Change Notes ( view )

Subscribe to download
Luk's ULX Karma Betting for TTT

In 2 collections by Luk
Spielwiese der Erwachsenen CONTENT
169 items
Spielwiese der Erwachsenen TEST-CONTENT
169 items
Description
Karma Betting for Trouble in Terrorist Town
Bet your karma on a team, similar to betting money in Counter-Strike!

FEATURES / DESCRIPTION
This addon for TTT enables those who have been killed to place their karma on a certain team, be it Innocent or Traitor.
Imagine you're playing with 10 players and most of them are dead, but you as the only innocent player left don't know. You see the bets increase on the right side, but for the enemy team. You picture yourself winning the round so all the other players who bet against you will lose their karma. Ain't that some sweet karma for them? Tehe...

Usage of the MySQL capability of this plugin enables webhosts e.g. to implement the Bet-King into their MOTD to provide their players with additional imaginary fame.

COMMAND LIST
!bet <team> <amount> - Places a bet on <team> with <amount>
- team ? Either "innocent", "inno" or "i" for the INNOCENT team, or "traitor" or "t" for the TRAITOR team
- amount ? An amount between karmabet_min_karma and karmabet_max_karma or "all" (amount = karmabet_allin_karma)

!mybets [<days>] - Displays your net amount of won/lost karma by betting (defaults to 7 days)
- days (optional) ? Number between 1 and 31 defining the "lookback" time

!bestbets - Publicly prints the 5 highest betting players of the last 7 days

!worstbets - Publicly prints the 5 worst betting players of the last 7 days (total karma below 0)

REQUIREMENTS
ULX: https://steamhost.cn/steamcommunity_com/workshop/filedetails/?id=557962280
ULib: https://steamhost.cn/steamcommunity_com/workshop/filedetails/?id=557962238
(These do not have to be installed via Workshop. Manual installations also work)

If you intend to use the MySQL feature you'll need the mysqloo[facepunch.com] Module to be installed. By default it will use SQLite which works just fine.

INSTALLATION
This addon is only needed server-side! Add it to your server's workshop collection and you're done!

CONFIGURATION
Copy these lines into your server.cfg and change them to your liking. They are not required to be set, by default this plugin will work just fine without these

karmabet_savemode "sqlite" // sqlite or mysql
karmabet_language "english" // english or german

// Decides the way betters are rewarded
// 1 = Winners get karma even if no counter bets have been placed
// 2 = Winners only get karma if counter bets have been placed. These bets get distributed depending on the proportion of one's bets in relation to
// total bets placed
karmabet_reward_type 1

karmabet_min_identified_bodies 2 // Minimum amount of corpses that have to be found by other players for total bet amounts to be visible by all players
karmabet_min_karma 10 // Minimum amount of karma a player can bet
karmabet_max_karma 200 // Maximum amount of karma a player can bet before going "all"-in
karmabet_allin_karma 350 // Amount of karma a player bets when choosing "all"
karmabet_min_live_karma 600 // Minimum karma of a player to have to bet (bets that would reduce their karma below this point are adjusted to hit this amount upon losing)
karmabet_bet_time 180 // Time in seconds for dead/spectating players to place their bet during a round
karmabet_mybets_cooldown 5 // Time in seconds between every !mybets command
karmabet_bestbets_cooldown 180 // Time in seconds between every !bestbets command
karmabet_worstbets_cooldown 180 // Time in seconds between every !worsbets command

karmabet_debug 0 // Print debugging messages to server console, 1 = yes, 0 = no

// THESE SETTINGS ARE ONLY REQUIRED TO BE CHANGED IF YOU SET karmabet_savemode "mysql"
karmabet_mysql_host "localhost"
karmabet_mysql_dbname "database_name"
karmabet_mysql_username "database_user"
//karmabet_mysql_pw "DO_NOT_PUT_PASSWORD_HERE" // For the sake of safety, define this in your COMMAND LINE like this:
// ...+host_workshop_collection "blabla" +karmabet_mysql_pw "put_password_here" +rcon_password "bluuh_blah" ...
karmabet_mysql_port 3306

LICENSE
The content of this plugin is licensed under the MIT License which can be found at https://raw.githubusercontent.com/doctorluk/ulx-karma-betting/master/LICENSE

OPEN SOURCE
This plugin is Open Source! Feel free to contribute here: https://github.com/doctorluk/ulx-karma-betting
Popular Discussions View All (2)
0
29 Dec, 2016 @ 5:37pm
Bugs
Luk
0
29 Dec, 2016 @ 5:36pm
Suggestions
Luk
31 Comments
Psycho Mieze 15 Apr, 2023 @ 1:10am 
Mir spuckt das Lua system error system Folgende Fehler aus und schlägt mir vor dies ihnen es mit zu teilen.

Fehler: "[Luk's ULX Karma Wetten für TTT] Couldn't include file 'includes\modules\mysqloo.lua' - File not found (@lua/autorun/server/sv_karma_betting_mysql.lua (line 6))
1. unknown - lua/autorun/server/sv_karma_betting_mysql.lua:6"
Fehler2: "[Luk's ULX Karma Wetten für TTT] lua/autorun/server/sv_karma_betting_mysql.lua:6: Module not found!
1. require - [C]:-1
2. unknown - lua/autorun/server/sv_karma_betting_mysql.lua:6"

Hoffe ich konnte helfen, falls das Addon noch weiter Entwickelt wird.
Luk  [author] 5 Jul, 2021 @ 9:45am 
I'm sorry to hear that. Development has seized, so I can't help out.
SCSPyroMaster 3 Jul, 2021 @ 7:03pm 
this mod give me some probs says the game
mexikoedi 13 Aug, 2020 @ 12:27pm 
Ja, alles gut. Trotzdem danke für deine Hilfe, werden das Addon weiterhin benutzen, uns stört das Problem bis jetzt nicht enorm.
Luk  [author] 13 Aug, 2020 @ 11:49am 
Habe mit TTT2 leider keine Erfahrung, da ich vor dessen Einführung aufgehört habe an dem Plugin zu arbeiten.
Tim | Mineotopia 12 Aug, 2020 @ 8:10am 
Das liegt sicher daran, dass du TTT2 nutzt und der Mod für TTT gemacht wurde. Die Winparameter haben sich geändert.
mexikoedi 12 Aug, 2020 @ 6:07am 
Also es geht jetzt alles in Sachen mysql und ich bekomme keine Errors mehr. Der Fehler mit Hidden Bet scheint wohl auch nicht mehr vorzukommen (vielleicht ist der auch nur sehr selten). Aber ein Fehler bleibt bestehen. Wenn ich auf z.b. die Traitor wette und die verlieren, dann gewinne ich Karma? Der Fehler tritt so in verschiedenen Variation (Inno, Traitor, Karma win/loss) auf. Ist da was zu machen oder hast du da Lösungsvorschläge?
Luk  [author] 11 Aug, 2020 @ 10:23am 
Pack dir mal mysqloo in den Server:
https://github.com/FredyH/MySQLOO
mexikoedi 11 Aug, 2020 @ 10:17am 
Ja, hab alles in der server.vdf eingestellt.
Luk  [author] 11 Aug, 2020 @ 9:44am 
Hast du auch
karmabet_savemode "sqlite"
eingestellt?