Gearswap Support Thread

言語: JP EN DE FR
2010-06-21
New Items
users online
フォーラム » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 37 38 39 ... 182 183 184
 Quetzalcoatl.Dalkiel
Offline
サーバ: Quetzalcoatl
Game: FFXI
Posts: 1
By Quetzalcoatl.Dalkiel 2014-10-27 01:11:48  
Hi, I just started using Motenten's GS files, and I'm having a hard time getting weaponskillmode to cycle, All of the other binds are working, I've tried switching the binds for weaponskillmode cycling and nothing seems to work as if there is no bind for it at all. and when i hit f12 for user update its always ws mode Normal

I am used to his spellcast scripts where if you put your offensive mode to acc, your weaponskill would be in acc mode aslo.

Anyone know what might be wrong?
Offline
Posts: 324
By Xavierr 2014-10-27 01:54:35  
yay Flippant :D

thankyou so much for this. My GS is now functioning exactly as I wanted it to.
 Quetzalcoatl.Orestes
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2014-10-27 09:14:00  
Kooljack said: »
this wont work idk:
Code
hands={"Xaddi Gauntlets",augments={"Accuracy+15"}}


this samlua has this built into the code, not sure if it works beccause i dont have acc+8 ontronif but i tried use the same idea to change xaddi gauntlets based on acc differentiator between the two pairs I have but it won't work, any ideas for me to try?
Code
legs={"Otronif Brais +1",augments={"Accuracy +8"}}
You have to type the augments exactly how they're written on your gear.

It looks like you don't have a space between Accuracy and +15.

This is a more complicated example. Note the augments are typed exactly how they are in game. If there's double quotes around a stat, then you have to wrap single quotes around it, and include them as well.
Code
 back={name="Takaha Mantle", augments={'STR+3','"Store TP"+2','"Zanshin"+3'}},
 Quetzalcoatl.Orestes
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2014-10-27 09:19:28  
Quetzalcoatl.Dalkiel said: »
Hi, I just started using Motenten's GS files, and I'm having a hard time getting weaponskillmode to cycle, All of the other binds are working, I've tried switching the binds for weaponskillmode cycling and nothing seems to work as if there is no bind for it at all. and when i hit f12 for user update its always ws mode Normal

I am used to his spellcast scripts where if you put your offensive mode to acc, your weaponskill would be in acc mode aslo.

Anyone know what might be wrong?

Mote's gearswap's work exactly like that. If you specify your WeaponskillMode's with identical toggles as your OffenseModes, then they will be used without having to cycle WS modes.

for example.
Code
    state.OffenseMode:options('Normal', 'Mid', 'Acc')
    state.WeaponskillMode:options('Normal', 'Mid', 'Acc')


Using sam + fudo as an example..

If you hit F9, and toggle Mid offense mode, you should be able to use //gs showswaps and see that sets.precast.WS['Tachi: Fudo'].Mid is used.
 Siren.Inuyushi
Offline
サーバ: Siren
Game: FFXI
user: Inuyushi
Posts: 507
By Siren.Inuyushi 2014-10-27 11:09:00  
Kooljack said: »
what would i use to swap; say, the pre-determened augment armor (paths ABC), what would the code look like to have those different pieces swapping how one needs? is my question as best as I can ask. tough sometimes hehe

any help;) /bow /salute All~

The simplest way to get what you want would to equip the augmented gear, and then type //gs export currentset. The exported set will be in addons/Gearswap/data/export. Open up the file and set what the equipment says.

Does anyone know how to get equipment to change automatically when your hpp or mpp goes above a certain percentage? Like 95%?
 Quetzalcoatl.Orestes
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2014-10-27 13:37:50  
Siren.Inuyushi said: »

Does anyone know how to get equipment to change automatically when your hpp or mpp goes above a certain percentage? Like 95%?

As I mentioned before, it's not possible. Gearswap has a lot of "events" that when triggered, allow the user to perform arbitrary actions, but your HP changing is not one of them.

You can check your HP
- when your status changes. idle engaged resting, etc.
- when you gain/lose a buff
- before/during/after using abilities, spells, weaponskills
- when you press a button (custom, or F12)

I should probably have said, it's not possible "within reason", as I'm sure somebody could think of some way to hack this in by filtering the chat log, etc. but that honestly sounds like overkill.

You could check in precast or customize_idle_sets / customize_melee_sets, and job_update() to reach a satisfactory result.
 Siren.Inuyushi
