Gearswap Support Thread

Language: JP EN DE FR
2010-09-08
New Items
users online
Forum » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 27 28 29 ... 182 183 184
Offline
Posts: 5
By ProjectA2O 2014-07-29 20:27:06
Link | Quote | Reply
 
Hey all, hoping someone can help me with some small modifications to the skillup.lua(big thank you for this btw)thats posted on BG.

I have a little bit of spellcast experience and just started messing with gearswap so please bare with me.

I'm trying to figure out how to get the script to cycle cure1&2 on a target(bones) and not myself, I tried deleting all spells except the two cures from line 33 and changed all instances of <me> to <t> hoping it would be that easy, it runs as far as casting the cures on the target but stops after C2 with an aftercast error something about a nil value.

I can post the full error message if that would help at all.
Offline
Posts: 1018
By kenshynofshiva 2014-07-30 08:15:27
Link | Quote | Reply
 
Code
 if skilluprun then
                if spell.type == "Geomancy" then
                        if geomancycap and handbellcap then
                                skilluprun = false
                                shutdown_logoff()
                                return
                        end
                        send_command('wait 3.0;input /ma "'..geospells[geocount]..'" <me>')
                elseif spell.skill == "Healing Magic" then
                        if healingcap then
                                skilluprun = false
                                shutdown_logoff()
                                return
                        end
                        send_command('wait 3.0;input /ma "'..healingspells[healingcount]..'" <me>')
                elseif spell.skill == "Enhancing Magic" then
                        if enhancingcap then
                                skilluprun = false
                                shutdown_logoff()
                                return
                        end

Have be a bit more specific on the line number or what it states is nil. Looks like it has a counter healingcount that increments the cures being casted which needs to corrected. It walks all these spells from the look of it healingspells = {"Blindna","Cura","Cura II","Cura III","Curaga","Curaga II","Curaga III","Curaga IV","Curaga V","Cure","Cure II","Cure III","Cure IV","Cure V","Cure VI","Cursna","Esuna","Paralyna","Poisona","Reraise","Reraise II","Reraise III","Silena","Stona","Viruna"}
healingcount = 1

Heres the loop code here:

elseif spell.skill == "Healing Magic" and skilluprun then
cancel_spell()
if healingcount < 25 then
healingcount = healingcount +1
else
healingcount = 1
end
send_command('input /ma "'..healingspells[healingcount]..'" <me>')
return

Could change 2

healingspells = {"Cure","Cure II"}


elseif spell.skill == "Healing Magic" and skilluprun then
cancel_spell()
if healingcount < 3 then
healingcount = healingcount +1
else
healingcount = 1
end
send_command('input /ma "'..healingspells[healingcount]..'" <t>')
return
Offline
Posts: 5
By ProjectA2O 2014-07-30 10:04:21
Link | Quote | Reply
 
Thanks for the response, I tried the "if healingcount < 3" change and I'm still getting an error but not in the aftercast section anymore.

GearSwap: Lua error (runtime) - ...gram Files (x86)/Windower4//addons/gearswap/flow.lua:288:
GearSwap has detected an error in the user function self_command:
...es (x86)\Windower4\/addons/gearswap/data/skillup.lua:557: attempt to concatenate field '?' (a nil value)

Edit: so the :557: is they line that gearswap is encountering the error?
Offline
Posts: 1018
By kenshynofshiva 2014-07-30 12:41:07
Link | Quote | Reply
 
Yeah the send command it looks like:

if command == "starthealing" then
skilluprun = true
skillupcount = 2
send_command('wait 1.0;input /ma "'..healingspells[healingcount]..'" <me>')
add_to_chat(123,"Starting Healing Skill up")
end

Is the healingspells structure reduced to
healingspells = {"Cure","Cure II"}
Offline
Posts: 5
By ProjectA2O 2014-07-30 15:18:53
Link | Quote | Reply
 
I deleted all spells except the two cures.

Line 33 is just
healingspells = {"Cure","Cure II"}

Lines 554 - 559
if command == "starthealing" then
skilluprun = true
skillupcount = 2
send_command('wait 1.0;input /ma "'..healingspells[healingcount]..'" <t>')
add_to_chat(123,"Starting Healing Skill up")
end
Offline
Posts: 1018
By kenshynofshiva 2014-07-30 16:01:53
Link | Quote | Reply
 
Healingcount can get to 3 ouch logic error

if healingcount < 2 then
healingcount = healingcount +1
else
healingcount = 1
end
Offline
Posts: 324
By Xavierr 2014-07-30 20:16:28
Link | Quote | Reply
 
