Teleport Script different for Alliance and Horde menu

User Tag List

Results 1 to 11 of 11
  1. #1
    zimonken's Avatar Member
    Reputation
    2
    Join Date
    Dec 2008
    Posts
    161
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Teleport Script different for Alliance and Horde

    Hi, How do I make a teleporter (script) that will have different locations for Alliance and Horde. Like if you are ally you can teleport to their capitals and if your horde to their capitals? Is it possible to make that in 1 script/npc or do I have to make 2 different?

    Teleport Script different for Alliance and Horde
  2. #2
    Gastricpenguin's Avatar Legendary
    Reputation
    980
    Join Date
    Feb 2007
    Posts
    2,236
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    player->GetTeam() returns 1 if they are horde, or 0 if they are alliance.
    Life Puzzler WoW - Website | Forums

  3. #3
    zimonken's Avatar Member
    Reputation
    2
    Join Date
    Dec 2008
    Posts
    161
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok thank you but where should I put in that?
    my script:
    function On_Gossip(unit, event, player)
    unit:GossipCreateMenu(3544, player, 0)
    unit:GossipMenuAddItem(2, "Neutral Cities", 1, 0)
    unit:GossipMenuAddItem(2, "Alliance Cities", 2, 0)
    unit:GossipMenuAddItem(2, "Horde Cities", 3, 0)
    unit:GossipMenuAddItem(2, "Custom Raids/Instances/Bosses", 4, 0)
    unit:GossipMenuAddItem(2, "Custom Events", 5, 0)
    unit:GossipSendMenu(player)
    end

    function Gossip_Submenus(unit, event, player, id, intid, code)

    if(intid == 999) then
    unit:GossipCreateMenu(3543, player, 0)
    unit:GossipMenuAddItem(2, "Neutral Cities", 1, 0)
    unit:GossipMenuAddItem(2, "Alliance Cities", 2, 0)
    unit:GossipMenuAddItem(2, "Horde Cities", 3, 0)
    unit:GossipMenuAddItem(2, "Custom Raids/Instances/Bosses", 4, 0)
    unit:GossipMenuAddItem(2, "Custom Events", 5, 0)
    unit:GossipSendMenu(player)
    end

    if(intid == 1) then
    unit:GossipCreateMenu(3543, player, 0)
    unit:GossipMenuAddItem(1, "Dalaran", 300, 0)
    unit:GossipMenuAddItem(1, "Shattrath", 309, 0)
    unit:GossipMenuAddItem(0, "[Back]", 999, 0)
    unit:GossipSendMenu(player)
    end

    if(intid == 2) then
    unit:GossipCreateMenu(3543, player, 0)
    unit:GossipMenuAddItem(1, "Stormwind", 301, 0)
    unit:GossipMenuAddItem(1, "Ironforge", 302, 0)
    unit:GossipMenuAddItem(1, "Darnassus", 303, 0)
    unit:GossipMenuAddItem(1, "Exodar", 304, 0)
    unit:GossipMenuAddItem(0, "[Back]", 999, 0)
    unit:GossipSendMenu(player)
    end

    if(intid == 3) then
    unit:GossipCreateMenu(3543, player, 0)
    unit:GossipMenuAddItem(1, "Orgrimmar", 305, 0)
    unit:GossipMenuAddItem(1, "Undercity", 306, 0)
    unit:GossipMenuAddItem(1, "Thunder Bluff", 307, 0)
    unit:GossipMenuAddItem(1, "Silvermoon", 308, 0)
    unit:GossipMenuAddItem(0, "[Back]", 999, 0)
    unit:GossipSendMenu(player)
    end

    if(intid == 4) then
    unit:GossipCreateMenu(3543, player, 0)
    unit:GossipMenuAddItem(1, "Hyjal (80 raid)", 310, 0)
    unit:GossipMenuAddItem(1, "Old Hogger (Violet Hold - 80 raid)", 311, 0)
    unit:GossipMenuAddItem(0, "[Back]", 999, 0)
    unit:GossipSendMenu(player)
    end

    if(intid == 5) then
    unit:GossipCreateMenu(3543, player, 0)
    unit:GossipMenuAddItem(1, "Obstacle Course", 312, 0)
    unit:GossipMenuAddItem(1, "The Maze", 313, 0)
    unit:GossipMenuAddItem(0, "[Back]", 999, 0)
    unit:GossipSendMenu(player)
    end

    if(intid == 300) then
    player:Teleport(571, 5798.553711, 645.019287, 647.477783)
    unit:GossipComplete(player)
    end

    if(intid == 301) then
    player:Teleport(0, -8913.230469, 554.632996, 93.794830)
    unit:GossipComplete(player)
    end

    if(intid == 302) then
    player:Teleport(0, -4982.447266, -880.969604, 501.659882)
    unit:GossipComplete(player)
    end

    if(intid == 303) then
    player:Teleport(1, 9946.639648, 2610.149414, 1316.25634
    unit:GossipComplete(player)
    end

    if(intid == 304) then
    player:Teleport(530, -4008.085205, -11885.257813, -1.419589)
    unit:GossipComplete(player)
    end

    if(intid == 305) then
    player:Teleport(1, 1505.377319, -4414.602539, 20.598469)
    unit:GossipComplete(player)
    end

    if(intid == 306) then
    player:Teleport(0, 1831.750854, 238.543503, 60.478447)
    unit:GossipComplete(player)
    end

    if(intid == 307) then
    player:Teleport(1, -1282.347534, 133.302917, 131.218323)
    unit:GossipComplete(player)
    end

    if(intid == 313) then
    player:Teleport(0, -7518.066406, 793.149780, 131.406967)
    unit:GossipComplete(player)
    end
    end

    RegisterUnitGossipEvent(76666, 1, "On_Gossip")
    RegisterUnitGossipEvent(76666, 2, "Gossip_Submenus")

  4. #4
    y2kss66's Avatar Member
    Reputation
    104
    Join Date
    Jan 2008
    Posts
    778
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    gastricpenguin's response was for c++ not lua.

    for lua and alliance it would be something like:

    Code:
    function On_Gossip(unit, event, player)
    local race=player:GetPlayerRace()
        if race==1 or race==3 or race==4 or race==7 or race==11 then
    unit:GossipCreateMenu(3544, player, 0)
    unit:GossipMenuAddItem(2, "Neutral Cities", 1, 0)
    unit:GossipMenuAddItem(2, "Alliance Cities", 2, 0)
    unit:GossipMenuAddItem(2, "Custom Raids/Instances/Bosses", 4, 0)
    unit:GossipMenuAddItem(2, "Custom Events", 5, 0)
    unit:GossipSendMenu(player)
    else
    unit:GossipCreateMenu(3544, player, 0)
    unit:GossipMenuAddItem(2, "Neutral Cities", 1, 0)
    unit:GossipMenuAddItem(2, "Horde Cities", 3, 0)
    unit:GossipMenuAddItem(2, "Custom Raids/Instances/Bosses", 4, 0)
    unit:GossipMenuAddItem(2, "Custom Events", 5, 0)
    unit:GossipSendMenu(player)
    end
    end
    
    function Gossip_Submenus(unit, event, player, id, intid, code)
    if(intid == 999) then
    unit:GossipCreateMenu(3543, player, 0)
    unit:GossipMenuAddItem(2, "Neutral Cities", 1, 0)
    unit:GossipMenuAddItem(2, "Alliance Cities", 2, 0)
    unit:GossipMenuAddItem(2, "Horde Cities", 3, 0)
    unit:GossipMenuAddItem(2, "Custom Raids/Instances/Bosses", 4, 0)
    unit:GossipMenuAddItem(2, "Custom Events", 5, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 1) then
    unit:GossipCreateMenu(3543, player, 0)
    unit:GossipMenuAddItem(1, "Dalaran", 300, 0)
    unit:GossipMenuAddItem(1, "Shattrath", 309, 0)
    unit:GossipMenuAddItem(0, "[Back]", 999, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 2) then
    unit:GossipCreateMenu(3543, player, 0)
    unit:GossipMenuAddItem(1, "Stormwind", 301, 0)
    unit:GossipMenuAddItem(1, "Ironforge", 302, 0)
    unit:GossipMenuAddItem(1, "Darnassus", 303, 0)
    unit:GossipMenuAddItem(1, "Exodar", 304, 0)
    unit:GossipMenuAddItem(0, "[Back]", 999, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 3) then
    unit:GossipCreateMenu(3543, player, 0)
    unit:GossipMenuAddItem(1, "Orgrimmar", 305, 0)
    unit:GossipMenuAddItem(1, "Undercity", 306, 0)
    unit:GossipMenuAddItem(1, "Thunder Bluff", 307, 0)
    unit:GossipMenuAddItem(1, "Silvermoon", 308, 0)
    unit:GossipMenuAddItem(0, "[Back]", 999, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 4) then
    unit:GossipCreateMenu(3543, player, 0)
    unit:GossipMenuAddItem(1, "Hyjal (80 raid)", 310, 0)
    unit:GossipMenuAddItem(1, "Old Hogger (Violet Hold - 80 raid)", 311, 0)
    unit:GossipMenuAddItem(0, "[Back]", 999, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 5) then
    unit:GossipCreateMenu(3543, player, 0)
    unit:GossipMenuAddItem(1, "Obstacle Course", 312, 0)
    unit:GossipMenuAddItem(1, "The Maze", 313, 0)
    unit:GossipMenuAddItem(0, "[Back]", 999, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 300) then
    player:Teleport(571, 5798.553711, 645.019287, 647.477783)
    unit:GossipComplete(player)
    end
    
    if(intid == 301) then
    player:Teleport(0, -8913.230469, 554.632996, 93.794830)
    unit:GossipComplete(player)
    end
    
    if(intid == 302) then
    player:Teleport(0, -4982.447266, -880.969604, 501.659882)
    unit:GossipComplete(player)
    end
    
    if(intid == 303) then
    player:Teleport(1, 9946.639648, 2610.149414, 1316.256348)
    unit:GossipComplete(player)
    end
    
    if(intid == 304) then
    player:Teleport(530, -4008.085205, -11885.257813, -1.419589)
    unit:GossipComplete(player)
    end
    
    if(intid == 305) then
    player:Teleport(1, 1505.377319, -4414.602539, 20.598469)
    unit:GossipComplete(player)
    end
    
    if(intid == 306) then
    player:Teleport(0, 1831.750854, 238.543503, 60.478447)
    unit:GossipComplete(player)
    end
    
    if(intid == 307) then
    player:Teleport(1, -1282.347534, 133.302917, 131.218323)
    unit:GossipComplete(player)
    end
    
    if(intid == 313) then
    player:Teleport(0, -7518.066406, 793.149780, 131.406967)
    unit:GossipComplete(player)
    end
    end
    
    RegisterUnitGossipEvent(76666, 1, "On_Gossip")
    RegisterUnitGossipEvent(76666, 2, "Gossip_Submenus")
    try this not sure if it will work though.
    Last edited by y2kss66; 04-08-2009 at 05:45 PM.

  5. #5
    zimonken's Avatar Member
    Reputation
    2
    Join Date
    Dec 2008
    Posts
    161
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh, but what should I add for that script (lua)?

  6. #6
    y2kss66's Avatar Member
    Reputation
    104
    Join Date
    Jan 2008
    Posts
    778
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I edited my original post

  7. #7
    zimonken's Avatar Member
    Reputation
    2
    Join Date
    Dec 2008
    Posts
    161
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok ty will try it

  8. #8
    y2kss66's Avatar Member
    Reputation
    104
    Join Date
    Jan 2008
    Posts
    778
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    NP tell me if that works. ok?

  9. #9
    zimonken's Avatar Member
    Reputation
    2
    Join Date
    Dec 2008
    Posts
    161
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got this:
    script could not load ´end´ expected (to close ´function´at line 1) near else
    Should I have space beetween end and else?

    edit: I tested it with a space, still don't work
    Last edited by zimonken; 04-08-2009 at 01:16 PM.

  10. #10
    Yoshiya's Avatar Member
    Reputation
    1
    Join Date
    Dec 2008
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm Try

    Code:
    function On_Gossip(unit, event, player)
    local race=player:GetPlayerRace()
        if race==1 or race==3 or race==4 or race==7 or race==11 then
    unit:GossipCreateMenu(3544, player, 0)
    unit:GossipMenuAddItem(2, "Neutral Cities", 1, 0)
    unit:GossipMenuAddItem(2, "Alliance Cities", 2, 0)
    unit:GossipMenuAddItem(2, "Custom Raids/Instances/Bosses", 4, 0)
    unit:GossipMenuAddItem(2, "Custom Events", 5, 0)
    unit:GossipSendMenu(player)
    
    else
    unit:GossipCreateMenu(3544, player, 0)
    unit:GossipMenuAddItem(2, "Neutral Cities", 1, 0)
    unit:GossipMenuAddItem(2, "Horde Cities", 3, 0)
    unit:GossipMenuAddItem(2, "Custom Raids/Instances/Bosses", 4, 0)
    unit:GossipMenuAddItem(2, "Custom Events", 5, 0)
    unit:GossipSendMenu(player)
    end
    end
    Just removing the end from above else and moving it down under the other end.
    Last edited by Yoshiya; 04-08-2009 at 01:56 PM.

  11. #11
    zimonken's Avatar Member
    Reputation
    2
    Join Date
    Dec 2008
    Posts
    161
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes it worked! Thank you

Similar Threads

  1. [Selling] Kul tiras EU alliance and horde gold for sale 8$/10k
    By Jarcik in forum World of Warcraft Buy Sell Trade
    Replies: 0
    Last Post: 11-23-2013, 01:21 AM
  2. [Selling] Need a Boost in RBG? I Can Help for both Alliance and Horde !
    By Geleto69 in forum World of Warcraft Buy Sell Trade
    Replies: 0
    Last Post: 02-21-2013, 05:18 PM
  3. [DBC Edit] Alliance and Horde Moonkin changes for 3.3.5
    By LeetMonster in forum World of Warcraft Model Editing
    Replies: 7
    Last Post: 10-24-2010, 06:01 AM
  4. Alliance and Horde Friendly for Raids?
    By brayden in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 07-30-2010, 04:36 PM
  5. Alliance and Horde Flight Paths
    By Bossman4 in forum World of Warcraft Guides
    Replies: 6
    Last Post: 05-22-2006, 12:06 PM
All times are GMT -5. The time now is 07:41 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search