Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local profile = {}
- local library = {
- stone = { skillType = 1, id = 119 },
- cure = { skillType = 1, id = 120 }
- }
- local state = {
- config = {
- dps = false,
- autoTargeting = false
- }
- }
- local config = {
- IsDpsEnabled = function() return state.config.dps end,
- IsAutoTargetingEnabled = function() return state.config.autoTargeting end
- }
- local function GetStateName()
- return profile.GUI.name .. "_State"
- end
- local function OnCast()
- local stone = ActionList:Get(library.stone.skillType, library.stone.id)
- local cure = ActionList:Get(library.cure.skillType, library.cure.id)
- -- First, check our hp
- if Player.hp.percent < 75 then
- -- We're low on hp, so cast cure
- if cure and cure:IsReady(Player.id) then
- cure:Cast(Player.id)
- end
- return true
- end
- -- We don't need to heal, but are we configured for DPS?
- if not config.IsDpsEnabled() then
- return false
- end
- -- We're not low on hp, so check if we have a target
- local target = Player:GetTarget()
- if target == nil then
- -- Nothing to do
- return false
- end
- -- We have a target, so cast stone on it
- if (stone and stone:IsReady(target.id)) then
- stone:Cast(target.id)
- return true
- end
- return false
- end
- local function OnUpdate(event, tickcount)
- -- This is called when ACR is running in standalone mode.
- -- Combat logic should be in OnCast.
- -- Targeting, movement etc should be in OnUpdate.
- local target = Player:GetTarget()
- if target == nil and config.IsAutoTargetingEnabled() then
- -- It's important to specify the target is alive, otherwise we will just keep targeting the monster we killed
- local targetList = EntityList("nearest,onmesh,attackable,maxdistance=20,alive")
- if targetList then
- local entityId, entity = next(targetList)
- if entity ~= nil then
- Player:SetTarget(entityId)
- end
- end
- end
- if Player.incombat then
- -- Call this regardless of whether we have a target, as the combat routine may not rely on one (buffs, healing etc)
- OnCast()
- end
- end
- local function OnDraw()
- if (profile.GUI.open) then
- profile.GUI.visible, profile.GUI.open = GUI:Begin(profile.GUI.name, profile.GUI.open)
- if (profile.GUI.visible) then
- state.config.dps = GUI:Checkbox("Enable DPS Rotation", state.config.dps)
- state.config.autoTargeting = GUI:Checkbox("Enable Auto Targeting", state.config.autoTargeting)
- if GUI:Button("Save", 64, 16) then
- ACR.SetGUIVar(state.config, GetStateName())
- end
- end
- GUI:End()
- end
- end
- local function OnOpen()
- profile.GUI.open = true
- end
- local function OnLoad()
- state.config = ACR.GetSetting(GetStateName(), state.config)
- end
- profile.classes = {
- -- GLA/PLD
- [FFXIV.JOBS.GLADIATOR] = false,
- [FFXIV.JOBS.PALADIN] = false,
- -- PGL/MNK
- [FFXIV.JOBS.PUGILIST] = false,
- [FFXIV.JOBS.MONK] = false,
- -- MRD/WAR
- [FFXIV.JOBS.MARAUDER] = false,
- [FFXIV.JOBS.WARRIOR] = false,
- -- LNC/DRG
- [FFXIV.JOBS.LANCER] = false,
- [FFXIV.JOBS.DRAGOON] = false,
- -- ARC/BRD
- [FFXIV.JOBS.ARCHER] = false,
- [FFXIV.JOBS.BARD] = false,
- -- ROG/NIN
- [FFXIV.JOBS.ROGUE] = false,
- [FFXIV.JOBS.NINJA] = false,
- -- CNJ/WHM
- [FFXIV.JOBS.CONJURER] = true, -- Enabled
- [FFXIV.JOBS.WHITEMAGE] = true, -- Enabled
- -- THM/BLM
- [FFXIV.JOBS.THAUMATURGE] = false,
- [FFXIV.JOBS.BLACKMAGE] = false,
- -- ACN/SCH/SMN
- [FFXIV.JOBS.ARCANIST] = false,
- [FFXIV.JOBS.SCHOLAR] = false,
- [FFXIV.JOBS.SUMMONER] = false,
- -- DRK
- [FFXIV.JOBS.DARKKNIGHT] = false,
- -- MCH
- [FFXIV.JOBS.MACHINIST] = false,
- -- AST
- [FFXIV.JOBS.ASTROLOGIAN] = false,
- -- BTN
- [FFXIV.JOBS.BOTANIST] = false,
- -- FSH
- [FFXIV.JOBS.FISHER] = false,
- -- MIN
- [FFXIV.JOBS.MINER] = false,
- -- CRP
- [FFXIV.JOBS.CARPENTER] = false,
- -- BLK
- [FFXIV.JOBS.BLACKSMITH] = false,
- -- ARM
- [FFXIV.JOBS.ARMORER] = false,
- -- GLD
- [FFXIV.JOBS.GOLDSMITH] = false,
- -- LTW
- [FFXIV.JOBS.LEATHERWORKER] = false,
- -- WVR
- [FFXIV.JOBS.WEAVER] = false,
- -- ALC
- [FFXIV.JOBS.ALCHEMIST] = false,
- -- CLN
- [FFXIV.JOBS.CULINARIAN] = false,
- }
- profile.GUI = {
- open = false,
- visible = true,
- name = "AutoWHM Settings"
- }
- -- The Draw() function provides a place where a developer can show custom options.
- profile.Draw = function() if OnDraw ~= nil then return OnDraw() end end
- -- The OnOpen() function is fired when a user pressed "View Profile Options" on the main ACR window.
- profile.OnOpen = function() if OnOpen ~= nil then return OnOpen() end end
- -- The OnLoad() function is fired when a profile is prepped and loaded by ACR.
- profile.OnLoad = function() if OnLoad ~= nil then return OnLoad() end end
- -- The OnClick function is fired when a user clicks on the ACR party interface.
- -- It accepts 5 parameters:
- -- mouse /int/ - Possible values are 0 (Left-click), 1 (Right-click), 2 (Middle-click)
- -- shiftState /bool/ - Is shift currently pressed?
- -- controlState /bool/ - Is control currently pressed?
- -- altState /bool/ - Is alt currently pressed?
- -- entity /table/ - The entity information for the party member that was clicked on.
- profile.OnClick = function(mouse,shiftState,controlState,altState,entity) if OnClick ~= nil then return OnClick(mouse,shiftState,controlState,altState,entity) end end
- -- The OnUpdate() function is fired on the gameloop, like any other OnUpdate function found in FFXIVMinion code.
- profile.OnUpdate = function(event, tickcount) if OnUpdate() ~= nil then return OnUpdate(event, tickcount) end end
- -- Cast is called constantly by the FFXIVMinion assist bot. This contains our combat logic. It must be called manually by OnUpdate to use with ACR standalone.
- profile.Cast = function() if OnCast ~= nil then return OnCast() end end
- return profile
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement