PDA

View Full Version : [Release-LuaHypArc] Teleporter with Chat Commands



Onlykl
14-11-09, 11:37 AM
Here is Script that i made now... I saw something like this on ac-web so i got an idea...
Teleporter in chat... Example if you want to go in Orgrimmar and you cant find teleporter just type #Orgrimmar...
You must have LuaHypArc to get this working...
You can get it from here: LuaHypArc - Revision 25: /installer (http://my-svn.assembla.com/svn/LuaHypArc/installer)



print("LunarSCR Teleporter- Do not remove credits,Please.")


-- Messages:
local RELOAD_MSG = "#Reload"
local SHATTRATH_MSG = "#Shattrath"
local DALARAN_MSG = "#Dalaran"
local ORGRIMMAR_MSG = "#Orgrimmar"
local THUNDERBLUFF_MSG = "#Thunderbluff"
local SILVERMOON_MSG = "#Silvermoon"
local UNDERCITY_MSG = "#Undercity"
local STORMWIND_MSG = "#Stormwind"
local IRONFORGE_MSG = "#Ironforge"
local EXODAR_MSG = "#Exodar"
local DARNASSUS_MSG = "#Darnassus"
local GURUBASHI_MSG = "#Gurubashi"
local MALL_MSG = "#Mall"
local REVIVE_MSG = "#Revive"
local LEVELROAD_MSG = "#LvlRoad"
local REMOVERESS_MSG = "#RemoveRess"
local HEAL_MSG = "#Heal"
local REPAIRGNOME_MSG = "#RepairMe"
local SETLEVEL_MSG = "#Level80"
local BUFFS_MSG = "#Buffs"
local DRINK_MSG = "#drink"
local FOOD_MSG = "#food"
local COMMANDLIST_MSG = "#commands"

-- Config:
local MALL = {MAP = 0, X = 0, Y = 0, Z = 0} -- change to the map, x, y, and z coordinates of your mall (self explanatory).
local LEVELROAD= {MAP = 0, X = 0, Y = 0, Z = 0} -- change to the map, x, y, and z coordinates of your Leveling Road (self explanatory).
local BUFFIDS = {58452, 48104, 48102, 48469, 61024, 20217, 48161, 48073, 48169, 54675, 15366, 33077, 53307, 43017, 5697, 132, 1706, 16618, 48100, 58451} -- add/remove spell IDs for buffs (used in the buff command).
local FOOD_ID = 45932 -- change to the entry ID for the food to be added to the player (20 of the item is added each time).
local DRINK_ID = 42777 -- same as food, just the drink's entry ID
-- Config end.
-- Do not change anything below this unless you know what you're doing.

function OnChat(event, pPlayer, message, type, language)
if(message == RELOAD_MSG and pPlayer:IsGm()) then
ReloadLuaEngine()
end
if(message == ORGRIMMAR_MSG) then
pPlayer:Teleport(1, 1502.71, -4415.42, 22.5512)
end
if(message == THUNDERBLUFF_MSG) then
pPlayer:Teleport(1, -1285.42, 176.523, 130.994)
end
if(message == SILVERMOON_MSG) then
pPlayer:Teleport(530, 9414.18, -7278.97, 15.2031)
end
if(message == UNDERCITY_MSG) then
pPlayer:Teleport(0, 1831.26, 238.53, 61.52)
end
if(message == STORMWIND_MSG) then
pPlayer:Teleport(0, -8913.23, 554.633, 94.7944)
end
if(message == IRONFORGE_MSG) then
pPlayer:Teleport(0, -4981.25, -881.542, 502.66)
end
if(message == EXODAR_MSG) then
pPlayer:Teleport(530, -4014.08, -11895.8, -0.99324)
end
if(message == DARNASSUS_MSG) then
pPlayer:Teleport(1, 8795.8, 969.427, 31.1955)
end
if(message == REPAIRGNOME_MSG) then
local x = pPlayer:GetX ()
local y = pPlayer:GetY ()
local z = pPlayer:GetZ ()
local o = pPlayer:GetO ()
pPlayer:SpawnCreature (19383, x, y, z, o, 35, 70000)
end
if (message == MALL_MSG) then
plr:Teleport(MALL.MAP, MALL.X, MALL.Y, MALL.Z)
end
if(message == REVIVE_MSG) then
pPlayer:CastSpell(50768)
end
if (message == LEVELROAD_MSG) then
plr:Teleport(LEVELROAD.MAP, LEVELROAD.X, LEVELROAD.Y, LEVELROAD.Z)
end
if(message == HEAL_MSG) then
pPlayer:CastSpell(58053)
end
if (message == BUFF_MSG) then
for k, v in pairs(BUFFIDS) do
plr:CastSpell(v) -- plr:AddAura(v, 600000, true)
end
if(message == REMOVERESS_MSG) then
pPlayer:LearnSpell(15007)
pPlayer:UnlearnSpell(15007)
end
if(message == SETLEVEL_MSG) then
if(pPlayer:PlayerLevel() < 80) then
pPlayer:SetPlayerLeveL(80)
end
elseif (pPlayer:GetPlayerLevel() == 80) then
pPlayer:SendChatMessageToPlayer(15, 0, "You are already 80!)
end
if(message == GURUBASHI_MSG) then
pPlayer:Teleport(0, -13152.9, 342.729, 53.1328)
end
if(message == DALARAN_MSG) then
pPlayer:Teleport(571, 5785.24, 724.91, 641.081)
end
if(message == SHATTRATH_MSG) then
pPlayer:Teleport(530, -1722.58, 5382.7, 2.47504)
end
if (message == FOOD_MSG) then
plr:AddItem(FOOD_ID, 20)
end
if (message == DRINK_MSG) then
plr:AddItem(DRINK_ID, 20)
end
if (message == COMMANDLIST_MSG) then
plr:SendBroadcastMessage("Current commands:\n"..ORGRIMMAR_MSG.." - teleports you to the Orgimmar.\n"..THUNDERBLUFF_MSG.." - teleports you to the ThunderBluff.\n"..SILVERMOON_MSG.." - teleports you to the SilverMoon.\n"..UNDERCITY_MSG.." - teleports you to the UnderCity.\n"..STORMWIND_MSG.." - teleports you to the StormWind.\n"..IRONFORGE_MSG.." - teleports you to the IronForge.\n"..EXODAR_MSG .." - teleports you to the Exodar.\n"..DARNASSUS_MSG.." - teleports you to the Darnassus.\n"..REPAIRGNOME_MSG.." - Are you broken!??? Ohh damn call then our mighty gnome with this command.\n"..HEAL_MSG.." - Do you need HEAL?? Then this is right Command for you.\n"..REMOVERESS_MSG.." - Revmove your ressickness.\n"..SETLEVEL_MSG.." - Level you up to level 80.\n"..GURUBASHI_MSG.." - teleports you to the Gurubashi Arena.\n"..DALARAN_MSG.." - teleports you to the Dalaran.\n"..SHATTRATH_MSG.." - teleports you to the Shattrath.\n"..LEVELROAD_MSG.." - teleports you to the Leveling Road.\n"..MALL_MSG.." - teleports you to the mall.\n"..FOOD_MSG.." - adds food to your inventory.\n"..DRINK_MSG.." - adds drink to your inventory.\n"..BUFF_MSG.." - adds a number of buffs to you.\n"..COMMANDLIST_MSG.." - displays a list of commands.")
end
end


RegisterServerHook(16, "OnChat")

enegue
16-11-09, 03:57 AM
Cool. Another nice work done with LuaHypArc!

Dimman
16-11-09, 11:02 AM
Nice release, thanks for contributing :D +rep

Wolferine
16-11-09, 04:00 PM
Hand out credits miss!

enegue
17-11-09, 03:31 AM
Credits? Whatever for? He made it :o

Wolferine
17-11-09, 09:05 AM
He "combined" it, that's something different than scripting it yourself.
And by the way it's not working anyway.

enegue
18-11-09, 03:28 AM
Do you have LuaHypArc?