Forum
 
Go Back   D3scene > Hot Games > World of Warcraft > WoW Guides
Free Registration Blogs Downloads D3Live! FAQ Members List Calendar Search Today's Posts Mark Forums Read TS2

[Guide]Lua Scripts

This is a discussion on [Guide]Lua Scripts within the WoW Guides forum part of the World of Warcraft category; Ok this is a guide on how to add lua scripts to a server and this also shows how to ...

Not A Member Yet? Register for free today and become part of our community. You get full features and no Ads!

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 06-22-2008, 01:09 AM
Kero21's Avatar
Premium Member
 
Join Date: Dec 2007
Location: South Lake Tahoe, CA
Posts: 190
Reputation: 91
Rep Power: 1
Kero21 will become famous soon enough
[Guide]Lua Scripts

Ok this is a guide on how to add lua scripts to a server and this also shows how to config them
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
Reply With Quote
D3scene
Welcome to D3scene - probably the best location for all Gamers.

To participate in our friendly environment you have to register. After completing registration you will have full access to all threads and features. We care about members and try to make your stay as pleasant as possible. We are unique with the following feature for members - you will not see a single Advertisement!

The best: registration is completely free. It will not cost you a single penny or harm you in any way. You will lose nothing except 1 minute of your time. So why not register? We would be happy to see you around!
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Release] Learner LUA Scripts bomber WoW Private Server Info & Help 2 06-16-2008 03:45 AM
Antfamous Gauntlet Bot v1.8 for mmBot tschoerk Diablo 2 Bots 3 11-21-2007 04:55 PM
Package with autos+Scar scripts tschoerk Runescape 4 10-23-2007 04:18 PM
CHEAT PACK 145 Autos and clients Scar scripts and more [1sk]GODLIKE Runescape 44 08-22-2007 02:12 AM
Scripts for AC tool Ginzo Lineage 2 Hacks 0 04-19-2007 03:29 PM


All times are GMT +1. The time now is 02:52 AM.


vBulletin style developed by Transverse Styles
Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.

»About D3scene »Navigation