-
Notifications
You must be signed in to change notification settings - Fork 612
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
204 changed files
with
8,969 additions
and
2,614 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
----------------------------------- | ||
-- Era Composure effect | ||
-- Pre 8 Feb 2019 | ||
-- https://forum-square--enix-com.translate.goog/ffxi/threads/55024?_x_tr_sl=ja&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=sc | ||
----------------------------------- | ||
require('modules/module_utils') | ||
----------------------------------- | ||
local m = Module:new('era_effect_composure') | ||
|
||
m:addOverride('xi.effects.composure.onEffectGain', function(target, effect) | ||
local power = math.floor(target:getMainLvl() / 5) | ||
|
||
effect:addMod(xi.mod.ACC, power) | ||
end) | ||
|
||
return m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
----------------------------------- | ||
-- Slipstream | ||
-- Reduces accuracy of targets in area of effect | ||
----------------------------------- | ||
---@type TMobSkill | ||
local mobskillObject = {} | ||
|
||
mobskillObject.onMobSkillCheck = function(target, mob, skill) | ||
return 0 | ||
end | ||
|
||
mobskillObject.onMobWeaponSkill = function(target, mob, skill) | ||
skill:setMsg(xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.ACCURACY_DOWN, 25, 0, math.random(120, 180))) | ||
|
||
return xi.effect.ACCURACY_DOWN | ||
end | ||
|
||
return mobskillObject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
----------------------------------- | ||
-- Turbulence | ||
-- Deals wind based damage in an area of effect | ||
----------------------------------- | ||
---@type TMobSkill | ||
local mobskillObject = {} | ||
|
||
mobskillObject.onMobSkillCheck = function(target, mob, skill) | ||
return 0 | ||
end | ||
|
||
mobskillObject.onMobWeaponSkill = function(target, mob, skill) | ||
local damage = mob:getWeaponDmg() * 3 | ||
|
||
damage = xi.mobskills.mobMagicalMove(mob, target, skill, damage, xi.element.WIND, 1, xi.mobskills.magicalTpBonus.NO_EFFECT) | ||
damage = xi.mobskills.mobFinalAdjustments(damage, mob, skill, target, xi.attackType.MAGICAL, xi.damageType.WIND, xi.mobskills.shadowBehavior.WIPE_SHADOWS) | ||
|
||
target:takeDamage(damage, mob, xi.attackType.MAGICAL, xi.damageType.WIND) | ||
|
||
return damage | ||
end | ||
|
||
return mobskillObject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
----------------------------------- | ||
-- func: getfame | ||
-- desc: Gets fame level of a target player | ||
----------------------------------- | ||
local commandObj = {} | ||
|
||
commandObj.cmdprops = | ||
{ | ||
permission = 3, | ||
parameters = 'si' | ||
} | ||
|
||
local function error(player, msg) | ||
if msg == nil then | ||
msg = '!getfame [player] <fame_zone 0-15>' | ||
end | ||
|
||
player:printToPlayer(msg) | ||
end | ||
|
||
commandObj.onTrigger = function(player, target, famezone) | ||
-- validate target | ||
local targ = nil | ||
|
||
if target == nil then | ||
if player:getCursorTarget() == nil then | ||
targ = player | ||
else | ||
if player:getCursorTarget():isPC() then | ||
targ = player:getCursorTarget() | ||
else | ||
error(player, 'You must target a player or specify a name.') | ||
return | ||
end | ||
end | ||
else | ||
targ = GetPlayerByName(target) | ||
if targ == nil then | ||
error(player, string.format('Player named "%s" not found or not a valid player!', target)) | ||
return | ||
end | ||
end | ||
|
||
local fameZoneNames = {} | ||
for name, value in pairs(xi.fameArea) do | ||
fameZoneNames[value] = name | ||
end | ||
|
||
-- Validate famezone | ||
if famezone == nil then | ||
player:printToPlayer(string.format('Fame Report for player: %s', targ:getName()), xi.msg.channel.SYSTEM_3) | ||
for i = 0, 15 do | ||
player:printToPlayer(string.format('Area %s (%s): %s (Level: %s)', i, fameZoneNames[i], player:getFame(i), player:getFameLevel(i)), xi.msg.channel.SYSTEM_3) | ||
end | ||
|
||
return | ||
elseif famezone < 0 or famezone > 15 then | ||
error(player, 'Fame zone must be a value from 0 to 15, or omit for complete list.') | ||
return | ||
end | ||
|
||
local fameBaseValues = { 0, 50, 125, 225, 325, 425, 488, 550, 613 } | ||
local fame = player:getFame(famezone) | ||
local level = player:getFameLevel(famezone) | ||
|
||
if level < 9 then | ||
player:printToPlayer(string.format('%s\'s reputation in fame area %i (%s) is %i (Level %i). Next level at %i (%i points to go).', targ:getName(), famezone, fameZoneNames[famezone], fame, level, fameBaseValues[level + 1], fameBaseValues[level + 1]-fame), xi.msg.channel.SYSTEM_3) | ||
else | ||
player:printToPlayer(string.format('%s\'s reputation in fame area %i (%s) is %i (Level %i).', targ:getName(), famezone, fameZoneNames[famezone], fame, level), xi.msg.channel.SYSTEM_3) | ||
end | ||
end | ||
|
||
return commandObj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
----------------------------------- | ||
-- func: setfamelevel | ||
-- desc: Sets fame level on a target player | ||
----------------------------------- | ||
local commandObj = {} | ||
|
||
commandObj.cmdprops = | ||
{ | ||
permission = 3, | ||
parameters = 'iis' | ||
} | ||
|
||
local function error(player, msg) | ||
if msg == nil then | ||
msg = '!setfamelevel <fame_zone 0-15> <level 1-9> <player> (Omit level and target to show zone numbers)' | ||
end | ||
|
||
player:printToPlayer(msg) | ||
end | ||
|
||
commandObj.onTrigger = function(player, famezone, level, target) | ||
-- validate target | ||
local targ | ||
|
||
if target == nil then | ||
targ = player | ||
else | ||
targ = GetPlayerByName(target) | ||
if targ == nil then | ||
error(player, string.format('Player named "%s" not found or not a valid player!', target)) | ||
return | ||
end | ||
end | ||
|
||
local fameZoneNames = {} | ||
for name, value in pairs(xi.fameArea) do | ||
fameZoneNames[value] = name | ||
end | ||
|
||
if famezone == nil then | ||
error(player) | ||
return | ||
elseif famezone < 0 or famezone > 15 then | ||
error(player, 'You must provide a fame zone from 0 to 15.') | ||
return | ||
end | ||
|
||
-- validate level | ||
if level == nil then | ||
player:printToPlayer(string.format('Fame Zone %s: %s - No other parameters requested.', famezone, fameZoneNames[famezone])) | ||
return | ||
elseif level < 0 or level > 9 then | ||
error(player, 'You must provide a fame level from 1 to 9.') | ||
return | ||
end | ||
|
||
local fameBaseValues = { 0, 50, 125, 225, 325, 425, 488, 550, 613 } | ||
local fameMultiplier = xi.settings.map.FAME_MULTIPLIER | ||
|
||
if level > 6 and (famezone >= 6 and famezone <= 14) then -- Abyssea fame caps at level 6 | ||
level = 6 | ||
error(player, 'Abyssea fame capped at level 6. Setting to level 6.') | ||
end | ||
|
||
targ:setFame(famezone, fameBaseValues[level] / fameMultiplier) | ||
player:printToPlayer(string.format('Set %s\'s fame for fame area %i (%s) to %i (Level %i).', targ:getName(), famezone, fameZoneNames[famezone], fameBaseValues[level], level)) | ||
end | ||
|
||
return commandObj |
Oops, something went wrong.