[Lua] Teleport Trigger NPC. menu

Shout-Out

User Tag List

Results 1 to 9 of 9
  1. #1
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,503
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Lua] Teleport Trigger NPC.

    This script is a basic Lua version of a C++ Area Trigger.

    This basically teleports a player when they get within range of a NPC which has a invisible display id, or is spawned really really small.

    What I prefer to do is spawn a gameobject in the form of a Instance Portal and spawn the NPC on it so when players run into it they get ported to your choice of Location.


    Code:
    --[ Teleport Script Made by Ground Zero ]--
    
    local NPC_Entry = 34502 -- Your Invisible Trigger NPC ID
    local Inrange_Distance = 3 -- Edit to your Desired Distance in Yards.
    
    function Trigger_Tele_NPC(unit, event)
        unit:RegisterEvent("Tele_Trigger", 2000, 0)
    end
    
    function Tele_Trigger(unit, event, player)
        local plrs = unit:GetInRangePlayers()
            for k, v in pairs(plrs) do
                if (unit:GetDistance(v) < Inrange_Distance) then 
                    v:Teleport(1, 16222.787109, 16267.750977, 14) -- Currently GM Island
                    v:CastSpell(64446)
                    v:SendBroadcastMessage("You have now been Teleported to LOCATION!")
                end
            end
    end
    
    RegisterUnitEvent(NPC_Entry, 18, "Trigger_Tele_NPC")
    http://pastebin.com/f6c0d215 <- Pastebin.
    Enjoy.
    Last edited by Ground Zero; 12-22-2009 at 09:59 AM.

    [Lua] Teleport Trigger NPC.
  2. #2
    Link_S's Avatar Member
    Reputation
    125
    Join Date
    Dec 2008
    Posts
    293
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First post 0.o

    Nice job converting C++ to Lua. I'm impressed cause I find Lua hard as hell. Defenitely +Rep!

    EDIT: Got to spread
    Why do I need a signature?

  3. #3
    darkwiz787's Avatar Member
    Reputation
    35
    Join Date
    Mar 2009
    Posts
    250
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Holy shit thats epic win! Jail much?

  4. #4
    thebigman's Avatar Contributor Reliable Trader
    CoreCoins Purchaser
    Reputation
    89
    Join Date
    Dec 2008
    Posts
    605
    Thanks G/R
    2/0
    Trade Feedback
    26 (96%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Meh its great and all but too many people rely on luahyparc : / Good script though, +rep.

  5. #5
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by thebigman View Post
    Meh its great and all but too many people rely on luahyparc : / Good script though, +rep.

    You know none of the functions/commands he uses in that script requires LuaHypArc?

  6. #6
    Reflection's Avatar Legendary
    Reputation
    783
    Join Date
    Mar 2008
    Posts
    3,377
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very nice work GZ!

    Freelance Digital Artist
    https://reflectionartwork.deviantart.com
    You did not desert me
    My brothers in arms


  7. #7
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,503
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Reflection View Post
    Very nice work GZ!
    Cheers.

  8. #8
    Daskin's Avatar Member
    Reputation
    1
    Join Date
    Jul 2009
    Posts
    27
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by stoneharry View Post

    You know none of the functions/commands he uses in that script requires LuaHypArc?
    It seems most people think tables = LuaHypArc.

  9. #9
    zade749's Avatar Member
    Reputation
    20
    Join Date
    Sep 2009
    Posts
    26
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its a pretty basic lua actually, but its still nice work

Similar Threads

  1. Npc Lua Teleport Script
    By B14d3r11 in forum WoW EMU Guides & Tutorials
    Replies: 11
    Last Post: 08-21-2009, 04:58 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. [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
  5. 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
All times are GMT -5. The time now is 11:44 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