ServerRewards

Moved

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

5/5, 61 likes
  1. Is there a way to sell permission or group permission with a requirement playtime?
     
  2. [Oxide] 19:44 [Error] Failed to call hook 'cmdChangeElement' on plugin 'ServerRewards v0.3.6' (KeyNotFoundException: The given key was not present in the dictionary.)
    [Oxide] 19:44 [Debug] at System.Collections.Generic.Dictionary`2[System.UInt64,Oxide.Plugins.ServerRewards+OUIData].get_Item (UInt64 key) [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

    What is this? How to fix?
     
  3. SkinID doesnt seem to support the new id's added to the item list today, can it get an update?
     
  4. This may be more of an Oxide2/C# question but it's related to this, as I'm trying to use the CheckPoints hook in another plug-in after having gotten the TakePoint hook to work.

    My problem is that the CheckPoints returns an object data type and I'm not sure how to compare it to an integer value. Convert.ToInt32 and similar things tend to error out. Either a NullReferenceException, Invalid Cast, or 'The name `Convert' does not exist in the current context". The only references I have right now are Oxide.Core.Plugins and UnityEngine

    And pointers would be appreciated.
     
  5. Edit: Nvm..
     
  6. I was wondering if the plugin supported console commands, when the player buys a command, it turns the server time to day. How can I achieve this?
     
  7. add a command using /rewards add command then edit it in the config file, for command add env.time 9 or whatever number you want to put
     
  8. This is the snippet from my serverrewards_rewards.json. It also give the player credit for buying the dawn. If you wanted to only tell the player, as I do when they buy a VIP privelege like NTeleportation.vip, use "cm.say" instead of just "say"
    Code:
      "'Fraid of the Night.": {
          "Command": [
            "say $player.name has called forth the dawn.",
            "env.time 7"
          ],
          "Description": "Don't like the dark?  Hearing strange noises.  Buy this to change to dawn NOW!",
          "Cost": 2
        }
     
  9. +1 Is that possible?
     
  10. Damn, so it looks like there's errors around srnpc loot and sell items

    Code:
    (18:41:35) | [Oxide] 10:41 [Debug]   at System.Collections.Generic.Dictionary`2[System.UInt64,Oxide.Plugins.ServerRewards+SaleInfo].get_Item (UInt64 key) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.CreateSaleElement (.BasePlayer player) [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
    (18:41:41) | [RCON][154.58.124.97:51036] server.fps
    (18:41:41) | 189 FPS
    upload_2016-11-8_18-43-6.png

    Code:
    (18:42:59) | [Oxide] 10:43 [Error] Failed to call hook 'cmdSRNPC' on plugin 'ServerRewards v0.3.5' (KeyNotFoundException: The given key was not present in the dictionary.)
    (18:42:59) | [Oxide] 10:43 [Debug]   at System.Collections.Generic.Dictionary`2[System.Int32,Oxide.Plugins.ServerRewards+ItemInfo].get_Item (Int32 key) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.NPCLootMenu (.BasePlayer player, Int32 page) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.ServerRewards.cmdSRNPC (.BasePlayer player, System.String command, System.String[] args) [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
    (18:43:11) | [RCON][154.58.124.97:51036] server.fps
    (18:43:11) | 218 FPS
    Admittedly this is after removing a bunch of items from the data file, although it's still working to buy things, albeit with these weird gaps

    upload_2016-11-8_18-45-4.png
     
  11. You have to make sure the config is perfect or it resets.. took me like 10 tries to get right
     
  12. Set up a basic kit and reloaded, after attempting to buy it got console errors:

    <code>
    [Oxide] 16:05 [Error] Failed to call hook 'cmdBuyKit' on plugin 'ServerRewards v0.3.6' (DirectoryNotFoundException: Could not find a part of the path "C:\SERVICES\****SHARE\ftproot\rust\server\serverprofile\oxide\logs\ServerRewards-SpentRP_2016-11-08.txt".)

    (16:05:46) | [Oxide] 16:05 [Debug] at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0

    at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0

    at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)

    at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) [0x00000] in <filename unknown>:0

    at System.IO.StreamWriter..ctor (System.String path, Boolean append) [0x00000] in <filename unknown>:0

    at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)

    at System.IO.File.AppendAllText (System.String path, System.String contents) [0x00000] in <filename unknown>:0

    at ConVar.Server.Log (System.String strFilename, System.String strMessage) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.ServerRewards.TakePoints (System.Object userID, Int32 amount, System.String item) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.ServerRewards.cmdBuyKit (.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
    </code>

    Path is incorrect.. it should be in the "my_server_identify" folder then oxide, etc...
     
  13. Your not supposed to edit the data file manually. The only exeption is the URL because most times it won't fit into a chat command. Besides that everything else should be done via chat commands ingame or you end up with a store that looks like yours lol
    Restore a backup if you have one and do it properly
     
  14. It gets the path from oxide, I dont set where it goes. It might not like the characters in your folder name ****. Alternatively you can just disable transaction logging in the config to avoid this completely though if this is having trouble logging im going to assume every other plugin that's logs something will have the same issue
     
  15. Raspberries :D
    [DOUBLEPOST=1478650099][/DOUBLEPOST]
    Ok, cool luckily had a back up, doing my removals in game, would you consider adding the ability to add multiple numbers to the next version seeing as they all shift up one when you remove a number and have to reload the plugin every time you've removed one to make sure you're removing the right one. By the way, this is my favourite plugin.

    Also, I know others have asked for it but is there any chance of adding a categories button/filter, got a lot of items and have to make additinal npc's with custom lists otherwise.
     
    Last edited by a moderator: Nov 9, 2016
  16. Ignore, had old version
     

    Attached Files:

    Last edited by a moderator: Nov 9, 2016
  17. Immediately I apologize for my bad English.

    But, what is the point in the "items" to insert a reference to what or external expansion image sources if all the images of objects are present in the client and server? Not easy to take them on a straight line from there?
    [DOUBLEPOST=1478672446][/DOUBLEPOST]And the second question.
    Could it be a way how to create multiple sections "items" or in one section of the "items" to create multiple bookmarks? (For example, to sort items in the bookmarks weapons, clothing, ammunition, etc.)
     
  18. I have been unable to get this plugin to work at all since update. Players are not receiving points for any events, and cannot purchase any items. I have tried everything and even wiped the server clean of all ServerRewards files and freshly installed the new file. See the message below:

    (06:13:08) | [Oxide] 05:14 [Info] [ServerRewards] Saved player data

    (06:13:08) | [Oxide] 05:14 [Info] Unloaded plugin ServerRewards v0.3.6 by k1lly0u

    (06:13:08) | [Oxide] 05:14 [Info] Loaded plugin ServerRewards v0.3.6 by k1lly0u

    (06:13:08) | [Oxide] 05:14 [Warning] [ServerRewards] Playtime Tracker could not be found! Unable to monitor user playtime

    (06:13:08) | [Oxide] 05:14 [Warning] [ServerRewards] Creating and storing all UI elements to cache

    (06:13:08) | [Oxide] 05:14 [Warning] [ServerRewards] All UI elements created successfully!

    (06:13:08) | [Oxide] 05:14 [Error] Failed to call hook 'OnServerInitialized' on plugin 'ServerRewards v0.3.6' (NullReferenceException: Object reference not set to an instance of an object)

    (06:13:08) | [Oxide] 05:14 [Debug] at Oxide.Plugins.ServerRewards.OnPlayerInit (.BasePlayer player) [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

    (06:13:08) | [Oxide] 05:14 [Info] [ServerRewards] Saved reward data
     
  19. No worries. I just created the folder where it wanted it and it's all good.

    On another note, I see that you have all the items to sell in a data file, are they supposed to be coming up as items available to sell out of the box? My sell list in-game is empty except for one item I added. Is there a master compilation of all the items with url's for pictures/images?
     
  20. Hello,

    Is there an option to disable the "Sell Items" tab by adding a line in config?
    "Disable_SellItems": true
    or similar?