For 1 reason or another I can not get this GS to change to my enfeeble set during midcast. I have tried every which way I know of to get it working but I've run out of ideas D: Trying to get this to work with para, slow, etc... not BRD songs.


Offline
Posts: 1018
By kenshynofshiva 2014-07-30 20:21:15
Link | Quote | Reply
 
Question anyone use the //gs equip setname to manually test sets?

Trying with the following:

sets.TP = {}

sets.TP.index = {'Standard', 'Solo', 'Marches', 'AccuracyLite', 'AccuracyFull', 'DT', 'DTAccuracy'}
--1=Standard, 2=Solo, 3=Marches, 4=AccuracyLite, 5=AccuracyFull, 6=DT, 7=DTAccuracy--
TP_ind = 1

sets.TP.Standard = {...

Tried many variations and nada....
Ugh case sensitive lol how I miss that //gs equip sets.TP.Standard
 Asura.Izilder
Offline
Server: Asura
Game: FFXI
user: Izildur
Posts: 670
By Asura.Izilder 2014-07-31 12:09:29
Link | Quote | Reply
 
ive just started to use Bokura's PLD LUA - anyone know how i can stop going into cure down set if im in a dt/pdt or hybrid mode

also there is an small issue which happens when trying to WS unengaged.

with line 608 on initial use
"attempt to compare number with nil"


http://pastebin.com/enF6Paf4
Offline
Posts: 1018
By kenshynofshiva 2014-07-31 13:26:30
Link | Quote | Reply
 
if spell.type == "WeaponSkill" then
if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
cancel_spell()
add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
return
 Asura.Izilder
Offline
Server: Asura
Game: FFXI
user: Izildur
Posts: 670
By Asura.Izilder 2014-07-31 13:49:45
Link | Quote | Reply
 
thats the lines - how can i stop the error :)

and any idea about this cure lock?
Offline
Posts: 1018
By kenshynofshiva 2014-07-31 13:59:05
Link | Quote | Reply
 
Pretty much if want to ws disengaged then delete:
Code
                if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
                        cancel_spell()
                        add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
                        return
                else
Offline
Posts: 1018
By kenshynofshiva 2014-07-31 14:22:43
Link | Quote | Reply
 
It looks like he stores the info in Armor:
Code
   if Armor == 'DT' then
                        Armor = 'None'
                        add_to_chat(123,'DT Set: [Unlocked]')
                else
                        Armor = 'DT'
                        add_to_chat(158,'DT Set: [Locked]')
                end


Code
 if Armor == 'DT' or Armor == 'Hybrid' or Armor == 'PDT' then
    return
 end


At the top of midcast...
 Asura.Izilder
Offline
Server: Asura
Game: FFXI
user: Izildur
Posts: 670
By Asura.Izilder 2014-07-31 16:40:38
Link | Quote | Reply
 
thanks ! xd but seems i had to put it at start of precast to work
Offline
Posts: 1018
By kenshynofshiva 2014-07-31 19:46:54
Link | Quote | Reply
 
Oh lol he must do one in each lol
Offline
Posts: 117
By Mozhat 2014-08-01 13:38:41
Link | Quote | Reply
 
Is there a Lua/Gearswap script for party chat?
Example: to let the party know you have a status on /party Cursna Please!

If there is, please tell me where I need to put them.
Offline
Posts: 1018
By kenshynofshiva 2014-08-01 13:46:13
Link | Quote | Reply
 
Easy enough to add to the section of gain lose buff if curse then send_command ("input /p cursna please!!!!") like so or have it use meds automatically...

Sample sleep:
Code
function buff_change(buff,gain)
        buff = string.lower(buff)
        if buff == "sleep" and gain and player.hp > 200 and player.status == "Engaged" then -- Equip Berserker's Torque When You Are Asleep & Have 200+ HP --
                equip({neck="Berserker's Torque"})
        else
                if not midaction() then
                        status_change(player.status)
                end
        end
end

Offline
Posts: 117
By Mozhat 2014-08-01 21:41:59
Link | Quote | Reply
 
Still won't work.
 Asura.Lewyo
Offline
Server: Asura
Game: FFXI
user: Lewyo
Posts: 86
By Asura.Lewyo 2014-08-02 08:24:34
Link | Quote | Reply
 
