Item Search
     
BG-Wiki Search
Page 78 of 302 FirstFirst ... 28 68 76 77 78 79 80 88 128 ... LastLast
Results 1541 to 1560 of 6036

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

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

    Quote Originally Posted by Raelia View Post
    Are spell.target.hp and spell.target.hpp broken? Mote used both of them in his waltz optimizer, but I can't get either to work when trying to write my own, even cribbing the alliance target finding function.
    Note that I don't use spell.target.hp, I call a function that gets the player object for the target (assuming the target is within the ally), assign that to a variable called 'target', and then check target.hp. Not sure if you properly accounted for that, given you also mention the ally target finding function.

  2. #1542
    RIDE ARMOR
    Join Date
    May 2014
    Posts
    14
    BG Level
    1
    FFXI Server
    Fenrir
    WoW Realm
    Antonidas

    okay i have this thief script written now i am trying to figure out this error Flow.lua 276 and username_thf.lua 66 thanks

    Spoiler: show


    function get_sets()

    TP_Index = 1
    Idle_Index = 1

    -- WS sets


    sets.WS = {}

    sets.WS["Evisceration"] = {
    head="Pill. Bonnet +1",
    body="Plunderer's Vest +1",
    feet="Plun. Poulaines +1",
    neck="Nefarious Collar",
    waist="Caudata Belt",
    left_ear="Moonshade Earring",
    right_ear="Brutal Earring",
    left_ring="Demonry Ring",
    right_ring="Epona's Ring",
    back="Rancorous Mantle",
    }

    sets.WS["Mercy Stroke"] = {
    head="Pill. Bonnet +1",
    body="Pillager's Vest +1",
    feet="Plun. Poulaines +1",
    neck="Justiciar's Torque",
    waist="Prosilio Belt",
    left_ear="Steelflash Earring",
    right_ear="Bladeborn Earring",
    left_ring="Pyrosoul Ring",
    right_ring="Epona's Ring",
    back="Buquwik Cape",
    }

    sets.WS["Exenterator"] = {
    head="Pill. Bonnet +1",
    body="Plunderer's Vest +1",
    feet="Plun. Poulaines +1",
    neck="Justiciar's Torque",
    waist="Caudata Belt",
    left_ear="Steelflash Earring",
    right_ear="Bladeborn Earring",
    left_ring="Stormsoul Ring",
    right_ring="Epona's Ring",
    back="Canny Cape",
    }

    sets.WS["Rudra's Storm"] = {
    head="Whirlpool Mask",
    body="Plunderer's Vest +1",
    legs="Manibozho Brais",
    feet="Plun. Poulaines +1",
    waist="Chiner's Belt",
    left_ear="Moonshade Earring",
    right_ear="Brutal Earring",
    left_ring="Rajas Ring",
    right_ring="Epona's Ring",
    back="Atheling Mantle",
    }

    -- TP sets to choose from


    TP_Set_Names = {"DD", "TH", "ACCTH" "ACC"}
    sets.TP = {}
    -- index 1
    sets.TP.DD = {
    feet="Plun. Poulaines +1",
    left_ring="Rajas Ring",
    right_ring="Epona's Ring",

    }

    -- index 2
    sets.TP.TH = {
    head="Uk'uxkaj Cap",
    body="Plunderer's Vest +1",
    hands="Plun. Armlets +1",
    legs="Plunderer's Vest +1",
    feet="Plun. Culottes +1",
    neck="Nefarious Collar",
    waist="Chaac Belt",
    }
    -- Index 3
    sets.TP.ACCTH = {
    head="Whirlpool Mask",
    body="Pillager's Vest +1",
    hands="Plun. Armlets +1",
    legs="Plun. Culottes +1",
    feet="Raid. Poulaines +2",
    neck="Rancor Collar",
    waist="Chaac Belt",
    back="Letalis Mantle",

    }

    -- Index 4
    sets.TP.ACC = {
    head="Whirlpool Mask",
    body="Pillager's Vest +1",
    hands="Plun. Armlets +1",
    legs="Plun. Culottes +1",
    feet="Pill. Poulaines +1",
    neck="Rancor Collar",
    waist="Hurch'lan Sash",
    back="Letalis Mantle",
    }



    -- Idle sets to choose from



    Idle_Set_Names ={"Normal"}
    sets.Idle = {}
    sets.Idle['Normal'] = {
    main="Mandau",
    sub="Sandung",
    ammo="Yetshila",
    head="Felistris Mask",
    body="Thaumas Coat",
    hands="Pill. Armlets +1",
    legs="Pill. Culottes +1",
    feet="Pill. Poulaines +1",
    neck="Asperity Necklace",
    waist="Patentia Sash",
    left_ear="Heartseeker Earring",
    right_ear="Dudgeon Earring",
    left_ring="Paguroidea Ring",
    right_ring="Sheltered Ring",
    back="Canny Cape",
    }
    end



    -- Gearswap argument code



    function precast(spell)
    if sets.WS[spell.english] then
    equip(sets.WS[spell.english])
    end
    end

    function aftercast(spell)
    if player.status =='Engaged' then
    equip(sets.TP[TP_Set_Names[TP_Index]])
    else
    equip(sets.Idle[Idle_Set_Names[Idle_Index]])
    end
    end

    function status_change(new,old)
    if T{'Idle','Resting'}:contains(new) then
    equip(sets.Idle[Idle_Set_Names[Idle_Index]])
    elseif new == 'Engaged' then
    equip(sets.TP[TP_Set_Names[TP_Index]])
    end
    end




    -- Self commands




    function self_command(command)
    if command == 'DD' then
    TP_Index = 1
    equip(sets.TP[TP_Set_Names[TP_Index]])
    send_command('@input /echo ----- changed to TH -----')
    end

    if command == 'TH' then
    TP_Index = 2
    equip(sets.TP[TP_Set_Names[TP_Index]])
    send_command('@input /echo ----- changed to TH -----')
    end

    if command == 'ACCTH' then
    TP_Index = 3
    equip(sets.TP[TP_Set_Names[TP_Index]])
    send_command('@input /echo ----- changed to TH -----')
    end

    if command == 'ACC' then
    TP_Index = 4
    equip(sets.TP[TP_Set_Names[TP_Index]])
    send_command('@input /echo ----- changed to TH -----')
    end

    end



    if you want the paste bin inbox me i tried posting the url several different ways but i dont have 10 post yet sorry

  3. #1543
    BG Content
    Join Date
    Jul 2007
    Posts
    22,359
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Code:
    TP_Set_Names = {"DD", "TH", "ACCTH" "ACC"}
    should be:
    Code:
    TP_Set_Names = {"DD", "TH", "ACCTH", "ACC"}
    Spoiler block is a good idea, but I recommend also using [ code ] tags (without the spaces) when posting code.

  4. #1544
    RIDE ARMOR
    Join Date
    May 2014
    Posts
    14
    BG Level
    1
    FFXI Server
    Fenrir
    WoW Realm
    Antonidas

    Quote Originally Posted by Byrthnoth View Post
    Code:
    TP_Set_Names = {"DD", "TH", "ACCTH" "ACC"}
    should be:
    Code:
    TP_Set_Names = {"DD", "TH", "ACCTH", "ACC"}
    Spoiler block is a good idea, but I recommend also using [ code ] tags (without the spaces) when posting code.
    ahh yes i see it now thanks so much


    p.s. i thought i was doing good and i always did that when learning c++ aka forget the ; at the end ^^

  5. #1545
    Custom Title
    Join Date
    Nov 2008
    Posts
    1,065
    BG Level
    6
    FFXI Server
    Diabolos

    Quote Originally Posted by Motenten View Post
    Note that I don't use spell.target.hp, I call a function that gets the player object for the target (assuming the target is within the ally), assign that to a variable called 'target', and then check target.hp. Not sure if you properly accounted for that, given you also mention the ally target finding function.
    Code:
    function find_player_in_alliance(name)
        for i,v in ipairs(alliance) do
            for k,p in ipairs(v) do
                if p.name == name then
                    return p
                end
            end
        end
    end
    
    function pretarget(spell)
        if spell.target.isallymember then
            local target = find_player_in_alliance(spell.target.name)
            local est_max_hp = target.hp / (target.hpp/100)
            local missingHP = math.floor(est_max_hp - target.hp)
            if spell.english == "Cure IV" and missingHP < 600 then
                cancel_spell();
                send_command('input /ma "Cure III" '..spell.target.name..';')
            end
        end
    
        if spell.english == "Third Eye" and vars.yolo == false and not buffactive.seigan then
            cancel_spell()
            send_command('input /ja "Seigan" <me>')
        else
            vars.yolo = false
        end
    
        if spell.english == "Seigan" and not buffactive.thirdeye then
            send_command('wait 1;input /ja "Third Eye" <me>')
            vars.yolo = true
        end
    end
    Didn't think to remove the 'spell.target.isallymember' check, is that one of your additions and not standard to gearswap?

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

    Quote Originally Posted by dv8nxs View Post
    okay i have this thief script written now i am trying to figure out this error Flow.lua 276 and username_thf.lua 66 thanks

    if you want the paste bin inbox me i tried posting the url several different ways but i dont have 10 post yet sorry
    try changing this
    TP_Set_Names = {"DD", "TH", "ACCTH" "ACC"}
    to this
    TP_Set_Names = {"DD","TH","ACCTH","ACC"}
    you forgot a , (and had spaces ware thay did not need to be tho this i dont think will cause an issue)

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

    Quote Originally Posted by dv8nxs View Post
    if you want the paste bin inbox me i tried posting the url several different ways but i dont have 10 post yet sorry
    You can just post the pastebin hash value. EG: instead of http://pastebin.com/emyZAC3X, just put emyZAC3X.

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

    Quote Originally Posted by Raelia View Post
    Didn't think to remove the 'spell.target.isallymember' check, is that one of your additions and not standard to gearswap?
    That's a standard GearSwap field. I need to check that in the waltz code because I can't cure people outside of the party/ally.

    I'd suggest inserting print_set(tablename) in there to make sure that the fields the code is looking for actually exist.

  9. #1549
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    Problem:
    I want a better and more customizable way to handle Repulse Mantle on RUN.
    Currently I have 4 TP sets on RUN: DD, Hybrid, PDT, MDT.
    Let's leave aside DD and focus on the other 3.
    I can't find a satisfying way to pre-define situations/conditions where I'd want to use Repulse Mantle over my currently equipped mantle (atm using Evasionist's, Iximulew and Mubvumbamiri, but considering to get a more standard Mollusca Mantle I guess).
    I decided I want to manually switch the Repulse mantle mode with a toggle (self_command).


    Initial situation:
    So basically this is more or less the situation where I come from:
    Spoiler: show
    Code:
    Function aftercast()
      if player == 'Engaged' then
         equip(tpset[TP_ind])
      else
         equip(idle)
      end
    end
    
    function status_change()
      if new == 'Engaged' then
         equip(tpset[TP_ind])
      else
         equip(idle)
      end
    end
    
    function self_command
      if command == 1 then
         equip(PDTset)
      end
      if command == 2 then
         equip(MDTset)
      end
    end



    Resulting situation:
    Given those above are the situations where I handle the equip of my TP sets, I thought about just simply splitting those "Ifs" even further with an additional branch and tracking repulse mode On/Off with an additional var, handling it with a simple toggle defined within self_command.
    Spoiler: show
    Code:
    var1 = 'Normal'
    repulseset = {back="Repulse Mantle"}
    
    Function aftercast()
      if player == 'Engaged' then
          if var1 == 'Repulse' then
             equip(tpset[TP_ind], repulseset)
          else
             equip(tpset[TP_ind])
          end
      else
          equip(idle)
      end
    end
    
    function status_change()
      if new == 'Engaged' then
          if var1 == 'Repulse' then
             equip(tpset[TP_ind], repulseset)
          else
             equip(tpset[TP_ind])
          end
      else
         equip(idle)
      end
    end
    
    function self_command
      if command == toggle Repulse then
         if var1 == 'Normal' then
             var1 = 'Repulse'
         else
             var1 = 'Normal'
         end
      end
      if command == 1 then
         if var1 == 'Repulse' then
             equip(PDTset, repulseset)
         else
             equip(PDTset)
         end
      end
      if command == 2 then
         if var1 == 'Repulse' then
             equip(MDTset, repulseset)
         else
             equip(MDTset)
         end
      end
    end


    Didn't try it of course, it's just something I thought of this morning >.>
    But it seems to me it should be working?

  10. #1550
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    would this be correct

    Code:
    	if spell.english:startswith(Indi-) and player.indi.element == [spell.element] then
    		cancel_spell()
    		return
    	end
    player.indi is new with no examples to go by


    edit i got this figured out
    i needed to do this
    if string.find(spell.english,'Indi-') and player.indi.element == spell.element then

  11. #1551
    Custom Title
    Join Date
    Nov 2008
    Posts
    1,065
    BG Level
    6
    FFXI Server
    Diabolos

    Quote Originally Posted by Sechs View Post
    Code:
    function status_change()
      if new = engaged then
          if var1 == 'Repulse' then
             equip(tpset[TP_ind], repulseset)
          else
             equip(tpset[TP_ind])
          end
      else
         equip(idle)
      end
    end
    Won't work, but it's all to do with the second line there. Firstly the operator, secondly I think 'engaged' needs quotes.

    Here's my status change block for reference:
    Code:
    function status_change(new,old)
        if new == 'Engaged' then
            equip(sets.TP[vars.TP])
        else
            equip(sets.Idle.Swag)
            send_command('wait 1;input /lockstyle on;gs c Afterswag')
        end
    end
    
    function self_command(command)
        if command == 'intercept' then
            vars.intercept = true
        elseif command == 'Afterswag' then
            if player.hpp > player.mpp then
                equip(sets.Idle.Refresh)
            else
                equip(sets.Idle.Regen)
            end
        end
    end
    I actually plan to use that Intercept command I was talkin' about to do Shockwave in place of Swipe on my Ctrl+3 macro just like how it auto-repeats the last rune I manually entered on Ctrl+1, since I only use one or the other depending on situation.

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

    dang

  13. #1553
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Sechs View Post
    Code:
    Problem:
    function status_change()
      if new = engaged then
         equip(tpset[TP_ind])
      else
         equip(idle)
      end
    end
    
    function self_command
      if command == 1 then
         equip(PDTset)
      end
      if command == 2 then
         equip(MDTset)
      end
    end
    the second line needs to be
    if new=='Engaged' then

  14. #1554
    RIDE ARMOR
    Join Date
    May 2014
    Posts
    14
    BG Level
    1
    FFXI Server
    Fenrir
    WoW Realm
    Antonidas

    wrong thread sorry

  15. #1555
    RIDE ARMOR
    Join Date
    May 2014
    Posts
    14
    BG Level
    1
    FFXI Server
    Fenrir
    WoW Realm
    Antonidas

    just wanted to see if any of you think there is a better way of doing anything and is done correctly and i thank everyone who has helped me get this correct

    pastebin = gYR4RtbA

  16. #1556
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    Yeah it was an example I wrote in 2 seconds, I didn't copypaste 'cause I don't have my Lua with me atm
    What's in the original Lua (the first spoiler) works 101%, I just simplified it a bit too much I guess while typing in here.

  17. #1557
    Impossiblu
    Join Date
    Mar 2010
    Posts
    10,445
    BG Level
    9
    FFXIV Character
    Prothescar Centursa
    FFXIV Server
    Balmung
    FFXI Server
    Valefor

    Does GearSwap require a QD/RA bullet check? I.E., is it able to swap bullets properly without shooting a R/EX Quick Draw bullet instead of a normal TP bullet by itself, or do I need to add a rule specifically to safeguard against that like with SpellCast?

    I have several points where it equips the bullet; i.e., I have a redundant set of sets that only involve the bullets on top of the bullets being added to normal ranged/ws/qd sets. Is this enough of a failsafe?

  18. #1558
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    How do I correctly type the "content" of a variable into a chatline?
    Let's say I have a variable and I want its content displayed into an echo chat line

    var1 = 'Sieben'
    [cut]
    send_command('@input /echo Sechs is very very '..var1..' and you know you like it')


    I'd want to the result to be a chatline like
    "Sechs is very very Sieben and you know you like it".
    How can I do it? Because clearly the send_command I wrote above doesn't work.

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

    Quote Originally Posted by Prothescar View Post
    Does GearSwap require a QD/RA bullet check? I.E., is it able to swap bullets properly without shooting a R/EX Quick Draw bullet instead of a normal TP bullet by itself, or do I need to add a rule specifically to safeguard against that like with SpellCast?

    I have several points where it equips the bullet; i.e., I have a redundant set of sets that only involve the bullets on top of the bullets being added to normal ranged/ws/qd sets. Is this enough of a failsafe?
    There is nothing that should logically allow GearSwap to know that you don't want to fire that bullet. And if you run out of normal ammo and have the quick draw bullet equipped, since there's no actual other ammo to equip, GearSwap will optimize out the attempt to send an equip command that's just going to error out, and you will fire with the quick draw ammo.

    As for whether what you have is "enough" of a failsafe, that's impossible to say without seeing the code. However you do need the handle the logic of not firing that bullet yourself. On the upside, you can check whether you have the appropriate regular ammo in inventory before even trying, so there's a lot less guesswork involved.

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

    Quote Originally Posted by Sechs View Post
    How do I correctly type the "content" of a variable into a chatline?
    Let's say I have a variable and I want its content displayed into an echo chat line

    var1 = 'Sieben'
    [cut]
    send_command('@input /echo Sechs is very very '..var1..' and you know you like it')


    I'd want to the result to be a chatline like
    "Sechs is very very Sieben and you know you like it".
    How can I do it? Because clearly the send_command I wrote above doesn't work.
    What you wrote -should- work. You could also use:

    add_to_chat(122, 'Sechs is very very '..var1..' and you know you like it')

    In the event that you don't know for certain that var1 is a string (eg: it's a number, or possibly nil, etc), then you'd want to use tostring(var1) instead of just the naked var1.

Page 78 of 302 FirstFirst ... 28 68 76 77 78 79 80 88 128 ... LastLast

Similar Threads

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