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 ... 101 102 103 ... 182 183 184
 Siren.Bloodlusty
Offline
サーバ: Siren
Game: FFXI
Posts: 101
By Siren.Bloodlusty 2016-06-03 14:01:55  
Thanks it was the body that was causing the issues :)
 Quetzalcoatl.Orestes
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2016-06-03 15:21:08  
Fenrir.Nightfyre said: »
Code
if spell.english=='Warp' and player.sub_job~='BLM' then
		windower.send_command('input /equip ring1 "Warp Ring"; wait 9; input /item "Warp Ring" <me>;')
		cancel_spell()
		return


Best I can tell this code will never return true, presumably due to however Gearswap handles spells you can't actually cast. Is there an alternative way I could write this that would work?

You could try a self_command.

Just tested this in my NIN.lua (which is based on Mote's) and it worked. equip(), and disable() didn't work in this context, so I had to make a set with Warp Ring in it, and call equip with send_command.
Code
-- command is //gs c toggle UseWarp
function job_setup()
    state.UseWarp = M(false, 'Use Warp')
end
function job_state_change(stateField, newValue, oldValue)
    if stateField == 'Use Warp' then
        add_to_chat(8, '------------WARPING-----------')
        send_command('input //gs equip sets.Warp;')
        send_command('input //gs disable ring1;@wait 10.0;input /item "Warp Ring" <me>;input //gs enable ring1;')
    end
end



Non-Mote's would do something like this.
Code
-- command would be //gs c Warp 
function self_command(command)
        if command == 'Warp' then 
            add_to_chat(8, '------------WARPING-----------')
            send_command('input //gs equip sets.Warp;')
            send_command('input //gs disable ring1;@wait 10.0;input /item "Warp Ring" <me>;input //gs enable ring1;')
        end
end


I suspect the enable/disable commands aren't working as written, but no time to test now.
 Fenrir.Nightfyre
Offline
サーバ: Fenrir
Game: FFXI
user: Nightfyre
Posts: 11681
By Fenrir.Nightfyre 2016-06-03 18:18:25  
That was my next step yeah, wanted to see if I could do it with the spell first because lazy.
 Fenrir.Brimstonefox
Offline
サーバ: Fenrir
Game: FFXI
user: Brimstone
Posts: 183
By Fenrir.Brimstonefox 2016-06-03 19:02:44  
Leviathan.Arcon said: »
Can you give an example of what action you mean? I don't understand what you're trying to do.

Either way, you can sleep your currently running program using "coroutine.sleep(0.4)", but that will delay the currently processing function entirely. Instead it may be smarter to write a new function to send the command and delay that with "f:schedule(0.4)", where "f" is the function you defined.

Example usage:
Code
require('functions')

send_action = function()
    -- Code that sends an action
end

send_action:schedule(0.4)


If you want "send_action" to always be delayed by that amount you can even build it into the function using functions.delay:
Code
require('functions')

send_action = (function()
    -- Code that sends an action
end):delay(0.4)

send_action()

I've tried using coroutine.sleep(2) to pause a function for 2 seconds but it doesn't appear to work at all, anyway to do this?

I tried one or two things here: http://lua-users.org/wiki/SleepFunction

I think one didn't work at all, the other pretty much crashed the game (I don't remember which was which)

I literally would be happy with:
Code
add_to_chat(1, "Hello")
sleep(1)
add_to_chat(1, "World!")


