[Template] LUA Teleporter NPC and Mini guide!! menu

User Tag List

Results 1 to 14 of 14
  1. #1
    Jackie Moon's Avatar Elite User
    Reputation
    407
    Join Date
    May 2008
    Posts
    922
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Template] LUA Teleporter NPC and Mini guide!!

    Hey guys im going to be giving you a already made basic Teleporter NPC and a guide so you can customize it you your own desires!!

    First off if you don't know how to save LUA files i'll be putting download links at bottom!

    Step 1: The NPC

    Your going to need a NPC for your Teleporter either you can make two to dislike a faction or have one neutral NPC (which i use).

    Here is the NPC

    Code:
    insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`) 
    values ('76666', "Taxi", "Teleporter NPC", '', '0', '7', '0', '3', '0', '0', '27545', '0', '0', '0', '1', '1', '1', '0');
    
    insert into `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `can_ranged`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`, `modImmunities`) 
    values ('76666', '80', '80', '7', '9000000', '9000000', '100000', '1', '1', '1000', '0', '99999', '99999', '0', '0', '0', '0', '3600', '20000', '9999', '9999', '9999', '9999', '9999', '9999', '0', '0', "0", '1', '0', '0', '0', '2.50', '8.00', '14.00', '0', '0', '0', '0', '0', '0', '0');
    Here is the SQL file download : DOWNLOAD NOW!

    Copy that into a file and save as an SQL file!

    Open Navicat or what program you use and execute it into your database

    ID: 76666

    To spawn in game .npc spawn 76666

    Step 2: The Teleporter LUA

    This LUA consists of cities only, you talk to the NPC and he will teleport you to the main cities including Dalaran

    Here is the Already made LUA Teleporter : DOWNLOAD HERE!

    Put it into your Scripts folder and not your Scripts bin folder!

    Here is the Template:

    Code:
    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: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: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 == 300) then
    player:Teleport(MapID, X, Y, Z)
    unit:GossipComplete(player)
    end
    
    if(intid == 301) then
    player:Teleport(MapID, X, Y, Z)
    unit:GossipComplete(player)
    end
    
    if(intid == 302) then
    player:Teleport(MapID, X, Y, Z)
    unit:GossipComplete(player)
    end
    
    if(intid == 303) then
    player:Teleport(MapID, X, Y, Z)
    unit:GossipComplete(player)
    end
    
    if(intid == 304) then
    player:Teleport(MapID, X, Y, Z)
    unit:GossipComplete(player)
    end
    
    if(intid == 305) then
    player:Teleport(MapID, X, Y, Z)
    unit:GossipComplete(player)
    end
    
    if(intid == 306) then
    player:Teleport(MapID, X, Y, Z)
    unit:GossipComplete(player)
    end
    
    if(intid == 307) then
    player:Teleport(MapID, X, Y, Z)
    unit:GossipComplete(player)
    end
    
    if(intid == 308) then
    player:Teleport(MapID, X, Y, Z)
    unit:GossipComplete(player)
    end
    
    if(intid == 309) then
    player:Teleport(MapID, X, Y, Z)
    unit:GossipComplete(player)
    end
    end
    
    RegisterUnitGossipEvent(EntryID, 1, "On_Gossip")
    RegisterUnitGossipEvent(EntryID, 2, "Gossip_Submenus")

    Ok here we go:

    For: unit:GossipMenuAddItem(2, "Neutral Cities", 1, 0)

    This lets you add menus for when you talk to your NPC

    Each Time you Add a Menu make sure you change the Red
    so it orders in
    2
    3
    4 ect..

    For the Name you name it to where you want to go!

    Next part!

    For: unit:GossipMenuAddItem(1, "Orgrimmar", 305, 0)

    it is basically the Submenu and when you click it you will teleport there.

    for the RED make sure EACH one is different! or it won't work!

    It Must also match this:

    if(intid == 305) then
    player:Teleport(MapID, X, Y, Z)
    unit:GossipComplete(player)
    end

    Then you go ingame and type .gps and fill out the Green with what comes up!

    That pretty much covers the basics, if you practice and read through it you will be fine. Post if you need help
    Last edited by Jackie Moon; 01-17-2009 at 12:27 AM.
    Check out my YouTube: SkeetzGaming

    [Template] LUA Teleporter NPC and Mini guide!!
  2. #2
    Siora's Avatar Member
    Reputation
    4
    Join Date
    Dec 2008
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice Teleporter

  3. #3
    svedin's Avatar Contributor
    Reputation
    124
    Join Date
    Jun 2008
    Posts
    557
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice guide jackie ^^ and good work.

  4. #4
    willitsc's Avatar Member
    Reputation
    2
    Join Date
    Aug 2008
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice man ty!

  5. #5
    willitsc's Avatar Member
    Reputation
    2
    Join Date
    Aug 2008
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks this will help me alot!

  6. #6
    Shurakai's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've got the NPC spawning, but I'm not quite sure where to put the .lua (it's now in the Scripts folder..). That, or I just don't know what to do to get it to USE the .lua file.

  7. #7
    Jackie Moon's Avatar Elite User
    Reputation
    407
    Join Date
    May 2008
    Posts
    922
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys

    Shurakai put the LUA file into your Scripts file in your repack.
    Check out my YouTube: SkeetzGaming

  8. #8
    WesM63's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks! Simple and Easy.

  9. #9
    the_venom's Avatar Member
    Reputation
    1
    Join Date
    Oct 2007
    Posts
    55
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dude What Command its For Limit "horde Citys" For faction 2 (horde) and "aliance Citys" For faction 1 (Allys) Thanks :P +rep for anwers

  10. #10
    Nymphx's Avatar Active Member
    Reputation
    83
    Join Date
    Sep 2008
    Posts
    212
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I like this, alot. Good idea and will help alot of people. +Rep

  11. #11
    Shurakai's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I put the LUA in the Scripts folder (C:\Documents and Settings\Matthew\My Documents\ArcEmu\scripts) and it's not affecting the npc at all. Like, WoW isn't recognising it's there... any way to tell it to read it? I can spawn the npc (since it's in the sql), and I can talk to the NPC... It just has some simple message like, "What can I do for you" or something like that. No options or anything.

    I've gone into my config file, and made sure LUA was turned on:
    <ScriptBackends LUA="1"
    AS="1">
    And now, I don't know what else I need to do....

    Addition: Sorry to be a nub lol, still trying to figure this LUA part out with a few diff things....

  12. #12
    lol97899's Avatar Contributor
    Reputation
    104
    Join Date
    Nov 2008
    Posts
    262
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    rep for you

    the best guide in the world

  13. #13
    Mircast's Avatar Member
    Reputation
    14
    Join Date
    Sep 2008
    Posts
    139
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Shurakai View Post
    I put the LUA in the Scripts folder (C:\Documents and Settings\Matthew\My Documents\ArcEmu\scripts) and it's not affecting the npc at all. Like, WoW isn't recognising it's there... any way to tell it to read it? I can spawn the npc (since it's in the sql), and I can talk to the NPC... It just has some simple message like, "What can I do for you" or something like that. No options or anything.

    I've gone into my config file, and made sure LUA was turned on:
    <ScriptBackends LUA="1"
    AS="1">
    And now, I don't know what else I need to do....

    Addition: Sorry to be a nub lol, still trying to figure this LUA part out with a few diff things....
    Code:
    RegisterUnitGossipEvent(EntryID, 1, "On_Gossip")
    RegisterUnitGossipEvent(EntryID, 2, "Gossip_Submenus")
    Make sure you've actually inserted the NPC entry Id in there, otherwise it doesn't know which NPC to add the script to.

  14. #14
    evenios's Avatar Member
    Reputation
    2
    Join Date
    Feb 2008
    Posts
    12
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    teleporters are our friend~!

Similar Threads

  1. i need help with a LUA teleport item and buff item...
    By trujillo in forum WoW EMU Questions & Requests
    Replies: 17
    Last Post: 09-16-2009, 02:05 AM
  2. WoW LUA Teleport NPC
    By Warlord651 in forum World of Warcraft General
    Replies: 1
    Last Post: 07-19-2009, 04:58 PM
  3. [Guide] LUA teleporter NPC template and guide!!
    By Jackie Moon in forum WoW EMU Guides & Tutorials
    Replies: 34
    Last Post: 04-07-2009, 03:36 PM
  4. LUA Teleporter NPC Template and Guide!! (easy)
    By Jackie Moon in forum WoW EMU Guides & Tutorials
    Replies: 10
    Last Post: 02-20-2009, 07:38 PM
  5. [MANGOS] Teleporter NPC and Class/Profession Trainers
    By Ashyda in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 08-13-2008, 06:30 AM
All times are GMT -5. The time now is 06:35 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