Offline
サーバ: Siren
Game: FFXI
user: Inuyushi
Posts: 507
By Siren.Inuyushi 2014-10-27 20:11:33  
Ah ok, got it. Just good to know. I didn't know if it could or not.

Thanks!
 Ragnarok.Flippant
Offline
サーバ: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2014-10-28 04:58:37  
While Gearswap has functions that it calls itself based on Windower events, you can also register your own Windower events. You can view various events here:

http://dev.windower.net/doku.php?id=lua:api:events:start

Example (would be added anywhere outside of other functions in your lua file and will be called every time your hpp changes):
Code
windower.register_event('hpp change', function(new, old)
    if player.hpp >= 95 then
        do something
    end
end)


Seems largely unnecessary to me, but yes, it can be done.
 
Offline
Posts:
By 2014-10-28 15:04:16
 Undelete | Edit  | Link | 引用 | 返事
 
Post deleted by User.
 Ragnarok.Flippant
Offline
サーバ: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2014-10-29 01:32:25  
Not sure I understand exactly D:

spell.interrupted refers to the current spell passed to the function, not to a condition of the player, so it's never going to have valid use aside from in aftercast function (a spell can't already have been interrupted during precast). The final condition in your code also makes little sense to me (why do you want to equip your status gear during precast if you're not midaction?)

Are you saying...

1. Start casting Reraise
2. Equip Reraise precast
3. Equip Reraise midcast
4. Start casting Cure, spell is canceled during precast
5. Finish casting Reraise in Reraise midcast, but you don't go back to your status gear

or

1. Start casting Reraise
2. Equip Reraise precast
3. Equip Reraise midcast
4. Start casting Cure, spell is canceled during precast, but gear still equipped
5. Finish casting Reraise in Cure midcast

Either way, I can't reproduce any such issue using just
Code
if midaction() then cancel_spell() return end

in precast, but I also don't use Mote's files. If you can be more specific as to the actions that are happening, I could take a closer look.
Offline
Posts: 86
By wick 2014-10-29 06:40:02  
hello,
I have a problem that happens occasionally where as brd when i JA songs, it will sometimes not equip my duration gear for a random song, usually if i sing a song fast after JA's. Could this be just a lag issue or is there someone who could check my lua too see if its a bit dodgy? Thanks a lot in advance!

 Siren.Noxzema
Offline
サーバ: Siren
Game: FFXI
user: Noxzema
Posts: 228
By Siren.Noxzema 2014-11-03 10:14:25  
So I'm starting my switch from SC to GS, using Motes mnk.lua. I'm running into a snag when using trying to use emp body for Impetus, I have it switch when I have HF and Imp up, but not when it is just Impetus.
Basically I'd like to have it locked when I have the fodder/normal sets on, but off for the SomeAcc/ACC sets. I've been googling, but I'm not seeing anything about it. So I'm not sure if I'm just missing something, or if I broke something while entering my gear.
 Fenrir.Brimstonefox
Offline
サーバ: Fenrir
Game: FFXI
user: Brimstone
Posts: 183
By Fenrir.Brimstonefox 2014-11-04 18:52:52  
I'm completely flummoxed, I'm using Mote's v2 files, I was trying to create a variable to switch my weapon (and it works fine) however I can't get it to actually switch the weapon. My modifications to the pick_tp_weapon function (there is an similar example in the brd.lua):
Code
function pick_tp_weapon()
	add_to_chat(122,' pick tp weapon '..state.WeaponMode.value)
	-- if staffs:contains(player.equipment.main) then
		-- state.CombatWeapon:set('Staff')
	-- end
	-- if polearms:contains(player.equipment.main) then
		-- state.CombatWeapon:set('Polearm')
	-- end
	if state.WeaponMode.value == 'Polearm' then
		state.CombatWeapon:set('Polearm')
	end
	if state.WeaponMode.value == 'Staff' then
		state.CombatWeapon:set('Staff')
	end
	add_to_chat(123, 'combat weapon set to '..state.CombatWeapon.value)
	
end


Now the commented out code works fine, so long as I manually switch my weapon. The active code is not working and I'm not sure why, WeaponMode is set correctly as I can see it echo when the function runs. The error I'm getting is: attempt to call method 'set' (a nil value) What's driving me bonkers is its referencing the state.CombatWeapon:set('Staff') line but that code works fine if I use the staffs:contains(player.equipment.main) if instead of the state.WeaponMode.value == 'Staff' if, which makes no sense to me.

Any ideas?
 Quetzalcoatl.Orestes
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2014-11-05 12:01:05  
Fenrir.Brimstonefox said: »
I'm completely flummoxed, I'm using Mote's v2 files, I was trying to create a variable to switch my weapon (and it works fine) however I can't get it to actually switch the weapon. My modifications to the pick_tp_weapon function (there is an similar example in the brd.lua):
Code
function pick_tp_weapon()
	add_to_chat(122,' pick tp weapon '..state.WeaponMode.value)
	-- if staffs:contains(player.equipment.main) then
		-- state.CombatWeapon:set('Staff')
	-- end
	-- if polearms:contains(player.equipment.main) then
		-- state.CombatWeapon:set('Polearm')
	-- end
	if state.WeaponMode.value == 'Polearm' then
		state.CombatWeapon:set('Polearm')
	end
	if state.WeaponMode.value == 'Staff' then
		state.CombatWeapon:set('Staff')
	end
	add_to_chat(123, 'combat weapon set to '..state.CombatWeapon.value)
	
end


Now the commented out code works fine, so long as I manually switch my weapon. The active code is not working and I'm not sure why, WeaponMode is set correctly as I can see it echo when the function runs. The error I'm getting is: attempt to call method 'set' (a nil value) What's driving me bonkers is its referencing the state.CombatWeapon:set('Staff') line but that code works fine if I use the staffs:contains(player.equipment.main) if instead of the state.WeaponMode.value == 'Staff' if, which makes no sense to me.

Any ideas?

It's pretty difficult to help you without knowing where you're actually calling this function, and what state.WeaponMode looks like.

I'm also a little confused by this usage scenario. You need a default state, and don't seem to have one specified. I'm going to assume 'Polearm' is what you normally gear for, and the only real toggle you need here is for Staff. If that doesn't make sense, think about what setting CombatWeapon does. It allows you to build a set, in addition to your normal set. For example, your normal set is sets.engaged = {} You want to equip a Staff, so you need sets.engaged.Staff = {}. Just make sure you put a polearm in your regular set. Unless there's a third usage scenario you didn't mention, that should be all that's necessary.

This is how you would do this:

You would need this in job_setup()
Code
function job_setup()
state.WeaponMode = M{['description']='Weapon Mode', 'Normal', 'Staff'}

pick_tp_weapon()
end


Put it in job_update, so you can hit F12 and have it re-evaluate anytime you want.
Code
function job_update(cmdParams, eventArgs)
   pick_tp_weapon()
end


Add the following to job_state_change.
Code
function job_state_change(stateField, newValue, oldValue)
   if stateField == 'Weapon Mode' then
       if newValue == 'Staff' then
          state.CombatWeapon:set('Staff')
       else
          state.CombatWeapon:reset()
       end
   end
end


And finally, your function
Code
function pick_tp_weapon()
    add_to_chat(122,' pick tp weapon '..state.WeaponMode.value)
    if state.WeaponMode.value == 'Staff' then
        state.CombatWeapon:set('Staff')
    else
        state.CombatWeapon:reset()
    end
    add_to_chat(123, 'combat weapon set to '..state.CombatWeapon.value)
     
end


Either use a macro, or type //gs c cycle WeaponMode
 Fenrir.Brimstonefox
Offline
サーバ: Fenrir
Game: FFXI
user: Brimstone
Posts: 183
By Fenrir.Brimstonefox 2014-11-05 15:28:04  
The format of the rest of the file is similar to say this:
https://github.com/Kinematics/GearSwap-Jobs/blob/master/BRD.lua

I believe its called in job_update (sorry I'm at work now and don't have the file).

The idea for weaponMode was to create a variable to control CombatWeapon with (can I control it directly?).

I have a list of weapon types in weapon mode I wanted to cycle through, I can do that, and sets.engaged.Staff (or whatever) has main="my favorite staff" in it already.

Maybe the problem is my definition of weaponmode, I defined it as a list (probably not the correct lua term), but that doesn't explain why it echos the proper value, and points to the state.CombatWeapon:set('Staff') as being the problem, when it works fine in a slightly different conditional. I can try to strip down the lua file some and post the whole thing if you think that would help.
 Fenrir.Brimstonefox
Offline
サーバ: Fenrir
Game: FFXI
user: Brimstone
Posts: 183
By Fenrir.Brimstonefox 2014-11-05 19:57:32  
Here's the full file, works fine until I hit cntl-` it says it changes to Staff (weaponMode) but won't set combatweapon from it, I tried setting combatweapon directly and it doesn't work.
Code
-------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------
 
-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
 
-- Initialization function for this job file.
function get_sets()
    mote_include_version = 2
     
    -- Load and initialize the include file.
    include('Mote-Include.lua')
end
 
 
-- Setup vars that are user-independent.
function job_setup()
--  state.CombatForm = get_combat_form()
     
    state.Buff = {}
  end
 
 
-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
	-- add_to_chat(122,'user setup')
	-- Options: Override default values
	state.OffenseMode:options('Normal', 'Acc', 'Att', 'Crit', 'DA', 'Haste', 'Skill', 'sTP', 'STR')
	state.HybridMode:options('Normal', 'PDT', 'Reraise')
	state.WeaponskillMode:options('Normal', 'Acc', 'Att', 'Mod')
	state.CastingMode:options('Normal')
	state.IdleMode:options('Normal')
	state.RestingMode:options('Normal')
	state.PhysicalDefenseMode:options('PDT', 'Reraise')
	state.MagicalDefenseMode:options('MDT')
	-- state.WeaponMode:options('Polearm', 'Staff', 'Club', 'Dagger', 'Sword')
	state.WeaponMode = M{['description']='Weapon Mode', 'Polearm', 'Staff', 'Club', 'Dagger', 'Sword'}

	-- state.WeaponMode:set('Polearm')

	polearms = S{'Gungnir'}
	staffs = S{'Chatoyant Staff'}

    -- Additional local binds
    --send_command('bind ^` input /ja "Hasso" <me>')
    --send_command('bind !` input /ja "Seigan" <me>')
	send_command('bind ^` gs c cycle WeaponMode')
	
	select_default_macro_book()
end
 
 
-- Called when this job file is unloaded (eg: job change)
function file_unload()
    if binds_on_unload then
        binds_on_unload()
    end
 
    send_command('unbind ^`')
    send_command('unbind !-')
end
 
 
-- Define sets and vars used by this job file.
function init_gear_sets()
	add_to_chat(122,'init gear sets')
	--------------------------------------
	-- Start defining the sets
	--------------------------------------
	-- Sets to return to when not performing an action.
   
	-- Idle sets
	sets.idle = {head="Twilight Helm",neck="Twilight Torque",ear1="Ethereal Earring",ear2="Moonshade Earring",
			body="Twlight Mail",hands="Buremte Gloves",ring1="Rajas Ring",ring2="Ulthalam's Ring",
			back="Updraft Mantle",waist="Zoran's Belt",legs="Crimson Cuisses",feet="Ejekamal Boots"}

	-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
	sets.idle.Town = set_combine(sets.idle, {})
   
	sets.idle.Field = set_combine(sets.idle, {})

	sets.idle.Weak = set_combine(sets.idle, {})

	-- Resting sets
	sets.resting = set_combine(sets.idle, {})
	
	
	
	-- 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="Potestas Bomblet",
			head="Yaoyotl Helm",neck="Ganesha's Mala",ear1="Bladeborn Earring",ear2="Steelflash Earring",
			body="Vishap Mail",hands="Miki. Gauntlets",ring1="Rajas Ring",ring2="K'ayres Ring",
			back="Atheling Mantle",waist="Zoran's Belt",legs="Phorcys Dirs",feet="Ejekamal Boots"}
	sets.engaged.Polearm = {}
	sets.engaged.Staff = {}
			
	-- Basic Mode definitions
	sets.Mode = {}
	sets.Mode.Acc = set_combine(sets.engaged, {ammo="Potestas Bomblet",
			head="Ares' Mask",neck="Agasaya's Collar",ear1="Bladeborn Earring",ear2="Steelflash Earring",
			body="Vishap Mail",hands="Miki. Gauntlets",ring1="Rajas Ring",ring2="Ulthalam's Ring",
			back="Atheling Mantle",waist="Nu Sash",legs="Lncr. Cuissots +2",feet="Wym. Greaves +2"})
			
			
			
	sets.engaged.Polearm = set_combine(sets.engaged, {main="Gungnir", sub="Pole Grip",ammo="Potestas Bomblet"})
	sets.engaged.Polearm.Refresh = set_combine(sets.engaged, {ear1="Ethereal Earring",ear2="Brutal Earring",
			body="Ares' Cuirass"})
	sets.engaged.Polearm.Acc = set_combine(sets.engaged.Polearm, sets.Mode.Acc)
	sets.engaged.Staff = set_combine(sets.engaged, {main="Chatoyant Staff",
			ear2="Terminus Earring",
			ring2="Prouesse Ring"})
	sets.engaged.Staff.Acc = set_combine(sets.engaged.Staff, sets.Mode.Acc)
	sets.engaged.Reraise = set_combine(sets.engaged,{
			head="Twilight Helm",
			body="Twilight Mail"})
			
