Hey! Im starting to get into Lua scripting, and Im having some problems with 2 of my scripts. Maybe some experienced could give me a hand here? ;D
This one is meant to teleport you to the mall when you write #mall
Code:
function TeleMall(event, plr, message, type, language)
if message == "#Mall" then
Unit:Teleport(530, -1020.459534, 8993.460938, 266.606812, 2.87692)
end
end
RegisterServerHook(16, TeleMall)
And this other one just to force people to join global channel when they enter the realm.
Code:
function OnEnterWorld(event, plr, message, type, language)
Unit:SendBroadcastMessage("|cFFFFCC00You have autojoined the Global channel,|r |cFFCC6600"..Unit:GetName()..".|r")
Unit:JoinChannel(Global)
end
RegisterServerHook(4, "OnEnterWorld")
Hope someone can help me out.