Advertisement
XtremeGX

EasyRiding

Jul 26th, 2015
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.47 KB | None | 0 0
  1. --Author : Jafferwaffer
  2. --Core : Trinity Core with Eluna 3.3.5a
  3. --Script : EasyRiding
  4. --Thanks to the Eluna Devs!
  5. --Please do not share without asking, message me on http://emudevs.com
  6. --Also report any bugs the same way, enjoy!
  7.  
  8. local RidingLevels = {
  9. [20] = 33389, --Apprentice
  10. [40] = 33392, --Journeyman
  11. [60] = 34092, --Expert
  12. [70] = 34093, --Artisan
  13. [80] = 54197, --Cold Weather
  14. }
  15.  
  16. local Mounts = {
  17.         ["Human"] = {
  18.         [20] = 5655,
  19.         [40] = 18776,
  20.         [60] = 25470,
  21.         [70] = 44689,
  22.         },
  23.         ["Dwarf"] = {
  24.         [20] = 5864,
  25.         [40] = 46748,
  26.         [60] = 25470,
  27.         [70] = 44689,
  28.         },
  29.         ["Night Elf"] = {
  30.         [20] = 8631,
  31.         [40] = 18902,
  32.         [60] = 25470,
  33.         [70] = 44689,
  34.         },
  35.         ["Gnome"] = {
  36.         [20] = 8563,
  37.         [40] = 18774,
  38.         [60] = 25470,
  39.         [70] = 44689,
  40.         },
  41.         ["Draenei"] = {
  42.         [20] = 29743,
  43.         [40] = 29747,
  44.         [60] = 25470,
  45.         [70] = 44689,
  46.         },
  47.         ["Orc"] = {
  48.         [20] = 5665,
  49.         [40] = 18797,
  50.         [60] = 25475,
  51.         [70] = 44690,
  52.         },
  53.         ["Undead"] = {
  54.         [20] = 46308,
  55.         [40] = 47101,
  56.         [60] = 25475,
  57.         [70] = 44690,
  58.         },
  59.         ["Tauren"] = {
  60.         [20] = 46100,
  61.         [40] = 18793,
  62.         [60] = 25475,
  63.         [70] = 44690,
  64.         },
  65.         ["Troll"] = {
  66.         [20] = 8591,
  67.         [40] = 18789,
  68.         [60] = 25475,
  69.         [70] = 44690,
  70.         },
  71.         ["Blood Elf"] = {
  72.         [20] = 29221,
  73.         [40] = 28936,
  74.         [60] = 25475,
  75.         [70] = 44690,
  76.         },
  77. }
  78.  
  79. local function getRiding(event, player)
  80.         local plrLvl = player:GetLevel();
  81.         local plrRace = player:GetRaceAsString(0);
  82.         if RidingLevels[plrLvl] ~= nil then
  83.                 player:LearnSpell(RidingLevels[plrLvl]);
  84.             if not(player:AddItem(Mounts[plrRace][plrLvl])) then --If bags full then send mount in mail.
  85.                 SendMail("Level "..plrLvl.." Mount", "Your bags were full upon reaching level "..plrLvl..". Here is the mount you should have recieved!", player:GetGUIDLow(), 0, 61, 0, 0, 0, (Mounts[plrRace][plrLvl]), 1);
  86.                 player:SendBroadcastMessage("A mount has been sent to you by mail. If it does not show please relog."); --Mounts weren't comming through until player relogged.
  87.            
  88.             end
  89.         end
  90. end
  91.  
  92. RegisterPlayerEvent(13,getRiding) --Upon Character Change level run getRiding function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement