1. Karltubing

    Karltubing Scavenger

    I am looking to use this method if even possible to solve issues in 2 separate plugins (in idea stage only).
    The plug in is partially working for Reign of Kings as you can see below, but that's where it ends...populates the json file. Both UEconomics.cs and PlaytimeTracker.cs are loaded.

    1. I would like to know how I could get the number from "lastReward" in the playtime _data.json to use in a formula to calculate a players timed reward for playing on my server.
    Option 1 - Example- Take the "lastReward" amount = 18000 divide by 100 = 180
    then this number is the reward , growing a little after each reward updates.
    Option 2 - Make the reward a flat rate that is triggered by the "lastReward" updating.
    2. Everytime "lastReward" changes it triggers a new reward.
    3. The info is in the json file ,is there a method to harvest from there or do i need to get the date before it is written to the json?

    {
    "timeData": {
    "76561198070XXXXX": {
    "playTime": 18291.322203397751,
    "afkTime": 0.0,
    "lastReward": 18000.0,
    "referrals": 0
    },
    "76561198081XXXXXX": {
    "playTime": 18369.939700603485,
    "afkTime": 0.0,
    "lastReward": 18000.0,
    "referrals": 0
    }
    }
    }
     
  2. Karltubing

    Karltubing Scavenger

    I have the UEconomics.cs and PlaytimeTracker.cs working and paying rewards without modifying the plugins. But am still curious if the Method of retrieving data from json files are possible and are there any examples to look at.