File Issue

Language: JP EN DE FR
New Items
2023-11-19
users online
Forum » Windower » Support » File Issue
File Issue
 Lakshmi.Elidyr
Offline
Server: Lakshmi
Game: FFXI
user: elii
Posts: 911
By Lakshmi.Elidyr 2017-03-14 20:07:10
Link | Quote | Reply
 
Is it possible for the [windower / gearswap] to have two different gearswap files loaded at the same time? Im having some really buggy issues with half the script working other half not. Ill post code if I need to. Basically I can no longer call self_command functions or adjust variables, as well as not shorthand calls using //gs c. I can however do it manually in console, but it always says command not found, but the command is indeed in there.

Also the same exact script that works on 5 other characters, doesn't work on this one. I think something got wonky in the include / name scheme while deleting, and re-creating the file.

(Further diving - I can confirm almost everything works as is, except anything related to self_command(command). It will not work regardless of what I do. New file, working file, old file. Nothing works.[Uninstall gearswap, re-install did not fix.])


Main File.
Code

function get_sets()
    
    -- **Keybind Settings** ^(Control) | !(Alt) | @(Windows Key)
    -- (Combat Modes)
    send_command('bind @f1 gs c _modeNA')      -- Idle while not in combat mode.
    send_command('bind @f2 gs c _modeTP')      -- Idle while engaged in combat.
    send_command('bind @f3 gs c _modeMID')     -- Equip while casting (Midcast).
    send_command('bind @f4 gs c _modeWS')      -- Set Weaponskill mode.
    
    -- (Gear-Specific Modes)
    --send_command('bind @f5 gs c ')             -- Open Command slot
    send_command('bind @f6 gs c _modeLOCKW')   -- Lock Weapon, Sub, and Ranged for Trials or No TP loss.
    send_command('bind @f7 gs c _modeLOCKG')   -- Lock Head, Body, Hands, Legs, and Feet for trials.
    send_command('bind @f8 gs c _modeLOCKC')   -- Lock Back for capacity point farming.
    
    -- (Special Toggle) -- Used with Logitech Keyboard if binds are setup.    
    send_command('bind ^!@f7 gs c _modeKITE')  -- Lock on kiting gear set.
    send_command('bind ^!@f8 gs c _modeMDTT')  -- Lock on magic damage taken gear set.
    send_command('bind ^!@f9 gs c _modeMEVT')  -- Lock on magic evasion gear set.
    
    send_command('bind ^!@f4 gs c _modeDEBUG') -- Toggle on, and off extended debug information in chat log.
    send_command('bind ^!@f5 gs c _modeDBOX')  -- Toggle on, and off dual box features.
    
    -- (Multibox Commands) -- Used for running commands to control multiple accounts.
    send_command('bind ^!@f1 gs c send start wring') -- Send Warp Ring command to all accounts in party.
    send_command('bind @f gs c send start follow')   -- Send follow command to other accounts in party.
    send_command('bind @s gs c send stop follow')    -- Send stop command to other accounts in party.
    
    -- These are mode default variables. Be careful adjusting as it may cause unwanted changes to your gearswap.
    _modeNAi     = 1;       -- Idle Sets Variable.
    _modeTPi     = 1;       -- TP Sets Variable.
    _modeMIDi    = 1;       -- Midcast Sets Variable.
    _modeWSi     = 1;       -- Weaponskill Sets Variable.
    _modeLOCKWi  = 1;       -- Lock Weapons Variable.
    _modeLOCKGi  = 1;       -- Lock All Gear Variable.
    _modeLOCKCi  = 1;       -- Lock Capacity Set Variable.
    _modeKITEi   = 1;       -- Lock Kite Set Variable.
    _modeMDTTi   = 1;       -- Lock Magic Damage Taken Set Variable.
    _modeMEVTi   = 1;       -- Lock Magic Evasion Set Variable.
    
    _DEBUG	 = false;   -- Outputs variables and info to chatlog to see whats going on with GearSwap. Useful for determining ability types and ability/spell names.
    _DBOX        = true;    -- Enables support for special dual box function using send, autoexec, and buddypal addon.
    --send_command('@ autoexec load DualBoxCommands')
    
    -- Include job-specific library.
    include('/library/' .. player.name .. player.main_job .. 'Library.lua')
    
    -- Multibox Configs.
    include('/library/Commands.lua')
    alt_names = T{'Elidyr','Lilyia','Lildyr','Cheddarz','Chipples','Lilchipples'}
     
    -- Initialize all settings from library.
    LoadSettings()
    
    -- **Unload Keybind Settings**
    function file_unload()
        
        send_command('unbind @`')
        send_command('unbind @f1')
        send_command('unbind @f2')
	send_command('unbind @f3')
	send_command('unbind @f4')
	send_command('unbind @f5')
	send_command('unbind @f6')
	send_command('unbind @f7')
	send_command('unbind @f8')
	send_command('unbind @f9')
	send_command('unbind @f10')
	send_command('unbind @f11')
	send_command('unbind @f12')
	send_command('unbind @1')
        send_command('unbind @2')
	send_command('unbind @3')
	send_command('unbind @4')
	send_command('unbind @5')
	send_command('unbind @6')
	send_command('unbind @7')
	send_command('unbind @8')
	send_command('unbind @9')
	send_command('unbind @0')
	send_command('unbind @-')
	send_command('unbind @=')
	send_command('unbind @insert')
	send_command('unbind @delete')
	send_command('unbind @home')
	send_command('unbind @end')
        
	-- [G]Keys for Logitech Keyboards (Have to match binds in Logitech Profile)
	send_command('unbind ^!@f1')
	send_command('unbind ^!@f2')
	send_command('unbind ^!@f3')
	send_command('unbind ^!@f4')
	send_command('unbind ^!@f5')
	send_command('unbind ^!@f6')
	send_command('unbind ^!@f7')
	send_command('unbind ^!@f8')
	send_command('unbind ^!@f9')
        
	send_command('unbind !@f1')
	send_command('unbind !@f2')
	send_command('unbind !@f3')
	send_command('unbind !@f4')
	send_command('unbind !@f5')
	send_command('unbind !@f6')
	send_command('unbind !@f7')
	send_command('unbind !@f8')
	send_command('unbind !@f9')
        
	send_command('unbind ^@f1')
	send_command('unbind ^@f2')
	send_command('unbind ^@f3')
	send_command('unbind ^@f4')
	send_command('unbind ^@f5')
	send_command('unbind ^@f6')
	send_command('unbind ^@f7')
	send_command('unbind ^@f8')
	send_command('unbind ^@f9')
	
	send_command('@ autoexec clear')
    
    end
    
