Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaksuhn committed Jul 7, 2024
2 parents 8c9fa59 + fae02df commit f94b5e3
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ gachi_jumpy = 0 --0=no jump, 1=yes jump. jump or not. sometimes navmesh goes
auto_eqweep = 0 --0=no, 1=yes + job change. Basically this will check to see if your on a DOH or DOL, if you are then it will scan your DOW/DOM and switch you to the highest level one you have, auto equip and save gearset. niche feature i like for myself . off by default
config_sell = 0 --0=dont do anything,1=change char setting to not give dialog for non tradeables etc selling to npc, 2=reset setting back to yes check for non tradeables etc selling to npc. usecase for 1 and 2 are one time things for a cleaning run so that they can subsequently handle selling or not selling. this feature will be stripped out once limiana updaptes AR
nnl = 1 --leave the novicenetwork
movementtype = 0 --0 = vnavmesh, 1 = visland. many things wont work with visland mode. its there as emergency for cleaning only.
----------------------
--Refueling Configs --
----------------------
Expand Down Expand Up @@ -208,10 +209,10 @@ function Final_GC_Cleaning()
yield("/wait 3")
GCrenk = GetFlamesGCRank()
if GetMaelstromGCRank() > GCrenk then
GC renk = GetMaelstromGCRank()
GCrenk = GetMaelstromGCRank()
end
if GetAddersGCRank() > GCrenk then
GC renk = GetAddersGCRank()
GCrenk = GetAddersGCRank()
end
if GCrenk < 4 then --we can go up to 4 safely if we are below it. if you put in the effort to finish GC log 1, go pop rank 5 :~D
--try to promote
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ function generateFiveDigitText(frocess_tags)
end

function WalkTo(x, y, z)
PathfindAndMoveTo(x, y, z, false)
PathfindAndMoveTo(x, y, z, false)
countee = 0
while (PathIsRunning() or PathfindInProgress()) do
yield("/wait 0.5")
while (PathIsRunning() or PathfindInProgress()) do
yield("/wait 0.5")
--if GetZoneID() == 130 or GetZoneID() == 341 then --130 is uldah. dont need to jump anymore it paths properly. we will test anyways.
countee = countee + 1
if gachi_jumpy == 1 and countee == 10 and GetZoneID() ~= 129 then --we only doing jumps if we configured for it
--if GetZoneID() == 341 then --only need to jump in goblet for now
yield("/gaction jump")
countee = 0
yield("/echo we are still pathfinding apparently")
yield("/echo we are still pathfinding apparently")
end
end
end
end

function ZoneTransition()
Expand Down Expand Up @@ -74,16 +74,38 @@ function ZoneTransition()
end