Can anyone see whats wrong with my prefect defense timer i've tried lots of thing but i cannot seem to get it to work.
Code
function aftercast(spell,action)
	if not string.find(spell.type,'BloodPact') and not Avatars:contains(spell.english) and not Spirits:contains(spell.english) then
		status_change(player.status)
	elseif spell.english == "Sleepga" and not spell.interrupted then -- Sleepga Countdown --
    	send_command('wait 30;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
	end
	if not spell.interrupted then
	 if spell.english == "Perfect Defense" then -- Perfect Defense Countdown --
		send_command('wait 47;input /echo '..spell.name..' Effect: [WEARING OFF IN 10 SEC.];wait 10;input /p '..spell.name..' Effect: [OFF]')
	 end
	end  
	if player.status =='Idle' then
	  status_change(player.status)
	
	end
end
 Cerberus.Conagh
Offline
Server: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2014-08-02 08:51:28
Link | Quote | Reply
 
Code
send_command('@wait 47;input /echo '..spell.name..' Effect: [WEARING OFF IN 10 SEC.];@wait 10;input /p '..spell.name..' Effect: [OFF]')


Missed the @ signs ~

I use this on sleepga

elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')

Works perfectly
Offline
Posts: 166
By Jadey 2014-08-02 15:44:24
Link | Quote | Reply
 
I can't seem to get my GEO .lua to both inject a custom timer for an Indi-Spell and equip my aftercast gear. Sometimes it'll equip the aftercast on the first Indi after a reload but none beyond that.
Code
function get_sets()
	-- Load and initialize the include file.
	include('Mote-Include.lua')
	oldIndi = ''
	end
	function aftercast(spell)
	equip(sets.aftercast)
		if player.indi and not classes.CustomIdleGroups:contains('Indi')then
		classes.CustomIdleGroups:append('Indi')
		handle_equipping_gear(player.status)
	elseif classes.CustomIdleGroups:contains('Indi') and not player.indi then
		classes.CustomIdleGroups:clear()
		handle_equipping_gear(player.status)
		end
		if not spell.interrupted then 
                if string.find(spell.english,'Indi') then
                        send_command('@timers d '..oldIndi)
                        oldIndi = spell.name
                        send_command('@timers c '..spell.name..' 195 down')
						equip(sets.aftercast)
                end
 
                if spell.english == 'Sleep' or spell.english == 'Sleepga' then
                        send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
                elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
                        send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
                end
        end
end
 Fenrir.Motenten
VIP
Offline
Server: Fenrir
Game: FFXI
user: Motenten
Posts: 764
By Fenrir.Motenten 2014-08-02 16:48:36
Link | Quote | Reply
 
Mozhat said: »
Still won't work.

Did you check to make sure that the buff you were looking for was the buff that you got? Remember, it's case-sensitive.
 Fenrir.Motenten
VIP
Offline
Server: Fenrir
Game: FFXI
user: Motenten
Posts: 764
By Fenrir.Motenten 2014-08-02 16:49:01
Link | Quote | Reply
 
Well, that's a bit of a mess.

1)
Code
if not string.find(spell.type,'BloodPact') and not Avatars:contains(spell.english) and not Spirits:contains(spell.english) then

Don't use string.find, use :startswith(), for that type of check. EG:
Code
if not spell.type:startswith('BloodPact') and not Avatars:contains(spell.english) and not Spirits:contains(spell.english) then


2) Your if/elseif restrictions are poorly made. For example, the Sleepga check will -never- work because it will always be caught by the not Bloodpact/not Avatar/not Spirit check.

3) You're checking for spell.interrupted in two places, and calling status_change in two places. Redundant code, and possibly causing rule conflicts.

4) Perfect Defense is a blood pact, and isn't actually complete until pet_aftercast, not normal aftercast.

5) Sleepga is probably the blood pact version? Assuming that's the case.


Order of checks:
1) Timers for non-interrupted actions
Code
    if not spell.interrupted then
        if spell.english == "Sleepga" then -- Sleepga Countdown --
            send_command('wait 30;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
        elseif spell.english == "Perfect Defense" then -- Perfect Defense Countdown --
            send_command('wait 47;input /echo '..spell.name..' Effect: [WEARING OFF IN 10 SEC.];wait 10;input /p '..spell.name..' Effect: [OFF]')
        end
    end


2) Put on idle gear if appropriate. Note: status_change() is called with player.status, which means checking for player.status == 'Idle' should be redundant. The status_change function ought to be checking for that anyway. Therefore all you're really doing is getting status_change to do its job. However you don't want to do that if you've just used a blood pact. Not sure why you're checking for Avatars and Spirits, though, since those are ordinary spells.
Code
    if not spell.type:startswith('BloodPact') then
        status_change(player.status)
    end


3) Thus, complete form is simplified to:
Code
function aftercast(spell)
    if not spell.type:startswith('BloodPact') then
        status_change(player.status)
    end
