User Tools

Site Tools



kdf_api

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
kdf_api [2025/03/30 13:29] – kitanoikdf_api [2026/09/29 23:59] (current) – kitanoi
Line 80: Line 80:
 <code> <code>
      queuetype = 2,      queuetype = 2,
 +</code>
 +---------------------------------------------------------------
 +
 +====minilvl====
 +[bool][optional] - if you want to make the dungeon harder
 +<code>
 +     minilvl = true,
 +</code>
 +---------------------------------------------------------------
 +
 +====levelsync====
 +[bool][optional] - used for blue mage allowing entrance to dungeons solo while level synced down. Used in combination with queuetype = 2
 +<code>
 +     levelsync = true,
 +     queuetype = 2
 </code> </code>
  
Line 324: Line 339:
 meleeavoid = true, meleeavoid = true,
 meleeavoid = false, meleeavoid = false,
 +</code>
 +
 +---------------------------------------------------------------
 +====disableavoid====
 +[bool][optional] Profile level setting to enable or disable avoidance.
 +<code>
 +disableavoid = true,
 +disableavoid = false,
 </code> </code>
  
Line 347: Line 370:
 </code> </code>
  
 +---------------------------------------------------------------
 +====overrideisfloor====
 +[bool][optional]
 +  * nil will use raycast unless I have overriden inside of KitanoiFuncs
 +  * true will use isonmeshexact function instead of raycast - used in certain trials where you can run off the edge. Some, like Shinryu, raycast works fine, others like Dark Inside doesn't.
 +  * 
 --------------------------------------------------------------- ---------------------------------------------------------------
 ====meshchange==== ====meshchange====
Line 412: Line 441:
   }     }  
 } }
 +</code>
 +---------------------------------------------------------------
 +
 +====maintank====
 +[string][optional] Name of who you want to be the main tank. KDF will use the lower of the Player.id to determine who is main tank if you do not use this.
 +<code>
 +    maintank = "My Name",
 </code> </code>
  
Line 428: Line 464:
         [1] = {contentid = 12345, frompercent = 100, topercent = 95, pos = {x = 1, y = 2, z = 3}, desc = "tank boss 12345 at this pos from 100-95%"},         [1] = {contentid = 12345, frompercent = 100, topercent = 95, pos = {x = 1, y = 2, z = 3}, desc = "tank boss 12345 at this pos from 100-95%"},
     },     },
 +    
 +    tankat= {
 +        [1] = {contentid = 1644, frompercent = 100, topercent = 0, reqs = [[return not KitanoiFuncs.API.DungeonFramework.GarudaPhased]], pos = {x=0.59,y=-2.15,z=-21.73}, desc = "tank garuda at north until phased"},
 +        [2] = {contentid = 1644, frompercent = 100, topercent = 0, reqs = [[return  KitanoiFuncs.API.DungeonFramework.GarudaPhased]], pos = {x=-0.76,y=-1.85,z=-4.35}, desc = "tank garuda at north of inner circle after phased"},
 +    },    
 </code> </code>
   * contentid [required] contentid of the enemy   * contentid [required] contentid of the enemy
Line 433: Line 474:
   * topercent [required] should be the lower %   * topercent [required] should be the lower %
   * pos [required] position to tank at   * pos [required] position to tank at
 +  * reqs [optional] must start with "return" and return a bool
  
 --------------------------------------------------------------- ---------------------------------------------------------------
