[LUA] Make a GO port a player menu

User Tag List

Results 1 to 6 of 6
  1. #1
    catl2wow's Avatar Member
    Reputation
    4
    Join Date
    Nov 2007
    Posts
    11
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [LUA] Make a GO port a player

    I was trying to create a LUA script to port a player when they get close to it. I tried this to no avail. The function was never even called o.o (no output to console which is set to highest output to be sure)

    Code:
    function PortPlayersGO(pGameObject, event, pMisc)
        print("Checking for Player...");
       local player = pGameObject:GetClosestPlayer();
        if player ~= nil then
            pMisc:Teleport(609, 2438.9826, -5608.3066, 551.2224);
            print("Teleporting...");
        end
    end
    
    RegisterGameObjectEvent(666661, 5, "PortPlayersGO");

    [LUA] Make a GO port a player
  2. #2
    Mildan's Avatar Member
    Reputation
    10
    Join Date
    Feb 2009
    Posts
    80
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    pMisc:Teleport(609, 2438.9826, -5608.3066, 551.2224);

    try to change that to player:Teleport.
    It is afterall the player you want to teleport? :P

  3. #3
    Scubast3ve's Avatar Member
    Reputation
    55
    Join Date
    Apr 2009
    Posts
    125
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function PortPlayersGO(pUnit, Event, pMisc)
               pMisc:Teleport(609, 2438.9826, -5608.3066, 551.2224);
    end
    
    RegisterGameObjectEvent(666661, 2, "PortPlayersGO")
    Enjoy
    Don't Forget To Give Rep To People Who Help You.

  4. #4
    Claiver's Avatar Member
    Reputation
    138
    Join Date
    Mar 2009
    Posts
    217
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Scubast3ve View Post
    Code:
    function PortPlayersGO(pUnit, Event, pMisc)
               pMisc:Teleport(609, 2438.9826, -5608.3066, 551.2224);
    end
    
    RegisterGameObjectEvent(666661, 2, "PortPlayersGO")
    Enjoy
    That ^
    Is all you need, you took a wrong and difficult way. Take it easy .

  5. #5
    jake1124's Avatar Member
    Reputation
    2
    Join Date
    Nov 2007
    Posts
    26
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Scubast3ve View Post
    Code:
    function PortPlayersGO(pUnit, Event, pMisc)
               pMisc:Teleport(609, 2438.9826, -5608.3066, 551.2224);
    end
    
    RegisterGameObjectEvent(666661, 2, "PortPlayersGO")
    Enjoy
    Mind explaining to me how this works? like do you have to right click something or just when you get in range? and the order after

    pMisc:Teleport(609, 2438.9826, -5608.3066, 551.2224)

    X, Y, Z coords or please tell

  6. #6
    Scubast3ve's Avatar Member
    Reputation
    55
    Join Date
    Apr 2009
    Posts
    125
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I now see what you wanted and yes mine is made for clicking sorry re-read your post. What you need to check is whether 5 is on spawn.

    You also need to give an if like

    Code:
    if player:GetDistance <= 5 then -- otherwise it will port players from miles back
    Gewd luck
    Last edited by Scubast3ve; 04-30-2009 at 07:54 AM.
    Don't Forget To Give Rep To People Who Help You.

Similar Threads

  1. [Trinity] How to make creature look like a player?
    By Nefarel in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 11-11-2010, 07:37 AM
  2. Editing Wow 1.1.2 LUA makes error
    By wowDevver24 in forum WoW UI, Macros and Talent Specs
    Replies: 1
    Last Post: 01-09-2010, 11:58 AM
  3. [Lua] Make mobs with sound. And a trigger question.
    By sammiboy in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 09-26-2008, 09:04 AM
  4. [Guide][LUA] Make a mob speak/use spell on a %!
    By Meltoor in forum WoW EMU Guides & Tutorials
    Replies: 14
    Last Post: 02-29-2008, 10:41 PM
  5. [Lua] Make mobs channel spell then cast?
    By blah7 in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 01-18-2008, 03:24 PM
All times are GMT -5. The time now is 09:41 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