end

function pet_aftercast(spell)
    if not spell.interrupted then
        if spell.english == "Sleepga" then -- Sleepga Countdown --
            send_command('wait 30;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
        elseif spell.english == "Perfect Defense" then -- Perfect Defense Countdown --
            send_command('wait 47;input /echo '..spell.name..' Effect: [WEARING OFF IN 10 SEC.];wait 10;input /p '..spell.name..' Effect: [OFF]')
        end
    end

    status_change(player.status)
end
 Fenrir.Motenten
VIP
Offline
Server: Fenrir
Game: FFXI
user: Motenten
Posts: 764
By Fenrir.Motenten 2014-08-02 17:51:27
Link | Quote | Reply
 
Jadey said: »
I can't seem to get my GEO .lua to both inject a custom timer for an Indi-Spell and equip my aftercast gear. Sometimes it'll equip the aftercast on the first Indi after a reload but none beyond that.


You're using my includes. Why are you even trying to equip(sets.aftercast)? It should automatically equip sets.idle or sets.engaged (or refinements of those), as appropriate.

Why are you calling handle_equipping_gear()? That's automatically called after aftercast. Actually, you defined the 'aftercast' function, not the 'job_aftercast' function, so you just broke all the aftercast handling.

I'm trying to rework this based on what it looks like you're trying to do...
Code
function job_setup()
    indi_timer = ''
    indi_duration = 180 -- adjust as needed
end

function job_aftercast(spell, action, spellMap, eventArgs)
    if not spell.interrupted then
        if spell.english:startswith('Indi') then
            if not classes.CustomIdleGroups:contains('Indi') then
                classes.CustomIdleGroups:append('Indi')
            end
            send_command('@timers d "'..indi_timer..'"')
            indi_timer = spell.english
            send_command('@timers c "'..indi_timer..'" '..indi_duration..' down spells/00136.png')
        elseif spell.english == 'Sleep' or spell.english == 'Sleepga' then
            send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 60 down spells/00220.png')
        elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
            send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 90 down spells/00220.png')
        end
    end
    
    if not player.indi and (not spell.english:startswith('Indi') or spell.interrupted) then
        classes.CustomIdleGroups:clear()
    end
end


Went ahead and put the sleep timers as custom timers as well. Remove oldIndi from get_sets().
Offline
Posts: 166
By Jadey 2014-08-02 18:11:09
Link | Quote | Reply
 
Casting Indi-spells with that slotted in gives the error
Code
attempt to concatenate global 'timer_duration' (a nil value)


I changed indi_duration to timer_duration and it seems to work fine. Thanks!

E: I'm not sure if the includes/utility are what dictate the Aftermath timer injections, but GEO Aftermath times seem to match up exactly with BLM (4:30 levels 1/2, 3:00 level 3.)
 Fenrir.Motenten
VIP
Offline
Server: Fenrir
Game: FFXI
user: Motenten
Posts: 764
By Fenrir.Motenten 2014-08-02 18:53:43
Link | Quote | Reply
 
Woops. Should have been the other way around (change timer_duration to indi_duration). Was a copy/paste error.

Edit: Also, you didn't mention Aftermath the first time, just aftercast. Not sure on the details of what you want, there.
Offline
Posts: 166
By Jadey 2014-08-02 19:05:56
Link | Quote | Reply
 
That's a separate issue mostly so I don't have to bother self-timing aftermath. I know that on PUP the libs seem to auto-inject aftermath timers on Stringing Pummel usage. I'd like for Idris to trigger the same timer on Exudation use, but I don't know what I would need to change/if it would require something more on the developer end to include it since it isn't technically a mythic ws even though it seems to function identically.
 Fenrir.Motenten
VIP
Offline
Server: Fenrir
Game: FFXI
user: Motenten
Posts: 764
By Fenrir.Motenten 2014-08-03 02:50:00
Link | Quote | Reply
 
Add ["Idris"] = "Exudation" to the list of mythic weaponskills in Mote-Mappings. Add 'Idris' to special_aftermath_mythics in Mote-Utility. Use custom_aftermath_timers_precast() and custom_aftermath_timers_aftercast() from Mote-Utility in the job_precast/job_aftercast functions.
 Quetzalcoatl.Dab
Offline
Server: Quetzalcoatl
Game: FFXI
user: deezydabs
Posts: 35
By Quetzalcoatl.Dab 2014-08-03 03:52:07
Link | Quote | Reply
 
How would I add a more then 100MP TP set for THF.lua? for the triple attack ring
First Page 2 3 ... 27 28 29 ... 182 183 184
Log in to post.