end



function precast(spell, act)
    
    -- DEBUG: Output precast spell information to chat log.
    if _DEBUG == true then
        send_command('@ input /echo ** Precast - Name: '..spell.name..', Type: '..spell.type..', Element: '..spell.element..' ')
        send_command('@ input /echo ** Weather Element: '..world.weather_element..' ')
        send_command('@ input /echo ** Target Type: '..player.target.type..' ')
        send_command('@ input /echo **************************************************************')
        
        if spell.skill then
            send_command('@ input /echo ** Skill Type: '..spell.skill..' ')
            send_command('@ input /echo **************************************************************')
        end
        
    end
    
    LocalPrecast(spell, act)
    
end



function midcast(spell,act)
    
    -- DEBUG: Output midcast spell information to chat log.
    if _DEBUG == true then
        send_command('@ input /echo ** Midcast - Name: '..spell.name..', Type: '..spell.type..', Element: '..spell.element..' ')
        send_command('@ input /echo ** Weather Element: '..world.weather_element..' ')
        send_command('@ input /echo ** Target Type: '..player.target.type..' ')
        send_command('@ input /echo **************************************************************')
        
        if spell.skill then
            send_command('@ input /echo ** Skill Type: '..spell.skill..' ')
            send_command('@ input /echo **************************************************************')
        end
        
    end
    
    LocalMidcast(spell, act)
    
end



function aftercast(spell, act)
    
    -- Equip selected TP set if engaged on a mob.
    if player.status == 'Engaged' then
        equip(sets.TP[sets.TP.Mode[_modeTPi]])
    
    -- Not engaged then default back to Idle set.
    else 
        equip(sets.NA[sets.NA.Mode[_modeNAi]])
    
    end
    
    LocalAftercast(spell, act)
    
