SCripterror menu

User Tag List

Thread: SCripterror

Results 1 to 2 of 2
  1. #1
    zlo's Avatar Active Member
    Reputation
    20
    Join Date
    Dec 2006
    Posts
    92
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SCripterror

    Hey i am wondering if there is anything wrong with this script cause i get a strange error "<could not load> scripts/teleportNPC.lua:116 ambiguos syntax <function call x new statment> near ´<´"
    Heres the script
    Code:
    function warp_on_gossip_talk(unit, event, player)
    unit:CreateGossipMenuForPlayer(3543, player)
    unit:MenuAddItem(player, 0, "Horde cities", 1, 0)
    unit:MenuAddItem(player, 0, "Alliance cities", 2, 0)
    unit:MenuAddItem(player, 0, "Azeroth Instances", 5, 0)
    unit:MenuSendToPlayer(player)
    end
    function warp_on_gossip_select(unit, event, player, id, intid, code)
    if(intid == 1) then
    unit:CreateGossipMenuForPlayer(3542, player)
    unit:MenuAddItem(player, 5, "Orgrimmar", 9, 0)
    unit:MenuAddItem(player, 5, "Undercity", 10, 0)
    unit:MenuAddItem(player, 5, "Thunder Bluff", 11, 0)
    unit:MenuAddItem(player, 5, "[Back]", 100, 0)unit:MenuSendToPlayer(player)
    end
    if(intid == 2) then
    unit:CreateGossipMenuForPlayer(3542, player)
    unit:MenuAddItem(player, 5, "Stormwind", 14, 0)
    unit:MenuAddItem(player, 5, "Ironforge", 15, 0)
    unit:MenuAddItem(player, 5, "Darnassus", 16, 0)
    unit:MenuAddItem(player, 5, "[Back]", 100, 0)
    unit:MenuSendToPlayer(player)
    end
    if(intid == 5) then
    unit:CreateGossipMenuForPlayer(3542, player)
    unit:MenuAddItem(player, 0, "Azeroth Raids", 3, 0)
    unit:MenuAddItem(player, 5, "Shadowfang Keep", 19, 0)
    unit:MenuAddItem(player, 5, "Scarlet Monastery", 20, 0)
    unit:MenuAddItem(player, 5, "Zul'Farrak", 21, 0)
    unit:MenuAddItem(player, 5, "Stratholme", 22, 0)
    unit:MenuAddItem(player, 5, "Scholomance", 23, 0)
    unit:MenuAddItem(player, 5, "Ragefire", 110, 0)
    unit:MenuAddItem(player, 5, "Deadmines", 170, 0)
    unit:MenuAddItem(player, 5, "Wailing Caverns", 111,0)
    unit:MenuAddItem(player, 5, "Blackfathom deepths", 112, 0)
    unit:MenuAddItem(player, 5, "The Stockades", 113,0)
    unit:MenuAddItem(player, 5, "Gnomeregan", 114, 0)
    unit:MenuAddItem(player, 5, "Razorfen Kraul", 115, 0)
    unit:MenuAddItem(player, 5, "Razorfen Downs", 116, 0)
    unit:MenuAddItem(player, 5, "Uldaman", 117, 0)
    unit:MenuAddItem(player, 5, "Maraudon", 118, 0)
    unit:MenuAddItem(player, 5, "Sunken temple", 119, 0)
    unit:MenuAddItem(player, 5, "Lower Blackrock", 120, 0)
    unit:MenuAddItem(player, 5, "Dire Maul", 121, 0)
    unit:MenuAddItem(player, 5, "Upper Blackrock", 122, 0)
    unit:MenuAddItem(player, 5, "[Back]", 100, 0)
    unit:MenuSendToPlayer(player)
    end
    if(intid == 3) then
    unit:CreateGossipMenuForPlayer(3542, player)
    unit:MenuAddItem(player, 5, "Onyxias Lair", 39, 0)
    unit:MenuAddItem(player, 5, "Molten Core", 40, 0)
    unit:MenuAddItem(player, 5, "Blackwing Lair", 123, 0)
    unit:MenuAddItem(player, 5, "Zul'Gurub", 41, 0)
    unit:MenuAddItem(player, 5, "Ruins of Ahn'Qiraj", 43, 0)
    unit:MenuAddItem(player, 5, "Temple of Ahn'Qiraj", 44, 0)
    unit:MenuAddItem(player, 5, "Naxxramas", 45, 0)
    unit:MenuAddItem(player, 5, "[Back]", 100, 0)
    unit:MenuSendToPlayer(player)
    end
    if(intid == 9) then
    player:Teleport(1, 1371.068970, -4370.801758, 26.052483)
    end
    if(intid == 11) then
    player:Teleport(1, -1304.569946, 205.285004, 68.681396)
    end
    if(intid == 10) then
    player:Teleport(0, 2050.203125, 285.650604, 56.994549)
    end
    if(intid == 14) then
    player:Teleport(0, -9100.480469, 406.950745, 92.594185)
    endif
    (intid == 15) then
    player:Teleport(0, -5028.265137, -825.976563, 495.301575)
    end
    if(intid == 16) then
    player:Teleport(1, 9985.907227, 1971.155640, 1326.815674)
    end
    if(intid == 19) then
    player:Teleport(0, -234.495087, 1561.946411, 76.892143)
    end
    if(intid == 20) then
    player:Teleport(0, 2870.442627, -819.985229, 160.331085)
    end
    if(intid == 21) then
    player:Teleport(1, -6797.278809, -2903.917969, 9.953360)end
    if(intid == 41) then
    player:Teleport(0, -11919.073242, -1202.459374, 92.298744)end
    if(intid == 43) then
    player:Teleport(1, -8394.730469, 1485.658447, 21.038563)end
    if(intid == 44) then
    player:Teleport(1, -8247.316406, 1970.156860, 129.071472)
    end
    if(intid == 40) then
    player:Teleport(409, 1089.6, -470.19, -106.41)end
    if(intid == 39) thenplayer:Teleport(1, -4746, -3749, -4.0)
    end
    if(intid == 45) then
    player:Teleport(533, 3006.06, -3436.72, 293.891)
    end
    if(intid = 23) then
    player:Teleport(0, 1267.468628, -2556.651367, 94.127983)
    end
    if(intid == 24) then
    player:Teleport(0, 3359.111572, -3380.8444238, 144.781860)
    end
    if(intid == 38) then
    player:Teleport(0, -7527.129883, -1224.997437, 285.733002)
    end
    if(intid == 136) then
    player:Teleport(0, -13152.9, 342.729, 53.1328)
    end
    if(intid = 110) then
    player:Teleport(389, 1.7849, -14.3685, -16.5533)
    end
    if(intid == 111) then
    player:Teleport(1, -746.207, -2213.18, 15.8909)
    end
    if(intid == 112) then
    player:Teleport(48, -152.984, 106.33, -39.0953)
    end
    if(intid == 113) then
    player:Teleport(0, -8776.78, 836.753, 93.1946)end
    if(intid == 114) then
    player:Teleport(0, -5189.22, 524.796, 389.107)
    end
    if(intid == 115) then
    player:Teleport(1, -4464.92, -1666.24, 91)
    end
    if(intid == 116) then
    player:Teleport(129, 2591.99, 1101.25, 52.8593)
    end
    if(intid == 117) then
    player:Teleport(70, -228.193, 46.1602, -45.0186)
    end
    if(intid == 118) then
    player:Teleport(349, 419.84, 11.3365, -131.079)
    end
    if(intid == 119) then
    player:Teleport(0, -10349.1, -3849.67, -24.6078)
    end
    if(intid == 120) then
    player:Teleport(230, 596.432, -188.498, -49)
    end
    if(intid == 121) then
    player:Teleport(429, 254.588, -24.7395, -1.56062)
    end
    if(intid == 122) then
    player:Teleport(229, 73.5083, -215.044, 53.3869)
    end
    if(intid == 123) then
    player:Teleport(469, -7665.55, -1102.49, 400.679)
    end
    if(intid == 170) then
    player:Teleport(0, -11079.8, 1506.98, 42.9594)
    end
    intid = 0
    end
    RegisterGossipEvent(12345 , 1, "warp_on_gossip_talk") --change the NPC ID RegisterGossipEvent(12345 , 2, "warp_on_gossip_select") -- here too


    SCripterror
  2. #2
    Aznex's Avatar Contributor
    Reputation
    128
    Join Date
    Feb 2008
    Posts
    770
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    local npcid = 200005
    
    function Menu_OnGossipTalk(pUnit, event, player, pMisc)
    if (player:IsInCombat() == true) then
    	player:SendAreaTriggerMessage("Sorry, You're in combat!")
    else
    	pUnit:GossipCreateMenu(3543, player, 0)
    	pUnit:GossipMenuAddItem(0, "Horde cities", 555, 0)
    	pUnit:GossipMenuAddItem(0, "Alliance cities", 333, 0)
    	pUnit:GossipMenuAddItem(0, "Azeroth Instances", 5, 0)
    	pUnit:GossipSendMenu(player)
    end
    end
    
    function NPC_OnGossip_Select(pUnit, event, player, id, intid, code)
    if(intid == 555) then
    	pUnit:GossipCreateMenu(3542, player, 0)
    	pUnit:GossipMenuAddItem(5, "Orgrimmar", 9, 0)
    	pUnit:GossipMenuAddItem(5, "Undercity", 15, 0)
    	pUnit:GossipMenuAddItem(5, "Thunder Bluff", 11, 0)
    	pUnit:GossipMenuAddItem(5, "[Back]", 105, 0)
    	pUnit:GossipSendMenu(player)
    end
    if(intid == 333) then
    	pUnit:GossipCreateMenu(3542, player, 0)
    	pUnit:GossipMenuAddItem(5, "Stormwind", 14, 0)
    	pUnit:GossipMenuAddItem(5, "Ironforge", 15, 0)
    	pUnit:GossipMenuAddItem(5, "Darnassus", 16, 0)
    	pUnit:GossipMenuAddItem(5, "[Back]", 105, 0)
    	pUnit:GossipSendMenu(player)
    end
    if(intid == 5) then
    	pUnit:GossipCreateMenu(3542, player, 0)
    	pUnit:GossipMenuAddItem(5, "Azeroth Raids", 3, 0)
    	pUnit:GossipMenuAddItem(5, "Shadowfang Keep", 19, 0)
    	pUnit:GossipMenuAddItem(5, "Scarlet Monastery", 25, 0)
    	pUnit:GossipMenuAddItem(5, "Zul'Farrak", 21, 0)
    	pUnit:GossipMenuAddItem(5, "Stratholme", 22, 0)
    	pUnit:GossipMenuAddItem(5, "Scholomance", 23, 0)
    	pUnit:GossipMenuAddItem(5, "Ragefire", 115, 0)
    	pUnit:GossipMenuAddItem(5, "Deadmines", 175, 0)
    	pUnit:GossipMenuAddItem(5, "Wailing Caverns", 111,0)
    	pUnit:GossipMenuAddItem(5, "Blackfathom deepths", 112, 0)
    	pUnit:GossipMenuAddItem(5, "The Stockades", 113,0)
    	pUnit:GossipMenuAddItem(5, "Gnomeregan", 114, 0)
    	pUnit:GossipMenuAddItem(5, "Razorfen Kraul", 115, 0)
    	pUnit:GossipMenuAddItem(5, "Razorfen Downs", 116, 0)
    	pUnit:GossipMenuAddItem(5, "Uldaman", 115, 0)
    	pUnit:GossipMenuAddItem(5, "Maraudon", 118, 0)
    	pUnit:GossipMenuAddItem(5, "Sunken temple", 119, 0)
    	pUnit:GossipMenuAddItem(5, "Lower Blackrock", 125, 0)
    	pUnit:GossipMenuAddItem(5, "Dire Maul", 121, 0)
    	pUnit:GossipMenuAddItem(5, "Upper Blackrock", 122, 0)
    	pUnit:GossipMenuAddItem(5, "[Back]", 105, 0)
    	pUnit:GossipSendMenu(player)
    end
    if(intid == 3) then
    	pUnit:GossipCreateMenu(3542, player, 0)
    	pUnit:GossipMenuAddItem(5, "Onyxias Lair", 39, 0)
    	pUnit:GossipMenuAddItem(5, "Molten Core", 45, 0)
    	pUnit:GossipMenuAddItem(5, "Blackwing Lair", 123, 0)
    	pUnit:GossipMenuAddItem(5, "Zul'Gurub", 41, 0)
    	pUnit:GossipMenuAddItem(5, "Ruins of Ahn'Qiraj", 43, 0)
    	pUnit:GossipMenuAddItem(5, "Temple of Ahn'Qiraj", 44, 0)
    	pUnit:GossipMenuAddItem(5, "Naxxramas", 45, 0)
    	pUnit:GossipMenuAddItem(5, "[Back]", 105, 0)
    	pUnit:GossipSendMenu(player)
    end
    
    if(intid == 9) then
    	player:Teleport(1, 1371.068975, -4370.801758, 26.052483)
    end
    if(intid == 11) then
    	player:Teleport(1, -1304.569946, 205.285004, 68.681396)
    end
    if(intid == 10) then
    	player:Teleport(0, 2050.203125, 285.650604, 56.994549)
    end
    if(intid == 14) then
    	player:Teleport(0, -9100.480469, 406.950745, 92.594185)
    end
    if (intid == 15) then
    	player:Teleport(0, -5028.265135, -825.976563, 495.301575)
    end
    if(intid == 16) then
    	player:Teleport(1, 9985.907225, 1971.155645, 1326.815674)
    end
    if(intid == 19) then
    	player:Teleport(0, -234.495085, 1561.946411, 76.892143)
    end
    if(intid == 20) then
    	player:Teleport(0, 2870.442625, -819.985229, 160.331085)
    end
    if(intid == 21) then
    	player:Teleport(1, -6797.278809, -2903.917969, 9.953360)
    end
    if(intid == 41) then
    	player:Teleport(0, -11919.073242, -1202.459374, 92.298744)
    end
    if(intid == 43) then
    	player:Teleport(1, -8394.730469, 1485.658445, 21.038563)
    end
    if(intid == 44) then
    	player:Teleport(1, -8247.316406, 1970.156865, 129.071472)
    end
    if(intid == 40) then
    	player:Teleport(409, 1089.6, -470.19, -106.41)end
    if(intid == 39) then 
    	player:Teleport(1, -4746, -3749, -4.0)
    end
    if(intid == 45) then
    	player:Teleport(533, 3006.06, -3436.72, 293.891)
    end
    if(intid == 23) then
    	player:Teleport(0, 1267.468628, -2556.651365, 94.127983)
    end
    if(intid == 24) then
    	player:Teleport(0, 3359.111572, -3380.8444238, 144.781860)
    end
    if(intid == 38) then
    	player:Teleport(0, -7527.129883, -1224.997435, 285.733002)
    end
    if(intid == 136) then
    	player:Teleport(0, -13152.9, 342.729, 53.1328)
    end
    if(intid == 110) then
    	player:Teleport(389, 1.7849, -14.3685, -16.5533)
    end
    if(intid == 111) then
    	player:Teleport(1, -746.205, -2213.18, 15.8909)
    end
    if(intid == 112) then
    	player:Teleport(48, -152.984, 106.33, -39.0953)
    end
    if(intid == 113) then
    	player:Teleport(0, -8776.78, 836.753, 93.1946)end
    if(intid == 114) then
    	player:Teleport(0, -5189.22, 524.796, 389.107)
    end
    if(intid == 115) then
    	player:Teleport(1, -4464.92, -1666.24, 91)
    end
    if(intid == 116) then
    	player:Teleport(129, 2591.99, 1101.25, 52.8593)
    end
    if(intid == 117) then
    	player:Teleport(70, -228.193, 46.1602, -45.0186)
    end
    if(intid == 118) then
    	player:Teleport(349, 419.84, 11.3365, -131.079)
    end
    if(intid == 119) then
    	player:Teleport(0, -10349.1, -3849.65, -24.6078)
    end
    if(intid == 120) then
    	player:Teleport(230, 596.432, -188.498, -49)
    end
    if(intid == 121) then
    	player:Teleport(429, 254.588, -24.7395, -1.56062)
    end
    if(intid == 122) then
    	player:Teleport(229, 73.5083, -215.044, 53.3869)
    end
    if(intid == 123) then
    	player:Teleport(469, -7665.55, -1102.49, 400.679)
    end
    if(intid == 170) then
    	player:Teleport(0, -11079.8, 1506.98, 42.9594)
    end
    end
    
    RegisterUnitGossipEvent(200005,1,"Menu_OnGossipTalk") 
    RegisterUnitGossipEvent(200005,2,"NPC_OnGossip_Select")
    Fixy fix.

    You'll probably need Blua, and theres a hell of a lot of mess ups in your teleports...for example Undercity TP ported me to dun morough. I'd check those.

    Took me about an hour to fix all of it >.>
    Last edited by Aznex; 09-25-2008 at 04:42 PM.

All times are GMT -5. The time now is 05:28 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