Simple teleporter lua script menu

User Tag List

Results 1 to 3 of 3
  1. #1
    diviee3's Avatar Sergeant Major
    Reputation
    16
    Join Date
    Jan 2010
    Posts
    176
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simple teleporter lua script

    Hey there, i'm running an Arcemu 2.4.3 server and i've been trying to make a teleporter NPC using LUA, however it wont work right. It doesn't even show up a menu or something, just the standard text i put in the NPC text table. LUA is enabled in the configs, boss LUA scripts work perfect and most other commands do too. So can anyone tell if i made mistake in my script?
    the NPC id is 104144 same as the values i put in NPC_gossip_textid and NPC_textid tables.

    here is the script:
    Code:
    function Register_OnTalk(Unit, Event, Player)
       Unit:GossipCreateMenu(104144, player, 0)
       Unit:GossipMenuAddItem(0, "Enter Awesome Arena.", 1, 0)
       Unit:GossipMenuAddItem(0, "Nevermind. 2, 0)
       Unit:GossipSendMenu(player)
    end
    
    function Register_OnSelect(Unit, Event, player, id, intid, code, pMisc)
        if (intid  == 1) then
                player:SendBroadcastMessage("Have fun!")
                player:Teleport(0, -10884.901367, 1514.177002, 91.469772)
                Unit:GossipComplete()
       end
    end
    
       if (intid == 2) then
           Unit:GossipComplete()
    end
    
    RegisterUnitGossipEvent(104144, 1, "Register_OnTalk")
    RegisterUnitGossipEvent(104144, 2, "Register_OnSelect")

    Simple teleporter lua script
  2. #2
    diviee3's Avatar Sergeant Major
    Reputation
    16
    Join Date
    Jan 2010
    Posts
    176
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no one help me cuz i have only 1 rep?

  3. #3
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Your capital letters are different in the parameters to what you use and you had your end in the wrong place. Here is a fixed version:

    Code:
    function Register_OnTalk(Unit, Event, player)
       Unit:GossipCreateMenu(104144, player, 0)
       Unit:GossipMenuAddItem(0, "Enter Awesome Arena.", 1, 0)
       Unit:GossipMenuAddItem(0, "Nevermind. 2, 0)
       Unit:GossipSendMenu(player)
    end
    
    function Register_OnSelect(Unit, Event, player, id, intid, code, pMisc)
        if (intid  == 1) then
                player:SendBroadcastMessage("Have fun!")
                player:Teleport(0, -10884.901367, 1514.177002, 91.469772)
                player:GossipComplete()
       end
       if (intid == 2) then
           player:GossipComplete()
    end
    end
    
    RegisterUnitGossipEvent(104144, 1, "Register_OnTalk")
    RegisterUnitGossipEvent(104144, 2, "Register_OnSelect")

Similar Threads

  1. What is wrong with this item teleportation Lua script ?
    By Wheeze201 in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 08-13-2009, 08:50 AM
  2. Simple LUA Script Help
    By Wolfly in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 09-02-2008, 04:22 PM
  3. Will this teleporter npc lua script work?
    By Bapes in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 05-22-2008, 11:50 AM
  4. Simple Lua Script , not working need help!
    By Arugos in forum World of Warcraft Emulator Servers
    Replies: 16
    Last Post: 12-30-2007, 02:06 PM
  5. A simple question about Lua Scripts
    By Arugos in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 12-28-2007, 01:57 AM
All times are GMT -5. The time now is 12:16 PM. 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