Page 1 of 3 123 LastLast
Results 1 to 20 of 52

Thread: SM Plugin: PlayStuff Fortress Cookies

  1. #1
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,530
    Cookies Given
    4,433
    Cookies Received
    4,007
    Blog Entries
    2

    SM Plugin: PlayStuff Fortress Cookies

    Thread for tracking the development of the SourceMod plugin: Playstuff Fortress Cookies!

    PlayStuff Fortress Cookies is a collection of useful and fun commands. The name is based on Fortune Cookies as the server responds in its infinite wisdom to text typed by people on the server. On which the server reacts and how is configured in a seperated config file.

    Server Command:
    "sm_fortresscookies_reload", "Reload the FortressCookies"

    ConVar:
    "sm_fortresscookies_file", "fortresscookies.txt", "File with all FortressCookies"

    Console Command:
    "sm_fortresscookies_test", "Iterate through all keywords in fortresscookies config file, showing all output"

    Example config file:
    file: ..\tf\addons\sourcemod\configs\fortresscookies.txt
    Code:
    // Fortress Cookies - Example text file (BETA)
    // by MacNetron for the PlayStuff.net community.
    
    // Implemented keywords:
    // {CLIENT}          - Name of the client
    // {RANDOM_CLIENT}   - Name of a random client other than client itself
    // {RANDOM_ENEMY}    - Name of a random client of the other team
    // {CURRENTMAP}      - Name of the current map
    // {PREVIOUSMAP}     - Name of the previous map
    // {COUNTRY}         - Name of the client's country, based on ip
    // {RANDOM_COUNTRY}  - Name of a random country, other than client's country
    // {CLASS}           - Name of the class of the client
    // {RANDOM_CLASS}    - Name of a random class, other than client's class
    // {CLIENT_TIME}     - The time the client is connected, nicely formatted in readable format
    // {RANDOM:min,max}  - Gets a random value between min and max
    // {CHOOSE:listname} - Gets a random value from a list
    // {HTMLPAGE:url}    - Shows the url in the TF2 browser
    // all other normal commands, like {SM_NEXTMAP}
    
    // The KeyValue tree cannot handle keys with "/". So FortressCookies replaces all "/" with "!".
    // This means if you have a key like "!teamplay", you'll get "/teamplay" for free and vice versa.
      
    // Maximum of 16 words on choose_xx kv's
    
    "FortressCookies"
    {
      "timeright"
      {
        "chat_check"  "equals"
        "text"        "[FC] The timeright on this map is {RANDOM:12,96} MB or {RANDOM:128,512} frags"
      }
      "whoami"
      {
        "chat_check"  "equals"
        "text"        "[FC] You are the {CHOOSE:choose_1} {CLIENT} trying to {CHOOSE:choose_2} {RANDOM_ENEMY}"
        "choose_1"    "epic,brave,coward,stupid,little,big,small,tiny,awesome"
        "choose_2"    "kill,frag,blow up,evade,hide from,get away from,tickle,surprise,pay back"
      }
      "whoaminot"
      {
        "chat_check"  "equals"
        "text"        "[FC] You are definitely not the {CHOOSE:choose_1} {RANDOM_CLIENT}"
        "choose_1"    "bald,brave,stupid,little,big,small,tiny,awesome,puny,proud"
      }
      "whereami"
      {
        "chat_check"  "equals"
        "text"        "[FC] {CLIENT} is currently in {COUNTRY}"
      }
      "whereaminot"
      {
        "chat_check"  "equals"
        "text"        "[FC] {CLIENT} is {CHOOSE:choose_1} not in {RANDOM_COUNTRY}"
        "choose_1"    "certainly,most likely,very probably,stupidly enough"
      }
      "whatami"
      {
        "chat_check"  "equals"
        "text"        "[FC] Ssssttt! {CLIENT} might be a {CLASS}!!"
      }
      "whataminot"
      {
        "chat_check"  "equals"
        "text"        "[FC] Beware! {CLIENT} wants to believe us (s)he is a {RANDOM_CLASS}!!"
      }
      "whenami"
      {
        "chat_check"  "equals"
        "text"        "[FC] Dear {CLIENT}, please stay another {CLIENT_TIME} :)"
      }
      "whenaminot"
      {
        "chat_check"  "equals"
        "text"        "[FC] This server is closed on februari 29th"
      }
      "stats,rank"
      {
        "chat_check"  "equals"
        "text"        "[FC] Stats are for sissies! You are ranked {RANDOM:54321,654321} on this server"
      }
      "rtv,rockthevote,voteban"
      {
        "chat_check"  "equals"
        "text"        "[FC] This server is not interested in your opinion!"
      }
      "i blame"
      {
        "chat_check"  "contains"
        "text"        "[FC] Blame who you like, the server knows {CLIENT} is the only one to blame"
      }
      "teams,teams!"
      {
        "chat_check"  "equals"
        "text"        "[FC] Stop whining and play better FOR THE TEAM so they won't leave you!"
      }
      "asshole,cock,cunt,fuck,twat"
      {
        "chat_check"  "contains"
        "text"        "[FC] Dear {CLIENT}, that is considered swearing! Mind the language!"
      }
      "map"
      {
        "chat_check"  "equals"
        "text"        "[FC] Server thinks we went from {PREVIOUSMAP} to {CURRENTMAP} and next will be {SM_NEXTMAP}"
      }
      "!teamplay,teamplay"
      {
        "chat_check"  "equals"
        "text"        "{HTMLPAGE:http://playstuff.net/threads/969-TEAMPLAY-IS}"
      }
      "happy new year,happy newyear"
      {
        "chat_check"  "contains"
        "text"        "[FC] Playstuff.net wishes {CLIENT} a {CHOOSE:choose_1} {CHOOSE:choose_2}!"
        "choose_1"    "happy,awesome,jolly good,frag full"
        "choose_2"    "2010,new year"
      }
    }
    Changelog:
    Updated FortressCookies to 0.6.0:
    * Added support for {CLIENT_TIME}
    * Added in the fortresscookies.txt: whenami, whenaminot
    * Added 0.6.0 to PlayStuff SVN

    Updated FortressCookies to 0.5.3:
    * keys starting with "/" will be rewritten to "!" -> "/teamplay" becomes "!teamplay" and BOTH will work!
    * rewritten the console var "sm_fortresscookies_test". It will now iterate on all keys in the config file instead of hard-coded.
    * expanded fortresscookies.txt a bit with comments
    * couple of minor issues / rewrites / added comments

    Updated FortressCookies LOCALLY to 0.5.0:
    * Added support for {HTMLPAGE:xxx}, using the new show_htmlpage command

    Updated FortressCookies to 0.4.1:
    * Added support for {CLASS}, {RANDOM_CLASS}
    * Added in the fortresscookies.txt: whatami, whataminot
    * Added 0.4.1 to Playstuff SVN

    Updated FortressCookies to 0.4.0:
    * Added support for {RANDOM_CLIENT}, {PREVIOUSMAP}, {COUNTRY}, {RANDOM_COUNTRY}
    * Added in the fortresscookies.txt: whoaminot, whereami, whereaminot, map
    * Added 0.4.0 to PlayStuff SVN

    Source code:
    Available on PlayStuff SVN.
    Last edited by MacNetron; 10-01-2010 at 15:51. Reason: rewrote and added changelog 0.6.0
    4 People have given a Cookie to MacNetron: Boylee.ps, grom.ps, Logan.ps, Spudd

  2. #2
    Greater crested hermit ninja Boylee's Avatar
    Join Date
    Nov 2008
    Posts
    7,754
    Cookies Given
    6,341
    Cookies Received
    5,882
    This made my night last night. Was well funny.

    How about something in response to "x is a n00b" / "y are noobs", along the lines of "we were all n00bs once, the best way to alleviate your 1337 stress is to give helpful, friendly direction. Or alternatively, to go away."
    Cookie given from: Logan.ps
    cp_triplet - ctf_chicane - cp_cruff - pl_clifftop

    --------------------------------------------------------------
    [UC] Boylee is in an unknown country.

  3. #3
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,530
    Cookies Given
    4,433
    Cookies Received
    4,007
    Blog Entries
    2
    oops ... whoami crashes the server when there is only one person on it

    EDIT: confirmed on laptop

  4. #4
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,530
    Cookies Given
    4,433
    Cookies Received
    4,007
    Blog Entries
    2
    Quote Originally Posted by MacNetron View Post
    oops ... whoami crashes the server when there is only one person on it

    EDIT: confirmed on laptop
    Corrected the WhoAmI code. If you're alone, server will tell so
    Updated script to 0.2.1.

  5. #5
    (1)Spudd has joined the game. Spudd's Avatar
    Join Date
    Dec 2008
    Posts
    1,936
    Cookies Given
    2,342
    Cookies Received
    626
    nice work Mac

  6. #6
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,530
    Cookies Given
    4,433
    Cookies Received
    4,007
    Blog Entries
    2
    Added command teams and teams! Stop whining and play better!
    Version 0.2.2

  7. #7
    Administrator
    L4D2 Group Co-ordinator
    Hawk's Avatar
    Join Date
    Nov 2008
    Posts
    6,722
    Cookies Given
    1,980
    Cookies Received
    3,442
    Blog Entries
    2
    now add some automated warning for swearing
    Last.Played


  8. #8
    Greater crested hermit ninja Boylee's Avatar
    Join Date
    Nov 2008
    Posts
    7,754
    Cookies Given
    6,341
    Cookies Received
    5,882
    could we make swearing three times autokick?
    cp_triplet - ctf_chicane - cp_cruff - pl_clifftop

    --------------------------------------------------------------
    [UC] Boylee is in an unknown country.

  9. #9
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,530
    Cookies Given
    4,433
    Cookies Received
    4,007
    Blog Entries
    2
    Quote Originally Posted by BoyLee View Post
    could we make swearing three times autokick?
    Of course we can, but then
    - this functionality is not really fitting this plugin;
    - besides, we have enough admins on the servers to enforce sanity;
    - Epic swearing still candidates a person for insta ban

    Quote Originally Posted by Hawk View Post
    now add some automated warning for swearing
    This is also very possible and more true to the talkiness (?) of the server.
    And admins can respond to it too (see above):
    example: [PSFC] Dear MacNetron, that counts as swearing! Mind the language!

    Do need a list then with words counting as swearing...

  10. #10
    Greater crested hermit ninja Boylee's Avatar
    Join Date
    Nov 2008
    Posts
    7,754
    Cookies Given
    6,341
    Cookies Received
    5,882
    Quote Originally Posted by MacNetron View Post
    Of course we can, but then
    - this functionality is not really fitting this plugin;
    - besides, we have enough admins on the servers to enforce sanity;
    - Epic swearing still candidates a person for insta ban
    I was just asking out of curiosity really.

    Quote Originally Posted by MacNetron View Post
    Do need a list then with words counting as swearing...
    Let her rip guys, send all and any abusive PM's to Mac's account!
    Last edited by Boylee; 09-10-2009 at 11:39.
    cp_triplet - ctf_chicane - cp_cruff - pl_clifftop

    --------------------------------------------------------------
    [UC] Boylee is in an unknown country.

  11. #11
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,530
    Cookies Given
    4,433
    Cookies Received
    4,007
    Blog Entries
    2
    Quote Originally Posted by BoyLee View Post
    [...]
    Let her rip guys, send all and any abusive PM's to Mac's account!


    Let it come, you know I will document it and list it in this thread

    I am coming to the point now that I'm thinking of heavily redesigning the plugin so that keywords that trigger a single, fixed response can be configured in a seperate text file. That will make it usable for other people/servers who want different responses...

    Note to self: check the advertisement plugin. There are options there like {CURRENTMAP}

  12. #12
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,530
    Cookies Given
    4,433
    Cookies Received
    4,007
    Blog Entries
    2
    I'm looking at the possibility to use a file structure similar to advertisements plugin (ie with KeyValues) to abstract the cookies out ot the code. (also see: http://wiki.alliedmods.net/KeyValues...Mod_Scripting) and http://forums.alliedmods.net/showthread.php?p=592536

    Text file might look like this:
    Code:
    "FortressCookies"
    {
    	"1"
    	{
    		"chat_equals"	"timeright"
    		"text"			"[FC] The timeright on this map is {RANDOM:12,96} MB or {RANDOM:128,512} frags"
    	}
    	"2"
    	{
    		"chat_equals"	"whoami"
    		"choose_1"		"epic,brave,coward,stupid,little,big,small,tiny,awesome"
    		"choose_2"		"kill,frag,blow up,evade,hide from,get away from,tickle,surprise,pay back"
    		"text"			"[FC] You are the {CHOOSE:choose_1} {CLIENT} trying to {CHOOSE:choose_2} {RANDOM_ENEMY}"
    	}
    	"3"
    	{
    		"chat_equals"	"stats,rank"
    		"text"			"[FC] Stats are for n00bs! You are ranked {RANDOM:12345,123456} on this server"
    	}
    	"4"
    	{
    		"chat_equals"	"rtv,rockthevote"
    		"text"			"[FC] This server is not interested in your opinion!"
    	}
    	"5"
    	{
    		"chat_contains"	"i blame"
    		"text"			"[FC] Blame who you like, the server knows {CLIENT} is the only one to blame"
    	}
    	"6"
    	{
    		"chat_contains"	"teams,teams!"
    		"text"			"[FC] Stop whining and play better FOR THE TEAM so they won't leave you!"
    	}
    	"7"
    	{
    		"chat_contains"	"fuck,asshole"
    		"text"			"[FC] Dear {CLIENT}, that is considered swearing! Mind the language!"
    	}
    }

  13. #13
    Administrator
    L4D2 Group Co-ordinator
    Hawk's Avatar
    Join Date
    Nov 2008
    Posts
    6,722
    Cookies Given
    1,980
    Cookies Received
    3,442
    Blog Entries
    2
    I was wondering, is there any possibility to base the "whoami" command on who you are dominating/dominated by?
    Last.Played


  14. #14
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,530
    Cookies Given
    4,433
    Cookies Received
    4,007
    Blog Entries
    2
    Quote Originally Posted by Hawk View Post
    I was wondering, is there any possibility to base the "whoami" command on who you are dominating/dominated by?
    No, on default it is not possible to know who you dominate or are dominated by with an easy sourcemod call. We need to implement additional stats-tracking for that. Also the reason why you do not see any domination related playstuff achievements yet.

  15. #15
    Greater crested hermit ninja Boylee's Avatar
    Join Date
    Nov 2008
    Posts
    7,754
    Cookies Given
    6,341
    Cookies Received
    5,882
    Any chance of getting "x is a n00b" / "y are noobs" / "my team are noobs" response implemented?

    Pretty please? Or would you rather I download the source and work out how myself?
    cp_triplet - ctf_chicane - cp_cruff - pl_clifftop

    --------------------------------------------------------------
    [UC] Boylee is in an unknown country.

  16. #16
    Administrator jim's Avatar
    Join Date
    Nov 2008
    Posts
    2,664
    Cookies Given
    337
    Cookies Received
    2,712
    if you're going to od that, don't do it to everyone, do it as a friendly message to only the player saying
    Cookie given from: Boylee.ps

  17. #17
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,530
    Cookies Given
    4,433
    Cookies Received
    4,007
    Blog Entries
    2
    Quote Originally Posted by jimbomcb View Post
    if you're going to od that, don't do it to everyone, do it as a friendly message to only the player saying
    Hum, sounds like a feature request: Add flags to be able to show the response to groups like "All" or "Client" or "Admins" ...
    Good point!

  18. #18
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,530
    Cookies Given
    4,433
    Cookies Received
    4,007
    Blog Entries
    2
    Feature request by a co-worker : replace swear words with other nicer words:

    Example: Love you! You are a carebear!


  19. #19
    AdminiBob almightybob's Avatar
    Join Date
    Nov 2008
    Posts
    3,446
    Cookies Given
    2,863
    Cookies Received
    2,947
    Blog Entries
    1
    How about one that triggers on "pwn" or "own"? People who type "ROFL pwn3d" after they kill you tend to irritate me.
    How about a response like "While you're typing about how awesome you are, a Spy is sneaking up behind you. Get on with the game."

  20. #20
    Administrator
    L4D2 Group Co-ordinator
    Hawk's Avatar
    Join Date
    Nov 2008
    Posts
    6,722
    Cookies Given
    1,980
    Cookies Received
    3,442
    Blog Entries
    2
    Let's not overdo this. Whenever someone types something of that list, it triggers a chain reaction and chat is spammed with the stuff 0_
    Last.Played


Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •