[Guide]Lua Scripts menu

These ads disappear when you log in.

Results 1 to 4 of 4
  1. #1
    Jgro1413's Avatar Sergeant
    Reputation
    5
    Join Date
    Nov 2007
    Posts
    47
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)

    [Guide]Lua Scripts

    Ok this is a guide on how to add lua scripts to a server because i have been getting a few pms about this.
    Enjoy xD

    Step 1. Open up notebook
    Step 2. Place the lua code in it, for example the lua teleporter code
    Code:
    --*****************************************
    --*UniversalTeleNPC script by Oxin v1.0         *
    --*Made for UniversalWoW(www.universal-wow.com)   *
    --*Everyone is free to distribute and modify to their   *
    --*needs but please leave the original credits         *
    --*****************************************
    local menunum = 33310
    local menuicon = 4
    local teleicon = 2
    local menu =
    {
       {"Arena", 0, -13246.041016, 198.820190, 30.952898},
    }
                
    function TeleNPC_MainMenu(Unit, Player)
       local i = 0
       Unit:GossipCreateMenu(menunum, Player)
       for k,v in pairs(menu) do
          i = i + 1
          if type(v[2]) == "table" then
             Unit:GossipMenuAddItem(Player, menuicon, v[1], i, 0)
             i = i + #(v[2])
          else
             Unit:GossipMenuAddItem(Player, teleicon, v[1], i, 0)
          end
       end
       Unit:GossipSendMenu(Player)
    end
    
    function TeleNPC_SubMenu(Unit, Player, i, Submenu)
       Unit:GossipCreateMenu(menunum-i, Player)
       Unit:GossipMenuAddItem(Player, 7, "<--Back", 0, 0)
       for k,v in pairs(Submenu) do
          i = i + 1
          Unit:GossipMenuAddItem(Player, teleicon, v[1], i, 0)
       end
       Unit:GossipSendMenu(Player)
    end
    
    function TeleNPC_OnGossipTalk(Unit, Event, Player)
       TeleNPC_MainMenu(Unit, Player)
    end
    
    function TeleNPC_OnGossipSelect(Unit, Event, Player, MenuId, Id, Code)
       local i = 0
       if(Id == 0) then
          TeleNPC_MainMenu(Unit,Player)
       else
          for k,v in pairs(menu) do
             i = i + 1
             if (Id == i) then
                if type(v[2]) == "table" then
                   TeleNPC_SubMenu(Unit, Player, i, v[2])
                else
                   Player:Teleport(v[2], v[3], v[4], v[5])
                   Player:GossipComplete()
                end
                return
             elseif (type(v[2]) == "table") then
                for j,w in pairs(v[2]) do
                   i = i + 1
                   if (Id == i) then
                      Player:Teleport(w[2], w[3], w[4], w[5])
                      Player:GossipComplete()
                      return
                   end
                end
             end
          end
       end
    end
    
    RegisterGossipEvent(45402, 1, "TeleNPC_OnGossipTalk")
    RegisterGossipEvent(45402, 2, "TeleNPC_OnGossipSelect")
    Step 3. Config the code to match your needs
    Step 4.Go To save as and save it as All files And name it Tele.lua
    Step 5. Go into your ac-web repack then go to ascent then find the folder called scripts
    Step 6.Add it in there
    Step 7. Restart server and enjoy
    This was made by Jgro1413 Hope this helps
    Last edited by Jgro1413; 03-12-2009 at 05:10 AM.

    These ads disappear when you log in.

  2. #2
    kajdzas's Avatar Corporal
    Reputation
    2
    Join Date
    Mar 2008
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    pls can you help me with LUA scripting??? I want some NPCs to talk (you know, when you right-click them and a window appears with some text in it). I already find that I must give the flag "1" to my NPC, but where do I store the text he has to say ? ICQ 425-692-719

  3. #3
    Shadowstalkr1415's Avatar Member
    Reputation
    2
    Join Date
    Feb 2008
    Posts
    31
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Very nice jgro1413

  4. #4
    777devil777's Avatar Knight-Captain
    Reputation
    66
    Join Date
    Sep 2007
    Posts
    396
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Originally Posted by Jgro1413 View Post
    And this also shows how to config them
    No it doesn't.

    "I am a hacker, and this is my manifesto. You may stop this individual, but you can't stop us all... after all, we're all alike."

Similar Threads

  1. [Guide] Lua Scripting Guide is here [Updating]
    By Illidan1 in forum WoW EMU Guides & Tutorials
    Replies: 93
    Last Post: 11-04-2008, 06:56 PM
  2. Lua Scripting Guide
    By [Shon3m] in forum WoW EMU Guides & Tutorials
    Replies: 6
    Last Post: 06-16-2008, 02:03 PM
  3. [Guide] Another LUA Scripting Guide
    By Bapes in forum WoW EMU Guides & Tutorials
    Replies: 13
    Last Post: 05-08-2008, 05:01 PM
  4. LuA SCRIPTING (guide)
    By Dee2001 in forum WoW EMU Guides & Tutorials
    Replies: 5
    Last Post: 03-05-2008, 11:43 AM
  5. [GUIDE] How to activate LUA scripts
    By ~SaiLyn~ in forum WoW EMU Guides & Tutorials
    Replies: 3
    Last Post: 12-25-2007, 11:52 AM
All times are GMT -5. The time now is 12:07 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved. Digital Point modules: Sphinx-based search