Code:
--[[====================================--
-- The Good Dr.'s Script --
--======================================-- --
-- Lua Level Helper --
-- --
-- By Justin/Dr. Livingstone --
--======================================--]]
LEVER_HELPER_VERSION = 1.0
--[[========================== Config ===============================]]--
-- General Config --
AllowMallTele = true -- [True/False] If set to true it allows people to teleport to the mall of their faction. If false then they are not allowed to
HordeMall = "map, x, y, z" -- Set these to the X, Y, and Z coordinates of your Horde Mall
AllianceMall = "map, x, y, z" -- Set these to the X, Y, and Z coordinates of your Alliance Mall
UsableInCombat = false -- [True/False] If you want people to be able to use the porter in combat then set to true. If not set to false.
ErrorCombatMessage = "You cannot use the Level Helper while in combat. That would be cheating" -- What you want it to tell the player if they aren't allowed to use it in combat, but still attempt to
NotLevel10Message = "I suggest grinding on a few mobs until you reach level 10"
ItemID = ChangeThis! -- The item id for your level helper. Set to whatever you want
Level80NoUse = "You are level 80. I am no longer any help to you..." -- What you want the level helper to tell people if they aren't allowed to use it at level 80
--[[========================= Level Helper ===============================]]--
function LEVEL_HELPER_START(Item, Player)
if (player:IsInCombat() == true) and (UsableInCombat == false) then -- If the player is in combat at you want them to not be able to use the level helper in combat then it will show the ErrorCombatMessage
player:SendAreaTriggerMessage(" - "..ErrorCombatMessage.." - ")
else
if (player:GetFaction() == 1) and (AllowMallTele == true) and (player:GetPlayerLevel() < 80) then -- If player is Horde and they are allowed to tele to the mall then this menu will appear
Item:GossipCreateMenu(1234, Player, 0)
Item:GossipMenuAddItem(8, "Take me to level!", 1)
Item:GossipmenuAddItem(9, "Take me to the mall!", 2)
Item:GossipSendMenu(Player)
end
if (player:GetFaction() == 1) and (AllowMallTele == false) and (player:GetPlayerLevel() < 80) then -- If player is Horde and they aren't allowed to tele to the mall then this window will appear
Item:GossipCreateMenu(1234, Player, 0)
Item:GossipMenuAddItem(8, "Take me to level!", 1)
Item:GossipSendMenu(Player)
end
if (player:GetFaction() == 0) and (AllowMallTele == true) and (player:GetPlayerLevel() < 80) then -- If player is Ally and they are allowed to tele to the mall then this window will appear
Item:GossipCreateMenu(1234, Player, 0)
Item:GossipMenuAddItem(8, "Take me to level!", 3)
Item:GossipMenuAddItem(9, "Take me to the mall!", 4)
Item:GossipSendMenu(Player)
end
if (player:GetFaction() == 0) and (AllowMallTele == false) and (player:GetPlayerLevel() < 80) then -- If player is Ally and they aren't allowed to tele to mall then this menu will appear
Item:GossipCreateMenu(1234, Player, 0)
Item:GossipMenuAddItem(8, "Take me to level!" 3)
Item:GossipSendMenu(Player)
end
if (player:GetPlayerLevel() == 80) and (player:GetFaction() == 0) and (AllowMallTele == true) then -- If the player is Ally and level 80 it will show just the mall tele
Item:GossipCreateMenu(1234, Player, 0)
Item:GossipMenuAddItem(8, "Take me to the mall!", 4)
Item:GossipSendMenu(Player)
end
if (player:GetPlayerLevel() == 80) and (player:GetFaction() == 1) and (AllowMallTele == true) then -- If the player is Horde and level 80 it will show just the mall tele
Item:GossipCreateMenu(1234, Player, 0)
Item:GossipMenuAddItem(8, "Take me to the mall!", 2)
end
if (player:GetPlayerLevel() == 80) and (AllowMallTele == false) then
player:SendAreaTriggerMessage(" - "..Level80NoUse.." - ")
end
end
end
LEVEL = player:GetPlayerLevel()
if (intid == 3) then -- Ally "Take me to level!"
if (LEVEL < 10) then
player:SendAreaTriggerMessage(" - "..NotLevel10Message.." - ")
end
if (LEVEL >= 10) and (LEVEL <= 13) then
player:Teleport(0, -4803.404785, -2927.534912, 328.762360)
end
if (LEVEL >= 14) and (LEVEL <= 17) then
player:Teleport(0, -9703.644531, -2209.830811, 57.845242)
end
if (LEVEL >= 18) and (LEVEL <= 21) then
player:Teleport(0, -11123.652344, 1190.825439, 64.072624)
end
if (LEVEL >= 22) and (LEVEL <= 25) then
player:Teleport(0, -9277.922852, -3028.409424, 118.868683)
end
if (LEVEL >= 26) and (LEVEL <= 29) then
player:Teleport(0, -10967.732422, -269.651428, 22.439180)
end
if (LEVEL >= 30) and (LEVEL <= 33) then
player:Teleport(0, -11643.402344, -560.218262, 33.483208)
end
if (LEVEL >= 34) and (LEVEL <= 37) then
player:Teleport(0, -11930.924805, -593.189575, 16.999115)
end
if (LEVEL >= 38) and (LEVEL <= 41) then
player:Teleport(0, -12898.222656, -789.831116, 51.99805)
end
if (LEVEL >= 42) and (LEVEL <= 45) then
player:Teleport(0, -6726.391602, -1628.368042, 193.653915)
end
if (LEVEL >= 46) and (LEVEL <= 49) then
player:Teleport(0, -10900.470703, -2933.303223, 12.872971)
end
if (LEVEL >= 50) and (LEVEL <= 53) then
player:Teleport(0, -11240.953125, -3340.238770, 9.179361)
end
if (LEVEL >= 54) and (LEVEL <= 57) then
player:Teleport(0, 2726.371826, -1679.125854, 126.680740)
end
if (LEVEL >= 58) and (LEVEL <= 61) then
player:Teleport(530, -796.510498, 2181.584229, 10.901132)
end
if (LEVEL >= 62) and (LEVEL <= 64) then
player:Teleport(530, -473.192444, 3729.304688, 29.000946)
end
if (LEVEL >= 65) and (LEVEL <= 66) then
player:Teleport(530, -2699.693604, 6406.205566, 37.739193)
end
if (LEVEL >= 67) and (LEVEL <= 68) then
player:Teleport(530, 2332.901367, 2597.108398, 127.917793)
end
if (LEVEL >= 69) and (LEVEL <= 70) then
player:Teleport(530, 4366.186523, 3245.312744, 146.430984)
end
if (LEVEL >= 71) and (LEVEL <= 72) then
player:Teleport(571, 1043.915649, -4395.568359, 161.937683)
end
if (LEVEL >= 73) and (LEVEL <= 74) then
player:Teleport(571, 3750.131104, -11020.486206, 120.679367)
end
if (LEVEL >= 75) and (LEVEL <= 76) then
player:Teleport(571, 3801.111816, -3839.009003, 175.423004)
end
if (LEVEL >= 77) and (LEVEL <= 78) then
player:Teleport(571, 6962.209961, -1576.280029, 879.349976)
end
if (LEVEL == 79) then
player:Teleport(571, 7021.106445, -1684.665649, 819.533203)
end
end
if (intid == 4) then
player:Teleport(AllyMall)
end
if (intid == 2) then
player:Teleport(HordeMall)
end
if (intid == 3) then -- Horde "Take me to level!"
if (LEVEL < 10) then
player:SendAreaTriggerMessage(" - "..NotLevel10Message.." - ")
end
if (LEVEL >= 11) and (LEVEL <= 13) then
player:Teleport(1, -39.206371, -2956.889648, 94.633240)
end
if (LEVEL >= 14) and (LEVEL <= 17) then
player:Teleport(530, 7215.870117, -7456.700195, 55.805698)
end
if (LEVEL >= 18) and (LEVEL <= 21) then
player:Teleport(1, -3883.204102, -1695.575195, 92.901695)
end
if (LEVEL >= 22) and (LEVEL <= 25) then
player:Teleport(1, -4971.795410, -2152.113525, -36.372494)
end
if (LEVEL >= 26) and (LEVEL <= 29) then
player:Teleport(1, -4986.696777, -1946.943115, 82.353615)
end
if (LEVEL >= 30) and (LEVEL <= 33) then
player:Teleport(0, -1713.078247, -3172.283203, 28.566423)
end
if (LEVEL >= 34) and (LEVEL <= 37) then
player:Teleport(0, -1583.758545, -3105.699707, 24.253660)
end
if (LEVEL >= 38) and (LEVEL <= 41) then
player:Teleport(1, -3764.590332, -3445.596191, 37.592896)
end
if (LEVEL >= 42) and (LEVEL <= 45) then
player:Teleport(1, -7342.144043, -4560.302246, 10.579253)
end
if (LEVEL >= 46) and (LEVEL <= 49) then
player:Teleport(1, -7980.592285, -5320.064453, 12.382618)
end
if (LEVEL >= 50) and (LEVEL <= 53) then
player:Teleport(0, 1146.042725, -1765.793091, 61.565624)
end
if (LEVEL >= 54) and (LEVEL <= 57) then
player:Teleport(0, 1308.166992, -1234.708862, 62.679840)
end
if (LEVEL >= 58) and (LEVEL <= 61) then
player:Teleport(530, -1148.066162, 2676.270752, 2.865906)
end
if (LEVEL >= 62) and (LEVEL <= 64) then
player:Teleport(530, -2350.550293, 3338.223633, -2.462904)
end
if (LEVEL >= 65) and (LEVEL <= 66) then
player:Teleport(530, -2501.895752, 8022.805176, 48.207684)
end
if (LEVEL >= 67) and (LEVEL <= 68) then
player:Teleport(530, 3638.767822, 6781.376465, 132.400421)
end
if (LEVEL >= 69) and (LEVEL <= 70) then
player:Teleport(530, -2929.804688, 1612.546143, 45.346500)
end
if (LEVEL >= 71) and (LEVEL <= 72) then
player:Teleport(571, 3547.870850, 5423.767090, 40.976692)
end
if (LEVEL >= 73) and (LEVEL <= 74) then
player:Teleport(571, 3814.961182, 6736.256348, 160.340118)
end
if (LEVEL >= 75) and (LEVEL <= 76) then
player:Teleport(571, 5147.963379, -2801.662598, 289.703644)
end
if (LEVEL >= 77) and (LEVEL <= 78) then
player:Teleport(571, 5203.854980, 5734.003960, -83.279434)
end
if (LEVEL == 79) then
player:Teleport(571, 7362.846191, 2591.395996, 393.425079)
end
end
RegisterItemGossipEvent(ItemID, 1, "LEVEL_HELPER_START")
Credits: