What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Check for values in Reborn Console

newb23

Community Developer
Joined
Nov 26, 2014
Messages
397
I tried searching around for a quick reference guide on how to use the console, but, was left very, very wanting.

I am attempting to continue with my coding learning by actually doing the community some good, but I have no idea how to pull values out of the game for my use.

I am attempting to get target IDs for objects in game. (People, intractables, NPCs, etc) but have no idea how to get them. I am decent enough at modifying code, but this will be the first time I will be writing it from scratch, and I need a lil help.

Thank you!

[HIDE]
Code:
using System;using System.Collections.Generic;
using System.Linq;
using System.Text;
using ff14bot;
using ff14bot.Managers;
using ff14bot.Helpers;
using ff14bot.Interfaces;
using Buddy.Coroutines;
using System.Threading.Tasks;
using ff14bot.AClasses;
using ff14bot.RemoteWindows;
using System.Diagnostics;
using Clio.Utilities.MVVM;
using TreeSharp;


namespace Slavebot9001
{
    public class Slavebot9001 : IBotPlugin
    {
        public string Author { get { return "newb23"; } }
        public string Description { get { return "Retainer Auto-Quick Explorer"; } }
        public Version Version { get { return new Version(1, 0, 1); } }
        public string Name { get { return "Slavebot9001"; } }
        public string ButtonText { get { return "No Settings"; } }
        public bool WantButton { get { return true; } }
        public bool Equals(IBotPlugin other) { throw new NotImplementedException(); }
        public static System.Timers.Timer LoopTimer;
        public static IntPtr gameHandle = IntPtr.Zero;
        private ff14bot.Objects.GameObject summonbell = null;


        public void OnInitialize()
        {
        }


        public void OnEnabled()
        {
        }


        private Coroutine _coroutine;


        public void OnPulse()
        {
            if (_coroutine == null || _coroutine.IsFinished)
            {
                _coroutine = new Coroutine(() => MainLoop());
            }


            _coroutine.Resume();
        }




        internal async Task MainLoop()
        {
            summonbell = GameObjectManager.GetObjectByObjectId(4627757);


            while (true)
            {
                //Open retainer list
                summonbell.Interact();
                    await Coroutine.Sleep(2000);


                //Select A Retainer
                while (ff14bot.RemoteWindows.SelectString.ClickLineContains("Venture complete)"))
                    await Coroutine.Sleep(2000);


                //Skip dialog
                ff14bot.RemoteWindows.Talk.Next();
                    await Coroutine.Sleep(2000);


                //View Venture Report
                while (ff14bot.RemoteWindows.SelectString.ClickLineContains("View venture report"))
                    await Coroutine.Sleep(2000);


                //Venture Report Window Reassign/Confirm
                while (!ff14bot.RemoteWindows.SelectYesno.IsOpen)
                    await Coroutine.Sleep(2000);
                ff14bot.RemoteWindows.SelectYesno.ClickNo();


                //Venture Confirm Window
                while (!ff14bot.RemoteWindows.SelectYesno.IsOpen)
                    await Coroutine.Sleep(2000);
                ff14bot.RemoteWindows.SelectYesno.ClickNo();


                //Wait/Skip dialog
                while (!ff14bot.RemoteWindows.Talk.DialogOpen)
                    await Coroutine.Sleep(2000);
                ff14bot.RemoteWindows.Talk.Next();


                //Quit Retainer Dialog
                while (ff14bot.RemoteWindows.SelectString.ClickLineContains("Quit"))


                //Wait/Skip dialog
                while (!ff14bot.RemoteWindows.Talk.DialogOpen)
                    await Coroutine.Sleep(2000);
                ff14bot.RemoteWindows.Talk.Next();


                //None of the Retainers are back/ready
                while (ff14bot.RemoteWindows.SelectString.ClickLineContains("Quit"))
                    await Coroutine.Sleep(2000);
                
                //Wait for a duration before starting over
                //LoopTimer = new System.Timers.Timer();
                //LoopTimer.Interval = 600000;                
                //LoopTimer.Start();
                //LoopTimer.Stop();


                //while(LoopTimer.Interval != 0);
                    //await Coroutine.Sleep(1000);


            }
        }