end



function status_change(new, old)
    
    -- FOR DEBUG PURPOSES ONLY!
    if _DEBUG == true then
        send_command('@ input /echo ** Status - New: '..new..', Old: '..old..' ')
        send_command('@ input /echo **************************************************************')
    end
    
    -- Equip selected TP set if engaged on a mob.
    if player.status == 'Engaged' then
        equip(sets.TP[sets.TP.Mode[_modeTPi]])
    
    -- Not engaged then default back to Idle set.
    else 
        equip(sets.NA[sets.NA.Mode[_modeNAi]])
    
    end
    
   LocalStatusChange(new, old)
    
end



function buff_change(name, gain)
    
    -- FOR DEBUG PURPOSES ONLY!
    if _DEBUG == true then
        
        if gain then 
            send_command('@ input /echo ** Buff - Name: '..name..', Buff Gained! ')
            send_command('@ input /echo **************************************************************')
        else
            send_command('@ input /echo ** Buff - Name: '..name..', Buff Lost! ')
            send_command('@ input /echo **************************************************************')
        end
        
    end
    
    LocalBuffChange(name, gain)
    
end



function pet_change(pet, gain)
    
    LocalPetChange(pet, gain)
    
end



function pet_midcast(spell)
    
    LocalPetMidcast(spell)
    
end



function pet_aftercast(spell)
    
    LocalPetAftercast(spell)
    
end



function pet_status_change(new, old)
    
    LocalPetStatusChange(new, old)
    
end



