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]
[/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
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()
{
}
}
}
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: