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 ... 136 137 138 ... 182 183 184
Offline
Posts: 8
By dnoons 2018-05-15 23:55:35  
Looking for code that will automatically equip Plunderer's Vest +3, which augments Ambush and only active when 'behind the mob'.
I've tried the code below, which just tells me Ambush isn't a buff, as I was hoping it was just an invisible one not shown on the buff bar.

Code
function job_buff_change(buff, gain)
	-- Equip AF3 during Ambush (doesn't work)
	if buff:lower()=='ambush' or buff:upper()=='ambush' then
        if gain then
	    send_command('@input /echo ----- AMBUSH TEST -----')
            equip(sets.engaged.Ambush)
        elseif not gain then 
            handle_equipping_gear(player.status)
        end
    end
end

I assume the next step is to do the opposite of the gaze lua (checks if you're facing a mob) which makes my head explode.
Obviously, the angle portion would need to be modified here to make this work, to which I would make some if/then with check_facing()?

Code
function check_facing()
    local target = windower.ffxi.get_mob_by_target('t')
    local player = windower.ffxi.get_mob_by_target('me')
    local dir_target = V{player.x, player.y} - V{target.x, target.y}
    local dir_player = V{target.x, target.y} - V{player.x, player.y}
    local player_heading = V{}.from_radian(player.facing)
    local target_heading = V{}.from_radian(target.facing)
    local player_angle = V{}.angle(dir_player, player_heading):degree():abs()
    local target_angle = V{}.angle(dir_target, target_heading):degree():abs()
    if player_angle < 90 and target_angle < 90 then
        return true
    end
    return false
end

I tried to do some homework, but I only have about 3 months of experience with lua coding.
Offline
Posts: 87
By mrlooolz 2018-05-16 06:19:09  
the rest of the lua is working fine, i was just trying to see why this specifc funtion precast wont work.

It used to Auto-entrust and cast the indi bubble on my target.


I updated the Lua. here is the whole code with out the equipment :
https://pastebin.com/WKsWwUpu

struggling with lines : 68-86
 Carbuncle.Kigensuro
Offline
サーバ: Carbuncle
Game: FFXI
user: dlsmd
Posts: 93
By Carbuncle.Kigensuro 2018-05-18 07:54:23  
mrlooolz said: »
the rest of the lua is working fine, i was just trying to see why this specifc funtion precast wont work.

It used to Auto-entrust and cast the indi bubble on my target.


I updated the Lua. here is the whole code with out the equipment :
https://pastebin.com/WKsWwUpu

struggling with lines : 68-86
try this instead
Code
function precast(spell,action)
-- Auto-Echo drop :D --
	if spell.action_type == 'Magic' and buffactive['Silence'] then
      cancel_spell()
      send_command('input /item "Echo Drops" <me>')
-- Auto Blaze of Glory for lazies :p --    
	elseif string.find(spell.english, 'Geo-') then
		if not buffactive['Bolster'] and not buffactive['Amnesia'] and not pet.isvalid and windower.ffxi.get_ability_recasts()[247] < 1 then
			cast_delay(2)
			send_command('input /ja "Blaze of Glory" <me>')
		end
-- Auto Entrust if you are targeting someone else than you --  
	elseif string.find(spell.english, 'Indi-') then
		if (not buffactive['Entrust'] and not buffactive['Amnesia']) and windower.ffxi.get_ability_recasts()[93] < 1 then
			cast_delay(2)
			send_command('input /ja "entrust" <me>')    
		end
	end
end

cast_delay(delay_in_seconds) does not have a lot of uses but this is one of them
delay_in_seconds:
0.1 - inf
Offline
Posts: 87
By mrlooolz 2018-05-18 08:52:30  
Carbuncle.Kigensuro said: »
function precast(spell,action)
-- Auto-Echo drop :D --
    if spell.action_type == 'Magic' and buffactive['Silence'] then
      cancel_spell()
      send_command('input /item "Echo Drops" <me>')
-- Auto Blaze of Glory for lazies :p --   
    elseif string.find(spell.english, 'Geo-') then
        if not buffactive['Bolster'] and not buffactive['Amnesia'] and not pet.isvalid and windower.ffxi.get_ability_recasts()[247] < 1 then
            cast_delay(2)
            send_command('input /ja "Blaze of Glory" <me>')
        end
-- Auto Entrust if you are targeting someone else than you -- 
    elseif string.find(spell.english, 'Indi-') then
        if (not buffactive['Entrust'] and not buffactive['Amnesia']) and windower.ffxi.get_ability_recasts()[93] < 1 then
            cast_delay(2)
            send_command('input /ja "entrust" <me>')   
        end
    end
end

Hi. I tried it but still no go. I even changed the precast to pretarget(spell,action).

My old lua i used did not include any mote includes and the code works fine with it.

The new lua, a person on the forum was very sweet and shared with me to help a returning player. Said person suspects might be something to do with the mote include file.

I opened up the file and the hook does exist:

function pretarget(spell)
handle_actions(spell, 'pretarget')
end

function precast(spell)
if state.Buff[spell.english] ~= nil then
state.Buff[spell.english] = true
end
handle_actions(spell,'precast')
end
Offline
サーバ: Asura
Game: FFXI
Posts: 17
By Asura.Hadroncollider 2018-05-19 07:27:09  
Hello. I got a Problem with Vitiation gloves +2/3 not working at all in gearswap. no matter how and where i put them in, gs just wont equip them. Tryed every Kind of spelling and also used Name from Export.... it just doesnt work. Anyone know how to fix that?
Offline
Posts: 703
By Nyarlko 2018-05-19 09:50:30  
Asura.Hadroncollider said: »
Hello. I got a Problem with Vitiation gloves +2/3 not working at all in gearswap. no matter how and where i put them in, gs just wont equip them. Tryed every Kind of spelling and also used Name from Export.... it just doesnt work. Anyone know how to fix that?

Are you sure they aren't just getting over-ridden by something else? Can test by making a fake/test set (which includes the gloves and something else that you know works,) and equipping it directly in-game. If you name this set "sets.test", and typing "//gs equip sets.test" equips the other items and not the gloves, then you know it's actually a problem with the item. If they do get equipped, then you know it's an issue somewhere in your sets and/or logic that is causing the problem.
Offline
サーバ: Asura
Game: FFXI
Posts: 17
By Asura.Hadroncollider 2018-05-19 16:02:43  
well, I got them in 3 sets and also put them in Idle gear to be sure. they dont get equiped. If i command any set everything gets swaped in ... just not those gloves. checked in multiple other midcasts sets with //showswaps too. I'm 100% sure ist a Problem with the item.

sets.defense.test = {main="Excalibur", hands="Viti. Gloves +3"}

sets.midcast.Temper= {ammo="Psilomene",
main="Arendsi fleuret",
sub="Pukulatmuj +1",
head="Befouled crown",
body={ name="Viti. Tabard +1", augments={'Enhances "Chainspell" effect',}},
hands={ name="Viti. Gloves +3", augments={'Enhances "Phalanx II" effect',}},
legs="Atrophy tights +3",
feet="Leth. Houseaux +1",
neck="incanter's Torque",
waist="Olympus sash",
back={ name="Ghostfyre Cape", augments={'Enfb.mag. skill +10','Enha.mag. skill +10','Enh. Mag. eff. dur. +20',}},
left_ear="Augmenting Earring",
right_ear="Andoaa Earring",
left_ring="Stikini ring +1",
right_ring="Stikini ring +1"}
Offline
サーバ: Asura
Game: FFXI
Posts: 17
By Asura.Hadroncollider 2018-05-20 04:13:18  
case closed. thanks alot Nyarlko!
 Shiva.Brisk
Offline
サーバ: Shiva
Game: FFXI
user: Lowell
Posts: 13
By Shiva.Brisk 2018-05-20 16:28:42  

Trying to get Gearswap to work but it won't load due to the above error. Looks like im missing some files but even the latest straight from github has the same problem. Anyone know how to resolve this?
 Asura.Patriclis
Offline
サーバ: Asura
Game: FFXI
user: Patriclis
Posts: 389
By Asura.Patriclis 2018-05-22 07:59:10  
Whats your windower directory look like?

Im curious as to why there is a double forward slash between Windower4 and plugins. That's generally not normal filesystem behaviour. So that could be a problem if its not some weird windower thing.
 Asura.Kazaki
Offline
サーバ: Asura
Game: FFXI
user: Kazaki
Posts: 121
By Asura.Kazaki 2018-05-22 12:49:43  
I'm pretty sure it's out there somewhere but I can't find it, hoping someone here will know.

I'm looking to do a "if pianissimo is on then change <me> to <t>" rule. Does anyone have that piece of lua or know how to make it?

Thanks in advance! :D
 Shiva.Brisk
Offline
サーバ: Shiva
Game: FFXI
user: Lowell
Posts: 13
By Shiva.Brisk 2018-05-22 21:39:44  
Asura.Patriclis said: »
Whats your windower directory look like?

Im curious as to why there is a double forward slash between Windower4 and plugins. That's generally not normal filesystem behaviour. So that could be a problem if its not some weird windower thing.


Directory is fine not sure why it shows up like that either
 Asura.Patriclis
Offline
サーバ: Asura
Game: FFXI
user: Patriclis
Posts: 389
By Asura.Patriclis 2018-05-23 09:43:38  
Odd. I don't know what' could possibly be wrong then. My only suggestion would be to make a backup of your configs & gearswap luas then delete & re-install gearswap. If that doesnt work then re-install windower4.

Kind of a "throwing the kitchen sink" solution but.. it doesn't take long.

The problem is either that you're missing important files for gearswap, or the directory is confused somehow.

Basically, there's an important module for windower4 called 'packets'. Gearswap requires tapping into that module to work. Gearswap can't find that package on your machine for some reason. which either means its not there (I think this would be the less likely scenario as other plugins would likely be breaking if this file was gone) OR gearswap is in the wrong place/configured improperly/bugged out/one of a million possible issues that has caused it to be unable to locate the packets module.

So yeah... re-install your stuff is probably the simplest solution to attempt.

Oh, and this is very likely a windower/gearswap problem... so don't go re-installing FFXI or reformatting your PC to try and fix it. Some people do that and it's usually a waste of time ._.;;
 Asura.Patriclis
Offline
サーバ: Asura
Game: FFXI
user: Patriclis
Posts: 389
By Asura.Patriclis 2018-05-23 09:51:32  
Asura.Kazaki said: »
I'm pretty sure it's out there somewhere but I can't find it, hoping someone here will know.

I'm looking to do a "if pianissimo is on then change <me> to <t>" rule. Does anyone have that piece of lua or know how to make it?

Thanks in advance! :D

That should do it.
 Carbuncle.Kigensuro
Offline
サーバ: Carbuncle
Game: FFXI
user: dlsmd
Posts: 93
By Carbuncle.Kigensuro 2018-05-23 20:42:50  
Asura.Kazaki said: »
I'm pretty sure it's out there somewhere but I can't find it, hoping someone here will know.

I'm looking to do a "if pianissimo is on then change <me> to <t>" rule. Does anyone have that piece of lua or know how to make it?

Thanks in advance! :D
this should work
Code
function pretarget(spell)
    if buffactive['Pianissimo'] then
        change_target('t')
    end
end
 Asura.Kazaki
Offline
サーバ: Asura
Game: FFXI
user: Kazaki
Posts: 121
By Asura.Kazaki 2018-05-24 13:34:57  
Thanks to you both :) I'll add this when I can, you've both made BRD life a lot easier. Thanks!
Offline
Posts: 87
By mrlooolz 2018-05-27 21:44:45  
hello again.

In a friend's geo lua he's got an amazing function. When he casts let's say fire 5. Then tries to cat Fire 5 again it automatically downgrades to fire 4 and casts.

I wanted to take this code and put it into my BLM lua. I cant seem to get it to work. The lua saves fine with no errors.

https://pastebin.com/pe2Axw3H

The code i copied starts at line 14-40:

here the function nuke downgrades is defined under user setup then the function is expanded. That's my understanding.

Then again @ 503-507 , 509-553 , 800-end.

503-507:

he sets up 2 functions that he later expands under 509-553 and 800-end.

I know i have to edit the functions include the T6 spells for BLM.

Is there an easier way to implement this? I'd like to also apply in my SCH lua, so maybe you guys know of a way to replication the this option in an easier way. I mainly cast with shortcuts and with above code when its working, I just use Thunder 6 and keep pressing it again with our need to type in thunder 5.

Any ideas? sorry if my question is clear ill try and expand on it more.
 Asura.Kazaki
Offline
サーバ: Asura
Game: FFXI
user: Kazaki
Posts: 121
By Asura.Kazaki 2018-05-28 03:05:29  
Carbuncle.Kigensuro said: »
Asura.Kazaki said: »
I'm pretty sure it's out there somewhere but I can't find it, hoping someone here will know.

I'm looking to do a "if pianissimo is on then change <me> to <t>" rule. Does anyone have that piece of lua or know how to make it?

Thanks in advance! :D
this should work
Code
function pretarget(spell)
    if buffactive['Pianissimo'] then
        change_target('t')
    end
end

This doesn't seem to change anything, unfortunately.

Asura.Patriclis said: »
Asura.Kazaki said: »
I'm pretty sure it's out there somewhere but I can't find it, hoping someone here will know.

I'm looking to do a "if pianissimo is on then change <me> to <t>" rule. Does anyone have that piece of lua or know how to make it?

Thanks in advance! :D

That should do it.

I can't get this to load properly. Error states
Code
')' expected near ';'


And I'm not sure what it needs to fix it. I tried a few things randomly but I do not really know what I'm doing... !
 Asura.Patriclis
Offline
サーバ: Asura
Game: FFXI
user: Patriclis
Posts: 389
By Asura.Patriclis 2018-05-28 08:43:52  
I forgot the opening ' before input. this line should fix it... I hope XD
Code
send_command('input /ma "' .. spell.name .. '" ' .. spell.target.name .. ';')
 Carbuncle.Spiketaru
Offline
サーバ: Carbuncle
Game: FFXI
user: Kerokun
Posts: 17
By Carbuncle.Spiketaru 2018-05-29 14:40:11  
I've been having a problem with GearSwap lately where it will be completely functional for a while but then suddenly, it won't allow me to perform any action where gear is checked (i.e. WS, JA, magic).

I was told to try "//reload luacore" but that always crashes Windower for me. The only solution I've had is to completely shut down Windower and restart.

I would say this might be a Windower problem, but when I unload GearSwap, it allows me to do everything again.

No one else I know has this problem. Can anyone halp?
 Asura.Patriclis
Offline
サーバ: Asura
Game: FFXI
user: Patriclis
Posts: 389
By Asura.Patriclis 2018-05-30 08:47:13  
Does this only happen on 1 job or all of your jobs?

If it's only 1 job then it's probably an error in that job's lua somewhere. If it's all jobs then there's probably an issue with gearswap itself or mote-libs if you're using them... or any other shared lua file.


"Won't allow me to perform any action"
Do you mean it won't swap gear, or it won't even let you cast the spell at all?

Not swapping gear could just be something calling 'gs disable'. Not being able to cast spells period... that seems like a much stranger/serious issue. If that's indeed the case I would backup your personal lua files and then delete gearswap + reload it.
 Quetzalcoatl.Orestes
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2018-05-30 08:57:13  
Carbuncle.Spiketaru said: »
I've been having a problem with GearSwap lately where it will be completely functional for a while but then suddenly, it won't allow me to perform any action where gear is checked (i.e. WS, JA, magic).

I was told to try "//reload luacore" but that always crashes Windower for me. The only solution I've had is to completely shut down Windower and restart.

I would say this might be a Windower problem, but when I unload GearSwap, it allows me to do everything again.

No one else I know has this problem. Can anyone halp?
Are there any error's, or anything in the console when this happens? That would be the first place I'd check.
 Asura.Kazaki
Offline
サーバ: Asura
Game: FFXI
user: Kazaki
Posts: 121
By Asura.Kazaki 2018-06-02 10:07:01  
Currently using Kinematics SAM lua but noticed it doesn't have a Hasso set to use the hasso+ gear when hasso is on... Does anyone have something like this I could easily slot into it?

This is the kinematics lua: https://github.com/Kinematics/GearSwap-Jobs/blob/master/SAM.lua

Edit: Maybe I'm being stupid because it does have a
Code
state.Buff.Hasso = buffactive.Hasso or false


but then doesn't seem to do anything with it?
 Asura.Kazaki
Offline
サーバ: Asura
Game: FFXI
user: Kazaki
Posts: 121
By Asura.Kazaki 2018-06-02 10:28:44  
Asura.Patriclis said: »
I forgot the opening ' before input. this line should fix it... I hope XD
Code
send_command('input /ma "' .. spell.name .. '" ' .. spell.target.name .. ';')

This seems to be working when I don't use <me> in the macro and keep it as /ma "song" without any target at the end. Huge thanks for helping :) !
 Asura.Patriclis
Offline
サーバ: Asura
Game: FFXI
user: Patriclis
Posts: 389
By Asura.Patriclis 2018-06-02 12:33:10  
Asura.Kazaki said: »
Currently using Kinematics SAM lua but noticed it doesn't have a Hasso set to use the hasso+ gear when hasso is on... Does anyone have something like this I could easily slot into it?

This is the kinematics lua: https://github.com/Kinematics/GearSwap-Jobs/blob/master/SAM.lua

Edit: Maybe I'm being stupid because it does have a
Code
state.Buff.Hasso = buffactive.Hasso or false


but then doesn't seem to do anything with it?

Add this function. Might work. Who knows. Mostly a guess... I dont really use motelibs.
Code
function job_status_change(newStatus, oldStatus, eventArgs)
    if (newStatus == 'Engaged' and state.Buff.Hasso) then
       equip(sets.Hasso) -- Or whatever the *** you call it
    end
end
 Carbuncle.Spiketaru
Offline
サーバ: Carbuncle
Game: FFXI
user: Kerokun
Posts: 17
By Carbuncle.Spiketaru 2018-06-02 16:08:25  
Asura.Patriclis said: »
Does this only happen on 1 job or all of your jobs?

If it's only 1 job then it's probably an error in that job's lua somewhere. If it's all jobs then there's probably an issue with gearswap itself or mote-libs if you're using them... or any other shared lua file.


"Won't allow me to perform any action"
Do you mean it won't swap gear, or it won't even let you cast the spell at all?

Not swapping gear could just be something calling 'gs disable'. Not being able to cast spells period... that seems like a much stranger/serious issue. If that's indeed the case I would backup your personal lua files and then delete gearswap + reload it.
I'll have to try reinstalling GS, but yeah, it's preventing all actions that could possibly trigger a gear change. Doesn't swap gear, doesn't perform the action until I unload GS.

To clarify: talking to NPCs is fine, but even /shutdown when it's having this problem is not allowed, like it's stuck looking for the gear I'd rest in. Spells, abilities, etc. are prevented altogether. It lets me engage and auto-attack but doesn't swap to my engaged set.

Quetzalcoatl.Orestes said: »
Are there any error's, or anything in the console when this happens? That would be the first place I'd check.
Absolutely no errors or messages in console.
 Asura.Kazaki
Offline
サーバ: Asura
Game: FFXI
user: Kazaki
Posts: 121
By Asura.Kazaki 2018-06-02 16:30:23  
Asura.Patriclis said: »
Asura.Kazaki said: »
Currently using Kinematics SAM lua but noticed it doesn't have a Hasso set to use the hasso+ gear when hasso is on... Does anyone have something like this I could easily slot into it?

This is the kinematics lua: https://github.com/Kinematics/GearSwap-Jobs/blob/master/SAM.lua

Edit: Maybe I'm being stupid because it does have a
Code
state.Buff.Hasso = buffactive.Hasso or false


but then doesn't seem to do anything with it?

Add this function. Might work. Who knows. Mostly a guess... I dont really use motelibs.
Code
function job_status_change(newStatus, oldStatus, eventArgs)
    if (newStatus == 'Engaged' and state.Buff.Hasso) then
       equip(sets.Hasso) -- Or whatever the *** you call it
    end
end

Thanks! I'll try this out when I can :)
 Shiva.Hiep
Offline
サーバ: Shiva
Game: FFXI
user: Hiepo
Posts: 669
By Shiva.Hiep 2018-06-03 17:48:28  
For some reason, my friend's BLM lua doesn't pick up Hachirin-no-obi. It works when I use it, any idea what could be the problem? Is it something with his resources?
 Asura.Patriclis
Offline
サーバ: Asura
Game: FFXI
user: Patriclis
Posts: 389
By Asura.Patriclis 2018-06-04 07:20:11  
Shiva.Hiep said: »
For some reason, my friend's BLM lua doesn't pick up Hachirin-no-obi. It works when I use it, any idea what could be the problem? Is it something with his resources?

Well since you haven't provided the lua in question and told us where the obi is implemented... then my guess is... your friend re-wrote the entire lua using the wingdings font.
[+]
 Carbuncle.Kigensuro
Offline
サーバ: Carbuncle
Game: FFXI
user: dlsmd
Posts: 93
By Carbuncle.Kigensuro 2018-06-04 09:54:44  
Asura.Patriclis said: »
Shiva.Hiep said: »
For some reason, my friend's BLM lua doesn't pick up Hachirin-no-obi. It works when I use it, any idea what could be the problem? Is it something with his resources?

Well since you haven't provided the lua in question and told us where the obi is implemented... then my guess is... your friend re-wrote the entire lua using the wingdings font.
that made me laugh.
but yes you are correct that we cant tell anything because we have no code and with out it there are an inf amount of possibilities from they don't have it active to using the wingdings font. (from normal to absurd)
First Page 2 3 ... 136 137 138 ... 182 183 184
Log in to post.