Heya all!
I've recently ported my Luas from gearswap over to Luashitacast, this has been a generally ok thing, I've used Gemini a few times to help me convert and it's worked ok, until now.
My Samurai Lua works....ish. The Tp engaged works and the idle sets work, but it will not swap meditate gear and it will not WS....
Anyone got any ideas at all?
Help!!
local profile = {};
local sets = {
['Idle_Standard'] = {
Ammo = 'Beetle Arrow',
Head = 'Empress Hairpin',
Neck = 'Chivalrous Chain',
Ear1 = 'Bushinomimi',
Ear2 = 'Brutal Earring',
Body = 'Kupo Suit',
Hands = { Name = 'Shade Mittens', Augment = { [1] = 'STR+2', [2] = 'INT+2' } },
Ring1 = 'Sniper\'s Ring',
Ring2 = 'Rajas Ring',
Back = 'Cerberus Mantle',
Waist = 'Ninurta\'s Sash',
Feet = 'Gothic Sabatons',
},
Idle_DT = {
Ammo = "Staunch Tathlum +1",
Head = { Name = "Valorous Mask", Augment = { [1] = "Mag. Acc.+11", [2] = "STR+15", [3] = "Weapon skill damage +5%", [4] = "Accuracy+12 Attack+12" } },
Body = "Tartarus Platemail",
Hands = "Wakido Kote +3",
Legs = { Name = "Ryuo Hakama +1", Augment = { [1] = "Accuracy+25", [2] = '"Store TP"+5', [3] = "Phys. dmg. taken -4" } },
Feet = { Name = "Loyalist Sabatons", Augment = { [1] = "STR+10", [2] = "Attack+15", [3] = "Phys. dmg. taken -3%", [4] = "Haste+3" } },
Neck = "Loricate Torque +1",
Waist = "Flume Belt",
Ear1 = "Genmei Earring",
Ear2 = "Etiolation Earring",
Ring1 = "Defending Ring",
Ring2 = "Vocane Ring",
Back = { Name = "Smertrios's Mantle", Augment = { [1] = "STR+20", [2] = "Accuracy+20 Attack+20", [3] = "STR+10", [4] = '"Dbl.Atk."+10', [5] = "Damage taken-5%" } },
},
['TP_Standard'] = {
Main = 'Hagun',
Sub = 'Pole Grip',
Range = 'Ifrit\'s Bow',
Ammo = 'Beetle Arrow',
Head = 'Walahra Turban',
Neck = 'Chivalrous Chain',
Ear1 = 'Brutal Earring',
Ear2 = 'Bushinomimi',
Body = 'Haubergeon',
Hands = 'Dusk Gloves',
Ring1 = 'Sniper\'s Ring',
Ring2 = 'Rajas Ring',
Back = 'Cerberus Mantle',
Waist = 'Ninurta\'s Sash',
Legs = { Name = 'Myn. haidate +1', Augment = { [1] = 'Haste+4', [2] = '"Store TP"+4' } },
Feet = 'Sarutobi Kyahan',
},
TP_DT = {
Ammo = "Staunch Tathlum +1",
Head = "Otronif mask +1",
Neck = "Loricate torque +1",
Ear1 = "Hearty earring",
Ear2 = "Telos earring",
Body = "Emet harness +1",
Hands = "Umuthi gloves",
Ring1 = "Patricius ring",
Ring2 = "Defending ring",
Back = "Mecistopins mantle",
Waist = "Flume belt",
Legs = "Valorous hose",
Feet = "Amm greaves",
},
WS_Shoha = {
Ammo = 'Beetle Arrow',
Head = 'Wyvern Helm',
Neck = 'Chivalrous Chain',
Ear1 = 'Brutal Earring',
Ear2 = 'Bushinomimi',
Body = 'Haubergeon',
Hands = 'Pallas\'s bracelets',
Ring1 = 'Ruby Ring',
Ring2 = 'Rajas Ring',
Back = 'Cerberus Mantle',
Waist = 'Warwolf Belt',
Legs = { Name = 'Myn. haidate +1', Augment = { [1] = 'Haste+4', [2] = '"Store TP"+4' } },
Feet = 'Hmn. Sune-Ate',
},
WS_Impulse = {
Ammo = 'Beetle Arrow',
Head = 'Wyvern Helm',
Neck = 'Chivalrous Chain',
Ear1 = 'Brutal Earring',
Ear2 = 'Bushinomimi',
Body = 'Haubergeon',
Hands = 'Pallas\'s bracelets',
Ring1 = 'Ruby Ring',
Ring2 = 'Rajas Ring',
Back = 'Cerberus Mantle',
Waist = 'Warwolf Belt',
Legs = { Name = 'Myn. haidate +1', Augment = { [1] = 'Haste+4', [2] = '"Store TP"+4' } },
Feet = 'Hmn. Sune-Ate',
},
WS_Ageha = {
Ammo = "Knobkierrie",
Head = "Flam. Zucchetto +2",
Body = "Flamma Korazin +2",
Hands = "Flam. Manopolas +2",
Legs = "Flamma Dirs +2",
Feet = "Flam. Gambieras +2",
Neck = "Sam. Nodowa +2",
Waist = "Caudata Belt",
Ear1 = "Telos Earring",
Ear2 = "Cessance Earring",
Ring1 = "Regal Ring",
Ring2 = "Flamma Ring",
Back = { Name = "Smertrios's Mantle", Augment = { [1] = "STR+20", [2] = "Accuracy+20 Attack+20", [3] = "STR+10", [4] = "Weapon skill damage +10%" } },
},
WS_Jinpu = {
Ammo = "Knobkierrie",
Head = { Name = "Valorous Mask", Augment = { [1] = "Mag. Acc.+11", [2] = "STR+15", [3] = "Weapon skill damage +5%", [4] = "Accuracy+12 Attack+12" } },
Body = { Name = "Sakonji Domaru +3", Augment = { [1] = 'Enhances "Overwhelm" effect' } },
Hands = { Name = "Valorous Mitts", Augment = { [1] = "Accuracy+13", [2] = "Weapon skill damage +4%", [3] = "DEX+6" } },
Legs = "Wakido Haidate +3",
Feet = { Name = "Valorous Greaves", Augment = { [1] = '"Cure" potency +4%', [2] = "Accuracy+3", [3] = "Weapon skill damage +4%", [4] = "Accuracy+19 Attack+19", [5] = 'Mag. Acc.+9 "Mag.Atk.Bns."+9' } },
Neck = "Fotia Gorget",
Waist = "Fotia Belt",
Ear1 = { Name = "Moonshade Earring", Augment = { [1] = "Accuracy+4", [2] = "TP Bonus +250" } },
Ear2 = "Friomisi Earring",
Ring1 = "Acumen Ring",
Ring2 = "Niqmaddu Ring",
Back = { Name = "Smertrios's Mantle", Augment = { [1] = "STR+20", [2] = "Accuracy+20 Attack+20", [3] = "STR+10", [4] = "Weapon skill damage +10%" } },
},
WS_Namas = {
Ammo = "Eminent Arrow",
Head = "Flam. Zucchetto +2",
Body = { Name = "Sakonji Domaru +3", Augment = { [1] = 'Enhances "Overwhelm" effect' } },
Hands = "Flam. Manopolas +2",
Legs = "Wakido Haidate +3",
Feet = { Name = "Valorous Greaves", Augment = { [1] = '"Cure" potency +4%', [2] = "Accuracy+3", [3] = "Weapon skill damage +4%", [4] = "Accuracy+19 Attack+19", [5] = 'Mag. Acc.+9 "Mag.Atk.Bns."+9' } },
Neck = "Fotia Gorget",
Waist = "Yemaya Belt",
Ear1 = "Telos Earring",
Ear2 = "Enervating Earring",
Ring1 = "Hajduk Ring",
Ring2 = "Hajduk Ring",
Back = { Name = "Smertrios's Mantle", Augment = { [1] = "STR+20", [2] = "Accuracy+20 Attack+20", [3] = "STR+10", [4] = "Weapon skill damage +10%" } },
},
FastCast = {},
};
-- Standardized fallback references
sets.TP_Ionis = sets.TP_Standard;
sets.TP_Marches = sets.TP_Standard;
sets.TP_AccuracyLite = sets.TP_Standard;
sets.TP_AccuracyFull = sets.TP_Standard;
sets.WS_Kaiten = sets.WS_Shoha;
sets.WS_Fudo = sets.WS_Shoha;
sets.WS_Sonic = sets.WS_Impulse;
sets.WS_Stardiver = sets.WS_Impulse;
sets.WS_Rana = sets.WS_Impulse;
sets.WS_Enpi = sets.WS_Impulse;
sets.WS_Kasha = sets.WS_Shoha;
sets.WS_Gekko = sets.WS_Shoha;
sets.WS_Yuki = sets.WS_Impulse;
profile.Sets = sets;
-- Toggle Tracking Variables
local tpIndex = 1;
local tpModes = { "Standard", "Ionis", "Marches", "AccuracyLite", "AccuracyFull", "DT" };
local idleIndex = 1;
local idleModes = { "Standard", "DT" };
profile.OnLoad = function()
gSettings.AllowAddSet = true;
end
profile.OnUnload = function()
end
profile.HandleCommand = function(args)
if (args[1] == "toggle" and args[2] == "TP") or args[1] == "tp" then
tpIndex = tpIndex + 1;
if tpIndex > #tpModes then tpIndex = 1 end
print("[SAM] TP Mode set to: " .. tpModes[tpIndex]);
elseif (args[1] == "toggle" and args[2] == "Idle") or args[1] == "idle" then
idleIndex = idleIndex + 1;
if idleIndex > #idleModes then idleIndex = 1 end
print("[SAM] Idle Mode set to: " .. idleModes[idleIndex]);
end
end
profile.HandleDefault = function()
local player = gData.GetPlayer();
if (player.Status == "Engaged") then
local currentTPSet = sets["TP_" .. tpModes[tpIndex]];
if currentTPSet then
gFunc.EquipSet(currentTPSet);
else
gFunc.EquipSet(sets.TP_Standard);
end
else
local currentIdleSet = sets["Idle_" .. idleModes[idleIndex]];
if currentIdleSet then
gFunc.EquipSet(currentIdleSet);
else
gFunc.EquipSet(sets.Idle_Standard);
end
end
end
profile.HandlePrecast = function()
local action = gData.GetAction();
local actionType = tostring(action.Type):lower();
local actionName = action.Name;
-- Job Abilities
if actionType == 'jobability' or actionType == 'job ability' then
if actionName == "Blade Bash" then
gFunc.EquipSet({ Hands = "Sakonji Kote +3" });
elseif actionName == "Meditate" then
gFunc.EquipSet({ Head = "Myochin Kabuto", Hands = { Name = "Sakonji Kote +3", Augment = { [1] = 'Enhances "Blade Bash" effect' } }, Back = "Smertrios's Mantle" });
elseif actionName == "Warding Circle" then
gFunc.EquipSet({ Head = "Wakido Kabuto +1" });
elseif actionName == "Meikyo Shisui" then
gFunc.EquipSet({ Feet = "Sakonji Sune-Ate +3" });
end
return;
end
-- Weapon Skills
if actionType == 'weaponskill' or actionType == 'weapon skill' or actionType == 'ws' then
if actionName == "Tachi: Shoha" then gFunc.EquipSet(sets.WS_Shoha);
elseif actionName == "Tachi: Fudo" then gFunc.EquipSet(sets.WS_Fudo);
elseif actionName == "Tachi: Rana" then gFunc.EquipSet(sets.WS_Rana);
elseif actionName == "Tachi: Enpi" then gFunc.EquipSet(sets.WS_Enpi);
elseif actionName == "Tachi: Kaiten" then gFunc.EquipSet(sets.WS_Kaiten);
elseif actionName == "Impulse Drive" then gFunc.EquipSet(sets.WS_Impulse);
elseif actionName == "Tachi: Ageha" then gFunc.EquipSet(sets.WS_Ageha);
elseif actionName == "Tachi: Kasha" then gFunc.EquipSet(sets.WS_Kasha);
elseif actionName == "Tachi: Gekko" then gFunc.EquipSet(sets.WS_Gekko);
elseif actionName == "Tachi: Yukikaze" then gFunc.EquipSet(sets.WS_Yuki);
elseif actionName == "Tachi: Jinpu" or actionName == "Tachi: Koki" or actionName == "Tachi: Kagero" or actionName == "Tachi: Goten" then
gFunc.EquipSet(sets.WS_Jinpu);
local env = gData.GetEnvironment();
if (env.WeatherElement == action.Element or env.DayElement == action.Element) then
gFunc.EquipSet({ Waist = "Hachirin-no-Obi" });
end
elseif actionName == "Sonic Thrust" then gFunc.EquipSet(sets.WS_Sonic);
elseif actionName == "Stardiver" then gFunc.EquipSet(sets.WS_Stardiver);
elseif actionName == "Namas Arrow" then gFunc.EquipSet(sets.WS_Namas);
else
-- DEFAULT WS FALLBACK: If string matching fails, load Shoha anyway
gFunc.EquipSet(sets.WS_Shoha);
end
return;
end
-- Spells
if actionType == 'spell' or actionType == 'magic' then
gFunc.EquipSet(sets.FastCast);
end
end
profile.HandleMidcast = function()
end
return profile;
