User Tools

Site Tools



acr

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
acr [2016/04/07 17:23] aceacr [2024/07/23 22:20] (current) ace
Line 1: Line 1:
-===== Features =====+===== About =====
  
 ACR (Advanced Combat Routines) is a platform for highly customizable combat routines that are written in lua.   ACR (Advanced Combat Routines) is a platform for highly customizable combat routines that are written in lua.  
 Routines built on this platform can use a custom GUI, have access to a special multi-clickable Party Interface, and the routines are not bound by the same generic rules that SkillManager routines use. Routines built on this platform can use a custom GUI, have access to a special multi-clickable Party Interface, and the routines are not bound by the same generic rules that SkillManager routines use.
  
-==== Usage ==== +===== Features =====
- +
-----+
  
 === ACR Main Interface === === ACR Main Interface ===
Line 56: Line 54:
     name = "Batman",     name = "Batman",
 } }
 +
 +-- Regions table, lists which game regions are supported (1 - NA, 2 - CN, 3 - KR)
 +profile.region = { 1, 2, 3}
  
 -- Create a classes table, to specify which classes this profile can be used for. -- Create a classes table, to specify which classes this profile can be used for.
Line 61: Line 62:
     [FFXIV.JOBS.NINJA] = true,     [FFXIV.JOBS.NINJA] = true,
     [FFXIV.JOBS.ROGUE] = true,     [FFXIV.JOBS.ROGUE] = true,
-+} 
 + 
 +-- Add a tags string to indicate whatever you want when class options are displayed 
 +profile.tags = "assistonly;grindmode;dungeons"
  
 -- The Cast() function is where the magic happens. -- The Cast() function is where the magic happens.
Line 71: Line 75:
         local spinningEdge = ActionList:Get(2240,1,currentTarget.id)         local spinningEdge = ActionList:Get(2240,1,currentTarget.id)
         if (spinningEdge and spinningEdge.isready) then         if (spinningEdge and spinningEdge.isready) then
-            spinningEdge:Cast(currentTarget.id+            spinningEdge:Cast(currentTarget.id)
             return true             return true
         end         end
Line 85: Line 89:
             ACR_MyProfile_MySavedVar = GUI:Checkbox("AOE",ACR_MyProfile_MySavedVar)             ACR_MyProfile_MySavedVar = GUI:Checkbox("AOE",ACR_MyProfile_MySavedVar)
         end         end
 +        GUI:End()
     end      end
 +end
 +
 +-- Adds a customizable header to the top of the ffxivminion task window.
 +function profile.DrawHeader()
 +
 +end
 +
 +-- Adds a customizable footer to the top of the ffxivminion task window.
 +function profile.DrawFooter()
 +
 end end
  
Line 118: Line 133:
 -- Return the profile to ACR, so it can be read. -- Return the profile to ACR, so it can be read.
 return profile return profile
 +
 +</code>
 +
 +==== Pushing Routines API ====
 +
 +<code lua>
 +
 +-- This code is an example of how to push routines into ACR using the new API call.
 +-- This isn't required anymore. Simply placing your ACR LUA file into a folder named CombatRoutines is enough for the ACR module to detect and load your ACR.
 +
 +acelib.routinePath = GetStartupPath()..[[\LuaMods\AceLib\CombatRoutines\]] --this can be any subfolder, I'm using the old structure for ease
 +
 +function AceLib.LoadCombatProfile(filename,alias)
 + if (acelib.ModuleFunctions and acelib.ModuleFunctions.ReadModuleFile) then
 + local fileInfo = { p = "CombatRoutines" , m = "AceLib" , f = filename }
 + local fileString = acelib.ModuleFunctions.ReadModuleFile(fileInfo)
 + if (fileString) then
 + local fileFunction, errorMessage = loadstring(fileString)
 + if (fileFunction) then
 + local ok, profileData = pcall(fileFunction)
 + if (ok and profileData ~= nil) then
 + ACR.AddPrivateProfile(profileData,alias)
 + end
 + end
 + end
 + else
 + if (filename ~= "" and FileExists(acelib.routinePath..filename)) then
 + local profileData,e = persistence.load(acelib.routinePath..filename)
 + if (ValidTable(profileData)) then
 + ACR.AddPrivateProfile(profileData,alias)
 + end
 + end
 + end
 +end
 +
 +function AceLib.LoadCombatProfiles()
 + AceLib.LoadCombatProfile("Ark.lua","Ark")
 +end
 +
 +-- Final call should be done in a ModuleInit so that all modules can finish loading other API where required.
 +function acelib.ModuleInit()
 +        AceLib.LoadCombatProfiles()
 +end
 +
 +</code>
 +
 +==== Public API Functions ====
 +
 +<code lua>
 +
 +local t = ACR.GetClassOptions(class (int) (default Player.job),pvp (bool) (default false))
 +--returns a table "t" filled with options for the desired class
 +/*
 +{
 +  [1] = {
 +      name = "AProfile",
 +      tags = ""
 +  },
 +  [2] = {
 +      name = "BProfile",
 +      tags = ""
 +  },
 +}
 +*/
 +
 +local b, n = ACR.IsActive()
 +--returns b (bool) (true if any ACR is active), n (string) (name of active profile or "" if inactive)
 +
 +ACR.OpenProfileOptions()
 +--executes the currently selected profiles OnOpen() event if applicable
  
 </code> </code>
acr.1460049810.txt.gz · Last modified: 2016/04/07 17:23 by ace