Item Search
     
BG-Wiki Search
Closed Thread
Page 15 of 302 FirstFirst ... 5 13 14 15 16 17 25 65 ... LastLast
Results 281 to 300 of 6036

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

  1. #281
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Quote Originally Posted by Drizzt View Post
    I posted in the other (AA) related Thread, but then read this one with the updates you guys have made to the RNG lua GearSwap files. I really do appreciate all the work and effort you put into this. I can't wait to get home and try it out.
    A link to the Ranger Lua file I been modifying has been added to the GearSwap Shop thread.

  2. #282
    Melee Summoner
    Join Date
    Apr 2013
    Posts
    35
    BG Level
    1
    FFXI Server
    Cerberus

    I'm trying to butcher together a GS lua for drg and have no idea how healing breaths would be handled. Any of you guys have an idea?

    Also, if someone's in serious need of a challenge, is there a GS in the works for Apoc and aftermath handling the way Nightfyre's amazing xml handled it? I'm fine trying to butcher together anything but AM sets and toggled that recognise stuff like "TP set was acc, so AM set has to be acc, too". Waaaay over my head.

  3. #283

    pretty much you can use midcast(spell, action) to equip your healing breath trigger gear, either aftercast(spell, action) or pet_midcast(spell, action) to equip your healing breath potency gear and pet_aftercast(spell, action) to requip your engaged/idle gear

    If you are using the /pet command, it would be aftercast or pet_midcast and pet_aftercast

    I have a question of my own for you guys. I have desert boots, can you make a function weather_change(id, name) function and how would you do it. the wiki says event_weather_change(id, name) so here is my idea as to how it would be done.

    Code:
    function event_weather_change(id, name)
      if world.weather_element == 'Earth' then
        -- do code for desert boots
      else
        -- do code for no desert boots
      end
    end

  4. #284
    BG Content
    Join Date
    Jul 2007
    Posts
    21,136
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Register event may still break LuaCore (not sure if that has been pushed live yet, but:

    Code:
    windower.register_event('weather change',function(id,name)
         if world.weather_element == 'Earth' or buffactive.sandstorm then
             send_command('gs c Desert Boots On')
        else
             send_command('gs c Desert Boots Off')
        end
    end)
    Then set up self_command to respond to Desert Boots On / Desert Boots Off by equipping or unequipping Desert Boots. If you don't push it through send_command, the equip function won't have any effect.

  5. #285
    Melee Summoner
    Join Date
    Apr 2013
    Posts
    35
    BG Level
    1
    FFXI Server
    Cerberus

    Quote Originally Posted by Shadowmeld View Post
    pretty much you can use midcast(spell, action) to equip your healing breath trigger gear, either aftercast(spell, action) or pet_midcast(spell, action) to equip your healing breath potency gear and pet_aftercast(spell, action) to requip your engaged/idle gear

    If you are using the /pet command, it would be aftercast or pet_midcast and pet_aftercast
    Sorry to be super needy, but is there anyway you guys can whip that into code? Would be greatly appreciated if it doesn't take you too long to do that? I know it would take me forever to be sure about it

  6. #286
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Quote Originally Posted by Byrthnoth View Post
    Register event may still break LuaCore (not sure if that has been pushed live yet, but:

    Code:
    windower.register_event('weather change',function(id,name)
         if world.weather_element == 'Earth' or buffactive.sandstorm then
             send_command('gs c Desert Boots On')
        else
             send_command('gs c Desert Boots Off')
        end
    end)
    Then set up self_command to respond to Desert Boots On / Desert Boots Off by equipping or unequipping Desert Boots. If you don't push it through send_command, the equip function won't have any effect.
    On the spellcast side I would always have put this check on the aftercast/autoset (ie: if autoset was idle, it would do this check afterwards and put the boots on after if it matches), but course that method on that end didn't un-equip them if the weather were to suddenly change.

  7. #287
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    @haruhigumi (and others): New handling of player.inventory (and sack/satchel/case) should be live now.

    It no longer uses the quantity of the item as the direct value for each entry. Instead, each entry contains a table of values, of which one field is 'count'. Rather than:

    Code:
    if player.inventory[DefaultAmmo] < 15
    you'd have

    Code:
    if player.inventory[DefaultAmmo].count < 15
    You can, of course, still do a simple existence check:

    Code:
    if player.inventory[DefaultAmmo] then
        ..
    end

    Further, there are entries for both the short and long name for items. Thus both of these checks will work (and both would have the same count value):

    Code:
    DefaultAmmo = "Dark Adaman Bolt"
    
    if player.inventory[DefaultAmmo] then
        ..
    end
    
    DefaultAmmo = "Drk. Adm. Bolt"
    
    if player.inventory[DefaultAmmo] then
        ..
    end
    Each item's table contains three to four values (id, count, shortname, and possibly longname), of which only count will be of interest to most people. The others are useful for certain utility functions. longname only exists if it's different than the short name.


    For silly ascii art illustration:
    Code:
    player.inventory
        Drk. Adm. Bolt ---> count=99, shortname=Drk. Adm. Bolt, longname=Dark Adaman Bolt
        Dark Adaman Bolt /
        Brutal Earring ---> count=1, shortname=Brutal Earring
        Rajas Ring -------> count=1, shortname=Rajas Ring
        Theo. Cap +1 -----> count=1, shortname=Theo. Cap +1, longname=Theophany Cap +1
        Theophany Cap +1 /
        Etc....

  8. #288
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Cool, I imagine the other values may be useful in terms of error handling or notification if you have multiple checks in a table. Would a check for .count error out if there's no item in the inventory for that, or would it simply return a nil ?

  9. #289
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    If the item isn't in inventory, player.inventory[itemname] will return nil (it doesn't exist; nothing will ever have a count of 0, unless you want to keep a table of every single item in the game, which is silly). If you don't check for that and just try player.inventory[itemname].count, yes, that will generate an error if you don't have the item, since you'll essentially be trying to request nil.count.

    So, player.inventory[itemname] to see if you have the item at all; if you do, then you can check player.inventory[itemname].count to see how many (if that's relevant).

  10. #290
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    On minor problem I noticed.

    Code:
    		if not buffactive['unlimited shot'] then
    			-- If not empty, and if unlimited shot is not active
    			-- Not doing it for unlimited shot to avoid excessive log
    			if player.inventory[player.equipment.ammo].count < 15 then
    				add_to_chat(122,"Ammo '"..player.inventory[player.equipment.ammo].shortname.."' running low ("..player.inventory[player.equipment.ammo].count..")")
    			end
    		end
    In theory this would work fine (I have an empty/unlimited shot check above it). But let's say for example in my ammo slot is 5 Tulfaire Arrows, and there's also a stack of 20 tulfaire arrows in my inventory (ie: when you scavenge while using that stack of 99 down, you have an unmerged amount to the side).

    The problem is, with the ammo being 5 in the ammo slot, there's no warning because the count is returned as a total of all items in the inventory, not just what's in the ammo slot, so it still calculates as being 25. Normally this wouldn't be a problem from shot-to-shot as when the slot is empty it will be re-quipped with the default ammo, but it can be an issue for multi-shot WS and JA like Barrage.

  11. #291
    Sea Torques
    Join Date
    Jun 2012
    Posts
    570
    BG Level
    5
    FFXI Server
    Asura
    WoW Realm
    The Scryers

    GS can know if a ja/spell is ready(recast 0)?

  12. #292
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    Quote Originally Posted by JSHidaka View Post
    GS can know if a ja/spell is ready(recast 0)?
    Yes. I use it in my sch code for figuring out current number of strategems available:

    Code:
    	-- returns recast in seconds.
    	local currentRecast = windower.ffxi.get_ability_recasts(231)
    Just have to know the id of the ability in question.

  13. #293
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Quote Originally Posted by Motenten View Post
    Yes. I use it in my sch code for figuring out current number of strategems available:

    Code:
    	-- returns recast in seconds.
    	local currentRecast = windower.ffxi.get_ability_recasts(231)
    Just have to know the id of the ability in question.
    Some of your examples if I remember correctly actually sets a deferred command so it'll say "such and such available in 10 seconds".

  14. #294
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Is there a player.state command ? For example can I do

    if player.state ~= 'engaged' then ... cancel, Reason I ask is I had a interesting side effect of being able to fire off Jishnu's Radiance without being engaged, but not only does that create an unfair advantage to other players, if I accidentally fire it off while in idle state there's going to be a chance of someone reporting for hack.

  15. #295
    Smells like Onions
    Join Date
    Jan 2014
    Posts
    3
    BG Level
    0

    Quote Originally Posted by haruhigumi View Post
    One Final Question for the day. With spellcast, I usually like having it sort of auto-complete my typed out spells (Which I do a lot of), for example I can type /ja addendumblack and it'll do the /ja "Addendum: Black" <me> for me, or like /ma cure3 don making it /ma "Cure III" donnie [if he's in pt].

    Question is, is there any problem with me leaving spellcast enabled along side GearSwap, so as long as I'm not loading any spellcast rules for the job? Or perhaps does GearSwap also have the ability to do that kind of auto-complete functionality.
    Couldnt find answer to these questions.

    I do same, load empty spellcast and gearswap. Problem is, that //c4 will cure my target, but gearswap doesnt seem to recognise it, and dont swap at all.

    Also, I am having trouble with temp item macro's in VW. /item "remedy" <me> works, /item "Fanatic's Drink" <me> with voidwatch status doesn't. Different jobs, different lua files all have same problem. They only will work after unloading gearswap.

  16. #296
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Quote Originally Posted by Flowooo View Post
    Couldnt find answer to these questions.

    I do same, load empty spellcast and gearswap. Problem is, that //c4 will cure my target, but gearswap doesnt seem to recognise it, and dont swap at all.

    Also, I am having trouble with temp item macro's in VW. /item "remedy" <me> works, /item "Fanatic's Drink" <me> with voidwatch status doesn't. Different jobs, different lua files all have same problem. They only will work after unloading gearswap.
    Well for the first the solution was simple, the Shortcuts addon which is also written by Byrth, as a means of replacing that function of spellcast.

    Far as the latter, I found that leaving spellcast enabled while using gearswap can interfere with some of the macro'd switches or commands (ie: spellcast would 'fix' the command, but then the event wouldn't get parsed by gearswap), the solution for me was to disable spellcast completely and switch to GearSwap+Shortcuts. Unlike spellcast, with shortcuts you can even just type /cure4 /bountyshot etc.

  17. #297
    An exploitable mess of a card game
    Join Date
    Sep 2008
    Posts
    13,258
    BG Level
    9
    FFXIV Character
    Gouka Mekkyaku
    FFXIV Server
    Gilgamesh
    FFXI Server
    Diabolos

    Quote Originally Posted by haruhigumi View Post
    Is there a player.state command ? For example can I do

    if player.state ~= 'engaged' then ... cancel, Reason I ask is I had a interesting side effect of being able to fire off Jishnu's Radiance without being engaged, but not only does that create an unfair advantage to other players, if I accidentally fire it off while in idle state there's going to be a chance of someone reporting for hack.
    I think that would be player.status

    ex:
    if player.status ~= engaged or player.tp < 100 then
    cancel_spell()
    end

  18. #298
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Quote Originally Posted by Yugl View Post
    I think that would be player.status

    ex:
    if player.status ~= engaged or player.tp < 100 then
    cancel_spell()
    end
    Thanks, I added it to my precast function under weaponskill (and changed the way it cancels the spell, since I'm using Mote's setup).

    Code:
    	if spell.type:lower() == 'weaponskill' then
    		if player.status ~= "Engaged" or player.tp < 100 then
    			eventArgs.cancel = true
    			return
    		end
    		if (spell.target.distance >8 and not ranged_ws[spell.name]) or (spell.target.distance >21) then
    			-- Cancel Action if distance is too great, saving TP
    			add_to_chat(122,"Distance too great for WeaponSkill /Canceling")
    			eventArgs.cancel = true
    			return
    		elseif state.Defense.Active then
    			-- Don't gearswap for weaponskills when Defense is on.
    			eventArgs.handled = true
    		end
    	end

  19. #299

    Quote Originally Posted by Keyoku View Post
    Sorry to be super needy, but is there anyway you guys can whip that into code? Would be greatly appreciated if it doesn't take you too long to do that? I know it would take me forever to be sure about it
    Code:
    function get_sets()
      sets.Idle = { head = "Twilight Helm" }
      sets.Engaged = { head = "Otomi Helm" }
    
      sets.HB = {}
      sets.HB.Pre = { head = "Vishap Armet +1" }
      sets.HB.Mid = { head = "Wyrm Armet +2" }
    end
    
    function midcast(spell, action)
      if spell.type:find('Magic') then -- Should handle white/black/blue magic as an example
        if player.hpp < 51 then
          equip(sets.HB.Pre)
        end
      end
    end
    
    function pet_midcast(spell, action)
      if spell.english:find('Healing Breath') then
        equip(sets.HB.Mid)
      end
    end
    
    function pet_aftercast(spell, action) then
      equip(sets[player.status])
    end
    I deliberately didn't account for subjobs such as /pld or /drk or /brd because this is an example.

  20. #300

    HP events/other autoexec style events

    OK, trying to make a few autoexec style events for GearSwap.
    Things like when MNK SAM NIN reaches 100% HP and I am Idle then will auto change from Regen items to normal Idle DT gear. Usually I did it with varying success with AE event but want to move away from AE completely if I can.

    People have offered help but for some reason I cant get it working, for MNK tried using this:
    Code:
    windower.register_event('hp change', function(hp) local player =  windower.ffxi.get_player()
        if hp == player.max_hp and player.status ~= 'Engaged' then
            windower.add_to_chat(8,'HP 100')
            gear_modes()
        end 
    end)
    I tried it placed inside get_sets() as well as moving it to the top on a global level and it doesnt seem to work.
    The code is some what beyond me so I kinda understand it and kinda dont.
    Any help with that would be amazing, might need it dumbed down for me.

    It does create a second problem however, with the above code in my MNK.lua if I try to //gs reload it will cause the game to instantly crash.
    I have tested //gs reload 20 times in a row without the code and no crash.
    No idea if this info will help anyone at all but this is what Win7 shows in the crash report:
    Code:
      Problem Event Name:	APPCRASH
      Application Name:	pol.exe
      Application Version:	1.18.13.0
      Application Timestamp:	4e3bcddc
      Fault Module Name:	luacore.DLL
      Fault Module Version:	1.4.2.4
      Fault Module Timestamp:	52d233c0
      Exception Code:	c0000005
      Exception Offset:	000a10e0
      OS Version:	6.1.7601.2.1.0.256.1
      Locale ID:	1033
      Additional Information 1:	0a9e
      Additional Information 2:	0a9e372d3b4ad19135b953a78882e789
      Additional Information 3:	0a9e
      Additional Information 4:	0a9e372d3b4ad19135b953a78882e789
    Wish I could be more help or understood things better but since I dont I tend to rely on your alls wisdom.

Closed Thread
Page 15 of 302 FirstFirst ... 5 13 14 15 16 17 25 65 ... LastLast

Similar Threads

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