function self_command(command)    
    
    -- Toggle for Idle Mode.
    if command == '_modeNA' then
        
        -- Keeps track of variable.
        if _modeNAi < 3 then _modeNAi = _modeNAi + 1 else _modeNAi = 1 end
        
        add_to_chat(200, '<< Current Idle Mode: '..sets.NA.Mode[_modeNAi]..'. >>')
        equip(sets.NA[sets.NA.Mode[_modeNAi]])
    
    -- Toggle for TP Mode.
    elseif command == '_modeTP' then
        
        -- Keeps track of variable.
        if _modeTPi < 5 then _modeTPi = _modeTPi + 1 else _modeTPi = 1 end
        
        add_to_chat(200, '<< Current TP Mode: '..sets.TP.Mode[_modeTPi]..'. >>')
        equip(sets.TP[sets.TP.Mode[_modeTPi]])
    
    -- Toggle for Midcasting Mode.
    elseif command == '_modeMID' then
        
        -- Keeps track of variable.
        if _modeMIDi < 4 then _modeMIDi = _modeMIDi + 1 else _modeMIDi = 1 end
        
        add_to_chat(200, '<< Current Midcast Mode: '..sets.MID.Mode[_modeMIDi]..'. >>')
        equip(sets.MID[sets.MID.Mode[_modeMIDi]])
    
    -- Toggle for Weaponskill Mode.
    elseif command == '_modeWS' then
        
        -- Keeps track of variable.
        if _modeWSi < 2 then _modeWSi = _modeWSi + 1 else _modeWSi = 1 end
        
        if _modeWSi == 1 then
            add_to_chat(200, '<< Weaponskill mode: Attack. >>')
            
        elseif _modeWSi == 2 then
            add_to_chat(200, '<< Weaponskill mode: Accuracy. >>')
            
        end
    
    -- Toggle for locking weapons while doing trials or no TP Loss.
    elseif command == '_modeLOCKW' then
        
        if _modeLOCKWi < 2 then _modeLOCKWi = _modeLOCKWi + 1 else _modeLOCKWi = 1 end        
        
        if _modeLOCKWi == 1 then
            add_to_chat(200, '<< Weapon|Sub|Ranged slots are now Unlocked. >>')
            enable('main','sub','range')
            
        elseif _modeLOCKWi == 2 then
            add_to_chat(200, '<< Weapon|Sub|Ranged slots are now Locked. >>')
            disable('main','sub','range')
            
        end
    
    -- Lock all equipment slots.
    elseif command == '_modeLOCKG' then
        
        -- Keeps track of variable.
        if _modeLOCKGi < 2 then _modeLOCKGi = _modeLOCKGi + 1 else _modeLOCKGi = 1 end
        
        if _modeLOCKGi == 1 then            
            add_to_chat(200, '<< Gear Lock Mode: Disabled. >>')
            enable('main','sub','range','ammo','head','neck','ear1','ear2','body','hands','ring1','ring2','back','waist','legs','feet')
            
            if player.status == 'Engaged' then
                equip(sets.TP[sets.TP.Mode[_modeTPi]])
                
            else 
                equip(sets.NA[sets.NA.Mode[_modeNAi]])
                
            end	
            
        elseif _modeLOCKGi == 2 then
            add_to_chat(200, '<< Gear Lock Mode: Enabled. >>')
            disable('main','sub','range','ammo','head','neck','ear1','ear2','body','hands','ring1','ring2','back','waist','legs','feet')
            
        end
    
    -- Lock back slot, and ring for Capacity Point farming.
    elseif command == '_modeLOCKC' then
        
        -- Keeps track of variable.
        if _modeLOCKCi < 2 then _modeLOCKCi = _modeLOCKCi + 1 else _modeLOCKCi = 1 end
        
        if _modeLOCKCi == 1 then            
            add_to_chat(200, '<< Capacity Mode: Disabled. >>')
            enable('back','ring2')
            
            if player.status == 'Engaged' then
                equip(sets.TP[sets.TP.Mode[_modeTPi]])
                
            else 
                equip(sets.NA[sets.NA.Mode[_modeNAi]])
                
            end	
            
        elseif _modeLOCKCi == 2 then
            add_to_chat(200, '<< Capacity Mode: Enabled. >>')
            equip(sets.Capacity)
            disable('back','ring2')
            
        end
    
    -- Lock all current gear for kiting, or increased speed.
    elseif command == '_modeKITE' then
        add_to_chat(200, '<< Kite Mode: Triggered. >>')
        equip(sets.Kite)
    
    -- Lock all current gear for magic damage taken.
    elseif command == '_modeMDTT' then
        add_to_chat(200, '<< MDT Mode: Triggered. >>')
        equip(sets.MDT)
    
    -- Lock all current gear for magic evasion.
    elseif command == '_modeMEVT' then
        add_to_chat(200, '<< Magic Evasion Mode: Triggered. >>')
        equip(sets.MEV)
    
    -- Toggle dual box mode on, and off.
    elseif command == '_modeDBOX' then
        
        -- Keeps track of variable.
        if _DBOX == false then
            _DBOX = true
            add_to_chat(200, '<< Dual Box Mode Enabled. >>')
            
        elseif _DBOX == true then
            _DBOX = false
            add_to_chat(200, '<< Dual Box Mode Disabled. >>')
            
        end
    
    -- Toggle debug mode on, and off.
    elseif command == '_modeDEBUG' then
        
        -- Keeps track of variable.
        if _DEBUG == false then
            _DEBUG = true
            add_to_chat(200, '<< Debug Mode Enabled. >>')
            
        elseif _DEBUG == true then
            _DEBUG = false
            add_to_chat(200, '<< Debug Mode Disabled. >>')
            
        end
        
    end
    
    LocalSelfCommand(command)
    
    -- ***********************************************************************
    -- All self commands for sending information to other accounts starts here.
    -- ***********************************************************************
    
    -- Start follow on all accounts.
    if command == 'send start follow' then
        sendCommand = 'catch start follow ' .. player.name
        SendCommandOthers(sendCommand, alt_names)
        
    -- Start Warp Ring on all accounts.
    elseif command == 'send start wring' then
        sendCommand = 'catch start wring'
        SendCommandAll(sendCommand, alt_names)
        send_command('input /p Warping out.')
        
    -- Cancel follow on all accounts.
    elseif command == 'send stop follow' then
        sendCommand = 'catch stop follow ' .. player.name
        SendCommandOthers(sendCommand, alt_names)
        
    -- ***********************************************************************
    -- All self commands for catching information to from other accounts starts here.
    -- ***********************************************************************
    
    elseif #command > 0 then
        catchCommands(command, alt_names)
        
    end
            
end





Included Library
Code

--[[ Elidyr : Template Library ]]--

