LUA Teleporter Get the players Faction menu

User Tag List

Results 1 to 2 of 2
  1. #1
    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)

    LUA Teleporter Get the players Faction

    Hello MMowned ^^ This is my first post (I may have posted in the wrong area..) and I'm looking for abit of help with some LUA scripts.. I am still learning how to read them, Not very good at all with writing them but I hope to be soon so I can give back to MMowned. My problem is I am not sure how to set up a LUA Teleporter NPC to only show a catorgory for Horde and Alliance, I do not want alliance to see serten things on the horde, And viceversa, I dont want to make a hole new NPC for that cause im sure it can be done xD, I have searched the forums (and a few other) and also google and came up empty handed, Anyway Thanks in advance, Hope to hear from someone.
    Last edited by Yoshiya; 04-08-2009 at 12:29 PM.

    LUA Teleporter Get the players Faction
  2. #2
    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)
    try this topic:
    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.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")
    the yellow part makes it so only alliance can go to these places because it checks for the alliance races(gnome, drenai, human, night elf, and dwarf)

    the pink part says that if you are not an alliance race(gnome, drenai, human, night elf, and dwarf) or horde it gives you the other menu.

    hope this helps!

    PS -- you must not have searched that hard because I posted this in a post where you posted in.
    http://www.mmowned.com/forums/emulat...nce-horde.html

Similar Threads

  1. Get the oposite faction mount in AV
    By azza in forum World of Warcraft Exploits
    Replies: 3
    Last Post: 01-07-2011, 09:07 AM
  2. Get into the other Faction's Area in Dalaran. (PALLY ONLY)
    By Sylverin in forum World of Warcraft Exploits
    Replies: 6
    Last Post: 11-16-2008, 09:48 PM
  3. Using Mind Control to get flight points of the opposite faction
    By anatra|afk in forum WoW EMU Exploits & Bugs
    Replies: 0
    Last Post: 10-13-2008, 10:54 AM
  4. [Exploit] Using MC to get an extra Halaa token for the opposite faction
    By Halaazi in forum World of Warcraft Exploits
    Replies: 8
    Last Post: 06-08-2008, 03:41 PM
  5. How to get the Player Base?
    By =sinister= in forum WoW Memory Editing
    Replies: 5
    Last Post: 03-31-2008, 02:21 AM
All times are GMT -5. The time now is 02:35 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