Author Topic: SteamTeam - Steam Group Membership Award System  (Read 7665 times)

0 Members and 1 Guest are viewing this topic.

Offline Buzzkill

  • Respected Community Member
  • Full Member
  • *****
  • Posts: 176
  • Karma: 59
    • The Hundred Acre Bloodbath
SteamTeam - Steam Group Membership Award System
« on: May 24, 2016, 10:32:31 AM »
SteamTeam - Steam Group Membership Award System
Written by Buzzkill -- thehundredacrebloodbath.com
https://github.com/100acrebb/thab_tools

(I apologize for the name. It's stupid, but it stuck)

SteamTeam is a framework for detecting player membership to a Steam group and awarding in-game bonuses as a result. It is currently a work in progress, and support for multiple groups and
multiple bonus types is forthcoming, as well as separating out and improving the configuration of groups/bonuses.


An example configuration is included in source, with notes on important values. This is probably the best approach to configuration documentation for now.

Membership is checked upon user initial spawn as well as every 10 mins.
NOTE: IT CURRENTLY ONLY SUPPORTS A SINGLE GROUP AND A SINGLE BONUS (Pointshop 1 points as well as a configurable callback -- see inline notes in source below).

Code: [Select]
-- One group for now
STEAMTEAM.Groups[1] = {}
-- URL of the target group
STEAMTEAM.Groups[1].URL = "http://steamcommunity.com/groups/100acrebb"
-- A configurable callback. In this example, I set a networked boolean if the user is a member of the above group.
-- I'm using this in other areas - for example, a custom icon in HatsChat
STEAMTEAM.Groups[1].OnIsMember = function(self, ply) ply:SetNWBool( "THABMember", true ) end
STEAMTEAM.Groups[1].Bonus = {}

-- One bonus for now
STEAMTEAM.Groups[1].Bonus[1] = {}
-- The bonus type (PSPOINTS only, for now)
STEAMTEAM.Groups[1].Bonus[1].Type = "PS1POINTS"
-- The number of points
STEAMTEAM.Groups[1].Bonus[1].Amount = 10000


https://github.com/100acrebb/thab_tools/blob/master/lua/autorun/server/steamteam.lua
« Last Edit: July 10, 2017, 02:02:14 PM by JamminR »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: SteamTeam - Steam Group Membership Award System
« Reply #1 on: May 24, 2016, 07:24:00 PM »
Sweet!
Nice idea.
I think I've seen questions regarding this by some in dev corner, but never any of the discussion implemented.
Always appreciate your contributions here.
Thanks
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Letsfail

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: SteamTeam - Steam Group Membership Award System
« Reply #2 on: July 10, 2017, 09:32:14 AM »
Hey,

nice script, but does it support Pointshop2?

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: SteamTeam - Steam Group Membership Award System
« Reply #3 on: July 10, 2017, 01:25:12 PM »
Really nice idea.

However, it appears the link is busted.
An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: SteamTeam - Steam Group Membership Award System
« Reply #4 on: July 10, 2017, 02:04:24 PM »
Corrected Link to go straight to the github listing.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline tjhooker73ps3

  • Newbie
  • *
  • Posts: 1
  • Karma: 1
Re: SteamTeam - Steam Group Membership Award System
« Reply #5 on: July 12, 2017, 06:25:07 PM »
Hey,

nice script, but does it support Pointshop2?

Shouldn't be that hard to replace PS1 calls with PS2_AddStandardPoints

Offline Phosphene

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: SteamTeam - Steam Group Membership Award System
« Reply #6 on: September 29, 2017, 04:12:54 PM »
Hey, I tried myself but I can't get it working - how would I configure this to give DarkRP money? Thanks.