-- All main settings for file located here. Initiates all key bind functions, and set default variables.
function LoadSettings()
    
    -- **Keybind Settings** ^(Control) | !(Alt) | @(Windows Key)
    
    -- (Job Specific Key Binds)
    send_command('bind @f9 gs c ')             -- Open Command slot
    send_command('bind @f10 gs c ')            -- Open Command slot
    send_command('bind @f11 gs c ')            -- Open Command slot
    send_command('bind @f12 gs c ')            -- Open Command slot
    
    -- Job specific key binds.
    send_command('bind @insert input /ja "Name" <me>')  -- Description of key bind.
    
    -- These are job-specific variables. Be careful adjusting as it may cause unwanted changes to your gearswap.
    
    -- ** List of all Job Ability sets. Will always equip this set when the assigned Job Ability is used. 
    sets.JobAbility = {}
        
        sets.JobAbility['JA NAME'] = {}
    
    -- ** List of all idle sets. Will always equip this set when engaged, and not performing any other actions.
    sets.NA = {}
    sets.NA.Mode = {'IDLE','PDT','MDT'}
    
        -- Idle Build
        sets.NA.IDLE = 
        {ammo  = "",
         head  = "",
         neck  = "",
         ear1  = "",
         ear2  = "",
         body  = "",
         hands = "",
         ring1 = "",
         ring2 = "",
         back  = "",
         waist = "",
         legs  = "",
         feet  = ""}
 
        -- Physical Damage Taken Build
        sets.NA.PDT =
        {}
        
        -- Magical Damage Taken Build
        sets.NA.MDT =
        {}
    
    -- ** List of all melee sets. Will always equip this set when engaged, and not performing any other actions.
    sets.TP = {}
    sets.TP.Mode = {'TP1','TP2','TP3','PDT','MDT'}			
    
        -- Low Accuracy Build
        sets.TP.TP1 =
        {}
    
        -- Mid Accuracy Build
        sets.TP.TP2 =
        {}
    
        -- High Accuracy Build
        sets.TP.TP3 =
        {}
    
        -- Physical Damage Taken Build
        sets.TP.PDT =
        {}
    
        -- Magical Damage Taken Build
        sets.TP.MDT =
        {}
    
    -- ** List of all midcasting sets. Will always midcast in this set when casting elemental magic.
    sets.MID = {}
    sets.MID.Mode = {'MAB','ACC','BURST','BURSTACC'}
    
        -- Magic Attack Bonus Build
        sets.MID.MAB =
        {}
    
        -- Magic Accuracy Build
        sets.MID.ACC =
        {}
        
        -- Magic Burst Build
        sets.MID.BURST =
        {}
        
        -- Magic Burst Accuracy Build
        sets.MID.BURSTACC =
        {}
    
    -- ** List of all weaponskill sets. Will always weaponskill in default unless specific set is made.
    sets.WSATT = {}
        
        sets.WSATT['Default'] =
        {}
        
    sets.WSACC = {}
        
        sets.WSACC['Default'] =
        {}
    
    -- ** List of all magic sets to be used during midcast. Must setup appropriately.
    sets.Magic = {}
    
        sets.Magic.HealingMagic =
        {}
    
        sets.Magic.HealingMagicMax =
        {}
        
        sets.Magic.HealingMagicSelf =
        {}
    
        sets.Magic.EnhancingMagic =
        {}
    
        sets.Magic.EnfeeblingMagic =
        {}
    
        sets.Magic.DarkMagic =
        {}
    
        -- ** List of all magic sets to be used during precast. Must setup appropriately.
        sets.Magic.Precast =
        {}
    
        sets.Magic.PreHealing =
        {}
    
        sets.Magic.PreEnfeebling =
        {}
    
        sets.Magic.PreStoneskin =
        {}
    
    -- ** List of all sets that target a specific action. Must be manually setup in functions below.
    sets.Stoneskin =
    {}
    
    sets.Capacity =
    {ring2 = "Trizek Ring",
     back  = "Mecisto. Mantle"}
    
    sets.Crafting =
    {ammo  = "",
     head  = "",
     neck  = "",
     ear1  = "",
     ear2  = "",
     body  = "",
     hands = "",
     ring1 = "",
     ring2 = "",
     back  = "",
     waist = "",
     legs  = "",
     feet  = ""}
    
    sets.Kite =
    {ammo  = "",
     head  = "",
     neck  = "",
     ear1  = "",
     ear2  = "",
     body  = "",
     hands = "",
     ring1 = "",
     ring2 = "",
     back  = "",
     waist = "",
     legs  = "",
     feet  = ""}
    
    sets.Treasure =
    {ammo  = "",
     head  = "",
     neck  = "",
     ear1  = "",
     ear2  = "",
     body  = "",
     hands = "",
     ring1 = "",
     ring2 = "",
     back  = "",
     waist = "",
     legs  = "",
     feet  = ""}
    
    sets.MDT =
    {ammo  = "",
     head  = "",
     neck  = "",
     ear1  = "",
     ear2  = "",
     body  = "",
     hands = "",
     ring1 = "",
     ring2 = "",
     back  = "",
     waist = "",
     legs  = "",
     feet  = ""}
    
    sets.MEV =
    {ammo  = "",
     head  = "",
     neck  = "",
     ear1  = "",
     ear2  = "",
     body  = "",
     hands = "",
     ring1 = "",
     ring2 = "",
     back  = "",
     waist = "",
     legs  = "",
     feet  = ""}
    
    enable('main','sub','range','ammo','head','neck','ear1','ear2','body','hands','ring1','ring2','back','waist','legs','feet')
    