function WalkToGC()
if GetPlayerGC() == 1 then
if GetPlayerGC() == 1 then --toilet
if GetZoneID() ~= 128 then
yield("/li The Aftcastle")
ZoneTransition()
if movementtype == 1 then --visland hackery
yield("/visland exectemponce H4sIAAAAAAAACu2Wy07DMBBF/2XWkRU/Y2eHClQVaikFqTzEwlBXtZTEpXFAqOq/44ZE9LFDWSYrz53J6PrIGnsLE50bSGE4yGxeaohguHHVOigTV5gQzvX32tnCl5C+bGHqSuutKyDdwiOkWCEuZcIieIKUxSiO4BnShKCEYUV3IQpNRpeQhsRML2wVutB91dh9mtwUvs5MtV8tbbGAdKmz0kQwKrzZ6Hc/t3512/x+qDWeg7ty5b7aTLBVnrWoveIIrnLnWycjb/JmeVFXNMFdZUp/uL43H3Uwdm+NfO/deuCKRQMhKDc2ywauarYyc5U3x/bm2vo/X/vo2m2Oe+zFB5ubcaiLd9EZZsKRiqmK5QlniiRjuOfcFWeaIBnz5IwypxwT0R/njjAzgaSQmIsaNFVIhY+3sBnBVLAedkewhUAsID2b0JSJfnJ0NjkSjkigfHoRUkQEUbg/zB1hVhRRoqTgLWeScJr8subh0cFi2bP+F+vX3Q9/zfhXCwoAAA==")
visland_stop_moving()
end
end
if movementtype == 0 then --default navmesh
WalkTo(94, 40.5, 74.5)
end
elseif GetPlayerGC() == 2 then --vampire coven
if movementtype == 1 then --visland hackery
yield("/li Archers' Guild")
ZoneTransition()
yield("/visland exectemponce H4sIAAAAAAAACu2ZTW/bMAyG/4vOKUGJokT5NnRbUQztunZA94EdssVdDTRxlzgbhqL/ffRXP7CdBh11M2VHoJ+8eE1Sd+Z0ua5NZY4Ov2+blVmYo227v9WF03ZTa3i5/H3bNptuZ6rPd+as3TVd025MdWc+mMp6gRREFuajqQ4QKDCLtbwwn0wlBIFiTPca6V7HL02FC3O+XDV73YxAg5P2Z72uN91w52zZXV81m5WprpY3u3phjjddvV1+6y6b7vrt9POna1PmmuTuuv0139Hsdn9tMaRsF+bVuu3mTI67ej1dvhiemIJ3+3rXPb2+qH8MwUn7dVq+6Nrbw3azmljoypvm5uaw3U+vct7uu/p5epfLpnvMq49et9vne/SL75t1faLP4f3ib9pOIEQf3IwbIwZFHgfcMQFah6HgzoXbekAXgwsPvMX7INGNvB1EywV3PtzqH8k6P9BW2APl4IEYrRRV58KMEUiCpQmzw6Q2IgNsFnD6DxRR56Wtvj1atgrcpuBp/D6yatwic5F2JtiJgaI4HB1E7ZkT+TB+HclDQC/FR3LBFobgUhpZE3hkN5iKstYyJXr2vig7F+zAkKLEgbWFIIgcRssmBFW5wi8ukok1B3Ae/ezYQekqe5ppE1GKRdm5aHsPTCh9DzN4NvuUAobRRyxof4MFdjbYDgQTyT9Y2wQxavfui49kgk064bCB7GTaY9PoSI08BSqUM1FWj3CCkWfKVgvs+MCamC0W2Pm6GW1gtMrrG5hxIpISOnI8WwglH22xkFy8D7zW1T7JzNsBueTF+pE3QwwoEouZ5OLtELRHdNOA1YMldP34r6dNIKrtMs7Op27SPtEFbctn3E766eqkbgtiQ3Kl+svGm0kJE0ea3URsfz4z6RsholYmZaCdjXewYJmJJn1rp44auL6P788PgEPSqLh3Nt4RtLl5LE703IBJHWbAfSDq3+hj0XdO3iye7RPegj7wzNt6F32pTv6P95f7P8KvqWabHwAA")
visland_stop_moving()
end
if movementtype == 0 then --default navmesh
WalkTo(-68.5, -0.5, -8.5)
end
elseif GetPlayerGC() == 3 then --best place in game
if movementtype == 1 then --visland hackery
yield("/li Thaumaturges' Guild")
ZoneTransition()
yield("/visland exectemponce H4sIAAAAAAAACu2WSWvDMBCF/8ucXWFJI8v2raQLoaQ7pAs9uI1CBLGVxnJLCfnvnTgKTZdT8dE+6b2Rh6cPMWgF50VpIIfTQTOfQASnS9csSJ+7ypAcFx8LZytfQ/64gktXW29dBfkK7iA/4EoxybnECO4h58jiWEXwADkmLFGayzUpajQ8gjyO4LqY2IY6SUZi5N5MaSrfVi4LP5vaagL5tJjXJoJh5c2yePFj62cX4fd9L6SmhPXMve8qFK3+1aLNyyM4Lp3fJRl6U4blYbsjiKvG1H5/fWNeWzFyz8G+8W4xcNUkgCDnzM7nA9eEo1y7xpvv8caF9V+5NurELb/32Ji3tjQj2hevoz9Qo2KxEkptUYsNQgLNU4YpatWT7pB0xhQK/EH6gCdMaMGl7i91Z6hlxhKOQv9ALemuo85S1aPuDLVARoOaJnbLGneoNdmJFog96u5QayZRpRnuUGf0od4CzwRLBZWTHnh3E1swjsQ08OYEPNUyjO1YsSxBepn0wP8F/Gn9CUAVPgMlCgAA")
visland_stop_moving()
end
if movementtype == 0 then --default navmesh
WalkTo(-142.5, 4, -106.5)
end
WalkTo(94, 40.5, 74.5)
elseif GetPlayerGC() == 2 then
WalkTo(-68.5, -0.5, -8.5)
elseif GetPlayerGC() == 3 then
WalkTo(-142.5, 4, -106.5)
end
end