end
 
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks that are called to process player actions at specific points in time.
-------------------------------------------------------------------------------------------------------------------
 
 
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
    return idleSet
end
 
-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
    return meleeSet
end
  
-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------
 
-- Called before the Include starts constructing melee/idle/resting sets.
-- Can customize state or custom melee class values at this point.
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_handle_equipping_gear(status, eventArgs)
	add_to_chat(122,'handle equiping gear')
	pick_tp_weapon()
end
 
 
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
	add_to_chat(122,'customize idle set')
    return idleSet
end
 
-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
	add_to_chat(122,'customize melee set')
    return meleeSet
end
 
-------------------------------------------------------------------------------------------------------------------
-- General hooks for other 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)
	determine_groups()
end
 
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
 
-- 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)
        classes.CustomMeleeGroups:clear()
        if areas.Adoulin:contains(world.area) and buffactive.ionis then
                classes.CustomMeleeGroups:append('Adoulin')
        end
        if areas.Assault:contains(world.area) then
                classes.CustomMeleeGroups:append('Assault')
        end
		state.CombatWeapon = player.equipment.main
end
  
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------

function determine_groups()
	-- add_to_chat(122,' determine groups')
	classes.CustomMeleeGroups:clear()
	
	-- If sub job has MP then set refresh groups for refresh gear
	if jobs.MP:contains(player.sub_job) then
		-- add_to_chat(122,' using refresh because SJ: '..player.sub_job)
		classes.CustomMeleeGroups:append('Refresh')
	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, 1)
	elseif player.sub_job == 'NIN' then
		set_macro_page(4, 1)
	elseif player.sub_job == 'SAM' then
		set_macro_page(1, 1)
	elseif player.sub_job == 'WHM' then
		set_macro_page(3, 1)
	else
		set_macro_page(1, 1)
	end
