├── .gitignore
├── AutoFollow
├── AutoFollowBase.cs
├── AutoFollowSettings.cs
├── AutoFollowSettingsFrm.Designer.cs
├── AutoFollowSettingsFrm.cs
└── AutoFollowSettingsFrm.resx
├── AutoRetainerSort
├── AddNewInventoryForm.Designer.cs
├── AddNewInventoryForm.cs
├── AddNewInventoryForm.resx
├── AddNewItemForm.Designer.cs
├── AddNewItemForm.cs
├── AddNewItemForm.resx
├── AutoRetainerSortBase.cs
├── AutoRetainerSortForm.Designer.cs
├── AutoRetainerSortForm.cs
├── AutoRetainerSortForm.resx
├── AutoRetainerSortSettings.cs
├── Classes
│ ├── CachedInventory.cs
│ ├── ItemSortInfo.cs
│ └── ItemSortStatus.cs
├── EditInventoryOptionsForm.Designer.cs
├── EditInventoryOptionsForm.cs
├── EditInventoryOptionsForm.resx
├── LisbethRuleGenerator.cs
├── SortType.cs
├── Strings.Designer.cs
└── Strings.resx
├── AutoTrade
├── AutoTrade.cs
├── AutoTradeSettings.Designer.cs
├── AutoTradeSettings.cs
└── AutoTradeSettings.resx
├── Class1.cs
├── CustomDeliveriesBase.cs
├── Enums
├── ClassJobCategory.cs
├── GCNpc.cs
├── MiniGameResult.cs
├── MyItemRole.cs
├── RetainerCity.cs
├── RetainerRole.cs
└── VentureStatus.cs
├── Ext
├── GreyMagic.dll
└── RebornBuddy.exe
├── Extensions
├── BagExtensions.cs
├── BagSlotExtensions.cs
├── EnumExtensions.cs
├── EventNpcExtensions.cs
├── GatheringPointObjectExtensions.cs
├── ItemExtensions.cs
├── LocalPlayerExtensions.cs
└── RetainerTaskAskExtensions.cs
├── FCWorkshopBase.cs
├── GCExpertTurnin
├── GCExpertGrindBase.cs
├── GCExpertSettings.cs
├── GCExpertSettingsFrm.Designer.cs
├── GCExpertSettingsFrm.cs
└── GCExpertSettingsFrm.resx
├── GCSupplyBase.cs
├── GatherTest.cs
├── Helpers
├── Achievements.cs
├── ActionHelper.cs
├── BeastTribeHelper.cs
├── BlueMageSpellBook.cs
├── CraftingHelper.cs
├── FreeCompanyActions.cs
├── GardenHelper.cs
├── GeneralFunctions.cs
├── GrandCompanyHelper.cs
├── GrandCompanyShop.cs
├── HuntHelper.cs
├── ItemConditionals.cs
├── ItemWeight.cs
├── JsonHelper.cs
├── Lisbeth.cs
├── Logger.cs
├── Navigation.cs
├── RequestHelper.cs
├── RowenaHelper.cs
├── SharedFateHelper.cs
├── SyncRoutines.cs
├── Timers.cs
├── TimersSettings.cs
├── Translator.cs
└── WorldHelper.cs
├── HouseChecker.cs
├── HuntBase.cs
├── IshgardHandin.cs
├── IshgardHandinBase.cs
├── LlamaLibrary.csproj
├── LlamaLibrary.sln
├── Materia
├── Materia.cs
├── MateriaItem.cs
├── MateriaSettingsFrm.Designer.cs
├── MateriaSettingsFrm.cs
└── MateriaSettingsFrm.resx
├── Memory
├── Attributes
│ ├── OffsetAttribute.cs
│ └── OffsetValue.cs
├── OffsetManager.cs
└── Offsets.cs
├── OrderbotTags
├── AutoEquip.cs
├── AutoInventoryEquip.cs
├── AutoLisbethEquip.cs
├── BasicTreasureFight.cs
├── BuyBluTotem.cs
├── BuyGCItem.cs
├── BuyScripItem.cs
├── BuyShopExchangeCurrency.cs
├── BuyShopExchangeItem.cs
├── BuyWhiteScriptItem.cs
├── ChangeClass.cs
├── EquipWeapon.cs
├── ExtendedDuty.cs
├── Fate.cs
├── GearSetEquipAll.cs
├── GetTo.cs
├── JoinDuty.cs
├── LLChangeZone.cs
├── LLCommandMission.cs
├── LLDesynth.cs
├── LLDiscardItem.cs
├── LLEmoteNpc.cs
├── LLGcExpeditionResult.cs
├── LLGoHome.cs
├── LLGoToBarracks.cs
├── LLGoToHousing.cs
├── LLHandOver.cs
├── LLOpenChest.cs
├── LLPickUpQuest.cs
├── LLQualityLower.cs
├── LLSellItem.cs
├── LLSendChat.cs
├── LLSmallTalk.cs
├── LLStopBot.cs
├── LLTalkTo.cs
├── LLToast.cs
├── LLTransport.cs
├── LLTurnIn.cs
├── LLUseItem.cs
├── LLUseObject.cs
├── LLUseSpell.cs
├── LLoadProfile.cs
├── LeaveDuty.cs
├── LisbethOrderBot.cs
├── LowerCollectable.cs
├── PassOnLoot.cs
└── SetBluSpells.cs
├── OutOnALimbBase.cs
├── Properties
├── AssemblyInfo.cs
├── Resources.Designer.cs
└── Resources.resx
├── README.md
├── Reduce
├── Reduce.cs
├── ReduceSettings.cs
├── ReduceSettingsForm.cs
├── ReduceSettingsForm.designer.cs
└── ReduceSettingsForm.resx
├── RefreshPfBase.cs
├── RemoteAgents
├── AgentAetherWheel.cs
├── AgentBagSlot.cs
├── AgentCharacter.cs
├── AgentContentsInfo.cs
├── AgentDawn.cs
├── AgentFateProgress.cs
├── AgentFishGuide.cs
├── AgentFreeCompany.cs
├── AgentGoldSaucerInfo.cs
├── AgentHWDScore.cs
├── AgentHandIn.cs
├── AgentHousingSelectBlock.cs
├── AgentInventoryBuddy.cs
├── AgentItemAppraisal.cs
├── AgentMasterPieceSupply.cs
├── AgentMeld.cs
├── AgentMinionNoteBook.cs
├── AgentOutOnLimb.cs
├── AgentRecommendEquip.cs
├── AgentRetainerCharacter.cs
├── AgentRetainerInventory.cs
├── AgentRetainerList.cs
├── AgentRetainerVenture.cs
├── AgentSatisfactionSupply.cs
└── IAgent.cs
├── RemoteWindows
├── AetherialWheel.cs
├── Character.cs
├── CollectablesShop.cs
├── CompanyCraftRecipeNoteBook.cs
├── ContentsInfo.cs
├── ContentsInfoDetail.cs
├── Conversation.cs
├── Dawn.cs
├── FateProgress.cs
├── FishGuide.cs
├── FreeCompany.cs
├── FreeCompanyAction.cs
├── FreeCompanyExchange.cs
├── FreeShop.cs
├── GatheringMasterpieceLL.cs
├── GcArmyCapture.cs
├── GcArmyExpeditionResult.cs
├── GoldSaucerReward.cs
├── GrandCompanyExchange.cs
├── GrandCompanySupplyList.cs
├── GrandCompanySupplyReward.cs
├── GuildLeve.cs
├── HWDGathereInspect.cs
├── HWDLottery.cs
├── HWDScore.cs
├── HWDSupply.cs
├── HousingSelectBlock.cs
├── HousingSignBoard.cs
├── HugeCraftworksSupply.cs
├── InventoryBuddy.cs
├── MasterPieceSupply.cs
├── MateriaAttach.cs
├── MateriaAttachDialog.cs
├── MiniGameAimg.cs
├── MiniGameBotanist.cs
├── Mobhunt.cs
├── NeedGreed.cs
├── RecommendEquip.cs
├── RemoteWindow.cs
├── RetainerList.cs
├── RetainerTaskList.cs
├── SalvageAutoDialog.cs
├── SatisfactionSupply.cs
├── SatisfactionSupplyResult.cs
├── ShopExchangeItem.cs
└── SubmarinePartsMenu.cs
├── Repair.cs
├── Resources
├── AllHunts.json
├── Materia.json
└── Ventures.json
├── ResplendentTools.cs
├── RetainerItemFinder
├── IStoredInventory.cs
├── ItemFinder.cs
├── ItemFinderPtrNode.cs
├── StoredRetainerInventory.cs
└── StoredSaddlebagInventory.cs
├── RetainerRoutine.cs
├── Retainers
├── CompleteRetainer.cs
├── HelperFunctions.cs
├── RetainerInventory.cs
├── RetainerInventoryItem.cs
├── RetainerSettings.cs
├── RetainerTaskData.cs
├── RetainerTasks.cs
├── Retainers.cs
├── RetainersPull.cs
├── RetainersSettingsForm.cs
├── RetainersSettingsForm.designer.cs
└── RetainersSettingsForm.resx
├── ScriptConditions
├── Extras.cs
└── Helpers.cs
├── Structs
├── AetherWheelSlot.cs
├── CraftingRelicTurnin.cs
├── CraftingStatus.cs
├── FCWorkshopItem.cs
├── FcActionShopItem.cs
├── GCShopItem.cs
├── GCTurninItem.cs
├── GatheringNodeData.cs
├── HousingPlot.cs
├── ItemStored.cs
├── LisbethOrder.cs
├── RequestItem.cs
├── RetainerInfo.cs
├── RowenaItem.cs
└── SharedFateProgress.cs
├── TesterBase.cs
└── maps.cs
/AutoFollow/AutoFollowSettings.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using System.IO;
3 | using ff14bot.Helpers;
4 |
5 | namespace LlamaLibrary
6 | {
7 | public class AutoFollowSettings: JsonSettings
8 | {
9 | private static AutoFollowSettings _settings;
10 | private bool _followLeader;
11 | private string _followTargetName;
12 | private bool _isPaused;
13 |
14 | public AutoFollowSettings() : base(Path.Combine(CharacterSettingsDirectory, "AutoFollow.json"))
15 | {
16 |
17 | }
18 |
19 | public static AutoFollowSettings Instance => _settings ?? (_settings = new AutoFollowSettings());
20 |
21 |
22 | [Description("Follow the Party Leader")]
23 | [DefaultValue(true)] //shift +x
24 | public bool FollowLeader
25 | {
26 | get => _followLeader;
27 | set
28 | {
29 | if (_followLeader == value) return;
30 | _followLeader = value;
31 | Save();
32 | }
33 | }
34 |
35 | [Description("Paused")]
36 | [DefaultValue(false)] //shift +x
37 | public bool IsPaused
38 | {
39 | get => _isPaused;
40 | set
41 | {
42 | if (_isPaused == value) return;
43 | _isPaused = value;
44 | Save();
45 | }
46 | }
47 |
48 | [Description("Follow target name")]
49 | public string FollowTargetName
50 | {
51 | get => _followTargetName;
52 | set
53 | {
54 | if (_followTargetName == value) return;
55 | _followTargetName = value;
56 | Save();
57 | }
58 | }
59 |
60 | }
61 | }
--------------------------------------------------------------------------------
/AutoFollow/AutoFollowSettingsFrm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 |
4 | namespace LlamaLibrary
5 | {
6 | public partial class AutoFollowSettingsFrm : Form
7 | {
8 | public AutoFollowSettingsFrm()
9 | {
10 | InitializeComponent();
11 | }
12 |
13 |
14 | private void AutoFollowSettingsFrm_Load(object sender, EventArgs e)
15 | {
16 | //bsFollowTarget.DataSource = AutoFollowSettings.Instance.IsPaused;
17 |
18 | checkBox1.Checked = AutoFollowSettings.Instance.IsPaused;
19 | if (AutoFollowSettings.Instance.FollowLeader)
20 | radioButton1.Checked = true;
21 | }
22 |
23 | private void checkBox1_CheckedChanged(object sender, EventArgs e)
24 | {
25 | AutoFollowSettings.Instance.IsPaused = checkBox1.Checked;
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/AutoRetainerSort/AddNewInventoryForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Linq;
4 | using System.Windows.Forms;
5 | using LlamaLibrary.RemoteWindows;
6 |
7 | namespace LlamaLibrary.AutoRetainerSort
8 | {
9 | public partial class AddNewInventoryForm : Form
10 | {
11 | public AddNewInventoryForm()
12 | {
13 | InitializeComponent();
14 | }
15 |
16 | private void Add_Click(object sender, EventArgs e)
17 | {
18 | if (AutoRetainerSortSettings.Instance.InventoryOptions.Any(x => x.Key == Index))
19 | {
20 | DialogResult = DialogResult.None;
21 | MessageBox.Show("That index is already taken!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
22 | }
23 | else if (Index < 0)
24 | {
25 | DialogResult = DialogResult.None;
26 | MessageBox.Show("Can't have a retainer index below 0!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
27 | }
28 | else if (string.IsNullOrEmpty(RetainerName))
29 | {
30 | DialogResult = DialogResult.None;
31 | MessageBox.Show("Need a name!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
32 | }
33 | }
34 |
35 | private void Index_Changed(object sender, EventArgs e)
36 | {
37 | btnAdd.Enabled = AutoRetainerSortSettings.Instance.InventoryOptions.All(x => x.Key != Index) && Index >= 0;
38 | }
39 |
40 | public int Index => (int)numUpDownIndex.Value;
41 |
42 | public string RetainerName => txtBoxName.Text;
43 |
44 | private void AddNewInventoryForm_Load(object sender, EventArgs e)
45 | {
46 | var retainers = RetainerList.Instance.OrderedRetainerList;
47 |
48 | foreach (var retainer in retainers)
49 | {
50 | cmbRetainers.Items.Add(retainer);
51 | }
52 | cmbRetainers.SelectedIndex = 0;
53 | cmbRetainers.DisplayMember = "DisplayName";
54 |
55 | if (Owner != null)
56 | {
57 | int ownerCenterX = Owner.Location.X + (Owner.Width / 2) - (Width / 2);
58 | int ownerCenterY = Owner.Location.Y + (Owner.Height / 2) - (Width / 2);
59 | Location = new Point(ownerCenterX, ownerCenterY);
60 | }
61 | }
62 |
63 | private void cmbRetainers_SelectedIndexChanged(object sender, EventArgs e)
64 | {
65 | numUpDownIndex.Value = cmbRetainers.SelectedIndex;
66 | txtBoxName.Text = cmbRetainers.Text;
67 | }
68 | }
69 | }
--------------------------------------------------------------------------------
/AutoRetainerSort/Strings.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | text/microsoft-resx
11 |
12 |
13 | 1.3
14 |
15 |
16 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
17 |
18 |
19 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
20 |
21 |
22 | If two different inventories have similar items, should that item type be unsorted, or should it belong to the inventory with the most of those types?
23 | Yes for unsorted, No for most types.
24 |
25 |
26 | This will overwrite all your current SortType settings! Are you sure?
27 |
28 |
29 | Make sure you've looked at your saddlebag & retainer inventories recently, and that you were the last one to do so if you're sharing your account!
30 |
31 |
32 | Warning
33 |
34 |
35 | {0} already contains {1}!
36 | Do you want to remove it from {2} and add it to {3}?
37 |
38 |
39 | You should restart RebornBuddy now before opening any Lisbeth windows, or else the changed Lisbeth settings won't apply!
40 |
41 |
42 | [AutoRetainerSort]
43 |
44 |
--------------------------------------------------------------------------------
/Class1.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using ff14bot.Managers;
3 | using ff14bot.RemoteWindows;
4 | using LlamaLibrary.RemoteWindows;
5 | using TreeSharp;
6 |
7 | namespace LlamaLibrary
8 | {
9 | public class Class1
10 | {
11 |
12 | public void test()
13 | {
14 | if (!HWDSupply.Instance.IsOpen )
15 | {
16 | foreach (var item in InventoryManager.FilledSlots.Where(i=> i.EnglishName.Contains("Mythril Ingot")))
17 | {
18 | Log($"{item.Count} {item.Pointer.ToInt64():X}");
19 | }
20 |
21 |
22 | }
23 | }
24 |
25 | public void Log(string t)
26 | {
27 |
28 | }
29 |
30 | public Composite TradeAcceptBehavior
31 | {
32 | get
33 | {
34 | return new PrioritySelector(
35 | new Decorator(r => Trade.IsOpen,
36 | new PrioritySelector(
37 | new Decorator(r => SelectYesno.IsOpen && Trade.TradeStage == 5,
38 | new Sequence(
39 | new Action(r => Log("At Select Yes/No")),
40 | new Sleep(200),
41 | new Action(r => SelectYesno.ClickYes())
42 | )
43 | ),
44 | new Decorator(r => Trade.IsOpen && Trade.TradeStage == 3,
45 | new Sequence(
46 | new Action(r => Log($"Window open accepting from {Trade.Trader}")),
47 | new Sleep(500),
48 | new Action(r => RaptureAtkUnitManager.GetWindowByName("Trade").SendAction( 1, 3uL, 0))
49 | )
50 | )
51 | )
52 | )
53 | );
54 | }
55 | }
56 |
57 | }
58 | }
--------------------------------------------------------------------------------
/Enums/ClassJobCategory.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.Enums
2 | {
3 | public enum ClassJobCategory : byte
4 | {
5 | ANY = 0,
6 | MIN = 17,
7 | BOT = 18,
8 | FSH = 19,
9 | DOW = 34
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Enums/GCNpc.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.Enums
2 | {
3 | public enum GCNpc
4 | {
5 | Flyer,
6 | Mage,
7 | OIC_Administrator,
8 | Personnel_Officer,
9 | OIC_Quartermaster,
10 | OIC_Officer_of_Arms,
11 | Quartermaster,
12 | Company_Chest,
13 | Hunt_Board,
14 | Entrance_to_the_Barracks,
15 | Commander,
16 | Hunt_Billmaster,
17 | Squadron_Sergeant,
18 | }
19 | }
--------------------------------------------------------------------------------
/Enums/MiniGameResult.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.Enums
2 | {
3 | public enum MiniGameResult
4 | {
5 | None,
6 | NotClose,
7 | Close,
8 | VeryClose,
9 | OnTop,
10 | Error,
11 | DoubleDown
12 | }
13 | }
--------------------------------------------------------------------------------
/Enums/MyItemRole.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.Enums
2 | {
3 | public enum MyItemRole : byte
4 | {
5 | None = 0,
6 | PhysicalWeapon = 1,
7 | MagicalWeapon = 2,
8 | Shield = 3,
9 | Armor = 4,
10 | Food = 5,
11 | StatPotion = 6,
12 | SpecialPotion_Manual = 7,
13 | HealingPotion = 8,
14 | Ether = 9,
15 | Elixir = 10,
16 | Crystals = 11,
17 | CraftingMaterial = 12,
18 | Materia = 13,
19 | Housing = 14,
20 | Dye = 15,
21 | General = 16,
22 | Bait = 17,
23 | Map = 18,
24 | Container = 19,
25 | Seed = 20,
26 | Soil = 21,
27 | Fertilizer = 22,
28 | CraftingTome = 23,
29 | Unknown = 24,
30 | BlankAetherialWheel = 25,
31 | PrimedAetherialWheel = 26,
32 | TripleTriadCard = 27,
33 | AirshipPart = 28,
34 | SpecialCurrency = 29,
35 | FolkloreTome = 30,
36 | Favor = 31,
37 | SoulCrystal = 32,
38 | OrchestrionRoll = 33,
39 | AquariumTrimming = 34,
40 | Painting = 35,
41 | RetainerBoost = 36,
42 | SubmersiblePart = 37,
43 | EurekaLogogram = 38
44 | }
45 | }
--------------------------------------------------------------------------------
/Enums/RetainerCity.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.PersonalTester
2 | {
3 | public enum RetainerCity: byte
4 | {
5 | LIMSA = 1,
6 | GRIDANIA = 2,
7 | ULDAH = 3,
8 | ISHGARD = 4,
9 | KUGANE = 7,
10 | CRYSTARIUM = 10
11 | }
12 | }
--------------------------------------------------------------------------------
/Enums/RetainerRole.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.Enums
2 | {
3 | public enum RetainerRole
4 | {
5 | None = 0,
6 | Gladiator = 62001,
7 | Marauder = 62003,
8 | Conjurer = 62006,
9 | Pugilist = 62002,
10 | Lancer = 62004,
11 | Rogue = 62029,
12 | Archer = 62005,
13 | Thaumaturge = 62007,
14 | Arcanist = 62026,
15 | Paladin = 62019,
16 | Warrior = 62021,
17 | DarkKnight = 62032,
18 | Gunbreaker = 62037,
19 | WhiteMage = 62024,
20 | Scholar = 62028,
21 | Astrologian = 62033,
22 | Monk = 62020,
23 | Dragoon = 62022,
24 | Ninja = 62030,
25 | Samurai = 62034,
26 | Bard = 62023,
27 | Machinist = 62031,
28 | Dancer = 62038,
29 | BlackMage = 62025,
30 | Summoner = 62027,
31 | RedMage = 62035,
32 | BlueMage = 62036,
33 | Carpenter = 62008,
34 | Blacksmith = 62009,
35 | Armorer = 62010,
36 | Goldsmith = 62011,
37 | Leatherworker = 62012,
38 | Weaver = 62013,
39 | Alchemist = 62014,
40 | Culinarian = 62015,
41 | Miner = 62016,
42 | Botanist = 62017,
43 | Fisher = 62018
44 | }
45 | }
--------------------------------------------------------------------------------
/Enums/VentureStatus.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.Enums
2 | {
3 | public enum VentureStatus
4 | {
5 | Complete,
6 | InProgress,
7 | Ready,
8 | None
9 | }
10 | }
--------------------------------------------------------------------------------
/Ext/GreyMagic.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nt153133/LlamaLibrary/9504d43af28ff42f4d8666798830b2483b327496/Ext/GreyMagic.dll
--------------------------------------------------------------------------------
/Ext/RebornBuddy.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nt153133/LlamaLibrary/9504d43af28ff42f4d8666798830b2483b327496/Ext/RebornBuddy.exe
--------------------------------------------------------------------------------
/Extensions/BagExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using ff14bot.Managers;
3 |
4 | namespace LlamaLibrary.Extensions
5 | {
6 | public static class BagExtensions
7 | {
8 | public static BagSlot GetFirstFreeSlot(this Bag bag)
9 | {
10 | return bag.FreeSlots > 0 ? bag.First(i => !i.IsFilled) : null;
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/Extensions/EnumExtensions.cs:
--------------------------------------------------------------------------------
1 | using ff14bot.Enums;
2 | using LlamaLibrary.Enums;
3 | using System;
4 |
5 | namespace LlamaLibrary.Extensions
6 | {
7 | public static class EnumExtensions
8 | {
9 |
10 | ///
11 | /// is a dow class
12 | ///
13 | ///
14 | ///
15 | internal static bool IsDow(this ClassJobType type)
16 | {
17 | return type != ClassJobType.Adventurer &&
18 | type != ClassJobType.Alchemist &&
19 | type != ClassJobType.Armorer &&
20 | type != ClassJobType.Blacksmith &&
21 | type != ClassJobType.Botanist &&
22 | type != ClassJobType.Carpenter &&
23 | type != ClassJobType.Culinarian &&
24 | type != ClassJobType.Fisher &&
25 | type != ClassJobType.Goldsmith &&
26 | type != ClassJobType.Leatherworker &&
27 | type != ClassJobType.Miner &&
28 | type != ClassJobType.Weaver;
29 | }
30 |
31 | internal static bool IsDoh(this ClassJobType type)
32 | {
33 | return type == ClassJobType.Carpenter ||
34 | type == ClassJobType.Blacksmith ||
35 | type == ClassJobType.Armorer ||
36 | type == ClassJobType.Goldsmith ||
37 | type == ClassJobType.Leatherworker ||
38 | type == ClassJobType.Weaver ||
39 | type == ClassJobType.Alchemist ||
40 | type == ClassJobType.Culinarian;
41 | }
42 |
43 | internal static bool IsDol(this ClassJobType type)
44 | {
45 | return type == ClassJobType.Miner ||
46 | type == ClassJobType.Botanist ||
47 | type == ClassJobType.Fisher;
48 | }
49 |
50 | internal static ClassJobType ClassJob(this RetainerRole type)
51 | {
52 | return (ClassJobType)Enum.Parse(typeof(ClassJobType), type.ToString());
53 | }
54 |
55 | internal static ClassJobCategory ClassJobCategory(this RetainerRole type)
56 | {
57 | if (type.ClassJob().IsDow())
58 | return Enums.ClassJobCategory.DOW;
59 |
60 | switch (type.ClassJob())
61 | {
62 | case ClassJobType.Miner: return Enums.ClassJobCategory.MIN;
63 | case ClassJobType.Fisher: return Enums.ClassJobCategory.FSH;
64 | case ClassJobType.Botanist: return Enums.ClassJobCategory.BOT;
65 |
66 | default: return Enums.ClassJobCategory.ANY;
67 | }
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/Extensions/EventNpcExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot;
3 | using ff14bot.Enums;
4 | using ff14bot.Objects;
5 | using LlamaLibrary.Memory.Attributes;
6 |
7 | namespace LlamaLibrary.Extensions
8 | {
9 | public static class EventNpcExtensions
10 | {
11 | internal static class Offsets
12 | {
13 | [Offset("Search 44 89 BF ?? ?? ?? ?? 83 BF ?? ?? ?? ?? ?? Add 3 Read32")]
14 | internal static int IconID;
15 | }
16 |
17 | internal static uint IconId(this GameObject eventNpc)
18 | {
19 | return eventNpc.Type == GameObjectType.EventNpc ? Core.Memory.Read(eventNpc.Pointer + Offsets.IconID) : (uint) 0;
20 | }
21 |
22 | internal static int OpenTradeWindow(this BattleCharacter otherPlayer)
23 | {
24 | return otherPlayer.Type == GameObjectType.Pc ? Core.Memory.CallInjected64(Memory.Offsets.OpenTradeWindow, Memory.Offsets.ItemFuncParam, otherPlayer.ObjectId).ToInt32() : -1;
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/Extensions/GatheringPointObjectExtensions.cs:
--------------------------------------------------------------------------------
1 | using ff14bot;
2 | using ff14bot.Objects;
3 |
4 | namespace LlamaLibrary.Extensions
5 | {
6 | public static class GatheringPointObjectExtensions
7 | {
8 | internal static int Base(this GatheringPointObject node)
9 | {
10 | return (int) Core.Memory.Read(node.Pointer + 0x80);
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/Extensions/ItemExtensions.cs:
--------------------------------------------------------------------------------
1 | using ff14bot.Managers;
2 | using LlamaLibrary.Enums;
3 |
4 | namespace LlamaLibrary.Extensions
5 | {
6 | public static class ItemExtensions
7 | {
8 | internal static MyItemRole MyItemRole(this Item item)
9 | {
10 | return (MyItemRole)((byte) item.ItemRole);
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/Extensions/LocalPlayerExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using ff14bot;
4 | using ff14bot.Enums;
5 | using ff14bot.Managers;
6 | using ff14bot.Objects;
7 | using LlamaLibrary.Memory.Attributes;
8 |
9 | namespace LlamaLibrary.Extensions
10 | {
11 |
12 | public static class LocalPlayerExtensions
13 | {
14 | internal static class Offsets
15 | {
16 | /*[Offset("Search 44 88 84 0A ? ? ? ? C3 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 88 91 ? ? ? ? Add 4 Read32")]
17 | internal static int GatheringStateOffset;*/
18 | [Offset("Search 0F B6 15 ? ? ? ? 8D 42 ? 3C ? 77 ? FE CA 48 8D 0D ? ? ? ? Add 3 TraceRelative")]
19 | internal static IntPtr CurrentGC;
20 | [Offset("Search 48 83 EC ? 48 8B 05 ? ? ? ? 44 8B C1 BA ? ? ? ? 48 8B 88 ? ? ? ? E8 ? ? ? ? 48 85 C0 75 ? 48 83 C4 ? C3 48 8B 00 48 83 C4 ? C3 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 48 83 EC ? 80 F9 ?")]
21 | internal static IntPtr GCGetMaxSealsByRank;
22 | //PlayerID 8byte ulong ID unique to that character which is included in MB listings
23 | [Offset("Search 48 8B 05 ? ? ? ? 48 8D 0D ? ? ? ? 41 8B DC Add 3 TraceRelative")]
24 | internal static IntPtr PlayerID;
25 | }
26 |
27 | /*internal static byte GatheringStatus(this LocalPlayer player)
28 | {
29 | return Core.Memory.Read(player.Pointer + Offsets.GatheringStateOffset);
30 | }*/
31 |
32 | internal static uint GCSeals(this LocalPlayer player)
33 | {
34 | uint[] sealTypes = {20, 21, 22};
35 | var bagslot = InventoryManager.GetBagByInventoryBagId(InventoryBagId.Currency).FirstOrDefault(i => i.RawItemId == sealTypes[(int)Core.Me.GrandCompany -1]);
36 | return bagslot?.Count ?? (uint) 0;
37 | }
38 |
39 | internal static int MaxGCSeals(this LocalPlayer player)
40 | {
41 | byte gc = Core.Memory.Read(Offsets.CurrentGC);
42 | if (gc == 0) return 0;
43 |
44 | var Rank = Core.Memory.Read(Offsets.CurrentGC + gc);
45 | IntPtr rankRow;
46 | lock (Core.Memory.Executor.AssemblyLock)
47 | rankRow = Core.Memory.CallInjected64(Offsets.GCGetMaxSealsByRank,
48 | Rank);
49 | return Core.Memory.Read(rankRow);
50 | }
51 |
52 | public static ulong PlayerId(this LocalPlayer player)
53 | {
54 | return Core.Memory.Read(Offsets.PlayerID);
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/Extensions/RetainerTaskAskExtensions.cs:
--------------------------------------------------------------------------------
1 | using ff14bot.Managers;
2 |
3 | namespace LlamaLibrary.Extensions
4 | {
5 | public static class RetainerTaskAskExtensions
6 | {
7 | internal static bool CanAssign()
8 | {
9 | var WindowByName = RaptureAtkUnitManager.GetWindowByName("RetainerTaskAsk");
10 | if (WindowByName == null) return false;
11 | var remoteButton = WindowByName.FindButton(40);
12 | return remoteButton != null && remoteButton.Clickable;
13 | }
14 |
15 | internal static string GetErrorReason()
16 | {
17 | var WindowByName = RaptureAtkUnitManager.GetWindowByName("RetainerTaskAsk");
18 | if (WindowByName == null || WindowByName.FindLabel(39) == null) return "";
19 | return WindowByName.FindLabel(39).Text;
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/GCExpertTurnin/GCExpertSettings.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using System.IO;
3 | using ff14bot.Helpers;
4 |
5 | namespace LlamaLibrary.GCExpertTurnin
6 | {
7 | public class GCExpertSettings : JsonSettings
8 | {
9 |
10 | private bool _accepted;
11 |
12 | private bool _craft;
13 |
14 | private int _itemId;
15 |
16 | private int _sealReward;
17 |
18 | private static GCExpertSettings _settings;
19 |
20 | public static GCExpertSettings Instance => _settings ?? (_settings = new GCExpertSettings());
21 |
22 | public GCExpertSettings() :base(Path.Combine(CharacterSettingsDirectory, "GCExpertSettings.json"))
23 | {
24 | }
25 |
26 | [Description("I understand anything in my inventory bags might be turned in")]
27 | [DefaultValue(false)] //shift +x
28 | public bool AcceptedRisk
29 | {
30 | get => _accepted;
31 | set
32 | {
33 | if (_accepted != value)
34 | {
35 | _accepted = value;
36 | Save();
37 | }
38 | }
39 | }
40 |
41 | [Description("Craft itemId until max seals")]
42 | [DefaultValue(false)] //shift +x
43 | public bool Craft
44 | {
45 | get => _craft;
46 | set
47 | {
48 | if (_craft != value)
49 | {
50 | _craft = value;
51 | Save();
52 | }
53 | }
54 | }
55 |
56 | [Description("ItemId of item to craft")]
57 | [DefaultValue(4380)] //shift +x
58 | public int ItemId
59 | {
60 | get => _itemId;
61 | set
62 | {
63 | if (_itemId != value)
64 | {
65 | _itemId = value;
66 | Save();
67 | }
68 | }
69 | }
70 |
71 | [Description("Number of seals you get as a reward for handing in the above item")]
72 | [DefaultValue(317)] //shift +x
73 | public int SealReward
74 | {
75 | get => _sealReward;
76 | set
77 | {
78 | if (_sealReward != value)
79 | {
80 | _sealReward = value;
81 | Save();
82 | }
83 | }
84 | }
85 | }
86 | }
--------------------------------------------------------------------------------
/GCExpertTurnin/GCExpertSettingsFrm.Designer.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 |
3 | namespace LlamaLibrary.GCExpertTurnin
4 | {
5 | partial class GCExpertSettingsFrm
6 | {
7 | ///
8 | /// Required designer variable.
9 | ///
10 | private IContainer components = null;
11 |
12 | ///
13 | /// Clean up any resources being used.
14 | ///
15 | /// true if managed resources should be disposed; otherwise, false.
16 | protected override void Dispose(bool disposing)
17 | {
18 | if (disposing && (components != null))
19 | {
20 | components.Dispose();
21 | }
22 |
23 | base.Dispose(disposing);
24 | }
25 |
26 | #region Windows Form Designer generated code
27 |
28 | ///
29 | /// Required method for Designer support - do not modify
30 | /// the contents of this method with the code editor.
31 | ///
32 | private void InitializeComponent()
33 | {
34 | this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
35 | this.SuspendLayout();
36 | //
37 | // propertyGrid1
38 | //
39 | this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
40 | this.propertyGrid1.Location = new System.Drawing.Point(0, 0);
41 | this.propertyGrid1.Name = "propertyGrid1";
42 | this.propertyGrid1.Size = new System.Drawing.Size(412, 358);
43 | this.propertyGrid1.TabIndex = 0;
44 | //
45 | // GCExpertSettingsFrm
46 | //
47 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
48 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
49 | this.ClientSize = new System.Drawing.Size(412, 358);
50 | this.Controls.Add(this.propertyGrid1);
51 | this.Name = "GCExpertSettingsFrm";
52 | this.Text = "Settings";
53 | this.Load += new System.EventHandler(this.GCExpertSettingsFrm_Load);
54 | this.ResumeLayout(false);
55 | }
56 |
57 | private System.Windows.Forms.PropertyGrid propertyGrid1;
58 |
59 | #endregion
60 | }
61 | }
--------------------------------------------------------------------------------
/GCExpertTurnin/GCExpertSettingsFrm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 |
4 | namespace LlamaLibrary.GCExpertTurnin
5 | {
6 | public partial class GCExpertSettingsFrm : Form
7 | {
8 | public GCExpertSettingsFrm()
9 | {
10 | InitializeComponent();
11 | }
12 |
13 | private void GCExpertSettingsFrm_Load(object sender, EventArgs e)
14 | {
15 | propertyGrid1.SelectedObject = GCExpertSettings.Instance;
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/Helpers/Achievements.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot;
3 | using LlamaLibrary.Memory.Attributes;
4 |
5 | namespace LlamaLibrary.Helpers
6 | {
7 | public static class Achievements
8 | {
9 | private static class Offsets
10 | {
11 | [Offset("Search 48 8D 0D ? ? ? ? E9 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 80 39 ? Add 3 TraceRelative")]
12 | internal static IntPtr Achieve;
13 |
14 | [Offset("Search 4C 8B C9 81 FA ? ? ? ? 77 ? 8B C2 99 83 E2 ? 03 C2 44 8B C0 83 E0 ? 2B C2 41 C1 F8 ? 49 63 C8 42 0F B6 54 09 ? 8B C8 B8 ? ? ? ? D3 E0 84 D0 0F 95 C0 C3 32 C0 C3 ? ? ? ? ? ? 4C 8B C9")]
15 | [OffsetCN("Search 4C 8B C9 81 FA ? ? ? ? 77 ? 8B C2 99 83 E2 ? 03 C2 44 8B C0 83 E0 ? 2B C2 41 C1 F8 ? 49 63 C8 42 0F B6 54 09 ? 8B C8 B8 ? ? ? ? D3 E0 84 D0 0F 95 C0 C3 32 C0 C3 ? ? ? ? ? ? 83 FA ?")]
16 | internal static IntPtr CheckById;
17 | }
18 |
19 | public static bool HasAchievement(int achievementId)
20 | {
21 | bool done;
22 | lock (Core.Memory.Executor.AssemblyLock)
23 | done = Core.Memory.CallInjected64(Offsets.CheckById,
24 | Offsets.Achieve,
25 | achievementId);
26 | return done;
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/Helpers/ActionHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using ff14bot;
4 | using ff14bot.Enums;
5 | using ff14bot.Managers;
6 | using LlamaLibrary.Enums;
7 | using LlamaLibrary.Extensions;
8 | using LlamaLibrary.Memory.Attributes;
9 |
10 | namespace LlamaLibrary.Helpers
11 | {
12 | public static class ActionHelper
13 | {
14 | internal static class Offsets
15 | {
16 | [Offset("Search 40 53 55 57 41 54 41 57 48 83 EC ? 83 BC 24 ? ? ? ? ?")]
17 | internal static IntPtr DoAction;
18 |
19 | [Offset("Search 48 8D 0D ? ? ? ? 44 8D 42 ? E8 ? ? ? ? 85 C0 Add 3 TraceRelative")]
20 | internal static IntPtr ActionManagerParam;
21 |
22 | //41 B8 ? ? ? ? 89 5C 24 ? 48 8D 0D ? ? ? ? E8 ? ? ? ? 84 C0 75 ?
23 |
24 | [Offset("Search 41 B8 ? ? ? ? 89 5C 24 ? 48 8D 0D ? ? ? ? E8 ? ? ? ? 84 C0 75 ? Add 2 Read32")]
25 | internal static int DecipherSpell;
26 | }
27 |
28 | public static bool DoActionDecipher(BagSlot slot)
29 | {
30 | if ((slot.Item.MyItemRole() != MyItemRole.Map) || HasMap())return false;
31 | return Core.Memory.CallInjected64(Offsets.DoAction, new object[6]
32 | {
33 | Offsets.ActionManagerParam, //rcx
34 | (uint) ff14bot.Enums.ActionType.Spell, //rdx
35 | (uint) Offsets.DecipherSpell, //r8
36 | (long) Core.Player.ObjectId, //r9
37 | (int)slot.Item.Id, //a5 +0x28
38 | 0 //a6 + 0x30
39 | }) == 1;
40 | }
41 |
42 | public static bool HasMap()
43 | {
44 | uint[] questMaps = new uint[]{2001351,2001705,2001772,200974};
45 | return InventoryManager.GetBagByInventoryBagId(InventoryBagId.KeyItems).FilledSlots.Any(i => i.EnglishName.EndsWith("map", StringComparison.InvariantCultureIgnoreCase) && !questMaps.Contains(i.RawItemId));
46 | }
47 |
48 | public static void DiscardCurrentMap()
49 | {
50 | var map = CurrentMap();
51 |
52 | if (map != default(BagSlot))
53 | {
54 | map.Discard();
55 | }
56 | }
57 |
58 | public static BagSlot CurrentMap()
59 | {
60 | uint[] questMaps = new uint[]{2001351,2001705,2001772,200974};
61 | var map = InventoryManager.GetBagByInventoryBagId(InventoryBagId.KeyItems).FilledSlots.Where(i => i.EnglishName.EndsWith("map", StringComparison.InvariantCultureIgnoreCase) && !questMaps.Contains(i.RawItemId)).ToList();
62 | return map.Any() ? map.First() : default(BagSlot);
63 | }
64 |
65 | }
66 | }
--------------------------------------------------------------------------------
/Helpers/JsonHelper.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using ff14bot;
3 | using ff14bot.Helpers;
4 |
5 | namespace LlamaLibrary.Helpers
6 | {
7 | public static class JsonHelper
8 | {
9 | public static string UniqueCharacterSettingsDirectory => Path.Combine(JsonSettings.SettingsPath, $"{Core.Me.Name}_World{WorldHelper.HomeWorldId}");
10 |
11 | public static string HomeWorldSettingsDirectory => Path.Combine(JsonSettings.SettingsPath, $"World{WorldHelper.HomeWorldId}");
12 |
13 | public static string DataCenterSettingsDirectory => Path.Combine(JsonSettings.SettingsPath, $"DataCenter{WorldHelper.DataCenterId}");
14 | }
15 | }
--------------------------------------------------------------------------------
/Helpers/Logger.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Windows.Media;
4 | using ff14bot.Helpers;
5 |
6 | namespace LlamaLibrary.Helpers
7 | {
8 | public static class Logger
9 | {
10 | private static Random rng = new Random();
11 | public static void External(string caller, string message, Color color)
12 | {
13 | Logging.Write(color, $"[{caller}]" + message);
14 | }
15 |
16 | public static void LogCritical(string text)
17 | {
18 | Logging.Write(Colors.OrangeRed, text);
19 | }
20 |
21 | public static void Info(string text)
22 | {
23 | Logging.Write(Colors.Aqua, text);
24 | }
25 |
26 | public static void Shuffle(this IList list)
27 | {
28 | int n = list.Count;
29 | while (n > 1) {
30 | n--;
31 | int k = rng.Next(n + 1);
32 | T value = list[k];
33 | list[k] = list[n];
34 | list[n] = value;
35 | }
36 | }
37 |
38 | }
39 | }
--------------------------------------------------------------------------------
/Helpers/RequestHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using ff14bot;
4 | using ff14bot.Managers;
5 | using ff14bot.RemoteWindows;
6 | using LlamaLibrary.Memory.Attributes;
7 | using LlamaLibrary.Structs;
8 |
9 | namespace LlamaLibrary.Helpers
10 | {
11 | public static class RequestHelper
12 | {
13 | internal static class Offsets
14 | {
15 | [Offset("Search 48 8D 0D ? ? ? ? E8 ? ? ? ? 0F B6 D8 EB ? Add 3 TraceRelative")]
16 | internal static IntPtr RequestInfo;
17 | [Offset("Search 44 8B 44 CB ? 48 8B 8B ? ? ? ? E8 ? ? ? ? 48 8B 8B ? ? ? ? 48 8B 93 ? ? ? ? 48 8B 01 48 8B 5C 24 ? 48 83 C4 ? 5F 48 FF A0 ? ? ? ? 48 83 BB ? ? ? ? ? Add 4 Read8")]
18 | internal static int ItemListStart;
19 | [Offset("Search 0F B6 89 ? ? ? ? 0F B6 43 ? Add 3 Read32")]
20 | internal static int ItemCount;
21 | [Offset("Search 0F B6 43 ? 3A C8 0F 83 ? ? ? ? Add 3 Read8")]
22 | internal static int ItemCount2;
23 | }
24 |
25 | public static ushort ItemCount => Core.Memory.Read(Offsets.RequestInfo + Offsets.ItemCount);
26 | public static ushort ItemCount2 => Core.Memory.Read(Offsets.RequestInfo + Offsets.ItemCount2);
27 |
28 | public static IntPtr ItemListStart => new IntPtr((long) (Offsets.RequestInfo + Offsets.ItemListStart));
29 |
30 | public static RequestItem[] GetItems()
31 | {
32 | return Core.Memory.ReadArray(ItemListStart, ItemCount);
33 | }
34 |
35 | public static bool HaveTurninItems()
36 | {
37 | if (!Request.IsOpen) return false;
38 | bool haveAll = true;
39 | foreach (var item in GetItems())
40 | {
41 | var items = InventoryManager.FilledSlots.Where(i => i.RawItemId == item.ItemId && i.Count >= item.Count);
42 | if (item.HQ)
43 | haveAll = haveAll && items.Any(i => i.IsHighQuality);
44 | else
45 | {
46 | haveAll = haveAll && items.Any();
47 | }
48 | }
49 | return haveAll;
50 | }
51 |
52 | public static bool HandOver()
53 | {
54 | if (!Request.IsOpen || !HaveTurninItems()) return false;
55 |
56 | foreach (var item in GetItems())
57 | {
58 | var items = InventoryManager.FilledSlots.Where(i => i.RawItemId == item.ItemId && i.Count >= item.Count);
59 | if (item.HQ)
60 | items.First(i => i.IsHighQuality).Handover();
61 | else
62 | {
63 | items.First().Handover();
64 | }
65 | }
66 |
67 | return Request.HandOverButtonClickable;
68 | }
69 | }
70 | }
--------------------------------------------------------------------------------
/Helpers/RowenaHelper.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.Helpers
2 | {
3 | //Class no longer needed due to rowena supply not rotating any more
4 | /*
5 | public static class RowenaHelper
6 | {
7 | public static DateTime LastUpdate;
8 | internal static class Offsets
9 | {
10 | [Offset("Search 40 53 48 83 EC ? B9 ? ? ? ? E8 ? ? ? ? 48 8B D8 48 85 C0 75 ? 48 83 C4 ? 5B C3 E8 ? ? ? ? 2B 03 33 D2 F7 73 ? 0F B7 C0 FF C0 0F AF 43 ? 03 03 48 83 C4 ? 5B C3 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 48 89 5C 24 ? 48 89 6C 24 ?")]
11 | internal static IntPtr RowenaGetCycleTime;
12 | [Offset("Search 48 8D 0D ? ? ? ? 4D 0F 44 C5 Add 3 TraceRelative")]
13 | internal static IntPtr RowenaItemList;
14 | [Offset("Search 81 FB ? ? ? ? 0F 83 ? ? ? ? 48 8D 0D ? ? ? ? Add 2 Read32")]
15 | internal static int RowenaItemCount;
16 | }
17 |
18 | public static async Task VerifyRowenaData()
19 | {
20 | if (Core.Memory.Read(Offsets.RowenaItemList) != 0 && LastUpdate < GetCycleEndTime())
21 | {
22 | return true;
23 | }
24 | AgentContentsInfo.Instance.Toggle();
25 | await Coroutine.Wait(5000, () => ContentsInfo.Instance.IsOpen);
26 | ContentsInfo.Instance.OpenMasterPieceSupplyWindow();
27 | await Coroutine.Wait(5000, () => MasterPieceSupply.Instance.IsOpen);
28 | await Coroutine.Wait(3000, () => Core.Memory.Read(Offsets.RowenaItemList) != 0);
29 | MasterPieceSupply.Instance.Close();
30 | await Coroutine.Wait(5000, () => !MasterPieceSupply.Instance.IsOpen);
31 | if (ContentsInfo.Instance.IsOpen)
32 | ContentsInfo.Instance.Close();
33 | return Core.Memory.Read(Offsets.RowenaItemList) != 0;
34 | }
35 |
36 | public static DateTime GetCycleEndTime()
37 | {
38 | IntPtr test;
39 | lock (Core.Memory.Executor.AssemblyLock)
40 | test = Core.Memory.CallInjected64(Offsets.RowenaGetCycleTime, 0);
41 | return DateTimeOffset.FromUnixTimeSeconds(test.ToInt64()).LocalDateTime;
42 | }
43 |
44 | public static RowenaItem[] GetItems()
45 | {
46 | return VerifyRowenaData().Result ? Core.Memory.ReadArray(Offsets.RowenaItemList, Offsets.RowenaItemCount) : new RowenaItem[0];
47 | }
48 | }*/
49 | }
--------------------------------------------------------------------------------
/Helpers/SharedFateHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Threading.Tasks;
4 | using Buddy.Coroutines;
5 | using LlamaLibrary.RemoteAgents;
6 | using LlamaLibrary.RemoteWindows;
7 | using LlamaLibrary.Structs;
8 |
9 | namespace LlamaLibrary.Helpers
10 | {
11 | public static class SharedFateHelper
12 | {
13 | private static DateTime LastWindowCheck;
14 |
15 | public static SharedFateProgress[] CachedProgress;
16 |
17 | private static TimeSpan CachePeriod = new TimeSpan(0, 1, 0);
18 |
19 | static SharedFateHelper()
20 | {
21 | LastWindowCheck = new DateTime(1970, 1, 1);
22 | }
23 |
24 | public static async Task GetSharedFateProgress(uint zoneId)
25 | {
26 | return (await CachedRead()).FirstOrDefault(i => i.Zone == zoneId);
27 | }
28 |
29 | public static async Task CachedRead()
30 | {
31 | if (DateTime.Now - LastWindowCheck < CachePeriod)
32 | {
33 | return CachedProgress;
34 | }
35 |
36 | CachedProgress = await OpenWindowGetFateProgresses();
37 |
38 | LastWindowCheck = DateTime.Now;
39 |
40 | return CachedProgress;
41 | }
42 |
43 | public static async Task OpenWindowGetFateProgresses()
44 | {
45 | if (FateProgress.Instance.IsOpen)
46 | {
47 | FateProgress.Instance.Close();
48 | await Coroutine.Wait(10000, () => !FateProgress.Instance.IsOpen);
49 | }
50 |
51 | AgentFateProgress.Instance.Toggle();
52 |
53 | await Coroutine.Wait(10000, () => FateProgress.Instance.IsOpen);
54 |
55 | if (!FateProgress.Instance.IsOpen)
56 | {
57 | return Array.Empty();
58 | }
59 |
60 | await Coroutine.Wait(20000, () => AgentFateProgress.Instance.NumberOfLoadedZones == 6);
61 |
62 | if (AgentFateProgress.Instance.NumberOfLoadedZones == 0)
63 | {
64 | return Array.Empty();
65 | }
66 |
67 | var result = AgentFateProgress.Instance.ProgressArray;
68 |
69 | if (FateProgress.Instance.IsOpen)
70 | {
71 | FateProgress.Instance.Close();
72 | }
73 |
74 | await Coroutine.Wait(10000, () => !FateProgress.Instance.IsOpen);
75 |
76 | return result;
77 | }
78 | }
79 | }
--------------------------------------------------------------------------------
/Helpers/SyncRoutines.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using ff14bot.Managers;
4 |
5 | namespace LlamaLibrary.Helpers
6 | {
7 | public static class SyncRoutines
8 | {
9 | public static bool WaitUntil(Func condition, int frequency = 25, int timeout = -1, bool checkWindows = false)
10 | {
11 | var t = Task.Run(async delegate
12 | {
13 | var waitTask = Task.Run(async () =>
14 | {
15 | while (!condition())
16 | {
17 | if (checkWindows) RaptureAtkUnitManager.Update();
18 | await Task.Delay(frequency);
19 | await Task.Yield();
20 | }
21 | });
22 |
23 | if (waitTask != await Task.WhenAny(waitTask, Task.Delay(timeout)))
24 | {
25 | throw new TimeoutException();
26 | }
27 |
28 | return condition();
29 | });
30 |
31 | try
32 | {
33 | t.Wait();
34 | }
35 | catch (AggregateException ae)
36 | {
37 | }
38 |
39 | return condition();
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Helpers/Timers.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 | using System.Windows.Media;
4 | using ff14bot;
5 | using ff14bot.Helpers;
6 | using LlamaLibrary.Memory.Attributes;
7 |
8 | namespace LlamaLibrary.Helpers
9 | {
10 | public static class Timers
11 | {
12 | internal static class Offsets
13 | {
14 | [Offset("Search 48 83 EC ? 48 8B 0D ? ? ? ? E8 ? ? ? ? 48 85 C0 74 ? 48 8B C8 48 83 C4 ? E9 ? ? ? ? E8 ? ? ? ?")]
15 | internal static IntPtr GetCurrentTime;
16 |
17 | [Offset("Search E8 ? ? ? ? 48 85 C0 0F 84 ? ? ? ? 41 0F B7 14 5C TraceCall")]
18 | internal static IntPtr GetCycleExd;
19 | }
20 |
21 | private const int MaxRows = 6;
22 | private static string Name => "Timers";
23 | private static CycleTime[] _cycles = new CycleTime[MaxRows];
24 | private static readonly string[] Description = {"","Duty/Beast Tribe Dailies", "Weekly Reset", "Unknown", "GC/Rowena", "Unknown"};
25 |
26 | public static DateTimeOffset CurrentTime => DateTimeOffset.FromUnixTimeSeconds((long) CurrentTimeStamp).LocalDateTime;
27 |
28 | static Timers()
29 | {
30 | for (int i = 0; i < MaxRows; i++)
31 | {
32 | _cycles[i] = GetCycleRow(i);
33 | }
34 | }
35 |
36 | public static void PrintTimers()
37 | {
38 | Log($"Current Time: ({CurrentTime.LocalDateTime})");
39 | for (int i = 1; i < MaxRows; i++)
40 | {
41 | var time = DateTimeOffset.FromUnixTimeSeconds(GetNextCycle(i));
42 |
43 | Log($"{time.LocalDateTime} ({Description[i]})");
44 | }
45 | }
46 |
47 | internal static ulong CurrentTimeStamp
48 | {
49 | get
50 | {
51 | ulong currentTime;
52 | lock (Core.Memory.Executor.AssemblyLock)
53 | currentTime = Core.Memory.CallInjected64(Offsets.GetCurrentTime, 0);
54 | return currentTime;
55 | }
56 | }
57 |
58 | internal static long GetNextCycle(int index)
59 | {
60 | var row = _cycles[index];
61 | Log($"Getting Cycle: ({index})");
62 | return row.FirstCycle + row.Cycle * ((uint)(ushort)(((uint)CurrentTimeStamp - row.FirstCycle) / row.Cycle) + 1);
63 | }
64 |
65 | private static void Log(string text)
66 | {
67 | Logging.Write(Colors.Peru, $"[{Name}] {text}");
68 | }
69 |
70 | internal static CycleTime GetCycleRow(int index)
71 | {
72 | IntPtr CyclePtr;
73 | lock (Core.Memory.Executor.AssemblyLock)
74 | CyclePtr = Core.Memory.CallInjected64(Offsets.GetCycleExd, index);
75 |
76 | if (CyclePtr != IntPtr.Zero)
77 | return Core.Memory.Read(CyclePtr);
78 |
79 | return new CycleTime();
80 | }
81 |
82 | [StructLayout(LayoutKind.Explicit, Size = 0x8)]
83 | public struct CycleTime
84 | {
85 | [FieldOffset(0)]
86 | public uint FirstCycle;
87 |
88 | [FieldOffset(0x4)]
89 | public uint Cycle;
90 | }
91 |
92 | }
93 |
94 |
95 | }
--------------------------------------------------------------------------------
/Helpers/TimersSettings.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Windows.Media;
5 | using ff14bot.Helpers;
6 | using Newtonsoft.Json;
7 |
8 | namespace LlamaLibrary.Helpers
9 | {
10 | public class TimersSettings: JsonSettings
11 | {
12 | private static TimersSettings _settings;
13 |
14 | private Dictionary _savedTimers = new Dictionary();
15 |
16 | private bool _debug;
17 |
18 | private bool _gil;
19 |
20 | private bool _merge;
21 | private bool _role;
22 |
23 | private bool _category;
24 |
25 | private int _numOfRetainers;
26 |
27 | public static TimersSettings Instance => _settings ?? (_settings = new TimersSettings());
28 | public TimersSettings() : base(Path.Combine(CharacterSettingsDirectory, "TimersSettings.json"))
29 | {
30 | }
31 |
32 | public Dictionary SavedTimers
33 | {
34 | get => _savedTimers;
35 | set
36 | {
37 | if (_savedTimers != value)
38 | {
39 | _savedTimers = value;
40 | Save();
41 | }
42 | }
43 | }
44 |
45 | public void SetTimer(int cycle, DateTimeOffset time)
46 | {
47 | if (_savedTimers.ContainsKey(cycle))
48 | {
49 | _savedTimers[cycle] = new SavedTimer(time, Timers.CurrentTime);
50 | }
51 | else
52 | {
53 | _savedTimers.Add(cycle, new SavedTimer(time, Timers.CurrentTime));
54 | }
55 | Save();
56 | }
57 |
58 | public DateTimeOffset GetTimer(int cycle)
59 | {
60 | if (_savedTimers.ContainsKey(cycle))
61 | {
62 | if (_savedTimers[cycle].IsValid)
63 | return _savedTimers[cycle].ResetTime;
64 |
65 | Log($"Timer Invalid getting new one for cycle: {cycle}");
66 | _savedTimers[cycle] = new SavedTimer(DateTimeOffset.FromUnixTimeSeconds(Timers.GetNextCycle(cycle)).LocalDateTime, Timers.CurrentTime);
67 | }
68 | else
69 | {
70 | Log($"No Timer saved for cycle: {cycle}");
71 | _savedTimers.Add(cycle, new SavedTimer(DateTimeOffset.FromUnixTimeSeconds(Timers.GetNextCycle(cycle)).LocalDateTime, Timers.CurrentTime));
72 | }
73 | Save();
74 |
75 | return _savedTimers[cycle].ResetTime;
76 | }
77 |
78 | private void Log(string text)
79 | {
80 | Logging.Write(Colors.Tomato, $"[{GetType().Name}] {text}");
81 | }
82 | }
83 |
84 | public class SavedTimer
85 | {
86 | public DateTimeOffset ResetTime;
87 | public DateTimeOffset LastChecked;
88 |
89 | public SavedTimer(DateTimeOffset resetTime, DateTimeOffset lastChecked)
90 | {
91 | ResetTime = resetTime;
92 | LastChecked = lastChecked;
93 | }
94 |
95 | [JsonIgnore]
96 | public bool IsValid => ((ResetTime - LastChecked).TotalSeconds > 0) && !((Timers.CurrentTime - ResetTime).TotalSeconds > 0);
97 | }
98 | }
--------------------------------------------------------------------------------
/LlamaLibrary.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LlamaLibrary", "LlamaLibrary.csproj", "{196EE308-0205-4CC4-B449-51064F7E9960}"
4 | EndProject
5 | Global
6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
7 | Debug|Any CPU = Debug|Any CPU
8 | Release|Any CPU = Release|Any CPU
9 | EndGlobalSection
10 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
11 | {196EE308-0205-4CC4-B449-51064F7E9960}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
12 | {196EE308-0205-4CC4-B449-51064F7E9960}.Debug|Any CPU.Build.0 = Debug|Any CPU
13 | {196EE308-0205-4CC4-B449-51064F7E9960}.Release|Any CPU.ActiveCfg = Release|Any CPU
14 | {196EE308-0205-4CC4-B449-51064F7E9960}.Release|Any CPU.Build.0 = Release|Any CPU
15 | EndGlobalSection
16 | EndGlobal
17 |
--------------------------------------------------------------------------------
/Materia/MateriaItem.cs:
--------------------------------------------------------------------------------
1 | using ff14bot.Managers;
2 |
3 | namespace LlamaLibrary.Materia
4 | {
5 | public class MateriaItem
6 | {
7 | public int Key;
8 | public int Tier;
9 | public int Value;
10 | internal Item Item => DataManager.GetItem((uint)Key);
11 | public string ItemName => Item.CurrentLocaleName;
12 |
13 | public string Stat;
14 |
15 | public MateriaItem(int key, int tier, int value, string stat)
16 | {
17 | this.Key = key;
18 | this.Tier = tier;
19 | this.Value = value;
20 | this.Stat = stat;
21 | }
22 |
23 | public override string ToString()
24 | {
25 | return $"{DataManager.GetItem((uint)Key).CurrentLocaleName} {Tier} {Value}";
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/Memory/Attributes/OffsetAttribute.cs:
--------------------------------------------------------------------------------
1 | /*
2 | DeepDungeon is licensed under a
3 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
4 |
5 | You should have received a copy of the license along with this
6 | work. If not, see .
7 |
8 | Orginal work done by zzi, contibutions by Omninewb, Freiheit, and mastahg
9 | */
10 |
11 | using System;
12 |
13 | namespace LlamaLibrary.Memory.Attributes
14 | {
15 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
16 | public class OffsetAttribute : Attribute
17 | {
18 | public bool Numeric;
19 | public string Pattern = "";
20 | public string PatternCN = "";
21 |
22 | public OffsetAttribute(string pattern, bool numeric = false, int expectedValue = 0)
23 | {
24 | Pattern = pattern;
25 | if (PatternCN == "")
26 | PatternCN = pattern;
27 | Numeric = numeric;
28 | }
29 |
30 | public OffsetAttribute(string pattern, string cnpattern, bool numeric = false, int expectedValue = 0)
31 | {
32 | /*if (pattern != "")
33 | Pattern = pattern;*/
34 | PatternCN = cnpattern;
35 | Numeric = numeric;
36 | }
37 | }
38 |
39 | internal class OffsetCNAttribute : OffsetAttribute
40 | {
41 | public OffsetCNAttribute(string pattern, bool numeric = false, int expectedValue = 0) : base("", pattern, numeric, expectedValue)
42 | {
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/Memory/Attributes/OffsetValue.cs:
--------------------------------------------------------------------------------
1 | /*
2 | DeepDungeon is licensed under a
3 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
4 |
5 | You should have received a copy of the license along with this
6 | work. If not, see .
7 |
8 | Orginal work done by zzi, contibutions by Omninewb, Freiheit, and mastahg
9 | */
10 |
11 | using System;
12 |
13 | namespace LlamaLibrary.Memory.Attributes
14 | {
15 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
16 | internal class OffsetValueNA : Attribute
17 | {
18 | public int Value;
19 |
20 | public OffsetValueNA(int val)
21 | {
22 | Value = val;
23 | }
24 | }
25 |
26 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
27 | internal class OffsetValueCN : Attribute
28 | {
29 | public int Value;
30 |
31 | public OffsetValueCN(int val)
32 | {
33 | Value = val;
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/OrderbotTags/AutoEquip.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using Clio.XmlEngine;
3 | using ff14bot.NeoProfiles;
4 | using LlamaLibrary.RemoteAgents;
5 | using LlamaLibrary.RemoteWindows;
6 | using TreeSharp;
7 | using Action = TreeSharp.Action;
8 |
9 | namespace LlamaLibrary.OrderbotTags
10 | {
11 | [XmlElement("AutoEquip")]
12 | public class AutoEquip : ProfileBehavior
13 | {
14 | private bool _isDone;
15 | private bool _isOpening;
16 |
17 | public override bool IsDone => _isDone;
18 |
19 | [XmlAttribute("UpdateGearSet")]
20 | [DefaultValue(false)]
21 | public bool UpdateGearSet { get; set; } = false;
22 |
23 | public override bool HighPriority => true;
24 |
25 | protected override void OnStart()
26 | {
27 | }
28 |
29 | protected override void OnDone()
30 | {
31 | }
32 |
33 | protected override void OnResetCachedDone()
34 | {
35 | _isDone = false;
36 | _isOpening = false;
37 | }
38 |
39 | protected override Composite CreateBehavior()
40 | {
41 | return RepairBehavior;
42 | }
43 |
44 | public Composite RepairBehavior
45 | {
46 | get
47 | {
48 | return new PrioritySelector(new PrioritySelector(new Decorator(r => RecommendEquip.Instance.IsOpen,
49 | new Sequence(new Action(r => Log($"{RecommendEquip.Instance.Name} Window open")),
50 | new Action(r => RecommendEquip.Instance.Confirm()),
51 | new Sleep(1000),
52 | new Action(r => _isOpening = false),
53 | new Action(r => _isDone = true),
54 | new Decorator(r => UpdateGearSet, new Action(async r => await ScriptConditions.Helpers.UpdateGearSet())))),
55 |
56 | new Decorator(r => !RecommendEquip.Instance.IsOpen && !IsDone && !_isOpening,
57 | new Sequence(new Action(r => AgentRecommendEquip.Instance.Toggle()),
58 | new Action(r => _isOpening = true)))));
59 | }
60 | }
61 | }
62 | }
--------------------------------------------------------------------------------
/OrderbotTags/AutoInventoryEquip.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using System.Threading.Tasks;
3 | using Buddy.Coroutines;
4 | using Clio.XmlEngine;
5 | using ff14bot.NeoProfiles;
6 | using TreeSharp;
7 | using static LlamaLibrary.Helpers.GeneralFunctions;
8 |
9 | namespace LlamaLibrary.OrderbotTags
10 | {
11 | [XmlElement("AutoInventoryEquip")]
12 | public class AutoInventoryEquip : ProfileBehavior
13 | {
14 |
15 | private bool _isDone;
16 |
17 | [XmlAttribute("UpdateGearSet")]
18 | [XmlAttribute("updategearset")]
19 | [DefaultValue(true)]
20 | private bool UpdateGearSet { get; set; }
21 |
22 | [XmlAttribute("RecommendEquip")]
23 | [XmlAttribute("recommendequip")]
24 | [DefaultValue(true)]
25 | private bool UseRecommendEquip { get; set; }
26 |
27 | public override bool HighPriority => true;
28 |
29 | public override bool IsDone => _isDone;
30 |
31 | protected override void OnStart()
32 | {
33 | }
34 |
35 | protected override void OnDone()
36 | {
37 | }
38 |
39 | protected override void OnResetCachedDone()
40 | {
41 | _isDone = false;
42 | }
43 |
44 | protected override Composite CreateBehavior()
45 | {
46 | return new ActionRunCoroutine(r => RunEquip());
47 | }
48 |
49 | private async Task RunEquip()
50 | {
51 | if (_isDone)
52 | {
53 | await Coroutine.Yield();
54 | return;
55 | }
56 |
57 | await InventoryEquipBest(UpdateGearSet, UseRecommendEquip);
58 |
59 | _isDone = true;
60 | }
61 | }
62 |
63 | }
--------------------------------------------------------------------------------
/OrderbotTags/AutoLisbethEquip.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using Buddy.Coroutines;
3 | using Clio.XmlEngine;
4 | using ff14bot.NeoProfiles;
5 | using LlamaLibrary.Helpers;
6 | using TreeSharp;
7 |
8 | namespace LlamaLibrary.OrderbotTags
9 | {
10 | [XmlElement("AutoLisbethEquip")]
11 | public class AutoLisbethEquip: ProfileBehavior
12 | {
13 |
14 | private bool _isDone;
15 |
16 | public override bool HighPriority => true;
17 |
18 | public override bool IsDone => _isDone;
19 |
20 | protected override void OnStart()
21 | {
22 | }
23 |
24 | protected override void OnDone()
25 | {
26 | }
27 |
28 | protected override void OnResetCachedDone()
29 | {
30 | _isDone = false;
31 | }
32 |
33 | protected override Composite CreateBehavior()
34 | {
35 | return new ActionRunCoroutine(r => LisbethEquipBest());
36 | }
37 |
38 | private async Task LisbethEquipBest()
39 | {
40 | if (_isDone)
41 | {
42 | await Coroutine.Yield();
43 | return;
44 | }
45 | await GeneralFunctions.StopBusy(leaveDuty:false, dismount:false);
46 | await Lisbeth.EquipOptimalGear();
47 |
48 | _isDone = true;
49 | }
50 | }
51 |
52 | }
--------------------------------------------------------------------------------
/OrderbotTags/BuyGCItem.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using System.Threading.Tasks;
3 | using Clio.XmlEngine;
4 | using ff14bot.NeoProfiles;
5 | using TreeSharp;
6 |
7 | namespace LlamaLibrary.OrderbotTags
8 | {
9 | [XmlElement("BuyGCItem")]
10 | public class BuyGCItem: ProfileBehavior
11 | {
12 |
13 | private bool _isDone;
14 |
15 | [XmlAttribute("ItemId")] public int ItemId { get; set; }
16 |
17 | [XmlAttribute("Count")]
18 | [DefaultValue(1)]
19 | public int Count { get; set; }
20 |
21 | public override bool HighPriority => true;
22 |
23 | public override bool IsDone => _isDone;
24 |
25 | protected override void OnStart()
26 | {
27 | }
28 |
29 | protected override void OnDone()
30 | {
31 | }
32 |
33 | protected override void OnResetCachedDone()
34 | {
35 | _isDone = false;
36 | }
37 |
38 | protected override Composite CreateBehavior()
39 | {
40 | return new ActionRunCoroutine(r => BuyGCKnownItem(ItemId, Count));
41 | }
42 |
43 | private async Task BuyGCKnownItem(int itemId, int Count)
44 | {
45 | await LlamaLibrary.Helpers.GrandCompanyShop.BuyKnownItem((uint) itemId, Count);
46 |
47 | _isDone = true;
48 | }
49 | }
50 |
51 | }
--------------------------------------------------------------------------------
/OrderbotTags/BuyWhiteScriptItem.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using System.Threading.Tasks;
3 | using Buddy.Coroutines;
4 | using Clio.XmlEngine;
5 | using ff14bot.NeoProfiles;
6 | using TreeSharp;
7 |
8 | namespace LlamaLibrary.OrderbotTags
9 | {
10 | [XmlElement("BuyWhiteScriptItem")]
11 | public class BuyWhiteScriptItem : ProfileBehavior
12 | {
13 | private bool _isDone;
14 |
15 | [XmlAttribute("ItemId")] public int ItemId { get; set; }
16 |
17 | [XmlAttribute("SelectString")]
18 | [DefaultValue(0)]
19 | public int SelectStringLine { get; set; }
20 |
21 | public override bool HighPriority => true;
22 |
23 | public override bool IsDone => _isDone;
24 |
25 | protected override void OnStart()
26 | {
27 | }
28 |
29 | protected override void OnDone()
30 | {
31 | }
32 |
33 | protected override void OnResetCachedDone()
34 | {
35 | _isDone = false;
36 | }
37 |
38 | protected override Composite CreateBehavior()
39 | {
40 | return new ActionRunCoroutine(r => BuyWhiteScrip(ItemId));
41 | }
42 |
43 | private async Task BuyWhiteScrip(int itemId)
44 | {
45 | await Coroutine.Sleep(500);
46 | await IshgardHandinBase.BuyItem((uint) itemId,SelectStringLine);
47 |
48 | _isDone = true;
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/OrderbotTags/EquipWeapon.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using System.Threading.Tasks;
3 | using Clio.XmlEngine;
4 | using ff14bot.Enums;
5 | using ff14bot.Managers;
6 | using ff14bot.NeoProfiles;
7 | using TreeSharp;
8 |
9 | namespace LlamaLibrary.OrderbotTags
10 | {
11 | [XmlElement("EquipWeapon")]
12 | public class EquipWeapon : ProfileBehavior
13 | {
14 | private bool _isDone;
15 |
16 |
17 | [XmlAttribute("itemIDs")]
18 | [XmlAttribute("ItemIDs")]
19 | [XmlAttribute("itemID")]
20 | [XmlAttribute("ItemID")]
21 | public int[] Item { get; set; }
22 |
23 | public override bool HighPriority => true;
24 |
25 | protected override void OnStart()
26 | {
27 | }
28 |
29 | protected override void OnDone()
30 | {
31 | }
32 |
33 | protected override void OnResetCachedDone()
34 | {
35 | _isDone = false;
36 | }
37 |
38 | protected override Composite CreateBehavior()
39 | {
40 | return new ActionRunCoroutine(r => EquipWeapons(Item));
41 | }
42 |
43 | private async Task EquipWeapons(int[] weapons)
44 | {
45 | foreach (var weapon in weapons)
46 | {
47 | var itemRole = DataManager.GetItem((uint) weapon).ItemRole;
48 | BagSlot EquipSlot = ff14bot.Managers.InventoryManager.GetBagByInventoryBagId(ff14bot.Enums.InventoryBagId.EquippedItems)[ff14bot.Enums.EquipmentSlot.MainHand];
49 | if (itemRole == ItemRole.Shield)
50 | EquipSlot = ff14bot.Managers.InventoryManager.GetBagByInventoryBagId(ff14bot.Enums.InventoryBagId.EquippedItems)[ff14bot.Enums.EquipmentSlot.OffHand];
51 |
52 | var item1 = ff14bot.Managers.InventoryManager.FilledInventoryAndArmory.FirstOrDefault(i => i.RawItemId == (uint) weapon);
53 | if (item1 != default(BagSlot))
54 | item1.Move(EquipSlot);
55 | }
56 |
57 | _isDone = true;
58 | }
59 |
60 | public override bool IsDone => _isDone;
61 | }
62 | }
--------------------------------------------------------------------------------
/OrderbotTags/GearSetEquipAll.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.ComponentModel;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Buddy.Coroutines;
6 | using Clio.XmlEngine;
7 | using ff14bot.Managers;
8 | using ff14bot.NeoProfiles;
9 | using ff14bot.RemoteWindows;
10 | using TreeSharp;
11 | using static LlamaLibrary.Helpers.GeneralFunctions;
12 |
13 | namespace LlamaLibrary.OrderbotTags
14 | {
15 | [XmlElement("GearSetEquipAll")]
16 | public class GearSetEquipAll : ProfileBehavior
17 | {
18 |
19 | private bool _isDone;
20 |
21 | [XmlAttribute("RecommendEquip")]
22 | [XmlAttribute("recommendequip")]
23 | [DefaultValue(true)]
24 | private bool UseRecommendEquip { get; set; }
25 |
26 | public override bool HighPriority => true;
27 |
28 | public override bool IsDone => _isDone;
29 |
30 | protected override void OnStart()
31 | {
32 | }
33 |
34 | protected override void OnDone()
35 | {
36 | }
37 |
38 | protected override void OnResetCachedDone()
39 | {
40 | _isDone = false;
41 | }
42 |
43 | protected override Composite CreateBehavior()
44 | {
45 | return new ActionRunCoroutine(r => RunEquip());
46 | }
47 |
48 | private async Task RunEquip()
49 | {
50 | if (_isDone)
51 | {
52 | await Coroutine.Yield();
53 | return;
54 | }
55 |
56 | IEnumerable groupedGearSets = GearsetManager
57 | .GearSets
58 | .Where(g => g.InUse)
59 | .OrderByDescending(GetGearSetiLvl)
60 | .GroupBy(g => g.Class)
61 | .Select(g => g.FirstOrDefault());
62 |
63 | await Coroutine.Sleep(4000);
64 |
65 | foreach (var gearSet in groupedGearSets)
66 | {
67 | GearsetManager.ChangeGearset(gearSet.Index);
68 | if (await Coroutine.Wait(1200, () => SelectYesno.IsOpen))
69 | {
70 | SelectYesno.ClickYes();
71 | await Coroutine.Sleep(800);
72 | }
73 | await InventoryEquipBest(useRecommendEquip:UseRecommendEquip);
74 | await Coroutine.Sleep(400);
75 | }
76 |
77 | _isDone = true;
78 | }
79 | }
80 |
81 | }
--------------------------------------------------------------------------------
/OrderbotTags/GetTo.cs:
--------------------------------------------------------------------------------
1 | //
2 | // LICENSE:
3 | // This work is licensed under the
4 | // Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
5 | // also known as CC-BY-NC-SA. To view a copy of this license, visit
6 | // http://creativecommons.org/licenses/by-nc-sa/3.0/
7 | // or send a letter to
8 | // Creative Commons // 171 Second Street, Suite 300 // San Francisco, California, 94105, USA.
9 | //
10 |
11 | using System.Collections.Generic;
12 | using System.Threading.Tasks;
13 | using Clio.Utilities;
14 | using Clio.XmlEngine;
15 | using ff14bot.Behavior;
16 | using ff14bot.Navigation;
17 | using TreeSharp;
18 | using LlamaLibrary.Helpers;
19 |
20 | namespace ff14bot.NeoProfiles.Tags
21 | {
22 |
23 | [XmlElement("LLGetTo")]
24 | public class GetTo : ProfileBehavior
25 | {
26 | [XmlAttribute("XYZ")]
27 | public Vector3 XYZ { get; set; }
28 |
29 | [XmlAttribute("ZoneId")]
30 | public int ZoneId { get; set; }
31 |
32 |
33 | private bool _generatedNodes = false;
34 | private bool _isdone;
35 | public override bool IsDone
36 | {
37 | get
38 | {
39 | return FinalizedPath?.Count == 0;
40 | }
41 | }
42 |
43 | public override bool HighPriority
44 | {
45 | get { return true; }
46 | }
47 |
48 | protected override void OnResetCachedDone()
49 | {
50 | _isdone = false;
51 | _generatedNodes = false;
52 | FinalizedPath = null;
53 | }
54 |
55 | public Queue FinalizedPath;
56 | protected override void OnStart()
57 | {
58 | }
59 |
60 | protected override void OnDone()
61 | {
62 | }
63 |
64 |
65 |
66 | private async Task GenerateNodes()
67 | {
68 | var path = await NavGraph.GetPathAsync((uint)ZoneId, XYZ);
69 | if (path == null)
70 | {
71 | LogError($"Couldn't get a path to {XYZ} on {ZoneId}, Stopping.");
72 | return true;
73 | }
74 | _generatedNodes = true;
75 | FinalizedPath = path;
76 | return true;
77 | }
78 |
79 | protected override Composite CreateBehavior()
80 | {
81 | return new PrioritySelector(
82 | CommonBehaviors.HandleLoading,
83 |
84 | //new Decorator(r => !_generatedNodes, new ActionRunCoroutine(r => GenerateNodes())),
85 | //NavGraph.NavGraphConsumer(r => FinalizedPath)
86 | new Decorator(r => !_generatedNodes, new ActionRunCoroutine(t => Lisbeth.TravelTo(ZoneId.ToString(), XYZ)))
87 | );
88 | }
89 |
90 |
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/OrderbotTags/LLChangeZone.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using Buddy.Coroutines;
3 | using Clio.XmlEngine;
4 | using ff14bot.Behavior;
5 | using ff14bot.Managers;
6 | using ff14bot.NeoProfiles;
7 | using TreeSharp;
8 |
9 | namespace LlamaLibrary.OrderbotTags
10 | {
11 | [XmlElement("LLChangeZone")]
12 | public class LLChangeZone : ProfileBehavior
13 | {
14 | private bool _isDone;
15 |
16 | [XmlAttribute("Heading")] public float Heading { get; set; }
17 |
18 | public override bool HighPriority => true;
19 |
20 | public override bool IsDone => _isDone;
21 |
22 | protected override void OnStart()
23 | {
24 | }
25 |
26 | protected override void OnDone()
27 | {
28 | }
29 |
30 | protected override void OnResetCachedDone()
31 | {
32 | _isDone = false;
33 | }
34 |
35 | protected override Composite CreateBehavior()
36 | {
37 | return new ActionRunCoroutine(r => ChangeZoneTask(Heading));
38 | }
39 |
40 | private async Task ChangeZoneTask(float Heading)
41 | {
42 | MovementManager.SetFacing(Heading);
43 | MovementManager.MoveForwardStart();
44 | while (!CommonBehaviors.IsLoading) { await Coroutine.Yield(); }
45 | MovementManager.MoveStop();
46 |
47 | _isDone = true;
48 | }
49 | }
50 | }
--------------------------------------------------------------------------------
/OrderbotTags/LLDesynth.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using System.Linq;
3 | using System.Threading.Tasks;
4 | using Buddy.Coroutines;
5 | using Clio.XmlEngine;
6 | using ff14bot;
7 | using ff14bot.Managers;
8 | using ff14bot.NeoProfiles;
9 | using ff14bot.RemoteAgents;
10 | using ff14bot.RemoteWindows;
11 | using LlamaLibrary.Memory;
12 | using TreeSharp;
13 |
14 | namespace LlamaLibrary.OrderbotTags
15 | {
16 | [XmlElement("LLDesynth")]
17 | public class LLDesynth : ProfileBehavior
18 | {
19 | private bool _isDone;
20 |
21 | [XmlAttribute("ItemIds")]
22 | public int[] ItemIds { get; set; }
23 |
24 | [DefaultValue(500)]
25 | [XmlAttribute("DesynthDelay")]
26 | public int DesynthDelay { get; set; }
27 |
28 | public override bool HighPriority => true;
29 |
30 | public override bool IsDone => _isDone;
31 |
32 | protected override void OnStart()
33 | {
34 | }
35 |
36 | protected override void OnDone()
37 | {
38 | }
39 |
40 | protected override void OnResetCachedDone()
41 | {
42 | _isDone = false;
43 | }
44 |
45 | protected override Composite CreateBehavior()
46 | {
47 | return new ActionRunCoroutine(r => DesynthItems(ItemIds));
48 | }
49 |
50 | private async Task DesynthItems(int[] itemId)
51 | {
52 | var itemsToDesynth = InventoryManager.FilledSlots.Where(bs => bs.IsDesynthesizable && itemId.Contains((int)bs.RawItemId));
53 | var agentSalvageInterface = AgentInterface.Instance;
54 | var agentSalvage = Offsets.SalvageAgent;
55 | //Log($"{itemsToDesynth.Count()}");
56 |
57 | foreach (var item in itemsToDesynth)
58 | {
59 | Log($"Desynthesize Item - Name: {item.Item.CurrentLocaleName}");
60 |
61 | lock (Core.Memory.Executor.AssemblyLock)
62 | {
63 | Core.Memory.CallInjected64(agentSalvage, agentSalvageInterface.Pointer, item.Pointer, 14,0);
64 | }
65 | // await Coroutine.Sleep(500);
66 |
67 |
68 | await Coroutine.Wait(5000, () => SalvageDialog.IsOpen);
69 |
70 | if (SalvageDialog.IsOpen)
71 | {
72 | RaptureAtkUnitManager.GetWindowByName("SalvageDialog").SendAction(1, 3, 0);
73 | //await Coroutine.Sleep(500);
74 | await Coroutine.Wait(10000, () => SalvageResult.IsOpen);
75 |
76 | if (SalvageResult.IsOpen)
77 | {
78 | SalvageResult.Close();
79 | //await Coroutine.Sleep(500);
80 | await Coroutine.Wait(5000, () => !SalvageResult.IsOpen);
81 | }
82 | else
83 | {
84 | Log("Result didn't open");
85 | break;
86 | }
87 | }
88 | else
89 | {
90 | Log("SalvageDialog didn't open");
91 | break;
92 | }
93 | }
94 |
95 | _isDone = true;
96 | }
97 | }
98 | }
--------------------------------------------------------------------------------
/OrderbotTags/LLDiscardItem.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.ComponentModel;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Buddy.Coroutines;
6 | using Clio.XmlEngine;
7 | using ff14bot.Managers;
8 | using ff14bot.NeoProfiles;
9 | using LlamaLibrary.Extensions;
10 | using TreeSharp;
11 | using static LlamaLibrary.Helpers.GeneralFunctions;
12 |
13 | namespace LlamaLibrary.OrderbotTags
14 | {
15 | [XmlElement("LLDiscardItem")]
16 | public class LLDiscardItem : ProfileBehavior
17 | {
18 | [XmlAttribute("ItemIDs")]
19 | [XmlAttribute("ItemIds")]
20 | [XmlAttribute("ItemID")]
21 | [XmlAttribute("ItemId")]
22 | [DefaultValue(new int[0])]
23 | private int[] ItemIds { get; set; }
24 |
25 | private bool _isDone;
26 |
27 | public override bool HighPriority => true;
28 |
29 | public override bool IsDone => _isDone;
30 |
31 | protected override void OnStart()
32 | {
33 | }
34 |
35 | protected override void OnDone()
36 | {
37 | }
38 |
39 | protected override void OnResetCachedDone()
40 | {
41 | _isDone = false;
42 | }
43 |
44 | protected override Composite CreateBehavior()
45 | {
46 | return new ActionRunCoroutine(r => DiscardItems());
47 | }
48 |
49 | private async Task DiscardItems()
50 | {
51 | if (_isDone)
52 | {
53 | await Coroutine.Yield();
54 | return;
55 | }
56 |
57 | List slots = InventoryManager.FilledSlots.Where(x => ItemIds.Contains((int)x.RawItemId)).ToList();
58 |
59 | if (!slots.Any())
60 | {
61 | _isDone = true;
62 | return;
63 | }
64 |
65 | await StopBusy(leaveDuty:false, dismount:false);
66 |
67 | foreach (var slot in slots)
68 | {
69 | string name = slot.Name;
70 | slot.Discard();
71 | if (await Coroutine.Wait(5000, () => !slot.IsValid || !slot.IsFilled))
72 | {
73 | Log($"Discarded item: {name}.");
74 | await Coroutine.Sleep(800);
75 | }
76 | else
77 | {
78 | Log($"Could not discard item: {name}.");
79 | }
80 | }
81 |
82 | _isDone = true;
83 | }
84 | }
85 | }
--------------------------------------------------------------------------------
/OrderbotTags/LLGcExpeditionResult.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.Threading.Tasks;
4 | using Buddy.Coroutines;
5 | using Clio.XmlEngine;
6 | using ff14bot;
7 | using ff14bot.Behavior;
8 | using ff14bot.Enums;
9 | using ff14bot.Helpers;
10 | using ff14bot.Managers;
11 | using ff14bot.Navigation;
12 | using ff14bot.NeoProfiles;
13 | using ff14bot.Pathing.Service_Navigation;
14 | using ff14bot.RemoteWindows;
15 | using LlamaLibrary.Enums;
16 | using LlamaLibrary.Helpers;
17 | using LlamaLibrary.RemoteWindows;
18 | using TreeSharp;
19 |
20 | namespace LlamaLibrary.OrderbotTags
21 | {
22 | [XmlElement("LLGcExpeditionResult")]
23 | public class LLGcExpeditionResult : ProfileBehavior
24 | {
25 | private bool _isDone;
26 |
27 | public override bool HighPriority => true;
28 |
29 | public override bool IsDone => _isDone;
30 |
31 | protected override void OnStart()
32 | {
33 | }
34 |
35 | protected override void OnDone()
36 | {
37 | }
38 |
39 | protected override void OnResetCachedDone()
40 | {
41 | _isDone = false;
42 | }
43 |
44 | protected override Composite CreateBehavior()
45 | {
46 | return new ActionRunCoroutine(r => GcExpeditionResultTask());
47 | }
48 |
49 | private async Task GcExpeditionResultTask()
50 | {
51 | Navigator.PlayerMover = new SlideMover();
52 | Navigator.NavigationProvider = new ServiceNavigationProvider();
53 |
54 | //Inside Barracks
55 |
56 | await Navigation.OffMeshMoveInteract(GameObjectManager.GetObjectByNPCId(GrandCompanyHelper.GetNpcByType(GCNpc.Squadron_Sergeant)));
57 |
58 | GameObjectManager.GetObjectByNPCId(GrandCompanyHelper.GetNpcByType(GCNpc.Squadron_Sergeant)).Interact();
59 |
60 | await Coroutine.Wait(10000, () => GcArmyExpeditionResult.Instance.IsOpen);
61 | GcArmyExpeditionResult.Instance.Close();
62 |
63 | _isDone = true;
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/OrderbotTags/LLGoHome.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using Clio.XmlEngine;
3 | using ff14bot.NeoProfiles;
4 | using TreeSharp;
5 |
6 | namespace LlamaLibrary.OrderbotTags
7 | {
8 | [XmlElement("LLGoHome")]
9 | public class LLGoHome : ProfileBehavior
10 | {
11 | private bool _isDone;
12 |
13 | public override bool HighPriority => true;
14 |
15 | public override bool IsDone => _isDone;
16 |
17 | protected override void OnStart()
18 | {
19 | }
20 |
21 | protected override void OnDone()
22 | {
23 | }
24 |
25 | protected override void OnResetCachedDone()
26 | {
27 | _isDone = false;
28 | }
29 |
30 | protected override Composite CreateBehavior()
31 | {
32 | return new ActionRunCoroutine(r => LLGoHomeTask());
33 | }
34 |
35 | private async Task LLGoHomeTask()
36 | {
37 | await LlamaLibrary.Helpers.GeneralFunctions.GoHome();
38 |
39 | _isDone = true;
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/OrderbotTags/LLGoToBarracks.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.Threading.Tasks;
4 | using Buddy.Coroutines;
5 | using Clio.XmlEngine;
6 | using ff14bot;
7 | using ff14bot.Behavior;
8 | using ff14bot.Enums;
9 | using ff14bot.Helpers;
10 | using ff14bot.Managers;
11 | using ff14bot.Navigation;
12 | using ff14bot.NeoProfiles;
13 | using ff14bot.Pathing.Service_Navigation;
14 | using ff14bot.RemoteWindows;
15 | using LlamaLibrary.Enums;
16 | using LlamaLibrary.Helpers;
17 | using LlamaLibrary.RemoteWindows;
18 | using TreeSharp;
19 |
20 | namespace LlamaLibrary.OrderbotTags
21 | {
22 | [XmlElement("LLGoToBarracks")]
23 | public class LLGoToBarracks : ProfileBehavior
24 | {
25 | private bool _isDone;
26 |
27 | public override bool HighPriority => true;
28 |
29 | public override bool IsDone => _isDone;
30 |
31 | protected override void OnStart()
32 | {
33 | }
34 |
35 | protected override void OnDone()
36 | {
37 | }
38 |
39 | protected override void OnResetCachedDone()
40 | {
41 | _isDone = false;
42 | }
43 |
44 | protected override Composite CreateBehavior()
45 | {
46 | return new ActionRunCoroutine(r => GoToBarracksTask());
47 | }
48 |
49 | private async Task GoToBarracksTask()
50 | {
51 | Navigator.PlayerMover = new SlideMover();
52 | Navigator.NavigationProvider = new ServiceNavigationProvider();
53 |
54 | // Not in Barracks
55 | Log($"Moving to Barracks");
56 | await GrandCompanyHelper.InteractWithNpc(GCNpc.Entrance_to_the_Barracks);
57 | await Coroutine.Wait(5000, () => SelectYesno.IsOpen);
58 | await Buddy.Coroutines.Coroutine.Sleep(500);
59 | if (ff14bot.RemoteWindows.SelectYesno.IsOpen)
60 | {
61 | Log($"Selecting Yes.");
62 | ff14bot.RemoteWindows.SelectYesno.ClickYes();
63 | }
64 | await Coroutine.Wait(5000, () => CommonBehaviors.IsLoading);
65 | while (CommonBehaviors.IsLoading)
66 | {
67 | Log($"Waiting for zoning to finish...");
68 | await Coroutine.Wait(-1, () => (!CommonBehaviors.IsLoading));
69 |
70 | }
71 |
72 |
73 |
74 |
75 | _isDone = true;
76 | }
77 | }
78 | }
--------------------------------------------------------------------------------
/OrderbotTags/LLOpenChest.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using System.Threading.Tasks;
3 | using Buddy.Coroutines;
4 | using Clio.XmlEngine;
5 | using ff14bot;
6 | using ff14bot.Behavior;
7 | using ff14bot.Managers;
8 | using ff14bot.Navigation;
9 | using ff14bot.NeoProfiles;
10 | using ff14bot.Objects;
11 | using TreeSharp;
12 |
13 | namespace LlamaLibrary.OrderbotTags
14 | {
15 | [XmlElement("LLOpenChest")]
16 | public class LLOpenChest : ProfileBehavior
17 | {
18 | private bool _isDone;
19 |
20 | public override bool HighPriority => true;
21 |
22 | public override bool IsDone => _isDone;
23 |
24 | protected override void OnStart()
25 | {
26 | }
27 |
28 | protected override void OnDone()
29 | {
30 | }
31 |
32 | protected override void OnResetCachedDone()
33 | {
34 | _isDone = false;
35 | }
36 |
37 | protected override Composite CreateBehavior()
38 | {
39 | return new ActionRunCoroutine(r => OpenChestTask());
40 | }
41 |
42 | private async Task OpenChestTask()
43 | {
44 | while (GameObjectManager.GetObjectsOfType().Any(r => r.Distance() < 50 && (r.Name == "宝箱" || r.Name == "Treasure Coffer" || r.Name == "treasure coffer")))
45 | {
46 | var _chest = GameObjectManager.GetObjectsOfType().FirstOrDefault(r => r.Distance() < 50 && (r.Name == "宝箱" || r.Name == "Treasure Coffer" || r.Name == "treasure coffer"));
47 | while (Core.Me.Distance(_chest.Location) > 1)
48 | {
49 | await CommonTasks.MoveTo(_chest.Location);
50 | await Coroutine.Yield();
51 | }
52 |
53 | Navigator.PlayerMover.MoveStop();
54 | await Coroutine.Sleep(1000);
55 | _chest.Interact();
56 | await Coroutine.Sleep(3000);
57 | }
58 |
59 | _isDone = true;
60 | }
61 | }
62 | }
--------------------------------------------------------------------------------
/OrderbotTags/LLPickUpQuest.cs:
--------------------------------------------------------------------------------
1 | using Clio.XmlEngine;
2 | using ff14bot.RemoteWindows;
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using TreeSharp;
6 | using Action = TreeSharp.Action;
7 |
8 | namespace ff14bot.NeoProfiles.Tags
9 | {
10 | [XmlElement("LLPickUpQuest")]
11 | [XmlElement("LLPickupQuest")]
12 | public class LLPickUpQuest : PickupQuestTag
13 | {
14 | [DefaultValue(new int[0])]
15 | [XmlAttribute("DialogOption")]
16 | public int[] DialogOption { get; set; }
17 |
18 | private readonly Queue selectStringIndex = new Queue();
19 |
20 | protected override void OnStart()
21 | {
22 | if (DialogOption.Length > 0)
23 | {
24 | foreach (var i in DialogOption) { selectStringIndex.Enqueue(i); }
25 | }
26 |
27 | base.OnStart();
28 | }
29 |
30 | protected override Composite CreateBehavior()
31 | {
32 | return new PrioritySelector(
33 | new Decorator(ret => SelectString.IsOpen,
34 | new Action(r =>
35 | {
36 | if (selectStringIndex.Count > 0) { SelectString.ClickSlot((uint)selectStringIndex.Dequeue()); }
37 | else { SelectString.ClickSlot(0); }
38 | })
39 | ),
40 | new Decorator(ret => SelectYesno.IsOpen,
41 | new Action(r =>
42 | {
43 | SelectYesno.ClickYes();
44 | })
45 | ),
46 | base.CreateBehavior()
47 | );
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/OrderbotTags/LLSellItem.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using System.Linq;
3 | using System.Threading.Tasks;
4 | using Buddy.Coroutines;
5 | using Clio.XmlEngine;
6 | using ff14bot.Managers;
7 | using ff14bot.NeoProfiles;
8 | using TreeSharp;
9 | using static LlamaLibrary.Helpers.GeneralFunctions;
10 |
11 | namespace LlamaLibrary.OrderbotTags
12 | {
13 | [XmlElement("LLSellItem")]
14 | public class LLSellItem : ProfileBehavior
15 | {
16 | [XmlAttribute("ItemIDs")]
17 | [XmlAttribute("ItemIds")]
18 | [XmlAttribute("ItemID")]
19 | [XmlAttribute("ItemId")]
20 | [DefaultValue(new int[0])]
21 | private int[] ItemIds { get; set; }
22 |
23 | private bool _isDone;
24 |
25 | public override bool HighPriority => true;
26 |
27 | public override bool IsDone => _isDone;
28 |
29 | protected override void OnStart()
30 | {
31 | }
32 |
33 | protected override void OnDone()
34 | {
35 | }
36 |
37 | protected override void OnResetCachedDone()
38 | {
39 | _isDone = false;
40 | }
41 |
42 | protected override Composite CreateBehavior()
43 | {
44 | return new ActionRunCoroutine(r => SellItemsToRetainers());
45 | }
46 |
47 | private async Task SellItemsToRetainers()
48 | {
49 | if (_isDone)
50 | {
51 | await Coroutine.Yield();
52 | return;
53 | }
54 |
55 | await RetainerSellItems(InventoryManager.FilledSlots.Where(x => ItemIds.Contains((int) x.RawItemId)));
56 |
57 | _isDone = true;
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/OrderbotTags/LLSmallTalk.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using System.Threading.Tasks;
3 | using Buddy.Coroutines;
4 | using Clio.XmlEngine;
5 | using ff14bot.NeoProfiles;
6 | using TreeSharp;
7 | using static LlamaLibrary.Helpers.GeneralFunctions;
8 |
9 | namespace LlamaLibrary.OrderbotTags
10 | {
11 | [XmlElement("LLSmallTalk")]
12 | public class LLSmallTalk : ProfileBehavior
13 | {
14 | [XmlAttribute("WaitTime")]
15 | [XmlAttribute("waittime")]
16 | [DefaultValue(500)]
17 | private int WaitTime { get; set; }
18 |
19 | private bool _isDone;
20 |
21 | public override bool HighPriority => true;
22 |
23 | public override bool IsDone => _isDone;
24 |
25 | protected override void OnStart()
26 | {
27 | }
28 |
29 | protected override void OnDone()
30 | {
31 | }
32 |
33 | protected override void OnResetCachedDone()
34 | {
35 | _isDone = false;
36 | }
37 |
38 | protected override Composite CreateBehavior()
39 | {
40 | return new ActionRunCoroutine(r => AwaitSmallTalk());
41 | }
42 |
43 | private async Task AwaitSmallTalk()
44 | {
45 | if (_isDone)
46 | {
47 | await Coroutine.Yield();
48 | return;
49 | }
50 | await SmallTalk(WaitTime);
51 |
52 | _isDone = true;
53 | }
54 | }
55 | }
--------------------------------------------------------------------------------
/OrderbotTags/LLStopBot.cs:
--------------------------------------------------------------------------------
1 | using Clio.XmlEngine;
2 | using TreeSharp;
3 | using Action = TreeSharp.Action;
4 |
5 | namespace ff14bot.NeoProfiles
6 | {
7 | [XmlElement("LLStopBot")]
8 | [XmlElement("StopBot")]
9 |
10 | public class LLStopBotTag : ProfileBehavior
11 | {
12 | private bool _done;
13 |
14 | public override bool IsDone { get { return _done; } }
15 |
16 | protected override Composite CreateBehavior()
17 | {
18 | return new PrioritySelector(
19 | new Decorator(ret => TreeRoot.IsRunning,
20 | new Action(r =>
21 | {
22 | TreeRoot.Stop();
23 | _done = true;
24 | })
25 | )
26 | );
27 | }
28 |
29 | ///
30 | /// This gets called when a while loop starts over so reset anything that is used inside the IsDone check
31 | ///
32 | protected override void OnResetCachedDone()
33 | {
34 | _done = false;
35 | }
36 |
37 | protected override void OnDone()
38 | {
39 |
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/OrderbotTags/LLTalkTo.cs:
--------------------------------------------------------------------------------
1 | using Clio.XmlEngine;
2 | using ff14bot.RemoteWindows;
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using TreeSharp;
6 | using Action = TreeSharp.Action;
7 |
8 | namespace ff14bot.NeoProfiles.Tags
9 | {
10 | [XmlElement("LLTalkTo")]
11 |
12 | public class LLTalkTo : TalkToTag
13 | {
14 | [DefaultValue(new int[0])]
15 | [XmlAttribute("DialogOption")]
16 | public int[] DialogOption { get; set; }
17 |
18 | private readonly Queue selectStringIndex = new Queue();
19 | protected override void OnStart()
20 | {
21 | if (DialogOption.Length > 0)
22 | {
23 | foreach (var i in DialogOption) { selectStringIndex.Enqueue(i); }
24 | }
25 |
26 | base.OnStart();
27 | }
28 | protected override Composite CreateBehavior()
29 | {
30 | return new PrioritySelector(
31 | new Decorator(ret => SelectYesno.IsOpen,
32 | new Action(r =>
33 | {
34 | SelectYesno.ClickYes();
35 | })
36 | ),
37 | new Decorator(ret => SelectString.IsOpen,
38 | new Action(r =>
39 | {
40 | if (selectStringIndex.Count > 0) { SelectString.ClickSlot((uint)selectStringIndex.Dequeue()); }
41 | else { SelectString.ClickSlot(0); }
42 | })
43 | ),
44 | base.CreateBehavior()
45 | );
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/OrderbotTags/LLToast.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using Clio.XmlEngine;
4 | using ff14bot;
5 | using ff14bot.NeoProfiles;
6 | using TreeSharp;
7 |
8 | namespace LlamaLibrary.OrderbotTags
9 | {
10 | [XmlElement("LLToast")]
11 | public class LLToast : ProfileBehavior
12 | {
13 | private bool _isDone;
14 |
15 | [XmlAttribute("Message")]
16 | [XmlAttribute("message")]
17 | public string message { get; set; }
18 |
19 | public override bool HighPriority => true;
20 |
21 | public override bool IsDone => _isDone;
22 |
23 | protected override void OnStart()
24 | {
25 | }
26 |
27 | protected override void OnDone()
28 | {
29 | }
30 |
31 | protected override void OnResetCachedDone()
32 | {
33 | _isDone = false;
34 | }
35 |
36 | protected override Composite CreateBehavior()
37 | {
38 | return new ActionRunCoroutine(r => SendToast(message));
39 | }
40 |
41 | private async Task SendToast(string message)
42 | {
43 | Core.OverlayManager.AddToast(() => "" + message, TimeSpan.FromMilliseconds(25000), System.Windows.Media.Color.FromRgb(29,213,226), System.Windows.Media.Color.FromRgb(13,106,175), new System.Windows.Media.FontFamily("Gautami"));
44 |
45 | _isDone = true;
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/OrderbotTags/LLUseObject.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using Buddy.Coroutines;
3 | using Clio.XmlEngine;
4 | using ff14bot.Managers;
5 | using ff14bot.NeoProfiles;
6 | using ff14bot.Objects;
7 | using ff14bot.RemoteWindows;
8 | using LlamaLibrary.Helpers;
9 | using TreeSharp;
10 |
11 | namespace LlamaLibrary.OrderbotTags
12 | {
13 | [XmlElement("LLUseObject")]
14 | public class LLUseObject : ProfileBehavior
15 | {
16 | private bool _isDone;
17 |
18 | public override bool HighPriority => true;
19 |
20 | public override bool IsDone => _isDone;
21 |
22 | [XmlAttribute("NpcId")] public int NpcId { get; set; }
23 |
24 | protected override void OnStart()
25 | {
26 | }
27 |
28 | protected override void OnDone()
29 | {
30 | }
31 |
32 | protected override void OnResetCachedDone()
33 | {
34 | _isDone = false;
35 | }
36 |
37 | protected override Composite CreateBehavior()
38 | {
39 | return new ActionRunCoroutine(r => LLUseObjectTask((uint) NpcId));
40 | }
41 |
42 | private async Task LLUseObjectTask(uint NpcId)
43 | {
44 | var gameobj = GameObjectManager.GetObjectByNPCId(NpcId);
45 |
46 | if (gameobj == default(GameObject)) {_isDone = true; return;}
47 |
48 | await Navigation.FlightorMove(gameobj.Location);
49 |
50 | if (gameobj.IsWithinInteractRange)
51 | {
52 | gameobj.Interact();
53 |
54 | await Coroutine.Wait(20000, () => !gameobj.IsVisible || SelectYesno.IsOpen);
55 | if (SelectYesno.IsOpen)
56 | {
57 | SelectYesno.Yes();
58 | await Coroutine.Wait(20000, () => !SelectYesno.IsOpen);
59 | }
60 | }
61 | _isDone = true;
62 | }
63 | }
64 | }
--------------------------------------------------------------------------------
/OrderbotTags/LLoadProfile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using Clio.XmlEngine;
4 | using TreeSharp;
5 | using Action = TreeSharp.Action;
6 |
7 | namespace ff14bot.NeoProfiles
8 | {
9 | [XmlElement("ALoadProfile")]
10 | [XmlElement("LLoadProfile")]
11 |
12 | public class LLoadProfileTag : ProfileBehavior
13 | {
14 | private bool _done;
15 |
16 | [XmlAttribute("Path")]
17 | public string ProfileName { get; set; }
18 |
19 | public override bool IsDone { get { return _done; } }
20 |
21 | protected override Composite CreateBehavior()
22 | {
23 | return new PrioritySelector(
24 | new Decorator(ret => TreeRoot.IsRunning,
25 | new Action(r =>
26 | {
27 | NeoProfileManager.Load(NewProfilePath, true);
28 | NeoProfileManager.UpdateCurrentProfileBehavior();
29 | _done = true;
30 | })
31 | )
32 | );
33 | }
34 |
35 | private string NewProfilePath;
36 | protected override void OnStart()
37 | {
38 |
39 | var CurrentProfile = NeoProfileManager.CurrentProfile.Path;
40 | // Support for store profiles.
41 | // Absolute path to a store profile.
42 | if (IsStoreProfile(ProfileName))
43 | {
44 | NewProfilePath = Slashify(ProfileName);
45 | return;
46 | }
47 |
48 | // Relative path to a store profile
49 | if (IsStoreProfile(CurrentProfile))
50 | {
51 | NewProfilePath = Slashify(CurrentProfile + "/../" + ProfileName);
52 | return;
53 | }
54 |
55 | // Convert path name to absolute, and canonicalize it...
56 | var absolutePath = Path.Combine(Path.GetDirectoryName(CurrentProfile), ProfileName);
57 | absolutePath = Path.GetFullPath(absolutePath);
58 | var canonicalPath = new Uri(absolutePath).LocalPath;
59 | NewProfilePath = Slashify(canonicalPath);
60 |
61 | Log("Changing profile to {0}",ProfileName);
62 | }
63 |
64 | ///
65 | /// This gets called when a while loop starts over so reset anything that is used inside the IsDone check
66 | ///
67 | protected override void OnResetCachedDone()
68 | {
69 | _done = false;
70 | }
71 |
72 | protected override void OnDone()
73 | {
74 |
75 | }
76 |
77 |
78 | private bool IsStoreProfile(string path)
79 | {
80 | return path.StartsWith("store://");
81 | }
82 |
83 | // Converts all slashes to back-slashes if path is local; otherwise converts all back-slashes to slashes
84 | private string Slashify(string path)
85 | {
86 | return IsStoreProfile(path) ? path.Replace(@"\", "/") : path.Replace("/", @"\");
87 | }
88 | }
89 | }
--------------------------------------------------------------------------------
/OrderbotTags/LeaveDuty.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using Buddy.Coroutines;
3 | using Clio.XmlEngine;
4 | using ff14bot.Behavior;
5 | using ff14bot.NeoProfiles;
6 | using TreeSharp;
7 |
8 | namespace LlamaLibrary.OrderbotTags
9 | {
10 | [XmlElement("LLLeaveDuty")]
11 | public class LeaveDuty : ProfileBehavior
12 | {
13 | private bool _isDone;
14 |
15 | public override bool HighPriority => true;
16 |
17 | public override bool IsDone => _isDone;
18 |
19 | protected override void OnStart()
20 | {
21 | }
22 |
23 | protected override void OnDone()
24 | {
25 | }
26 |
27 | protected override void OnResetCachedDone()
28 | {
29 | _isDone = false;
30 | }
31 |
32 | protected override Composite CreateBehavior()
33 | {
34 | return new ActionRunCoroutine(r => LeaveDutyTask());
35 | }
36 |
37 | private async Task LeaveDutyTask()
38 | {
39 | ff14bot.Managers.DutyManager.LeaveActiveDuty();
40 | await Coroutine.Wait(20000, () => CommonBehaviors.IsLoading);
41 | if (CommonBehaviors.IsLoading)
42 | {
43 | await Coroutine.Wait(-1, () => !CommonBehaviors.IsLoading);
44 | }
45 |
46 | _isDone = true;
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/OrderbotTags/LowerCollectable.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using System.Threading.Tasks;
4 | using System.Windows.Media;
5 | using Buddy.Coroutines;
6 | using Clio.XmlEngine;
7 | using ff14bot.Helpers;
8 | using ff14bot.Managers;
9 | using ff14bot.NeoProfiles;
10 | using LlamaLibrary.Extensions;
11 | using TreeSharp;
12 |
13 | namespace LlamaLibrary.OrderbotTags
14 | {
15 | [XmlElement("LowerCollectables")]
16 | public class LowerCollectable: ProfileBehavior
17 | {
18 | private bool _isDone;
19 |
20 | [XmlAttribute("Collectability")] public int MaxCollectability { get; set; }
21 |
22 | public override bool HighPriority => true;
23 |
24 | protected override void OnStart()
25 | {
26 | }
27 |
28 | protected override void OnDone()
29 | {
30 | }
31 |
32 | protected override void OnResetCachedDone()
33 | {
34 | _isDone = false;
35 | }
36 |
37 | protected override Composite CreateBehavior()
38 | {
39 | return new ActionRunCoroutine(r => LowerQualityAndCombine(MaxCollectability));
40 | }
41 |
42 | private async Task LowerQualityAndCombine(int collectability)
43 | {
44 | var HQslots = InventoryManager.FilledSlots.Where(slot => slot.IsCollectable && slot.Collectability < collectability);
45 | List ids = new List();
46 |
47 | if (HQslots.Any())
48 | {
49 | foreach (var slot in HQslots)
50 | {
51 | Logging.Write(Colors.Chocolate, $"[LowerQuality] Lower {slot}");
52 | slot.LowerQuality();
53 | ids.Add(slot.RawItemId);
54 | await Coroutine.Sleep(1000);
55 | }
56 | }
57 |
58 |
59 |
60 | foreach (var id in ids.Distinct())
61 | {
62 | var NQslots = InventoryManager.FilledSlots.Where(slot => slot.RawItemId == id && !slot.IsCollectable && !slot.IsHighQuality && slot.Item.StackSize > 1);
63 |
64 | if (NQslots.Count() > 1)
65 | {
66 | var firstSlot = NQslots.First();
67 | foreach (var slot in NQslots.Skip(1))
68 | {
69 | slot.Move(firstSlot);
70 | await Coroutine.Sleep(500);
71 | }
72 | }
73 | }
74 |
75 | _isDone = true;
76 | }
77 |
78 | public override bool IsDone => _isDone;
79 | }
80 |
81 |
82 | }
--------------------------------------------------------------------------------
/OrderbotTags/PassOnLoot.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using Buddy.Coroutines;
3 | using Clio.XmlEngine;
4 | using ff14bot.Managers;
5 | using ff14bot.NeoProfiles;
6 | using ff14bot.RemoteWindows;
7 | using LlamaLibrary.RemoteWindows;
8 | using TreeSharp;
9 |
10 | namespace LlamaLibrary.OrderbotTags
11 | {
12 | [XmlElement("PassOnLoot")]
13 | public class PassOnLoot : ProfileBehavior
14 | {
15 | private bool _isDone;
16 |
17 | public override bool HighPriority => true;
18 |
19 | protected override void OnStart()
20 | {
21 | }
22 |
23 | protected override void OnDone()
24 | {
25 | }
26 |
27 | protected override void OnResetCachedDone()
28 | {
29 | _isDone = false;
30 | }
31 |
32 | protected override Composite CreateBehavior()
33 | {
34 | return new ActionRunCoroutine(r => PassLoot());
35 | }
36 |
37 | public async Task PassLoot()
38 | {
39 | //if (!NeedGreed.Instance.IsOpen)
40 | var window = RaptureAtkUnitManager.GetWindowByName("_Notification");
41 |
42 | if (!NeedGreed.Instance.IsOpen && window != null)
43 | {
44 | window.SendAction(3, 3, 0, 3, 2, 6, 0x375B30E7);
45 | await Coroutine.Wait(5000, () => NeedGreed.Instance.IsOpen);
46 | }
47 |
48 | if (NeedGreed.Instance.IsOpen)
49 | {
50 | for (int i = 0; i < NeedGreed.Instance.NumberOfItems; i++)
51 | {
52 | NeedGreed.Instance.PassItem(i);
53 | await Coroutine.Sleep(500);
54 | await Coroutine.Wait(5000, () => SelectYesno.IsOpen);
55 | if (SelectYesno.IsOpen)
56 | SelectYesno.Yes();
57 | }
58 | }
59 |
60 | if (NeedGreed.Instance.IsOpen)
61 | NeedGreed.Instance.Close();
62 | }
63 |
64 | public override bool IsDone => _isDone;
65 | }
66 | }
--------------------------------------------------------------------------------
/OrderbotTags/SetBluSpells.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using System.Threading.Tasks;
3 | using Buddy.Coroutines;
4 | using Clio.XmlEngine;
5 | using ff14bot.NeoProfiles;
6 | using LlamaLibrary.Helpers;
7 | using TreeSharp;
8 |
9 | namespace LlamaLibrary.OrderbotTags
10 | {
11 | [XmlElement("SetBluActive")]
12 | public class SetBluSpells: ProfileBehavior
13 | {
14 | private bool _isDone;
15 | [XmlAttribute("Spells")] public int[] Spells { get; set; }
16 |
17 | [XmlAttribute("Clear")]
18 | [DefaultValue(false)]
19 | public bool Clear { get; set; }
20 |
21 | public override bool HighPriority => true;
22 |
23 | protected override void OnStart()
24 | {
25 | }
26 |
27 | protected override void OnDone()
28 | {
29 | }
30 |
31 | protected override void OnResetCachedDone()
32 | {
33 | _isDone = false;
34 | }
35 |
36 | protected override Composite CreateBehavior()
37 | {
38 | return new ActionRunCoroutine(r => SetBlueActiveSpells(Spells));
39 | }
40 |
41 | private async Task SetBlueActiveSpells(int[] spells)
42 | {
43 | uint[] newSpells = new uint[spells.Length];
44 | for (int i = 0; i < spells.Length; i++)
45 | {
46 | newSpells[i] = (uint) spells[i];
47 | }
48 | if (Clear)
49 | await BlueMageSpellBook.SetAllSpells(newSpells);
50 | else
51 | {
52 | await BlueMageSpellBook.SetSpells(newSpells);
53 | }
54 | await Coroutine.Sleep(100);
55 | _isDone = true;
56 | }
57 |
58 | public override bool IsDone => _isDone;
59 | }
60 | }
--------------------------------------------------------------------------------
/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | [assembly: AssemblyTitle("LlamaLibrary")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("LlamaLibrary")]
12 | [assembly: AssemblyCopyright("Copyright © 2019")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // Setting ComVisible to false makes the types in this assembly not visible
17 | // to COM components. If you need to access a type in this assembly from
18 | // COM, set the ComVisible attribute to true on that type.
19 | [assembly: ComVisible(false)]
20 |
21 | // The following GUID is for the ID of the typelib if this project is exposed to COM
22 | [assembly: Guid("196EE308-0205-4CC4-B449-51064F7E9960")]
23 |
24 | // Version information for an assembly consists of the following four values:
25 | //
26 | // Major Version
27 | // Minor Version
28 | // Build Number
29 | // Revision
30 | //
31 | // You can specify all the values or you can default the Build and Revision Numbers
32 | // by using the '*' as shown below:
33 | // [assembly: AssemblyVersion("1.0.*")]
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
--------------------------------------------------------------------------------
/Reduce/ReduceSettingsForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 | using ff14bot.Managers;
4 |
5 | namespace LlamaLibrary.Reduce
6 | {
7 | public partial class Settings : Form
8 | {
9 | public Settings()
10 | {
11 | InitializeComponent();
12 | }
13 |
14 | private void DEindexCheck_CheckedChanged(object sender, EventArgs e)
15 | {
16 | ReduceSettings.Instance.IncludeDE10000 = DEindexCheck.Checked;
17 | }
18 |
19 | private void ArmoryCheck_CheckedChanged(object sender, EventArgs e)
20 | {
21 | ReduceSettings.Instance.IncludeArmory = ArmoryCheck.Checked;
22 | }
23 |
24 | private void Settings_Load(object sender, EventArgs e)
25 | {
26 | ArmoryCheck.Checked = ReduceSettings.Instance.IncludeArmory;
27 | DEindexCheck.Checked = ReduceSettings.Instance.IncludeDE10000;
28 | RunCheck.Checked = ReduceSettings.Instance.StayRunning;
29 | checkBox1.Checked = ReduceSettings.Instance.AEZoneCheck; //yeah i'll rename it later
30 | textZone.Text = ReduceSettings.Instance.AEZone.ToString();
31 | checkBox2.Checked = ReduceSettings.Instance.OpenCoffers;//yeah i'll rename it later...this one too
32 | }
33 |
34 | private void RunCheck_CheckedChanged(object sender, EventArgs e)
35 | {
36 | ReduceSettings.Instance.StayRunning = RunCheck.Checked;
37 | }
38 |
39 | private void setZoneBtn_Click(object sender, EventArgs e)
40 | {
41 | if (textZone.Text != null);
42 | {
43 | int _zone;
44 | if (int.TryParse(textZone.Text, out _zone))
45 | {
46 | ReduceSettings.Instance.AEZone = _zone;
47 | }
48 | }
49 | }
50 |
51 | private void checkBox1_CheckedChanged(object sender, EventArgs e)
52 | {
53 | ReduceSettings.Instance.AEZoneCheck = checkBox1.Checked;
54 | }
55 |
56 | private void setCurrentZoneBtn_Click(object sender, EventArgs e)
57 | {
58 | ReduceSettings.Instance.AEZone = WorldManager.ZoneId;
59 | textZone.Text = ReduceSettings.Instance.AEZone.ToString();
60 | }
61 |
62 | private void checkBox2_CheckedChanged(object sender, EventArgs e)
63 | {
64 | ReduceSettings.Instance.OpenCoffers = checkBox2.Checked;
65 | ReduceSettings.Instance.Save();
66 | }
67 | }
68 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentAetherWheel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot;
3 | using ff14bot.Managers;
4 | using LlamaLibrary.Memory.Attributes;
5 | using LlamaLibrary.RemoteWindows;
6 | using LlamaLibrary.Structs;
7 |
8 | namespace LlamaLibrary.RemoteAgents
9 | {
10 | public class AgentAetherWheel: AgentInterface, IAgent
11 | {
12 | public IntPtr RegisteredVtable => Offsets.VTable;
13 | private static class Offsets
14 | {
15 | [Offset("Search 48 8D 05 ? ? ? ? 48 89 03 48 8D 73 ? 48 8D 05 ? ? ? ? Add 3 TraceRelative")]
16 | internal static IntPtr VTable;
17 | [Offset("Search 49 8D 74 24 ? F3 0F 10 3D ? ? ? ? Add 4 Read8")]
18 | internal static int ArrayOffset;
19 | }
20 |
21 | protected AgentAetherWheel(IntPtr pointer) : base(pointer)
22 | {
23 | }
24 |
25 | public AetherWheelSlot[] GetWheelSlots()
26 | {
27 | int count = 6;
28 |
29 | if (AetherialWheel.Instance.IsOpen) count = AetherialWheel.Instance.MaxSlots;
30 |
31 | using (Core.Memory.TemporaryCacheState(enabledTemporarily: false))
32 | {
33 | return Core.Memory.ReadArray(Pointer + Offsets.ArrayOffset, count);
34 | }
35 | }
36 |
37 | }
38 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentBagSlot.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot;
3 | using ff14bot.Managers;
4 | using LlamaLibrary.Memory.Attributes;
5 |
6 | namespace LlamaLibrary.RemoteAgents
7 | {
8 | public class AgentBagSlot: AgentInterface, IAgent
9 | {
10 | public IntPtr RegisteredVtable => Offsets.VTable;
11 | private static class Offsets
12 | {
13 | [Offset("Search 48 8D 05 ? ? ? ? 48 89 79 ? 48 89 01 48 8B D9 89 79 ? Add 3 TraceRelative")]
14 | internal static IntPtr VTable;
15 | [Offset("Search 48 03 83 ? ? ? ? 0F 84 ? ? ? ? Add 3 Read32")]
16 | internal static int Offset;
17 | [Offset("Search 48 8B 48 ? 48 85 C9 0F 84 ? ? ? ? 44 8B 8B ? ? ? ? Add 3 Read8")]
18 | internal static int FuncOffset;
19 | }
20 | protected AgentBagSlot(IntPtr pointer) : base(pointer)
21 | {
22 | }
23 |
24 | public IntPtr PointerForAether =>Core.Memory.Read( Core.Memory.Read(Pointer + Offsets.Offset) + (0x20 * 7) + Offsets.FuncOffset);
25 | }
26 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentCharacter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot.Managers;
3 | using LlamaLibrary.Memory.Attributes;
4 |
5 | namespace LlamaLibrary.RemoteAgents
6 | {
7 | public class AgentCharacter: AgentInterface, IAgent
8 | {
9 | private static class Offsets
10 | {
11 | [Offset("Search 48 8D 05 ? ? ? ? 89 77 ? Add 3 TraceRelative")]
12 | internal static IntPtr vtable;
13 | }
14 |
15 | protected AgentCharacter(IntPtr pointer) : base(pointer)
16 | {
17 | }
18 |
19 | public IntPtr RegisteredVtable => Offsets.vtable;
20 | }
21 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentContentsInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot.Managers;
3 | using LlamaLibrary.Memory.Attributes;
4 |
5 | namespace LlamaLibrary.RemoteAgents
6 | {
7 | public class AgentContentsInfo: AgentInterface, IAgent
8 | {
9 | public IntPtr RegisteredVtable => Offsets.VTable;
10 | private static class Offsets
11 | {
12 | [Offset("Search 48 8D 05 ? ? ? ? BF ? ? ? ? 48 89 03 48 8D 73 ? Add 3 TraceRelative")]
13 | internal static IntPtr VTable;
14 | }
15 | protected AgentContentsInfo(IntPtr pointer) : base(pointer)
16 | {
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentDawn.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot;
3 | using ff14bot.Managers;
4 | using LlamaLibrary.Memory.Attributes;
5 |
6 | namespace LlamaLibrary.RemoteAgents
7 | {
8 | public class AgentDawn : AgentInterface, IAgent
9 | {
10 | public IntPtr RegisteredVtable => Offsets.DawnVtable;
11 | private static class Offsets
12 | {
13 | [Offset("Search 41 88 46 ? 0F B6 42 ? Add 3 Read8")]
14 | internal static int DawnTrustId;
15 | [Offset("Search 48 8D 05 ? ? ? ? 48 C7 43 ? ? ? ? ? 48 8D 4B ? 48 89 03 66 C7 43 ? ? ? Add 3 TraceRelative")]
16 | internal static IntPtr DawnVtable;
17 | [Offset("Search 41 88 46 ? E8 ? ? ? ? C6 43 ? ? Add 3 Read8")]
18 | internal static int DawnIsScenario;
19 | }
20 | protected AgentDawn(IntPtr pointer) : base(pointer)
21 | {
22 | }
23 |
24 | public int TrustId
25 | {
26 | get => Core.Memory.Read(Pointer + Offsets.DawnTrustId);
27 | set => Core.Memory.Write(Pointer + Offsets.DawnTrustId, (byte)value);
28 | }
29 |
30 | public bool IsScenario
31 | {
32 | get => Core.Memory.Read(Pointer + Offsets.DawnIsScenario) == 0;
33 | set => Core.Memory.Write(Pointer + Offsets.DawnIsScenario, value ? (byte)0 : (byte)1);
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentFateProgress.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot;
3 | using ff14bot.Managers;
4 | using LlamaLibrary.Memory.Attributes;
5 | using LlamaLibrary.Structs;
6 |
7 | namespace LlamaLibrary.RemoteAgents
8 | {
9 | public class AgentFateProgress: AgentInterface, IAgent
10 | {
11 | public IntPtr RegisteredVtable => Offsets.VTable;
12 | private static class Offsets
13 | {
14 | [Offset("48 8D 05 ? ? ? ? 49 89 06 33 C0 49 89 46 ? 49 89 46 ? Add 3 TraceRelative")]
15 | internal static IntPtr VTable;
16 | [Offset("66 89 47 ? 48 8B 5C 24 ? 48 8B 74 24 ? Add 3 Read8")]
17 | internal static int LoadedZones;
18 | [Offset("48 8B 47 ? 48 8B CF 48 89 47 ? 33 C0 Add 3 Read8")]
19 | internal static int ZoneStructs;
20 | }
21 |
22 | public int NumberOfLoadedZones => Core.Memory.NoCacheRead(Pointer + Offsets.LoadedZones);
23 |
24 | public SharedFateProgress[] ProgressArray =>
25 | Core.Memory.ReadArray(Core.Memory.Read( Pointer + Offsets.ZoneStructs), NumberOfLoadedZones);
26 |
27 | protected AgentFateProgress(IntPtr pointer) : base(pointer)
28 | {
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentFishGuide.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 | using ff14bot;
4 | using ff14bot.Managers;
5 | using LlamaLibrary.Memory.Attributes;
6 |
7 | namespace LlamaLibrary.RemoteAgents
8 | {
9 | public class AgentFishGuide: AgentInterface, IAgent
10 | {
11 | public IntPtr RegisteredVtable => Offsets.Vtable;
12 |
13 | public const int TabCount = 37;
14 | private static class Offsets
15 | {
16 | [Offset("Search 8D 4A ? 66 89 93 ? ? ? ? 48 89 93 ? ? ? ? Add 2 Read8")]
17 | internal static int TabSlotCount;
18 | [Offset("Search 48 8D 05 ? ? ? ? BA ? ? ? ? 48 89 03 48 8D 05 ? ? ? ? Add 3 TraceRelative")]
19 | internal static IntPtr Vtable;
20 | [Offset("Search 48 8D 43 ? 88 93 ? ? ? ? Add 3 Read8")]
21 | internal static int TabStart;
22 | }
23 | protected AgentFishGuide(IntPtr pointer) : base(pointer)
24 | {
25 |
26 | }
27 | public FishGuideItem[] GetTabList()
28 | {
29 | using (Core.Memory.TemporaryCacheState(enabledTemporarily: false))
30 | {
31 | //Logging.Write($"{Pointer + Offsets.TabStart - 0x6} {Offsets.TabSlotCount}");
32 | return Core.Memory.ReadArray(Pointer + Offsets.TabStart - 0x6, Offsets.TabSlotCount); //.Select(x => x.FishItem) as List;
33 | }
34 | }
35 |
36 |
37 | }
38 |
39 | [StructLayout(LayoutKind.Sequential, Size = 0x8)]
40 | public struct FishGuideItem
41 | {
42 | public uint FishItem;
43 | public uint Unknown;
44 | }
45 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentGoldSaucerInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot.Managers;
3 | using LlamaLibrary.Memory.Attributes;
4 |
5 | namespace LlamaLibrary.RemoteAgents
6 | {
7 | public class AgentGoldSaucerInfo: AgentInterface, IAgent
8 | {
9 | public IntPtr RegisteredVtable => Offsets.VTable;
10 | private static class Offsets
11 | {
12 | [Offset("Search 48 8D 05 ? ? ? ? 48 89 03 48 8D 4B ? 48 89 73 ? 48 8D 05 ? ? ? ? Add 3 TraceRelative")]
13 | internal static IntPtr VTable;
14 | }
15 | protected AgentGoldSaucerInfo(IntPtr pointer) : base(pointer)
16 | {
17 |
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentHWDScore.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot;
3 | using ff14bot.Managers;
4 | using LlamaLibrary.Memory.Attributes;
5 |
6 | namespace LlamaLibrary.RemoteAgents
7 | {
8 | public class AgentHWDScore: AgentInterface, IAgent
9 | {
10 | public IntPtr RegisteredVtable => Offsets.VTable;
11 |
12 | private static class Offsets
13 | {
14 | [Offset("Search 48 8D 05 ? ? ? ? C7 47 ? ? ? ? ? 48 8D 4F ? 48 89 07 C7 47 ? ? ? ? ? 44 8D 42 ? Add 3 TraceRelative")]
15 | internal static IntPtr VTable;
16 | }
17 |
18 | protected AgentHWDScore(IntPtr pointer) : base(pointer)
19 | {
20 | }
21 |
22 | public int[] ReadTotalScores()
23 | {
24 | return Core.Memory.ReadArray(Pointer + 0x90, 11);
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentHandIn.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot;
3 | using ff14bot.Managers;
4 | using LlamaLibrary.Memory.Attributes;
5 |
6 | namespace LlamaLibrary.RemoteAgents
7 | {
8 | public class AgentHandIn: AgentInterface, IAgent
9 | {
10 | public IntPtr RegisteredVtable => Offsets.VTable;
11 | private static class Offsets
12 | {
13 | [Offset("Search 48 8D 05 ? ? ? ? 48 89 01 48 8D 05 ? ? ? ? 48 89 41 ? 48 8B D9 Add 3 TraceRelative")]
14 | internal static IntPtr VTable;
15 | [Offset("Search 48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC ? 48 8B 41 ? 48 8B E9 48 83 C1 ?")]
16 | internal static IntPtr HandInFunc;
17 | [Offset("Search 48 89 41 ? 48 8B D9 48 85 FF Add 3 Read8")]
18 | internal static int HandinParmOffset;
19 | }
20 | protected AgentHandIn(IntPtr pointer) : base(pointer)
21 | {
22 |
23 | }
24 |
25 | public void HandIn(BagSlot slot)
26 | {
27 | lock (Core.Memory.Executor.AssemblyLock)
28 | Core.Memory.CallInjected64(Offsets.HandInFunc, new object[3]
29 | {
30 | Pointer + Offsets.HandinParmOffset,
31 | slot.Slot,
32 | (int)slot.BagId
33 | });
34 | }
35 |
36 | }
37 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentHousingSelectBlock.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot;
3 | using ff14bot.Managers;
4 | using LlamaLibrary.Memory.Attributes;
5 |
6 | namespace LlamaLibrary.RemoteAgents
7 | {
8 | public class AgentHousingSelectBlock: AgentInterface, IAgent
9 | {
10 | public IntPtr RegisteredVtable => Offsets.VTable;
11 | private static class Offsets
12 | {
13 | [Offset("Search 4C 8D 2D ? ? ? ? 48 89 74 24 ? Add 3 TraceRelative")]
14 | internal static IntPtr VTable;
15 | [Offset("Search 89 71 ? 8B C6 Add 2 Read8")]
16 | internal static int WardNumber;
17 | [Offset("Search 4D 8D 6C 24 ? C7 44 24 ? ? ? ? Add 4 Read8")]
18 | internal static int PlotOffset;
19 | }
20 | protected AgentHousingSelectBlock(IntPtr pointer) : base(pointer)
21 | {
22 | }
23 |
24 | public int WardNumber
25 | {
26 | get => Core.Memory.Read(Pointer + Offsets.WardNumber);
27 | set => Core.Memory.Write(Pointer + Offsets.WardNumber, value);
28 | }
29 |
30 | public byte[] ReadPlots(int count)
31 | {
32 | return Core.Memory.ReadArray(Pointer+ Offsets.PlotOffset, count);
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentInventoryBuddy.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot.Managers;
3 | using LlamaLibrary.Memory.Attributes;
4 |
5 | namespace LlamaLibrary.RemoteAgents
6 | {
7 | public class AgentInventoryBuddy: AgentInterface, IAgent
8 | {
9 | public IntPtr RegisteredVtable => Offsets.VTable;
10 |
11 | private static class Offsets
12 | {
13 | [Offset("Search 48 8D 05 ? ? ? ? 48 8B F1 48 89 01 48 8D 05 ? ? ? ? 48 89 41 ? 48 8B 89 ? ? ? ? 48 85 C9 74 ? E8 ? ? ? ? 48 C7 86 ? ? ? ? ? ? ? ? BF ? ? ? ? 48 8D 9E ? ? ? ? 90 Add 3 TraceRelative")]
14 | internal static IntPtr VTable;
15 | }
16 |
17 | protected AgentInventoryBuddy(IntPtr pointer) : base(pointer)
18 | {
19 | }
20 |
21 | }
22 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentItemAppraisal.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot.Managers;
3 | using LlamaLibrary.Memory.Attributes;
4 |
5 | namespace LlamaLibrary.RemoteAgents
6 | {
7 | public class AgentItemAppraisal: AgentInterface, IAgent
8 | {
9 | public IntPtr RegisteredVtable => Offsets.VTable;
10 |
11 | private static class Offsets
12 | {
13 | [Offset("Search 48 8D 05 ? ? ? ? 33 D2 48 89 03 48 8D 4B ? 33 C0 Add 3 TraceRelative")]
14 | internal static IntPtr VTable;
15 | [Offset("Search 66 C7 87 ? ? ? ? ? ? 48 8D 4D ? Add 3 Read8")]
16 | internal static int ItemAppraisalReady;
17 | }
18 |
19 | protected AgentItemAppraisal(IntPtr pointer) : base(pointer)
20 | {
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentMasterPieceSupply.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.RemoteAgents
2 | {
3 | //Class no longer needed due to rowena supply not rotating any more
4 |
5 | /*public class AgentMasterPieceSupply : AgentInterface, IAgent
6 | {
7 | public IntPtr RegisteredVtable => Offsets.VTable;
8 |
9 | private static class Offsets
10 | {
11 | [Offset("Search 48 8D 05 ? ? ? ? 48 89 07 48 8D 05 ? ? ? ? 48 89 47 ? 48 8D 05 ? ? ? ? 48 89 4F ? Add 3 TraceRelative")]
12 | internal static IntPtr VTable;
13 | }
14 |
15 | protected AgentMasterPieceSupply(IntPtr pointer) : base(pointer)
16 | {
17 | }
18 | }*/
19 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentMeld.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot;
3 | using ff14bot.Managers;
4 | using LlamaLibrary.Memory.Attributes;
5 |
6 | namespace LlamaLibrary.RemoteAgents
7 | {
8 | public class AgentMeld: AgentInterface, IAgent
9 | {
10 | public IntPtr RegisteredVtable => Offsets.VTable;
11 | private static class Offsets
12 | {
13 | [Offset("Search 48 8D 05 ? ? ? ? 33 FF 48 89 03 48 8D 4B ? Add 3 TraceRelative")]
14 | //[OffsetCN("Search 48 8D 05 ? ? ? ? 48 8D 4B ? 48 89 03 E8 ? ? ? ? 48 8D 4B ? E8 ? ? ? ? 33 C9 Add 3 TraceRelative")]
15 | internal static IntPtr VTable;
16 |
17 | [Offset("Search 38 9F ? ? ? ? 48 8D 8D ? ? ? ? Add 2 Read32")]
18 | internal static int CanMeld;
19 | }
20 | protected AgentMeld(IntPtr pointer) : base(pointer)
21 | {
22 | }
23 |
24 | public bool CanMeld => Core.Memory.NoCacheRead(Pointer + Offsets.CanMeld) == 1;
25 |
26 | public bool Ready => Core.Memory.NoCacheRead(LlamaLibrary.Memory.Offsets.Conditions + 7) == 1;
27 | }
28 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentMinionNoteBook.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 | using System.Text;
4 | using ff14bot;
5 | using ff14bot.Managers;
6 | using LlamaLibrary.Memory.Attributes;
7 |
8 | namespace LlamaLibrary.RemoteAgents
9 | {
10 | public class AgentMinionNoteBook: AgentInterface, IAgent
11 | {
12 | public IntPtr RegisteredVtable => Offsets.VTable;
13 |
14 | public IntPtr MinionListAddress => this.Pointer + Offsets.AgentOffset;
15 | private static class Offsets
16 | {
17 | [Offset("Search 48 8D 05 ? ? ? ? 48 89 03 48 8B C3 48 83 C4 ? 5B C3 ? ? ? ? ? ? ? ? ? 40 53 48 83 EC ? 48 8D 05 ? ? ? ? 48 8B D9 48 89 01 48 81 C1 ? ? ? ? E8 ? ? ? ? 48 8B 4B ? 48 85 C9 74 ? 48 8B 53 ? 41 B8 ? ? ? ? 48 2B D1 48 83 E2 ? E8 ? ? ? ? 33 C0 48 89 43 ? 48 89 43 ? 48 89 43 ? 48 8B CB 48 83 C4 ? 5B E9 ? ? ? ? ? ? ? ? ? ? ? 48 83 EC ? BA ? ? ? ? E8 ? ? ? ? 48 85 C0 74 ? 48 8B 80 ? ? ? ? 8B 40 ? C1 E8 ? F6 D0 Add 3 TraceRelative")]
18 | internal static IntPtr VTable;
19 | [Offset("Search 48 8B 43 ? 44 0F B7 0C 90 41 3B F1 Add 3 Read8")]
20 | internal static int AgentOffset;
21 | [Offset("Search 83 3D ? ? ? ? ? 7D ? 32 C0 Add 2 TraceRelative")]
22 | internal static IntPtr MinionCount;
23 | [Offset("Search E8 ? ? ? ? 48 85 C0 0F 84 ? ? ? ? 0F B7 58 ? 48 8D 4C 24 ? TraceCall")]
24 | internal static IntPtr GetCompanion;
25 | }
26 |
27 | protected AgentMinionNoteBook(IntPtr pointer) : base(pointer)
28 | {
29 | }
30 |
31 | public MinionStruct[] GetCurrentMinions()
32 | {
33 | var address = this.Pointer + Offsets.AgentOffset;
34 | var address1 = Core.Memory.Read(address);
35 | var count = Core.Memory.Read(Offsets.MinionCount);
36 | return Core.Memory.ReadArray(address1, (int) count);
37 | }
38 |
39 | public static string GetMinionName(int index)
40 | {
41 | var result = Core.Memory.CallInjected64(Offsets.GetCompanion, index);
42 | return result != IntPtr.Zero ? Core.Memory.ReadString(result + 0x30, Encoding.UTF8) : "";
43 | }
44 |
45 | }
46 |
47 | [StructLayout(LayoutKind.Explicit, Size = 0x4)]
48 | public struct MinionStruct
49 | {
50 | [FieldOffset(0)]
51 | public ushort MinionId;
52 |
53 | [FieldOffset(2)]
54 | public ushort unknown;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentOutOnLimb.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot;
3 | using ff14bot.Managers;
4 | using LlamaLibrary.Memory.Attributes;
5 |
6 | namespace LlamaLibrary.RemoteAgents
7 | {
8 | public class AgentOutOnLimb: AgentInterface, IAgent
9 | {
10 | public IntPtr RegisteredVtable => Offsets.VTable;
11 | private static class Offsets
12 | {
13 | [Offset("Search 48 8D 05 ? ? ? ? 48 8D 4F ? 48 89 07 E8 ? ? ? ? 33 C9 Add 3 TraceRelative")]
14 | internal static IntPtr VTable;
15 | [Offset("Search 41 80 BE ? ? ? ? ? 0F 84 ? ? ? ? BA ? ? ? ? Add 3 Read32")]
16 | internal static int IsReady;
17 | [Offset("Search 41 C6 86 ? ? ? ? ? EB ? 41 C6 86 ? ? ? ? ? Add 3 Read32")]
18 | internal static int CursorLocked;
19 | }
20 | public IntPtr addressLocation = IntPtr.Zero;
21 | Random rnd = new Random();
22 |
23 | protected AgentOutOnLimb(IntPtr pointer) : base(pointer)
24 | {
25 | }
26 |
27 | public bool CursorLocked
28 | {
29 | get => Core.Memory.Read(Pointer + Offsets.CursorLocked) != 1;
30 | set => Core.Memory.Write(Pointer + Offsets.CursorLocked, (byte) (value ? 0:1));
31 | }
32 |
33 | public int CursorLocation
34 | {
35 | get => Core.Memory.Read(addressLocation);
36 | set => Core.Memory.Write(addressLocation, locationValue(value));
37 | }
38 |
39 | public bool IsReadyBotanist => Core.Memory.Read(Pointer + Offsets.IsReady) == 3;
40 |
41 | public bool IsReadyAimg => Core.Memory.Read(Pointer + Offsets.IsReady) == 2;
42 |
43 | public void Refresh()
44 | {
45 | IntPtr intptr_0 = Core.Memory.Read(Memory.Offsets.SearchResultPtr);
46 | IntPtr intptr_1 = Core.Memory.Read(intptr_0 + 0x38);
47 | IntPtr intptr_2 = Core.Memory.Read(intptr_1 + 0x18);
48 | IntPtr intptr_3 = Core.Memory.Read(intptr_2 + 0x310);
49 | addressLocation = Core.Memory.Read(intptr_3 + 0x20);
50 | }
51 |
52 | private ushort locationValue(int percent)
53 | {
54 | ushort location = (ushort) ((percent * 100) + rnd.Next(0, 99));
55 | //Logger.Info($"Setting Location {location}");
56 | return location;
57 | }
58 | }
59 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentRecommendEquip.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot.Managers;
3 | using LlamaLibrary.Memory.Attributes;
4 |
5 | namespace LlamaLibrary.RemoteAgents
6 | {
7 | public class AgentRecommendEquip: AgentInterface, IAgent
8 | {
9 | public IntPtr RegisteredVtable => Offsets.VTable;
10 | private static class Offsets
11 | {
12 | [Offset("Search 48 8D 05 ? ? ? ? C6 43 ? ? 48 89 03 48 8B C3 C7 43 ? ? ? ? ? Add 3 TraceRelative")]
13 | internal static IntPtr VTable;
14 | }
15 | protected AgentRecommendEquip(IntPtr pointer) : base(pointer)
16 | {
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentRetainerCharacter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot;
3 | using ff14bot.Managers;
4 | using LlamaLibrary.Memory.Attributes;
5 |
6 | namespace LlamaLibrary.RemoteAgents
7 | {
8 | public class AgentRetainerCharacter: AgentInterface, IAgent
9 | {
10 | public IntPtr RegisteredVtable => Offsets.VTable;
11 | private static class Offsets
12 | {
13 | [Offset("Search 48 8D 05 ? ? ? ? 48 89 06 48 8D 4E ? 48 8D 05 ? ? ? ? 48 89 46 ? E8 ? ? ? ? 33 ED Add 3 TraceRelative")]
14 | internal static IntPtr VTable;
15 | }
16 | protected AgentRetainerCharacter(IntPtr pointer) : base(pointer)
17 | {
18 | }
19 |
20 | public int iLvl => Core.Memory.Read(Pointer + 0xa78);
21 | }
22 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentRetainerInventory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot;
3 | using ff14bot.Managers;
4 | using LlamaLibrary.Memory.Attributes;
5 |
6 | namespace LlamaLibrary.RemoteAgents
7 | {
8 | public partial class AgentRetainerInventory: AgentInterface, IAgent
9 | {
10 | public IntPtr RegisteredVtable => Offsets.VTable;
11 | private static partial class Offsets
12 | {
13 | [Offset("Search 48 8D 05 ? ? ? ? 48 89 6F ? 48 89 07 48 8D 9F ? ? ? ? Add 3 TraceRelative")]
14 | internal static IntPtr VTable;
15 | [Offset("Search 48 8B 8B ? ? ? ? 48 85 C9 74 ? 48 83 C4 ? 5B E9 ? ? ? ? B0 ? Add 3 Read32")]
16 | internal static int ShopOffset;
17 | }
18 | protected AgentRetainerInventory(IntPtr pointer) : base(pointer)
19 | {
20 | }
21 |
22 | public IntPtr RetainerShopPointer => Core.Memory.Read(Pointer + Offsets.ShopOffset);
23 |
24 | }
25 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentRetainerList.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using ff14bot;
4 | using ff14bot.Managers;
5 | using LlamaLibrary.Memory.Attributes;
6 | using LlamaLibrary.Structs;
7 |
8 | namespace LlamaLibrary.RemoteAgents
9 | {
10 | public class AgentRetainerList: AgentInterface, IAgent
11 | {
12 | public IntPtr RegisteredVtable => Offsets.VTable;
13 | private static class Offsets
14 | {
15 | [Offset("Search 48 8D 05 ? ? ? ? 48 89 06 48 8D 5E ? Add 3 TraceRelative")]
16 | internal static IntPtr VTable;
17 | [Offset("Search 48 8D 8E ? ? ? ? 33 D2 41 B8 ? ? ? ? E8 ? ? ? ? 48 8B 5C 24 ? 48 8B C6 48 8B 74 24 ? 48 83 C4 ? 5F C3 ? ? ? ? ? ? 48 89 5C 24 ? Add 3 Read32")]
18 | internal static int AgentRetainerOffset;
19 | [Offset("Search 83 FB ? 72 ? 33 D2 48 8D 4C 24 ? E8 ? ? ? ? 48 8D 15 ? ? ? ? Add 2 Read8")]
20 | internal static int MaxRetainers;
21 | }
22 | protected AgentRetainerList(IntPtr pointer) : base(pointer)
23 | {
24 | }
25 |
26 | public IntPtr[] RetainerList => Core.Memory.ReadArray(Pointer + Offsets.AgentRetainerOffset, Offsets.MaxRetainers);
27 |
28 | public RetainerInfo[] OrderedRetainerList (RetainerInfo[] retainers)
29 | {
30 | int count = RetainerList.Count(i => i != IntPtr.Zero);
31 |
32 | if (count == 0)
33 | return retainers;
34 |
35 | var result = new RetainerInfo[count]; // new List>();
36 |
37 | //IntPtr[] RetainerList = Core.Memory.ReadArray(new IntPtr(0x18FD0C64510) + 0x4a8, 0xA);
38 | int index = 0;
39 | foreach (var ptr in RetainerList.Where(i => i != IntPtr.Zero))
40 | {
41 | var next = Core.Memory.Read(ptr);
42 |
43 | result[index] = retainers.First(j => j.Name.Equals(Core.Memory.ReadStringUTF8(next)));
44 | index++;
45 | }
46 |
47 | return result;
48 | }
49 |
50 | }
51 | }
--------------------------------------------------------------------------------
/RemoteAgents/AgentRetainerVenture.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ff14bot;
3 | using ff14bot.Managers;
4 | using LlamaLibrary.Memory.Attributes;
5 |
6 | namespace LlamaLibrary.RemoteAgents
7 | {
8 | public class AgentRetainerVenture: AgentInterface, IAgent
9 | {
10 | public IntPtr RegisteredVtable => Offsets.VTable;
11 | private static class Offsets
12 | {
13 | [Offset("Search 48 8D 05 ? ? ? ? 48 89 03 B9 ? ? ? ? 89 53 ? Add 3 TraceRelative")]
14 | internal static IntPtr VTable;
15 | [Offset("Search 41 8B 4E ? E8 ? ? ? ? 4C 8B F8 Add 3 Read8")]
16 | internal static int RetainerTask;
17 | }
18 | protected AgentRetainerVenture(IntPtr pointer) : base(pointer)
19 | {
20 | }
21 |
22 | public int ExperiencedGain => Core.Memory.Read(Pointer + 0x3c);
23 | public int RewardItem1 => Core.Memory.Read(Pointer + 0x48);
24 | public int RewardItem2 => Core.Memory.Read(Pointer + 0x4C);
25 | public int RewardCount1 => Core.Memory.Read(Pointer + 0x50);
26 | public int RewardCount2 => Core.Memory.Read(Pointer + 0x54);
27 | public int RetainerTask => Core.Memory.Read(Pointer + Offsets.RetainerTask);
28 | }
29 | }
--------------------------------------------------------------------------------
/RemoteAgents/IAgent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace LlamaLibrary.RemoteAgents
4 | {
5 | public interface IAgent
6 | {
7 | IntPtr RegisteredVtable { get; }
8 | }
9 | }
--------------------------------------------------------------------------------
/RemoteWindows/AetherialWheel.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace LlamaLibrary.RemoteWindows
4 | {
5 | public class AetherialWheel : RemoteWindow
6 | {
7 | private const string WindowName = "AetherialWheel";
8 |
9 | public static readonly Dictionary Properties = new Dictionary
10 | {
11 | {
12 | "MaxSlots",
13 | 0
14 | }
15 | };
16 |
17 | public AetherialWheel() : base(WindowName)
18 | {
19 | _name = WindowName;
20 | }
21 |
22 | public int MaxSlots => ___Elements()[Properties["MaxSlots"]].TrimmedData;
23 |
24 | public void RemoveWheel(uint slotIndex)
25 | {
26 | SendAction(2, 3, 2, 4, slotIndex);
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/RemoteWindows/Character.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.RemoteWindows
2 | {
3 | public class Character: RemoteWindow
4 | {
5 |
6 | private const string WindowName = "Character";
7 |
8 | public Character() : base(WindowName)
9 | {
10 | _name = WindowName;
11 | }
12 |
13 | public void UpdateGearSet()
14 | {
15 | SendAction(1,3,0xF);
16 | }
17 |
18 | public bool CanUpdateGearSet()
19 | {
20 | var button = WindowByName.FindButton(18);
21 |
22 | if (button == null)
23 | return false;
24 |
25 | return button.Clickable;
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/RemoteWindows/CollectablesShop.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using ff14bot.Managers;
3 |
4 | namespace LlamaLibrary.RemoteWindows
5 | {
6 | public class CollectablesShop: RemoteWindow
7 | {
8 | private const string WindowName = "CollectablesShop";
9 |
10 | public int RowCount => ___Elements()[20].TrimmedData -1;
11 | public int TurninCount => ___Elements()[4843].TrimmedData;
12 | public CollectablesShop() : base(WindowName)
13 | {
14 | _name = WindowName;
15 | }
16 |
17 | public void SelectJob(int job)
18 | {
19 | SendAction(2,3,0xE,4,(ulong) job);
20 | }
21 |
22 | public void SelectItem(int line)
23 | {
24 | SendAction(2,3,0xC,4,(ulong) line);
25 | }
26 |
27 | public void Trade()
28 | {
29 | SendAction(2,3,0xf,4,0);
30 | }
31 |
32 | public List ListItems()
33 | {
34 | int count = ___Elements()[20].TrimmedData -1;
35 | var currentElements = ___Elements();
36 | var result = new List();
37 | for (int j = 0; j < count; j++)
38 | {
39 | if (currentElements[32 + (j * 11)].TrimmedData == ___Elements()[21].TrimmedData) continue; //IconID
40 | var itemID = currentElements[34 + (j * 11)].TrimmedData;
41 | if (itemID == 0 || itemID > 1500000 || itemID < 500000) continue;
42 | result.Add($"{j}: {DataManager.GetItem((uint) (itemID - 500000))} {itemID}");
43 | //Logger.Info($"{itemID}");
44 | }
45 |
46 | return result;
47 | }
48 |
49 | }
50 | }
--------------------------------------------------------------------------------
/RemoteWindows/CompanyCraftRecipeNoteBook.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 |
4 | namespace LlamaLibrary.RemoteWindows
5 | {
6 | public class CompanyCraftRecipeNoteBook: RemoteWindow
7 | {
8 | private const string WindowName = "CompanyCraftRecipeNoteBoo";
9 |
10 | public CompanyCraftRecipeNoteBook() : base(WindowName)
11 | {
12 | _name = WindowName;
13 | }
14 |
15 | public void SelectWheelsCategory()
16 | {
17 | SendAction( 4, 3,2,0,0,4,0,4,2);
18 | }
19 |
20 | public void SelectWheel(uint ItemId)
21 | {
22 | if (WheelIndexes.Any(i=> i.Value == ItemId))
23 | SendAction(8, 3,1,0,0,0,0,0,0,4,WheelIndexes.First(i=> i.Value == ItemId).Key,0,0,0,0,0,0);
24 | }
25 |
26 | public static Dictionary WheelIndexes = new Dictionary
27 | {
28 | {6, 9653}, //Grade 2 Wheel of Confrontation
29 | {7, 9654}, //Grade 2 Wheel of Productivity
30 | {8, 9655}, //Grade 2 Wheel of Industry
31 | {9, 9656}, //Grade 2 Wheel of Longeing
32 | {10, 9657}, //Grade 2 Wheel of Rivalry
33 | {11, 9658}, //Grade 2 Wheel of Company
34 | {12, 12215}, //Grade 2 Wheel of Recreation
35 | {13, 9659}, //Grade 2 Wheel of Initiation
36 | {14, 9660}, //Grade 2 Wheel of Capacity
37 | {15, 9661}, //Grade 2 Wheel of Observation
38 | {16, 9662}, //Grade 2 Wheel of Efficiency
39 | {17, 9663}, //Grade 2 Wheel of Precision
40 | {18, 9664}, //Grade 2 Wheel of Dedication
41 | {19, 9665}, //Grade 2 Wheel of Nutriment
42 | {20, 9666}, //Grade 2 Wheel of Permanence
43 | {21, 9667}, //Grade 2 Wheel of Revival
44 | {22, 9668}, //Grade 2 Wheel of Pilgrimage
45 | {23, 9669}, //Grade 3 Wheel of Confrontation
46 | {24, 9670}, //Grade 3 Wheel of Productivity
47 | {25, 9671}, //Grade 3 Wheel of Industry
48 | {26, 9672}, //Grade 3 Wheel of Longeing
49 | {27, 9673}, //Grade 3 Wheel of Rivalry
50 | {28, 9674}, //Grade 3 Wheel of Company
51 | {29, 12216}, //Grade 3 Wheel of Recreation
52 | {31, 9676}, //Grade 3 Wheel of Capacity
53 | {32, 9677}, //Grade 3 Wheel of Observation
54 | {33, 9678}, //Grade 3 Wheel of Efficiency
55 | {34, 9679}, //Grade 3 Wheel of Precision
56 | {35, 9680}, //Grade 3 Wheel of Dedication
57 | {36, 9681}, //Grade 3 Wheel of Nutriment
58 | {37, 9682}, //Grade 3 Wheel of Permanence
59 | {39, 9684}, //Grade 3 Wheel of Pilgrimage
60 | };
61 | }
62 | }
--------------------------------------------------------------------------------
/RemoteWindows/ContentsInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Text;
3 | using System.Threading.Tasks;
4 | using Buddy.Coroutines;
5 | using ff14bot;
6 | using ff14bot.Managers;
7 | using LlamaLibrary.RemoteAgents;
8 |
9 | namespace LlamaLibrary.RemoteWindows
10 | {
11 | public class ContentsInfo : RemoteWindow
12 | {
13 | private const string WindowName = "ContentsInfo";
14 |
15 | public ContentsInfo() : base(WindowName)
16 | {
17 | _name = WindowName;
18 | }
19 |
20 |
21 | public async Task Open()
22 | {
23 | if (IsOpen)
24 | return true;
25 |
26 | AgentInterface.Instance.Toggle();
27 | await Coroutine.Wait(5000, () => IsOpen);
28 |
29 | return IsOpen;
30 | }
31 |
32 | public void OpenGCSupplyWindow()
33 | {
34 | SendAction(2, 3, 0xC, 3, 1);
35 | }
36 |
37 | public void OpenMasterPieceSupplyWindow()
38 | {
39 | SendAction(2, 3, 0xC, 3, 6);
40 | }
41 |
42 | public string GetElementString(int index)
43 | {
44 | return ___Elements()[index].Data != 0 ? Core.Memory.ReadString((IntPtr) ___Elements()[index].Data, Encoding.UTF8) : "";
45 | }
46 |
47 | public int GetNumberOfBeastTribeAllowance()
48 | {
49 | var line = Instance.GetElementString(50);
50 | return line == "" ? 0 : int.Parse(line.Split(':')[1].Trim());
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/RemoteWindows/Conversation.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using ff14bot.RemoteWindows;
3 |
4 | namespace LlamaLibrary.RemoteWindows
5 | {
6 | public static class Conversation
7 | {
8 | public static bool IsOpen => SelectString.IsOpen || SelectIconString.IsOpen || CutSceneSelectString.IsOpen;
9 |
10 | public static List GetConversationList
11 | {
12 | get
13 | {
14 | if (SelectString.IsOpen)
15 | return SelectString.Lines();
16 | if (SelectIconString.IsOpen)
17 | return SelectIconString.Lines();
18 | return new List();
19 | }
20 | }
21 |
22 | public static void SelectLine(uint line)
23 | {
24 | if (SelectString.IsOpen)
25 | SelectString.ClickSlot(line);
26 | else if (SelectIconString.IsOpen)
27 | SelectIconString.ClickSlot(line);
28 | else if (CutSceneSelectString.IsOpen)
29 | CutSceneSelectString.ClickSlot(line);
30 | }
31 |
32 | public static void SelectQuit()
33 | {
34 | uint line;
35 | if (SelectString.IsOpen)
36 | {
37 | line = (uint) (SelectString.LineCount - 1);
38 | SelectString.ClickSlot(line);
39 | }
40 | else if (SelectIconString.IsOpen)
41 | {
42 | line = (uint) (SelectIconString.LineCount - 1);
43 | SelectIconString.ClickSlot(line);
44 | }
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/RemoteWindows/FateProgress.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.RemoteWindows
2 | {
3 | public class FateProgress: RemoteWindow
4 | {
5 | private const string WindowName = "FateProgress";
6 |
7 | public FateProgress() : base(WindowName)
8 | {
9 | _name = WindowName;
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/RemoteWindows/FishGuide.cs:
--------------------------------------------------------------------------------
1 | using ff14bot.Managers;
2 |
3 | namespace LlamaLibrary.RemoteWindows
4 | {
5 | public class FishGuide: RemoteWindow
6 | {
7 | private AtkAddonControl _windowByName;
8 | private const string WindowName = "FishGuide";
9 |
10 | public FishGuide() : base(WindowName)
11 | {
12 | _name = WindowName;
13 |
14 | }
15 |
16 | public void ClickTab(int index)
17 | {
18 | SendAction(2,3,8,3,(ulong) index);
19 | }
20 |
21 |
22 |
23 | }
24 |
25 |
26 | }
--------------------------------------------------------------------------------
/RemoteWindows/FreeCompany.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.RemoteWindows
2 | {
3 | public class FreeCompany: RemoteWindow
4 | {
5 | private const string WindowName = "FreeCompany";
6 |
7 | public FreeCompany() : base(WindowName)
8 | {
9 | _name = WindowName;
10 | }
11 |
12 | public void SelectActions()
13 | {
14 | SendAction(2,3,0,4,4);
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/RemoteWindows/FreeCompanyAction.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using Buddy.Coroutines;
3 | using ff14bot.Managers;
4 | using ff14bot.RemoteWindows;
5 |
6 | namespace LlamaLibrary.RemoteWindows
7 | {
8 | public class FreeCompanyAction: RemoteWindow
9 | {
10 | private const string WindowName = "FreeCompanyAction";
11 |
12 | public FreeCompanyAction() : base(WindowName)
13 | {
14 | _name = WindowName;
15 | }
16 |
17 | public void SelectAction(int index)
18 | {
19 | SendAction(2,3,1,4,(ulong) index);
20 | }
21 |
22 | public void SelectEnable()
23 | {
24 | RaptureAtkUnitManager.GetWindowByName("ContextMenu").SendAction(4, 3, 0, 3, 0, 4, 0, 0, 0);
25 | }
26 |
27 | public async Task EnableAction(int index)
28 | {
29 | SelectAction(index);
30 | await Coroutine.Wait(5000, () => RaptureAtkUnitManager.GetWindowByName("ContextMenu") != null);
31 | if (RaptureAtkUnitManager.GetWindowByName("ContextMenu") != null)
32 | {
33 | SelectEnable();
34 | await Coroutine.Wait(5000, () => SelectYesno.IsOpen);
35 | if (SelectYesno.IsOpen)
36 | {
37 | SelectYesno.Yes();
38 | }
39 | }
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/RemoteWindows/FreeShop.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Buddy.Coroutines;
6 | using ff14bot.Managers;
7 | using ff14bot.RemoteWindows;
8 |
9 | namespace LlamaLibrary.RemoteWindows
10 | {
11 | public class FreeShop: RemoteWindow
12 | {
13 | private const string WindowName = "FreeShop";
14 |
15 | public FreeShop() : base(WindowName)
16 | {
17 | _name = WindowName;
18 | }
19 |
20 | public int NumberOfItems => ___Elements()[3].TrimmedData;
21 |
22 | public List- GetAvailItems()
23 | {
24 | var currentElements = ___Elements();
25 |
26 | var itemElements = new ArraySegment(currentElements, 65, NumberOfItems);
27 |
28 | return itemElements.Select(item => DataManager.GetItem((uint) (item.TrimmedData))).ToList();
29 | }
30 |
31 | public async Task BuyItem(uint itemId)
32 | {
33 | if (InventoryManager.FilledSlots.Any(i => i.RawItemId == itemId))
34 | return true;
35 |
36 | if (IsOpen)
37 | {
38 | ClickItem(GetItemIndex(itemId));
39 | await Coroutine.Wait(5000, () => InventoryManager.FilledSlots.Any(i => i.RawItemId == itemId));
40 | }
41 |
42 | return (InventoryManager.FilledSlots.Any(i => i.RawItemId == itemId));
43 | }
44 |
45 | public int GetItemIndex(uint itemId)
46 | {
47 | var items = GetAvailItems().ToArray();
48 | for (int i = 0; i < items.Length; i++)
49 | {
50 | if (items[i].Id == itemId)
51 | return i;
52 | }
53 |
54 | return -1;
55 | }
56 |
57 | public void ClickItem(int index)
58 | {
59 | if (index >=0)
60 | SendAction(2,3,0,3,(ulong) index);
61 | }
62 | }
63 | }
--------------------------------------------------------------------------------
/RemoteWindows/GatheringMasterpieceLL.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace LlamaLibrary.RemoteWindows
4 | {
5 | public class GatheringMasterpieceLL: RemoteWindow
6 | {
7 | private const string WindowName = "GatheringMasterpiece";
8 | public GatheringMasterpieceLL() : base(WindowName)
9 | {
10 | _name = WindowName;
11 | }
12 |
13 | public static readonly Dictionary Properties = new Dictionary
14 | {
15 | {
16 | "Collectability",
17 | 4
18 | },
19 | {
20 | "MaxCollectability",
21 | 5
22 | },
23 | {
24 | "Integrity",
25 | 40
26 | },
27 | {
28 | "MaxIntegrity",
29 | 41
30 | },
31 | {
32 | "ItemID",
33 | 10
34 | },
35 | {
36 | "IntuitionRate",
37 | 37
38 | },
39 | {
40 | "Skill1",
41 | 30
42 | },
43 | {
44 | "Skill2Estimate",
45 | 31
46 | },
47 | {
48 | "Skill2Max",
49 | 32
50 | },
51 | {
52 | "Skill3",
53 | 33
54 | }
55 | };
56 |
57 | public int Collectability => ___Elements()[Properties["Collectability"]].TrimmedData;
58 | public int MaxCollectability => ___Elements()[Properties["MaxCollectability"]].TrimmedData;
59 | public int Integrity => ___Elements()[Properties["Integrity"]].TrimmedData;
60 | public int MaxIntegrity => ___Elements()[Properties["MaxIntegrity"]].TrimmedData;
61 | public int ItemID => ___Elements()[Properties["ItemID"]].TrimmedData;
62 | public int Scour => ___Elements()[Properties["Skill1"]].TrimmedData;
63 | public int BrazenEstimate => ___Elements()[Properties["Skill2Estimate"]].TrimmedData;
64 | public int Brazen2Max => ___Elements()[Properties["Skill2Max"]].TrimmedData;
65 | public int Meticulous => ___Elements()[Properties["Skill3"]].TrimmedData;
66 | public int IntuitionRate => ___Elements()[Properties["IntuitionRate"]].TrimmedData;
67 |
68 | public void Collect()
69 | {
70 | if (IsOpen)
71 | SendAction(1,3,0);
72 | }
73 |
74 | public void SetScrutiny(bool value = true)
75 | {
76 | if (value)
77 | SendAction(3,3,0x65,0,0,2,1);
78 | else
79 | {
80 | SendAction(3,3,0x65,0,0,2,0);
81 | }
82 | }
83 |
84 | public void SetCollectorsIntuition(bool value = true)
85 | {
86 | if (value)
87 | SendAction(3,3,0x66,0,0,2,1);
88 | else
89 | {
90 | SendAction(3,3,0x66,0,0,2,0);
91 | }
92 | }
93 |
94 | }
95 | }
--------------------------------------------------------------------------------
/RemoteWindows/GcArmyCapture.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.RemoteWindows
2 | {
3 | ///
4 | /// Class for using the GC squadron window
5 | ///
6 | public class GcArmyCapture: RemoteWindow
7 | {
8 | private const string WindowName = "GcArmyCapture";
9 |
10 | public GcArmyCapture() : base(WindowName)
11 | {
12 | _name = WindowName;
13 | }
14 |
15 | public void Commence()
16 | {
17 | SendAction(1, 3, 0xd);
18 | }
19 |
20 | ///
21 | /// Sets the squadron command mission
22 | ///
23 | /// The duty index from the list starting at 0.
24 | public void SelectDuty(int index)
25 | {
26 | SendAction(2, 3, 0xB, 4, (ulong) index);
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/RemoteWindows/GcArmyExpeditionResult.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.RemoteWindows
2 | {
3 | public class GcArmyExpeditionResult: RemoteWindow
4 | {
5 | private const string WindowName = "GcArmyExpeditionResult";
6 |
7 | public GcArmyExpeditionResult() : base(WindowName)
8 | {
9 | _name = WindowName;
10 | }
11 |
12 |
13 | public override void Close()
14 | {
15 | SendAction(1,3,0);
16 | }
17 |
18 | }
19 | }
--------------------------------------------------------------------------------
/RemoteWindows/GoldSaucerReward.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.RemoteWindows
2 | {
3 | public class GoldSaucerReward: RemoteWindow
4 | {
5 | private const string WindowName = "GoldSaucerReward";
6 |
7 | public GoldSaucerReward() : base(WindowName)
8 | {
9 | _name = WindowName;
10 | }
11 |
12 |
13 | public int MGPReward => ___Elements()[1].TrimmedData;
14 | }
15 | }
--------------------------------------------------------------------------------
/RemoteWindows/GrandCompanyExchange.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using ff14bot.RemoteWindows;
4 |
5 | namespace LlamaLibrary.RemoteWindows
6 | {
7 | public class GrandCompanyExchange: RemoteWindow
8 | {
9 | private const string WindowName = "GrandCompanyExchange";
10 |
11 | public GrandCompanyExchange() : base(WindowName)
12 | {
13 | _name = WindowName;
14 | }
15 |
16 | public int GetNumberOfItems => IsOpen ? ___Elements()[1].TrimmedData : 0;
17 |
18 | public int GCRankGroup => IsOpen ? ___Elements()[2].TrimmedData : 0;
19 |
20 | public uint[] GetTurninItemsIds()
21 | {
22 | var currentElements = ___Elements();
23 | var turninIdElements = new ArraySegment(currentElements, 317, GetNumberOfItems).Select(i=> (uint)i.TrimmedData).ToArray();
24 | return turninIdElements;
25 | }
26 |
27 | public uint[] GetItemCosts()
28 | {
29 | var currentElements = ___Elements();
30 | var costElements = new ArraySegment(currentElements, 67, GetNumberOfItems).Select(i=> (uint)i.TrimmedData).ToArray();
31 | return costElements;
32 | }
33 |
34 | public void BuyItemByIndex(uint index,int qty)
35 | {
36 | SendAction(4,3,0,3,(ulong) index,3,(ulong) qty,0,7);//Click item and qty
37 | }
38 |
39 | public void ChangeRankGroup(int rankGroup)
40 | {
41 | SendAction(2,3,1,3,(ulong) rankGroup);
42 | }
43 |
44 | public void ChangeItemGroup(int itemGroup)
45 | {
46 | SendAction(2,3,2,3,(ulong) itemGroup);
47 | }
48 |
49 | }
50 | }
--------------------------------------------------------------------------------
/RemoteWindows/GrandCompanySupplyList.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Threading.Tasks;
4 | using Buddy.Coroutines;
5 | using ff14bot.RemoteWindows;
6 |
7 | namespace LlamaLibrary.RemoteWindows
8 | {
9 | public class GrandCompanySupplyList: RemoteWindow
10 | {
11 | private const string WindowName = "GrandCompanySupplyList";
12 |
13 | public GrandCompanySupplyList() : base(WindowName)
14 | {
15 | _name = WindowName;
16 | }
17 |
18 | public int GetNumberOfTurnins()
19 | {
20 | return IsOpen ? ___Elements()[7].TrimmedData : 0;
21 | }
22 |
23 | public bool[] GetTurninBools()
24 | {
25 | var currentElements = ___Elements();
26 | var numberTurnins = GetNumberOfTurnins();
27 |
28 | var canHandInElements = new ArraySegment(currentElements, 346, numberTurnins).Select(i=> (uint)i.TrimmedData).ToArray();
29 | var reqElements = new ArraySegment(currentElements, 386, numberTurnins).Select(i=> (uint)i.TrimmedData).ToArray();
30 |
31 | bool[] turins = new bool[numberTurnins];
32 |
33 | for (int i = 0; i < numberTurnins; i++)
34 | {
35 | turins[i] = canHandInElements[i] >= reqElements[i];
36 | }
37 |
38 | return turins;
39 | }
40 |
41 | public uint[] GetTurninItemsIds()
42 | {
43 | var currentElements = ___Elements();
44 | var numberTurnins = GetNumberOfTurnins();
45 |
46 | var turninIdElements = new ArraySegment(currentElements, 426, numberTurnins).Select(i=> (uint)i.TrimmedData).ToArray();
47 |
48 | return turninIdElements;
49 | }
50 |
51 | public uint[] GetTurninRequired()
52 | {
53 | var currentElements = ___Elements();
54 | var numberTurnins = GetNumberOfTurnins();
55 |
56 | var reqElements = new ArraySegment(currentElements, 386, numberTurnins).Select(i=> (uint)i.TrimmedData).ToArray();
57 |
58 | return reqElements;
59 | }
60 |
61 | public void ClickItem(int index)
62 | {
63 | SendAction(2, 3, 1, 3, (ulong) index);
64 | }
65 |
66 | public async Task SwitchToExpertDelivery()
67 | {
68 | SendAction(2, 3,0,3,2);
69 | await Coroutine.Sleep(500);
70 | SendAction(2, 3,5,3,2);
71 | await Coroutine.Sleep(500);
72 | }
73 |
74 | public async Task SwitchToProvisioning()
75 | {
76 | //var button = WindowByName.FindButton(12);
77 | SendAction(2, 3,0,3,1);
78 | await Coroutine.Sleep(500);
79 | }
80 |
81 | public async Task SwitchToSupply()
82 | {
83 | SendAction(2, 3,0,3,0);
84 | await Coroutine.Sleep(500);
85 | }
86 |
87 | }
88 | }
--------------------------------------------------------------------------------
/RemoteWindows/GrandCompanySupplyReward.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.RemoteWindows
2 | {
3 | public class GrandCompanySupplyReward: RemoteWindow
4 | {
5 | private const string WindowName = "GrandCompanySupplyReward";
6 |
7 | public GrandCompanySupplyReward() : base(WindowName)
8 | {
9 | _name = WindowName;
10 | }
11 |
12 | public void Confirm()
13 | {
14 | SendAction(1,3,0);
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/RemoteWindows/GuildLeve.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Text;
3 | using ff14bot;
4 |
5 | namespace LlamaLibrary.RemoteWindows
6 | {
7 | public class GuildLeve: RemoteWindow
8 | {
9 | private const string WindowName = "GuildLeve";
10 |
11 | public GuildLeve() : base(WindowName)
12 | {
13 | _name = WindowName;
14 | }
15 |
16 | public LeveWindow Window => (LeveWindow) ___Elements()[6].TrimmedData;
17 |
18 |
19 |
20 | public string PrintWindow()
21 | {
22 | StringBuilder sb = new StringBuilder();
23 |
24 | sb.AppendLine(Window.ToString());
25 |
26 | for (int i = 0; i < 5; i++)
27 | {
28 | var leveBlock = GetLeveGroup(i);
29 |
30 | //sb.AppendLine("Block " + i);
31 |
32 | foreach (var leve in leveBlock)
33 | {
34 | if (!leve.Contains("Level "))
35 | sb.AppendLine(leve);
36 | }
37 | }
38 |
39 | return sb.ToString();
40 | }
41 |
42 | public string[] GetLeveGroup(int index)
43 | {
44 | string[] names = new string[3];
45 |
46 | names[0] = Core.Memory.ReadString((IntPtr) ___Elements()[((index * 8) + 628)].Data, Encoding.UTF8);
47 | names[1] = Core.Memory.ReadString((IntPtr) ___Elements()[((index * 8) + 628) + 2].Data, Encoding.UTF8);
48 | names[2] = Core.Memory.ReadString((IntPtr) ___Elements()[((index * 8) + 628) + 4].Data, Encoding.UTF8);
49 |
50 | return names;
51 | }
52 |
53 | public void SwitchType(int index)
54 | {
55 | SendAction(3, 3,9,3,(ulong) index,3,0);
56 | }
57 |
58 | public void SwitchClass(int index)
59 | {
60 | SendAction(2, 3,0xB,3,(ulong) index);
61 | }
62 |
63 | }
64 |
65 | public enum LeveWindow
66 | {
67 | Battle = 0,
68 | Gathering = 3,
69 | Crafting = 8
70 | }
71 | }
--------------------------------------------------------------------------------
/RemoteWindows/HWDGathereInspect.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace LlamaLibrary.RemoteWindows
4 | {
5 | public class HWDGathereInspect: RemoteWindow
6 | {
7 |
8 | private const string WindowName = "HWDGathereInspect";
9 |
10 | public HWDGathereInspect() : base(WindowName)
11 | {
12 | _name = WindowName;
13 | }
14 |
15 | public void ClickAutoSubmit()
16 | {
17 | if (CanAutoSubmit())
18 | SendAction(1, 3, 0xC);
19 | }
20 |
21 | public void ClickRequestInspection()
22 | {
23 | if (CanRequestInspection())
24 | SendAction(1, 3, 0xB);
25 | }
26 |
27 | public void ClickClass(int index)
28 | {
29 | SendAction(2, 3,0xE,4,(ulong) index);
30 | }
31 |
32 | public bool CanAutoSubmit()
33 | {
34 | var button = WindowByName.FindButton(8);
35 |
36 | if (button != null)
37 | return button.Clickable;
38 |
39 | return false;
40 | }
41 |
42 | public bool CanRequestInspection()
43 | {
44 | var button = WindowByName.FindButton(10);
45 |
46 | if (button != null)
47 | return button.Clickable;
48 |
49 | return false;
50 | }
51 |
52 | public override void Close()
53 | {
54 | SendAction(1, 3, UInt64.MaxValue);
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/RemoteWindows/HWDLottery.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using Buddy.Coroutines;
4 | using ff14bot;
5 | using LlamaLibrary.Memory.Attributes;
6 |
7 | namespace LlamaLibrary.RemoteWindows
8 | {
9 | public class HWDLottery: RemoteWindow
10 | {
11 | private const string WindowName = "HWDLottery";
12 |
13 | internal static class Offsets
14 | {
15 | [Offset("Search 48 89 74 24 ? 57 48 83 EC ? 48 83 79 ? ? 8B F2 48 8B F9 0F 84 ? ? ? ? 48 89 5C 24 ? 4C 8D 44 24 ? BB ? ? ? ? 48 89 6C 24 ? 8B C3 33 ED 41 89 28 4D 8D 40 ? 48 83 E8 ? 75 ? 8D 50 ? 48 8D 4C 24 ? E8 ? ? ? ? BA ? ? ? ? C7 44 24 ? ? ? ? ? 48 8D 4C 24 ? E8 ? ? ? ? 48 8B 4F ? 4C 8D 44 24 ? 89 74 24 ? 48 8D 54 24 ? 44 8B CB 48 89 6C 24 ? 48 8B 01 FF 10 48 8D 4C 24 ? E8 ? ? ? ? 48 8B 6C 24 ? 48 8D 7C 24 ?")]
16 | internal static IntPtr KupoFunction;
17 | }
18 |
19 | public override void Close()
20 | {
21 | SendAction(1,3,2);
22 | }
23 |
24 | public HWDLottery() : base(WindowName)
25 | {
26 | _name = WindowName;
27 | }
28 |
29 | public async Task ClickSpot(int slot)
30 | {
31 | //var patternFinder = new GreyMagic.PatternFinder(Core.Memory);
32 | //IntPtr KupoClick = patternFinder.Find("E8 ? ? ? ? 32 C0 48 8B 5C 24 ? 48 8B 74 24 ? 48 83 C4 ? 5F C3 48 8B 03 48 8B CB FF 50 ? TraceCall");
33 |
34 | if (IsOpen)
35 | {
36 | var agent = WindowByName.TryFindAgentInterface();
37 |
38 | if (agent != null)
39 | {
40 | Core.Memory.CallInjected64(Offsets.KupoFunction, new object[2]
41 | {
42 | agent.Pointer,
43 | (uint) 1
44 | });
45 |
46 | await Coroutine.Sleep(2000);
47 | }
48 | }
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/RemoteWindows/HWDScore.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.RemoteWindows
2 | {
3 | public class HWDScore : RemoteWindow
4 | {
5 | private const string WindowName = "HWDScore";
6 |
7 | public HWDScore() : base(WindowName)
8 | {
9 | _name = WindowName;
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/RemoteWindows/HWDSupply.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Text;
3 | using ff14bot;
4 | using ff14bot.Enums;
5 | using LlamaLibrary.Helpers;
6 |
7 | namespace LlamaLibrary.RemoteWindows
8 | {
9 | public class HWDSupply : RemoteWindow
10 | {
11 | private const string WindowName = "HWDSupply";
12 |
13 | public HWDSupply() : base(WindowName)
14 | {
15 | _name = WindowName;
16 | }
17 |
18 | public int CurrentClassSelected()
19 | {
20 | if (Translator.Language == Language.Chn)
21 | return ___Elements()[29].TrimmedData;
22 | else
23 | {
24 | return ___Elements()[62].TrimmedData;
25 | }
26 | }
27 |
28 | public int GetAccumulatedScore()
29 | {
30 | return ___Elements()[17+CurrentClassSelected()].TrimmedData;
31 | }
32 |
33 | public int NumberOfKupoTickets()
34 | {
35 | if (Translator.Language == Language.Chn)
36 | return 0;
37 | else
38 | {
39 | var data = Core.Memory.ReadString((IntPtr) ___Elements()[3].Data, Encoding.UTF8).Split('/');
40 | return data.Length < 2 ? 0 : int.Parse(data[0].Trim());
41 | }
42 | }
43 |
44 | public int ClassSelected
45 | {
46 | get => CurrentClassSelected();
47 | set
48 | {
49 | if (WindowByName != null && CurrentClassSelected() != value)
50 | SendAction(2, 0, 1, 1, (ulong)value);
51 | }
52 | }
53 |
54 | public void ClickItem(int index)
55 | {
56 | SendAction(2, 3, 1, 3, (ulong)index);
57 | }
58 |
59 | public override void Close()
60 | {
61 | SendAction(1, 3, UInt64.MaxValue);
62 | }
63 | }
64 | }
--------------------------------------------------------------------------------
/RemoteWindows/HousingSelectBlock.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Text;
3 | using ff14bot;
4 |
5 | namespace LlamaLibrary.RemoteWindows
6 | {
7 | public class HousingSelectBlock: RemoteWindow
8 | {
9 | private const string WindowName = "HousingSelectBlock";
10 |
11 | public HousingSelectBlock() : base(WindowName)
12 | {
13 | _name = WindowName;
14 | }
15 |
16 | public int NumberOfWards => ___Elements()[3].TrimmedData;
17 |
18 | public int NumberOfPlots => ___Elements()[34].TrimmedData;
19 |
20 | public string HousingWard => Core.Memory.ReadString((IntPtr) ___Elements()[2].Data, Encoding.UTF8);
21 |
22 | public string PlotPrice(int plot)
23 | {
24 | return Core.Memory.ReadString((IntPtr) ___Elements()[37 + (plot * 7)].Data, Encoding.UTF8);
25 | }
26 |
27 | public string PlotString(int plot)
28 | {
29 | return Core.Memory.ReadString((IntPtr) ___Elements()[36 + (plot * 7)].Data, Encoding.UTF8);
30 | }
31 |
32 | public string PlotString1(int plot)
33 | {
34 | return Core.Memory.ReadString((IntPtr) ___Elements()[36 + (plot * 7)].Data, Encoding.Unicode);
35 | }
36 |
37 | public void SelectWard(int index)
38 | {
39 | SendAction(2,3,1,3,(ulong) index);
40 | }
41 |
42 | public void GoToWard(int index)
43 | {
44 | SendAction(2,3,0,3,(ulong) index);
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/RemoteWindows/HousingSignBoard.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Text;
3 | using ff14bot;
4 |
5 | namespace LlamaLibrary.RemoteWindows
6 | {
7 | public class HousingSignBoard: RemoteWindow
8 | {
9 | private const string WindowName = "HousingSignBoard";
10 |
11 | public HousingSignBoard() : base(WindowName)
12 | {
13 | _name = WindowName;
14 | }
15 |
16 | public bool IsForSale
17 | {
18 | get => Core.Memory.ReadString((IntPtr) ___Elements()[1].Data, Encoding.UTF8).Contains("Sale");
19 | }
20 |
21 | public void ClickBuy()
22 | {
23 | SendAction(1,3,1);
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/RemoteWindows/HugeCraftworksSupply.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using System.Threading.Tasks;
3 | using Buddy.Coroutines;
4 | using ff14bot.Managers;
5 | using ff14bot.RemoteWindows;
6 | using LlamaLibrary.RemoteAgents;
7 |
8 | namespace LlamaLibrary.RemoteWindows
9 | {
10 | public class HugeCraftworksSupply: RemoteWindow
11 | {
12 | private const string WindowName = "HugeCraftworksSupply";
13 |
14 | public HugeCraftworksSupply() : base(WindowName)
15 | {
16 | _name = WindowName;
17 | }
18 |
19 | public int TurnInItemId => ___Elements()[9].TrimmedData;
20 |
21 | public void Deliver()
22 | {
23 | SendAction(1,3,0);
24 | }
25 |
26 | public async Task HandOverItems()
27 | {
28 | var slots = InventoryManager.FilledSlots.Where(i => i.RawItemId == TurnInItemId).OrderByDescending(i => i.HqFlag);
29 |
30 | foreach (var slot in slots)
31 | {
32 | if (slot != null)
33 | {
34 | AgentHandIn.Instance.HandIn(slot);
35 | //await Coroutine.Sleep(500);
36 | await Coroutine.Wait(5000, () => InputNumeric.IsOpen);
37 | if (InputNumeric.IsOpen)
38 | {
39 | InputNumeric.Ok((uint) InputNumeric.Field.CurrentValue);
40 | }
41 | await Coroutine.Sleep(700);
42 | }
43 | }
44 |
45 | await Coroutine.Sleep(500);
46 |
47 | Deliver();
48 |
49 | await Coroutine.Wait(5000, () => Talk.DialogOpen);
50 |
51 | while (Talk.DialogOpen)
52 | {
53 | Talk.Next();
54 | await Coroutine.Sleep(1000);
55 | }
56 | }
57 | }
58 | }
--------------------------------------------------------------------------------
/RemoteWindows/InventoryBuddy.cs:
--------------------------------------------------------------------------------
1 | using LlamaLibrary.RemoteAgents;
2 |
3 | namespace LlamaLibrary.RemoteWindows
4 | {
5 | public class InventoryBuddy: RemoteWindow
6 | {
7 | private const string WindowName = "InventoryBuddy";
8 |
9 |
10 | public InventoryBuddy() : base(WindowName, AgentInventoryBuddy.Instance)
11 | {
12 | _name = WindowName;
13 | //_agent = AgentInventoryBuddy.Instance;
14 | }
15 |
16 | }
17 | }
--------------------------------------------------------------------------------
/RemoteWindows/MasterPieceSupply.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using ff14bot.Managers;
5 | using ff14bot.RemoteWindows;
6 |
7 | namespace LlamaLibrary.RemoteWindows
8 | {
9 | public class MasterPieceSupply : RemoteWindow
10 | {
11 | private const string WindowName = "MasterPieceSupply";
12 |
13 | public MasterPieceSupply() : base(WindowName)
14 | {
15 | _name = WindowName;
16 | }
17 |
18 | public int ClassSelected
19 | {
20 | get => ___Elements()[45].TrimmedData;
21 | set
22 | {
23 | if (WindowByName != null && ___Elements()[45].TrimmedData != value)
24 | SendAction(2, 1, 2, 1, (ulong) value);
25 | }
26 | }
27 |
28 | public int GetNumberOfTurnins()
29 | {
30 | return IsOpen ? ___Elements()[0].TrimmedData : 0;
31 | }
32 |
33 | public List
- GetTurninItems()
34 | {
35 | var currentElements = ___Elements();
36 |
37 | var itemElements = new ArraySegment(currentElements, 87, GetNumberOfTurnins());
38 |
39 | return itemElements.Select(item => DataManager.GetItem((uint) (item.TrimmedData - 500000))).ToList();
40 | }
41 |
42 | public Dictionary
- GetTurninItemsStarred()
43 | {
44 | var result = new Dictionary
- ();
45 |
46 | var currentElements = ___Elements();
47 |
48 | var itemElements = new ArraySegment(currentElements, 87, GetNumberOfTurnins()).ToArray();
49 | var starElements = new ArraySegment(currentElements, 447, GetNumberOfTurnins()).ToArray();
50 |
51 | for (var i = 0; i < GetNumberOfTurnins(); i++)
52 | {
53 | result.Add(DataManager.GetItem((uint) (itemElements[i].TrimmedData - 500000)), starElements[i].TrimmedData == 1);
54 | }
55 |
56 | return result;
57 | }
58 |
59 | public void ClickItem(int index)
60 | {
61 | SendAction(2, 3, 1, 3, (ulong) index);
62 | }
63 | }
64 | }
--------------------------------------------------------------------------------
/RemoteWindows/MateriaAttach.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.RemoteWindows
2 | {
3 | public class MateriaAttach : RemoteWindow
4 | {
5 | private const string WindowName = "MateriaAttach";
6 |
7 | public MateriaAttach() : base(WindowName)
8 | {
9 | _name = WindowName;
10 | }
11 |
12 | public void ClickItem(int index)
13 | {
14 | SendAction(3, 3uL, 1, 3, (ulong)index, 3, 1);
15 | }
16 |
17 | public void ClickMateria(int index)
18 | {
19 | SendAction(3, 3uL, 2, 3, (ulong)index, 3, 1);
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/RemoteWindows/MateriaAttachDialog.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.RemoteWindows
2 | {
3 | public class MateriaAttachDialog: RemoteWindow
4 | {
5 | private const string WindowName = "MateriaAttachDialog";
6 |
7 | public MateriaAttachDialog() : base(WindowName)
8 | {
9 | _name = WindowName;
10 | }
11 |
12 | public void ClickAttach()
13 | {
14 | SendAction(1,3,0);
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/RemoteWindows/MiniGameAimg.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.RemoteWindows
2 | {
3 | public class MiniGameAimg: RemoteWindow
4 | {
5 | private const string WindowName = "MiniGameAimg";
6 |
7 | public MiniGameAimg() : base(WindowName)
8 | {
9 | _name = WindowName;
10 | }
11 |
12 | public void PressButton()
13 | {
14 | SendAction(1,3,0xB);
15 | }
16 |
17 | public void PauseCursor()
18 | {
19 | SendAction(1,3,0xF);
20 | }
21 |
22 | public void ResumeCursor()
23 | {
24 | SendAction(1,3,0xF);
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/RemoteWindows/MiniGameBotanist.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Text;
3 | using System.Text.RegularExpressions;
4 | using ff14bot;
5 |
6 | namespace LlamaLibrary.RemoteWindows
7 | {
8 | public class MiniGameBotanist : RemoteWindow
9 | {
10 | private const string WindowName = "MiniGameBotanist";
11 |
12 | private readonly Regex _timeRegex = new Regex(@"(\d):(\d+).*", RegexOptions.Compiled);
13 |
14 | public MiniGameBotanist() : base(WindowName)
15 | {
16 | _name = WindowName;
17 | }
18 |
19 | public void PressButton()
20 | {
21 | SendAction(3,3,0xB,3,0,3,0);
22 | }
23 |
24 | public void PauseCursor()
25 | {
26 | SendAction(1,3,0xF);
27 | }
28 |
29 | public void ResumeCursor()
30 | {
31 | SendAction(1,3,0xF);
32 | }
33 |
34 | public int GetNumberOfTriesLeft => IsOpen ? ___Elements()[11].TrimmedData : 0;
35 |
36 | public int GetProgressLeft => IsOpen ? ___Elements()[12].TrimmedData : 0;
37 |
38 | public int GetProgressTotal => IsOpen ? ___Elements()[13].TrimmedData : 0;
39 |
40 | public int GetTimeLeft
41 | {
42 | get
43 | {
44 | var data = Core.Memory.ReadString((IntPtr) ___Elements()[15].Data, Encoding.UTF8);
45 |
46 | if (!_timeRegex.IsMatch(data)) return 0;
47 |
48 | var sec = int.Parse(_timeRegex.Match(data).Groups[2].Value.Trim());
49 | var min = int.Parse(_timeRegex.Match(data).Groups[1].Value.Trim());
50 |
51 | if (min > 0) return 60 + sec;
52 |
53 | return sec;
54 | }
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/RemoteWindows/Mobhunt.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using ff14bot.Managers;
3 |
4 | namespace LlamaLibrary.RemoteWindows
5 | {
6 | public class Mobhunt: RemoteWindow
7 | {
8 | private AtkAddonControl _windowByName;
9 | private const string WindowName = "Mobhunt";
10 |
11 | public override AtkAddonControl WindowByName => RaptureAtkUnitManager.Controls.FirstOrDefault(i => i.Name.Contains(Name) && i.IsVisible);
12 |
13 | public Mobhunt() : base(WindowName)
14 | {
15 | _name = WindowName;
16 |
17 | }
18 |
19 | public void Accept()
20 | {
21 | SendAction(1,3,0);
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/RemoteWindows/NeedGreed.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.RemoteWindows
2 | {
3 | public class NeedGreed: RemoteWindow
4 | {
5 | private const string WindowName = "NeedGreed";
6 |
7 | public NeedGreed() : base(WindowName)
8 | {
9 | _name = WindowName;
10 | }
11 |
12 | public int NumberOfItems => ___Elements()[3].TrimmedData;
13 |
14 | public uint[] ItemIds
15 | {
16 | get
17 | {
18 | uint[] result = new uint[NumberOfItems];
19 | int j = 0;
20 | for (int i = 7; i < NumberOfItems; i+=7)
21 | {
22 | result[j] = (uint) ___Elements()[i].TrimmedData;
23 | j++;
24 | }
25 |
26 | return result;
27 | }
28 | }
29 |
30 | public void ClickItem(int index)
31 | {
32 | if (IsOpen && index < NumberOfItems)
33 | SendAction(2,3,0,4,(ulong) index);
34 | }
35 |
36 | public void PassItem(int index)
37 | {
38 | if (IsOpen && index < NumberOfItems)
39 | {
40 | ClickItem(index);
41 | SendAction(4,3,2,4,0,4,ItemIds[index],3,1);
42 | }
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/RemoteWindows/RecommendEquip.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.RemoteWindows
2 | {
3 | public class RecommendEquip: RemoteWindow
4 | {
5 |
6 | private const string WindowName = "RecommendEquip";
7 |
8 | public RecommendEquip() : base(WindowName)
9 | {
10 | _name = WindowName;
11 | }
12 |
13 | public void Confirm()
14 | {
15 | SendAction(1,3,0);
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/RemoteWindows/RetainerTaskList.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.RemoteWindows
2 | {
3 | public class RetainerTaskList : RemoteWindow
4 | {
5 | private const string WindowName = "RetainerTaskList";
6 |
7 | public RetainerTaskList() : base(WindowName)
8 | {
9 | _name = WindowName;
10 | }
11 |
12 | public void SelectVenture(int taskId)
13 | {
14 | SendAction(2, 3, 0x0B, 03, (ulong) taskId);
15 | }
16 |
17 | }
18 | }
--------------------------------------------------------------------------------
/RemoteWindows/SalvageAutoDialog.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.RemoteWindows
2 | {
3 | public class SalvageAutoDialog: RemoteWindow
4 | {
5 | private const string WindowName = "SalvageAutoDialog";
6 |
7 | public SalvageAutoDialog() : base(WindowName)
8 | {
9 | _name = WindowName;
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/RemoteWindows/SatisfactionSupply.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.RemoteWindows
2 | {
3 | public class SatisfactionSupply : RemoteWindow
4 | {
5 | private const string WindowName = "SatisfactionSupply";
6 |
7 | public SatisfactionSupply() : base(WindowName)
8 | {
9 | _name = WindowName;
10 | }
11 |
12 | public void ClickItem(int index)
13 | {
14 | SendAction(2,3,1,3,(ulong) index);
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/RemoteWindows/SatisfactionSupplyResult.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.RemoteWindows
2 | {
3 | public class SatisfactionSupplyResult: RemoteWindow
4 | {
5 | private const string WindowName = "SatisfactionSupplyResult";
6 |
7 | public SatisfactionSupplyResult() : base(WindowName)
8 | {
9 | _name = WindowName;
10 | }
11 |
12 | public void Confirm()
13 | {
14 | SendAction(1,3,1);
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/RetainerItemFinder/IStoredInventory.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace LlamaLibrary.RetainerItemFinder
4 | {
5 | public interface IStoredInventory
6 | {
7 | Dictionary Inventory { get; }
8 |
9 | Dictionary SlotCount { get; }
10 |
11 | int FreeSlots { get; }
12 | }
13 | }
--------------------------------------------------------------------------------
/RetainerItemFinder/ItemFinderPtrNode.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace LlamaLibrary.RetainerItemFinder
5 | {
6 | [StructLayout(LayoutKind.Explicit, Size = 0x40)]
7 | public struct ItemFinderPtrNode
8 | {
9 | [FieldOffset(0x0)]
10 | public readonly IntPtr Left;
11 |
12 | [FieldOffset(0x8)]
13 | public readonly IntPtr Parent;
14 |
15 | [FieldOffset(0x10)]
16 | public readonly IntPtr Right;
17 |
18 | [FieldOffset(0x19)]
19 | public readonly byte FilledStatus;
20 |
21 | [FieldOffset(0x20)]
22 | public readonly ulong RetainerId;
23 |
24 | [FieldOffset(0x28)]
25 | public readonly IntPtr RetainerInventory;
26 |
27 | public bool Filled => FilledStatus == 0;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/RetainerItemFinder/StoredRetainerInventory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using ff14bot;
5 |
6 | namespace LlamaLibrary.RetainerItemFinder
7 | {
8 | public class StoredRetainerInventory : IStoredInventory
9 | {
10 | public Dictionary Inventory { get; } = new Dictionary();
11 |
12 | public Dictionary SlotCount { get; } = new Dictionary();
13 |
14 | public int FreeSlots { get; }
15 |
16 | public List EquippedItems;
17 |
18 | public StoredRetainerInventory(IntPtr pointer)
19 | {
20 | IntPtr position = pointer;
21 | EquippedItems = new List(Core.Memory.ReadArray(position, 14).Where(i => i != 0));
22 | position = position + (14 * sizeof(uint));
23 | var itemIds = Core.Memory.ReadArray(position, 175);
24 | position = position + (175 * sizeof(uint));
25 | var qtys = Core.Memory.ReadArray(position, 175);
26 | position = position + (175 * sizeof(ushort));
27 | var crystalQtys = Core.Memory.ReadArray(position, 18);
28 |
29 | for (int i = 0; i < 18; i++)
30 | {
31 | if (crystalQtys[i] == 0)
32 | {
33 | continue;
34 | }
35 |
36 | Inventory.Add((uint)(i + 2), crystalQtys[i]);
37 | SlotCount.Add((uint)(i + 2), 1);
38 | }
39 |
40 | for (int i = 0; i < 175; i++)
41 | {
42 | if (itemIds[i] == 0)
43 | {
44 | FreeSlots++;
45 | continue;
46 | }
47 |
48 | if (Inventory.ContainsKey(itemIds[i]))
49 | {
50 | Inventory[itemIds[i]] += qtys[i];
51 | SlotCount[itemIds[i]]++;
52 | }
53 | else
54 | {
55 | Inventory.Add(itemIds[i], qtys[i]);
56 | SlotCount.Add(itemIds[i], 1);
57 | }
58 | }
59 | }
60 | }
61 | }
--------------------------------------------------------------------------------
/RetainerItemFinder/StoredSaddlebagInventory.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace LlamaLibrary.RetainerItemFinder
4 | {
5 | public class StoredSaddleBagInventory : IStoredInventory
6 | {
7 | public Dictionary Inventory { get; } = new Dictionary();
8 |
9 | public Dictionary SlotCount { get; } = new Dictionary();
10 |
11 | public int FreeSlots { get; }
12 |
13 | public StoredSaddleBagInventory(uint[] itemIds, ushort[] itemQuantities)
14 | {
15 | // Assumes a non-expanded saddlebag, but who has expanded saddlebags...?
16 | for (var i = 0; i < 70; i++)
17 | {
18 | if (itemIds[i] == 0)
19 | {
20 | FreeSlots++;
21 | continue;
22 | }
23 |
24 | if (Inventory.ContainsKey(itemIds[i]))
25 | {
26 | Inventory[itemIds[i]] += itemQuantities[i];
27 | SlotCount[itemIds[i]]++;
28 | }
29 | else
30 | {
31 | Inventory.Add(itemIds[i], itemQuantities[i]);
32 | SlotCount.Add(itemIds[i], 1);
33 | }
34 | }
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Retainers/CompleteRetainer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using ff14bot.Managers;
5 | using LlamaLibrary.Structs;
6 |
7 | namespace LlamaLibrary.Retainers
8 | {
9 | public class CompleteRetainer
10 | {
11 | public RetainerInfo Info;
12 |
13 | public int MBCount => ItemsForSale.Count;
14 | public List ItemsForSale;
15 | public List Inventory;
16 | public int Index;
17 | public int FreeSlots => 175 - Inventory.Count;
18 | public int FreeSlotsMB => 20 - ItemsForSale.Count;
19 |
20 | public DateTime MBUpdated => DateTimeOffset.FromUnixTimeSeconds(Info.MBTimeOutTimestamp).LocalDateTime;
21 | public DateTime VentureEnd => DateTimeOffset.FromUnixTimeSeconds(Info.VentureEndTimestamp).LocalDateTime;
22 |
23 | public CompleteRetainer(RetainerInfo info, int index, List itemsForSale, List inventory)
24 | {
25 | Info = info;
26 | ItemsForSale = itemsForSale.Select(x => new RetainerInventoryItem(x.TrueItemId, x.RawItemId, x.Count, x.Slot)).ToList();
27 | Inventory = inventory.Select(x => new RetainerInventoryItem(x.TrueItemId, x.RawItemId, x.Count, x.Slot)).ToList();
28 | Index = index;
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/Retainers/RetainerInventory.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using ff14bot.Helpers;
3 | using ff14bot.Managers;
4 |
5 | namespace LlamaLibrary.Retainers
6 | {
7 | internal class RetainerInventory
8 | {
9 | private IDictionary dict = new Dictionary();
10 |
11 | public void AddItem(BagSlot slot)
12 | {
13 | if (HasItem(slot.TrueItemId))
14 | {
15 | Logging.Write(
16 | $"ERROR: Trying to add item twice \t Name: {slot.Item.CurrentLocaleName} Count: {slot.Count} BagId: {slot.BagId} IsHQ: {slot.Item.IsHighQuality}");
17 | return;
18 | }
19 |
20 | dict.Add(slot.TrueItemId, slot);
21 | }
22 |
23 | public BagSlot GetItem(uint trueItemId)
24 | {
25 | return dict.TryGetValue(trueItemId, out var returnBagSlot) ? returnBagSlot : null;
26 | }
27 |
28 | public bool HasItem(uint trueItemId)
29 | {
30 | return dict.ContainsKey(trueItemId);
31 | }
32 |
33 | public void PrintList()
34 | {
35 | foreach (var slot in dict)
36 | {
37 | var item = slot.Value;
38 | Logging.Write($"Name: {item.Item.CurrentLocaleName} Count: {item.Count} RawId: {item.RawItemId} IsHQ: {item.Item.IsHighQuality} TrueID: {item.TrueItemId}");
39 | }
40 | }
41 |
42 | }
43 | }
--------------------------------------------------------------------------------
/Retainers/RetainerInventoryItem.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.Retainers
2 | {
3 | public class RetainerInventoryItem
4 | {
5 | public uint TrueItemID;
6 | public uint RawItemID;
7 | public uint Count;
8 | public int Slot;
9 | public bool HQ => TrueItemID != RawItemID;
10 |
11 |
12 | public RetainerInventoryItem(uint trueItemId, uint rawItemId, uint count, int slot)
13 | {
14 | TrueItemID = trueItemId;
15 | RawItemID = rawItemId;
16 | Count = count;
17 | Slot = slot;
18 | }
19 |
20 | protected bool Equals(RetainerInventoryItem other)
21 | {
22 | return TrueItemID == other.TrueItemID && Count == other.Count && Slot == other.Slot;
23 | }
24 |
25 | public override bool Equals(object obj)
26 | {
27 | if (ReferenceEquals(null, obj))
28 | {
29 | return false;
30 | }
31 |
32 | if (ReferenceEquals(this, obj))
33 | {
34 | return true;
35 | }
36 |
37 | if (obj.GetType() != this.GetType())
38 | {
39 | return false;
40 | }
41 |
42 | return Equals((RetainerInventoryItem) obj);
43 | }
44 |
45 | public override int GetHashCode()
46 | {
47 | unchecked
48 | {
49 | var hashCode = (int) TrueItemID;
50 | hashCode = (hashCode * 397) ^ (int) Count;
51 | hashCode = (hashCode * 397) ^ Slot;
52 | return hashCode;
53 | }
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/Retainers/RetainerTaskData.cs:
--------------------------------------------------------------------------------
1 | using ff14bot.Managers;
2 | using Newtonsoft.Json;
3 |
4 | namespace LlamaLibrary.Retainers
5 | {
6 | public class RetainerTaskData
7 | {
8 | public int Id { get; set; }
9 | public byte ClassJobCategory { get; set; }
10 | public bool IsRandom { get; set; }
11 | public int RetainerLevel { get; set; }
12 | public int VentureCost { get; set; }
13 | public int MaxTime { get; set; }
14 | public int Experience { get; set; }
15 | public int RequiredItemLevel { get; set; }
16 | public int RequiredGathering { get; set; }
17 | public string NameRaw { get; set; }
18 | public int ItemId { get; set; }
19 |
20 | [JsonIgnore]
21 | public string Name
22 | {
23 | get
24 | {
25 | if (IsRandom)
26 | return NameRaw;
27 | else
28 | return DataManager.GetItem((uint)ItemId).CurrentLocaleName;
29 | }
30 |
31 | }
32 |
33 | [JsonConstructor]
34 | public RetainerTaskData(int id, byte classJobCategory, bool isRandom, int retainerLevel, int ventureCost, int maxTime, int experience, int requiredItemLevel, int requiredGathering, string nameRaw, int itemId)
35 | {
36 | Id = id;
37 | ClassJobCategory = classJobCategory;
38 | IsRandom = isRandom;
39 | RetainerLevel = retainerLevel;
40 | VentureCost = ventureCost;
41 | MaxTime = maxTime;
42 | Experience = experience;
43 | RequiredItemLevel = requiredItemLevel;
44 | RequiredGathering = requiredGathering;
45 | NameRaw = nameRaw;
46 | ItemId = itemId;
47 | }
48 |
49 | public override string ToString()
50 | {
51 | return $"{Id} - {IsRandom} {NameRaw}";
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/Retainers/RetainersSettingsForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 |
4 |
5 | namespace LlamaLibrary.Retainers
6 | {
7 | public partial class SettingsForm : Form
8 | {
9 | public SettingsForm()
10 | {
11 | InitializeComponent();
12 | }
13 |
14 | private void SettingsForm_Load(object sender, EventArgs e)
15 | {
16 | propertyGrid1.SelectedObject = RetainerSettings.Instance;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Retainers/RetainersSettingsForm.designer.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.Retainers
2 | {
3 | partial class SettingsForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
32 | this.SuspendLayout();
33 | //
34 | // propertyGrid1
35 | //
36 | this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
37 | this.propertyGrid1.Location = new System.Drawing.Point(0, 0);
38 | this.propertyGrid1.Name = "propertyGrid1";
39 | this.propertyGrid1.Size = new System.Drawing.Size(352, 338);
40 | this.propertyGrid1.TabIndex = 0;
41 | //
42 | // SettingsForm
43 | //
44 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
45 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
46 | this.ClientSize = new System.Drawing.Size(352, 338);
47 | this.Controls.Add(this.propertyGrid1);
48 | this.Name = "SettingsForm";
49 | this.Text = "SettingsForm";
50 | this.Load += new System.EventHandler(this.SettingsForm_Load);
51 | this.ResumeLayout(false);
52 | }
53 |
54 | private System.Windows.Forms.PropertyGrid propertyGrid1;
55 |
56 | #endregion
57 | }
58 | }
--------------------------------------------------------------------------------
/Structs/AetherWheelSlot.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 | using ff14bot.Managers;
3 |
4 | namespace LlamaLibrary.Structs
5 | {
6 | [StructLayout(LayoutKind.Explicit, Size = 0xC0)]
7 | public struct AetherWheelSlot
8 | {
9 | [FieldOffset(0x0)]
10 | public ushort Grade;
11 |
12 | [FieldOffset(0x2)]
13 | public byte InUse;
14 |
15 | [FieldOffset(0x6)]
16 | public int MinutesLeft;
17 |
18 | [FieldOffset(0x8E)]
19 | public uint ItemId;
20 |
21 | [FieldOffset(0xA6)]
22 | public uint StartingItemId;
23 |
24 | [FieldOffset(0xAA)]
25 | public uint TotalMinutes;
26 |
27 | [FieldOffset(0xAE)]
28 | public uint ResultingItemId;
29 |
30 | [FieldOffset(0xB2)]
31 | public bool Primed;
32 |
33 | [FieldOffset(0xB6)]
34 | public byte SlotIndex;
35 |
36 | public Item Item => DataManager.GetItem(ItemId);
37 |
38 | public override string ToString()
39 | {
40 | return $"{nameof(Grade)}: {Grade}, {nameof(InUse)}: {InUse}, {nameof(MinutesLeft)}: {MinutesLeft}, {nameof(ItemId)}: {ItemId}, {nameof(StartingItemId)}: {StartingItemId}, {nameof(TotalMinutes)}: {TotalMinutes}, {nameof(ResultingItemId)}: {ResultingItemId}, {nameof(Primed)}: {Primed}, {nameof(SlotIndex)}: {SlotIndex}, {nameof(Item)}: {Item}";
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/Structs/CraftingRelicTurnin.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.Structs
2 | {
3 | public class CraftingRelicTurnin
4 | {
5 | public uint ItemID;
6 | public int Job;
7 | public int Position;
8 | public int MinCollectability;
9 | public uint RewardItem;
10 |
11 | public CraftingRelicTurnin(uint itemId, int job, int position, int minCollectability, uint rewardItem)
12 | {
13 | ItemID = itemId;
14 | Job = job;
15 | Position = position;
16 | MinCollectability = minCollectability;
17 | RewardItem = rewardItem;
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/Structs/CraftingStatus.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 |
3 | namespace LlamaLibrary.Structs
4 | {
5 | [StructLayout(LayoutKind.Explicit, Size = 0x44)]
6 | public struct CraftingStatus
7 | {
8 | [FieldOffset(0x0)]
9 | public readonly uint Stage;
10 |
11 | [FieldOffset(0x10)]
12 | public readonly uint LastAction;
13 |
14 | [FieldOffset(0x18)]
15 | public readonly uint Step;
16 |
17 | [FieldOffset(0x1C)]
18 | public readonly uint Progress;
19 |
20 | [FieldOffset(0x24)]
21 | public readonly uint Quality;
22 |
23 | [FieldOffset(0x2C)]
24 | public readonly uint HQ;
25 |
26 | [FieldOffset(0x30)]
27 | public readonly uint Durability;
28 |
29 | [FieldOffset(0x38)]
30 | public readonly uint ConditionValue;
31 |
32 | [FieldOffset(0x40)]
33 | public readonly byte Unkown;
34 |
35 | [FieldOffset(0x43)]
36 | public readonly byte CraftingAction;
37 |
38 | // public CraftingCondition Condition => (CraftingCondition) ConditionValue;
39 | }
40 | }
--------------------------------------------------------------------------------
/Structs/FCWorkshopItem.cs:
--------------------------------------------------------------------------------
1 | using ff14bot.Managers;
2 |
3 | namespace LlamaLibrary.Structs
4 | {
5 | public struct FCWorkshopItem
6 | {
7 | public int ItemId;
8 | public int Qty;
9 | public int TurnInsRequired;
10 |
11 | public FCWorkshopItem(int itemId, int qty, int turnInsRequired)
12 | {
13 | ItemId = itemId;
14 | Qty = qty;
15 | TurnInsRequired = turnInsRequired;
16 | }
17 |
18 | public override string ToString()
19 | {
20 | return $"{DataManager.GetItem((uint) ItemId).CurrentLocaleName} x {(Qty * TurnInsRequired)}";
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/Structs/FcActionShopItem.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.Structs
2 | {
3 | public class FcActionShopItem
4 | {
5 | public int ActionId;
6 | public int Rank;
7 | public int Cost;
8 | public int ShopIndex;
9 | public string Name;
10 |
11 | public FcActionShopItem(int actionId, int rank, int cost, int shopIndex, string name)
12 | {
13 | ActionId = actionId;
14 | Rank = rank;
15 | Cost = cost;
16 | ShopIndex = shopIndex;
17 | Name = name;
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/Structs/GCShopItem.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 | using ff14bot.Managers;
3 |
4 | namespace LlamaLibrary.Structs
5 | {
6 |
7 | [StructLayout(LayoutKind.Explicit, Size = 0x130)]
8 | public struct GCShopItem
9 | {
10 | [FieldOffset(0)]
11 | public uint ItemID;
12 |
13 | [FieldOffset(8)]
14 | public uint Cost;
15 |
16 | [FieldOffset(0x10)]
17 | public uint Index;
18 |
19 | [FieldOffset(0x18)]
20 | public uint InBag;
21 |
22 | // [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x44)]
23 | // [FieldOffset(0x4C)]
24 | // public byte Name;
25 |
26 | public Item Item => DataManager.GetItem(ItemID);
27 |
28 | public override string ToString()
29 | {
30 | return $"{ItemID} - {Cost} - {Index} - {InBag}";
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/Structs/GCTurninItem.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 |
3 | namespace LlamaLibrary.Structs
4 | {
5 | [StructLayout(LayoutKind.Explicit, Size = 0xA8)]
6 | public struct GCTurninItem
7 | {
8 | [FieldOffset(0)]
9 | public uint ItemID;
10 |
11 | [FieldOffset(4)]
12 | public uint XP;
13 |
14 | [FieldOffset(8)]
15 | public uint _Seals;
16 |
17 | [FieldOffset(0x1a)]
18 | public byte ReqCount;
19 |
20 | [FieldOffset(0x1b)]
21 | public byte leftToHandIn;
22 |
23 | [FieldOffset(0x1C)]
24 | public byte JobClass;
25 |
26 | [FieldOffset(0x18)]
27 | private byte starred;
28 |
29 | public bool Starred => starred == 1;
30 |
31 | public uint Seals
32 | {
33 | get
34 | {
35 | if (Starred) return (_Seals * 2);
36 | return _Seals;
37 | }
38 | }
39 |
40 | public bool CanHandin => leftToHandIn > 0;
41 | }
42 | }
--------------------------------------------------------------------------------
/Structs/GatheringNodeData.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using Clio.Utilities;
4 | using ff14bot.Enums;
5 | using ff14bot.Managers;
6 |
7 | namespace LlamaLibrary.Structs
8 | {
9 | public class GatheringNodeData
10 | {
11 | public uint NodeID;
12 | public byte Type;
13 | public int Level;
14 | public KeyValuePair[] TimeSlots;
15 | public uint[] ItemIds;
16 | public ushort ZoneId;
17 | public Vector3[] Locations;
18 |
19 | public GatheringNodeData()
20 | {
21 | }
22 |
23 | public override string ToString()
24 | {
25 | List times = TimeSlots.Select(slot => $"{slot.Key:D2}:00-{slot.Value:D2}:00").ToList();
26 | return $"{NodeID} ({(GatheringType)Type}) {string.Join(" , ", ItemIds.Select(i=> DataManager.GetItem(i).CurrentLocaleName))} \n{string.Join("\n", times)}\n{DataManager.ZoneNameResults[ZoneId].CurrentLocaleName}\n\t{string.Join("\n\t",Locations)}";
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/Structs/HousingPlot.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.Structs
2 | {
3 | public struct HousingPlot
4 | {
5 |
6 | }
7 | }
--------------------------------------------------------------------------------
/Structs/ItemStored.cs:
--------------------------------------------------------------------------------
1 | namespace LlamaLibrary.Structs
2 | {
3 | public struct ItemStored
4 | {
5 | public uint ItemId;
6 | public bool IsHq;
7 | public uint Count;
8 | public uint Ilvl;
9 | public string ItemUICategory;
10 | public string Name;
11 |
12 | public ItemStored(uint itemId, bool isHq, uint count, uint ilvl, string itemUiCategory, string name)
13 | {
14 | ItemId = itemId;
15 | IsHq = isHq;
16 | Count = count;
17 | ItemUICategory = itemUiCategory;
18 | Name = name;
19 | Ilvl = ilvl;
20 | }
21 |
22 | public override string ToString()
23 | {
24 | return $"{ItemId},{IsHq},{Count},{Ilvl},{ItemUICategory},{Name}";
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/Structs/LisbethOrder.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace Generate
3 | {
4 | public class LisbethOrder
5 | {
6 | public int Id;
7 | public int Group;
8 | public int Item;
9 | public int Amount;
10 | public bool Enabled = true;
11 | public string Type;
12 |
13 | public bool Hq = false;
14 | public LisbethOrder(int id, int group, int item, int amount, string type)
15 | {
16 | Id = id;
17 | Group = group;
18 | Item = item;
19 | Amount = amount;
20 | Type = type;
21 | }
22 |
23 | public LisbethOrder(int id, int group, int item, int amount, string type, bool hq)
24 | {
25 | Id = id;
26 | Group = group;
27 | Item = item;
28 | Amount = amount;
29 | Type = type;
30 | Hq = hq;
31 | }
32 |
33 | public override string ToString()
34 | {
35 | return $"{Id}, {Group}, {Item}, {Amount}, {Enabled}, {Type}";
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/Structs/RequestItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 | using ff14bot.Managers;
4 |
5 | namespace LlamaLibrary.Structs
6 | {
7 | [StructLayout(LayoutKind.Sequential, Size = 0x90)]
8 | public unsafe struct RequestItem
9 | {
10 | public readonly uint ItemId;
11 | public readonly uint Count;
12 | //[FieldOffset(0x8)]
13 | public readonly uint IconID;
14 | //[FieldOffset(0xC)]
15 | private readonly uint unk1;
16 | //[FieldOffset(0x10)]
17 | public IntPtr ptr;
18 | //[FieldOffset(0x18)]
19 | private readonly uint unk2;
20 | private readonly uint unk3;
21 | private readonly uint unk4;
22 | private readonly uint unk5;
23 | private readonly uint unk6;
24 | private readonly uint unk7;
25 | private readonly uint unk8;
26 | private readonly uint unk9;
27 | private readonly uint unk10;
28 | private readonly uint unk11;
29 |
30 | [MarshalAs (UnmanagedType.ByValArray, SizeConst=0x38)]
31 | private readonly char[] _name;
32 | //[FieldOffset(0x78)]
33 | public readonly byte _HQ;
34 | //[FieldOffset(0x7A)]
35 | [MarshalAs (UnmanagedType.ByValArray, SizeConst=5)]
36 | public readonly ushort[] MateriaRow;
37 | //[FieldOffset(0x84)]
38 | [MarshalAs (UnmanagedType.ByValArray, SizeConst=5)]
39 | public readonly byte[] MateriaColumn;
40 | //[FieldOffset(0x89)]
41 | private readonly byte unkByte1;
42 | //[FieldOffset(0x8A)]
43 | private readonly ushort unkUshort;
44 | //[FieldOffset(0x8C)]
45 | private readonly byte _collectable;
46 | //[FieldOffset(0x8D)]
47 | public readonly byte Stackable;
48 | //[FieldOffset(0x8E)]
49 | private readonly byte unkByte4;
50 | //[FieldOffset(0x8F)]
51 | private readonly byte unkByte6;
52 |
53 | public string Name => DataManager.GetItem(ItemId).CurrentLocaleName;
54 |
55 | public bool HQ => (_HQ > 0);
56 | public bool Collectable => (_HQ > 0);
57 | }
58 | }
--------------------------------------------------------------------------------
/Structs/RetainerInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 | using Clio.Utilities;
4 | using ff14bot.Enums;
5 | using LlamaLibrary.PersonalTester;
6 |
7 | namespace LlamaLibrary.Structs
8 | {
9 | [StructLayout(LayoutKind.Sequential, Size = 0x48)]
10 | public struct RetainerInfo
11 | {
12 | //0x0
13 | public ulong Unique;
14 |
15 | //0x8
16 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x20)]
17 | public byte[] name_bytes;
18 |
19 | //0x28
20 | public byte enabled;
21 |
22 | //0x29
23 | public ClassJobType Job;
24 |
25 | //0x2A
26 | public byte Level;
27 |
28 | //0x2B
29 | public byte FilledInventorySlots;
30 |
31 | //0x2C
32 | public int Gil;
33 |
34 | //0x30
35 | public RetainerCity MarketZone;
36 |
37 | //0x31
38 | public byte NumberOfMbItems;
39 |
40 | //0x32
41 | private byte Unknown1;
42 |
43 | //0x33
44 | private byte Unknown2;
45 |
46 | //0x34
47 | public int MBTimeOutTimestamp;
48 |
49 | //0x38
50 | public int VentureTask;
51 |
52 | //0x3C
53 | public int VentureEndTimestamp;
54 |
55 | //0x40
56 | private int Unknown3;
57 |
58 | //0x44
59 | private int Unknown4;
60 |
61 | public bool Active => enabled == 1;
62 |
63 | public string Name => name_bytes.ToUTF8String();
64 |
65 | public string DisplayName => Name;
66 |
67 | public override string ToString()
68 | {
69 | return $"{Name} ({(enabled == 1 ? "enabled" : "disabled")}) - {Job} ({Level}) Gil: {Gil} Selling: {NumberOfMbItems} Venture: {VentureTask} VentureEnd: {UnixTimeStampToDateTime(VentureEndTimestamp)} {Unique}";
70 | }
71 |
72 | public static DateTime UnixTimeStampToDateTime( double unixTimeStamp )
73 | {
74 | // Unix timestamp is seconds past epoch
75 | DateTime dtDateTime = new DateTime(1970,1,1,0,0,0,0,DateTimeKind.Utc);
76 | dtDateTime = dtDateTime.AddSeconds( unixTimeStamp ).ToLocalTime();
77 | return dtDateTime;
78 | }
79 | }
80 | }
--------------------------------------------------------------------------------
/Structs/SharedFateProgress.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 | using ff14bot;
4 |
5 | namespace LlamaLibrary.Structs
6 | {
7 | [StructLayout(LayoutKind.Explicit, Size = 0x80)]
8 | public struct SharedFateProgress
9 | {
10 | [FieldOffset(0x0)]
11 | public IntPtr ZonePtr;
12 |
13 | [FieldOffset(0x8)]
14 | public IntPtr ZoneNamePtr;
15 |
16 | [FieldOffset(0x70)]
17 | public int Rank;
18 |
19 | [FieldOffset(0x74)]
20 | public int CurrentFateAmount;
21 |
22 | [FieldOffset(0x78)]
23 | public int FatesNeeded;
24 |
25 | [FieldOffset(0x7C)]
26 | public int DisplayOrder;
27 |
28 | public uint Zone => Core.Memory.Read(ZonePtr);
29 |
30 | public string ZoneName => Core.Memory.ReadStringUTF8(ZoneNamePtr);
31 |
32 | public override string ToString()
33 | {
34 | return $"Rank: {Rank}, CurrentFateAmount: {CurrentFateAmount}, FatesNeeded: {FatesNeeded}, Zone: {Zone}, ZoneName: {ZoneName}";
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/maps.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using ff14bot;
5 | using ff14bot.Enums;
6 | using ff14bot.Managers;
7 | using LlamaLibrary.Memory.Attributes;
8 |
9 | namespace LlamaLibrary
10 | {
11 | public static class TreasureMap
12 | {
13 | internal static class Offsets
14 | {
15 | ///
16 | /// Pointer to where the game stores the map subkey
17 | ///
18 | [Offset("Search 48 8d 0d ?? ?? ?? ?? e8 ?? ?? ?? ?? 48 8d 0d ?? ?? ?? ?? 0f b7 d8 e8 ?? ?? ?? ?? Add 3 TraceRelative")]
19 | internal static IntPtr CurrentMap;
20 | }
21 |
22 | ///
23 | /// Provides a KeyItem => TreasureHuntRank lookup because the client does the same thing.
24 | ///
25 | public static readonly Dictionary MapPrimary = new Dictionary
26 | {
27 | //KeyEventItemName
28 | {2001087, 1},
29 | {2001088, 2},
30 | {2001089, 3},
31 | {2001090, 4},
32 | {2001091, 5},
33 | {2001223, 6},
34 | {2001352, 7},
35 | {2001551, 8},
36 | {2001762, 9},
37 | {2001763, 10},
38 | {2001764, 11},
39 | {2002209, 12},
40 | {2002210, 13},
41 | {2002386, 14},
42 | {2002503, 16},
43 | {2002663, 17},
44 | {2002664, 18},
45 |
46 | //InstanceMap
47 | {2001977, 11},
48 | {2002236, 13},
49 | {2002260, 14},
50 | {2002504, 16},
51 | {2002665, 18},
52 | };
53 |
54 | static TreasureMap()
55 | {
56 | }
57 |
58 | public static short PrimaryKey
59 | {
60 | get
61 | {
62 | var items = InventoryManager.GetBagByInventoryBagId(InventoryBagId.KeyItems).FilledSlots
63 | .FirstOrDefault(i => MapPrimary.ContainsKey(i.RawItemId));
64 | if (items != null)
65 | {
66 | return MapPrimary[items.RawItemId];
67 | }
68 |
69 | return 0;
70 | }
71 | }
72 |
73 | public static short SecondaryKey => Core.Memory.Read(Offsets.CurrentMap);
74 |
75 | }
76 | }
77 |
--------------------------------------------------------------------------------