Ok this is a guide on how to add lua scripts to a server because i have been getting a few pms about this.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 