        private void KillCoroutine(ref Coroutine coroutine)
        {
            if (coroutine == null)
                return;


            coroutine.Dispose();
            coroutine = null;
        }


        private void TreeRootOnOnStop(BotBase bot)
        {
            KillCoroutine(ref _coroutine);
        }


        public void OnShutdown()
        {
        }


        public void OnDisabled()
        {
        }


        public void OnButtonPress()
        {
        }
    }
}
[/HIDE]

Edit 3: Okay. So, I've virtually started over. I put what code I am using here in a spoiler/code wrap and also included my new file I'm working with. Everything works up until I get to the reassign button, then I don't have a .RemoteWindows call to be able to click it. I have SelectYesNo in there right now, as I was hoping that maybe they were recycled from that type of window, but alas.

My question now is, using the console, can I pull the values of that dialog window's buttons and be able to write my own .RemoteWindows API call? Or how could I go about getting those buttons clicked? I was previously trying to use something akin to the Chocobo Racing plugin's image detection but I could not get that to work, and it seems a black sheep type of method anyway.

Any advice?

Kind regards, newb
 
Last edited:
Log(Core.Player.CurrentTarget.ObjectId);

or

Log(Core.Player.CurrentTargetObjId);

Should return your current target's object ID.

As for the rest I'll let the plugin/profile guys chime in (who know much more than me about interactions/menus). I will say that the code you quoted is asking for a string and an object ID is uint.
 
Thank you both for your replies, and I'll get that link bookmarked!
 
Okay. So, I've virtually started over. I put what code I am using here in a spoiler/code wrap and also included my new file I'm working with. Everything works up until I get to the reassign button, then I don't have a .RemoteWindows call to be able to click it. I have SelectYesNo in there right now, as I was hoping that maybe they were recycled from that type of window, but alas.

My question now is, using the console, can I pull the values of that dialog window's buttons and be able to write my own .RemoteWindows API call? Or how could I go about getting those buttons clicked? I was previously trying to use something akin to the Chocobo Racing plugin's image detection but I could not get that to work, and it seems a black sheep type of method anyway.

[HIDE]
Code:
using System;using System.Collections.Generic;
using System.Linq;
using System.Text;
using ff14bot;
using ff14bot.Managers;
using ff14bot.Helpers;
using ff14bot.Interfaces;
using Buddy.Coroutines;
using System.Threading.Tasks;
using ff14bot.AClasses;
using ff14bot.RemoteWindows;
using System.Diagnostics;
using Clio.Utilities.MVVM;
using TreeSharp;


namespace Slavebot9001
{
    public class Slavebot9001 : IBotPlugin
    {
        public string Author { get { return "newb23"; } }
        public string Description { get { return "Retainer Auto-Quick Explorer"; } }
        public Version Version { get { return new Version(1, 0, 1); } }
        public string Name { get { return "Slavebot9001"; } }
        public string ButtonText { get { return "No Settings"; } }
        public bool WantButton { get { return true; } }
        public bool Equals(IBotPlugin other) { throw new NotImplementedException(); }
        public static System.Timers.Timer LoopTimer;
        public static IntPtr gameHandle = IntPtr.Zero;
        private ff14bot.Objects.GameObject summonbell = null;


        public void OnInitialize()
        {
        }


        public void OnEnabled()
        {
        }


        private Coroutine _coroutine;


        public void OnPulse()
        {
            if (_coroutine == null || _coroutine.IsFinished)
            {
                _coroutine = new Coroutine(() => MainLoop());
            }


            _coroutine.Resume();
        }