end

-- Examine equipment to determine what our current TP weapon is.
function pick_tp_weapon()
	add_to_chat(122,' pick tp weapon '..state.WeaponMode.value)
	-- if staffs:contains(player.equipment.main) then
		-- state.CombatWeapon:set('Staff')
	-- end
	-- if polearms:contains(player.equipment.main) then
		-- state.CombatWeapon:set('Polearm')
	-- end
	if state.WeaponMode.value == 'Polearm' then
		state.CombatWeapon:set('Polearm')
	end
	if state.WeaponMode.value == 'Staff' then
		state.CombatWeapon:set('Staff')
	end
	add_to_chat(123, 'combat weapon set to '..state.CombatWeapon.value)
end
 Quetzalcoatl.Orestes
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2014-11-05 20:31:07  
Fenrir.Brimstonefox said: »
Here's the full file, works fine until I hit cntl-` it says it changes to Staff (weaponMode) but won't set combatweapon from it, I tried setting combatweapon directly and it doesn't work.
Code
-------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------
 
-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
 
-- Initialization function for this job file.
function get_sets()
    mote_include_version = 2
     
    -- Load and initialize the include file.
    include('Mote-Include.lua')
end
 
 
-- Setup vars that are user-independent.
function job_setup()
--  state.CombatForm = get_combat_form()
     
    state.Buff = {}
  end
 
 
