Programming practice

Discussion in 'User Interfaces' started by Merlijn, Aug 13, 2009.

  1. Tyche

    Tyche The Punisher

    Joined:
    Dec 30, 2008
    Messages:
    2,203
    Likes Received:
    107
    No, you typed it :(
     
  2. Merlijn

    Merlijn Shadow Master

    Joined:
    Mar 11, 2009
    Messages:
    2,284
    Likes Received:
    57
    Think I managed to write this today. Gonna test it tonight (without sound yet but the code already written for it, just lacking a soundfile)

    /pray :unsure:

    P.S. If it works I'll see if I can write something for Crono's request.. do you also want it to set the loot to Rare btw? ;)
     
  3. Croga

    Croga Says funny things =)

    Joined:
    Sep 9, 2008
    Messages:
    892
    Likes Received:
    0
    If you need help testing then let me know.
    If you need someone to do a code review let me know as well; I'm pretty interested in the code anyway and I do have a couple of years of experience in the field :)
     
  4. Cronocious

    Cronocious Trialeer

    Joined:
    Mar 24, 2007
    Messages:
    831
    Likes Received:
    0
    ooo, yes please merl :D looked around so much for an addon that does that but the only one i found is broken and forces group loot instead of ML which is dumb lol
     
  5. Merlijn

    Merlijn Shadow Master

    Joined:
    Mar 11, 2009
    Messages:
    2,284
    Likes Received:
    57
    Tested and fine-tuned it tonight. It's "working" yet it seems that the holdtime for the message to be on the screen can't be adjusted atm. Tried multiple numbers yet it remains stubborn to be on your screen for 10 seconds which is imo way to long. Temporarily using the levelup sound btw but can change this to any in-game sound of wrap it up with some fancy wav file :)
     
  6. Merlijn

    Merlijn Shadow Master

    Joined:
    Mar 11, 2009
    Messages:
    2,284
    Likes Received:
    57
    Talked this over with a friend of mine tonight and seems really easy to make. Will see what I can do tomorrow.
     
  7. Merlijn

    Merlijn Shadow Master

    Joined:
    Mar 11, 2009
    Messages:
    2,284
    Likes Received:
    57
    Think it's done Crono. Needs testing tho to see if it works :)
     
  8. Cronocious

    Cronocious Trialeer

    Joined:
    Mar 24, 2007
    Messages:
    831
    Likes Received:
    0
  9. Merlijn

    Merlijn Shadow Master

    Joined:
    Mar 11, 2009
    Messages:
    2,284
    Likes Received:
    57
    What's the name of the addon you're using for this Joy? And what would you like to see changed?

    Can look into this when I'm done testing Crono's addon. Still waiting for a reply on my post I made on the blizz forums for the HoldTime on Croga's addon. If I'm not getting any then learn to live with it :p
     
  10. Tyche

    Tyche The Punisher

    Joined:
    Dec 30, 2008
    Messages:
    2,203
    Likes Received:
    107
    Auctioneer I think :p
     
  11. Arly

    Arly Non-Shouter

    Joined:
    Oct 3, 2007
    Messages:
    1,733
    Likes Received:
    0
    Or the one used to bid for items in raid? (Atleast was used when I raided)
     
  12. Merlijn

    Merlijn Shadow Master

    Joined:
    Mar 11, 2009
    Messages:
    2,284
    Likes Received:
    57
    Exactly. I assume Joy is referring to the one Arly is talking about but I don't know what it's called.
     
  13. Jazende

    Jazende Sacred vines, entangle the corrupted! Just contact Smaj, it's faster.

    Joined:
    May 12, 2008
    Messages:
    4,832
    Likes Received:
    236
    Lebuff has it aswell, ask him.
     
  14. Tyche

    Tyche The Punisher

    Joined:
    Dec 30, 2008
    Messages:
    2,203
    Likes Received:
    107
  15. Merlijn

    Merlijn Shadow Master

    Joined:
    Mar 11, 2009
    Messages:
    2,284
    Likes Received:
    57
    The addon "works" but the only problem atm is because the changing to ML and changing of quality to rare are called instantly after eachother the game forces it back to group loot causing the script to run again resulting in massive spam trying to change it.. Need to figure out how to make a delay in between these for a second or so and it'll work

    If anyone has Lua experience and knows how to make this delay easily feel free to give a shout.
     
  16. Arly

    Arly Non-Shouter

    Joined:
    Oct 3, 2007
    Messages:
    1,733
    Likes Received:
    0
    Sleep ? (Might have found an answer for some other game, looking into it now)

    Here is a thread about Sleep in lua scripts. (Not sure if there is any difference on lua scripting or if it is a standard)

    http://stackoverflow.com/questions/1034 .... ew-seconds
     
  17. Merlijn

    Merlijn Shadow Master

    Joined:
    Mar 11, 2009
    Messages:
    2,284
    Likes Received:
    57
    A regular "Sleep" as in C does not seem to exist in LUA unfortunately. Need to learn to understand this code a bit better before I want to simply copy/paste it hoping it'll work.
     
  18. Arly

    Arly Non-Shouter

    Joined:
    Oct 3, 2007
    Messages:
    1,733
    Likes Received:
    0
    If you check the link i posted it seems you can do win.Sleep(1000) (for 1 sec), or os.Sleep(millisec) did you test it?
     
  19. Merlijn

    Merlijn Shadow Master

    Joined:
    Mar 11, 2009
    Messages:
    2,284
    Likes Received:
    57
    Haven't tested them yet, will do that later tonight when I get back home but I'm guessing there won't work in the game since they're called win & os.. then again.. assumptions is.... you know :p
     
  20. Merlijn

    Merlijn Shadow Master

    Joined:
    Mar 11, 2009
    Messages:
    2,284
    Likes Received:
    57
    tried it and unfortunately doesn't work....

    separated the setting to ML and setting threshold now so that ML is set when you form the raid or become the RL and firing the threshold setting event to when the loot method is changed but will have to see if that works good enough and doesn't cause the same problem as before.