Line 809: Line 851:
  
 </code> </code>
 +
 +---------------------------------------------------------------
 +
 +====Argus.registerOn functions====
 +
 +<html><a href="https://wiki.mmominion.com/doku.php?id=argusdocs#onEntityChannelFunc">onEntityChannelFunc</a></html>
 +<code>
 + registerOnEntityChannel = [[
 + function(entityID, channelID, targetID, channelTimeMax) 
 + d(entityID) 
 + end
 + ]],
 +</code>
 +
 +<html><a href="https://wiki.mmominion.com/doku.php?id=argusdocs#onEntityCastFunc">OnEntityCast</a></html>
 +<code>
 + registerOnEntityCast = [[
 + function(entityID, actionID, castPosX, castPosY, castPosZ, heading, mainTargetID, targets)
 + d(entityID)
 + end
 + ]],
 +</code>
 +
 +
 +<html><a href="https://wiki.mmominion.com/doku.php?id=argusdocs#Argus.registerOnEventObjectScriptFunc">OnEventObjectScriptFunc</a></html>
 +<code>
 + registerOnEventObjectScriptFunc = [[
 + function(entityID, a2, a3, a4)
 + d(entityID)
 + end
 + ]],
 +</code>
 +
 +<html><a href="https://wiki.mmominion.com/doku.php?id=argusdocs#onFloorChangeFunc">onFloorChangeFunc</a></html>
 +<code>
 + registerOnFloorChangeFunc = [[
 + function(a1, a2, a3)
 + d(a1 .. " : "  .. a2 .. " : " .. a3)
 + end
 + ]],
 +</code>
 +
 +
 +<html><a href="https://wiki.mmominion.com/doku.php?id=argusdocs#onMarkerAddFunc">onMarkerAddFunc</a></html>
 +<code>
 + registerOnMarkerAdd = [[
 + function(entityID, markerType, entityID2)
 + d(entityID .. " : " .. markerType)
 + end
 + ]],
 +</code>
 +
 +
 +<html><a href="https://wiki.mmominion.com/doku.php?id=argusdocs#Argus.registerOnAOECreateFunc">OnAOECreateFunc</a></html>
 +<code>
 + registerOnAOECreateFunc = [[
 + function(aoedata)
 + d(aoedata)
 + end
 + ]],
 +</code>
 +
 +
 +<html><a href="https://wiki.mmominion.com/doku.php?id=argusdocs#onTetherChangeFunc">OnTetherChange</a></html>
 +<code>
 + registerOnTetherChange = [[
 + function(sourceEntityID, oldTetherID, oldTetherFlags, oldTargetID, newTetherID, newTetherFlags, newTargetID)
 + d(sourceEntityID)
 + end
 + ]],
 +</code>
 +
 +<html><a href="https://wiki.mmominion.com/doku.php?id=argusdocs#onMapEffectFunc">OnMapEffect</a></html>
 +<code>
 + registerOnMapEffect = [[
 + function(a1,a2,a3)
 +
 + end
 + ]],
 +</code>
 +
 +<html><a href="https://wiki.mmominion.com/doku.php?id=argusdocs#onEventObjectScript2Func">OnEventObjectScript2Func</a></html>
 +<code>
 + registerOnEventObjectScript2Func = [[
 + function(entityID, a2, a3)
 + d(entityID)
 + end
 + ]],
 +</code>
 +
 +<html><a href="https://discord.com/channels/617481815418077185/673326353243832349/1522268350124654764">OnAddGroundVFXFunc</a></html>
 +<code>
 + registerOnAddGroundVFXFunc = [[
 + function(vfxID, vfxName, x, y, z, ownerEntID, time, scale, a9)
 + d(vfxID)
 + end
 + ]],
 +</code>
 +
 +<html><a href="https://discord.com/channels/617481815418077185/673326353243832349/1269493776838164554">OnTransformChangeFunc</a></html>
 +<code>
 + registerOnTransformChangeFunc = [[
 + function(entityID, oldTransformID, oldTransformFlags, newTransformID, newTransformFlags)
 + d(entityID)
 + end
 + ]],
 +</code>
 +
 +<html><a href="https://discord.com/channels/617481815418077185/673326353243832349/1269493776838164554">OnAuraChangeFunc </a></html>
 +<code>
 + registerOnAuraChangeFunc = [[
 + function(entityID, oldPersistentAura, oldActiveAura1, oldActiveAura2, newPersistentAura, newActiveAura1, newActiveAura2)
 + d(entityID)
 + end
 + ]],
 +</code>
 +
 +OnAnimationChangeFunc
 +<code>
 + registerOnAnimationChangeFunc = [[
 + function(entityID, index, oldAnimID, newAnimID)
 + d(entityID)
 + end
 + ]],
 +</code>
 +
 +registerOnVisibilityChangeFunc
 +<code>
 + registerOnVisibilityChangeFunc = [[
 + function(entityID, wasVisible, isVisible)
 + d(entityID)
 + end
 + ]],
 +</code>
 +
 +OnEntityAddFunc
 +<code>
 + registerOnEntityAddFunc = [[
 + function(entityID, entityName, contentID)
 + d(entityID .. " appeared")
 + end
 + ]],
 +</code>
 +
 +OnEntityRemoveFunc
 +<code>
 + registerOnEntityRemoveFunc = [[
 + function(entityID, entityName)
 + d(entityID .. " (" .. entityName .. ") removed")
 + end
 + ]],
 +</code>
 +
 +OnAddGroundEffectFunc 
 +<code>
 + registerOnAddGroundEffectFunc = [[
 + function(entityID,type,flags,type2,keyID,a1,a2,a4,ownerID,a3,radius,heading,flags2,type3,state,a5,x,y,z)
 + d(entityID)
 + end
 + ]],
 +</code>
 +
 +Example use for Everkeep trial:
 +
 +<code>
 + registerOnMapEffect = [[
 + function(a1,a2,a3)
 + -- Map effects 17-20 = Forged Track platform patterns (17 NE, 18 SE, 19 SW, 20 NW).
 + -- a2 == 1: crossed (lateral offset mirrored), a2 == 16: straight, a2 == 4: cleared.
 + if (a1 >= 17 and a1 <= 20) then
 + if TensorCore.mGetPlayer().localmapid == 1200 then
 + KitanoiFuncs.jkalsk.zj_forged = KitanoiFuncs.jkalsk.zj_forged or {}
 + if a2 == 1 then
 + KitanoiFuncs.jkalsk.zj_forged[a1] = -1
 + elseif a2 == 16 then
 + KitanoiFuncs.jkalsk.zj_forged[a1] = 1
 + elseif a2 == 4 then
 + KitanoiFuncs.jkalsk.zj_forged[a1] = nil
 + end
 + end
 + end
 + end
 + ]],
 + registerOnEntityCast = [[
 + function(entityID, actionID, castPosX, castPosY, castPosZ, heading, mainTargetID, targets)
 + if (actionID == 37748 or actionID == 37749 or actionID == 37750) then
 + KitanoiFuncs.FollowTrust()
 + KitanoiSettings.avoidingtime = Now() + 3000
 + end
 + end
 + ]],
 + registerOnEntityChannel = [[
 + function(entityID, channelID, targetID, channelTimeMax)
 + -- Side-platform sword (Forged Track 37729) is a fake line; the real hit (37730)
 + -- comes ~13.3s later from a hidden sword on the main platform, 30y further along
 + -- the sword's facing. The platform's map effect (17 NE, 18 SE, 19 SW, 20 NW),
 + -- stored by "Zoraal Ja - Forged Track Pattern", decides whether the lateral
 + -- offset is mirrored (-1, crossed pattern) or kept (1, straight pattern).
 + if (channelID == 37748) then
 + KitanoiFuncs.FollowTrust()
 + KitanoiSettings.avoidingtime = Now() + 2000
 + end
 + local ent = TensorCore.mGetEntity(entityID)
 + if ent then
 + local p = ent.pos
 + local dx, dz = p.x - 100, p.z - 100
 + local idx
 + if dx > 0 then
 + idx = dz < 0 and 17 or 18
 + else
 + idx = dz > 0 and 19 or 20
 + end
 + local s = KitanoiFuncs.jkalsk.zj_forged and KitanoiFuncs.jkalsk.zj_forged[idx]
 + if s then
 + local h = p.h
 + local fx, fz = math.sin(h), math.cos(h)
 + local rx, rz = math.cos(h), -math.sin(h)
 + local fwd = dx * fx + dz * fz + 30
 + local lat = (dx * rx + dz * rz) * s
 + local x = 100 + fwd * fx + lat * rx
 + local z = 100 + fwd * fz + lat * rz
 + TensorCore.getMoogleDrawer():addTimedRect(13300, x, p.y, z, 20, 5, h)
 + if (KitanoiFuncs.CurrentAOEs[i]==nil) then
 + KitanoiFuncs.ConsoleLog("Adding correct AOE position")
 + local poly = KitanoiFuncs.SquarePolygon({x=x, y=p.y, z=z},5,20,h,0)
 + KitanoiSettings.avoidingtime = Now() + 16000
 + KitanoiFuncs.CurrentAOEs[entityID] = {
 + type = "poly",
 + entity = entityID,
 + target = 0,
 + aoeID = 0, 
 + name = "",
 + poly = poly,
 + pos = {x=x, y=p.y, z=z},
 + length = 20,
 + width = 5,
 + heading = h,
 + casttime = 13.3,
 + channelingtime = 0,
 + deletetime = KitanoiFuncs.Now() + 13300,
 +
 + }
 + end
 + end
 + end
 +
 + -- Side-platform tile (Chasm of Vollok 37720) is a preview; the real 5x5 hit (37722)
 + -- comes ~7.1s later from a Zoraal Ja clone (12882) 30y toward the arena center
 + -- along the platform's diagonal. Main-platform tiles are skipped.
 + if ent then
 + local p = ent.pos
 + local dx, dz = p.x - 100, p.z - 100
 + if dx * dx + dz * dz > 400 then
 + local x = p.x + (dx > 0 and -21.2132 or 21.2132)
 + local z = p.z + (dz > 0 and -21.2132 or 21.2132)
 + local h = p.h
 + x = x - 2.5 * math.sin(h)
 + z = z - 2.5 * math.cos(h)
 + TensorCore.getMoogleDrawer():addTimedRect(7100, x, p.y, z, 5, 5, h)
 + end
 + end
 + end
 + ]],
 +</code>
 +`KitanoiFuncs.jkalsk` here works as `data` does in TensorReactions. A self clearing table for storing data.
  
 --------------------------------------------------------------- ---------------------------------------------------------------
kdf_api.1743341377.txt.gz · Last modified: 2025/03/30 13:29 by kitanoi