Raised This Month: $51 Target: $400
 12% 

[Any] Merx - A generic point system (build 34)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
necavi
Veteran Member
Join Date: Sep 2010
Plugin ID:
3701
Plugin Version:
Plugin Category:
Gameplay
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    A generic point system which allows server operators complete control
    Old 06-19-2013 , 21:42   [Any] Merx - A generic point system (build 34)
    Reply With Quote #1

    Merx
    Overview:
    • Tracks players points according to events.
    • Completely configurable events and rewards.
    • Completely configurable menus, able to use any client/server command.
    • Supports both MySQL and SQLite
    Cvars:
    This plugin doesn't have a terribly large number of Cvars, most configuration is done through the keyvalue configs.
    • merx_version - Either the current build number or CUSTOM for a hand-compile.
    • merx_default_points - Sets the default number of points to give new players.
    • merx_save_timer - Sets the duration between automatic saves.
    • merx_tag - Controls the command tag for merx.
    Commands:
    • sm_points - Displays your current points.
    • sm_toppoints - Displays the top players on the server by points.
    • sm_merxmenu - Displays the points menu.
    • giveitem (cheat) - Give client an item.
    Installation:
    1. Grab the latest build from: http://ci.0xf.org/job/Merx/lastStableBuild/
    2. Copy /addons/ in the zip to /addons/ on your server (if updating, beware of overwriting your existing configurations)
    3. (Optional) Navigate to the /configs/ directory
    4. (Optional) Add an entry for merx in the databases.cfg file
    5. (Optional) Navigate to the /merx/ directory
    6. (Optional) Modify the events for your game. Event files are in the format <gamedir>.events.txt
    7. (Optional) Modify the menus for your game. Menu files are in the format <gamedir>.<team>.menus.txt
    8. Start the server
    Modules:
    Merx_Points (Required): Provides the point API and saves/loads points from the database.
    Merx_Menus (Optional): Provides the shopmenu, selling items defined in the config.
    Merx_Events (Optional): Rewards players for certain events as defined in the config.
    Merx_Commands (Optional): Provides a few useful commands.
    Configuration:
    Events:
    PHP Code:
    // Name of the event to hook
    "player_death"
        
    {
            
    // Message to be sent to the selected client(s)
            
    "format"            "You earned {olive}2{default} points for killing %N."
            
    // Event keys to use in the format
            
    "formatkeys"
            
    {
                
    // Key is the event key, value is the field type
                //     Use %d for short, byte or long
                //     Use %f for float
                //     Use %b for bool
                //     Use %s for string
                // Additional field types
                //     Any field that has a client (userid, attacker, victim, etc) can use the client fieldtype
                //    Use %N or %L for clients
                //    Any field that has a team number (winner) can use the team fieldtype
                //    Use %s for teams
                // Additional information can be found at: http://wiki.alliedmods.net/Format_Class_Functions_%28SourceMod_Scripting%29
                
    "userid"        "client"
            
    }
            
    // If this format string is a translation string, set this to 1
            
    "translated"        "0"
            
    // This is the target to be rewarded for completing this event
            
    "rewardtarget"        "attacker"
            
    // Do NOT reward the target if this field matches the target field
            
    "rewardifnotequals"    "userid"
            
    // Reward the player's entire team for completing this event
            
    "rewardteam"        "0"
            
    // The amount of points to reward the player
            
    "reward"            "5"
            
    // Whether to notify all players or just the players being rewarded
            
    "notifyall"            "0"
        

    Changelog:
    http://ci.0xf.org/job/Merx/changes
    Important Links:
    Github: http://github.com/necavi/merx/
    Jenkins: http://ci.0xf.org/job/merx/
    Changelog: https://github.com/necavi/Merx/commits/master
    Latest Build:
    http://ci.0xf.org/job/Merx/lastStableBuild/
    Original Inspiration: https://forums.alliedmods.net/showthread.php?t=110229
    List of Source events: http://wiki.alliedmods.net/Game_Events_%28Source%29

    Last edited by necavi; 07-08-2013 at 19:40.
    necavi is offline
    API
    Veteran Member
    Join Date: May 2006
    Old 06-20-2013 , 00:30   Re: [Any] Merx - A generic point system
    Reply With Quote #2

    Very cool! This should cut down on the number of people requesting the simple point / shop menus.
    __________________
    API is offline
    Send a message via AIM to API
    noctua
    Member
    Join Date: Dec 2010
    Old 06-21-2013 , 06:08   Re: [Any] Merx - A generic point system
    Reply With Quote #3

    Menu not working for me (SM 1.47, MM 1.9.2)
    OS: Win x64 (local test server) Game: Left4Dead1

    L 06/21/2013 - 11:483: [Merx_Points.smx] Error creating update trigger. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS [UpdateLastTime] AFTER UPDATE ON `merx_players` FOR EACH ROW BEGIN' at line 1.
    L 06/21/2013 - 11:49:52: [SM] Native "KvRewind" reported: Invalid key value handle 0 (error 4)
    L 06/21/2013 - 11:49:52: [SM] Displaying call stack trace for plugin "Merx_Menus.smx":
    L 06/21/2013 - 11:49:52: [SM] [0] Line 28, Merx_Menus.sp::Native_ShowPlayerMenu()
    L 06/21/2013 - 11:49:52: [SM] Native "ShowPlayerMenu" reported: Error encountered while processing a dynamic native
    L 06/21/2013 - 11:49:52: [SM] Displaying call stack trace for plugin "Merx_Commands.smx":
    L 06/21/2013 - 11:49:52: [SM] [0] Line 39, Merx_Commands.sp::ConCmd_MerxMenu()
    noctua is offline
    Happy DODs player
    AlliedModders Donor
    Join Date: Sep 2009
    Old 06-21-2013 , 07:08   Re: [Any] Merx - A generic point system
    Reply With Quote #4

    There ar config added for css, and lfd i see.

    Can you also incl a cfg for the Teamfortress 2 lovers.

    Last edited by Happy DODs player; 06-21-2013 at 07:11.
    Happy DODs player is offline
    necavi
    Veteran Member
    Join Date: Sep 2010
    Old 06-21-2013 , 10:21   Re: [Any] Merx - A generic point system
    Reply With Quote #5

    Noctua: I'll have a patch ready shortly for your issue, I wasn't able to test using MySQL initially but that will be a simple fix.

    Edit: Updated to fix the SQL error, you'll have to either recreate your data base or alter the table to have `player_lastseen` default to ON UPDATE CURRENT_TIMESTAMP()

    Happy_DODs_player: I haven't built one, but if you do so I would gladly include it in the release!

    Last edited by necavi; 06-21-2013 at 10:34.
    necavi is offline
    Happy DODs player
    AlliedModders Donor
    Join Date: Sep 2009
    Old 06-21-2013 , 10:33   Re: [Any] Merx - A generic point system
    Reply With Quote #6

    @ Necavi:

    I m not that handy with creating this even if it may be so simple for others. So i will waitgrathfully for your version.

    ( Wonderfull plugin btw love it )
    Happy DODs player is offline
    necavi
    Veteran Member
    Join Date: Sep 2010
    Old 06-21-2013 , 10:45   Re: [Any] Merx - A generic point system
    Reply With Quote #7

    I can give it a try, quite frankly I'm pretty out of it when it comes to balancing (one of the main reasons I made the plugin so incredibly configurable) and I'm...not quite sure what rewards to give to the menu configs. Then again, the menu module is not required...the only required module is Merx_Points.
    necavi is offline
    noctua
    Member
    Join Date: Dec 2010
    Old 06-21-2013 , 12:44   Re: [Any] Merx - A generic point system
    Reply With Quote #8

    Edit: forget this, was my fault

    can you give a example for killing a bot tank?
    This is not working :/
    Code:
        "tank_killed"
        {
            "format"            "All earned 5 points for killing a Tank."
            "formatkeys"
            {
                "userid"        "client"
            }
            "translated"        "0"
            "rewardtarget"        "attacker"
            "rewardifnotequals"    "userid"
            "rewardteam"        "1"
            "reward"            "5"
            "notifyall"            "1"
        }

    Last edited by noctua; 06-21-2013 at 13:49.
    noctua is offline
    necavi
    Veteran Member
    Join Date: Sep 2010
    Old 06-21-2013 , 18:56   Re: [Any] Merx - A generic point system
    Reply With Quote #9

    Certainly. If you have any more questions or need additional keys created or anything like that, just tell me. Personally I would change it to "The Survivors earned 5 points for killing a tank." in case of versus mode.
    necavi is offline
    noctua
    Member
    Join Date: Dec 2010
    Old 06-22-2013 , 06:39   Re: [Any] Merx - A generic point system
    Reply With Quote #10

    Yes, but with the code from above, no points given out, something must be wrong. Its a coop server, players should earn points for killing infected bots.
    noctua is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 13:49.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode