Conflicting Lua files menu

User Tag List

Results 1 to 6 of 6
  1. #1
    LJN's Avatar Member
    Reputation
    273
    Join Date
    Jun 2007
    Posts
    731
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Conflicting Lua files

    Fixed But still if you can please remove the back button for Repx4


    Of course Rep will be given out


    Also if you can take out the <----back button I will +Repx4


    Code:
    --*****************************************
    --*TeleNPC script by Neccta v1.0			*
    --*        Nightmare						*
    --*	PIE*
    --*	For mmowned*
    --*	Please geif credits		*
    --*****************************************
    
    
    local menunum = 33310
    local menuicon = 4
    local teleicon = 2
    local menu =
    {
        {"Mall Locations",
            {
                {"Weapons, Rings, Etc", 0, -5384.63, -2962.41, 322.058},
                {"Traniers", 0, -5390.7, -3015.27, 327.581},
                {"BattleMasters", 0, -5320.54, -2938.69, 334.091},
                {"Arena Vendors", 0, -5297.42, -2985.02, 340.631},
            }
        },
    }
     
    function TeleNPC_MainMenu(Unit, Player)
        local i = 0
        Unit:GossipCreateMenu(menunum, Player, 0)
        for k,v in pairs(menu) do
            i = i + 1
            if type(v[2]) == "table" then
                Unit:GossipMenuAddItem(menuicon, v[1], i, 0)
                i = i + #(v[2])
            else
                Unit:GossipMenuAddItem(teleicon, v[1], i, 0)
            end
        end
        Unit:GossipSendMenu(Player)
    end
    function TeleNPC_SubMenu(Unit, Player, i, Submenu)
        Unit:GossipCreateMenu(menunum-i, Player, 0)
        Unit:GossipMenuAddItem(7, "<--Back", 0, 0)
        for k,v in pairs(Submenu) do
            i = i + 1
            Unit:GossipMenuAddItem(teleicon, v[1], i, 0)
        end
        Unit:GossipSendMenu(Player)
    end
    function TeleNPC_OnGossipTalk(Unit, Event, Player)
        TeleNPC_MainMenu(Unit, Player)
    end
    function TeleNPC_OnGossipSelect(Unit, Event, Player, MenuId, Id, Code)
        local i = 0
        if(Id == 0) then
            TeleNPC_MainMenu(Unit,Player)
        else
            for k,v in pairs(menu) do
                i = i + 1
                if (Id == i) then
                    if type(v[2]) == "table" then
                        TeleNPC_SubMenu(Unit, Player, i, v[2])
                    else
                        if Player:IsInCombat() then
                            Unit:SendChatMessage(12, 0, "You can't teleport while in combat!")
                        else
                            Player:Teleport(v[2], v[3], v[4], v[5])
                        end
                        Unit:GossipComplete(Player)
                    end
                    return
                elseif (type(v[2]) == "table") then
                    for j,w in pairs(v[2]) do
                        i = i + 1
                        if (Id == i) then
                            if Player:IsInCombat() then
                                Unit:SendChatMessage(12, 0, "You can't teleport while in combat!")
                            else
                                Player:Teleport(w[2], w[3], w[4], w[5])
                            end
                            Unit:GossipComplete(Player)
                            return
                        end
                    end
                end
            end
        end
    end
    RegisterUnitGossipEvent(633200, 1, "TeleNPC_OnGossipTalk")
    RegisterUnitGossipEvent(633200, 2, "TeleNPC_OnGossipSelect")

    Code:
    --*****************************************
    --*TeleNPC script by Neccta v1.0			*
    --*        Nightmare						*
    --*	PIE*
    --*	For mmowned*
    --*	Please geif credits		*
    --*****************************************
    
    
    local menunum = 33310
    local menuicon = 4
    local teleicon = 2
    local menu =
    {
        {"Mall Locations",
            {
                {"Weapons, Rings, Etc", 0, -10492.3, -3254.72, 21.0304},
                {"Traniers", 0, -10481.7, -3212.13, 20.2697},
                {"BattleMasters", 0, -10458.9, -3316.27, 20.9647},
                {"Arena Vendors", 0, -10413.1, -3261.81, 20.1783},
            }
        },
    }
     
    function TeleNPC_MainMenu(Unit, Player)
        local i = 0
        Unit:GossipCreateMenu(menunum, Player, 0)
        for k,v in pairs(menu) do
            i = i + 1
            if type(v[2]) == "table" then
                Unit:GossipMenuAddItem(menuicon, v[1], i, 0)
                i = i + #(v[2])
            else
                Unit:GossipMenuAddItem(teleicon, v[1], i, 0)
            end
        end
        Unit:GossipSendMenu(Player)
    end
    function TeleNPC_SubMenu(Unit, Player, i, Submenu)
        Unit:GossipCreateMenu(menunum-i, Player, 0)
        Unit:GossipMenuAddItem(7, "<--Back", 0, 0)
        for k,v in pairs(Submenu) do
            i = i + 1
            Unit:GossipMenuAddItem(teleicon, v[1], i, 0)
        end
        Unit:GossipSendMenu(Player)
    end
    function TeleNPC_OnGossipTalk(Unit, Event, Player)
        TeleNPC_MainMenu(Unit, Player)
    end
    function TeleNPC_OnGossipSelect(Unit, Event, Player, MenuId, Id, Code)
        local i = 0
        if(Id == 0) then
            TeleNPC_MainMenu(Unit,Player)
        else
            for k,v in pairs(menu) do
                i = i + 1
                if (Id == i) then
                    if type(v[2]) == "table" then
                        TeleNPC_SubMenu(Unit, Player, i, v[2])
                    else
                        if Player:IsInCombat() then
                            Unit:SendChatMessage(12, 0, "You can't teleport while in combat!")
                        else
                            Player:Teleport(v[2], v[3], v[4], v[5])
                        end
                        Unit:GossipComplete(Player)
                    end
                    return
                elseif (type(v[2]) == "table") then
                    for j,w in pairs(v[2]) do
                        i = i + 1
                        if (Id == i) then
                            if Player:IsInCombat() then
                                Unit:SendChatMessage(12, 0, "You can't teleport while in combat!")
                            else
                                Player:Teleport(w[2], w[3], w[4], w[5])
                            end
                            Unit:GossipComplete(Player)
                            return
                        end
                    end
                end
            end
        end
    end
    RegisterUnitGossipEvent(63320, 1, "TeleNPC_OnGossipTalk")
    RegisterUnitGossipEvent(63320, 2, "TeleNPC_OnGossipSelect")
    Last edited by LJN; 09-27-2008 at 10:42 PM.
    ahhhh

    Conflicting Lua files
  2. #2
    Pretzal's Avatar Member
    Reputation
    8
    Join Date
    Aug 2008
    Posts
    57
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is a stab in the dark; but I think it would be that both the events are named the same in differant lua files, so pretty much, change TeleNPC in all cases in ONE of the files (register event part and the actual event part) to anything else (they must be the same though)

    This renames the events i believe although I am no expert.

    EDIT: Although i've never seen a lua teleporter as complex looking as this one; i believe the working should be the same.

  3. #3
    LJN's Avatar Member
    Reputation
    273
    Join Date
    Jun 2007
    Posts
    731
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright Thanks man!

    +repx2


    Don't know why I didn't think about that

    Removing <-----Back button still up for grabs
    ahhhh

  4. #4
    Sounddead's Avatar Contributor
    Reputation
    160
    Join Date
    Sep 2007
    Posts
    1,126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    --*****************************************
    --*TeleNPC script by Neccta v1.0			*
    --*        Nightmare						*
    --*	PIE*
    --*	For mmowned*
    --*	Please geif credits		*
    --*****************************************
    
    
    local menunum = 33310
    local menuicon = 4
    local teleicon = 2
    local menu =
    {
        {"Mall Locations",
            {
                {"Weapons, Rings, Etc", 0, -10492.3, -3254.72, 21.0304},
                {"Traniers", 0, -10481.7, -3212.13, 20.2697},
                {"BattleMasters", 0, -10458.9, -3316.27, 20.9647},
                {"Arena Vendors", 0, -10413.1, -3261.81, 20.1783},
            }
        },
    }
     
    function TeleNPC_MainMenu(Unit, Player)
        local i = 0
        Unit:GossipCreateMenu(menunum, Player, 0)
        for k,v in pairs(menu) do
            i = i + 1
            if type(v[2]) == "table" then
                Unit:GossipMenuAddItem(menuicon, v[1], i, 0)
                i = i + #(v[2])
            else
                Unit:GossipMenuAddItem(teleicon, v[1], i, 0)
            end
        end
        Unit:GossipSendMenu(Player)
    end
    
    function TeleNPC_OnGossipTalk(Unit, Event, Player)
        TeleNPC_MainMenu(Unit, Player)
    end
    function TeleNPC_OnGossipSelect(Unit, Event, Player, MenuId, Id, Code)
        local i = 0
        if(Id == 0) then
            TeleNPC_MainMenu(Unit,Player)
        else
            for k,v in pairs(menu) do
                i = i + 1
                if (Id == i) then
                    if type(v[2]) == "table" then
                        TeleNPC_SubMenu(Unit, Player, i, v[2])
                    else
                        if Player:IsInCombat() then
                            Unit:SendChatMessage(12, 0, "You can't teleport while in combat!")
                        else
                            Player:Teleport(v[2], v[3], v[4], v[5])
                        end
                        Unit:GossipComplete(Player)
                    end
                    return
                elseif (type(v[2]) == "table") then
                    for j,w in pairs(v[2]) do
                        i = i + 1
                        if (Id == i) then
                            if Player:IsInCombat() then
                                Unit:SendChatMessage(12, 0, "You can't teleport while in combat!")
                            else
                                Player:Teleport(w[2], w[3], w[4], w[5])
                            end
                            Unit:GossipComplete(Player)
                            return
                        end
                    end
                end
            end
        end
    end
    RegisterUnitGossipEvent(63320, 1, "TeleNPC_OnGossipTalk")
    RegisterUnitGossipEvent(63320, 2, "TeleNPC_OnGossipSelect")
    Not tested. Just something I would think would work. I duno though, try it I guess

    or maybe this

    Code:
    --*****************************************
    --*TeleNPC script by Neccta v1.0			*
    --*        Nightmare						*
    --*	PIE*
    --*	For mmowned*
    --*	Please geif credits		*
    --*****************************************
    
    
    local menunum = 33310
    local menuicon = 4
    local teleicon = 2
    local menu =
    {
        {"Mall Locations",
            {
                {"Weapons, Rings, Etc", 0, -5384.63, -2962.41, 322.058},
                {"Traniers", 0, -5390.7, -3015.27, 327.581},
                {"BattleMasters", 0, -5320.54, -2938.69, 334.091},
                {"Arena Vendors", 0, -5297.42, -2985.02, 340.631},
            }
        },
    }
     
    function TeleNPC_MainMenu(Unit, Player)
        local i = 0
        Unit:GossipCreateMenu(menunum, Player, 0)
        for k,v in pairs(menu) do
            i = i + 1
            if type(v[2]) == "table" then
                Unit:GossipMenuAddItem(menuicon, v[1], i, 0)
                i = i + #(v[2])
            else
                Unit:GossipMenuAddItem(teleicon, v[1], i, 0)
            end
        end
        Unit:GossipSendMenu(Player)
    end
    function TeleNPC_SubMenu(Unit, Player, i, Submenu)
        Unit:GossipCreateMenu(menunum-i, Player, 0)
        for k,v in pairs(Submenu) do
            i = i + 1
            Unit:GossipMenuAddItem(teleicon, v[1], i, 0)
        end
        Unit:GossipSendMenu(Player)
    end
    function TeleNPC_OnGossipTalk(Unit, Event, Player)
        TeleNPC_MainMenu(Unit, Player)
    end
    function TeleNPC_OnGossipSelect(Unit, Event, Player, MenuId, Id, Code)
        local i = 0
        if(Id == 0) then
            TeleNPC_MainMenu(Unit,Player)
        else
            for k,v in pairs(menu) do
                i = i + 1
                if (Id == i) then
                    if type(v[2]) == "table" then
                        TeleNPC_SubMenu(Unit, Player, i, v[2])
                    else
                        if Player:IsInCombat() then
                            Unit:SendChatMessage(12, 0, "You can't teleport while in combat!")
                        else
                            Player:Teleport(v[2], v[3], v[4], v[5])
                        end
                        Unit:GossipComplete(Player)
                    end
                    return
                elseif (type(v[2]) == "table") then
                    for j,w in pairs(v[2]) do
                        i = i + 1
                        if (Id == i) then
                            if Player:IsInCombat() then
                                Unit:SendChatMessage(12, 0, "You can't teleport while in combat!")
                            else
                                Player:Teleport(w[2], w[3], w[4], w[5])
                            end
                            Unit:GossipComplete(Player)
                            return
                        end
                    end
                end
            end
        end
    end
    RegisterUnitGossipEvent(633200, 1, "TeleNPC_OnGossipTalk")
    RegisterUnitGossipEvent(633200, 2, "TeleNPC_OnGossipSelect")
    Idk, just off of the top of my head. Test em out :P
    Last edited by Sounddead; 09-27-2008 at 10:56 PM.

  5. #5
    Misorize's Avatar Member
    Reputation
    1
    Join Date
    Sep 2008
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you the Nightmare from Nameless. D:

  6. #6
    LJN's Avatar Member
    Reputation
    273
    Join Date
    Jun 2007
    Posts
    731
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome it worked!

    +repx4


    Will rep the next 2 tomorrow
    ahhhh

Similar Threads

  1. [HELP] Were can i find the latest LUA files??
    By emil94 in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 07-07-2008, 05:42 AM
  2. How would I get updated LUA files?
    By mafiaboy in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 07-07-2008, 12:59 AM
  3. [Release] Moon++ LUA Files
    By SectorSeven in forum World of Warcraft Emulator Servers
    Replies: 16
    Last Post: 03-15-2008, 01:03 PM
  4. [Question] About lua files...
    By Ellenor in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 02-15-2008, 06:26 PM
All times are GMT -5. The time now is 10:27 PM. 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