Rewards

Moved

Total Downloads: 2,855 - First Release: Jun 11, 2016 - Last Update: Nov 10, 2017

5/5, 16 likes
  1. Confirmed
    [DOUBLEPOST=1507311481][/DOUBLEPOST]@Wulf Is there anyone that could take this plugin over? every time it breaks the original developer is never around to fix it and a ton of people use this one :)
     
  2. Getting the same issue, barrel points and quests give RP just fine, but this doesn't allow for animal and player kills

    Its showing the rewards in chat, but not logging the points to spend
     
  3. Wulf

    Wulf Community Admin

    Please test the latest Oxide snapshot here: AppVeyor

    Should fix plugins using the wrong hook arguments in the plugin they are relying on (ie. Economics) by sending new object[ "blah", blah ] instead of the actual hook's args in the plugin they are calling or sending an int when the target plugin expects a double.
     
  4. Edit cs file
    Easy to change, I recovered function

    Code:
    before
    Economics?.Call("Deposit", player.userID, amount);
    after
    Economics?.Call("Deposit", player.userID, (int)amount);before
    ServerRewards?.Call("AddPoints", new object[] { player.userID, amount });after
    ServerRewards?.Call("AddPoints", new object[] { player.userID, (int)amount });before
    if (!(bool)Economics?.Call("Transfer", victim.userID, player.userID, rewardrates.human * multiplier))after
    if (!(bool)Economics?.Call("Transfer", victim.userID, player.userID, (int)rewardrates.human * (int)multiplier))before
    Economics?.Call("Deposit", player.userID, rewardrates.human * multiplier);after
    Economics?.Call("Deposit", player.userID, (int)rewardrates.human * (int)multiplier);before
    ServerRewards?.Call("TakePoints", new object[] { victim.userID, rewardrates.human * multiplier });after
    ServerRewards?.Call("TakePoints", new object[] { victim.userID, (int)rewardrates.human * (int)multiplier });before
    ServerRewards?.Call("AddPoints", new object[] { player.userID, rewardrates.human * multiplier });after
    ServerRewards?.Call("AddPoints", new object[] { player.userID, (int)rewardrates.human * (int)multiplier });
    
     
  5. Wulf

    Wulf Community Admin

    Or just update Oxide to the snapshot I mentioned. The changes you made are fine, but the new object[] creation can be removed too as that's technically sending as the wrong type.
     
  6. Can confirm this version fixes the rewards issue. Applied to our test server and will be applying to love in the morning if official release not out yet
     
  7. Hi.
    I have a problem with RP.
    The plugin shows that I got the RP, but it does not add it.
    Screenshot
    Rewards 1.3.10
    Economics 2.0.5
     
  8. Update oxide
     
  9. Oxide build 2.0.3515 (build 1644, protocol 2022.152.1)
     
  10. Wulf

    Wulf Community Admin

    3520 would have the fix for this plugin sending the wrong arguments to its dependent plugins. :p
     
  11. Thank you @maxaki, @Wulf :)
     
  12. no RP for kill a bot from botspawn :/
     
  13. Hi, it's possible add Optional Dependencies BotSpawn plugin?? Thanks.
     
  14. how to add rewards for murderer? any can help?

    else if (victim.name == ("assets/prefabs/npc/murderer/murderer.prefab"))
    {
    RewardPlayer(info?.Initiator?.ToPlayer(), rewardrates.zombie, totalmultiplier, Lang("zombie", info?.Initiator?.ToPlayer().UserIDString));


    im add this in the plugin but dont work any have other idea? for reward in murderer?
     
    Last edited by a moderator: Nov 1, 2017
  15. getting this after todays update

    Code:
    (14:09:30) | [Oxide] 14:09 [Error] Failed to call hook 'OnPlayerInit' on plugin 'Rewards v1.3.10' (NullReferenceException: Object reference not set to an instance of an object)
    (14:09:30) | [Oxide] 14:09 [Stacktrace]   at Oxide.Core.Libraries.Covalence.Formatter+Lexer.Lex (System.String text) [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.Covalence.Formatter.Parse (System.String text) [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.Covalence.Formatter.ToTreeFormat (System.String text, System.Collections.Generic.Dictionary`2 translations) [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.Covalence.Formatter.ToUnity (System.String text) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Player.Message (.BasePlayer player, System.String message, System.String prefix, UInt64 userId) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Rust.SendChatMessage (.BasePlayer player, System.String name, System.String message, System.String userId) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Rewards.SendChatMessage (.BasePlayer player, System.String prefix, System.String msg, System.Object uid) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Rewards.RewardPlayer (.BasePlayer player, Double amount, Double multiplier, System.String reason, Boolean isWelcomeReward) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Rewards.OnPlayerInit (.BasePlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Rewards.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.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 hook, System.Object[] args) [0x00000] in <filename unknown>:0
     
  16. same issue thanks :)
     
  17. Yep same thing here
     
  18. Same. Also getting this

    Code:
    (17:36:50) | Failed to run a 60.00 timer in 'Rewards v1.3.10' (NullReferenceException: Object reference not set to an instance of an object)
    (17:36:50) | at Oxide.Core.Libraries.Covalence.Formatter+Lexer.Lex (System.String text) [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.Covalence.Formatter.Parse (System.String text) [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.Covalence.Formatter.ToTreeFormat (System.String text, System.Collections.Generic.Dictionary`2 translations) [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.Covalence.Formatter.ToUnity (System.String text) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Player.Message (.BasePlayer player, System.String message, System.String prefix, UInt64 userId) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Rust.SendChatMessage (.BasePlayer player, System.String name, System.String message, System.String userId) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Rewards.SendChatMessage (.BasePlayer player, System.String prefix, System.String msg, System.Object uid) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Rewards.RewardPlayer (.BasePlayer player, Double amount, Double multiplier, System.String reason, Boolean isWelcomeReward) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Rewards.<Init>m__0 () [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00000] in <filename unknown>:0
     
  19. Same issue, getting this on Magic loot too
     
  20. either all the plugins need to be updated or oxide can over ride the command.
    Ive no clue :)