Expand Down
127 changes: 78 additions & 49 deletions Community Scripts/Misc/frenrider_McVaxius.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ VBM/BMR (bmr has slash commands for following)
RS/RSR (is RS still being updated?)
***Few annoying problems that still exist
none atm
--*dont follow during combat unless non caster. will require bmr contemplation
]]

--*****************************************************************
Expand Down Expand Up @@ -134,18 +134,20 @@ ini_check("version", vershun)
--*****************************************************************

---------CONFIGURATION SECTION---------
fren = ini_check("fren", "Fren Name") --can be partial as long as its unique
fly_you_fools = ini_check("fly_you_fools", false) --(fly and follow instead of mount and wait) usecase: you dont have multi seater of sufficient size, or you want to have multiple multiseaters with diff peopel riding diff ones. sometimes frendalf doesnt want you to ride him and will ask you to ride yourself right up into outer space
fren = ini_check("fren", "Fren Name") --can be partial as long as its unique
fly_you_fools = ini_check("fly_you_fools", false) --(fly and follow instead of mount and wait) usecase: you dont have multi seater of sufficient size, or you want to have multiple multiseaters with diff peopel riding diff ones. sometimes frendalf doesnt want you to ride him and will ask you to ride yourself right up into outer space
fool_flier = ini_check("fool_flier", "Beast with 3 backs") --if you have fly you fools as true, which beast shall you summon?
fulftype = ini_check("fulftype", "unchanged") -- If you have lazyloot installed can setup how loot is handled. Leave on "unchanged" if you don't want it to set your loot settings. Other settings include need, greed, pass and of course, off
cling = ini_check("cling", 1) -- Distance to cling to fren when > bistance
maxbistance = ini_check("maxbistance", 50) -- Max distance from fren that we will actually chase them, so that we dont get zone hopping situations ;p
limitpct = ini_check("limitpct", 25) -- What percentage of life on target should we use LB at. It will automatically use LB3 if that's the cap or it will use LB2 if that's the cap
rotationtype = ini_check("rotationtype", "Auto") -- What RSR type shall we use? Auto or Manual are common ones to pick. if you choose "none" it won't change existing setting.
bossmodAI = ini_check("bossmodAI", "on") -- do we want bossmodAI to be "on" or "off"
feedme = ini_check("feedme", 4650) -- eatfood, in this case itemID 4650 which is "Boiled Egg", use simpletweaks to show item IDs it won't try to eat if you have 0 of said food item
fulftype = ini_check("fulftype", "unchanged") -- If you have lazyloot installed can setup how loot is handled. Leave on "unchanged" if you don't want it to set your loot settings. Other settings include need, greed, pass and of course, off
cling = ini_check("cling", 1) -- Distance to cling to fren when > bistance
force_gyasahl = ini_check("force_gyasahl", false) -- force gysahl green usage . maybe cause problems in towns with follow
clingtype = ini_check("clingtype", 0) -- Clingtype, 0 = navmesh, 1 = visland, 2 = bmr, 3 = automaton autofollow, 4 = vanilla game follow
maxbistance = ini_check("maxbistance", 50) -- Max distance from fren that we will actually chase them, so that we dont get zone hopping situations ;p
limitpct = ini_check("limitpct", -1) -- What percentage of life on target should we use LB at. It will automatically use LB3 if that's the cap or it will use LB2 if that's the cap, -1 disables it
rotationtype = ini_check("rotationtype", "Auto") -- What RSR type shall we use? Auto or Manual are common ones to pick. if you choose "none" it won't change existing setting.
bossmodAI = ini_check("bossmodAI", "on") -- do we want bossmodAI to be "on" or "off"
feedme = ini_check("feedme", 4650) -- eatfood, in this case itemID 4650 which is "Boiled Egg", use simpletweaks to show item IDs it won't try to eat if you have 0 of said food item
feedmeitem = ini_check("feedmeitem", "Boiled Egg") -- eatfood, in this case the item name. for now this is how we'll do it. it isn't pretty but it will work.. for now..
formation = ini_check("formation", true) -- Follow in formation? If false, then it will "cling"
formation = ini_check("formation", false) -- Follow in formation? If false, then it will "cling"
--[[
Like this -> . so that 1 is the main tank and the party will always kind of make this formation during combat
8 1 5
Expand All @@ -155,25 +157,6 @@ formation = ini_check("formation", true) -- Follow in formation? If false, th
-- mker = "cross" -- In case you want the other shapes. Valid shapes are triangle square circle attack1-8 bind1-3 ignore1-2
-----------CONFIGURATION END-----------

----------------
--INIT SECTION--
----------------
yield("/echo Starting fren rider")
--yield("/target \""..fren.."\"")
yield("/wait 0.5")
--yield("/mk cross <t>")

yield("/vbmai "..bossmodAI)
yield("/bmrai "..bossmodAI)

if rotationtype ~= "none" then
yield("/rotation "..rotationtype)
end

if fulftype ~= "unchanged" then
yield("/fulf on")
yield("/fulf "..fulftype)
end
----------------
----INIT END----
----------------
Expand All @@ -196,11 +179,9 @@ end

function can_i_lb()
local dpsJobs = {
[2] = true, [4] = true, [5] = true, [7] = true, [20] = true, [22] = true, [24] = true,
[2] = true, [4] = true, [5] = true, [7] = true, [20] = true, [22] = true, [24] = true,
[25] = true, [26] = true, [27] = true, [29] = true, [30] = true, [31] = true,
[34] = true, [35] = true, [38] = true, [39] = true--,
-- [41] = true, --painter
-- [42] = true, --voper
[34] = true, [35] = true, [38] = true, [39] = true, [41] = true
}
local joeb = GetClassJobId()
return dpsJobs[joeb] or false
Expand Down Expand Up @@ -246,6 +227,46 @@ local function moveToFormationPosition(followerIndex, leaderX, leaderY, leaderZ,
PathfindAndMoveTo(targetX, targetY, leaderZ, false)
end

function clingmove(nemm)
--navmesh
if clingtype == 0 then
PathfindAndMoveTo(GetObjectRawXPos(nemm),GetObjectRawYPos(nemm),GetObjectRawZPos(nemm), false)
end
--visland
if clingtype == 1 then
yield("/visland moveto "..GetObjectRawXPos(nemm).." "..GetObjectRawYPos(nemm).." "..GetObjectRawZPos(nemm)) --* verify this is correct later when we can load dalamud
end
--bmr
if clingtype == 2 then
bistance = distance(GetPlayerRawXPos(), GetPlayerRawYPos(), GetPlayerRawZPos(), GetObjectRawXPos(nemm),GetObjectRawYPos(nemm),GetObjectRawZPos(nemm))
if bistance < maxbistance then
yield("/bmrai followtarget on") --* verify this is correct later when we can load dalamud
yield("/bmrai follow "..nemm) --* verify this is correct later when we can load dalamud
end
if bistance > maxbistance then --follow ourselves if fren too far away or it will do weird shit
yield("/bmrai followtarget on") --* verify this is correct later when we can load dalamud
yield("/bmrai follow "..GetCharacterName()) --* verify this is correct later when we can load dalamud
yield("/echo too far! stop following!")
end
end
if clingtype == 3 then
yield("/autofollow "..nemm) --* verify this is correct later when we can load dalamud
end
if clingtype == 4 then
--we only doing this silly method out of combat
if GetCharacterCondition(26) == false then
yield("/target "..nemm) --* verify this is correct later when we can load dalamud
yield("/follow")
end
--if we in combat and target is nemm we will clear it becuase that may bork autotarget from RSR
if GetCharacterCondition(26) == true then
if nemm == GetTargetName() then
ClearTarget()
end
end
end
end

weirdvar = 1
shartycardinality = 2 -- leader
partycardinality = 2 -- me
Expand Down Expand Up @@ -289,6 +310,20 @@ while weirdvar == 1 do
--catch if character is ready before doing anything
if IsPlayerAvailable() then
if type(GetCharacterCondition(34)) == "boolean" and type(GetCharacterCondition(26)) == "boolean" and type(GetCharacterCondition(4)) == "boolean" then
bistance = distance(GetPlayerRawXPos(), GetPlayerRawYPos(), GetPlayerRawZPos(), GetObjectRawXPos(fren),GetObjectRawYPos(fren),GetObjectRawZPos(fren))
if bistance > maxbistance then --follow ourselves if fren too far away or it will do weird shit
clingmove(GetCharacterName())
end

--dismount regardless of in duty or not
if IsPartyMemberMounted(shartycardinality) == false and fly_you_fools == true and GetCharacterCondition(4) == true then
--continually try to dismount
--bmr follow off.
yield("/bmrai follow slot1")
yield("/ac dismount")
yield("/wait 0.5")
end

--Food check!
statoos = GetStatusTimeRemaining(48)
---yield("/echo "..statoos)
Expand All @@ -308,7 +343,6 @@ while weirdvar == 1 do
--movement with formation - initially we test while in any situation not just combat
--check distance to fren, if its more than cling, then

bistance = distance(GetPlayerRawXPos(), GetPlayerRawYPos(), GetPlayerRawZPos(), GetObjectRawXPos(fren),GetObjectRawYPos(fren),GetObjectRawZPos(fren))
if formation == true and bistance < maxbistance then
-- Inside combat and formation enabled
local leaderX, leaderY, leaderZ = GetObjectRawXPos(fren), GetObjectRawYPos(fren), GetObjectRawZPos(fren)
Expand All @@ -321,14 +355,15 @@ while weirdvar == 1 do
if formation == false then
if bistance > cling and bistance < maxbistance then
--yield("/target \""..fren.."\"")
PathfindAndMoveTo(GetObjectRawXPos(fren),GetObjectRawYPos(fren),GetObjectRawZPos(fren), false)
--PathfindAndMoveTo(GetObjectRawXPos(fren),GetObjectRawYPos(fren),GetObjectRawZPos(fren), false)
clingmove(fren) --movement func
end
yield("/wait 0.5")
end
end

--we are limitbreaking all over ourselves
if can_i_lb() == true then
if can_i_lb() == true and limitpct > -1 then
GetLimoot = 0 --init lb value. its 10k per 1 bar
GetLimoot = GetLimitBreakCurrentValue()
if type(GetLimoot) ~= "number" then --error trap variable type because we dont like SND pausing
Expand Down Expand Up @@ -368,15 +403,7 @@ while weirdvar == 1 do
ClearTarget()
we_were_in = we_are_in
end

if IsPartyMemberMounted(shartycardinality) == false and fly_you_fools == true then
--continually try to dismount
--bmr follow off.
yield("/bmrai follow slot1")
yield("/ac dismount")
yield("/wait 0.5")
end


--the code block that got this all started haha
--follow and mount fren
if GetCharacterCondition(26) == false then --not in combat
Expand Down Expand Up @@ -408,7 +435,7 @@ while weirdvar == 1 do
end
if GetCharacterCondition(4) == false and GetCharacterCondition(10) == false then --not mounted and not mounted2 (riding friend)
--chocobo stuff. first check if we can fly. if not don't try to chocobo
if HasFlightUnlocked() == true then
if HasFlightUnlocked() == true or force_gyasahl == true then
--check if chocobro is up or (soon) not!
if GetBuddyTimeRemaining() < 900 and GetItemCount(4868) > 0 then
yield("/visland stop")
Expand All @@ -423,7 +450,9 @@ while weirdvar == 1 do
bistance = distance(GetPlayerRawXPos(), GetPlayerRawYPos(), GetPlayerRawZPos(), GetObjectRawXPos(fren),GetObjectRawYPos(fren),GetObjectRawZPos(fren))
if bistance > cling and bistance < maxbistance then
--yield("/target \""..fren.."\"")
PathfindAndMoveTo(GetObjectRawXPos(fren),GetObjectRawYPos(fren),GetObjectRawZPos(fren), false)
--PathfindAndMoveTo(GetObjectRawXPos(fren),GetObjectRawYPos(fren),GetObjectRawZPos(fren), false)
clingmove(fren) --movement func
--yield("/echo DEBUG line 467ish")
end
yield("/wait 0.5")
end
Expand All @@ -438,7 +467,7 @@ while weirdvar == 1 do
if GetCharacterCondition(4) == false and GetCharacterCondition(10) == false and IsPartyMemberMounted(shartycardinality) == true then
--mountup your own mount
yield("/mount \""..fool_flier.."\"")
yield("/wait 3")
yield("/wait 5")
--try to fly
yield("/gaction jump")
yield("/lockon on")
Expand Down

0 comments on commit f94b5e3

Please sign in to comment.