Item Search
     
BG-Wiki Search
Page 47 of 302 FirstFirst ... 37 45 46 47 48 49 57 97 ... LastLast
Results 921 to 940 of 6036

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

  1. #921
    BG Content
    Join Date
    Jul 2007
    Posts
    22,412
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Quote Originally Posted by JSHidaka View Post
    Gears or items at inventory doesn't have an "unique" ID that you could use to manually identify them, then equip then?
    Nope. Items are represented with an item ID (which is the same between copies of the same item, like two Dark Rings) and an inventory slot ID (which is unique for each inventory). GearSwap equips items using the inventory slot ID, which is why it does not have problems equipping two of the same item, but this inventory slot ID changes when you move items around between your inventories so it isn't like a user could put it into their gearswap file.

  2. #922
    Sea Torques
    Join Date
    Aug 2007
    Posts
    725
    BG Level
    5
    FFXI Server
    Ramuh

    Quote Originally Posted by dlsmd View Post
    ok thats cool but what is this S for
    = S{"E

    could i do it like this as well
    if spell.name == spells.transport then
    return
    end

    with this
    spells.transport = S{"Escape","Warp","Warp II", other spells}
    The S means that all values are TRUE, same as writing
    Code:
    spells.transport = {["Warp"]="true",["Warp II"]="true"... etc}
    in the if statement you lookup the label value that will always be true. No label = nil

    edit: you will still have to use
    Code:
    if spells.transport[spell.name]
    is the correct syntax for the check you looking for.

  3. #923
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by arshesney View Post
    The S means that all values are TRUE, same as writing
    Code:
    spells.transport = {["Warp"]="true",["Warp II"]="true"... etc}
    in the if statement you lookup the label value that will always be true. No label = nil

    edit: you will still have to use
    Code:
    if spells.transport[spell.name]
    is the correct syntax for the check you looking for.
    ok thanks

  4. #924
    Hydra
    Join Date
    Feb 2014
    Posts
    131
    BG Level
    3
    FFXI Server
    Quetzalcoatl

    Quote Originally Posted by dlsmd View Post
    ok thats cool but what is this S for
    = S{"E

    could i do it like this as well
    if spell.name == spells.transport then
    return
    end

    with this
    spells.transport = S{"Escape","Warp","Warp II", other spells}

    The S{} is essentially calling a function. It's the same as S({})

    The name is arbitrary, and nothing specific to lua. S() is implemented in addons/libs/sets.lua
    It's basically a class with methods for dealing with sets. i.e. contains(), find(), map(), etc. (lua doesn't have classes though)

    A usage example, that calls S()'s contains function

    if S{'madrigal', 'march'}:contains(buff:lower()) then

    If you're not familiar with OOP, it may be a bit hard to grasp. The main reason you would use S{'item', 'item2'} is to gain access to it's helper functions.

    I'm sure some of the gurus who wrote this stuff could clarify much better than myself. I'm still a bit new to lua.

  5. #925
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Would these 2 be good
    http://pastebin.com/3xCvf3Tc

    http://pastebin.com/gYFU3bz1
    also is there a way i can minimize this(the one above this line)

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

    almost sure you can replace
    Code:
        if spell.type == "WeaponSkill"then 
                    if Weaponskill.Type.Handtohand[spell.name] then
                            equip(sets.ws.type.Handtohand) 
                    elseif Weaponskill.Type.Dagger[spell.name] then
                            equip(sets.ws.type.Dagger)     
                    elseif Weaponskill.Type.Sword[spell.name] then
                            equip(sets.ws.type.Sword)      
                    elseif Weaponskill.Type.Greatsword[spell.name] then
                            equip(sets.ws.type.Greatsword) 
                    elseif Weaponskill.Type.Axe[spell.name] then
                            equip(sets.ws.type.Axe)
                    elseif Weaponskill.Type.Greataxe[spell.name] then
                            equip(sets.ws.type.Greataxe)   
                    elseif Weaponskill.Type.Scythe[spell.name] then
                            equip(sets.ws.type.Scythe)     
                    elseif Weaponskill.Type.Polearm[spell.name] then
                            equip(sets.ws.type.Polearm)
                    elseif Weaponskill.Type.Katana[spell.name] then
                            equip(sets.ws.type.Katana)
                    elseif Weaponskill.Type.Greatkatana[spell.name] then
                            equip(sets.ws.type.Greatkatana)
                    elseif Weaponskill.Type.Club[spell.name] then
                            equip(sets.ws.type.Club)
                    elseif Weaponskill.Type.Staff[spell.name] then
                            equip(sets.ws.type.Staff)
                    elseif Weaponskill.Type.Archery[spell.name] then
                            equip(sets.ws.type.Archery)
                    elseif Weaponskill.Type.Marksmanship[spell.name] then
                            equip(sets.ws.type.Marksmanship)
                    end
                    equip(sets.[spell.wsA])
        end
    with

    Code:
     
     if spell.type == "WeaponSkill"then 
                    if Weaponskill.Type.[spell.skill][spell.name] then
                            equip(sets.ws.type.[spell.skill])
                     else
                             equip(sets.[spell.wsA])
     end

  7. #927
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by JSHidaka View Post
    almost sure you can replace
    Code:
        if spell.type == "WeaponSkill"then 
                    if Weaponskill.Type.Handtohand[spell.name] then
                            equip(sets.ws.type.Handtohand) 
                    elseif Weaponskill.Type.Dagger[spell.name] then
                            equip(sets.ws.type.Dagger)     
                    elseif Weaponskill.Type.Sword[spell.name] then
                            equip(sets.ws.type.Sword)      
                    elseif Weaponskill.Type.Greatsword[spell.name] then
                            equip(sets.ws.type.Greatsword) 
                    elseif Weaponskill.Type.Axe[spell.name] then
                            equip(sets.ws.type.Axe)
                    elseif Weaponskill.Type.Greataxe[spell.name] then
                            equip(sets.ws.type.Greataxe)   
                    elseif Weaponskill.Type.Scythe[spell.name] then
                            equip(sets.ws.type.Scythe)     
                    elseif Weaponskill.Type.Polearm[spell.name] then
                            equip(sets.ws.type.Polearm)
                    elseif Weaponskill.Type.Katana[spell.name] then
                            equip(sets.ws.type.Katana)
                    elseif Weaponskill.Type.Greatkatana[spell.name] then
                            equip(sets.ws.type.Greatkatana)
                    elseif Weaponskill.Type.Club[spell.name] then
                            equip(sets.ws.type.Club)
                    elseif Weaponskill.Type.Staff[spell.name] then
                            equip(sets.ws.type.Staff)
                    elseif Weaponskill.Type.Archery[spell.name] then
                            equip(sets.ws.type.Archery)
                    elseif Weaponskill.Type.Marksmanship[spell.name] then
                            equip(sets.ws.type.Marksmanship)
                    end
                    equip(sets.[spell.wsA])
        end
    with

    Code:
     
     if spell.type == "WeaponSkill"then 
                    if Weaponskill.Type.[spell.skill][spell.name] then
                            equip(sets.ws.type.[spell.skill])
                     else
                             equip(sets.[spell.wsA])
     end
    sadly no it gets [spell.skill] from the resource files and all weapon skills would return Ability not the weapon used

    this is one of the weapon skills from the resource files
    <a id="807" index="900" prefix="/weaponskill" english="Spirits Within" german="Innerer Geist" french="Esprits intérieurs" japanese="スピリッツウィズイン" type="WeaponSkill" element="NonElemental" targets="Enemy" skill="Ability" mpcost="0" tpcost="0" casttime="0" recast="0" alias="" wsA="" wsB="" wsC=""/>

    and even if it would i would need it like this to equip all 3 peices of gear when a ws is used
    Code:
    if Weaponskill.Type.[spell.skill][spell.name] then
       equip(sets.ws.type.[spell.skill])
    end
    equip(sets.ws.element[spell.wsA])

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

    I havent tested but helpfiles says spell.type return the ability and spell.skill the skill and give an example w/ healingmagic for cure

    Code:
    spell.type	string	String indicating the type of spell without spaces. So "JobAbility" for Provoke, "WhiteMagic" for Cure, "BardSong" for Marches, etc. Obtained from resources.
    spell.skill	string	String form of the skill a spell is based on without spaces, or "Ability" for abilities. So "HealingMagic" for Cure, "Ability" for Provoke, "Singing" for Marches, etc. Obtained from resources.

  9. #929
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by JSHidaka View Post
    I havent tested but helpfiles says spell.type return the ability and spell.skill the skill and give an example w/ healingmagic for cure

    Code:
    spell.type	string	String indicating the type of spell without spaces. So "JobAbility" for Provoke, "WhiteMagic" for Cure, "BardSong" for Marches, etc. Obtained from resources.
    spell.skill	string	String form of the skill a spell is based on without spaces, or "Ability" for abilities. So "HealingMagic" for Cure, "Ability" for Provoke, "Singing" for Marches, etc. Obtained from resources.
    look at the last words of that comment
    String form of the skill a spell is based on without spaces, or "Ability" for abilities. So "HealingMagic" for Cure, "Ability" for Provoke, "Singing" for Marches, etc. Obtained from resources.

  10. #930
    BG Content
    Join Date
    Jul 2007
    Posts
    22,412
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Yeah, it's just Ability for all weaponskills. I'm not sure there's any more information in the .dats than that.

  11. #931
    Melee Summoner
    Join Date
    Dec 2009
    Posts
    35
    BG Level
    1
    FFXI Server
    Odin

    Need some help adding Barrage acc lvls to this GS: http://pastebin.com/aJTmhcsm
    Whoever has some time to check.
    thanks

  12. #932
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    does anybody have a tutorial on how to setup includes in Gearswap
    i have done includes in Spellcast but im not sure how its done in Gearswap

  13. #933
    Sea Torques
    Join Date
    Jul 2010
    Posts
    516
    BG Level
    5
    FFXI Server
    Bahamut

    Use the include function:

    Code:
    include		include('file_name')	function	This will load the designated file into the user environment. Searches the data folder for ../<player name>/<file>.lua, ../common/<file>.lua, or ../<file>.lua and gives them preference in that order.

  14. #934
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    do i have to setup my includes any special way or would this work as is
    http://pastebin.com/UJyExeVu

  15. #935
    Sea Torques
    Join Date
    Jul 2010
    Posts
    516
    BG Level
    5
    FFXI Server
    Bahamut

    I don't believe so. That should be fine.

    edit:

    Code:
    function get_sets()
             ws_hat = {"Otomi Helm", "Mekira-Oto +1"}
             ws_index = 1
    
    sets.precast.WS["Stardiver"][0] = { 
        ammo="Thew Bomblet",
        head=ws_hat[ws_index],
        body="Miki. Breastplate",
        hands="Miki. Gauntlets",
        legs="Cizin Breeches +1",
        feet="Mikinaak Greaves",
        neck="Light Gorget",
        waist="Light Belt",
        left_ear="Brutal Earring",
        right_ear="Moonshade Earring",
        left_ring="Pyrosoul Ring",
        right_ring="Pyrosoul Ring",
        back="Atheling Mantle"
    }
    end
    
    function precast(spell)
    	if spell.type== 'WeaponSkill' then
    		if world.day == 'Earthsday' or world.day=='Lightsday' or  world.day=='Darksday' then ws_index=2 else ws_index=1 end
    		if sets.precast.WS[spell.english] then equip(sets.precast.WS[spell.english][accuracy_tier] or sets.precast.JA[spell.english]) end
    	end
    end
    I thought that this would work for equipping mekira-oto +1, but it doesn't. Anyone see the error?

  16. #936
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by TSFFXI View Post
    I don't believe so. That should be fine.

    edit:

    Code:
    function get_sets()
             ws_hat = {"Otomi Helm", "Mekira-Oto +1"}
             ws_index = 1
    
    sets.precast.WS["Stardiver"][0] = { 
        ammo="Thew Bomblet",
        head=ws_hat[ws_index],
        body="Miki. Breastplate",
        hands="Miki. Gauntlets",
        legs="Cizin Breeches +1",
        feet="Mikinaak Greaves",
        neck="Light Gorget",
        waist="Light Belt",
        left_ear="Brutal Earring",
        right_ear="Moonshade Earring",
        left_ring="Pyrosoul Ring",
        right_ring="Pyrosoul Ring",
        back="Atheling Mantle"
    }
    end
    
    function precast(spell)
    	if spell.type== 'WeaponSkill' then
    		if world.day == 'Earthsday' or world.day=='Lightsday' or  world.day=='Darksday' then
                        ws_index=2 
                    else 
                        ws_index=1
                    end
    		if sets.precast.WS[spell.english] then
                        equip(sets.precast.WS[spell.english][accuracy_tier] or sets.precast.JA[spell.english])
                    end
    	end
    end
    I thought that this would work for equipping mekira-oto +1, but it doesn't. Anyone see the error?
    it might need to be head=[ws_hat[ws_index]] but im not sure

    and this wont work equip(sets.precast.WS[spell.english][accuracy_tier] or sets.precast.JA[spell.english])

  17. #937
    Sea Torques
    Join Date
    Jul 2010
    Posts
    516
    BG Level
    5
    FFXI Server
    Bahamut

    That doesn't quite work. ws_hat is a table, so my syntax should be okay. If I manually go to get_sets() and change ws_index to 2, the mekira-oto +1 swaps in. The problem must be that assigning a value to ws_index in the same block as the weapon skill equip() call doesn't seem to work. I guess I could rework it so that it's assigned at some earlier time, although I'm not sure where I'd do that. I'd like to understand why it doesn't work, though.

    I'd never actually tested the second part to see if it worked. Changing it to
    Code:
    if sets.precast.WS[spell.english] then
    			_=sets.precast.WS[spell.english][accuracy_tier] or sets.precast.WS[spell.english]
    			equip(_)
    		end
    fixes it. Thanks for catching that.

  18. #938
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    im gettin errors with these
    1. http://pastebin.com/JMHJHwYB
    2. http://pastebin.com/4QxMPXt9

    1 gives me errors with
    function midcast(spell)
    idle() -- keeps erroring saying that its not valid if i change it to return it goes away
    end

    2 also gives me this error
    function precast(spell)
    if spell.type == "WeaponSkill"then
    equip('sets.ws.type[Weaponskill.Type[spell.name]]') --keeps saying that it errors trying to combine sets but im not trying to combine sets
    equip('sets.ws.element[spell.wsA]') --keeps saying that it errors trying to combine sets but im not trying to combine sets
    end
    end

    any help is appreciated

    end

    edited post with some fixes

  19. #939
    Sea Torques
    Join Date
    Jul 2010
    Posts
    516
    BG Level
    5
    FFXI Server
    Bahamut

    Did you ever define the idle function?

    The second error may be caused by calling the equip function twice. That's a guess, but try using the set_combine() function and then calling the equip() function once.

  20. #940
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    no i did not know i needed to that makes sence

Page 47 of 302 FirstFirst ... 37 45 46 47 48 49 57 97 ... LastLast

Similar Threads

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