-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
	-- add_to_chat(122,'user setup')
	-- Options: Override default values
	state.OffenseMode:options('Normal', 'Acc', 'Att', 'Crit', 'DA', 'Haste', 'Skill', 'sTP', 'STR')
	state.HybridMode:options('Normal', 'PDT', 'Reraise')
	state.WeaponskillMode:options('Normal', 'Acc', 'Att', 'Mod')
	state.CastingMode:options('Normal')
	state.IdleMode:options('Normal')
	state.RestingMode:options('Normal')
	state.PhysicalDefenseMode:options('PDT', 'Reraise')
	state.MagicalDefenseMode:options('MDT')
	-- state.WeaponMode:options('Polearm', 'Staff', 'Club', 'Dagger', 'Sword')
	state.WeaponMode = M{['description']='Weapon Mode', 'Polearm', 'Staff', 'Club', 'Dagger', 'Sword'}

	-- state.WeaponMode:set('Polearm')

	polearms = S{'Gungnir'}
	staffs = S{'Chatoyant Staff'}

    -- Additional local binds
    --send_command('bind ^` input /ja "Hasso" <me>')
    --send_command('bind !` input /ja "Seigan" <me>')
	send_command('bind ^` gs c cycle WeaponMode')
	
	select_default_macro_book()
