[Guide] LUA teleporter NPC template and guide!! menu

User Tag List

Page 1 of 3 123 LastLast
Results 1 to 15 of 35
  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)

    [Guide] LUA teleporter NPC template and 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:30 AM.
    Check out my YouTube: SkeetzGaming

    [Guide] LUA teleporter NPC template and guide!!
  2. #2
    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)
    Please Post Comments ive had 45 downloads and views but no replys ty.
    Check out my YouTube: SkeetzGaming

  3. #3
    Grimmrreaper's Avatar Member
    Reputation
    1
    Join Date
    Feb 2007
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nicely done, thanks for the post!

  4. #4
    googleforloss's Avatar Corporal
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    23
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lol, where is the scripts folder, I Don't have one, only a Script_bin one. :S

  5. #5
    sasoritail's Avatar Contributor
    Reputation
    161
    Join Date
    Sep 2008
    Posts
    655
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by googleforloss View Post
    Lol, where is the scripts folder, I Don't have one, only a Script_bin one. :S
    just make a folder named: scripts
    Then put the LUA file in there.
    It's been a while

  6. #6
    sasoritail's Avatar Contributor
    Reputation
    161
    Join Date
    Sep 2008
    Posts
    655
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice Love ur work!
    :wave:
    It's been a while

  7. #7
    sve3nn's Avatar Sergeant
    Reputation
    43
    Join Date
    Mar 2008
    Posts
    61
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is an finished teleporter

    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:GossipMenuAddItem(2, "Buff Me!", 9, 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, "I'll Take A Little Boost, Thanks!", 9, 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(571, 5809.805664, 651.377075, 647.504602)
    unit:GossipComplete(player)
    end
    
    if(intid == 301) then
    player:Teleport(0, -8832.935547, 625.797485, 93.914894)
    unit:GossipComplete(player)
    end
    
    if(intid == 302) then
    player:Teleport(0, -4924.375488, -950.865112, 501.547333)
    unit:GossipComplete(player)
    end
    
    if(intid == 303) then
    player:Teleport(1, 9945.676758, 2482.677979, 1316.198853)
    unit:GossipComplete(player)
    end
    
    if(intid == 304) then
    player:Teleport(530, -3946.064941, -11727.777344, -138.922562)
    unit:GossipComplete(player)
    end
    
    if(intid == 305) then
    player:Teleport(1, 1502.709961, -4415.419922, 21.552706)
    unit:GossipComplete(player)
    end
    
    if(intid == 306) then
    player:Teleport(0, 1560.453857, 244.334030, -43.102592)
    unit:GossipComplete(player)
    end
    
    if(intid == 307) then
    player:Teleport(1, -1195.436523, 34.784081, 132.40137)
    unit:GossipComplete(player)
    end
    
    if(intid == 308) then
    player:Teleport(530, 9496.041016, -7282.289551, 14.318037)
    unit:GossipComplete(player)
    end
    
    if(intid == 309) then
    player:Teleport(530, -1721.940063, 5382.318359, 1.537373)
    unit:GossipComplete(player)
    end
    
    if(intid == 9) then
    unit:FullCastSpellOnTarget(58451, player)
    unit:FullCastSpellOnTarget(48100, player)
    unit:FullCastSpellOnTarget(58453, player)
    unit:FullCastSpellOnTarget(48104, player)
    unit:FullCastSpellOnTarget(48102, player)
    unit:FullCastSpellOnTarget(58449, player)
    end
    end
    
    RegisterUnitGossipEvent(EntryID, 1, "On_Gossip")
    RegisterUnitGossipEvent(EntryID, 2, "Gossip_Submenus")

  8. #8
    janvflord'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)
    tha,nk worked +rep

  9. #9
    Rickpwns's Avatar Member Authenticator enabled
    Reputation
    2
    Join Date
    Jan 2009
    Posts
    23
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dont work for me, please help?

  10. #10
    nakom's Avatar Member
    Reputation
    2
    Join Date
    Sep 2008
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    says u have a error on ur SQL syntax; check the manual that corrersponds with ur MYSQL version for the right syntax near 'Function On_Gossip(unit,event,player)
    unit:GossipCreateMenu(3544,Player,0)
    ' at line 1

    Please help! Thanks MSN - [email protected]

  11. #11
    googleforloss's Avatar Corporal
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    23
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just wondering, Once I got the vendor in, how to get the mobs and NPC's etc. to stop moving backwards. Lol they are all moving backwards.

  12. #12
    Clain's Avatar Banned
    Reputation
    179
    Join Date
    Jan 2008
    Posts
    1,396
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by nakom View Post
    says u have a error on ur SQL syntax; check the manual that corrersponds with ur MYSQL version for the right syntax near 'Function On_Gossip(unit,event,player)
    unit:GossipCreateMenu(3544,Player,0)
    ' at line 1

    Please help! Thanks MSN - [email protected]
    Lua script != SQL query. Save it as an .lua file and put it in your /scripts folder.

  13. #13
    Im2smart4u20's Avatar Member
    Reputation
    1
    Join Date
    Dec 2008
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, when i did the NPC download, it said "[Err] 1062 - Duplicate entry '76666' for key 1
    [Err] 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');
    [Msg] Finished - Unsuccessfully
    --------------------------------------------------"

  14. #14
    googleforloss's Avatar Corporal
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    23
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do I need to add the field 'can_ranged' and 'modimmunities' to my creature_proto table? to get the dam npc to execute into the Database >.<

  15. #15
    Suderk's Avatar Member
    Reputation
    7
    Join Date
    Feb 2009
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    good guide.....thank you for sharing it.

Page 1 of 3 123 LastLast

Similar Threads

  1. [Lua] teleport NPC ,teleport to mall wont work
    By thim99 in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 04-19-2010, 10:09 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. [Template] LUA Teleporter NPC and Mini guide!!
    By Jackie Moon in forum WoW EMU General Releases
    Replies: 13
    Last Post: 03-15-2009, 04:07 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. [Guide] Creating and Compiling a Teleporter NPC
    By Gastricpenguin in forum WoW EMU Guides & Tutorials
    Replies: 59
    Last Post: 10-29-2007, 03:06 PM
All times are GMT -5. The time now is 07:26 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