end

function LocalPrecast(spell, act)
    
    -- Handles all logic if Job Ability is used.
    if spell.type == 'JobAbility' then
        
        if sets.JobAbility[spell.english] then
            equip(sets.JobAbility[spell.english])
            
        end
        
    end
    
    
    -- Handles all logic if Ranged Attack is used.
    if spell.name == 'Ranged' then
        
    end
    
    
    -- Handles all logic if a Weaponskill is used.
    if spell.type == 'WeaponSkill' then
        
        if _modeWSi == 1 then
            
            if sets.WSATT[spell.name] then
                equip(sets.WSATT[spell.name])
            
            else
                equip(sets.WSATT['Default'])
                
            end
            
        elseif _modeWSi == 2 then
            
            if sets.WSACC[spell.name] then
                equip(sets.WSACC[spell.name])
            
            else
                equip(sets.WSACC['Default'])
                
            end
            
        end
        
    end
    
    -- Handles all logic before a spell is cast.		
    if spell.skill == "Divine Magic" then
        equip(sets.Magic.Precast)
        
    elseif spell.skill == "Enhancing Magic" then        
        
        if string.find(spell.name:lower(), 'stoneskin') then
            equip(sets.Magic.Precast, sets.Magic.PreStoneskin)
            
        else
            equip(sets.Magic.Precast)
            
        end
        
    elseif spell.skill == "Elemental Magic" then
        equip(sets.Magic.Precast)
        
    elseif spell.skill == "Singing Magic" then
        equip(sets.Magic.Precast)
        
    elseif spell.skill == "Wind Magic" then
        equip(sets.Magic.Precast)
        
    elseif spell.skill == "Healing Magic" then
        equip(sets.Magic.Precast)
        
    elseif spell.skill == "Enfeebling Magic" then
        equip(sets.Magic.Precast)
        
    elseif spell.skill == "Dark Magic" then
        equip(sets.Magic.Precast)
        
    elseif spell.skill == "String Magic" then
        equip(sets.Magic.Precast)
        
    elseif spell.skill == "Blue Magic" then
        equip(sets.Magic.Precast)
        
    end
     
end

