1. These forums are still being retired! Please use GitHub discussions or Discord. You cannot create new threads or new accounts now. If you need to contact some user of the forums, you should do it sooner, rather than later. This notice was last updated on May 30th, 2021.

TSReward - Requires SEconomy 1.0.1.0

Allows people to claim SEconomy curency for voting for the server on terraria-servers.com

  1. Ancientgods

    Plugin Developer Zero Day Plugin Author

    Joined:
    Sep 15, 2013
    Messages:
    712
    Description
    This plugin allows players to claim SEconomy currency when they have voted on terraria-servers.com by using a command.
    New: added the ability to execute commands upon claiming a reward.

    Commands
    /reward - checks if a user has voted, if so, give them a reward. (Vote is marked as claimed after doing so, which means this can only be used once a day).
    /tsreload - reloads the config file

    Permission
    tsreward.reload - ability to use /tsreload

    How does it work?
    Download the plugin and put it in your serverplugins folder (this requires a server restart).
    After doing so edit the config file (TSReward.json) and fill in your server key at the top.

    Where do I obtain the server key?
    Click here (Requires an account and a server listed on terraria-servers.com)
    And look for "Server API Key".

    Example config file
    Code:
    {
      "ServerKey": "ServerKeyGoesHere",  <------ Put your server key found in above link here
      "SEconomyReward": 1000,  <----- the amount of SEconomy currency players will receive upon claiming their reward.
      "AnnounceOnReceive": true,  <----- Announce the Seconomy transaction to the player receiving the reward Eg: "You gained 68 copper for voting on terraria-servers.com"
      "Commands": [    <------ a list of commands that will be run upon claiming a reward
        "/heal %playername%",
        "/firework %playername%"
      ]
      "VoteNotFoundMessage": {    <------- the message that is displayed when the player hasn't voted yet.
        "Color": {
          "R": 40,
          "G": 160,
          "B": 240
        },
        "Text": [
          "Vote not found!",
          "If you haven't voted yet, please go to terraria-servers.com and",
          "vote for the server to receive ingame rewards!"
        ]
      },
      "OnRewardClaimMessage": {  <------ the message that is displayed when the player receives his reward
        "Color": {
          "R": 40,
          "G": 160,
          "B": 240
        },
        "Text": [
          "Thank you for voting on terraria-servers.com",
          "We really appreciate it!"
        ],
      },
      "ShowIntervalMessage": true,  <------ toggles the interval message
      "IntervalInSeconds": 300,  <------- interval of the message (in seconds)
      "IntervalMessage": {    <----- message displayed on the interval
        "Color": {
          "R": 40,
          "G": 160,
          "B": 240
        },
        "Text": [
          "Vote on terraria-servers.com and receive 1000 coins!",
          "After voting you can use the command /reward!"
        ]
      }
    }
     
    • Like Like x 4
    #1 Ancientgods, May 26, 2014
    Last edited: Mar 9, 2015
  2. Tauriel

    Tauriel Level 4

    Joined:
    Apr 30, 2014
    Messages:
    67
    Great plugin, keep up the good jobs!
     
    • Like Like x 1
  3. IamUSER

    IamUSER Level 7

    Joined:
    Jul 29, 2013
    Messages:
    184
    I was just going to ask if you could add the ability to run commands when the reward is given. Just in general so it can be used for items, buffs, alias commands, etc. As always excellent work!
     
    • Like Like x 1
  4. Ijwu

    Ijwu Level 11

    Joined:
    Apr 4, 2012
    Messages:
    644
    Approved.
     
    • Like Like x 1
  5. Ancientgods

    Plugin Developer Zero Day Plugin Author

    Joined:
    Sep 15, 2013
    Messages:
    712
    Good idea, I will add the ability to run commands for sure :)
     
    • Like Like x 1
  6. Ancientgods

    Plugin Developer Zero Day Plugin Author

    Joined:
    Sep 15, 2013
    Messages:
    712
    Updated! Added the ability to run commands (Please delete your config file so a new one can be generated).

    Edit: Please note that any command can be executed and will not do a permission check since they're executed by the server.
     
    • Like Like x 1
  7. Endimmion

    Endimmion Level 1

    Joined:
    Nov 22, 2013
    Messages:
    20
    Great job laurens. I will add a link to it on the API page as soon as possible
     
    • Like Like x 1
  8. IamUSER

    IamUSER Level 7

    Joined:
    Jul 29, 2013
    Messages:
    184
    Love it!
     
    • Like Like x 1
  9. edu0911

    edu0911 Level 0

    Joined:
    Sep 28, 2013
    Messages:
    1
    Seems Really Extrordinary
     
  10. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    I know you kept this up because someone actually donated for it, but it'll be kinda useless with SEconomy down. Oh, the irony.
     
    • Like Like x 1
  11. Ancientgods

    Plugin Developer Zero Day Plugin Author

    Joined:
    Sep 15, 2013
    Messages:
    712
    Yea next api version I should probably remove anything that has to do with SEconomy
     
  12. alerek

    alerek Level 6

    Joined:
    Jul 25, 2011
    Messages:
    125
    Might want to archive this thread as its dependency is no longer available >.>
     
  13. XNightmareX

    XNightmareX Level 0

    Joined:
    Jun 29, 2014
    Messages:
    2
    When will SEconomy be back up? Probably never is my guess.
     
  14. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    It exists outside of the TShock forums.
     
  15. StarTrooper

    StarTrooper Level 2

    Joined:
    Jun 19, 2013
    Messages:
    36
    Would you happen to have a link? I've been looking for SEconomy for a while.
     
  16. Ijwu

    Ijwu Level 11

    Joined:
    Apr 4, 2012
    Messages:
    644

    We're working on possibly getting SEconomy back on here. I hope everyone can bear with us for a bit.
     
    • Like Like x 1
  17. StarTrooper

    StarTrooper Level 2

    Joined:
    Jun 19, 2013
    Messages:
    36
    I'm not in a terrible hurry, the server I am running is fairly new and I'm slowly getting all the plugins together to help it float. :)
     
    • Like Like x 1
  18. Spritex

    Spritex Level 1

    Joined:
    Aug 4, 2014
    Messages:
    7
    This is driving me insane, respond as soon as possible, when I use /reward it crashses my server please help DX
     
    • Agree Agree x 1
  19. Kojiro_S

    Kojiro_S Level 11

    Joined:
    Feb 16, 2014
    Messages:
    659
    1- He doesn't seem to come here too often lately.
    2- In the meantime, mind pasting the error message? Asking desperately for help without exposing the actual problem tends to be... aggravating.
     
  20. Spritex

    Spritex Level 1

    Joined:
    Aug 4, 2014
    Messages:
    7
    Thank you for responding, here is the error code - Unhandled Exception: System.MissingMethod: Method not found: Wolfje.Plugins.SEconomy.Economy.EconomyPlayer Wolfje.Plugins.SEconomy.SEConomyplugin.GetEconomyPlayerSafe<Int32>'.
    at TSREWARD.TSReward.<>c__DisplayClass3.<Reward>B__2<>
    at System.Threading.ThreadHelper.ThreadStart_Context<Object state>
    at System.Threading.ExecutionContext.RunInternal<ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx>
    at System.Threading.ExecutionContext.Run<ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSync Ctx>
    ContextCallback callback, object state>
    at System.Threading.ThreadHelper.Threadstart<>

    I was so determined I had to type that whole thing out