-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTripleTriadChallengeLog.lua
More file actions
98 lines (84 loc) · 3.45 KB
/
TripleTriadChallengeLog.lua
File metadata and controls
98 lines (84 loc) · 3.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
--[[
********************************************************************************
* Triple Triad Challenge Script: Version x1.6.0 *
********************************************************************************
- Is it safe to use the script?
- Nothing safe when you use automation. It has risk.
Description: Enters the Battle Hall duty for the weekly
challenge log that gives MGP. You must have the Saucy Plugin
installed and have "Enable Triad Module" enabled, recommendations are to have
Open Saucy When Challenging an NPC checked as well as Automatically choose your
deck with the best win chance. You must manually set Play X Amount of Times.
********************************************************************************
* Required Plugins *
********************************************************************************
Plugins that are needed for it to work:
-> Something Need Doing [Expanded Edition]: Main Plugin for everything to work
-> Saucy (To actually do Triple Triad)
-> Pandora (for /pcall - cuz /callback risks breaking)
-> TextAdvance (because cutscenes are looooong)
********************************************************************************
* Configuration *
********************************************************************************
]]
import("System.Numerics")
function WalkTo(valuex, valuey, valuez, stopdistance)
MeshCheck()
local dest = Vector3(valuex, valuey, valuez)
IPC.vnavmesh.PathfindAndMoveTo(dest, false)
while ((IPC.vnavmesh.IsRunning() or IPC.vnavmesh.PathfindInProgress()) and Vector3.Distance(Entity.Player.Position, dest) > stopdistance) do
yield("/wait 0.3")
end
IPC.vnavmesh.Stop()
Dalamud.Log("[WalkTo] Completed")
end
function MeshCheck()
local was_ready = IPC.vnavmesh.IsReady()
if not IPC.vnavmesh.IsReady() then
while not IPC.vnavmesh.IsReady() do
Dalamud.Log("[Debug]Building navmesh, currently at " .. Truncate1Dp(IPC.vnavmesh.BuildProgress() * 100) .. "%")
yield("/wait 1")
local was_ready = IPC.vnavmesh.IsReady()
if was_ready then
Dalamud.Log("[Debug]Navmesh ready!")
end
end
else
Dalamud.Log("[Debug]Navmesh ready!")
end
end
zone = Svc.ClientState.TerritoryType
if zone ~= 579 then
Instances.DutyFinder.IsUnrestrictedParty = true
Instances.DutyFinder.IsLevelSync = true
Instances.DutyFinder:QueueDuty(195)
yield("/waitaddon ContentsFinderConfirm")
if Addons.GetAddon("ContentsFinderConfirm").Ready then yield("/click ContentsFinderConfirm Commence") end
repeat
zone = Svc.ClientState.TerritoryType
yield("/wait 1")
until zone == 579
end
WalkTo(-8.03, -0.98, -7.18,1)
repeat
yield("/target Wyra")
yield("/wait 0.5")
until Entity.Target.Name == "Wyra “Greenhands” Lyehga"
repeat
yield("/interact")
yield("/wait 0.5")
until Addons.GetAddon("SelectIconString").Ready
yield("/saucy tt play 15")
yield("/saucy tt go")
yield("/pcall SelectIconString true 0")
yield("/wait 0.5")
yield("/click Talk Click")
yield("/waitaddon TripleTriadRequest")
repeat
yield("/wait 1")
until not Player.IsBusy
yield("/dutyfinder")
yield("/waitaddon ContentsFinderMenu")
yield("/callback ContentsFinderMenu true 0")
yield("/waitaddon SelectYesno")
yield("/callback SelectYesno true 0")