[lua]how to make a teleporter. menu

These ads disappear when you log in.

Results 1 to 6 of 6
  1. #1
    darkpatato's Avatar Sergeant
    Reputation
    -8
    Join Date
    May 2008
    Posts
    50
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)

    [lua]how to make a teleporter.

    Code:
    function Tele_OnTank(Unit, event, player)

    first, you have to set what the npc will do when a player talks to him!

    Code:
    function Tele_OnTalk(Unit, event, player)
    Unit:GossipCreateMenu(1, player, 0)

    then you have to tell the script to create a menu for the player! like so!

    Code:
    function Tele_OnTalk(Unit, event, player)
    Unit:GossipCreateMenu(1, player, 0)
    Unit:GossipMenuAddItem(0,"Mall", 0, 0)

    Now you have to add the "Item" or choice the player will see when he talks to your teleporter.

    Code:
    function Tele_OnTalk(Unit, event, player)
    Unit:GossipCreatreMenu(1, player, 0)
    Unit:GossipMenuAddItem(0,"Mall", 0, 0)[
    Unit:GossipSendMenu(player)

    Then you have to tell the script to send the menu to the player. like so.

    Code:
    function Tele_OnTalk(Unit, event, player)
    Unit:GossipCreateMenu(1, player, 0)
    Unit:GossipMenuAddItem(0,"Mall", 0, 0)
    Unit:GossipSendMenu(player)
    end

    Code:
    function Tele_OnSelect(Unit, event, player, intid, code)

    Now you have to tell the script what will happen when the player chooses that option.

    Code:
    function Tele_OnTalk(Unit, event, player)
    Unit:GossipCreateMenu(1, player, 0)
    Unit:GossipMenuAddItem(0,"Mall", 0, 0)
    Unit:GossipSendMenu(player)
    end
    
    function Tele_OnSelect(Unit, event, player, intid, code)
    if(intid == 0) then 
    player:Teleport(530, -244.882614, 1032.869741, 54.321983, 1.583673)
    end
    now after you have set what the script will do when the player selects the option, then you have to set what will happen if the (Id) of his selection is true. Its the same thing as what will happen when he selects the option, you just telling the script to do it when he selects the gossip option.
    Note:You can put whatever (X, Y, Z) you want by going in game and typing .gps
    In this case its Hellfire.

    Code:
    function Tele_OnTalk(Unit, event, player)
    Unit:GossipCreateMenu(1, player, 0)
    Unit:GossipMenuAddItem(0,"Mall", 0, 0)
    Unit:GossipSendMenu(player)
    end
    function Tele_OnSelect(Unit, event, player, intid, code)
    if(intid == 0) then 
    player:Teleport(530, -244.882614, 1032.869741, 54.321983, 1.583673)
    end  
    
    RegisterUnitGossipEvent(Npc Id, 1, "Tele_OnTalk")
    RegisterUnitGossipEvent(Npc Id, 2, "Tele_OnSelect")
    now you have to register the event in which the player is doing.

    And your done here is the script we made

    Code:
    function Tele_OnTalk(Unit, event, player)
    Unit:GossipCreateMenu(1, player, 0)
    Unit:GossipMenuAddItem(0,"Mall", 0, 0)
    Unit:GossipSendMenu(player)
    end
    function Tele_OnSelect(Unit, event, player, intid, code)
    if(intid == 0) then 
    player:Teleport(530, -244.882614, 1032.869741, 54.321983, 1.583673)
    end  
    
    RegisterUnitGossipEvent(Npc Id, 1, "Tele_OnTalk")
    RegisterUnitGossipEvent(Npc Id, 2, "Tele_OnSelect")
    credits go to me

    i dont know in what section i shud post this!
    Last edited by darkpatato; 04-15-2010 at 05:54 AM.

    These ads disappear when you log in.

  2. #2
    Dombo's Avatar Banned
    Reputation
    622
    Join Date
    Nov 2008
    Posts
    1,422
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Don't ask for rep .. read the rules.

  3. #3
    Jackie Moon's Avatar Elite User CoreCoins User
    Reputation
    407
    Join Date
    May 2008
    Posts
    921
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Pretty easy to follow, many of these guides though.
    Because you asked for +rep i'll give you 1 not 2 (Don't ask in future)
    Check out my YouTube: SkeetzGaming

  4. #4
    darkpatato's Avatar Sergeant
    Reputation
    -8
    Join Date
    May 2008
    Posts
    50
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    thank you.
    i didnt know u may not ask for rep soz
    how u gain points here or become contrib?

  5. #5
    FyF's Avatar Private
    Reputation
    1
    Join Date
    Apr 2010
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    lol, I rolled a little, but its not hard

  6. #6
    darkpatato's Avatar Sergeant
    Reputation
    -8
    Join Date
    May 2008
    Posts
    50
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    thank you.

Similar Threads

  1. [Guide] How to make a teleporter With SQL. [Trinity]
    By Verosk in forum WoW EMU Guides & Tutorials
    Replies: 2
    Last Post: 06-29-2012, 03:03 AM
  2. [Lua ] How to make a Gossip Menu End Up In a Vendor Window with Items.
    By Boogieflower in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 04-12-2010, 06:09 PM
  3. HOW TO MAKE A TELEPORTING ITEM! (NO Lua!)
    By Dibes in forum WoW EMU Guides & Tutorials
    Replies: 7
    Last Post: 07-27-2009, 04:24 PM
  4. How to make a teleporter npc for dummies :D
    By Maceaxe in forum WoW EMU Guides & Tutorials
    Replies: 18
    Last Post: 03-01-2009, 03:59 PM
  5. How to Make a teleporting item to teleport ya!Guide!
    By ***Munchy*** in forum WoW EMU Guides & Tutorials
    Replies: 6
    Last Post: 10-11-2008, 10:08 PM
All times are GMT -5. The time now is 12:09 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved. Digital Point modules: Sphinx-based search