        internal async Task MainLoop()
        {
            summonbell = GameObjectManager.GetObjectByObjectId(4627757);


            while (true)
            {
                //Open retainer list
                summonbell.Interact();
                    await Coroutine.Sleep(2000);


                //Select A Retainer
                while (ff14bot.RemoteWindows.SelectString.ClickLineContains("Venture complete)"))
                    await Coroutine.Sleep(2000);


                //Skip dialog
                ff14bot.RemoteWindows.Talk.Next();
                    await Coroutine.Sleep(2000);


                //View Venture Report
                while (ff14bot.RemoteWindows.SelectString.ClickLineContains("View venture report"))
                    await Coroutine.Sleep(2000);


                //Venture Report Window Reassign/Confirm
                while (!ff14bot.RemoteWindows.SelectYesno.IsOpen)
                    await Coroutine.Sleep(2000);
                ff14bot.RemoteWindows.SelectYesno.ClickNo();


                //Venture Confirm Window
                while (!ff14bot.RemoteWindows.SelectYesno.IsOpen)
                    await Coroutine.Sleep(2000);
                ff14bot.RemoteWindows.SelectYesno.ClickNo();


                //Wait/Skip dialog
                while (!ff14bot.RemoteWindows.Talk.DialogOpen)
                    await Coroutine.Sleep(2000);
                ff14bot.RemoteWindows.Talk.Next();


                //Quit Retainer Dialog
                while (ff14bot.RemoteWindows.SelectString.ClickLineContains("Quit"))


                //Wait/Skip dialog
                while (!ff14bot.RemoteWindows.Talk.DialogOpen)
                    await Coroutine.Sleep(2000);
                ff14bot.RemoteWindows.Talk.Next();


                //None of the Retainers are back/ready
                while (ff14bot.RemoteWindows.SelectString.ClickLineContains("Quit"))
                    await Coroutine.Sleep(2000);
                
                //Wait for a duration before starting over
                //LoopTimer = new System.Timers.Timer();
                //LoopTimer.Interval = 600000;                
                //LoopTimer.Start();
                //LoopTimer.Stop();


                //while(LoopTimer.Interval != 0);
                    //await Coroutine.Sleep(1000);


            }
        }


        private void KillCoroutine(ref Coroutine coroutine)
        {
            if (coroutine == null)
                return;


            coroutine.Dispose();
            coroutine = null;
        }


        private void TreeRootOnOnStop(BotBase bot)
        {
            KillCoroutine(ref _coroutine);
        }


        public void OnShutdown()
        {
        }


        public void OnDisabled()
        {
        }


        public void OnButtonPress()
        {
        }
    }

}
[/HIDE]

Any advice?

Kind regards, newb
 
Last edited:
You can send button presses to windows I haven't defined, but that's it. Finding what values to send requires the use of a debugger and is a outside the scope of your skill level. What windows & buttons do you need defined whatever your trying todo?
 
You can send button presses to windows I haven't defined, but that's it. Finding what values to send requires the use of a debugger and is a outside the scope of your skill level. What windows & buttons do you need defined whatever your trying todo?

First of all, thank you for taking to time to look this over.

I am looking at making an auto-reassign plugin for sending retainers back out on whatever venture they were on previously. As I know trying to pull all of the different values for all of the different things that can be gathered is more than likely a huge, intricate, and frankly professional level task, I wanted something that I could just re-send them out to re-gather at an hourly rate, similar to Agil's system to interrupt whatever the bot is doing to go repair, then return to the previous task.

The buttons I need defined are the Reassign/Confirm window, seen after the line "View venture report." is clicked; and also the Assign/Return window that appears as a confirmation following the previous one. I believe that the Assign/Return window is also the same windows displayed if you have chosen any other type of venture for your retainer to be sent out on. It is simply the confirm window used.

Here are images of the two windows I am referring to:


I have a very basic level of knowledge with coding, and as I'm sure you can see by my code, I take a long time to tweak and modify to suit my needs, but if I can get the ability to send to those buttons, I know I can get it done.

Thank you for your consideration.
newb23
 
Last edited:
mastahg; said:
UPDATE:

Api:
RetainerTaskAsk and RetainerTaskResult remote windows have been added.

You sir, are the friggin man. Thank you for getting these added to the API. I sent my retianers out on long hauls a few hours ago, but I'll see if I can get a working copy of the code up for others to test here shortly.

Thank you very, very much. Thread can be closed!
newb
 
Back
Top