end
 
 
-- Called when this job file is unloaded (eg: job change)
function file_unload()
    if binds_on_unload then
        binds_on_unload()
    end
 
    send_command('unbind ^`')
    send_command('unbind !-')
end
 
 
-- Define sets and vars used by this job file.
function init_gear_sets()
	add_to_chat(122,'init gear sets')
	--------------------------------------
	-- Start defining the sets
	--------------------------------------
	-- Sets to return to when not performing an action.
   
	-- Idle sets
	sets.idle = {head="Twilight Helm",neck="Twilight Torque",ear1="Ethereal Earring",ear2="Moonshade Earring",
			body="Twlight Mail",hands="Buremte Gloves",ring1="Rajas Ring",ring2="Ulthalam's Ring",
			back="Updraft Mantle",waist="Zoran's Belt",legs="Crimson Cuisses",feet="Ejekamal Boots"}

	-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
	sets.idle.Town = set_combine(sets.idle, {})
   
	sets.idle.Field = set_combine(sets.idle, {})

	sets.idle.Weak = set_combine(sets.idle, {})

	-- Resting sets
	sets.resting = set_combine(sets.idle, {})
	
	
	
	-- 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="Potestas Bomblet",
			head="Yaoyotl Helm",neck="Ganesha's Mala",ear1="Bladeborn Earring",ear2="Steelflash Earring",
			body="Vishap Mail",hands="Miki. Gauntlets",ring1="Rajas Ring",ring2="K'ayres Ring",
			back="Atheling Mantle",waist="Zoran's Belt",legs="Phorcys Dirs",feet="Ejekamal Boots"}
	sets.engaged.Polearm = {}
	sets.engaged.Staff = {}
			
	-- Basic Mode definitions
	sets.Mode = {}
	sets.Mode.Acc = set_combine(sets.engaged, {ammo="Potestas Bomblet",
			head="Ares' Mask",neck="Agasaya's Collar",ear1="Bladeborn Earring",ear2="Steelflash Earring",
			body="Vishap Mail",hands="Miki. Gauntlets",ring1="Rajas Ring",ring2="Ulthalam's Ring",
			back="Atheling Mantle",waist="Nu Sash",legs="Lncr. Cuissots +2",feet="Wym. Greaves +2"})
			
			
			
	sets.engaged.Polearm = set_combine(sets.engaged, {main="Gungnir", sub="Pole Grip",ammo="Potestas Bomblet"})
	sets.engaged.Polearm.Refresh = set_combine(sets.engaged, {ear1="Ethereal Earring",ear2="Brutal Earring",
			body="Ares' Cuirass"})
	sets.engaged.Polearm.Acc = set_combine(sets.engaged.Polearm, sets.Mode.Acc)
	sets.engaged.Staff = set_combine(sets.engaged, {main="Chatoyant Staff",
			ear2="Terminus Earring",
			ring2="Prouesse Ring"})
	sets.engaged.Staff.Acc = set_combine(sets.engaged.Staff, sets.Mode.Acc)
	sets.engaged.Reraise = set_combine(sets.engaged,{
			head="Twilight Helm",
			body="Twilight Mail"})
			
end
 
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks that are called to process player actions at specific points in time.
-------------------------------------------------------------------------------------------------------------------
 
 
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
    return idleSet
end
 
-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
    return meleeSet
end
  
-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------
 
-- Called before the Include starts constructing melee/idle/resting sets.
-- Can customize state or custom melee class values at this point.
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_handle_equipping_gear(status, eventArgs)
	add_to_chat(122,'handle equiping gear')
	pick_tp_weapon()
end
 
 
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
	add_to_chat(122,'customize idle set')
    return idleSet
end
 
-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
	add_to_chat(122,'customize melee set')
    return meleeSet
end
 
-------------------------------------------------------------------------------------------------------------------
-- General hooks for other 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)
	determine_groups()
end
 
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
 
