ServerRewards

Moved

Total Downloads: 14,033 - First Release: Mar 2, 2016 - Last Update: Jun 9, 2018

5/5, 61 likes
  1. yes, but nothing happens after put this command in the chat, /rewards add item <cost>

    but anyway, there need to be a way to set me as the admin and configure this plugin ? or maybe every user can cerate any kits and adding items in to server rewards ? hmmm no sense, but don't see any permission on first page..
     
  2. ok have solve that commands access isuue ...

    but, is there a way to give player RP poins for killing other players and animals too ?
     
    Last edited by a moderator: Sep 24, 2016
  3. Have you set yourself as owner by doing ownerid (steam64id) (name) if you have already done that you should be able to do the command on default, try reinstalling and wiping all old server rewards data if you had any
     
  4. getting this error [Oxide] 14:41 [Error] Failed to call hook 'OnServerInitialized' on plugin 'ServerRewards v0.3.21' (KeyNotFoundException: The given key was not present in the dictionary.)
    plugin needs update??
     
    Last edited by a moderator: Sep 24, 2016
  5. Please can a helpful member of the community fix this buggy plugin. My players keep getting stuck in the shop. I'm on the verge of removing it which is annoying as I switched all my kits over to only use the shop.
     
  6. anyway to add an expiry to commands similar to how SDonate works?
     
  7. Wulf

    Wulf Community Admin

    What is wrong with it? @k1lly0u is still active.
     
  8. The gui for the rewards shop bugs out and players get stuck in it. The buttons on the top vanish. There's also a ton of console errors. Like the dictionary one a couple posts up. @k1lly0u tagged. Dude we really need a fix otherwise I gotta remove it altogether which I really don't wanna do as I have a cool npc shop which is breathing life into a town.
     
  9. is there a way to give player RP poins for killing other players and animals ?
     
  10. can you add an option to commands in the store , so that you can only buy them certain amount of times??
     
  11. this is exactly what i need, thank you
     
  12. Strange problem:

    The rest of my serverrewards_rewards.json file is just fine. store is tops, thanks

    but, I wanted to add a thing where a player could buy a heli.

    "RewardCommands": {
    "Call Heli to my position": {
    "Command": [
    "callheli $player.name"
    ],
    "Description": "",
    "Cost": 5000
    }

    It worked twice, without fail, then this started happening;

    (18:12:05) | [Oxide] 18:12 [Info] [HeliControl] Could not find player: [WAR]

    WAR being the players clan (when there are multiple folks on)

    any way to escape spaces like one would in unix? e.g. "\" ?

    also, the callheli pos $player.x, $player.y, $player.z command did not work...

    any ideas why?
     
  13. Could be an error in parsing the player's name. I'm guessing you either have the Clans plug-in installed or a player who's name starts with "[WAR] " with the space afterwards. The HeliControl plug-in might be seeing the space as a break between the player's name and the number of heli's to call in.

    I haven't had this problem with Server Reward, but all of the plug-ins I have used it with don't use a variable number of arguments. I have seen similar issues using Rust Admin's scheduled commands feature. In that case I use single quotes to force the whole name to be passed as a single arguments.
    Try this:
    Code:
    "RewardCommands": {
        "Call Heli to my position": {
          "Command": [
            "callheli '$player.name' "
          ],
          "Description": "",
          "Cost": 5000
        }
    
    Edit: Also, the callheli pos command requires a number of heli's argument. Try:
    Code:
    "callheli pos $player.x, $player.y, $player.z  1"
    More detailed explanation:
    HeliControl has three options for the callheli command
    Code:
    callheli
    callheli <playername>
    callheli <playername> <amount of heli' to call>
    The only way it knows the difference is based on the number of arguments passed to it. Each one is separated by a space. So if you send callheli Windamyre it sends one heli to Windamyre. if you send callheli Windamyre 3 it sends 3 heli's to Windamyre. If you send callheli [Clan] Windamyre it sends Windamyre heli's to [Clan]. This causes two problems 1) there is no player named [Clan] and two there is no such number Windamyre. The plug-in errors on the first issue and never gets to the second.
    To prevent this you have to wrap the name in quotes to have it treat the space between [Clan] and Windamyre as part of the name and not the break point between <playername> and <amount of heli' to call>
    If you use double quotes it'll confuse the Server Rewards plug-in because the command string will stop suddenly, so use single quotes.
     
  14. So here's a pile of people who logged out because they couldn't get out of the NPC store and I wasnt online to manually reset the plugin for them and the scheduled auto reload didn't help em either, I've since walled off my NPC's and disabled them and reinstated /s as it's not buggy like the NPC store :( I really did like it as a feature but I can't have my population destroyed given we are a low pop server trying to grow.
    sdfghj.jpg
     
    Last edited by a moderator: Sep 25, 2016
  15. Code:
    (02:15:21) | [Oxide] 18:15 [Error] Failed to call hook 'cmdChangeElement' on plugin 'ServerRewards v0.3.21' (KeyNotFoundException: The given key was not present in the dictionary.)
    (02:15:22) | [Oxide] 18:15 [Debug]   at System.Collections.Generic.Dictionary`2[Oxide.Plugins.ServerRewards+ElementType,Oxide.Game.Rust.Cui.CuiElementContainer[]].get_Item (ElementType key) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.GetElement (ElementType type, Int32 page, System.String npcid) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.SwitchElement (.BasePlayer player, ElementType type, Int32 page, System.String npcid) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.cmdChangeElement (.Arg arg) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    (02:15:24) | [Oxide] 18:15 [Error] Failed to call hook 'cmdChangeElement' on plugin 'ServerRewards v0.3.21' (KeyNotFoundException: The given key was not present in the dictionary.)
    (02:15:24) | [Oxide] 18:15 [Debug]   at System.Collections.Generic.Dictionary`2[Oxide.Plugins.ServerRewards+ElementType,Oxide.Game.Rust.Cui.CuiElementContainer[]].get_Item (ElementType key) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.GetElement (ElementType type, Int32 page, System.String npcid) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.SwitchElement (.BasePlayer player, ElementType type, Int32 page, System.String npcid) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.cmdChangeElement (.Arg arg) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    (02:15:25) | [Oxide] 18:15 [Error] Failed to call hook 'cmdChangeElement' on plugin 'ServerRewards v0.3.21' (KeyNotFoundException: The given key was not present in the dictionary.)
    (02:15:25) | [Oxide] 18:15 [Debug]   at System.Collections.Generic.Dictionary`2[Oxide.Plugins.ServerRewards+ElementType,Oxide.Game.Rust.Cui.CuiElementContainer[]].get_Item (ElementType key) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.GetElement (ElementType type, Int32 page, System.String npcid) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.SwitchElement (.BasePlayer player, ElementType type, Int32 page, System.String npcid) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.cmdChangeElement (.Arg arg) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    (02:15:26) | [Oxide] 18:15 [Error] Failed to call hook 'cmdChangeElement' on plugin 'ServerRewards v0.3.21' (KeyNotFoundException: The given key was not present in the dictionary.)
    (02:15:26) | [Oxide] 18:15 [Debug]   at System.Collections.Generic.Dictionary`2[Oxide.Plugins.ServerRewards+ElementType,Oxide.Game.Rust.Cui.CuiElementContainer[]].get_Item (ElementType key) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.GetElement (ElementType type, Int32 page, System.String npcid) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.SwitchElement (.BasePlayer player, ElementType type, Int32 page, System.String npcid) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.cmdChangeElement (.Arg arg) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    (02:15:27) | [Oxide] 18:15 [Error] Failed to call hook 'cmdChangeElement' on plugin 'ServerRewards v0.3.21' (KeyNotFoundException: The given key was not present in the dictionary.)
    (02:15:27) | [Oxide] 18:15 [Debug]   at System.Collections.Generic.Dictionary`2[Oxide.Plugins.ServerRewards+ElementType,Oxide.Game.Rust.Cui.CuiElementContainer[]].get_Item (ElementType key) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.GetElement (ElementType type, Int32 page, System.String npcid) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.SwitchElement (.BasePlayer player, ElementType type, Int32 page, System.String npcid) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.cmdChangeElement (.Arg arg) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
     
  16. Quick question about the item entries. What effect does the TargetID have? I'm guessing Skin is for items like shirts and Large Storage boxes that have different colors/appearances.
    Example:
    Code:
    "DisplayName": "Research Paper",
          "URL": "http://vignette3.wikia.nocookie.net/play-rust/images/a/ac/Research_Paper_icon.png/revision/latest?cb=20160819103106",
          "ID": 540154065,
          "Amount": 1,
          "Skin": 0,
          "Cost": 8,
          "TargetID": 0  <---What does this do?
        }
     
  17. Code:
    8) | [Oxide] 18:21 [Info] Loaded plugin ServerRewards v0.3.21 by k1lly0u
    (02:21:48) | [Oxide] 18:21 [Warning] [ServerRewards] Creating and storing all UI elements to cache
    (02:21:48) | [Oxide] 18:21 [Error] Failed to call hook 'GetKitContents' on plugin 'Kits v3.1.10' (NullReferenceException: Object reference not set to an instance of an object)
    (02:21:48) | [Oxide] 18:21 [Debug]   at Oxide.Plugins.Kits.GetKitContents (System.String kitname) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Kits.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    (02:21:48) | [Oxide] 18:21 [Error] Failed to call hook 'OnServerInitialized' on plugin 'ServerRewards v0.3.21' (KeyNotFoundException: The given key was not present in the dictionary.)
    (02:21:48) | [Oxide] 18:21 [Debug]   at System.Collections.Generic.Dictionary`2[System.Int32,System.UInt32].get_Item (Int32 key) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.CreateItemEntry (Oxide.Game.Rust.Cui.CuiElementContainer& container, System.String panelName, Int32 itemnumber, Int32 number) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.CreateItemsElement (Int32 page) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.CreateItemsUI () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.InitializeAllElements () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.OnServerInitialized () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    I've now had to turn off all tabs except kits as clicking anything else would glitch the store :(
     
    Last edited by a moderator: Sep 26, 2016
  18. doesnt work, replies with
    (07:33:27) | [Oxide] 07:33 [Info] [HeliControl] Could not find player: '[ADMIN] Knullrufs'

    and

    returns with:
    (07:35:04) | [Oxide] 07:35 [Info] [HeliControl] Incorrect argument supplied for X coordinate!

    and also adding it inside single quotes as described like so:
    "callheli pos '$player.x, $player.y, $player.z' 1"

    returns with
    (07:37:27) | [Oxide] 07:37 [Info] [HeliControl] You must supply 3 args for coordinates!