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.
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.
I dont recall how to do print. I tried just now to remember but cant for the life of me.
print(action.category,action.targets[1].actions[1].message)
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.
put it after the actor_id == player.id line
OK put it there but not giving any out puts.
Doh, make it id==0x28 instead of id==0x1A
0x1A is the outgoing action packet. 0x28 is incoming.
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.
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.
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
It might not work for PUP, I think, because PUP WSs are too quick now.
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
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.
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.
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.
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).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
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.
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.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)
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