Advertisement
Kain2030

Auto Carry Plugin - Teemo Edition - v1.05d

Aug 3rd, 2013
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 17.90 KB | None | 0 0
  1. --[[
  2.  
  3.         Auto Carry Plugin - Teemo Edition
  4.         Author: Kain
  5.         Version: 1.05d
  6.         Copyright 2013
  7.  
  8.         Dependency: Sida's Auto Carry: Revamped
  9.  
  10.         How to install:
  11.             Make sure you already have AutoCarry installed.
  12.             Name the script EXACTLY "SidasAutoCarryPlugin - Teemo.lua" without the quotes.
  13.             Place the plugin in BoL/Scripts/Common folder.
  14.  
  15.         Features:
  16.             Shroom Bomb
  17.             Escape Wizard
  18.             Shroom Placement Helper for Summoner's Rift
  19.             Range Circle
  20.  
  21.         History:
  22.             Version: 1.05c: http://pastebin.com/nFXpw9tX
  23.                 Fixed "Blinding Dart" range to 680.
  24.                 Fixed "Shroom Bomb" not firing.
  25.                 Added on screen text to indicate when "Shroom Bomb" occurs.
  26.                 Made improvements to target detection. Will not shoot at Kog'maw passive, Karthus, etc.
  27.             Version: 1.04: http://pastebin.com/EjLX4Vrq
  28.                 Added support for more items.
  29.             Version: 1.03: http://pastebin.com/GGWEjni1
  30.                 Fixed shrooms snapping/magnetism. Added toggle for this.
  31.                 Added more ranges; changed colors.
  32.                 Added experimental flash during escape toggle option. Off by default.
  33.  
  34.             Version: 1.02: http://pastebin.com/uJ2p7aaQ
  35.                 Random Fixes
  36. --]]
  37.  
  38. if myHero.charName ~= "Teemo" then return end
  39.  
  40. local Target
  41. local EscapeHotkey = string.byte("T")
  42.  
  43. -- Prediction
  44. local QRange = 680
  45. local RRange = 230
  46.  
  47. local SkillQ = {spellKey = _Q, range = QRange, speed = 2, delay = 0, width = 200, configName = "blindingDart", displayName = "Q (Blinding Dart)", enabled = true, skillShot = false, minions = false, reset = false, reqTarget = true }
  48. local SkillW = {spellKey = _W, range = 0, speed = 2, delay = 0}
  49. local SkillR = {spellKey = _R, range = RRange, speed = 2, delay = 0}
  50.  
  51. local DFGSlot, HXGSlot, BWCSlot, BRKSlot, FlashSlot = nil, nil, nil, nil, nil
  52. local QReady, WReady, EReady, RReady, DFGReady, HXGReady, BWCReady, BRKReady, FlashReady = false, false, false, false, false, false, false, false, false
  53.  
  54. AutoCarry.PluginMenu:addParam("Combo", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  55. AutoCarry.PluginMenu:addParam("Harass", "Harass", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("A"))
  56. AutoCarry.PluginMenu:addParam("Escape", "Escape Artist", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("T"))
  57. AutoCarry.PluginMenu:addParam("EscapeFlash", "Escape: Flash to Mouse", SCRIPT_PARAM_ONOFF, false)
  58. AutoCarry.PluginMenu:addParam("Ultimate", "Use Shroom Bomb with combo", SCRIPT_PARAM_ONOFF, true)
  59. AutoCarry.PluginMenu:addParam("DrawShrooms", "Shroom Placement Helper", SCRIPT_PARAM_ONOFF, true)
  60. AutoCarry.PluginMenu:addParam("SnapShrooms", "Snap Shrooms into place", SCRIPT_PARAM_ONOFF, true)
  61. AutoCarry.PluginMenu:addParam("AutoShroomsHigh", "Auto-shroom high priority locations", SCRIPT_PARAM_ONOFF, true)
  62. AutoCarry.PluginMenu:addParam("Draw", "Draw range circles", SCRIPT_PARAM_ONOFF, true)
  63.  
  64. -- Shrooms Config
  65. local highEnabled     = AutoCarry.PluginMenu.DrawShrooms -- Enable High Priority Mushrooms
  66. local medEnabled      = AutoCarry.PluginMenu.DrawShrooms -- Enable Medium Priority Mushrooms
  67. local lowEnabled      = AutoCarry.PluginMenu.DrawShrooms -- Enable Low Priority Mushrooms
  68. local blueEnabled     = AutoCarry.PluginMenu.DrawShrooms -- Enable Blue Team Mushrooms (in and around blue jungle)
  69. local purpEnabled     = AutoCarry.PluginMenu.DrawShrooms -- Enable Purple Team Mushrooms (in and around purple jungle)
  70.  
  71. local showLocationsInRange = 3000 -- When you press R, locations in this range will be shown
  72. local showClose = true -- Show shroom locations that are close to you
  73. local showCloseRange = 800
  74.  
  75. local FlashSlot = nil
  76.  
  77. -- Main
  78. function PluginOnLoad()
  79.     InitializeShrooms()
  80. end
  81.  
  82. function PluginOnTick()
  83.     Target = AutoCarry.GetTarget()
  84.  
  85.     SpellCheck()
  86.  
  87.     if AutoCarry.PluginMenu.Combo then
  88.         Combo()
  89.     end
  90.  
  91.     if AutoCarry.PluginMenu.Harass then
  92.         Harass()
  93.     end
  94.  
  95.     if AutoCarry.PluginMenu.Escape then
  96.         EscapeCombo()
  97.     end
  98.  
  99.     -- Shrooms
  100.     PlaceAutoShrooms()
  101. end
  102.  
  103. function Combo()
  104.     if Target ~= nil and not Target.dead then
  105.         CastSlots()
  106.  
  107.         if QReady and GetDistance(Target) < QRange then
  108.             if not AutoCarry.GetCollision(SkillQ, myHero, Target) then
  109.                 CastSpell(SkillQ.spellKey, Target)
  110.             end
  111.         end
  112.  
  113.         -- Shroom under enemy
  114.         if AutoCarry.PluginMenu.Ultimate and RReady and GetDistance(Target) < RRange then
  115.             if not shroomExists(shroomSpot) then
  116.                 Message.AddMessage("Shroom Bomb!", ColorARGB.Green, myHero)
  117.                 AutoCarry.CastSkillshot(SkillR, Target)
  118.             end
  119.         end
  120.     end
  121. end
  122.  
  123. function EscapeCombo()
  124.     if WReady then
  125.         AutoCarry.CastSpell(SkillW.spellKey)
  126.     end
  127.  
  128.     if RReady then
  129.         CastSpell(SkillR.spellKey, myHero.x, myHero.z)
  130.     end
  131.  
  132.     if AutoCarry.PluginMenu.EscapeFlash and FlashSlot ~= nil and FlashReady and GetDistance(mousePos) > 300 then
  133.         CastSpell(FlashSlot, mousePos.x, mousePos.z)
  134.     end
  135.  
  136.     if AutoCarry.PluginMenu.EscapeFlash then
  137.         myHero:MoveTo(mousePos.x, mousePos.z)
  138.     end
  139. end
  140.  
  141. function Harass()
  142.     if Target ~= nil and not Target.dead then
  143.         if QReady and GetDistance(Target) < QRange then
  144.             CastSpell(SkillQ.spellKey, Target)
  145.             myHero:Attack(Target)
  146.         end
  147.     end
  148. end
  149.  
  150. function SpellCheck()
  151.     DFGSlot, HXGSlot, BWCSlot, BRKSlot = GetInventorySlotItem(3128),
  152.     GetInventorySlotItem(3146), GetInventorySlotItem(3144), GetInventorySlotItem(3153)
  153.  
  154.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerFlash") then
  155.         FlashSlot = SUMMONER_1
  156.     elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerFlash") then
  157.         FlashSlot = SUMMONER_2
  158.     end
  159.  
  160.     QReady = (myHero:CanUseSpell(SkillQ.spellKey) == READY)
  161.     WReady = (myHero:CanUseSpell(SkillW.spellKey) == READY)
  162.     EReady = (myHero:CanUseSpell(_E) == READY)
  163.     RReady = (myHero:CanUseSpell(SkillR.spellKey) == READY)
  164.  
  165.     DFGReady   = (DFGSlot   ~= nil and myHero:CanUseSpell(DFGSlot)   == READY)
  166.     HXGReady   = (HXGSlot   ~= nil and myHero:CanUseSpell(HXGSlot)   == READY)
  167.     BWCReady   = (BWCSlot   ~= nil and myHero:CanUseSpell(BWCSlot)   == READY)
  168.     BRKReady   = (BRKSlot   ~= nil and myHero:CanUseSpell(BRKSlot)   == READY)
  169.     FlashReady = (FlashSlot ~= nil and myHero:CanUseSpell(FlashSlot) == READY)
  170. end
  171.  
  172. function CastSlots()
  173.     if Target ~= nil and not Target.dead then
  174.         if GetDistance(Target) <= QRange then
  175.             if DFGReady then CastSpell(DFGSlot, Target) end
  176.             if HXGReady then CastSpell(HXGSlot, Target) end
  177.             if BWCReady then CastSpell(BWCSlot, Target) end
  178.             if BRKReady then CastSpell(BRKSlot, Target) end
  179.         end
  180.     end
  181. end
  182.  
  183. function PlaceAutoShrooms()
  184.     for i,group in pairs(shroomSpots) do
  185.         for x, shroomSpot in pairs(group.Locations) do
  186.             if group.Enabled and group.Auto and GetDistance(shroomSpot) <= 250 and not shroomExists(shroomSpot) then
  187.                 CastSpell(SkillR.spellKey, shroomSpot.x, shroomSpot.z)
  188.             end
  189.         end
  190.     end
  191. end
  192.  
  193. function PluginOnDraw()
  194.     -- Draw Ranges
  195.     if AutoCarry.PluginMenu.Draw then
  196.         DrawCircle(myHero.x, myHero.y, myHero.z, AutoCarry.SkillsCrosshair.range, 0x808080) -- Gray
  197.  
  198.         if QReady then
  199.             DrawCircle(myHero.x, myHero.y, myHero.z, QRange, 0x0099CC) -- Blue
  200.         end
  201.  
  202.         if RReady then
  203.             DrawCircle(myHero.x, myHero.y, myHero.z, RRange, 0xFF0000) -- Red
  204.         end
  205.     end
  206.  
  207.     -- Draw Shrooms
  208.         if (AutoCarry.PluginMenu.DrawShrooms) then
  209.         for i,group in pairs(shroomSpots) do
  210.             if group.Enabled == true then
  211.                 if drawShroomSpots then
  212.                     for x, shroomSpot in pairs(group.Locations) do
  213.                         if GetDistance(shroomSpot) < showLocationsInRange then
  214.                             if GetDistance(shroomSpot, mousePos) <= 250 then
  215.                                 shroomColour = 0xFFFFFF
  216.                             else
  217.                                 shroomColour = group.Colour
  218.                             end
  219.                             drawShroomCircles(shroomSpot.x, shroomSpot.y, shroomSpot.z,shroomColour)
  220.                         end
  221.                     end
  222.                 elseif showClose then
  223.                     for x, shroomSpot in pairs(group.Locations) do
  224.                         if GetDistance(shroomSpot) <= showCloseRange then
  225.                             if GetDistance(shroomSpot, mousePos) <= 250 then
  226.                                 shroomColour = 0xFFFFFF
  227.                             else
  228.                                 shroomColour = group.Colour
  229.                             end
  230.                             drawShroomCircles(shroomSpot.x, shroomSpot.y, shroomSpot.z,shroomColour)
  231.                         end
  232.                     end
  233.                 end
  234.             end
  235.         end
  236.     end
  237. end
  238.  
  239. -- Shrooms Main
  240. function InitializeShrooms()
  241.     red, yellow, green, blue, purple = 0x990000, 0x993300, 0x00FF00, 0x000099, 0x660066
  242.  
  243.     shroomSpots = {
  244.         -- High priority for both sides
  245.         HighPriority =  {
  246.                             Locations = {
  247.                                             { x = 3316.20,  y = -74.06, z = 9334.85},
  248.                                             { x = 4288.76,  y = -71.71, z = 9902.76},
  249.                                             { x = 3981.86,  y = 39.54,  z = 11603.55},
  250.                                             { x = 6435.51,  y = 47.51,  z = 9076.02},
  251.                                             { x = 9577.91,  y = 45.97,  z = 6634.53},
  252.                                             { x = 7635.25,  y = 45.09,  z = 5126.81},
  253.                                             { x = 10731.51, y = -30.77, z = 5287.01},
  254.                                             { x = 9662.24,  y = -70.79, z = 4536.15},
  255.                                             { x = 10080.45, y = 44.48,  z = 2829.56}  
  256.                                         },
  257.                             Colour = red,
  258.                             Enabled = highEnabled,
  259.                             Auto = AutoCarry.PluginMenu.AutoShroomsHigh,
  260.                             Snap = false
  261.                         },
  262.     -- Medium priority for both sides
  263.         MediumPriority ={
  264.                             Locations = {
  265.                                             { x = 3283.18,  y = -69.64, z = 10975.15},
  266.                                             { x = 2595.85,  y = -74.00, z = 11044.66},
  267.                                             { x = 2524.10,  y = 23.36,  z = 11912.28},
  268.                                             { x = 4347.64,  y = 43.34,  z = 7796.28},
  269.                                             { x = 6093.20,  y = -67.90, z = 8067.45},
  270.                                             { x = 7960.99,  y = -73.41, z = 6233.09},
  271.                                             { x = 10652.57, y = -58.96, z = 3507.64},
  272.                                             { x = 11460.14, y = -63.94, z = 3544.83},
  273.                                             { x = 11401.81, y = -11.72, z = 2626.61}  
  274.                                         },
  275.                             Colour = yellow,
  276.                             Enabled = medEnabled,
  277.                             Auto = false,
  278.                             Snap = false
  279.                         },
  280.     -- Low priority/situational for both sides
  281.         LowPriority =   {
  282.                             Locations = {
  283.                                             { x = 1346.10,  y = 26.56,  z = 11064.81},
  284.                                             { x = 705.87,   y = 26.93,  z = 11359.88},
  285.                                             { x = 762.80,   y = 26.15,  z = 12210.61},
  286.                                             { x = 1355.53,  y = 24.13,  z = 12936.99},
  287.                                             { x = 1926.92,  y = 25.14,  z = 11567.44},
  288.                                             { x = 1752.22,  y = 24.02,  z = 13176.95},
  289.                                             { x = 2512.96,  y = 21.74,  z = 13524.44},
  290.                                             { x = 3577.42,  y = 25.27,  z = 12429.88},
  291.                                             { x = 5246.01,  y = 30.91,  z = 12508.33},
  292.                                             { x = 5549.60,  y = 42.94,  z = 10917.27},
  293.                                             { x = 6552.56,  y = 47.09,  z = 9688.99},
  294.                                             { x = 5806.41,  y = 46.01,  z = 9918.99},
  295.                                             { x = 7112.27,  y = 46.86,  z = 8443.55},
  296.                                             { x = 4896.10,  y = -72.08, z = 8964.81},
  297.                                             { x = 3096.10,  y = 45.41,  z = 8164.81},
  298.                                             { x = 2390.53,  y = 46.57,  z = 5232.34},
  299.                                             { x = 4358.81,  y = 45.83,  z = 5834.64},
  300.                                             { x = 5746.10,  y = 42.52,  z = 4864.81},
  301.                                             { x = 6307.66,  y = 46.07,  z = 7165.92},
  302.                                             { x = 5443.82,  y = 45.64,  z = 7110.85},
  303.                                             { x = 5153.75,  y = 45.41,  z = 3358.76},
  304.                                             { x = 6876.07,  y = 46.44,  z = 5897.48},
  305.                                             { x = 6881.30,  y = 46.08,  z = 6555.85},
  306.                                             { x = 8555.10,  y = 46.36,  z = 7267.04},
  307.                                             { x = 7946.10,  y = 44.19,  z = 7214.81},
  308.                                             { x = 9088.99,  y = -73.12, z = 5441.11},
  309.                                             { x = 7687.96,  y = 46.12,  z = 5203.08},
  310.                                             { x = 8559.97,  y = 47.97,  z = 3477.87},
  311.                                             { x = 8841.04,  y = 52.28,  z = 1944.09},
  312.                                             { x = 10582.93, y = 43.25,  z = 1707.35},
  313.                                             { x = 11046.10, y = 43.26,  z = 964.81},
  314.                                             { x = 11682.20, y = 43.40,  z = 1061.03},
  315.                                             { x = 12420.51, y = 46.87,  z = 1532.34},
  316.                                             { x = 12819.32, y = 45.74,  z = 1931.32},
  317.                                             { x = 13275.52, y = 45.38,  z = 2873.69},
  318.                                             { x = 11978.71, y = 45.49,  z = 2914.69},
  319.                                             { x = 13379.36, y = 45.37,  z = 3499.62},
  320.                                             { x = 12818.08, y = 45.38,  z = 3625.44},
  321.                                             { x = 10985.17, y = 45.69,  z = 6305.81},
  322.                                             { x = 11580.80, y = 41.26,  z = 9214.09},
  323.                                             { x = 9574.88,  y = 44.40,  z = 8679.65},
  324.                                             { x = 8359.96,  y = 44.37,  z = 9595.58},
  325.                                             { x = 8927.12,  y = 48.17,  z = 11175.70}  
  326.                                         },
  327.                             Colour = green,
  328.                             Enabled = lowEnabled,
  329.                             Auto = false,
  330.                             Snap = false
  331.                         },
  332.     -- blue team areas
  333.         BlueOnly = {
  334.                         Locations = {
  335.                                         { x = 2112.87, y = 43.81, z = 7047.48},
  336.                                         { x = 2646.25, y = 45.84, z = 7545.78},
  337.                                         { x = 1926.95, y = 44.83, z = 9515.71},
  338.                                         { x = 4239.97, y = 44.40, z = 7132.02},
  339.                                         { x = 6149.34, y = 42.51, z = 4481.88},
  340.                                         { x = 6630.28, y = 46.56, z = 2836.88},
  341.                                         { x = 7687.62, y = 45.54, z = 3210.98},
  342.                                         { x = 7050.22, y = 46.46, z = 2351.33}  
  343.                                     },
  344.                         Colour = blue,
  345.                         Enabled = blueEnabled,
  346.                         Auto = false,
  347.                         Snap = false
  348.                     },
  349.     -- purple team areas
  350.         PurpleOnly =    {
  351.                         Locations = {
  352.                                         { x = 7466.52, y = 41.54, z = 11720.22},
  353.                                         { x = 6945.85, y = 43.53, z = 11901.30},
  354.                                         { x = 6636.28, y = 45.03, z = 11079.65},
  355.                                         { x = 7878.53, y = 43.83, z = 10042.65},
  356.                                         { x = 9701.57, y = 45.72, z = 7298.22},
  357.                                         { x = 11358.86, y = 45.71, z = 6872.10},
  358.                                         { x = 11946.10, y = 45.80, z = 7414.81},
  359.                                         { x = 12169.52, y = 44.03, z = 4858.85}  
  360.                                     },
  361.                         Colour = purple,
  362.                         Enabled = purpEnabled,
  363.                         Auto = false,
  364.                         Snap = false
  365.                     }
  366.     }
  367. end
  368.  
  369. drawShroomSpots = false
  370.  
  371. function shroomExists(shroomSpot)
  372.     for i=1, objManager.maxObjects do
  373.     local obj = objManager:getObject(i)
  374.         if obj ~= nil and obj.name:find("Noxious Trap") then
  375.             if GetDistance(obj) <= 260 then
  376.                 return true
  377.             end
  378.         end
  379.     end
  380.     return false
  381. end
  382.  
  383. function PluginOnWndMsg(msg,key)
  384.     if msg == KEY_DOWN and key == string.byte("R") then
  385.         if player:CanUseSpell(SkillR.spellKey) == READY then
  386.             drawShroomSpots = true
  387.         end
  388.     elseif msg == WM_LBUTTONDOWN and drawShroomSpots then
  389.         for i,group in pairs(shroomSpots) do
  390.             for x, shroomSpot in pairs(group.Locations) do
  391.                 if group.Snap or AutoCarry.PluginMenu.SnapShrooms then
  392.                     if GetDistance(shroomSpot, mousePos) <= 250 then
  393.                         CastSpell(SkillR.spellKey, shroomSpot.x, shroomSpot.z)
  394.                     end
  395.                 end
  396.             end
  397.         end
  398.     elseif msg == WM_RBUTTONDOWN and drawShroomSpots then
  399.         drawShroomSpots = false
  400.     end
  401. end
  402.  
  403. function drawShroomCircles(x,y,z,colour)
  404.     DrawCircle(x, y, z, 28, colour)
  405.     DrawCircle(x, y, z, 29, colour)
  406.     DrawCircle(x, y, z, 30, colour)
  407.     DrawCircle(x, y, z, 31, colour)
  408.     DrawCircle(x, y, z, 32, colour)
  409.     DrawCircle(x, y, z, 250, colour)
  410.     if colour == red or colour == blue
  411.         or colour == purple or colour == yellow then
  412.         DrawCircle(x, y, z, 251, colour)
  413.         DrawCircle(x, y, z, 252, colour)
  414.         DrawCircle(x, y, z, 253, colour)
  415.         DrawCircle(x, y, z, 254, colour)
  416.     end
  417. end
  418.  
  419. class 'ColorARGB' -- {
  420.  
  421.     function ColorARGB:__init(red, green, blue, alpha)
  422.         self.R = red or 255
  423.         self.G = green or 255
  424.         self.B = blue or 255
  425.         self.A = alpha or 255
  426.     end
  427.  
  428.     function ColorARGB.FromArgb(red, green, blue, alpha)
  429.         return Color(red,green,blue, alpha)
  430.     end
  431.  
  432.     function ColorARGB:ToARGB()
  433.         return ARGB(self.A, self.R, self.G, self.B)
  434.     end
  435.  
  436.     ColorARGB.Red = ColorARGB(255, 0, 0, 255)
  437.     ColorARGB.Yellow = ColorARGB(255, 255, 0, 255)
  438.     ColorARGB.Green = ColorARGB(0, 255, 0, 255)
  439.     ColorARGB.Aqua = ColorARGB(0, 255, 255, 255)
  440.     ColorARGB.Blue = ColorARGB(0, 0, 255, 255)
  441.     ColorARGB.Fuchsia = ColorARGB(255, 0, 255, 255)
  442.     ColorARGB.Black = ColorARGB(0, 0, 0, 255)
  443.     ColorARGB.White = ColorARGB(255, 255, 255, 255)
  444. -- }
  445.  
  446. --Notification class
  447. class 'Message' -- {
  448.  
  449.     Message.instance = ""
  450.  
  451.     function Message:__init()
  452.         self.notifys = {}
  453.  
  454.         AddDrawCallback(function(obj) self:OnDraw() end)
  455.     end
  456.  
  457.     function Message.Instance()
  458.         if Message.instance == "" then Message.instance = Message() end return Message.instance
  459.     end
  460.  
  461.     function Message.AddMessage(text, color, target)
  462.         return Message.Instance():PAddMessage(text, color, target)
  463.     end
  464.  
  465.     function Message:PAddMessage(text, color, target)
  466.         local x = 0
  467.         local y = 200
  468.         local tempName = "Screen"
  469.         local tempcolor = color or ColorARGB.Red
  470.  
  471.         if target then  
  472.             tempName = target.networkID
  473.         end
  474.  
  475.         self.notifys[tempName] = { text = text, color = tempcolor, duration = GetGameTimer() + 2, object = target}
  476.     end
  477.  
  478.     function Message:OnDraw()
  479.         for i, notify in pairs(self.notifys) do
  480.             if notify.duration < GetGameTimer() then notify = nil
  481.             else
  482.                 notify.color.A = math.floor((255/2)*(notify.duration - GetGameTimer()))
  483.  
  484.                 if i == "Screen" then  
  485.                     local x = 0
  486.                     local y = 200
  487.                     local gameSettings = GetGameSettings()
  488.                     if gameSettings and gameSettings.General then
  489.                         if gameSettings.General.Width then x = gameSettings.General.Width/2 end
  490.                         if gameSettings.General.Height then y = gameSettings.General.Height/4 - 100 end
  491.                     end  
  492.                     --PrintChat(tostring(notify.color))
  493.                     local p = GetTextArea(notify.text, 40).x
  494.                     self:DrawTextWithBorder(notify.text, 40, x - p/2, y, notify.color:ToARGB(), ARGB(notify.color.A, 0, 0, 0))
  495.                 else    
  496.                     local pos = WorldToScreen(D3DXVECTOR3(notify.object.x, notify.object.y, notify.object.z))
  497.                     local x = pos.x
  498.                     local y = pos.y - 25
  499.                     local p = GetTextArea(notify.text, 40).x
  500.  
  501.                     self:DrawTextWithBorder(notify.text, 30, x- p/2, y, notify.color:ToARGB(), ARGB(notify.color.A, 0, 0, 0))
  502.                 end
  503.             end
  504.         end
  505.     end
  506.  
  507.     function Message:DrawTextWithBorder(textToDraw, textSize, x, y, textColor, backgroundColor)
  508.         DrawText(textToDraw, textSize, x + 1, y, backgroundColor)
  509.         DrawText(textToDraw, textSize, x - 1, y, backgroundColor)
  510.         DrawText(textToDraw, textSize, x, y - 1, backgroundColor)
  511.         DrawText(textToDraw, textSize, x, y + 1, backgroundColor)
  512.         DrawText(textToDraw, textSize, x , y, textColor)
  513.     end
  514. -- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement