Item Search
     
BG-Wiki Search
Page 242 of 302 FirstFirst ... 192 232 240 241 242 243 244 252 292 ... LastLast
Results 4821 to 4840 of 6036

Thread: Gearswap Help Thread!     submit to reddit submit to twitter

  1. #4821
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    Ehr... getting a strange error in Gearswap, which doesn't point to my Lua but to GS luas o.O I didn't touch those though. What happened?


    Code:
    Gearswap has detected an error in the user function get_sets:
    D:/ path /Windower4//addons/libs/sets.lua:30: bad argument #1 to 'pairs' (table expected, got string)
    
    Gearswap: Lua runtime error: gearswap/flow.lua329:
    
    Gearswap: Loaded your SCH lua file!
    Happened a few times, now everything is working fine.
    Wtf?

  2. #4822
    BG Content
    Join Date
    Jul 2007
    Posts
    22,361
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    You attempt to use a sets library command on a variable with nil value.

  3. #4823
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    I'm still not sure how that could happen and fix itself in a few mins without me doing anything at all o.O

  4. #4824
    BG Content
    Join Date
    Jul 2007
    Posts
    22,361
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    I don't know how your file works either.

  5. #4825
    Puppetmaster
    Join Date
    Sep 2015
    Posts
    73
    BG Level
    2

    Quote Originally Posted by dlsmd View Post
    when you change main jobs the your old file runs file_unload and your new file runs get_sets this happens at almost the same time
    but when you change sub jobs sub_job_change runs on you main job file
    Hmmm... Well, on the otherhand, it would be possible to create a windower addon that functions as a sensor of job changes, yes? I imagine that lua code can be written to detect a job change. Furthermore, this addon should do two things when a job change is detected. 1) execute an unload list for the job that the player changes FROM: this would be the list in my earlier example with the //put code in it. The player would need to manage code that puts away all of that job's items. 2) execute a load list: this would be the code with the //get code in it. This would fetch all the items in a list that the player creates for the job that was changed TO.

    Each user could manage these lists within the addon's folder. Once the user has his lists up to date this addon would manage the user's inventory on every job change. This plugin should even be able to handle both itemizer and organizer code - which is used would be up to the individual user. It'd just be the replacement of one addon's code for the other iirc.

    If I was more familiar with the .lua language I would undertake that myself. In theory such an addon should accomplish two things. A) Almost perfect auto-inventory management on job change. (already possible) B) Eliminate the nuisance of unwanted auto inventory-management caused during login/logout or lua load/unload caused by having inventory-management code in the JOB.luas.(not already possible through automatic means)

  6. #4826
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    doesnt the macro manager addon work on job changes? maybe you can check that out?

  7. #4827
    Chram
    Join Date
    Nov 2007
    Posts
    2,662
    BG Level
    7
    FFXIV Character
    Avelle Asteria
    FFXIV Server
    Hyperion
    FFXI Server
    Phoenix
    WoW Realm
    Alleria

    Maybe a silly question, is there a command in GearSwap to manually equip a set of gear? Something like //set Curing for example. Sorry if I missed it in the documentation somewhere but didn't notice anything like that.

  8. #4828
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by avelle View Post
    Maybe a silly question, is there a command in GearSwap to manually equip a set of gear? Something like //set Curing for example. Sorry if I missed it in the documentation somewhere but didn't notice anything like that.
    gs equip <set>

  9. #4829
    Chram
    Join Date
    Nov 2007
    Posts
    2,662
    BG Level
    7
    FFXIV Character
    Avelle Asteria
    FFXIV Server
    Hyperion
    FFXI Server
    Phoenix
    WoW Realm
    Alleria

    Quote Originally Posted by dlsmd View Post
    gs equip <set>
    Ah ok, so it is gs equip sets.midcast.Cure. That works, thanks!

  10. #4830
    Puppetmaster
    Join Date
    Sep 2015
    Posts
    73
    BG Level
    2

    Quote Originally Posted by Trumpy View Post
    doesnt the macro manager addon work on job changes? maybe you can check that out?
    The MacroChanger addon only executes a change to the new job which means that half of the functionality that I'm looking for is missing. I would need to make the plugin store the current job as a value and then when a job change is observed to take that stored value and relist it as another variable that defines the old job and replace the current job variable with the new current job. At this point, during the job change after the variables get sorted out, the plugin would execute, first, an export list for the old job that would put away the items, and then it would execute an import list for the new job that would pull the items into the user's inventory.

    If you take a look at gearswap's gearswap.lua and search for "job" you will come across many portions of code that detects jobs and stores them as variables, and, according to some of the surrounding code, also checks for changes and updates the variable when they are found. My problem is that this sort of coding is beyond me and I don't know how to use this code to figure out how to write my own that would create, store, and keep these variables updated for this addon that I would like to create.

  11. #4831
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Roland_J View Post
    The MacroChanger addon only executes a change to the new job which means that half of the functionality that I'm looking for is missing. I would need to make the plugin store the current job as a value and then when a job change is observed to take that stored value and relist it as another variable that defines the old job and replace the current job variable with the new current job. At this point, during the job change after the variables get sorted out, the plugin would execute, first, an export list for the old job that would put away the items, and then it would execute an import list for the new job that would pull the items into the user's inventory.

    If you take a look at gearswap's gearswap.lua and search for "job" you will come across many portions of code that detects jobs and stores them as variables, and, according to some of the surrounding code, also checks for changes and updates the variable when they are found. My problem is that this sort of coding is beyond me and I don't know how to use this code to figure out how to write my own that would create, store, and keep these variables updated for this addon that I would like to create.
    in geearswap you can try this function
    Code:
    function JobChange(mjid, mjlevel, sjid , sjlevel)
    --do code here
    end
    windower.raw_register_event('job change', JobChange)
    but as i said gearswap has functions that run when jobs change
    get_sets() --runs on main job change

    file_unload(new_job)--runs every main job change after your first/re load of gearswap

    sub_job_change(new,old)--runs every time you change your sub job

  12. #4832
    Puppetmaster
    Join Date
    Sep 2015
    Posts
    73
    BG Level
    2

    Quote Originally Posted by dlsmd View Post
    in geearswap you can try this function
    Code:
    function JobChange(mjid, mjlevel, sjid , sjlevel)
    --do code here
    end
    windower.raw_register_event('job change', JobChange)
    Thanks for that - I'll take a stab at getting that to function. I'm not sure what the windower.raw_register_event accomplishes considering that there's nothing after it for it to act on. Afaik that's hanging code that is missing the code after it to make it do something. Either that or I simply don't understand what it is doing, which, in all honesty, is the more likely possibility, lol.

  13. #4833
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Roland_J View Post
    Thanks for that - I'll take a stab at getting that to function. I'm not sure what the windower.raw_register_event accomplishes considering that there's nothing after it for it to act on. Afaik that's hanging code that is missing the code after it to make it do something. Either that or I simply don't understand what it is doing, which, in all honesty, is the more likely possibility, lol.
    thats because its calling a windower function not a gearswap function
    and that the only way you can call a windower function in gearswap

    you could even do it like this

    Code:
    windower.raw_register_event('job change', function (mjid, mjlevel, sjid , sjlevel)
    --do code here
    end)
    also i messed up the first time
    change
    reg_event.incoming_chunk
    to
    JobChange
    (i did in my post)

  14. #4834
    BG Content
    Join Date
    Jul 2007
    Posts
    22,361
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    You should just directly call the job change function from the registered event.

  15. #4835
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Byrthnoth View Post
    You should just directly call the job change function from the registered event.
    in most of my code that uses windower.raw_register_event i do it like my first post so i can disable and re enable my code on the fly

  16. #4836
    Puppetmaster
    Join Date
    Sep 2015
    Posts
    73
    BG Level
    2

    So, I tried putting the following code in a standalone .lua and load it ingame...

    Code:
    windower.raw_register_event('job change', function (mjid, mjlevel, sjid , sjlevel)
    if player.job == 'BLM' then
    send_command('input //get "Lathi" sack')
    end)
    and it returns "runtime error: attempt to call a string".

    Even if it did work all I could do is perhaps make it pull the import lists whereas I need it to push an export list, too. I don't know how I'd make it store the current job as, perhaps, the value of 'currentjob', and then reallocate that value to be stored under 'lastjob' when a mainjob change occurs and then create a new value for 'currentjob' (the job that the player changed to). The plugin would use these two values to identify which export and import lists to run on job change; each job needs a list of which items to put away when changed from and the job changed to needs a list of which items to pull into the inventory.

    Perhaps your suggestion was a good one but my problem is that I'm not sure what to do with the code to make it do what I want it to do.

    Are there many motivated coders still in the community these days? Hopefully there is one who thinks that this idea is good and decides to make a addon for it. ^^ I wonder if I can post this somewhere else, too, to have a better chance at it. I wish I could do the work for you guys but I am simply at a loss as to how to code this.

  17. #4837
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Roland_J View Post
    So, I tried putting the following code in a standalone .lua and load it ingame...

    Code:
    windower.raw_register_event('job change', function (mjid, mjlevel, sjid , sjlevel)
    if player.job == 'BLM' then
    send_command('input //get "Lathi" sack')
    
    end)
    and it returns "runtime error: attempt to call a string".

    Even if it did work all I could do is perhaps make it pull the import lists whereas I need it to push an export list, too. I don't know how I'd make it store the current job as, perhaps, the value of 'currentjob', and then reallocate that value to be stored under 'lastjob' and create a new value for 'currentjob' (the job that the player changed to). The plugin would use these two values to identify which export and import lists to run on job change; each job needs a list of which items to put away when changed from and the job changed to needs a list of which items to pull into the inventory.

    Perhaps your suggestion was a good one but my problem is that I'm not sure what to do with the code to make it do what I want it to do.

    Are there many motivated coders still in the community these days? Hopefully there is one who thinks that this idea is good and decides to make a addon for it. ^^ I wonder if I can post this somewhere else, too, to have a better chance at it. I wish I could do the work for you guys but I am simply at a loss as to how to code this.
    the only thing i can think of is gearswap reset all varables while changing jobs

    but you could try something like this(untested code)
    Code:
    function file_unload(new_job)
        local old_main = player.main_job
        local new_main = new_job
        job_on_load:schedule(3, old_main, new_main)
    end
    --this function would have to be the same on all files
    function job_on_load(new, old)
        --gear to get rid of
        if old == "WAR" then
        end
        --gear to get
        if new == "BLM" then
        end
    end
    --and encase you need it but it might cause ffxi to lock for how ever long you want it to sleep
    function sleep(s)-- s = seconds
      local ntime = os.time() + s
      local
      while os.time() < ntime do
        sleep(1)
      end
    end
    --or this sleep
    
    function sleep(ms)-- ms = miliseconds
        os.execute("ping 1.1.1.1 /n 1 /w "..ms.." >nul")
    end
    this is all i can think of

  18. #4838
    Puppetmaster
    Join Date
    Sep 2015
    Posts
    73
    BG Level
    2

    Thank you again for another reply, Dlsmd! You have been a constant source of input :D

    I made a standalone test.lua with the following code and loaded it ingame.
    Code:
    function file_unload(new_job)
        local old_main = player.main_job
        local new_main = new_job
        job_on_load:schedule(3, old_main, new_main)
    end
    --this function would have to be the same on all files
    function job_on_load(new, old)
        --gear to get rid of
        if old == "MNK" then
    	send_command('input //put "Reraiser" satchel')
        end
    	if old == "SAM" then
    	send_command('input //put "Hi-eraiser" satchel')
        end
        --gear to get
        if new == "MNK" then
    	send_command('input //get "Reraiser" satchel')
        end
    	if new == "SAM" then
    	send_command('input //get "Hi-reraiser" satchel')
        end
    end
    I start on MNK75 with a reraiser in my inventory. I changed to SAM99 and the reraiser stayed in my inventory and the Hi-reraiser stayed in my satchel. I then changed back to MNK75 just for kicks and my inventory remained the same this time as well. Looks like this code is a no-go. ; ;

  19. #4839
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Roland_J View Post
    Thank you again for another reply, Dlsmd! You have been a constant source of input :D

    I made a standalone test.lua with the following code and loaded it ingame.
    Code:
    function file_unload(new_job)
        local old_main = player.main_job
        local new_main = new_job
        job_on_load:schedule(3, old_main, new_main)
    end
    --this function would have to be the same on all files
    function job_on_load(new, old)
        --gear to get rid of
        if old == "MNK" then
        send_command('input //put "Reraiser" satchel')
        end
        if old == "SAM" then
        send_command('input //put "Hi-eraiser" satchel')
        end
        --gear to get
        if new == "MNK" then
        send_command('input //get "Reraiser" satchel')
        end
        if new == "SAM" then
        send_command('input //get "Hi-reraiser" satchel')
        end
    end
    I start on MNK75 with a reraiser in my inventory. I changed to SAM99 and the reraiser stayed in my inventory and the Hi-reraiser stayed in my satchel. I then changed back to MNK75 just for kicks and my inventory remained the same this time as well. Looks like this code is a no-go. ; ;
    try this
    send_command('get "Hi-reraiser" satchel')
    instead of this
    send_command('input //get "Hi-reraiser" satchel')
    because i just tried this code and had no issues
    Code:
    function file_unload(new_job)
        local old_main = player.main_job
        local new_main = new_job
        job_on_load:schedule(3, new_main,old_main)
    end
    --this function would have to be the same on all files
    function job_on_load(new, old)
        add_to_chat(8,new..''..old)
        --gear to get rid of
        if old == "WHM" then
        add_to_chat(8,old)
        end
        --gear to get
        if new == "WAR" then
        add_to_chat(8,new)
        end
    end

  20. #4840
    Melee Summoner
    Join Date
    May 2014
    Posts
    38
    BG Level
    1
    FFXI Server
    Bismarck

    Having issues with casting. Occassionally, either my Assim. Shalwar +1, Hashishin Tayt +1, Luhluza Charuqs +1 or Hashi. Basmak +1, will equip randomly when casting offensive spells.
    I do not have Diffusion, Burst Affinity or Efflux active. They're either on cooldown or not used at all. I suspect it's something in the code. Any assistance is appreciated.

    Spoiler: show
    Code:
    -------------------------------------------------------------------------------------------------------------------
    -- Setup functions for this job.  Generally should not be modified.
    -------------------------------------------------------------------------------------------------------------------
     
    -- Initialization function for this job file.
    function get_sets()
        mote_include_version = 2
         
        -- Load and initialize the include file.
        include('Mote-Include.lua')
        include('organizer-lib')
    end
     
     
    -- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
    function job_setup()
        state.Buff['Burst Affinity'] = buffactive['Burst Affinity'] or false
        state.Buff['Chain Affinity'] = buffactive['Chain Affinity'] or false
        state.Buff.Convergence = buffactive.Convergence or false
        state.Buff.Diffusion = buffactive.Diffusion or false
        state.Buff.Efflux = buffactive.Efflux or false
         
        state.Buff['Unbridled Learning'] = buffactive['Unbridled Learning'] or false
     
        state.MagicBurst = M(false, 'Magic Burst')
     
        blue_magic_maps = {}
         
        -- Mappings for gear sets to use for various blue magic spells.
        -- While Str isn't listed for each, it's generally assumed as being at least
        -- moderately signficant, even for spells with other mods.
         
        -- Physical Spells --
         
        -- Physical spells with no particular (or known) stat mods
        blue_magic_maps.Physical = S{
            'Bilgestorm'
        }
     
        -- Spells with heavy accuracy penalties, that need to prioritize accuracy first.
        blue_magic_maps.PhysicalAcc = S{
            'Heavy Strike',
        }
     
        -- Physical spells with Str stat mod
        blue_magic_maps.PhysicalStr = S{
            'Battle Dance','Bloodrake','Death Scissors','Dimensional Death',
            'Empty Thrash','Quadrastrike','Sinker Drill','Spinal Cleave',
            'Uppercut','Vertical Cleave'
        }
             
        -- Physical spells with Dex stat mod
        blue_magic_maps.PhysicalDex = S{
            'Amorphic Spikes','Asuran Claws','Barbed Crescent','Claw Cyclone','Disseverment',
            'Foot Kick','Frenetic Rip','Goblin Rush','Hysteric Barrage','Paralyzing Triad',
            'Seedspray','Sickle Slash','Smite of Rage','Terror Touch','Thrashing Assault',
            'Vanity Dive'
        }
             
        -- Physical spells with Vit stat mod
        blue_magic_maps.PhysicalVit = S{
            'Body Slam','Cannonball','Delta Thrust','Glutinous Dart','Grand Slam',
            'Power Attack','Quad. Continuum','Sprout Smack','Sub-zero Smash'
        }
             
        -- Physical spells with Agi stat mod
        blue_magic_maps.PhysicalAgi = S{
            'Benthic Typhoon','Feather Storm','Helldive','Hydro Shot','Jet Stream',
            'Pinecone Bomb','Spiral Spin','Wild Oats'
        }
     
        -- Physical spells with Int stat mod
        blue_magic_maps.PhysicalInt = S{
            'Mandibular Bite','Queasyshroom'
        }
     
        -- Physical spells with Mnd stat mod
        blue_magic_maps.PhysicalMnd = S{
            'Ram Charge','Screwdriver','Tourbillion'
        }
     
        -- Physical spells with Chr stat mod
        blue_magic_maps.PhysicalChr = S{
            'Bludgeon'
        }
     
        -- Physical spells with HP stat mod
        blue_magic_maps.PhysicalHP = S{
            'Final Sting'
        }
     
        -- Magical Spells --
     
        -- Magical spells with the typical Int mod
        blue_magic_maps.Magical = S{
            'Blastbomb','Blazing Bound','Bomb Toss','Cursed Sphere','Dark Orb','Death Ray',
            'Diffusion Ray','Droning Whirlwind','Embalming Earth','Firespit','Foul Waters',
            'Ice Break','Leafstorm','Maelstrom','Rail Cannon','Regurgitation','Rending Deluge',
            'Retinal Glare','Subduction','Tem. Upheaval','Water Bomb', 'Searing Tempest', 'Blinding Fulgor',
            'Spectral Floe', 'Scouring Spate', 'Anvil Lightning', 'Silent Storm', 'Entomb', 'Tenebral Crush'
        }
     
        -- Magical spells with a primary Mnd mod
        blue_magic_maps.MagicalMnd = S{
            'Acrid Stream','Evryone. Grudge','Magic Hammer','Mind Blast'
        }
     
        -- Magical spells with a primary Chr mod
        blue_magic_maps.MagicalChr = S{
            'Eyes On Me','Mysterious Light'
        }
     
        -- Magical spells with a Vit stat mod (on top of Int)
        blue_magic_maps.MagicalVit = S{
            'Thermal Pulse'
        }
     
        -- Magical spells with a Dex stat mod (on top of Int)
        blue_magic_maps.MagicalDex = S{
            'Charged Whisker','Gates of Hades'
        }
                 
        -- Magical spells (generally debuffs) that we want to focus on magic accuracy over damage.
        -- Add Int for damage where available, though.
        blue_magic_maps.MagicAccuracy = S{
            '1000 Needles','Absolute Terror','Actinic Burst','Auroral Drape','Awful Eye',
            'Blank Gaze','Blistering Roar','Blood Drain','Blood Saber','Chaotic Eye',
            'Cimicine Discharge','Cold Wave','Corrosive Ooze','Demoralizing Roar','Digest',
            'Dream Flower','Enervation','Feather Tickle','Filamented Hold','Frightful Roar',
            'Geist Wall','Hecatomb Wave','Infrasonics','Jettatura','Light of Penance',
            'Lowing','Mind Blast','Mortal Ray','MP Drainkiss','Osmosis','Reaving Wind',
            'Sandspin','Sandspray','Sheep Song','Soporific','Sound Blast','Stinking Gas',
            'Sub-zero Smash','Venom Shell','Voracious Trunk','Yawn'
        }
             
        -- Breath-based spells
        blue_magic_maps.Breath = S{
            'Bad Breath','Flying Hip Press','Frost Breath','Heat Breath',
            'Hecatomb Wave','Magnetite Cloud','Poison Breath','Radiant Breath','Self-Destruct',
            'Thunder Breath','Vapor Spray','Wind Breath'
        }
     
        -- Stun spells
        blue_magic_maps.Stun = S{
            'Blitzstrahl','Frypan','Head Butt','Sudden Lunge','Tail slap','Temporal Shift',
            'Thunderbolt','Whirl of Rage'
        }
             
        -- Healing spells
        blue_magic_maps.Healing = S{
            'Healing Breeze','Magic Fruit','Plenilune Embrace','Pollen','Restoral','White Wind',
            'Wild Carrot'
        }
         
        -- Buffs that depend on blue magic skill
        blue_magic_maps.SkillBasedBuff = S{
            'Barrier Tusk','Diamondhide','Magic Barrier','Metallic Body','Plasma Charge',
            'Pyric Bulwark','Reactor Cool',
        }
     
        -- Other general buffs
        blue_magic_maps.Buff = S{
            'Amplification','Animating Wail','Battery Charge','Carcharian Verve','Cocoon',
            'Erratic Flutter','Exuviation','Fantod','Feather Barrier','Harden Shell',
            'Memento Mori','Nat. Meditation','Occultation','Orcish Counterstance','Refueling',
            'Regeneration','Saline Coat','Triumphant Roar','Warm-Up','Winds of Promyvion',
            'Zephyr Mantle'
        }
         
         
        -- Spells that require Unbridled Learning to cast.
        unbridled_spells = S{
            'Absolute Terror','Bilgestorm','Blistering Roar','Bloodrake','Carcharian Verve',
            'Crashing Thunder','Droning Whirlwind','Gates of Hades','Harden Shell','Polar Roar',
            'Pyric Bulwark','Thunderbolt','Tourbillion','Uproot','Mighty Guard','Cruel Joke','Cesspool','Tearing Gust'
        }
    end
     
    -------------------------------------------------------------------------------------------------------------------
    -- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
    -------------------------------------------------------------------------------------------------------------------
     
    -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
    function user_setup()
        state.OffenseMode:options('Normal', 'Acc', 'Refresh', 'Learning')
        state.WeaponskillMode:options('Normal', 'Acc')
        state.CastingMode:options('Normal', 'Resistant')
        state.IdleMode:options('Normal', 'PDT', 'Refresh', 'Learning')
        state.HybridMode:options('Normal', 'PDT')
         
        state.MagicBurst = M(false, 'Magic Burst')
     
        -- Additional local binds
        send_command('bind ^` input /ja "Chain Affinity" <me>')
        send_command('bind !` input /ja "Burst Affinity" <me>')
        send_command('bind @` input /ja "Efflux" <me>')
        send_command('bind ` input /ma "Sudden Lunge" <t>')
        send_command('bind delete input /ws "Chant du Cygne" <t>')
        send_command('bind end input /ja "Diffusion" <me>')
        send_command('bind home input /ja "Unbridled Learning" <me>')
        send_command('bind ^- input /ma "Carcharian Verve" <me>')
        send_command('bind ^= input /ma "Mighty Guard" <me>')
        send_command('bind !- gs c toggle MagicBurst')
     
        update_combat_form()
        select_default_macro_book()
    end
     
    -- Called when this job file is unloaded (eg: job change)
    function user_unload()
        send_command('unbind `')
        send_command('unbind ^`')
        send_command('unbind ^-')
        send_command('unbind ^=')
        send_command('unbind !`')
        send_command('unbind !-')
        send_command('unbind !=')
        send_command('unbind @`')
        send_command('unbind @-')
        send_command('unbind @=')
        send_command('unbind delete')
        send_command('unbind end')
        send_command('unbind home')
    end
     
    -- Set up gear sets.
    function init_gear_sets()
        --------------------------------------
        -- Start defining the sets
        --------------------------------------
     
        sets.buff['Burst Affinity'] = {legs="Assimilator's Shalwar +1",feet="Hashishin Basmak +1"}
        sets.buff['Chain Affinity'] = {head="Hashishin Kavuk", feet="Assimilator's Charuqs +1"}
        sets.buff.Convergence = {}
        sets.buff.Enchainment = {}
        sets.buff.Diffusion = {feet="Luhlaza Charuqs +1"}
        sets.buff.Efflux = {legs="Hashishin Tayt +1"}
     
         
        -- Precast Sets
        organizer_items = {
            claid="Claidheamh Soluis",
            nblade={name="Nibiru Blade", augments={'DEX+10','Accuracy+20','Mag. Acc.+15'}},
            nblade2={name="Nibiru Blade", augments={'STR+10','Attack+20','"Store TP"+3'}},
            nclub="Nibiru Cudgel"}
         
        -- Precast sets to enhance JAs
        sets.precast.JA['Azure Lore'] = {hands="Luhlaza Bazubands"}
     
     
        -- Waltz set (chr and vit)
        sets.precast.Waltz = {}
             
        -- Don't need any special gear for Healing Waltz.
        sets.precast.Waltz['Healing Waltz'] = {}
     
        -- Fast cast sets for spells
         
        sets.precast.FC = {ammo="Impatiens",
            head="Carmine Mask",neck="Orunmila's Torque",ear1="Enchanter Earring +1",ear2="Loquacious Earring",
            body="Luhlaza Jubbah +1",hands="Leyline Gloves",ring1="Weatherspoon Ring",ring2="Prolix Ring",
            back="Swith Cape +1",waist="Witful Belt",legs="Psycloth Lappas",feet="Chelona Boots +1"} 
             
        sets.precast.FC['Blue Magic'] = set_combine(sets.precast.FC, {body="Hashishin Mintan +1"})
     
            
        -- Weaponskill sets
        -- Default set for any weaponskill that isn't any more specifically defined
        sets.precast.WS = {ammo="Expeditious Pinion",
            head="Adhemar Bonnet",neck=gear.ElementalGorget,ear1="Cessance Earring",ear2="Brutal Earring",
            body="Abnoba Kaftan",hands="Rawhide Gloves",ring1="Ramuh Ring",ring2="Epona's Ring",
            back="Rancorous Mantle",waist=gear.ElementalBelt,legs="Samnuha Tights",feet="Thereoid Greaves"}
         
        sets.precast.WS.acc = set_combine(sets.precast.WS, {ammpo="Honed Tathlum"}) 
     
        -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
        sets.precast.WS['Chant du Cygne'] = set_combine(sets.precast.WS, {
            ear1="Moonshade Earring",legs="Samnuha Tights"})
         
        sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {ammo="Hydrocera",
            head="Carmine Mask",ear1="Moonshade Earring",ring1="Aquasoul Ring",back="Bleating Mantle"})
         
        sets.precast.WS['Requiescat'].acc = set_combine(sets.precast.WS['Requiescat'], {back="Bleating Mantle"})
     
        sets.precast.WS['Sanguine Blade'] = {
            head=gear.hag_mab_hat,neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Novio Earring",
            body="Amalric Doublet",hands="Amalric Gages",ring1="Shiva Ring +1",ring2="Shiva Ring +1",
            back="Cornflower Cape",waist="Yamabuki-no-Obi",legs="Hagondes Pants +1",feet="Hashishin Basmak +1"}
             
        sets.precast.WS['Flash Nova'] = set_combine(sets.precast.WS['Sanguine Blade'], {ring1="Weatherspoon Ring"})
         
        sets.precast.WS['Realmrazer'] = set_combine(sets.precast.WS, {
            head="Adhemar Bonnet",ring1="Aquasoul Ring",ring2="Aquasoul Ring",
            back="Bleating Mantle",legs="Samnuha Tights"})
         
         
        -- Midcast Sets
        sets.midcast.FastRecast = {}
             
        sets.midcast['Blue Magic'] = {}
         
        -- Physical Spells --
         
        sets.midcast['Blue Magic'].Physical = {ammo="Honed Tathlum",
            head="Adhemar Bonnet",neck="Caro Necklace",ear1="Vulcan's Pearl",ear2="Flame Pearl",
            body="Adhemar Jacket",hands="Rawhide Gloves",ring1="Pyrosoul Ring",ring2="Pyrosoul Ring",
            back="Cornflower Cape",waist="Prosilio Belt +1",legs="Samnuha Tights",feet="Rawhide Boots"}
     
        sets.midcast['Blue Magic'].PhysicalAcc = set_combine(sets.midcast['Blue Magic'].Physical, {
            neck="Clotharius Torque",hands="Leyline Gloves",back="Grounded Mantle +1",waist="Olseni Belt",feet=gear.accdt_feet})
     
        sets.midcast['Blue Magic'].PhysicalStr = set_combine(sets.midcast['Blue Magic'].Physical, {})
     
        sets.midcast['Blue Magic'].PhysicalDex = set_combine(sets.midcast['Blue Magic'].Physical, {})
     
        sets.midcast['Blue Magic'].PhysicalVit = set_combine(sets.midcast['Blue Magic'].Physical, {})
     
        sets.midcast['Blue Magic'].PhysicalAgi = set_combine(sets.midcast['Blue Magic'].Physical, {})
     
        sets.midcast['Blue Magic'].PhysicalInt = set_combine(sets.midcast['Blue Magic'].Physical, {})
     
        sets.midcast['Blue Magic'].PhysicalMnd = set_combine(sets.midcast['Blue Magic'].Physical, {})
     
        sets.midcast['Blue Magic'].PhysicalChr = set_combine(sets.midcast['Blue Magic'].Physical, {})
     
        sets.midcast['Blue Magic'].PhysicalHP = set_combine(sets.midcast['Blue Magic'].Physical, {})
     
     
        -- Magical Spells --
         
        sets.midcast['Blue Magic'].Magical = {ammo="Ghastly Tathlum +1",
            head=gear.hag_mab_hat,neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Novio Earring",
            body="Amalric Doublet",hands="Amalric Gages",ring1="Shiva Ring +1",ring2="Shiva Ring +1",
            back="Cornflower Cape",waist="Yamabuki-no-Obi",legs="Amalric Slops",feet="Amalric Nails"}
     
        sets.midcast['Blue Magic'].Magical.Resistant = set_combine(sets.midcast['Blue Magic'].Magical,
            {ammo="Mavi Tathlum",ear1="Enchanter Earring +1",ear2="Gwati Earring",head="Helios Band",body="Hashishin Mintan +1",
            hands="Leyline Gloves",ring1="Weatherspoon Ring",legs="Psycloth Lappas",feet="Hashishin Basmak +1"})
             
        sets.midcast['Blue Magic'].MagicAccuracy = set_combine(sets.midcast['Blue Magic'].Magical, {ammo="Mavi Tathlum",
            head="Helios Band",ear1="Enchanter Earring +1",ear2="Gwati Earring",body="Hashishin Mintan +1",ring1="Weatherspoon Ring",legs="Psycloth Lappas"})   
         
        sets.midcast['Blue Magic'].MagicalMnd = set_combine(sets.midcast['Blue Magic'].Magical,
            {hands="Telchine Gloves",ring1="Aquasoul Ring",ring2="Aquasoul Ring",back="Cornflower Cape",
            legs="Telchine Braconi",feet="Medium's Sabots"})
     
        sets.midcast['Blue Magic'].MagicalChr = set_combine(sets.midcast['Blue Magic'].Magical)
        sets.midcast['Blue Magic'].MagicalVit = set_combine(sets.midcast['Blue Magic'].Magical, {})
        sets.midcast['Blue Magic'].MagicalDex = set_combine(sets.midcast['Blue Magic'].Magical, {})
        sets.midcast['Blue Magic']['Tenebral Crush'] = set_combine(sets.midcast['Blue Magic'].Magical, {head="Pixie Hairpin +1"})
     
        -- Breath Spells --
         
        sets.midcast['Blue Magic'].Breath = {ammo="Mavi Tathlum",
            neck="Sanctity Necklace",ear1="Enchanter Earring +1",ear2="Gwati Earring",
            hands="Amalric Gages",back="Cornflower Cape",legs="Psycloth Lappas",feet="Medium's Sabots"}
     
        -- Other Types --
         
        sets.midcast['Blue Magic'].Stun = set_combine(sets.midcast['Blue Magic'].MagicAccuracy, {head="Carmine Mask",neck="Sanctity Necklace",ear1="Steelflash Earring",ring2="Patricius Ring",
            waist="Olseni Belt",feet=gear.herc_feet_TP})
             
        sets.midcast['Blue Magic']['White Wind'] = set_combine(sets.midcast['Blue Magic'].Healing, {})
     
        sets.midcast['Blue Magic'].Healing = {
            head="Telchine Cap",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
            body="Hashishin Mintan +1",hands="Telchine Gloves",ring1="Aquasoul Ring",ring2="Aquasoul Ring",
            back="Tempered Cape +1",waist="Bishop's Sash",legs="Telchine Braconi",feet="Medium's Sabots"}
     
        sets.midcast['Blue Magic'].SkillBasedBuff = {ammo="Mavi Tathlum",
            body="Assimilator's Jubbah +1",back="Cornflower Cape",legs="Hashishin Tayt +1",feet="Luhlaza Charuqs +1"}
     
        sets.midcast['Blue Magic'].Buff = set_combine(sets.midcast['Blue Magic'].SkillBasedBuff, {})
         
        sets.midcast.Protect = {ring1="Sheltered Ring"}
        sets.midcast.Protectra = {ring1="Sheltered Ring"}
        sets.midcast.Shell = {ring1="Sheltered Ring"}
        sets.midcast.Shellra = {ring1="Sheltered Ring"}
        sets.midcast.Refresh = {waist="Gishdubar Sash"}
         
         
        -- Sets to return to when not performing an action.
     
        -- Gear for learning spells: +skill and AF hands.
        sets.Learning = {ammo="Mavi Tathlum",body="Assimilator's Jubbah +1",hands="Assimilator's Bazubands",
            back="Cornflower Cape",legs="Hashishin Tayt +1",feet="Luhlaza Charuqs +1"}
            --head="Luhlaza Keffiyeh"
     
     
        sets.latent_refresh = {}
     
        -- Resting sets
        sets.resting = {
            head="Iuitl Headgear +1",neck="Wiglen Gorget",
            body="Assimilator's Jubbah +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",feet="Chelona Boots +1"}
         
        -- Idle sets
        sets.idle = {ammo="Impatiens",
            head="Rawhide Mask",neck="Wiglen Gorget",ear1="Ethereal Earring",ear2="Loquacious Earring",
            body="Assimilator's Jubbah +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
            back="Umbra Cape",waist="Flume Belt",legs="Crimson Cuisses",feet="Serpentes Sabots"}
     
        sets.idle.PDT = {
            head="Iuitl Headgear +1",neck="Twilight Torque",ear1="Ethereal Earring",ear2="Loquacious Earring",
            body="Emet Harness +1",hands="Umuthi Gloves",ring1="Defending Ring",ring2=gear.DarkRing.physical,
            back="Umbra Cape",waist="Flume Belt",legs="Hagondes Pants +1",feet=gear.accdt_feet}
     
        sets.idle.Town = {
            head="Adhemar Bonnet",neck="Clotharius Torque",ear1="Cessance Earring",ear2="Brutal Earring",
            body="Adhemar Jacket",hands=gear.herc_hands_TP,ring1="Epona's Ring",ring2="Petrov Ring",
            back="Bleating Mantle",waist="Windbuffet Belt +1",legs="Crimson Cuisses",feet=gear.herc_feet_TP}
     
        sets.idle.Learning = set_combine(sets.idle, sets.Learning)
        sets.idle.Refresh = set_combine(sets.idle, {legs="Lengo Pants"})
     
         
        -- Defense sets
        sets.defense.PDT = {
            head="Iuitl Headgear +1",neck="Twilight Torque",ear1="Ethereal Earring",ear2="Loquacious Earring",
            body="Emet Harness +1",hands="Umuthi Gloves",ring1="Defending Ring",ring2=gear.DarkRing.physical,
            back="Umbra Cape",waist="Flume Belt",legs="Hagondes Pants +1",feet=gear.accdt_feet}
     
        sets.defense.MDT = {
            head="Helios Band",neck="Twilight Torque",ear1="Mujin Stud",ear2="Sanare Earring",
            body="Hashishin Mintan +1",hands="Amalric Gages",ring1="Defending Ring",ring2="Shadow Ring",
            back="Engulfer Cape +1",waist="Flume Belt",legs="Hashishin Tayt +1",feet="Amalric Nails"}
     
        sets.Kiting = {legs="Crimson Cuisses"}
     
        -- Engaged sets
     
        -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
        -- sets if more refined versions aren't defined.
        -- If you create a set with both offense and defense modes, the offense mode should be first.
        -- EG: sets.engaged.Dagger.Accuracy.Evasion
         
        -- Normal melee group
        sets.engaged = {ammo="Ginsen",
            head="Adhemar Bonnet",neck="Asperity Necklace",ear1="Cessance Earring",ear2="Brutal Earring",
            body="Adhemar Jacket",hands=gear.herc_hands_TP,ring1="Petrov Ring",ring2="Epona's Ring",
            back="Bleating Mantle",waist="Windbuffet Belt +1",legs="Samnuha Tights",feet=gear.herc_feet_TP}
        sets.engaged.Acc = set_combine(sets.engaged, {ammo="Honed Tathlum",
            head="Carmine Mask",neck="Clotharius Torque",ear2="Steelflash Earring",
            hands="Leyline Gloves",back="Grounded Mantle +1",waist="Olseni Belt"})
             
        sets.engaged.PDT = {
            head="Iuitl Headgear +1",neck="Twilight Torque",ear1="Cessance Earring",ear2="Brutal Earring",
            body="Emet Harness +1",hands="Umuthi Gloves",ring1="Defending Ring",ring2=gear.DarkRing.physical,
            back="Umbra Cape",waist="Windbuffet Belt +1",legs="Samnuha Tights",feet=gear.accdt_feet}    
     
        sets.engaged.Refresh = set_combine(sets.engaged, {head="Rawhide Mask",body="Assimilator's Jubbah +1",legs="Lengo Pants"})
        sets.engaged.DW = set_combine(sets.engaged, {})
        sets.engaged.DW.Acc = set_combine(sets.engaged.Acc, {})
        sets.engaged.DW.Refresh = set_combine(sets.engaged.Refresh, {})
        sets.engaged.Learning = set_combine(sets.engaged, sets.Learning)
        sets.engaged.DW.Learning = set_combine(sets.engaged.DW, sets.Learning)
     
        sets.self_healing = {ring1="Kunaji Ring",ring2="Asklepian Ring",waist="Gishdubar Sash"}
         
        sets.MagicBurst = {head="Helios Band",hands="Helios Gloves",ring1="Locus Ring",ring2="Mujin Band",back="Seshaw Cape",feet="Helios Boots"}
    end
     
    -------------------------------------------------------------------------------------------------------------------
    -- Job-specific hooks for standard casting events.
    -------------------------------------------------------------------------------------------------------------------
     
    -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
    -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
    function job_precast(spell, action, spellMap, eventArgs)
        if unbridled_spells:contains(spell.english) and not state.Buff['Unbridled Learning'] then
            eventArgs.cancel = true
            windower.send_command('@input /ja "Unbridled Learning" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
        end
        if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
            cancel_spell()
            send_command('input /item "Echo Drops" <me>')
        end
        if spell.english == 'Berserk' then 
            if buffactive.Berserk then -- Change Berserk To Aggressor If Berserk Is On --
            cancel_spell()
            send_command('input /ja Aggressor <me>')
            end   
        end
    end
     
    -- Run after the default midcast() is done.
    -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
    function job_post_midcast(spell, action, spellMap, eventArgs)
        -- Add enhancement gear for Chain Affinity, etc.
        if spell.skill == 'Blue Magic' then
            for buff,active in pairs(state.Buff) do
                if active and sets.buff[buff] then
                    equip(sets.buff[buff])
                end
            end
            if spellMap == 'Healing' and spell.target.type == 'SELF' and sets.self_healing then
                equip(sets.self_healing)
            end
        end
     
        -- If in learning mode, keep on gear intended to help with that, regardless of action.
        if state.OffenseMode.value == 'Learning' then
            equip(sets.Learning)
        end
         
        if state.MagicBurst.value and spellMap:contains('Magical') then
            if buffactive['Burst Affinity'] or buffactive['Azure Lore'] then
                equip(sets.MagicBurst)
            end
        end
         
    end
    -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
    function job_aftercast(spell, action, spellMap, eventArgs)
     
        if not (buffactive['Burst Affinity'] or buffactive['Azure Lore']) then
        state.MagicBurst:reset()
        end
         
    end 
     
     
    -------------------------------------------------------------------------------------------------------------------
    -- Job-specific hooks for non-casting events.
    -------------------------------------------------------------------------------------------------------------------
     
    -- Called when a player gains or loses a buff.
    -- buff == buff gained or lost
    -- gain == true if the buff was gained, false if it was lost.
    function job_buff_change(buff, gain)
        if state.Buff[buff] ~= nil then
            state.Buff[buff] = gain
        end
    end
     
    -------------------------------------------------------------------------------------------------------------------
    -- User code that supplements standard library decisions.
    -------------------------------------------------------------------------------------------------------------------
     
    -- Custom spell mapping.
    -- Return custom spellMap value that can override the default spell mapping.
    -- Don't return anything to allow default spell mapping to be used.
    function job_get_spell_map(spell, default_spell_map)
        if spell.skill == 'Blue Magic' then
            for category,spell_list in pairs(blue_magic_maps) do
                if spell_list:contains(spell.english) then
                    return category
                end
            end
        end
    end
     
    -- Modify the default idle set after it was constructed.
    function customize_idle_set(idleSet)
        if player.mpp < 51 then
            set_combine(idleSet, sets.latent_refresh)
        end
         
        if world.area:contains('Adoulin') then
            idleSet = set_combine(sets.idle.Town, {body="Councilor's Garb"})
        end
         
        return idleSet
    end
     
    -- Called by the 'update' self-command, for common needs.
    -- Set eventArgs.handled to true if we don't want automatic equipping of gear.
    function job_update(cmdParams, eventArgs)
        update_combat_form()
    end
     
     
    -------------------------------------------------------------------------------------------------------------------
    -- Utility functions specific to this job.
    -------------------------------------------------------------------------------------------------------------------
     
    function update_combat_form()
        -- Check for H2H or single-wielding
        if player.equipment.sub == "Genbu's Shield" or player.equipment.sub == 'empty' then
            state.CombatForm:reset()
        else
            state.CombatForm:set('DW')
        end
    end
     
     
    -- Select default macro book on initial load or subjob change.
    function select_default_macro_book()
        -- Default macro set/book
        if player.sub_job == 'WAR' then
            set_macro_page(2, 9)
        else
            set_macro_page(1, 9)
        end
    end

Page 242 of 302 FirstFirst ... 192 232 240 241 242 243 244 252 292 ... LastLast

Similar Threads

  1. Replies: 6547
    Last Post: 2014-07-08, 22:45