Lua Teleportation menu

User Tag List

Results 1 to 5 of 5
  1. #1
    Confucius's Avatar Super Moderator Don't Look Back in Anger

    CoreCoins Purchaser Authenticator enabled
    Reputation
    1418
    Join Date
    Oct 2007
    Posts
    2,810
    Thanks G/R
    302/311
    Trade Feedback
    7 (100%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Lua Teleportation

    Hi, for my server I need players to be teleported once they accept or complete the quest. I know you could make a item teleporter that could be a reward, and is it possible for spell that would teleport? I don't want a portal because then people will use it too early. So anyway want I am asking is that someone help me or makes me a Lua script for either an item or spell... the coordinates in X Y Z O are

    1802.425537, 6785.877441, 68.712860, 5.481605

    Thanks to anyone who takes the time to help me and +Rep to anyone who posts help or idea here!!!

    Thanks again :wave:

    Lua Teleportation
  2. #2
    Dynashock's Avatar Contributor

    Reputation
    176
    Join Date
    Nov 2007
    Posts
    203
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could add a quest check in the Lua script for a portal. So once someone clicks it, it will check whether the person has done the quest or not, and if he has, he'll teleport him.

    Use :HasFinishedQuest(questid) for this. Returns true/false.

    I don't have the time atm to write it so sorry for that, but I think someone else might be able to do it for you or else you can give it a try yourself.
    But if you really want a spell cast upon a player upon completion I think you can use the CastPlayer field in the quests table. Just fill in the spell you want to be casted. You can use a spell from the teleport_coords table. Pick one from there, change the coordinates and put the spell in CastPlayer. It should now teleport the player.

  3. #3
    Confucius's Avatar Super Moderator Don't Look Back in Anger

    CoreCoins Purchaser Authenticator enabled
    Reputation
    1418
    Join Date
    Oct 2007
    Posts
    2,810
    Thanks G/R
    302/311
    Trade Feedback
    7 (100%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    ok I think i'll do the spell thing because i'm much better in database and SQL than Lua ty and +repz

  4. #4
    Confucius's Avatar Super Moderator Don't Look Back in Anger

    CoreCoins Purchaser Authenticator enabled
    Reputation
    1418
    Join Date
    Oct 2007
    Posts
    2,810
    Thanks G/R
    302/311
    Trade Feedback
    7 (100%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    you also helped me fix another error with spell porting them to wrong part of org ty!!!!

  5. #5
    Kaidos's Avatar Contributor
    Reputation
    148
    Join Date
    Jun 2008
    Posts
    324
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, here is the lua solution!

    Code:
    function On_Gossip(pUnit, event, player)
     if (player:HasFinishedQuest(QUESTID) == true) then
     pUnit:GossipCreateMenu(123456, player, 0)
     pUnit:GossipMenuAddItem(0, "Teleport me!", 1, 0)
     pUnit:GossipSendMenu(player)
     else
     pUnit:SendBroadcastMessage("You need to do the quest first!")
    end
    end
    
    function Gossip_Submenus(pUnit, event, player, id, intid, code)
     if(intid == 1) then
     player:Teleport(MAPID, 1802.425537, 6785.877441, 68.712860)
    end
    end
    
    RegisterUnitGossipEvent(NPCID, 1, "On_Gossip")
    RegisterUnitGossipEvent(NPCID, 2, "Gossip_Submenus")
    Replace the QUESTID with your Quest, the MAPID with the mapid, who you want to teleport and the NPCID with the npc.

    This should work.
    Create a npc and set his flags to 1(Gossip)


    If there is any error let me know, i didnt test it.
    Last edited by Kaidos; 06-05-2009 at 01:51 AM.

Similar Threads

  1. [Problem] Blua? LUA? Teleporter problem
    By lilbdiablo12 in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 10-27-2008, 11:48 AM
  2. <Request> Lua Teleporter
    By sinofevil in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 10-07-2008, 05:45 PM
  3. [Lua] Teleport/Warp Item?
    By Pretzal in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 09-29-2008, 09:17 PM
  4. Help with lua teleporter
    By Arugos in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 09-17-2008, 09:09 AM
  5. [LUA] Teleport on spell use
    By Eponyx in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 05-24-2008, 10:10 AM
All times are GMT -5. The time now is 08:25 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