-- 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)
        classes.CustomMeleeGroups:clear()
        if areas.Adoulin:contains(world.area) and buffactive.ionis then
                classes.CustomMeleeGroups:append('Adoulin')
        end
        if areas.Assault:contains(world.area) then
                classes.CustomMeleeGroups:append('Assault')
        end
		state.CombatWeapon = player.equipment.main
end
  
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------

function determine_groups()
	-- add_to_chat(122,' determine groups')
	classes.CustomMeleeGroups:clear()
	
	-- If sub job has MP then set refresh groups for refresh gear
	if jobs.MP:contains(player.sub_job) then
		-- add_to_chat(122,' using refresh because SJ: '..player.sub_job)
		classes.CustomMeleeGroups:append('Refresh')
	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, 1)
	elseif player.sub_job == 'NIN' then
		set_macro_page(4, 1)
	elseif player.sub_job == 'SAM' then
		set_macro_page(1, 1)
	elseif player.sub_job == 'WHM' then
		set_macro_page(3, 1)
	else
		set_macro_page(1, 1)
	end
end

-- Examine equipment to determine what our current TP weapon is.
function pick_tp_weapon()
	add_to_chat(122,' pick tp weapon '..state.WeaponMode.value)
	-- if staffs:contains(player.equipment.main) then
		-- state.CombatWeapon:set('Staff')
	-- end
	-- if polearms:contains(player.equipment.main) then
		-- state.CombatWeapon:set('Polearm')
	-- end
	if state.WeaponMode.value == 'Polearm' then
		state.CombatWeapon:set('Polearm')
	end
	if state.WeaponMode.value == 'Staff' then
		state.CombatWeapon:set('Staff')
	end
	add_to_chat(123, 'combat weapon set to '..state.CombatWeapon.value)
end
Check the examples I posted. You have to state.CombatWeapon:reset(), and call job_state_change().

I would do something like this, since you have more than a few weapons. i.e. Add "Normal", and test it like so..
Code
state.WeaponMode = M{['description']='Weapon Mode', 'Normal', 'Polearm', 'Staff', 'Club', 'Dagger', 'Sword'}

function job_state_change(stateField, newValue, oldValue)
   if stateField == 'Weapon Mode' then
       if newValue ~= 'Normal' then
          state.CombatWeapon:set(newValue)
       else
          state.CombatWeapon:reset()
       end
   end
end


You should be able to do something similar in pick_tp_weapon()
 Fenrir.Brimstonefox
Offline
サーバ: Fenrir
Game: FFXI
user: Brimstone
Posts: 183
By Fenrir.Brimstonefox 2014-11-06 19:07:48  
Ok Fantastic thank you its working now.
 Siren.Kenesu
Offline
サーバ: Siren
Game: FFXI
user: iKhaos
Posts: 150
By Siren.Kenesu 2014-11-06 21:34:49  
I just came back to the game after a break and need some help getting started with gearswap. anyone have vent that could walk me though it. much appreciated.
 Phoenix.Demonjustin
Offline
サーバ: Phoenix
Game: FFXI
Posts: 661
By Phoenix.Demonjustin 2014-11-06 21:54:43  
Ok, I'm getting an issue with my gear swap. The line says it's actually an issue with Mote-Include line 879 when it comes to Aftercast. My gear isn't swapping to midcast or idle at all.

This one is the one having the issues. Basically I just copy-pasted most of my stuff from my old one into Motenten's RDM Gearswap to create the new one. So~ if anyone can help me by telling me what I am doing that's breaking my new one and how to fix it, that'd be great. I really would love to be able to play my RDM again. : /
 Phoenix.Demonjustin
Offline
サーバ: Phoenix
Game: FFXI
Posts: 661
By Phoenix.Demonjustin 2014-11-06 21:56:43  
My old Gearswap before I updated it to 2.0 was...
 Carbuncle.Riaka
Offline
サーバ: Carbuncle
Game: FFXI
user: Grimix88
Posts: 43
By Carbuncle.Riaka 2014-11-07 18:19:47  
Can really use some help getting gearswap to work. I downloaded a blu.lua and changed my gear over but it won't load in game for some reason. My other plug ins work.

Am I supposed to be saving all my job .lua to the data folder in the gearswap folder?
 Cerberus.Conagh
Offline
サーバ: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2014-11-07 18:42:20  
Carbuncle.Riaka said: »
Can really use some help getting gearswap to work. I downloaded a blu.lua and changed my gear over but it won't load in game for some reason. My other plug ins work.