And have those 2 strings appear 1 second apart is all I want (obviously I'm working more complex logic, but that is the simplest version of anything).
 Siren.Bloodlusty
Offline
サーバ: Siren
Game: FFXI
Posts: 101
By Siren.Bloodlusty 2016-06-04 11:51:09  
Can someone explain how I switch to idle / movement / refresh gear. Am i supposed to use a key or should this switch automatically outside of combat?
Code
function get_sets()
    AccIndex = 1
    AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid/Stun. First Set Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below. Most of These Sets Are Empty So You Need To Edit Them On Your Own. Remember To Check What The Combined Set Is For Each Sets. --
    WeaponIndex = 1
    WeaponArray = {"Liberator","Ragnarok","Apocalypse"} -- Default Main Weapon Is Liberator. Can Delete Any Weapons/Sets That You Don't Need Or Replace/Add The New Weapons That You Want To Use. --
    IdleIndex = 1
    IdleArray = {"Movement","Regen","Refresh"} -- Default Idle Set Is Movement --
    Armor = 'None'
    Warp = 'None'
    Twilight = 'None'
    Attack = 'OFF' -- Set Default Attack Set ON or OFF Here --
    Rancor = 'ON' -- Set Default Rancor ON or OFF Here --
    Mekira = 'OFF' -- Set Default Mekira ON or OFF Here --
    Samurai_Roll = 'OFF' -- Set Default SAM Roll ON or OFF Here --
    target_distance = 5 -- Set Default Distance Here --
    select_default_macro_book() -- Change Default Macro Book At The End --
 
    sc_map = {SC1="Resolution", SC2="LastResort", SC3="Souleater"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
 
    sets.Idle = {}
    -- Idle/Town Sets --
    sets.Idle.Regen = {
            ammo="Seeth. Bomblet +1",
			head={ name="Valorous Mask", augments={'Accuracy+25 Attack+25','Weapon skill damage +3%','Accuracy+13','Attack+8',}},
			body={ name="Valorous Mail", augments={'Accuracy+29','"Store TP"+4','Attack+6',}},
			hands={ name="Valorous Mitts", augments={'Accuracy+30','"Store TP"+7',}},
			legs="Crimson Cuisses",
			feet={ name="Valorous Greaves", augments={'Accuracy+24 Attack+24','Crit.hit rate+3','VIT+4','Accuracy+13','Attack+14',}},
			neck="Sanctity Necklace",
			waist="Kentarch Belt +1",
			left_ear="Zennaroi Earring",
			right_ear="Digni. Earring",
			left_ring="Petrov Ring",
			right_ring="Rajas Ring",
			back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Store TP"+10',}}
			}
			
    sets.Idle.Regen.Liberator = set_combine(sets.Idle.Regen,{
            main="Liberator"})
    sets.Idle.Regen.Ragnarok = set_combine(sets.Idle.Regen,{
            main="Ragnarok"})
    sets.Idle.Regen.Apocalypse = set_combine(sets.Idle.Regen,{
            main="Apocalypse"})
    sets.Idle.Movement = set_combine(sets.Idle.Regen,{
            ammo="Seeth. Bomblet +1",
			head={ name="Valorous Mask", augments={'Accuracy+25 Attack+25','Weapon skill damage +3%','Accuracy+13','Attack+8',}},
			body={ name="Valorous Mail", augments={'Accuracy+29','"Store TP"+4','Attack+6',}},
			hands={ name="Valorous Mitts", augments={'Accuracy+30','"Store TP"+7',}},
			legs="Crimson Cuisses",
			feet={ name="Valorous Greaves", augments={'Accuracy+24 Attack+24','Crit.hit rate+3','VIT+4','Accuracy+13','Attack+14',}},
			neck="Lissome Necklace",
			waist="Kentarch Belt +1",
			left_ear="Zennaroi Earring",
			right_ear="Digni. Earring",
			left_ring="Petrov Ring",
			right_ring="Rajas Ring",
			back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Store TP"+10',}}
			})
         
    sets.Idle.Movement.Liberator = set_combine(sets.Idle.Movement,{
            main="Liberator"})
    sets.Idle.Movement.Ragnarok = set_combine(sets.Idle.Movement,{
            main="Ragnarok"})
    sets.Idle.Movement.Apocalypse = set_combine(sets.Idle.Movement,{
            main="Apocalypse"})
 
    sets.Idle.Refresh = set_combine(sets.Idle.Regen,{
            ammo="Seeth. Bomblet +1",
			head={ name="Valorous Mask", augments={'Accuracy+25 Attack+25','Weapon skill damage +3%','Accuracy+13','Attack+8',}},
			body={ name="Valorous Mail", augments={'Accuracy+29','"Store TP"+4','Attack+6',}},
			hands={ name="Valorous Mitts", augments={'Accuracy+30','"Store TP"+7',}},
			legs={ name="Odyssean Cuisses", augments={'Accuracy+25 Attack+25','Phys. dmg. taken -2%','Accuracy+13',}},
			feet={ name="Valorous Greaves", augments={'Accuracy+24 Attack+24','Crit.hit rate+3','VIT+4','Accuracy+13','Attack+14',}},
			neck="Lissome Necklace",
			waist="Kentarch Belt +1",
			left_ear="Zennaroi Earring",
			right_ear="Digni. Earring",
			left_ring="Petrov Ring",
			right_ring="Rajas Ring",
			back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Store TP"+10',}}
			})
             
    sets.Idle.Refresh.Liberator = set_combine(sets.Idle.Refresh,{
            main="Liberator"})
    sets.Idle.Refresh.Ragnarok = set_combine(sets.Idle.Refresh,{
            main="Ragnarok"})
    sets.Idle.Refresh.Apocalypse = set_combine(sets.Idle.Refresh,{
            main="Apocalypse"})
 Quetzalcoatl.Orestes
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2016-06-04 12:11:31  
Siren.Bloodlusty said: »
Can someone explain how I switch to idle / movement / refresh gear. Am i supposed to use a key or should this switch automatically outside of combat?
Code
function get_sets()
    AccIndex = 1
    AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid/Stun. First Set Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below. Most of These Sets Are Empty So You Need To Edit Them On Your Own. Remember To Check What The Combined Set Is For Each Sets. --
    WeaponIndex = 1
    WeaponArray = {"Liberator","Ragnarok","Apocalypse"} -- Default Main Weapon Is Liberator. Can Delete Any Weapons/Sets That You Don't Need Or Replace/Add The New Weapons That You Want To Use. --
    IdleIndex = 1
    IdleArray = {"Movement","Regen","Refresh"} -- Default Idle Set Is Movement --
    Armor = 'None'
    Warp = 'None'
    Twilight = 'None'
    Attack = 'OFF' -- Set Default Attack Set ON or OFF Here --
    Rancor = 'ON' -- Set Default Rancor ON or OFF Here --
    Mekira = 'OFF' -- Set Default Mekira ON or OFF Here --
    Samurai_Roll = 'OFF' -- Set Default SAM Roll ON or OFF Here --
    target_distance = 5 -- Set Default Distance Here --
    select_default_macro_book() -- Change Default Macro Book At The End --
 
    sc_map = {SC1="Resolution", SC2="LastResort", SC3="Souleater"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
 
    sets.Idle = {}
    -- Idle/Town Sets --
    sets.Idle.Regen = {
            ammo="Seeth. Bomblet +1",
			head={ name="Valorous Mask", augments={'Accuracy+25 Attack+25','Weapon skill damage +3%','Accuracy+13','Attack+8',}},
			body={ name="Valorous Mail", augments={'Accuracy+29','"Store TP"+4','Attack+6',}},
			hands={ name="Valorous Mitts", augments={'Accuracy+30','"Store TP"+7',}},
			legs="Crimson Cuisses",
			feet={ name="Valorous Greaves", augments={'Accuracy+24 Attack+24','Crit.hit rate+3','VIT+4','Accuracy+13','Attack+14',}},
			neck="Sanctity Necklace",
			waist="Kentarch Belt +1",
			left_ear="Zennaroi Earring",
			right_ear="Digni. Earring",
			left_ring="Petrov Ring",
			right_ring="Rajas Ring",
			back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Store TP"+10',}}
			}
			
    sets.Idle.Regen.Liberator = set_combine(sets.Idle.Regen,{
            main="Liberator"})
    sets.Idle.Regen.Ragnarok = set_combine(sets.Idle.Regen,{
            main="Ragnarok"})
    sets.Idle.Regen.Apocalypse = set_combine(sets.Idle.Regen,{
            main="Apocalypse"})
    sets.Idle.Movement = set_combine(sets.Idle.Regen,{
            ammo="Seeth. Bomblet +1",
			head={ name="Valorous Mask", augments={'Accuracy+25 Attack+25','Weapon skill damage +3%','Accuracy+13','Attack+8',}},
			body={ name="Valorous Mail", augments={'Accuracy+29','"Store TP"+4','Attack+6',}},
			hands={ name="Valorous Mitts", augments={'Accuracy+30','"Store TP"+7',}},
			legs="Crimson Cuisses",
			feet={ name="Valorous Greaves", augments={'Accuracy+24 Attack+24','Crit.hit rate+3','VIT+4','Accuracy+13','Attack+14',}},
			neck="Lissome Necklace",
			waist="Kentarch Belt +1",
			left_ear="Zennaroi Earring",
			right_ear="Digni. Earring",
			left_ring="Petrov Ring",
			right_ring="Rajas Ring",
			back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Store TP"+10',}}
			})
         
    sets.Idle.Movement.Liberator = set_combine(sets.Idle.Movement,{
            main="Liberator"})
    sets.Idle.Movement.Ragnarok = set_combine(sets.Idle.Movement,{
            main="Ragnarok"})
    sets.Idle.Movement.Apocalypse = set_combine(sets.Idle.Movement,{
            main="Apocalypse"})
 
    sets.Idle.Refresh = set_combine(sets.Idle.Regen,{
            ammo="Seeth. Bomblet +1",
			head={ name="Valorous Mask", augments={'Accuracy+25 Attack+25','Weapon skill damage +3%','Accuracy+13','Attack+8',}},
			body={ name="Valorous Mail", augments={'Accuracy+29','"Store TP"+4','Attack+6',}},
			hands={ name="Valorous Mitts", augments={'Accuracy+30','"Store TP"+7',}},
			legs={ name="Odyssean Cuisses", augments={'Accuracy+25 Attack+25','Phys. dmg. taken -2%','Accuracy+13',}},
			feet={ name="Valorous Greaves", augments={'Accuracy+24 Attack+24','Crit.hit rate+3','VIT+4','Accuracy+13','Attack+14',}},
			neck="Lissome Necklace",
			waist="Kentarch Belt +1",
			left_ear="Zennaroi Earring",
			right_ear="Digni. Earring",
			left_ring="Petrov Ring",
			right_ring="Rajas Ring",
			back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Store TP"+10',}}
			})
             
    sets.Idle.Refresh.Liberator = set_combine(sets.Idle.Refresh,{
            main="Liberator"})
    sets.Idle.Refresh.Ragnarok = set_combine(sets.Idle.Refresh,{
            main="Ragnarok"})
    sets.Idle.Refresh.Apocalypse = set_combine(sets.Idle.Refresh,{
            main="Apocalypse"})

The code you pasted doesn't tell us anything about how these modes are changed, since it only contains your gear sets.

It looks like you're using Bokura's gearswap though. If so, it doesn't look like he has key bindings setup, so you'd have to add that yourself if you wanted hotkeys to cycle these modes.

Otherwise, the easiest option is to setup macros for cycling the various modes.

Accuracy Mode toggle macro
Code
console gs c C1

Main Weapon toggle macro
Code
console gs c C17

Idle mode (Refresh) toggle macro
Code
console gs c C6


tip: if you look in the self_command() function you can find all the various toggles Bokura provides.
 Siren.Bloodlusty
Offline
サーバ: Siren
Game: FFXI
Posts: 101
By Siren.Bloodlusty 2016-06-04 12:23:28  
Quetzalcoatl.Orestes said: »
The code you pasted doesn't tell us anything about how these modes are changed, since it only contains your gear sets.

It looks like you're using Bokura's gearswap though. If so, it doesn't look like he has key bindings setup, so you'd have to add that yourself if you wanted hotkeys to cycle these modes.

Otherwise, the easiest option is to setup macros for cycling the various modes.

Accuracy Mode toggle macro

Thanks, can you post an up to date version of your file please with gearsets in. Looks nice and would be easier to cross reference
 Quetzalcoatl.Orestes
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2016-06-04 12:39:16  
Siren.Bloodlusty said: »
Quetzalcoatl.Orestes said: »
The code you pasted doesn't tell us anything about how these modes are changed, since it only contains your gear sets.

It looks like you're using Bokura's gearswap though. If so, it doesn't look like he has key bindings setup, so you'd have to add that yourself if you wanted hotkeys to cycle these modes.

Otherwise, the easiest option is to setup macros for cycling the various modes.

Accuracy Mode toggle macro

Thanks, can you post an up to date version of your file please with gearsets in. Looks nice and would be easier to cross reference

My latest is here. As far as gear goes, my DRK has been on the sideline for a few months, so it's a little behind on gear.

To copy it, click the "Raw" link on that page and select all + copy + paste into a .lua file.
 Siren.Bloodlusty
Offline
サーバ: Siren
Game: FFXI
Posts: 101
By Siren.Bloodlusty 2016-06-04 13:09:56  
Quetzalcoatl.Orestes said: »
My latest is here. As far as gear goes, my DRK has been on the sideline for a few months, so it's a little behind on gear.

To copy it, click the "Raw" link on that page and select all + copy + paste into a .lua file.

Thanks looks awesome. Last point, if a combine set is used you only need to add the pieces you want to change, i.e mega simple refesh set should just have one line for bale chocker as it combines the tp set with it, correct?
 Quetzalcoatl.Orestes
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2016-06-04 13:23:27  
Siren.Bloodlusty said: »
Quetzalcoatl.Orestes said: »
My latest is here. As far as gear goes, my DRK has been on the sideline for a few months, so it's a little behind on gear.

To copy it, click the "Raw" link on that page and select all + copy + paste into a .lua file.

Thanks looks awesome. Last point, if a combine set is used you only need to add the pieces you want to change, i.e mega simple refesh set should just have one line for bale chocker as it combines the tp set with it, correct?

Yes, set_combine(setA, setB) will make sure setB's gear overwrites setA if they share slots.
 Ragnarok.Flippant
Offline
サーバ: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2016-06-04 18:02:50  
Fenrir.Nightfyre said: »
That was my next step yeah, wanted to see if I could do it with the spell first because lazy.

Spells you cant cast are caught by filtered_action function. In case you would rather type warp instead of gs c warp. You also would not need to check your subjob. (If you use Mote, he does not use this function for anything, so you can use it directly.)

Quetzalcoatl.Orestes said: »
Siren.Bloodlusty said: »
Quetzalcoatl.Orestes said: »
My latest is here. As far as gear goes, my DRK has been on the sideline for a few months, so it's a little behind on gear.

To copy it, click the "Raw" link on that page and select all + copy + paste into a .lua file.

Thanks looks awesome. Last point, if a combine set is used you only need to add the pieces you want to change, i.e mega simple refesh set should just have one line for bale chocker as it combines the tp set with it, correct?

Yes, set_combine(setA, setB) will make sure setB's gear overwrites setA if they share slots.

set_combine is also recursive if that is useful information for anyone. set_combine(setA,setB,setC) will stack each set on top of the previous.
[+]
 Fenrir.Nightfyre
Offline
サーバ: Fenrir
Game: FFXI
user: Nightfyre
Posts: 11681
By Fenrir.Nightfyre 2016-06-04 20:13:27  
That's exactly what I was looking for, thanks.
 Siren.Bloodlusty
Offline
サーバ: Siren
Game: FFXI
Posts: 101
By Siren.Bloodlusty 2016-06-05 06:47:52  
Quetzalcoatl.Orestes said: »
The code you pasted doesn't tell us anything about how these modes are changed, since it only contains your gear sets.

It looks like you're using Bokura's gearswap though. If so, it doesn't look like he has key bindings setup, so you'd have to add that yourself if you wanted hotkeys to cycle these modes.

Otherwise, the easiest option is to setup macros for cycling the various modes.

Accuracy Mode toggle macro
Code
console gs c C1




tip: if you look in the self_command() function you can find all the various toggles Bokura provides.

If I wanted to add a hotkey function for this into the file how would I do it?

Also, where abouts in the file should it be added?
 Asura.Krystela
Offline
サーバ: Asura
Game: FFXI
Posts: 334
By Asura.Krystela 2016-06-05 09:56:05  
Siren.Bloodlusty said: »
Quetzalcoatl.Orestes said: »
The code you pasted doesn't tell us anything about how these modes are changed, since it only contains your gear sets.

It looks like you're using Bokura's gearswap though. If so, it doesn't look like he has key bindings setup, so you'd have to add that yourself if you wanted hotkeys to cycle these modes.

Otherwise, the easiest option is to setup macros for cycling the various modes.

Accuracy Mode toggle macro
Code
console gs c C1




tip: if you look in the self_command() function you can find all the various toggles Bokura provides.

If I wanted to add a hotkey function for this into the file how would I do it?

Also, where abouts in the file should it be added?
At the start of your lua under function get sets like this:
Code
function get_sets()
-- Binds for modes
    send_command('bind ^f1 gs c C1')

^f1 is for ctrl + f1, f1 would just be f1
 Siren.Bloodlusty
Offline
サーバ: Siren
Game: FFXI
Posts: 101
By Siren.Bloodlusty 2016-06-05 11:14:46  
Thanks
 Siren.Bloodlusty
Offline
サーバ: Siren
Game: FFXI
Posts: 101
By Siren.Bloodlusty 2016-06-05 12:27:53  
I tried this but it did not work, I now get this error

attempt to call global 'send_command' (a nil value)
Code
function get_sets()
    AccIndex = 1
    AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid/Stun. First Set Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below. Most of These Sets Are Empty So You Need To Edit Them On Your Own. Remember To Check What The Combined Set Is For Each Sets. --
    WeaponIndex = 1
    WeaponArray = {"Liberator","Ragnarok","Apocalypse"} -- Default Main Weapon Is Liberator. Can Delete Any Weapons/Sets That You Don't Need Or Replace/Add The New Weapons That You Want To Use. --
    IdleIndex = 1
    IdleArray = {"Movement","Regen","Refresh"} -- Default Idle Set Is Movement --
	-- Binds for modes
		Send_command('bind ^f9 gs c C7')
    Armor = 'None'
    Warp = 'None'
    Twilight = 'None'
    Attack = 'OFF' -- Set Default Attack Set ON or OFF Here --
    Rancor = 'ON' -- Set Default Rancor ON or OFF Here --
    Mekira = 'OFF' -- Set Default Mekira ON or OFF Here --
    Samurai_Roll = 'OFF' -- Set Default SAM Roll ON or OFF Here --
    target_distance = 5 -- Set Default Distance Here --
    select_default_macro_book() -- Change Default Macro Book At The End --
	
 
    sc_map = {SC1="Resolution", SC2="LastResort", SC3="Souleater"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
 
 Ragnarok.Flippant
Offline
サーバ: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2016-06-05 21:33:55  
Best to assume everything is case-sensitive. You need to lowercase the 's'.
[+]
 Siren.Bloodlusty
Offline
サーバ: Siren
Game: FFXI
Posts: 101
By Siren.Bloodlusty 2016-06-07 01:06:29  
Ragnarok.Flippant said: »
Best to assume everything is case-sensitive. You need to lowercase the 's'.

Thanks all working now
 Ragnarok.Flippant
Offline
サーバ: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2016-06-07 16:53:03  
Fenrir.Brimstonefox said: »
Leviathan.Arcon said: »
Can you give an example of what action you mean? I don't understand what you're trying to do.

Either way, you can sleep your currently running program using "coroutine.sleep(0.4)", but that will delay the currently processing function entirely. Instead it may be smarter to write a new function to send the command and delay that with "f:schedule(0.4)", where "f" is the function you defined.

Example usage:
Code
require('functions')

send_action = function()
    -- Code that sends an action
end

send_action:schedule(0.4)


If you want "send_action" to always be delayed by that amount you can even build it into the function using functions.delay:
Code
require('functions')

send_action = (function()
    -- Code that sends an action
end):delay(0.4)

send_action()

I've tried using coroutine.sleep(2) to pause a function for 2 seconds but it doesn't appear to work at all, anyway to do this?

I tried one or two things here: http://lua-users.org/wiki/SleepFunction

I think one didn't work at all, the other pretty much crashed the game (I don't remember which was which)

I literally would be happy with:
Code
add_to_chat(1, "Hello")
sleep(1)
add_to_chat(1, "World!")


And have those 2 strings appear 1 second apart is all I want (obviously I'm working more complex logic, but that is the simplest version of anything).

Sorry, was out of town and missed a few posts.
Code
add_to_chat(1,"Hello")
add_to_chat:schedule(4,1,"World!")


But be sure to 'require('functions')' at some point in the file.
Offline
Posts: 429
By Selindrile 2016-06-11 05:56:46  
Anyone got a relatively easy way to determine if a player is moving for gearswap? I'm basically looking for a function that returns true if the player is moving.

Mostly looking to make it swap gear to movement+ gear when moving, but wouldn't mind having it for other checks too.

I tried to copy HealBot's isMoving() function but, tbh don't fully understand that implementation and couldn't get it to work in gearswap. I'm sure it's because I'm not copying something over right. :/

Nightfyre: I just made an alias in my init for that, //warpring as opposed to //warp, pretty basic, though I'm pretty sure that code would work if you really wanna use one macro for both, depending on how your pretarget error handling and other stuff is setup if you have any, try this:
Code
function filtered_action(spell)
if spell.english=='Warp' and player.main_job ~= 'BLM' and player.sub_job~='BLM' then
        windower.send_command('get "Warp Ring" satchel;wait 2;input /equip ring1 "Warp Ring";gs disable ring1;wait 9;input /item "Warp Ring" <me>;wait 15;gs enable ring1;gs c update user;put "Warp Ring" satchel')
        cancel_spell()
        return
end
end
Offline
Posts: 4028
By Blazed1979 2016-06-11 18:33:42  
Struggling with making my first DRK.Lua
All the templates I see have too much micro-management for my liking/ability to manage. I'm really as far from code savy as is possible - I can't get windows to do ***its suppossed to. But I love my DRK and want to invest in getting a good gearswap lua for it. So help is highly appreciated.


I just want:

1.Pre-cast sets and midcast sets for all Abs spells and another for Drain1,2,3 and aspirs.

2. 4 tp sets for lib + 3 WS sets

3. 4 tp sets for apoc + 3 WS sets

4. 3 tp sets for rag + 3 ws sets

5. PDT set

6. Idle set

My blu.lua is basic but exactly what I need. Can anyone give me a simple template like the above please?
Here's my blu lua
 Odin.Speedyjim
Offline
サーバ: Odin
Game: FFXI
user: speedyjim
Posts: 177
By Odin.Speedyjim 2016-06-11 18:42:18  
Looks like you're using Motenten's LUA's, the most complex LUA's out there, far from basic.

Can just grab any DRK one and add what you need.
Offline
Posts: 4028
By Blazed1979 2016-06-11 18:51:44  
Do you have a link to one please?
 Bismarck.Speedyjim
Offline
サーバ: Bismarck
Game: FFXI
user: speedyjim
Posts: 516
By Bismarck.Speedyjim 2016-06-11 19:00:48  
Blazed1979 said: »
Do you have a link to one please?
I believed I did, but upon further checking it appears Motenten never made a DRK one. Can peruse the DRK thread for one, I'm sure you can find one there. http://www.ffxiah.com/forum/topic/35174/dont-fear-the-reaper-a-dark-knight-guide/
Offline
Posts: 429
By Selindrile 2016-06-12 04:33:02  
Jim, you may be thinking of mine, I have ones for all the jobs based on Motenten's work, though they're not all up to date, and are probably way too much for what Blazed is looking for.
 Siren.Bloodlusty
Offline
サーバ: Siren
Game: FFXI
Posts: 101
By Siren.Bloodlusty 2016-06-12 05:00:54  
2 Good ones for DRK

http://pastebin.com/bG3yZh61

https://github.com/AlanWarren/gearswap/blob/master/DRK.lua
Offline
Posts: 4028
By Blazed1979 2016-06-12 07:27:17  
Yeah I searched Mont's Lua's, no DRK.
I think a member of my LS did the lua that everyone else seems to be using so will just wait for him to get on discord tonight to ask for help. thanks all.
 Fenrir.Brimstonefox
Offline
サーバ: Fenrir
Game: FFXI
user: Brimstone
Posts: 183
By Fenrir.Brimstonefox 2016-06-13 08:20:52  
Ragnarok.Flippant said: »
Sorry, was out of town and missed a few posts.
Code
add_to_chat(1,"Hello")
add_to_chat:schedule(4,1,"World!")


But be sure to 'require('functions')' at some point in the file.

This sort of worked...the problem is I need it to pause and run the code serially it seems to delay that one command but not everything after it. I suppose I could wrap the logic in if/elseif block and have it block called serialized scheduled functions, but seems like there should be a better way to do this. The logic is basically:
Code
if foo
   do stuff
   delay
end
if bar 
   do stuff
   delay
end
if abc 
   do stuff
   delay
end


and my problem is adding that bar is executing before foo finishes which is my initial problem.
Offline
Posts: 429
By Selindrile 2016-06-13 18:44:07  
Brimstone, coroutine.sleep doesn't work in gearswap that I'm aware of, maybe schedule does, but I've not tried it though I will now after reading the comments, but, here's a couple ideas I've used if these work better for you:

Instead of using a proper delay, use a send_command so you can use windower's wait with a self_command to pick it up:
Code
windower.send_command('wait 4;gs c bar')

function job_self_command(commandArgs, eventArgs)
   if commandArgs[1] == 'bar' then
    if bar then
        do stuff
    end
end


Use aftercast to check the next part of the command:
Code
function job_aftercast(spell, action, spellMap, eventArgs)    
    if spell.english == 'foo' and not spell.interrupted then
      if bar then
        do stuff
      end
    end
end


The third is to write a little clock that checks thing on a list.
First Page 2 3 ... 101 102 103 ... 182 183 184
Log in to post.