[Lua] [WarpNPC] [Help!] [xD]

Results 1 to 3 of 3
  1. #1
    Account Upgraded | Title Enabled! trunks94 is offline
    MemberRank
    Dec 2007 Join Date
    Finland, OuluLocation
    393Posts

    [Lua] [WarpNPC] [Help!] [xD]

    Well i made lua warpnpc, and everything is working.
    But when i go into game and i talk to him..Works fine untill i try to go to Eastern Kingdom zones, includes SW, IF, Silvermoon, UD...etc..
    It don't go there but every Kalimdor location it will go..
    I posted this because none didn't know the answer ;S
    Here is my file:
    Code:
    local npcid = 400000
    
    function Menu_OnGossipTalk(pUnit, event, player, pMisc)
    if (player:IsInCombat() == true) then
        player:SendAreaTriggerMessage("You are in combat!")
    else
        pUnit:GossipCreateMenu(3543, player, 0)
        pUnit:GossipMenuAddItem(0, "Teleport Menu", 3, 0)
        pUnit:GossipMenuAddItem(0, "Weapon and Armor Skills", 5, 0)
        pUnit:GossipMenuAddItem(0, "All Class Spells", 101, 0)
        pUnit:GossipMenuAddItem(2, "Remove Resurrection Sickness", 99, 0)
        pUnit:GossipSendMenu(player)
    end
    end
    
    function NPC_OnGossip_select(pUnit, event, player, id, intid, code)
    if(intid == 3) then
        pUnit:GossipCreateMenu(3543, player, 0)
        pUnit:GossipMenuAddItem(0, "Alliance Cities", 12, 0)
        pUnit:GossipMenuAddItem(0, "Horde Cities", 13, 0)
        pUnit:GossipMenuAddItem(0, "Azeroth Instances", 14, 0)
        pUnit:GossipMenuAddItem(0, "Outland Instances", 15, 0)
        pUnit:GossipMenuAddItem(0, "Azeroth Raids", 16, 0)
        pUnit:GossipMenuAddItem(0, "Outland Raids", 17, 0)
        pUnit:GossipMenuAddItem(5, "Shattrath", 18, 0)
        pUnit:GossipMenuAddItem(5, "<--Back", 100, 0)
        pUnit:GossipSendMenu(player)
    end
    
    if(intid == 5) then
        pUnit:GossipCreateMenu(3543, player, 0) --Skills Menu
        pUnit:GossipMenuAddItem(0, "Weapon Skills", 25, 0)
        pUnit:GossipMenuAddItem(0, "Armor Skills", 26, 0)
        pUnit:GossipMenuAddItem(5, "<--Back", 100, 0)
        pUnit:GossipSendMenu(player)
    end
    
    if(intid == 12) then
        pUnit:GossipCreateMenu(3543, player, 0) --Alliance Main City Menu
        pUnit:GossipMenuAddItem(5, "Stormwind", 34, 0)
        pUnit:GossipMenuAddItem(5, "Ironforge", 35, 0)
        pUnit:GossipMenuAddItem(5, "Darnassus", 36, 0)
        pUnit:GossipMenuAddItem(5, "The Exodar", 37, 0)
        pUnit:GossipMenuAddItem(5, "<--Back", 100, 0)
        pUnit:GossipSendMenu(player)
    end
    if(intid == 13) then
        pUnit:GossipCreateMenu(3543, player, 0) --Horde Main City Menu
        pUnit:GossipMenuAddItem(5, "Orgrimmar", 38, 0)
        pUnit:GossipMenuAddItem(5, "Undercity", 39, 0)
        pUnit:GossipMenuAddItem(5, "Thunder Bluff", 40, 0)
        pUnit:GossipMenuAddItem(5, "Silvermoon City", 41, 0)
        pUnit:GossipMenuAddItem(5, "<--Back", 100, 0)
        pUnit:GossipSendMenu(player)
    end
    if(intid == 14) then
        pUnit:GossipCreateMenu(3543, player, 0) --Azeroth Instances
        pUnit:GossipMenuAddItem(5, "Shadowfang Keep", 42, 0)
        pUnit:GossipMenuAddItem(5, "Scarlet Monastery", 43, 0)
        pUnit:GossipMenuAddItem(5, "Zul'Farrak", 44, 0)
        pUnit:GossipMenuAddItem(5, "Scholomance", 45, 0)
        pUnit:GossipMenuAddItem(5, "The Deadmines", 46, 0)
        pUnit:GossipMenuAddItem(5, "Uldaman", 47, 0)
        pUnit:GossipMenuAddItem(5, "Sunken temple", 48, 0)
        pUnit:GossipMenuAddItem(5, "Lower Blackrock", 49, 0)
        pUnit:GossipMenuAddItem(5, "Dire Maul", 50, 0)
        pUnit:GossipMenuAddItem(5, "Upper Blackrock", 51, 0)
        pUnit:GossipMenuAddItem(5, "<--Back", 100, 0)
        pUnit:GossipSendMenu(player)
    end
    if(intid == 15) then
        pUnit:GossipCreateMenu(3543, player, 0) --Outland Instances
        pUnit:GossipMenuAddItem(5, "Hellfire Ramparts", 52, 0)
        pUnit:GossipMenuAddItem(5, "Blood furnace", 53, 0)
        pUnit:GossipMenuAddItem(5, "Shattered Halls", 54, 0)
        pUnit:GossipMenuAddItem(5, "Underbog", 55, 0)
        pUnit:GossipMenuAddItem(5, "Slave pens", 56, 0)
        pUnit:GossipMenuAddItem(5, "Mana tombs", 57, 0)
        pUnit:GossipMenuAddItem(5, "Sethekk halls", 58, 0)
        pUnit:GossipMenuAddItem(5, "Shadow lab", 59, 0)
        pUnit:GossipMenuAddItem(5, "Mechanar", 60, 0)
        pUnit:GossipMenuAddItem(5, "Arcatraz", 61, 0)
        pUnit:GossipMenuAddItem(5, "Caverns of Time", 62, 0)
        pUnit:GossipMenuAddItem(5, "Serpentshrine caverns", 63, 0)
        pUnit:GossipMenuAddItem(5, "<--Back", 100, 0)
        pUnit:GossipSendMenu(player)
    end
    if(intid == 16) then
        pUnit:GossipCreateMenu(3543, player, 0) --Azeroth Raids
        pUnit:GossipMenuAddItem(5, "Onyxias Lair", 64, 0)
        pUnit:GossipMenuAddItem(5, "Molten Core", 65, 0)
        pUnit:GossipMenuAddItem(5, "Blackwing Lair", 66, 0)
        pUnit:GossipMenuAddItem(5, "Zul'Gurub", 67, 0)
        pUnit:GossipMenuAddItem(5, "Karazhan", 68, 0)
        pUnit:GossipMenuAddItem(5, "Ruins of Ahn'Qiraj", 69, 0)
        pUnit:GossipMenuAddItem(5, "Temple of Ahn'Qiraj", 70, 0)
        pUnit:GossipMenuAddItem(5, "Naxxramas", 71, 0)
        pUnit:GossipMenuAddItem(5, "Zul'Aman", 72, 0)
        pUnit:GossipMenuAddItem(5, "<--Back", 100, 0)
        pUnit:GossipSendMenu(player)
    end
    if(intid == 17) then
        pUnit:GossipCreateMenu(3543, player, 0) --Outland Raids
        pUnit:GossipMenuAddItem(5, "Black Temple", 73, 0)
        pUnit:GossipMenuAddItem(5, "Tempest Keep", 74, 0)
        pUnit:GossipMenuAddItem(5, "Maghteridons Lair", 75, 0)
        pUnit:GossipMenuAddItem(5, "<--Back", 100, 0)
        pUnit:GossipSendMenu(player)
    end
    if(intid == 25) then
        pUnit:GossipCreateMenu(3543, player, 0)
        pUnit:GossipMenuAddItem(0, "Ranged Weapons", 76, 0)
        pUnit:GossipMenuAddItem(0, "One-Handed Weapons", 77, 0)
        pUnit:GossipMenuAddItem(0, "Two-Handed Weapons", 78, 0)
        pUnit:GossipMenuAddItem(5, "<--Back", 100, 0)
        pUnit:GossipSendMenu(player)
    end
    if(intid == 26) then
        pUnit:GossipCreateMenu(3543, player, 0)
        pUnit:GossipMenuAddItem(1, "Cloth", 79, 0)
        pUnit:GossipMenuAddItem(1, "Leather", 80, 0)
        pUnit:GossipMenuAddItem(1, "Mail", 81, 0)
        pUnit:GossipMenuAddItem(1, "Plate Mail", 82, 0)
        pUnit:GossipMenuAddItem(1, "Shield", 83, 0)
        pUnit:GossipMenuAddItem(5, "<--Back", 100, 0)
        pUnit:GossipSendMenu(player)
    end
    if(intid == 76) then
        pUnit:GossipCreateMenu(3543, player, 0)
        pUnit:GossipMenuAddItem(1, "Bows", 84, 0)
        pUnit:GossipMenuAddItem(1, "Crossbows", 85, 0)
        pUnit:GossipMenuAddItem(1, "Guns", 86, 0)
        pUnit:GossipMenuAddItem(1, "Thrown", 87, 0)
        pUnit:GossipMenuAddItem(1, "Wands", 88, 0)
        pUnit:GossipMenuAddItem(5, "<--Back", 100, 0)
        pUnit:GossipSendMenu(player)
    end
    if(intid == 77) then
        pUnit:GossipCreateMenu(3543, player, 0)
        pUnit:GossipMenuAddItem(1, "One-Handed Axes", 89, 0)
        pUnit:GossipMenuAddItem(1, "One-Handed Maces", 90, 0)
        pUnit:GossipMenuAddItem(1, "One-Handed Swords", 91, 0)
        pUnit:GossipMenuAddItem(1, "Daggers", 92, 0)
        pUnit:GossipMenuAddItem(1, "Fist Weapons", 93, 0)
        pUnit:GossipMenuAddItem(5, "<--Back", 100, 0)
        pUnit:GossipSendMenu(player)
    end
    if(intid == 78) then
        pUnit:GossipCreateMenu(3543, player, 0)
        pUnit:GossipMenuAddItem(1, "Two-Handed Axes", 94, 0)
        pUnit:GossipMenuAddItem(1, "Two-Handed Maces", 95, 0)
        pUnit:GossipMenuAddItem(1, "Two-Handed Swords", 96, 0)
        pUnit:GossipMenuAddItem(1, "Staves", 97, 0)
        pUnit:GossipMenuAddItem(1, "Polearms", 98, 0)
        pUnit:GossipMenuAddItem(5, "<--Back", 100, 0)
        pUnit:GossipSendMenu(player)
    end
    if(intid == 100) then
        pUnit:GossipCreateMenu(3543, player, 0)
        pUnit:GossipMenuAddItem(0, "Teleport Menu", 3, 0)
        pUnit:GossipMenuAddItem(0, "Weapon and Armor Skills", 5, 0)
        pUnit:GossipMenuAddItem(0, "All Class Spells", 101, 0)
        pUnit:GossipMenuAddItem(2, "Remove Resurrection Sickness", 99, 0)
        pUnit:GossipSendMenu(player)
    end
    if(intid == 18) then -- Port To Shatt
        player:Teleport(530, -1887.510010, 5359.379883, -12.427300)
    end
    if(intid == 27) then
        player:Teleport(1, 4657.35, -3739.4, 1415.79)
    if(intid == 28) then
    end
        player:Teleport(0, 0, 0, 0)
    end
    if(intid == 29) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(31984)
        
    end
    if(intid == 30) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(35354)
        
    end
    if(intid == 31) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(32686)
        
    end
    if(intid == 32) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(41937)
        
    end
    if(intid == 33) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(38917)
        
    end
    if(intid == 34) then
        player:Teleport(0, -9005.0, 869.0, 29.621)
    end
    if(intid == 35) then
        player:Teleport(0, -4977.095215, -888.452942, 501.621216)
    end
    if(intid == 36) then
        player:Teleport(1, 9943.809570, 2275.350098, 1341.390015)
    end
    if(intid == 37) then
        player:Teleport(530, -3792.557861, -11691.3, -105.241)
    end
    if(intid == 38) then
        player:Teleport(1, 1371.068970, -4370.801758, 26.052483)
    end
    if(intid == 39) then
        player:Teleport(0, 2050.203125, 285.650604, 56.994549)
    end
    if(intid == 40) then
        player:Teleport(1, -1304.569946, 205.285004, 68.681396)
    end
    if(intid == 41) then
        player:Teleport(530, 9400.486328, -7278.376953, 14.206780)
    end
    if(intid == 42) then
        player:Teleport(0, -234.495087, 1561.946411, 76.892143)
    end
    if(intid == 43) then
        player:Teleport(0, 2870.442627, -819.985229, 160.331085)
    end
    if(intid == 44) then
        player:Teleport(1, -6797.278809, -2903.917969, 9.953360)
    end
    if(intid == 45) then
        player:Teleport(0, 1267.468628, -2556.651367, 94.127983)
    end
    if(intid == 46) then
        player:Teleport(0, -11079.8, 1506.98, 42.9594)
    end
    if(intid == 47) then
        player:Teleport(70, -228.193, 46.1602, -45.0186)
    end
    if(intid == 48) then
        player:Teleport(0, -10349.1, -3849.67, -24.6078)
    end
    if(intid == 49) then
        player:Teleport(230, 596.432, -188.498, -49)
    end
    if(intid == 50) then
        player:Teleport(429, 254.588, -24.7395, -1.56062)
    end
    if(intid == 51) then
        player:Teleport(229, 73.5083, -215.044, 53.3869)
    end
    if(intid == 52) then
        player:Teleport(530, -360.670990, 3071.899902, -15.097700)
    end
    if(intid == 53) then
        player:Teleport(530, -303.506012, 3164.820068, 31.742500)
    end
    if(intid == 54) then
        player:Teleport(530, -311.083527, 3083.291748, -3.745923)
    end
    if(intid == 55) then
        player:Teleport(530, 777.088989, 6763.450195, -72.062561)
    end
    if(intid == 56) then
        player:Teleport(530, 719.507996, 6999.339844, -73.074303)
    end
    if(intid == 57) then
        player:Teleport(530, -3079.810059, 4943.040039, -101.046997)
    end
    if(intid == 58) then
        player:Teleport(530, -3362.219971, 4660.410156, -101.049004)
    end
    if(intid == 59) then
        player:Teleport(530, -3645.060059, 4943.620117, -101.047997)
    end
    if(intid == 60) then
        player:Teleport(530, 2862.409912, 1546.089966, 252.158691)
    end
    if(intid == 61) then
        player:Teleport(530, 3311.598145, 1332.745117, 505.557251)
    end
    if(intid == 62) then
        player:Teleport(1, -8519.718750, -4297.542480, -208.441376)
    end
    if(intid == 63) then
        player:Teleport(530, 830.542908, 6865.445801, -63.785503)
    end
    if(intid == 64) then
        player:Teleport(1, -4746, -3749, -4.0)
    end
    if(intid == 65) then
        player:Teleport(409, 1089.6, -470.19, -106.41)
    end
    if(intid == 66) then
        player:Teleport(469, -7665.55, -1102.49, 400.679)
    end
    if(intid == 67) then
        player:Teleport(0, -11919.073242, -1202.459374, 92.298744)
    end
    if(intid == 68) then
        player:Teleport(532, -11087.3, -1977.47, 49.6135)
    end
    if(intid == 69) then
        player:Teleport(1, -8394.730469, 1485.658447, 21.038563)
    end
    if(intid == 70) then
        player:Teleport(1, -8247.316406, 1970.156860, 129.071472)
    end
    if(intid == 71) then
        player:Teleport(533, 3006.06, -3436.72, 293.891)
    end
    if(intid == 72) then
        player:Teleport(530, 6850, -7950, 170)
    end
    if(intid == 73) then
        player:Teleport(530, -3609.739990, 328.252014, 37.307701)
    end
    if(intid == 74) then
        player:Teleport(530, 3087.310059, 1373.790039, 184.643005)
    end
    if(intid == 75) then
        player:Teleport(530, -313.678986, 3088.350098, -116.501999)
    end
    if(intid == 79) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(9078)
    end
    if(intid == 80) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(9077)
        
    end
    if(intid == 81) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(8737)
        
    end
    if(intid == 82) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(750)
        
    end
    if(intid == 83) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(9116)
        
    end
    if(intid == 84) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(264)
        
    end
    if(intid == 85) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(5011)
        
    end
    if(intid == 86) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(266)
        
    end
    if(intid == 87) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(2567)
        
    end
    if(intid == 88) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(5009)
        
    end
    if(intid == 89) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(196)
        
    end
    if(intid == 90) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(198)
        
    end
    if(intid == 91) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(201)
        
    end
    if(intid == 92) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(1180)
        
    end
    if(intid == 93) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(15590)
        
    end
    if(intid == 94) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(197)
        
    end
    if(intid == 95) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(199)
        
    end
    if(intid == 96) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(202)
        
    end
    if(intid == 97) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(227)
        
    end
    if(intid == 98) then
        local plr = pUnit:GetClosestPlayer()
        plr:LearnSpell(200)
        
    end
    if(intid == 99) then
        local plr = pUnit:GetClosestPlayer()
        plr:RemoveAura(15007)
        pUnit:SendChatMessage(12, 0, "You are saved man!")
    
    end
    end
     
    RegisterUnitGossipEvent(400000,1,"Menu_OnGossipTalk")
    RegisterUnitGossipEvent(400000,2,"NPC_OnGossip_select")
    Please comment fast :scratch:


  2. #2
    Enthusiast MorTPh3uS is offline
    MemberRank
    Apr 2006 Join Date
    RomaniaLocation
    29Posts

    Re: [Lua] [WarpNPC] [Help!] [xD]

    i had the same problem and i fixed it by using LUAppArc and btw this one is better than luascripts from ascent or from sun++
    http://svn.burning-azzinoth.de/LUAppArc/

  3. #3
    Account Upgraded | Title Enabled! trunks94 is offline
    MemberRank
    Dec 2007 Join Date
    Finland, OuluLocation
    393Posts

    Re: [Lua] [WarpNPC] [Help!] [xD]

    Can you give me download link, my computer is stucking everytime there ;S



Advertisement