Happy Hour

You want to give players some items in specific times?This plugin just for it :)

Total Downloads: 911 - First Release: Feb 5, 2015 - Last Update: Mar 30, 2015

5/5, 4 likes
  1. Feramor submitted a new resource:

    Happy Hour - You want to give players some items in specific times?This plugin just for it :)

    Read more about this resource...
     
  2. dude,

    I like your plugin but can not edit for hourly working

    whatever I did after restart or reload the plugin, it's included next event time auto

    I just want to use your plugin for hourly give gift which should be happen 24times a day!

    can you please help me for fix the problem and advise example config file data for 24 gift a day?
     
  3. Next event will be calculated automaticly so you shouldnt worry about them.you should set times like "22:00:00" in the default config you can add as much as event you want
     
  4. sorry but still not working.

    If you can give sample config file I will be appreciate that. for example I want to give apple to the players everyhour and want to send notification message for it. can you assit for config file which should be give apple every hour continuesly(i.e. not onle 1 or 50 times I mean continuously)
     
  5. Here you go,
    Code:
    {
        "Time": "600",
        "ChatTag": "Happy Hour",
        "HappyHours": {
            "00:00:00": {
                "Message": "Time is 00:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "01:00:00": {
                "Message": "Time is 01:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "02:00:00": {
                "Message": "Time is 02:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "03:00:00": {
                "Message": "Time is 03:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "04:00:00": {
                "Message": "Time is 04:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "05:00:00": {
                "Message": "Time is 05:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "06:00:00": {
                "Message": "Time is 06:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "07:00:00": {
                "Message": "Time is 07:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "08:00:00": {
                "Message": "Time is 08:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "09:00:00": {
                "Message": "Time is 09:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "10:00:00": {
                "Message": "Time is 10:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "11:00:00": {
                "Message": "Time is 11:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "12:00:00": {
                "Message": "Time is 12:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "13:00:00": {
                "Message": "Time is 13:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "14:00:00": {
                "Message": "Time is 14:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "15:00:00": {
                "Message": "Time is 15:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "16:00:00": {
                "Message": "Time is 16:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "17:00:00": {
                "Message": "Time is 17:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "18:00:00": {
                "Message": "Time is 18:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "19:00:00": {
                "Message": "Time is 19:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "20:00:00": {
                "Message": "Time is 20:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "21:00:00": {
                "Message": "Time is 21:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "22:00:00": {
                "Message": "Time is 22:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            },
        "23:00:00": {
                "Message": "Time is 23:00:00",
                "Items": {
                    "Apple": {
                        "Amount": 1,
                        "Type": "Main"
                    }
                }
            }
        }
    }
     
  6. THANKS A LOT perfect.

    I guess it will not work only 24hrs(24times) and will keep resume working next day
     
    Last edited by a moderator: Feb 7, 2015
  7. After an event occurs its recalculate next event by adding 24hrs
     
  8. Hi! Great plugin! But i have error:

    Code:
    [Oxide] 5:29 PM [Error] HappyHour: KeyNotFoundException while calling OnTick: The given key was not present in the dictionary.
      at System.Collections.Generic.Dictionary`2[System.String,System.Object].get_Item (System.String key) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HappyHour.OnTick () [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
     
  9. Code:
    AM [Error] HappyHour: KeyNotFoundException while calling OnTick: The given key was not present in the dictionary.
      at System.Collections.Generic.Dictionary`2[System.String,System.Object].get_Item (System.String key) [0x00000] in <filename unknown>:0
     
    Last edited by a moderator: Feb 8, 2015
  10. hello,

    getting error with rust v1191 oxide 2.0.266
    Code:
    [2/7/2015 11:07:20 PM] [Oxide] 11:07 PM [Error] HappyHour: KeyNotFoundException while calling OnTick: The given key was not present in the dictionary.
      at System.Collections.Generic.Dictionary`2[System.String,System.Object].get_Item (System.String key) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HappyHour.OnTick () [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    [DOUBLEPOST=1423417271,1423346947][/DOUBLEPOST]also getting below error on startup;
    Code:
    [2/8/2015 6:40:38 PM] [Oxide] 6:40 PM [Error] HappyHour: NullReferenceException while calling Init: Object reference not set to an instance of an object
      at ItemManager.GetItemDefinitions () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HappyHour.CalculateTimers () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HappyHour.Init () [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
     
  11. Wulf

    Wulf Community Admin

    For the first error: http://oxidemod.org/threads/happy-hour.6703/#post-64785.

    For the second error. it loads fine here. I would suggest updating Oxide.
     
  12. I will release updated version with using timers instead of ontick.It will fix such problems.
     
  13. Wulf

    Wulf Community Admin

    Regarding the NRE error above, which only happen on server startup, not with hotloading:
     
  14. not working with rust v1199 oxide291 and getting below error
    Code:
    [Oxide] 12:00 AM [Error] Failed to run a timer from HappyHour.lua. (OverflowException: Value is too large)
    [Oxide] 12:00 AM [Debug]  at System.Int64.Parse (System.String s) [0x00000] in <filename unknown>:0
      at System.Convert.ToInt64 (System.String value) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HappyHour.HappyHours (System.Object sender, System.Object PairObj) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HappyHour+<>c__DisplayClass4.<CalculateTimers>b__2 () [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.Timer+TimerInstance.Update () [0x00000] in <filename unknown>:0
    actually I never saw this plugin in working condition tfore removed till fixed
     
    Last edited by a moderator: Feb 9, 2015
  15. Can you give me the config file to check @ my server?
     
  16. yo! is there any way to update this to co inside with gather rate? would be cool to have my server go from 5x gather rate to like 10x gather rate every day for 5 min!
     
  17. What is ID?
    Code:
      "Wood": {
      "Amount": 7500,
      "Type": "Main",
      "ID": "building_planner"
      }
     
  18. It will automaticly update when config readed will get the item's shortname from rust You dont have to set it manually