Teleporter Npc Script menu

Shout-Out

User Tag List

Results 1 to 3 of 3
  1. #1
    Deathsimon's Avatar Member
    Reputation
    1
    Join Date
    Apr 2009
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Teleporter Npc Script

    I modified the Teleporter Script by TmX... it seems all correct, world gives no errors, but ingame only the gossip of the npc works...
    Here is the code:
    Code:
    --------------------------------
    ------------BlazeFury-----------
    --------------------------------
    ------------Extreme-------------
    -----Too Extreme For Words------
    --------------------------------
    ---------Credits to TmX---------
    function TmXtele_OnGossipTalk(pUnit, event, player, pMisc)
    if (player:IsInCombat() == true) then
    player:SendAreaTriggerMessage("You Are In Combat!")
    else
    local race=player:GetPlayerRace()
    if race==1 or race==3 or race==4 or race==7 or race==11 then
    pUnit:GossipCreateMenu(3544, player, 0)
    
    pUnit:GossipMenuAddItem(0, "cFF0000FFAlliance Mall", 1, 0)
    pUnit:GossipMenuAddItem(2, "|cFF8B008BChilling Zone", 3, 0)
    pUnit:GossipMenuAddItem(0, "|cFFFFFFFFDonator Zone |r  |cFFFF0000[Requires Password]", 9, 1)
    pUnit:GossipMenuAddItem(2, "|cFF00FF00PvP Mall", 4, 0)
    pUnit:GossipMenuAddItem(2, "|cFFFF0000Gurubashi Arena", 5, 0)
    pUnit:GossipMenuAddItem(8, "|cFFFF7F50Buff Me", 10, 0)
    pUnit:GossipMenuAddItem(8, "|cFFF0F8FFHeal Me", 8, 0)
    pUnit:GossipMenuAddItem(8, "|cFF808080Reset My Talent Points", 7, 0)
    pUnit:GossipMenuAddItem(8, "|cFFFFFFFFRemove Resurrection Sickness", 6, 0)
    else
    pUnit:GossipCreateMenu(3544, player, 0)
    pUnit:GossipMenuAddItem(0, "|cFF8B008BHorde Mall", 2, 0)
    pUnit:GossipMenuAddItem(2, "|cFF8B008BChilling Zone", 3, 0)
    pUnit:GossipMenuAddItem(0, "|cFFFFFFFFDonator Zone |r  |cFFFF0000[Requires Password]", 9, 1)
    pUnit:GossipMenuAddItem(2, "|cFF00FF00PvP Mall", 4, 0)
    pUnit:GossipMenuAddItem(2, "|cFFFF0000Gurubashi Arena", 5, 0)
    pUnit:GossipMenuAddItem(8, "|cFFFF7F50Buff Me", 10, 0)
    pUnit:GossipMenuAddItem(8, "|cFFF0F8FFHeal Me", 8, 0)
    pUnit:GossipMenuAddItem(8, "|cFF808080Reset My Talent Points", 7, 0)
    pUnit:GossipMenuAddItem(8, "|cFFFFFFFFRemove Resurrection Sickness", 6, 0)
    pUnit:GossipSendMenu(player)
    end
    end
    
    function TmXtele_OnGossipSelect(pUnit, event, player, id, intid, code)
    if(intid == 1) then
    player:Teleport(0, -412.675476, 1544.823608, 17.271551)
    end
    end
    
    if(intid == 2) then
    player:Teleport(0, -11213.900391, 1768.729980, -29.880199)
    end
    
    if(intid == 3) then
    player:Teleport(1, -10730.184570, 2476.284180, 7.344282)
    end
    
    if (intid == 9) and
    (Code == "11546712") then -- You should change this code.
    player:Teleport(1, 16201.643555, 16211.781250, 1.057879)
    player:GossipComplete()
    elseif
    Code ~= nil then 
    player:SendAreaTriggerMessage("|cFFFF0000Incorrect Password!")
    player:GossipComplete()
    end
    
    if(intid == 4) then
    player:Teleport(571, 3976.618408, -3786.644775, 221.291138)
    end
    
    if(intid == 5) then
    player:Teleport(0, -13255.262695, 189.721237, 31.602915)
    end
    
    if (intid == 4) then
    Unit:CastSpellOnTarget(25898, player)
    Unit:CastSpellOnTarget(48102, player)
    Unit:CastSpellOnTarget(58449, player)
    Unit:CastSpellOnTarget(48469, player)
    Unit:CastSpellOnTarget(58451, player)
    Unit:CastSpellOnTarget(58453, player)
    Unit:CastSpellOnTarget(48073, player)
    player:GossipComplete()
    
    if(intid == 8) then
    player:CastSpell(37455)
    end
    
    if(intid == 7) then
    player:ResetTalents()
    pUnit:SendChatMessage(12, 0, "Your Talent Points Have Been Reseted!")
    pUnit:GossipComplete(player)
    end
    
    if(intid == 6) then
    player:LearnSpell(15007)
    player:UnlearnSpell(15007)
    player:GossipComplete()
    end
    end
    
    RegisterUnitGossipEvent(75001, 1, "TmXtele_OnGossipTalk")
    RegisterUnitGossipEvent(75001, 2, "TmXtele_OnGossipSelect")
    end

    Teleporter Npc Script
  2. #2
    mager1794's Avatar Member
    Reputation
    356
    Join Date
    Feb 2008
    Posts
    703
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well this should work, Im heavily surprised that this got past the loading and it got past my Lunar Scriptor Parser. But here ya go


    For future reference, 9/10 times you can solve an error in Lua if you just properly format your code to where you are actually able to read it.

    Code:
    --------------------------------
    ------------BlazeFury-----------
    --------------------------------
    ------------Extreme-------------
    -----Too Extreme For Words------
    --------------------------------
    ---------Credits to TmX---------
    function TmXtele_OnGossipTalk(pUnit, event, player, pMisc)
        if (player:IsInCombat() == true) then
            player:SendAreaTriggerMessage("You Are In Combat!")
        else
            local race=player:GetPlayerRace()
            if race==1 or race==3 or race==4 or race==7 or race==11 then
                pUnit:GossipCreateMenu(3544, player, 0)
    
                pUnit:GossipMenuAddItem(0, "cFF0000FFAlliance Mall", 1, 0)
                pUnit:GossipMenuAddItem(2, "|cFF8B008BChilling Zone", 3, 0)
                pUnit:GossipMenuAddItem(0, "|cFFFFFFFFDonator Zone |r  |cFFFF0000[Requires Password]", 9, 1)
                pUnit:GossipMenuAddItem(2, "|cFF00FF00PvP Mall", 4, 0)
                pUnit:GossipMenuAddItem(2, "|cFFFF0000Gurubashi Arena", 5, 0)
                pUnit:GossipMenuAddItem(8, "|cFFFF7F50Buff Me", 10, 0)
                pUnit:GossipMenuAddItem(8, "|cFFF0F8FFHeal Me", 8, 0)
                pUnit:GossipMenuAddItem(8, "|cFF808080Reset My Talent Points", 7, 0)
                pUnit:GossipMenuAddItem(8, "|cFFFFFFFFRemove Resurrection Sickness", 6, 0)
            else
                pUnit:GossipCreateMenu(3544, player, 0)
                pUnit:GossipMenuAddItem(0, "|cFF8B008BHorde Mall", 2, 0)
                pUnit:GossipMenuAddItem(2, "|cFF8B008BChilling Zone", 3, 0)
                pUnit:GossipMenuAddItem(0, "|cFFFFFFFFDonator Zone |r  |cFFFF0000[Requires Password]", 9, 1)
                pUnit:GossipMenuAddItem(2, "|cFF00FF00PvP Mall", 4, 0)
                pUnit:GossipMenuAddItem(2, "|cFFFF0000Gurubashi Arena", 5, 0)
                pUnit:GossipMenuAddItem(8, "|cFFFF7F50Buff Me", 10, 0)
                pUnit:GossipMenuAddItem(8, "|cFFF0F8FFHeal Me", 8, 0)
                pUnit:GossipMenuAddItem(8, "|cFF808080Reset My Talent Points", 7, 0)
                pUnit:GossipMenuAddItem(8, "|cFFFFFFFFRemove Resurrection Sickness", 6, 0)
                pUnit:GossipSendMenu(player)
            end
        end
    end
    
    function TmXtele_OnGossipSelect(pUnit, event, player, id, intid, code)
        
        if(intid == 1) then
            player:Teleport(0, -412.675476, 1544.823608, 17.271551)
        end
    
        if(intid == 2) then
            player:Teleport(0, -11213.900391, 1768.729980, -29.880199)
        end
        
    
        if(intid == 3) then
            player:Teleport(1, -10730.184570, 2476.284180, 7.344282)
        end
        
    
        if (intid == 9) and
        (Code == "11546712") then -- You should change this code.
            player:Teleport(1, 16201.643555, 16211.781250, 1.057879)
            player:GossipComplete()
        elseif
            Code ~= nil then 
            player:SendAreaTriggerMessage("|cFFFF0000Incorrect Password!")
            player:GossipComplete()
        end
        
    
        if(intid == 4) then
            player:Teleport(571, 3976.618408, -3786.644775, 221.291138)
        end
    
        
        if(intid == 5) then
            player:Teleport(0, -13255.262695, 189.721237, 31.602915)
        end
    
        
        if (intid == 4) then
            Unit:CastSpellOnTarget(25898, player)
            Unit:CastSpellOnTarget(48102, player)
            Unit:CastSpellOnTarget(58449, player)
            Unit:CastSpellOnTarget(48469, player)
            Unit:CastSpellOnTarget(58451, player)
            Unit:CastSpellOnTarget(58453, player)
            Unit:CastSpellOnTarget(48073, player)
            player:GossipComplete()
        end
    
        
        if(intid == 8) then
            player:CastSpell(37455)
        end
    
        
        if(intid == 7) then
            player:ResetTalents()
            pUnit:SendChatMessage(12, 0, "Your Talent Points Have Been Reseted!")
            pUnit:GossipComplete(player)
        end
    
        
        if(intid == 6) then
            player:LearnSpell(15007)
            player:UnlearnSpell(15007)
            player:GossipComplete()
        end
        
    end
    
    RegisterUnitGossipEvent(75001, 1, "TmXtele_OnGossipTalk")
    RegisterUnitGossipEvent(75001, 2, "TmXtele_OnGossipSelect")
    Lunar Gaming - Reaching For The Stars

  3. #3
    Deathsimon's Avatar Member
    Reputation
    1
    Join Date
    Apr 2009
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hm... it still doesn't work.. now i can speak with him but nothing comes out, not even the "hey how can i help you..." gossip...

Similar Threads

  1. ...::::WoW teleporter NPC + Script::::...
    By Freakstorm in forum WoW EMU General Releases
    Replies: 5
    Last Post: 01-22-2009, 05:52 PM
  2. Will this teleporter npc lua script work?
    By Bapes in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 05-22-2008, 11:50 AM
  3. Teleport npc script?
    By Summer in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 02-15-2008, 07:06 AM
All times are GMT -5. The time now is 09:24 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