Item Search
     
BG-Wiki Search
Page 80 of 302 FirstFirst ... 30 70 78 79 80 81 82 90 130 ... LastLast
Results 1581 to 1600 of 6036

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

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

    how can i print the whole table with the ids
    i know that this(if indi-poison is active)
    add_to_chat(123,"Indi Table= "..table.concat(Indi, "/"))
    will give:
    Indi Table= 2/ENEMY/Water/3

    but i would like to see direct from the table its self
    Indi Table= size=2/target=ENEMY/element=Water/element_id=3

    when i say ids i mean size,target,element,element_id

    i could do it like this but i want the output to come from the table its self
    add_to_chat(123,"Indi Table= "..table.concat(Indi, "size=" 1, "/target=" 2, "element=" 3, "/element_id=" 4))

    the only thing i could find is this
    add_to_chat(123,"Indi Table= "..table.foreach(Indi, "/"))

  2. #1582
    Melee Summoner
    Join Date
    May 2014
    Posts
    36
    BG Level
    1
    FFXI Server
    Ragnarok

    Quote Originally Posted by dlsmd View Post
    if all you want to do is check to see if you accidentally try to cast paralyze instead of Paralyna on to a party member this should be all you need

    Code:
    function pretarget(spell)
    	if spell.english == 'Paralyze' then 
    		if spell.target.type == 'PLAYER' then
    			cancel_spell()
    			send_command('input /ma "Paralyna" ' ..spell.target.raw)
    		end
    	end
    end
    No, i am tryingto change the casting of paralyze to become casting paralyna if the target is a player. any ideas?

  3. #1583
    Sea Torques
    Join Date
    Sep 2012
    Posts
    736
    BG Level
    5
    FFXI Server
    Leviathan

    Quote Originally Posted by Tronian View Post
    No, i am tryingto change the casting of paralyze to become casting paralyna if the target is a player. any ideas?
    That's exactly what he meant, his code does just that. However, you may also want to add a return statement after the send_command line.

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

    Quote Originally Posted by Tronian View Post
    No, i am tryingto change the casting of paralyze to become casting paralyna if the target is a player. any ideas?
    actually in this code is exactly what he has it doing?
    Code:
    function pretarget(spell)
    	if spell.english == 'Paralyze' then 
    		if spell.target.type == 'PLAYER' then
    			cancel_spell()
    			send_command('input /ma "Paralyna" ' ..spell.target.raw)
    		end
    	end
    end

  5. #1585
    Melee Summoner
    Join Date
    May 2014
    Posts
    36
    BG Level
    1
    FFXI Server
    Ragnarok

    Quote Originally Posted by Arcon View Post
    That's exactly what he meant, his code does just that. However, you may also want to add a return statement after the send_command line.
    oh, i tried and still no response, it is still trying to cast paralyze on player.

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

    Quote Originally Posted by Tronian View Post
    oh, i tried and still no response, it is still trying to cast paralyze on player.
    can you post all of your code in pastebin

    and are you using Paralyze or Paralyze II

    if Paralyze II
    change this
    if spell.english == 'Paralyze' then
    to
    if spell.english: startswith('Paralyze') then
    remove space between : and s

  7. #1587
    Melee Summoner
    Join Date
    May 2014
    Posts
    36
    BG Level
    1
    FFXI Server
    Ragnarok

    Quote Originally Posted by dlsmd View Post
    can you post all of your code in pastebin

    and are you using Paralyze or Paralyze II

    if Paralyze II
    change this
    if spell.english == 'Paralyze' then
    to
    if spell.english: startswith('Paralyze') then
    remove space between : and s
    the code pastebin.com/mAvC1GXs
    Thanks for the help.

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

    Quote Originally Posted by Tronian View Post
    the code pastebin.com/mAvC1GXs
    Thanks for the help.
    its not working because motes include already has a function precast if your using his files you need to put your precast rules in function job_precast(spell, action, spellMap, eventArgs)

  9. #1589
    Melee Summoner
    Join Date
    May 2014
    Posts
    36
    BG Level
    1
    FFXI Server
    Ragnarok

    Quote Originally Posted by dlsmd View Post
    its not working because motes include already has a function precast if your using his files you need to put your precast rules in function job_precast(spell, action, spellMap, eventArgs)
    I put that code in function job_precast(spell, action, spellMap, eventArgs) but results is same, paralyze is still being attempted instead of switching to paralyna. @.@;

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

    Quote Originally Posted by Tronian View Post
    I put that code in function job_precast(spell, action, spellMap, eventArgs) but results is same, paralyze is still being attempted instead of switching to paralyna. @.@;
    what lvl is your whm??
    are you using all of mots files?? are thay the latest versions??
    are you using it from the menu??
    if from menu it must be in(for motes files) job_precast
    if not from menu it can be in (for motes files) job_pretarget(this only works if you type in the spell info or from a macro)

  11. #1591
    RIDE ARMOR
    Join Date
    Jan 2010
    Posts
    24
    BG Level
    1
    FFXI Server
    Leviathan

    So I, like many others are converting my SC over to GS/lua now. So far so good I am mostly using Mote's stuff as templates etc. I do have one hopefully quick question though. I am trying to set up different global files based on different char names ( 3 different ones to be exact) so I can have different default HMP/PDT staves but mostly for different binds based on char. I cannot seem to get gear swap or more specifically mote's include/utilities to call anything but mote's global. I have a feeling its a simple file naming misunderstanding. Can anyone break this down for me? I am sure its something simple.

    I have a mule named Mulesalot and I have copied Mote-Globals.lua into a file called Mulesalot-Globals.lua however it just keeps loading the Mote-Globals.lua file (I can tell because I changed the default resting staff for quick testing). Can i only have a "user-globals.lua" file and not be char specific or am I missing something else?

    Thanks in advance.

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

    Quote Originally Posted by Tronian View Post
    I put that code in function job_precast(spell, action, spellMap, eventArgs) but results is same, paralyze is still being attempted instead of switching to paralyna. @.@;
    So probably its something inside mote's lua. Make a blank lua with just that in pre target, and test it.

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

    Quote Originally Posted by wigmasterflex View Post
    So I, like many others are converting my SC over to GS/lua now. So far so good I am mostly using Mote's stuff as templates etc. I do have one hopefully quick question though. I am trying to set up different global files based on different char names ( 3 different ones to be exact) so I can have different default HMP/PDT staves but mostly for different binds based on char. I cannot seem to get gear swap or more specifically mote's include/utilities to call anything but mote's global. I have a feeling its a simple file naming misunderstanding. Can anyone break this down for me? I am sure its something simple.

    I have a mule named Mulesalot and I have copied Mote-Globals.lua into a file called Mulesalot-Globals.lua however it just keeps loading the Mote-Globals.lua file (I can tell because I changed the default resting staff for quick testing). Can i only have a "user-globals.lua" file and not be char specific or am I missing something else?

    Thanks in advance.
    Don't think by just changing the name it will work, mote's will auto load his if they aren't any other first.

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

    Quote Originally Posted by wigmasterflex View Post
    So I, like many others are converting my SC over to GS/lua now. So far so good I am mostly using Mote's stuff as templates etc. I do have one hopefully quick question though. I am trying to set up different global files based on different char names ( 3 different ones to be exact) so I can have different default HMP/PDT staves but mostly for different binds based on char. I cannot seem to get gear swap or more specifically mote's include/utilities to call anything but mote's global. I have a feeling its a simple file naming misunderstanding. Can anyone break this down for me? I am sure its something simple.

    I have a mule named Mulesalot and I have copied Mote-Globals.lua into a file called Mulesalot-Globals.lua however it just keeps loading the Mote-Globals.lua file (I can tell because I changed the default resting staff for quick testing). Can i only have a "user-globals.lua" file and not be char specific or am I missing something else?

    Thanks in advance.
    no because you have to find and edit the include('??????.lua') to stop reloading the default includes

    but if you want to have separate lua's for each char in ...\Windower4\addons\GearSwap\data
    just add your char names so that each has there own folder

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

    Quote Originally Posted by Tronian View Post
    Hi Motenten,

    I am new to gs and am modifying your whm.lua.

    I follow you pointers and modify my code as below. I added print to see if where the code is moving.not sure if print command is correct though.

    Code:
    if spell.english == 'Paralyze' and spell.target.type == 'PLAYER' then
    		print (111111)
    		cancel_spell() 
    		print (22211)
    		send_command('input /ma "Paralyna" ' ..spell.target.name) 
    		else
    		print (333331)
    		send_command('input /ma "Paralyze" '..spell.target.name)
    	end
    anyway, if my character try cast paralze on anyone, debug shows it will go into a loop and ffxi eventually crash out.

    I tried putting this code in function precast(spell) but nothing happens, it still try to cast paralyze on a player instead of paralyna.

    if I put the code in the function job_precast(spell, action, spellMap, event Args) and try to cast paralyze, debug shows it goes into a loop and eventually crash out.

    please let me know where should that code reside to achieve my goal of spellcast code below. Thanks.

    Code:
    <if Spell="Paralyze*"> <!-- Check conditions and change if needed when casting Paralyze II -->
    <if SpellTargetType="Self|Player"> <!-- If target is player or self change to paralyna -->
    <action type="DefaultTarget" target="<t>" />
    <!-- <action type=ChangeTarget Target="<st>" /> -->
    <changespell spell="Paralyna" />

    Since you're modifying my files, don't use cancel_spell(), and don't define your own versions of pretarget() or precast(). Both of those will cause problems. You should be using job_pretarget() and job_precast().

    To cancel a spell, use:
    Code:
        eventArgs.cancel = true
    And then insert a return command as appropriate to be sure that you don't run regular code after you've decided to cancel.

    When you created a precast() function it didn't work because you broke the entire include structure.

    And of course, when you cast paralyze you have a send_command() to *again* cast paralyze (which will hit this bit of code, and yet again send the command to cast paralyze, etc). Take that out. If you're casting paralyze, you don't need to send a command to tell it to cast paralyze again.

    If you were testing this by casting on yourself that would also fail. spell.player.type == 'PLAYER' is for every other player *except* yourself. You also need to check for spell.target.type == 'SELF'.

    So, to fix all the problems in your code sample:

    Code:
    function job_precast(spell, action, spellMap, event Args)
        if spell.english == 'Paralyze' and (spell.target.type == 'PLAYER' or spell.target.type == 'SELF') then
            eventArgs.cancel = true
            send_command('input /ma "Paralyna" ' ..spell.target.name)
            return
        end
    end

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

    Quote Originally Posted by wigmasterflex View Post
    So I, like many others are converting my SC over to GS/lua now. So far so good I am mostly using Mote's stuff as templates etc. I do have one hopefully quick question though. I am trying to set up different global files based on different char names ( 3 different ones to be exact) so I can have different default HMP/PDT staves but mostly for different binds based on char. I cannot seem to get gear swap or more specifically mote's include/utilities to call anything but mote's global. I have a feeling its a simple file naming misunderstanding. Can anyone break this down for me? I am sure its something simple.

    I have a mule named Mulesalot and I have copied Mote-Globals.lua into a file called Mulesalot-Globals.lua however it just keeps loading the Mote-Globals.lua file (I can tell because I changed the default resting staff for quick testing). Can i only have a "user-globals.lua" file and not be char specific or am I missing something else?

    Thanks in advance.
    Hm. You're correct, it won't work as currently written. However it's trivial to allow it to search for <playername>-globals, so I'll update my code to account for that. It may be a bit before I push my latest updates, so you can fix it yourself by making this change to Mote-Utility:

    In the load_user_globals() function, change:
    Code:
    	local filenames = {'user-globals.lua'}
    to:
    Code:
    	local filenames = {'user-globals.lua', player.name..'-globals.lua'}

  17. #1597
    RIDE ARMOR
    Join Date
    Jan 2010
    Posts
    24
    BG Level
    1
    FFXI Server
    Leviathan

    ahhh, that makes sense. Will do and many thanks!

    I like that folders idea too didn't know I could do that either.

  18. #1598
    Salvage Bans
    Join Date
    Oct 2010
    Posts
    948
    BG Level
    5
    FFXI Server
    Valefor

    Having a bit of trouble on my RUN file (I have problems with every job, don't I?) but this might not be a coding error so much as it is something I'm not understanding properly. Essentially, when I try and use most of my JAs, I don't swap gear properly. I noticed that it only applies to JAs that are under another category; Vivacious Pulse swaps properly, but runes, Lunge/Swipe, and Vallation/Valiance aren't switching gear at all. Is there a way to handle "category" type JAs like this?

    Edit: By Category I mean "Rune Enchantment" "Ward" and "Effusion" in this case.

    My GS: http://pastebin.com/LsT1rn84

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

    Quote Originally Posted by Kensagaku View Post
    Having a bit of trouble on my RUN file (I have problems with every job, don't I?) but this might not be a coding error so much as it is something I'm not understanding properly. Essentially, when I try and use most of my JAs, I don't swap gear properly. I noticed that it only applies to JAs that are under another category; Vivacious Pulse swaps properly, but runes, Lunge/Swipe, and Vallation/Valiance aren't switching gear at all. Is there a way to handle "category" type JAs like this?

    Edit: By Category I mean "Rune Enchantment" "Ward" and "Effusion" in this case.

    My GS: http://pastebin.com/LsT1rn84
    RUN is hard to code for many reasons
    not lest of which there is no way to count multiple of the same runes i have tried buff gain,aftercast,percast,midcast because to test the counts i have it cancel the spell when it hits my cap but when one of them drops the code has no way to count down

    but im going to check and see if there is a special packet that counts it next time i go online

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

    Quote Originally Posted by dlsmd View Post
    RUN is hard to code for many reasons
    not lest of which there is no way to count multiple of the same runes i have tried buff gain,aftercast,percast,midcast because to test the counts i have it cancel the spell when it hits my cap but when one of them drops the code has no way to count down

    but im going to check and see if there is a special packet that counts it next time i go online
    for the runes counts could do a function like the one Byrth did on his BRD.lua for custom timers, for sure for this variables and timers are needed (unless can find a way using packets.. ~.~)

Page 80 of 302 FirstFirst ... 30 70 78 79 80 81 82 90 130 ... LastLast

Similar Threads

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