Code:
LEVER_HELPER_VERSION = 2.0
--[[===================== Under Construction =================================]]--
--[[
Repair Option: Allows players to repair their equipment directly from the Level Helper
Vender Option: Allows players to sell loot and purchase reagents/food/water/ammo directly from the Level Helper
GM Controls: Allow GM's to control what is and isn't allowed from in-game
Incorporate Full Teleporter: Provides the player with a complete teleporter directly in their backpack
Open to your ideas!
--]]
--[[========================== Config ===============================]]--
-- General Config --
AllowMallTele = true -- [True/False] elseif set to true it allows people to teleport to the mall of their faction. elseif 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] elseif you want people to be able to use the porter in combat then set to true. elseif 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 elseif 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 elseif 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 -- elseif 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
Item:GossipCreateMenu(1234, Player, 0)
if (player:GetFaction() == 1) and (player:GetPlayerLevel() < 80) then
Item:GossipMenuAddItem(9, "Take me to level!", 1)
elseif (player:GetFaction() == 0) and (player:GetPlayerLevel() < 80) then
Item:GossipMenuAddItem(9, "Take me to level!", 3)
elseif (player:GetFaction() == 1) and (AllowMallTele == true) then
Item:GossipMenuAddItem(8, "Take me to the mall!", 2)
elseif (player:GetFaction() == 0) and (AllowMallTele == true) then
Item:GossipMenuAddItem(8, "Take me to the mall!", 4)
elseif (player:GetPlayerLevel() == 80) and (AllowMallTele == false) then
player:SendAreaTriggerMessage(" - "..Level80NoUse.." - ")
end
end
LEVEL = player:GetPlayerLevel()
if (intid == 3) then -- Ally "Take me to level!"
if (LEVEL < 10) then
player:SendAreaTriggerMessage(" - "..NotLevel10Message.." - ")
elseif (LEVEL >= 10) and (LEVEL <= 13) then
player:Teleport(0, -4803.404785, -2927.534912, 328.762360)
elseif (LEVEL >= 14) and (LEVEL <= 17) then
player:Teleport(0, -9703.644531, -2209.830811, 57.845242)
elseif (LEVEL >= 18) and (LEVEL <= 21) then
player:Teleport(0, -11123.652344, 1190.825439, 64.072624)
elseif (LEVEL >= 22) and (LEVEL <= 25) then
player:Teleport(0, -9277.922852, -3028.409424, 118.868683)
elseif (LEVEL >= 26) and (LEVEL <= 29) then
player:Teleport(0, -10967.732422, -269.651428, 22.439180)
elseif (LEVEL >= 30) and (LEVEL <= 33) then
player:Teleport(0, -11643.402344, -560.218262, 33.483208)
elseif (LEVEL >= 34) and (LEVEL <= 37) then
player:Teleport(0, -11930.924805, -593.189575, 16.999115)
elseif (LEVEL >= 38) and (LEVEL <= 41) then
player:Teleport(0, -12898.222656, -789.831116, 51.99805)
elseif (LEVEL >= 42) and (LEVEL <= 45) then
player:Teleport(0, -6726.391602, -1628.368042, 193.653915)
elseif (LEVEL >= 46) and (LEVEL <= 49) then
player:Teleport(0, -10900.470703, -2933.303223, 12.872971)
elseif (LEVEL >= 50) and (LEVEL <= 53) then
player:Teleport(0, -11240.953125, -3340.238770, 9.179361)
elseif (LEVEL >= 54) and (LEVEL <= 57) then
player:Teleport(0, 2726.371826, -1679.125854, 126.680740)
elseif (LEVEL >= 58) and (LEVEL <= 61) then
player:Teleport(530, -796.510498, 2181.584229, 10.901132)
elseif (LEVEL >= 62) and (LEVEL <= 64) then
player:Teleport(530, -473.192444, 3729.304688, 29.000946)
elseif (LEVEL >= 65) and (LEVEL <= 66) then
player:Teleport(530, -2699.693604, 6406.205566, 37.739193)
elseif (LEVEL >= 67) and (LEVEL <= 68) then
player:Teleport(530, 2332.901367, 2597.108398, 127.917793)
elseif (LEVEL >= 69) and (LEVEL <= 70) then
player:Teleport(530, 4366.186523, 3245.312744, 146.430984)
elseif (LEVEL >= 71) and (LEVEL <= 72) then
player:Teleport(571, 1043.915649, -4395.568359, 161.937683)
elseif (LEVEL >= 73) and (LEVEL <= 74) then
player:Teleport(571, 3750.131104, -11020.486206, 120.679367)
elseif (LEVEL >= 75) and (LEVEL <= 76) then
player:Teleport(571, 3801.111816, -3839.009003, 175.423004)
elseif (LEVEL >= 77) and (LEVEL <= 78) then
player:Teleport(571, 6962.209961, -1576.280029, 879.349976)
elseif (LEVEL == 79) then
player:Teleport(571, 7021.106445, -1684.665649, 819.533203)
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.." - ")
elseif (LEVEL >= 11) and (LEVEL <= 13) then
player:Teleport(1, -39.206371, -2956.889648, 94.633240)
elseif (LEVEL >= 14) and (LEVEL <= 17) then
player:Teleport(530, 7215.870117, -7456.700195, 55.805698)
elseif (LEVEL >= 18) and (LEVEL <= 21) then
player:Teleport(1, -3883.204102, -1695.575195, 92.901695)
elseif (LEVEL >= 22) and (LEVEL <= 25) then
player:Teleport(1, -4971.795410, -2152.113525, -36.372494)
elseif (LEVEL >= 26) and (LEVEL <= 29) then
player:Teleport(1, -4986.696777, -1946.943115, 82.353615)
elseif (LEVEL >= 30) and (LEVEL <= 33) then
player:Teleport(0, -1713.078247, -3172.283203, 28.566423)
elseif (LEVEL >= 34) and (LEVEL <= 37) then
player:Teleport(0, -1583.758545, -3105.699707, 24.253660)
elseif (LEVEL >= 38) and (LEVEL <= 41) then
player:Teleport(1, -3764.590332, -3445.596191, 37.592896)
elseif (LEVEL >= 42) and (LEVEL <= 45) then
player:Teleport(1, -7342.144043, -4560.302246, 10.579253)
elseif (LEVEL >= 46) and (LEVEL <= 49) then
player:Teleport(1, -7980.592285, -5320.064453, 12.382618)
elseif (LEVEL >= 50) and (LEVEL <= 53) then
player:Teleport(0, 1146.042725, -1765.793091, 61.565624)
elseif (LEVEL >= 54) and (LEVEL <= 57) then
player:Teleport(0, 1308.166992, -1234.708862, 62.679840)
elseif (LEVEL >= 58) and (LEVEL <= 61) then
player:Teleport(530, -1148.066162, 2676.270752, 2.865906)
elseif (LEVEL >= 62) and (LEVEL <= 64) then
player:Teleport(530, -2350.550293, 3338.223633, -2.462904)
elseif (LEVEL >= 65) and (LEVEL <= 66) then
player:Teleport(530, -2501.895752, 8022.805176, 48.207684)
elseif (LEVEL >= 67) and (LEVEL <= 68) then
player:Teleport(530, 3638.767822, 6781.376465, 132.400421)
elseif (LEVEL >= 69) and (LEVEL <= 70) then
player:Teleport(530, -2929.804688, 1612.546143, 45.346500)
elseif (LEVEL >= 71) and (LEVEL <= 72) then
player:Teleport(571, 3547.870850, 5423.767090, 40.976692)
elseif (LEVEL >= 73) and (LEVEL <= 74) then
player:Teleport(571, 3814.961182, 6736.256348, 160.340118)
elseif (LEVEL >= 75) and (LEVEL <= 76) then
player:Teleport(571, 5147.963379, -2801.662598, 289.703644)
elseif (LEVEL >= 77) and (LEVEL <= 78) then
player:Teleport(571, 5203.854980, 5734.003960, -83.279434)
elseif (LEVEL == 79) then
player:Teleport(571, 7362.846191, 2591.395996, 393.425079)
end
RegisterItemGossipEvent(ItemID, 1, "LEVEL_HELPER_START")
Credits: