Jump to content


Photo

Help with GearSwap


    2 replies to this topic

    #1 Pilen

    Pilen

      Member

    • Members
    • PipPip
    • 14 posts

      Posted 17 February 2014 - 04:20 AM

      Hey guys!

       

      I'm not sure if you're suppose to help people out with GearSwap scripts but I'm giving it a shot. I couldn't find a specific thread for it =/

       

      I tried to find a GearSwap for BST online but I couldn't find anyone so I created one using other jobs and changed it up a bit. I got everything working except one thing that is kinda tricky. I want to have a function that equips gear depending on current status. This includes resting, idle and engaged but also if pet is out.

       

      The scenarios that I currently experience on BST is that when I fight a mob where I only want to use my WS and fight casually I have to reequip my pet only gear all the time which is annoying. I would like:

      • When I engage a mob GS equips my TP set
      • When I disengage a mob GS equips my Pet only set IF I have a pet out.
      • When I just stand-by and have my pet out GS equips my Pet Only gear

      Since I'm not 100% of all the functions etc. I took the status_change(new,old) from Byrths_NIN lua and changed it into the following:

       

      function status_change(new,old)
      	if T{'Idle','Resting'}:contains(player.status) then
      		equip(sets.idle)
      	elseif player.status == 'Engaged' then
      		equip(sets.TP.DD)
      	elseif pet.isvalid then
      		equip(sets.TP.petonly)
      	end
      end
      

      When I engage a mob the TP set is equiped. But when I disengage it doesn't equip my pet only gear.

      I could also just make the Idle set my Pet.Only set and I would be done but I think this should be able to work.

       

      I have also tried to rest and go to idle mode with my pet out and this does not change into my pet only gear.

       

      By the way the Idle what does that mean anyway. You don't do anything during a certain period of time?

       

      I really appreciate getting some help with this



      #2 Arcon

      Arcon

        Advanced Member

      • Windower Staff
      • 1189 posts
      • LocationMunich, Germany

      Posted 17 February 2014 - 01:06 PM

      Idle is just one of the statuses available at any given time. You can either be engaged, dead, resting, fishing, in a CS, etc. and if you're not any of those then you are idle (as in, before you engage).

       

      The reason it doesn't equip your petonly gear is because when you disengage, your status changes to "Idle", which means the first case of those three cases is true and it equips your idle gear.

       

      To fix that, add an "end" before the "elseif pet.isvalid then" line, and change that line to only "if" (not "elseif").



      #3 Pilen

      Pilen

        Member

      • Members
      • PipPip
      • 14 posts

        Posted 18 February 2014 - 12:39 AM

        Thanks for the reply, I tried changing it to the the code you wrote but that made the pet only permanent gear if pet was out. I changed so I used set.TP.petonly set instead and that solved the problem for now. I think that should be OK.






        1 user(s) are reading this topic

        0 members, 1 guests, 0 anonymous users