function LocalMidcast(spell, act)
    
    -- Handles all logic if Job Ability is used.
    if spell.type == 'JobAbility' then	
        
        if sets.JobAbility[spell.english] then
            equip(sets.JobAbility[spell.english])
            
        end
        
    end
    
    
    -- Handles all logic if Ranged Attack is used.
    if spell.name == 'Ranged' then
        
    end
    
    
    -- Handles all logic if a Weaponskill is used.
    if spell.type == 'WeaponSkill' then
        
        if _modeWSi == 1 then
            
            if sets.WSATT[spell.name] then
                equip(sets.WSATT[spell.name])
            
            else
                equip(sets.WSATT['Default'])
                
            end
            
        elseif _modeWSi == 2 then
            
            if sets.WSACC[spell.name] then
                equip(sets.WSACC[spell.name])
            
            else
                equip(sets.WSACC['Default'])
                
            end
            
        end
        
    end
    
     -- Handles all logic during the casting of a spell.
    if spell.skill == "Divine Magic" then
        
    elseif spell.skill == "Enhancing Magic" then
        
        if string.find(spell.name:lower(), 'stoneskin') then
            equip(sets.Magic.EnhancingMagic, sets.Stoneskin)
            
        elseif string.find(spell.name:lower(), 'aquaveil') then
            equip(sets.Magic.EnhancingMagic, sets.Aquaveil)
            
        elseif string.find(spell.name:lower(), 'regen') then
            equip(sets.Magic.EnhancingMagic, sets.Regen)
            
        else
            equip(sets.Magic.EnhancingMagic)
            
        end
        
    elseif spell.skill == "Elemental Magic" then
        equip(sets.MID[sets.MID.Mode[_modeMIDi]])
        
    elseif spell.skill == "Singing Magic" then
        
    elseif spell.skill == "Wind Magic" then
        
    elseif spell.skill == "Healing Magic" then
        
        if buffactive['Aurorastorm'] then
            
            if spell.target.type == 'SELF' then
                equip(sets.Magic.HealingMagicSelf)
                
            else
                equip(sets.Magic.HealingMagicMax)
                
            end
            
        else
            equip(sets.Magic.HealingMagic)
        
        end
        
    elseif spell.skill == "Enfeebling Magic" then
        equip(sets.Magic.EnfeeblingMagic)
        
    elseif spell.skill == "Dark Magic" then
                    
        if string.find(spell.name:lower(), 'drain') then
            equip(sets.MID[sets.MID.Mode[_modeMIDi]], sets.Drain)
            
        elseif string.find(spell.name:lower(), 'aspir') then
            equip(sets.MID[sets.MID.Mode[_modeMIDi]], sets.Aspir)
            
        elseif string.find(spell.name:lower(), 'bio') then
            equip(sets.MID[sets.MID.Mode[_modeMIDi]], sets.Bio)
            
        end
        
    elseif spell.skill == "String Magic" then
        
    elseif spell.skill == "Blue Magic" then
    
    end
    
end

function LocalAftercast(spell, act)
    
    -- Equip selected TP set if engaged on a mob.
    if player.status == 'Engaged' then
        equip(sets.TP[sets.TP.Mode[_modeTPi]])
    
    -- Not engaged then default back to Idle set.
    else 
        equip(sets.NA[sets.NA.Mode[_modeNAi]])
    
    end
    
end

function LocalStatusChange(new, old)
    
end

function LocalBuffChange(name, gain)
    
    
    
end

function LocalPetChange(pet, gain)
    
end

function LocalPetMidcast(spell)
    
end

function LocalPetAftercast(spell)
    
end

function LocalPetStatusChange(new, old)
    
end

function LocalSelfCommand(command)
    
end


 Lakshmi.Elidyr
Offline
Server: Lakshmi
Game: FFXI
user: elii
Posts: 911
By Lakshmi.Elidyr 2017-03-14 22:23:49
Link | Quote | Reply
 
Test Script for Self_Command(command)
Code
function get_sets()
    send_command('bind @f1 gs c _modeNA')
    _modeNAi = 1;    
    
end




function self_command(command)    
    
    -- Toggle
    if command == '_modeNA' then
        
        -- Rotate Variable
        if _modeNAi < 3 then _modeNAi = _modeNAi + 1 else _modeNAi = 1 end		
		add_to_chat(200, '<< JUST WORK GUY >>')
		print(_modeNAi)
    
    end
    
            
end


Results in print in console, but no text in chatlog. I also can not //gs c _modeNA to force manually.

FIXED: By not using split chat logs.... lolfml. Thanks Byrth, learn something new every day.

More notes if anyone ever runs across split chat logs not showing "add_to_chat(##, text)". Changing the chat filter in "Say" from ON to OFF, back to ON displayed a bunch of random numbers across my screen, then corrected itself.

Log in to post.