• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Current (local) player job current/max experience points?

    Discussion in 'Community Developer Forum' started by Farmith, Mar 26, 2019.

    1. Farmith

      Farmith Member

      Joined:
      Mar 23, 2019
      Messages:
      30
      Likes Received:
      0
      Trophy Points:
      6
      Well, title pretty much says it, is it possible (i hope it is) to get the local players experience points for the current job somehow? i know the level is available in Core.Player.ClassLevel and Core.Player.CurrentJob shows me the level and job, but can't seem to find the experience points anywhere (Would also like to know how to get max XP for current joblevel if possible)
       
    2. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,335
      Likes Received:
      380
      Trophy Points:
      83
      Use the "Assembly Explorer" in visual studio by right clicking rebornbuddy in the refrences, then you can find functions and classes by typing in there. What your looking for here is ff14bot.RemoteWindows.Experience
       
    3. Farmith

      Farmith Member

      Joined:
      Mar 23, 2019
      Messages:
      30
      Likes Received:
      0
      Trophy Points:
      6
      Thanks for the tip! Gonna take some time to just read up on that information :) and thanks for the info!
       
    4. Farmith

      Farmith Member

      Joined:
      Mar 23, 2019
      Messages:
      30
      Likes Received:
      0
      Trophy Points:
      6
      I've been trying everything i can, researching the assembly info and trying different things, but the ff14bot.RemoteWindows.Experience always returns 0 for me, not the current ammount of XP my character has in the current job :/

      Is this feature broken or is there something im missing?
       
    5. Farmith

      Farmith Member

      Joined:
      Mar 23, 2019
      Messages:
      30
      Likes Received:
      0
      Trophy Points:
      6
      (it works from the reborn console, ive tried that, but inside a plugin it always returns 0 for whatever reason)
       
    6. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,335
      Likes Received:
      380
      Trophy Points:
      83
      Show how your using it in the plugin.
       
    7. Farmith

      Farmith Member

      Joined:
      Mar 23, 2019
      Messages:
      30
      Likes Received:
      0
      Trophy Points:
      6
      Tried so many ways, first off is just having a GUI button named refresh call it in the form cs like so :

      Code:
                  string sxp = ff14bot.RemoteWindows.Experience.CurrentExperience.ToString();
                  Log("Experience: " + sxp);
                  startingXP.Text = sxp;
      where "Log" simply adds a new line to a UI Listbox, and startingXP is a simple label which i update

      Also tried doing it from the main program cs by calling methods inside the form cs to do the same thing, doesnt matter where i do it i get 0 as experience, restedXP works just fine just not the current one :/

      Whereas, if i just do a simple Log(ff14bot.RemoteWindows.Experience.CurrentExperience.ToString()); inside the reborn console it works just fine... i'm at a loss
       
    8. Farmith

      Farmith Member

      Joined:
      Mar 23, 2019
      Messages:
      30
      Likes Received:
      0
      Trophy Points:
      6
      (if you need more code than the above let me know, i can even provide the whole plugin source if you need it)
       
    9. zzi

      zzi Active Member

      Joined:
      Mar 10, 2016
      Messages:
      308
      Likes Received:
      47
      Trophy Points:
      28
      You need to pulse the pulsator.

      Code:
      ff14bot.Behavior.Pulsator.Pulse(PulseFlags.Windows);
       string sxp = ff14bot.RemoteWindows.Experience.CurrentExperience.ToString();
                 Log("Experience: " + sxp);
                 startingXP.Text = sxp;
      
      this should do the trick.


      showing stuff as a UI can be tricky, you'll end up having to hit the pulsator for some things due to optimizations that are made while the bot is running.

      (If you look at the source code for the console you'll see that it pulses things before running the code)
       
      Farmith likes this.
    10. Farmith

      Farmith Member

      Joined:
      Mar 23, 2019
      Messages:
      30
      Likes Received:
      0
      Trophy Points:
      6
      Yeap! that did the trick, thanks!
       
    11. zzi

      zzi Active Member

      Joined:
      Mar 10, 2016
      Messages:
      308
      Likes Received:
      47
      Trophy Points:
      28
      Sure thing!

      Be sure to be careful when using the Pulsator from your code. You shouldn't need to call it if the bot is running. (ff14bot.TreeRoot.IsRunning)
       
    12. Farmith

      Farmith Member

      Joined:
      Mar 23, 2019
      Messages:
      30
      Likes Received:
      0
      Trophy Points:
      6
      It would seem like calling Pulse() inside an instance (POTD for example) causes rebornbuddy to crash.... interesting
       
    13. zzi

      zzi Active Member

      Joined:
      Mar 10, 2016
      Messages:
      308
      Likes Received:
      47
      Trophy Points:
      28
      Right....

      When a botbase is running, Pulsator is being called by the bot. you don't need to call it again...
       
    14. Farmith

      Farmith Member

      Joined:
      Mar 23, 2019
      Messages:
      30
      Likes Received:
      0
      Trophy Points:
      6
      Thanks for all the help, again, you truly are a lifesaver :) Now everything is working smoothly and progress is imminent again
       

    Share This Page