Gentlemens Club Gambler Addon

Discussion in 'Public Board' started by Myrx, Feb 14, 2008.

  1. I already tried this, after your first Post, but it didn't work... don't know why [EDIT: I only changed the "rolls" in the "junk" part. Should this be enought, or do I have to modify other lines as well?]

    Maybe you are not allowed to write "." or ":" in this Script ?!? I'm not really familiar with Javaso I just can guess

    But the Screenshot is uploaded down in the Post :)
     

    Attached Files:

  2. Myrx

    Myrx Guild Member

    Let's try this. My version of GCG is very out of date, but assuming these two lines are still at the top of the ParseRoll function:
    Code:
    local player, junk, roll, range = strsplit(" ", temp1);
    if junk == "rolls" and GCGambler_Check(player)==1 then
    You could try changing them to:
    Code:
    local player, junk1, junk2, roll, range = strsplit(" ", temp1);
    if junk1 == "w├╝rfelt." and GCGambler_Check(player)==1 then
    Also, it's not Java it's Lua. :)
     
  3. ah ok ^^ See, I'm a noob in programming xD

    But, this Method totaly worked :)

    Thanks a lot for your help!!

    Tonight's Raid is going to be fun ^^
     
  4. Myrx

    Myrx Guild Member

    Please mail me 10% of everything you earn, thanks.
     
  5. Hey, i have the same problem, when i clic on ''New Game'' and Everyones say ''1'', nothing happens , last call and roll are grey :(
    I'm playing with a french version (wow).

    Thx !
     
  6. Myrx

    Myrx Guild Member

    It's programmed in English. I have no way of knowing what the heck a roll looks like in any other version. Please post a screenshot of a roll, and the exact text of the roll so that I may copy and paste it.
     
  7. Myrx

    Myrx Guild Member

    Change this:
    Code:
    local player, junk, roll, range = strsplit(" ", temp1);
    if junk == "rolls" and GCGambler_Check(player)==1 then
    To this:
    Code:
    local player, junk1, junk2, roll, range = strsplit(" ", temp1);
    if junk1 == "obtient" and GCGambler_Check(player)==1 then
     
  8. Myrx

    Myrx Guild Member

    After you update the code and save it, in game you need to reload the UI.
     
  9. Myrx

    Myrx Guild Member

    Code:
    function GCGambler_Add(name)
        if (name ~= nil or name ~= "") then
            local found = 0;
            for i=1, table.getn(GCGambler.strings) do
                  if GCGambler.strings[i] == name then
                found = 1;
                --local string3 = strjoin(" ", "[GCG]", tostring(name),"was already found in the database.")
                --SendChatMessage(string3,"CHANNEL",GetDefaultLanguage("player"),"6");
                end
                end
            if found == 0 then
                      table.insert(GCGambler.strings, name)
                totalrolls = totalrolls+1
                --local string3 = strjoin(" ", "[GCG]", GCGambler.strings[table.getn(GCGambler.strings)],"has been added to the database.")
                --SendChatMessage(string3,"CHANNEL",GetDefaultLanguage("player"),"6");
            end
        end
    end
    In this function get rid of the -- from the 4 lines that have it, try it again, and let me see what information displays. Note, you will need to be in a channel 6 for this to work as it will output the data to whatever channel 6 is for you.

    Since I can't see what's going on directly, I am assuming that it is for some reason not accepting the 1's that are typed in to raid chat. It is the act of typing 1 in raid by two different people that enables the Last Call button.
     
  10. function GCGambler_Add(name)
    if (name ~= nil or name ~= "") then
    local found = 0;
    for i=1, table.getn(GCGambler.strings) do
    if GCGambler.strings == name then
    found = 1;
    local string3 = strjoin(" ", "[GCG]", tostring(name),"was already found in the database.")
    SendChatMessage(string3,"CHANNEL",GetDefaultLanguage("player"),"6");
    end
    end
    if found == 0 then
    table.insert(GCGambler.strings, name)
    totalrolls = totalrolls+1
    local string3 = strjoin(" ", "[GCG]", GCGambler.strings[table.getn(GCGambler.strings)],"has been added to the database.")
    SendChatMessage(string3,"CHANNEL",GetDefaultLanguage("player"),"6");
    end
    end
    end


    Now i have this, but what is chanel 6 ? :s
     
  11. Myrx

    Myrx Guild Member

    When you join a channel like '/join GCGTest' it gives that channel a number like [6. GCGTest]. You can see your current channels with /chatlist. If you don't have one for 6 then you need to just join random channel names until you get a channel 6.
     
  12. Myrx

    Myrx Guild Member

    Lol, okay. Not sure what I did but I'm glad it works.
     
  13. If I were to change the 6 to what ever channel I want then the add-on will only record '1's from that channel? or how would I go about doing that?

    Edit: let me rephrase that, I now know the commented lines are for debugging purposes, So how can I change it to only broadcast to a specific channel and take 1's from that channel

    Also, I know that this only works for people in the raid/party group because thats the only way to see the roll... But we don't want to 1's spamming the raid channel.
     
  14. Myrx

    Myrx Guild Member

    The OnEvent area parses when people type in raid chat. You would have to add an event for the user channels, and look there for 1's as well. That function is where you'll want to look first though. There are other information messages that are output to the raid channel as well. You would eventually need to change those to the format on the debugger lines that output to channel 6.
     
  15. Thanks, I should be able to run through the whole thing knowing this and change the necessary line's.
     
  16. Message: Interface\AddOns\GCGambler\GCGambler.lua:39: attempt to index global 'this' (a nil value)
    Time: 04/16/12 19:11:03
    Count: 1
    Stack: Interface\AddOns\GCGambler\GCGambler.lua:39: in function `GCGambler_OnLoad'
    [string "*:OnLoad"]:1: in function <[string "*:OnLoad"]:1>

    Locals: (*temporary) = nil
    (*temporary) = nil
    (*temporary) = <unnamed> {
    0 = <userdata>
    }
    (*temporary) = "attempt to index global 'this' (a nil value)"
    GCGambler = <table> {
    hightie = <table> {
    }
    strings = <table> {
    }
    lowtie = <table> {
    }
    active = 1
    }
    i get this error for some reason, it wont let me click the last call button at all so all i can get to is the Accept Ones button....can someone please help me thanks :)