help with addon menu

User Tag List

Results 1 to 3 of 3
  1. #1
    Silentnvd's Avatar Member
    Reputation
    49
    Join Date
    Jan 2008
    Posts
    295
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    help with addon

    could someone please make this work With Ascent when i close the Ticket panel it shows GM list it should Block whispers will +Rep and give credits when Addon is Released

    Code:
    --Object Globals
    local Names = {};
    local Types = {};
    local Views = {};
    local Prev;
    local Next;
    
    --Cache vars
    local Tickets = {};
    local TicketNames = {};
    local LastIndex= -1;
    
    --Other
    local CurrentPage = 0;
    TicketChannel = "gm_sync_channel";
    TT_Get = false;
    TT_Name = nil;
    local PageCount;
    local Alert = false;
    
    --Misc.
    local TicketTypes = {};
    TicketTypes[0]="Stuck"; --135681
    TicketTypes[1]="Harassment"; --135682
    TicketTypes[2]="Guild"; --135683
    TicketTypes[3]="Item"; --135684
    TicketTypes[4]="Environment"; --135685
    TicketTypes[5]="NPC"; --135686
    TicketTypes[6]="Quest"; --135687
    TicketTypes[7]="--Unused--"; --Unused
    TicketTypes[8]="--Unused--"; --Unused
    TicketTypes[9]="Character"; --135690 !!!
    
    local function Clear()
        for i=0,14 do
            Names[i]:Clear();
            Types[i]:Clear();
            Views[i]:Hide();
        end
    end
    
    local function GotoPage(id)
        begin = id*15;
        finish = begin+14;
        Clear();
        for i=begin,finish do
            if Tickets[i] ~= nil then
                Names[i-begin]:AddMessage(Tickets[i].Name);
                Types[i-begin]:AddMessage(Tickets[i].Category);
                Views[i-begin]:Show();
            end
        end
        Prev:Enable();
        Next:Enable();
        if begin <= 0 then
            Prev:Disable();
        end
        if finish > LastIndex then
            Next:Disable();
        end
        CurrentPage = id;
        TicketTrackerPanel1Bar:Clear();
        TicketTrackerPanel1Bar:AddMessage(""..(CurrentPage+1).." / "..PageCount);
    end
    
    
    
    local function Refresh()
        Tickets={};
        TicketNames={};
        LastIndex=-1;
        Clear();
    end
    
    
    
    local function Reticket()
        SendChatMessage("!gmTicket get","GUILD");
    end
    
    function TT_Refresh()
        Refresh();
        Reticket();
    end
    
    local function AddTicket(name,category)
        if TicketNames[name] == nil then
            LastIndex = LastIndex+1;
            Tickets[LastIndex] = {Name=name,Category=category};
            TicketNames[name] = LastIndex;
            PageCount = math.ceil(LastIndex/15);
        else
        end
    end
    
    function TT_Delete(name)
        SendChatMessage("!gmTicket del "..name,"GUILD");
        Refresh();
        Reticket();
    end
    
    --Set up to receive ticket info.
    local ORIG_ChatFrame_MessageEventHandler = ChatFrame_MessageEventHandler;
    function ChatFrame_MessageEventHandler(event)
        if event == "CHAT_MSG_CHANNEL" and arg9 == TicketChannel then
            junk,msg = strsplit(" ",arg1);
            args = {strsplit(",",msg)};
            if args[1] == "2" and arg2 == PlayerName:GetText() then
                Refresh();
            elseif args[1] == "5" then
                if Alert == false then
                    UIErrorsFrame:AddMessage("New Ticket");
                    Alert = true;
                end
                Refresh();
                Reticket();
            elseif args[1] == "0" and args[5] ~= "0" and arg2 == PlayerName:GetText() then
                AddTicket(args[2],TicketTypes[args[4]-135681],0);
                GotoPage(CurrentPage);
            elseif args[1] == "3" and arg2 == PlayerName:GetText() and TT_Get == true then
                TT_Get = false;
                TT_Name = args[2];
                len = string.len(args[2])+13;
                TicketViewPanel1Message:AddMessage("|Hplayer:"..args[2].."|h["..args[2].."]|h: "..string.sub(arg1,len));
            end
        else
            ORIG_ChatFrame_MessageEventHandler(event);
        end
    end
    
    function TT_Page(up)
        if up==true then
            GotoPage(CurrentPage+1);
        else
            GotoPage(CurrentPage-1);
        end
        PlaySound("INTERFACESOUND_CHARWINDOWTAB");
    end
    
    function TT_Click(index)
        TT_Get = true;
        TicketViewPanel1Message:Clear();
        SendChatMessage("!gmTicket getid "..Tickets[(CurrentPage*15)+index].Name);
        SendChatMessage("!allowwhispers "..Tickets[(CurrentPage*15)+index].Name);
        TicketTracker:Hide();
        TicketView:Show();
        PlaySound("QUESTLOGOPEN");
    end
    
    local function Setup()
        for i=0,14 do
            Names[i] = getglobal("TicketTrackerPanel1Component"..i);
        end
        for i=15,29 do
            Types[i-15] = getglobal("TicketTrackerPanel1Component"..i);
        end
        for i=30,44 do
            Views[i-30] = getglobal("TicketTrackerPanel1Component"..i);
            Views[i-30]:Hide();
        end
        Prev = TicketTrackerPanel1Prev;
        Next = TicketTrackerPanel1Next;
        Prev:Disable();
        Next:Disable();
    
    end
    
    function TT_JoinChannel()
    --[[    JoinChannelByName(TicketChannel,"",ChatFrame1:GetID());
        TicketTrackerEdit:SetText(TicketChannel);
        Refresh();
        Reticket();]]
    end
    
    function TT_LeaveChannel()
        LeaveChannelByName(TicketChannel);
    end
    
    function TT_Setup(event)
        if event == "VARIABLES_LOADED" then
            Setup();
        elseif event == "PLAYER_LEAVING_WORLD" or event == "PLAYER_LOGOUT" then
            --TT_LeaveChannel();
        elseif event == "PLAYER_LOGIN" then
            TT_JoinChannel();
        end
    end
    
    function TT_Show()
        TicketTracker:Show();
        PlaySound("INTERFACESOUND_CHARWINDOWOPEN");
        Alert = false;
    end
    
    function TT_SetChannel(msg)
        TT_LeaveChannel();
        TicketChannel=msg;
        ReloadUI();
    end
    
    
    TicketTrackerPanel1Bar:AddMessage("1 / 1");
    SlashCmdList["TICKETTRACKER"] = TT_Show;
    SLASH_TICKETTRACKER1="/tt";
    SlashCmdList["TICKETCHANNEL"] = TT_SetChannel;
    SLASH_TICKETCHANNEL1="/ticketchannel";
    TicketTracker:RegisterEvent("VARIABLES_LOADED");
    TicketTracker:RegisterEvent("PLAYER_LEAVING_WORLD");
    TicketTracker:RegisterEvent("PLAYER_LOGOUT");
    TicketTracker:RegisterEvent("PLAYER_LOGIN");
    TicketTracker:Hide();

    help with addon
  2. #2
    Vindicated's Avatar Contributor
    Reputation
    226
    Join Date
    Aug 2008
    Posts
    1,067
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This looks just like TicketTracker by 1337d00d... you can't release it >.>


  3. #3
    Silentnvd's Avatar Member
    Reputation
    49
    Join Date
    Jan 2008
    Posts
    295
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i know im going to give credits to everyone who made it but i edited it it was originally for Arcemu

Similar Threads

  1. Help with addon kick
    By deltoide in forum WoW UI, Macros and Talent Specs
    Replies: 4
    Last Post: 01-06-2012, 11:52 AM
  2. [Misc] Need help with an addon on a vanilla wow server
    By Miniwater in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 06-27-2010, 10:12 AM
  3. Need help with addons :(
    By balmug19 in forum WoW UI, Macros and Talent Specs
    Replies: 5
    Last Post: 03-14-2009, 10:12 PM
  4. i need help with addons plz
    By Dajoker in forum World of Warcraft General
    Replies: 10
    Last Post: 03-13-2007, 11:49 AM
  5. Uhmm help with addons pleasr
    By prinz in forum Community Chat
    Replies: 1
    Last Post: 02-11-2007, 07:42 PM
All times are GMT -5. The time now is 09:15 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search