Item Search
     
BG-Wiki Search
Closed Thread
Page 289 of 302 FirstFirst ... 239 279 287 288 289 290 291 299 ... LastLast
Results 5761 to 5780 of 6036

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

  1. #5761
    BG Content
    Join Date
    Jul 2007
    Posts
    21,104
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    well, print out the two things in the other if statement (action.category and action.targets[1].actions[1].message) and see what they are when you hit a monster.

  2. #5762

    I dont recall how to do print. I tried just now to remember but cant for the life of me.

  3. #5763
    BG Content
    Join Date
    Jul 2007
    Posts
    21,104
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    print(action.category,action.targets[1].actions[1].message)

  4. #5764

    I hate making a fool of myself
    I am not sure where to place this. I tried inside the code hoping that was right but didnt seem to do anything. moved it outside and got errors. Then thought maybe it was used with eval but also nothing.
    Sorry sir.

  5. #5765
    BG Content
    Join Date
    Jul 2007
    Posts
    21,104
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    put it after the actor_id == player.id line

  6. #5766

    OK put it there but not giving any out puts.

  7. #5767
    BG Content
    Join Date
    Jul 2007
    Posts
    21,104
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Doh, make it id==0x28 instead of id==0x1A

    0x1A is the outgoing action packet. 0x28 is incoming.

  8. #5768

    OK, 0x28 is now causing it to print 1 0 on every attack round but the add to chat message isnt triggering. Also it doesnt seem to print anything different if a miss or crit, etc.
    I need to head to bed, if you are willing to help more tomorrow I would be grateful. Also just wondering what does 0x29 do? I used it for the auto-attack message but only because i say it used in mote's file.

  9. #5769
    BG Content
    Join Date
    Jul 2007
    Posts
    21,104
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Replace
    local action = windower.packets.parse_action(org)
    with
    local action = windower.packets.parse_action(data)

    You're encountering the battlemod problem I described. After that, it'll probably work.

  10. #5770
    Melee Summoner
    Join Date
    Mar 2014
    Posts
    25
    BG Level
    1

    Hello, i need a confirmation from the "expert of GS" ^^
    did the : sets.midcast.Pet.WeaponSkill work for Pup or not ?
    Since i use the mote lua for PUP and i didn't see my gear swap when my pup ws.

    Thks in advance

  11. #5771
    BG Content
    Join Date
    Jul 2007
    Posts
    21,104
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    It might not work for PUP, I think, because PUP WSs are too quick now.

  12. #5772

    Wondering about the Target change register event, I was trying to get it to only execute a command once I confirmed target change not just when I cycle through potential targets. Is it possible to only execute whatever code only after you completely change targets?
    Thanks

  13. #5773

    Quote Originally Posted by nikia View Post
    Wondering about the Target change register event, I was trying to get it to only execute a command once I confirmed target change not just when I cycle through potential targets. Is it possible to only execute whatever code only after you completely change targets?
    Thanks
    yes
    windower.register_event('target change',function(index)
    ...
    end)

  14. #5774

    Im sure it is something I am missing but still seems to be executing the code by simply cycling. Not sure if I need something else added to have it only execute once i have completely changed the main target focus.

  15. #5775
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    What he means is when you are changing your target while the blue sub arrow is up it triggers the code each time a new target is selected with the arrow (before you actually choose that target) I noticed this also when i started using that event.

  16. #5776

    Quote Originally Posted by nikia View Post
    Im sure it is something I am missing but still seems to be executing the code by simply cycling. Not sure if I need something else added to have it only execute once i have completely changed the main target focus.
    thats because your target is changing if the target name box changes this function goes off
    Quote Originally Posted by Trumpy View Post
    What he means is when you are changing your target while the blue sub arrow is up it triggers the code each time a new target is selected with the arrow (before you actually choose that target) I noticed this also when i started using that event.
    same as above

    there might be a work around but im not sure right now

  17. #5777

    I tried to look at the mote treasure hunter include to get ideas and noticed his target change. I couldnt understand it really.(kinda main reason i try to have my own code, easier to follow)

    I even tried to load his thf side car and th include but couldnt get any of the messages about taging, or changing targets to work. Might be doing it wrong.

    From what little i understood about his TH file it seems he has some way to not executing the code in the event til he actually fully changes targets?

    The manual target chaange if possible is the last thing I need for my TH file.

    If anyone knows how to make it work if it is possible I would be grateful.

  18. #5778
    Melee Summoner
    Join Date
    Oct 2014
    Posts
    48
    BG Level
    1

    Code:
    function on_target_change_for_th(new_index, old_index)
        -- Only care about changing targets while we're engaged, either manually or via current target death.
        if player.status == 'Engaged' then
            -- If  the current player.target is the same as the new mob then we're actually
            -- engaged with it.
            -- If it's different than the last known mob, then we've actually changed targets.
            if player.target.index == new_index and new_index ~= info.last_player_target_index then
                if _settings.debug_mode then add_to_chat(123,'Changing target to '..player.target.id..'.') end
                info.last_player_target_index = player.target.index
                TH_for_first_hit()
            end
        end
    end
    After a quick look-over, it loooooooooks like what's happening is: Motenten used windower.register_event for the target change function. This forces gearswap to run refresh_globals, which sets player.target to windower.ffxi.get_mob_by_target('t'). In the target change function (quoted) he checks to see if you're engaged, if the index matches player.target.index, and if the index does not match his record of your last index (updated in his status change and target change functions).

    You need to:
    1) Keep track of your currently engaged target.
    2) When you are engaged: see if the index passed to the target change event matches windower.ffxi.get_mob_by_target('t').index. If it does, the cursor has moved to the mob you are engaged with. Determine if you've targeted a new mob by comparing the index to your records.
    If it does not, you probably have a subtarget cursor(?).

    It doesn't seem necessary to use windower.register_event over calling windower.ffxi.get_mob_by_target.

    Side note: I kind of remember the target change event being really slow. I suspected it was updated in the outgoing chunk event, but I don't think I ever tried to confirm that. It shouldn't matter for this, though, unless you're defeating mobs very quickly.

  19. #5779

    Code:
    info = info or {} --have this set with other variables.
        windower.register_event('target change',function(new_index, old_index)
            if player.status == 'Engaged' then
                if player.target.index == new_index
                        and new_index ~= info.last_player_target_index then
                    if _settings.debug_mode then
                        add_to_chat(123,'Changing target to '..player.target.id..'.')
                    end
                    info.last_player_target_index = player.target.index
                end
            end
        end)
    Not getting what I am missing, keep in mind this level of knowledge is somewhat beyond me. I tried to add in the code but seems to do nothing. Far as the other parts you mentioned I kinda follow along but have no idea how i would make that work.

  20. #5780
    Melee Summoner
    Join Date
    Jun 2014
    Posts
    34
    BG Level
    1

    I've been away from the game for over a year and I didn't really know much about RUN when I left. I started gearing it today and I'm hoping to make it a little easier to remember what the runes do.

    I'm using the below code to handle Runes and I want to add some text to the output when I cycle runes so that I know what they do. What it says now when I cycle runes is:

    "Runes is now Gelus" etc.

    I'd like it to say something like:

    "Runes is now Gelus - Wind Resistance and Ice Damage".



    Anybody know an easy way to do that?

    Code:
    state.Runes = M{['description']='Runes', "Ignis", "Gelus", "Flabra", "Tellus", "Sulpor", "Unda", "Lux", "Tenebrae"}
    Code:
    function job_self_command(cmdParams, eventArgs)
    	if cmdParams[1]:lower() == 'rune' then
    		send_command('@input /ja '..state.Runes.value..' <me>')
    	end
    end

Similar Threads

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