Am I supposed to be saving all my job .lua to the data folder in the gearswap folder?

Yes.
 Carbuncle.Riaka
Offline
サーバ: Carbuncle
Game: FFXI
user: Grimix88
Posts: 43
By Carbuncle.Riaka 2014-11-07 18:49:11  
So what am I doing wrong to make it not load in game....
 Cerberus.Conagh
Offline
サーバ: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2014-11-07 19:04:50  
is it named as such

Riaka_SAM.lua

Name_job.lua is the format
 Fenrir.Duvelamilla
Offline
サーバ: Fenrir
Game: FFXI
Posts: 69
By Fenrir.Duvelamilla 2014-11-13 10:29:25  
I am in the process of trying to change my BRD over to Motes BRD Lua. I had found a different Lua before hearing about all of Motes so I am trying to eventually change all my jobs over to it. However with the 1st Lua I found there was a command to actually manually use my Daurabla it was

status_change(player.status)
elseif command == 'C18' then -- Daurdabla Toggle --
if Daurdabla == 'ON' then
Daurdabla = 'OFF'
add_to_chat(123,'Daurdabla: [OFF]')
else
Daurdabla = 'ON'
add_to_chat(158,'Daurdabla: [ON]')
end

I really prefer that over having to cast 3 songs then recast them to over write them but I REALLY suck at coding.. is there a way I can incorporate this in the Mote you made?

Also I was able to make a list of songs such as ""Fowl Aubade","Shining Fantasia","Herb Pastoral","Scop's Operetta","Puppet's Operetta","Gold Capricco","Warding Round","Goblin Gavotte","Chocobo Mazurka","Raptor Mazurka" that would automatically be cast with harp but again I can not figure out how to change it to make it do it with Motes. Any help would be GREATLY appreciated. I had PMed him through here but have not yet received a reply, so i thought I would reach out to some of you other who might be able to help.
 Bahamut.Shirai
Offline
サーバ: Bahamut
Game: FFXI
user: Shirai
By Bahamut.Shirai 2014-11-13 14:20:58  
I've got a weird one, thanks to the help of some folks over in the Summoner forums I've optimized my my Elemental Siphon rules so that they add in the right equipment depending on the circumstances I use Siphon under.

I've got it working like a charm apart from one little detail: My gearswap for some reason does not recognize the element of my elementals. <_<

To give an example, if I summon Titan on earthsday and use /ja "Elemental Siphon" <me> gearswap neatly equips the zodiac ring instead of the Glob in my Siphon set, however on Earth Spirit, it doesn't.

Which library needs to be accessed to fix this?
Or are there some rules I can add to my own GS?

Thanks in advance!

[edit]
My SMN LUA
http://pastebin.com/s08YpDDQ

[edit 2]
Thank you for the answer below.
Offline
Posts: 224
By Acacia 2014-11-13 15:43:10  
Bahamut.Shirai said: »
I've got a weird one, thanks to the help of some folks over in the Summoner forums I've optimized my my Elemental Siphon rules so that they add in the right equipment depending on the circumstances I use Siphon under.

I've got it working like a charm apart from one little detail: My gearswap for some reason does not recognize the element of my elementals. <_<

To give an example, if I summon Titan on earthsday and use /ja "Elemental Siphon" <me> gearswap neatly equips the zodiac ring instead of the Glob in my Siphon set, however on Earth Spirit, it doesn't.

Which library needs to be accessed to fix this?
Or are there some rules I can add to my own GS?

Thanks in advance!

[edit]
My SMN LUA
http://pastebin.com/s08YpDDQ
That's because of a bug in GearSwap, I sent a pull request with the fix so hopefully it will be pushed live soon.
[+]
 Cerberus.Conagh
Offline
サーバ: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2014-11-16 21:44:02  
This is more to do with AutoRA but it's Lua and you can use alot of the functionality in gearswap..
Code
player.vitals['TP'] > 1000


Now on RNG I'm trying to make this work, however I seem to crop up to an issue with flurry 2 on.

It seems to not register I'm at 1k tp and shoots again, but when I don't have flurry on it works perfectly fine 99.99% of the time.

I surmise this is due to the way SE sends Packet Chunks which include TP updates which is what Vitals works off of?

Is there a counter measure or a way around this that anyone knows of?
First Page 2 3 ... 37 38 39 ... 182 183 184
Log in to post.