Advertisement
Kain2030

Simple Teemo Exploit v1.2.lua

Aug 20th, 2013
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.40 KB | None | 0 0
  1. --[[
  2.         simple Teemo Exploit
  3.         v1.0
  4.         Written by Kilua
  5.                
  6.                 v1.1
  7.                 Bugfixes - Incognito
  8.  
  9.                 v1.2
  10.                 NA / EUW Merge - Kain
  11. ]]
  12.  
  13. if myHero.charName ~= "Teemo" then return end
  14.  
  15. local nbStack = nil
  16. local NextShroomTime = nil
  17. local debugMode = false
  18.  
  19. function HexNetworkID(networkID,reverse)
  20.     local po = CLoLPacket(0xDD)
  21.     po:EncodeF(networkID)
  22.     po.pos = 1
  23.     if reverse == true then
  24.         local s = string.format("%02X",po:Decode1())
  25.         s = s..string.format(" %02X",po:Decode1())
  26.         s = s..string.format(" %02X",po:Decode1())
  27.         s = s..string.format(" %02X",po:Decode1())
  28.         return s
  29.     else
  30.         local s = po:Decode4()
  31.         return string.format("%01X",s)
  32.     end
  33. end
  34.  
  35. local myHeroHexNetworkID = HexNetworkID(myHero.networkID,true)
  36.  
  37. function OnLoad()
  38.     PrintChat(">> simple Teemo Exploit loaded")
  39. end
  40.  
  41. function OnTick()
  42.     resyncPacket()  -- fake recv packet to avoid desync (update shroom stack and CD timer)
  43.     if NextShroomTime ~= nil and GetGameTimer() >= NextShroomTime - GetLatency()/1000 and nbStack == 2 and FreeShroom == true then
  44.         FreeShroom = false
  45.         CastSpell(_R,myHero)
  46.         NextShroomTime = nil
  47.     end
  48. end
  49.  
  50. function resyncPacket() -- fake recv packet to avoid desync (update shroom stack and CD timer)
  51.     if nbStack then
  52.         local pResync = CLoLPacket(0xFE)
  53.         pResync:EncodeF(myHero.networkID)
  54.         pResync:Encode2(0x0107)
  55.         pResync:Encode4(0x00000300)
  56.         pResync:Encode1(0x00)
  57.         pResync:Encode1(nbStack)    -- nb stack
  58.         pResync:Encode1(0x00)
  59.         pResync:Encode1(0x00)
  60.         pResync:Encode1(0x00)
  61.         pResync:Encode1(0xFF)
  62.         pResync:Encode1(0xFF)
  63.         pResync:Encode1(0xFF)
  64.         pResync:Encode1(0xFF)
  65.         if nbStack == 3 then
  66.             pResync:EncodeF(0)  --For Tecktonik mod try instead: pResync:EncodeF(math.random(0,23))  
  67.         elseif NextShroomTime then
  68.             pResync:EncodeF(NextShroomTime-GetGameTimer())
  69.         end
  70.         pResync:Encode4(resync9)
  71.         RecvPacket(pResync)
  72.     end
  73. end
  74.  
  75. function OnRecvPacket(packet)
  76.     if packet.header == 0xFE and packet.size == 28 then -- Shroom stack(++)
  77.         packet.pos = 1
  78.         packet_networkID = packet:DecodeF() -- 4 Bytes myHero networkID
  79.         packet_type = packet:Decode2()  -- 2 bytes packet type
  80.         a1 = packet:Decode4()   -- 00 03 00 00
  81.         a2 = packet:Decode1()   -- 00
  82.         a3 = packet:Decode1()   -- nb shroom
  83.         a4 = packet:Decode1()   -- 00
  84.         a5 = packet:Decode1()   -- 00
  85.         a6 = packet:Decode1()   -- 00
  86.         a7 = packet:Decode4()   -- FF FF FF FF
  87.         a8 = packet:DecodeF()   -- 4 bytes shroom timer in float (0,1 or 2 stacks) or 00 00 00 00 (3 stacks)
  88.         a9 = packet:Decode4()   -- <dont matter> 4 bytes sequence dont change in the game
  89.         if packet_networkID == myHero.networkID and packet_type == 0x0107 and a1 == 0x00000300 and a2 == 0x00 and a4 == 0x00 and a5 == 0x00 and a6 == 0x00 and a7 == 0xFFFFFFFF then
  90.             resync8 = a8
  91.             resync9 = a9
  92.             nbStack = a3
  93.             if debugMode then PrintChat("++nbStack: "..nbStack) end
  94.             local BaseTime = (35 - (myHero:GetSpellData(_R).level - 1) * 4)
  95.             local CDTime = BaseTime * (1 + myHero.cdr)
  96.             NextShroomTime = GetGameTimer() + CDTime - 0.2
  97.             if nbStack == 2 then
  98.                 FreeShroom = true
  99.             end
  100.         end
  101.     elseif packet.header == 0xB5 then -- Shroom stack(--)
  102.  
  103.         stringPacket=dumpPacket(packet) -- i'm lazy so i will use string XD (big packets 105 and 122 bytes)
  104.         if packet.size == 105 then -- shroom not on object
  105.             if (string.find(stringPacket, myHeroHexNetworkID) and string.find(stringPacket, "00 00 80 3F "..myHeroHexNetworkID)  and string.find(stringPacket, "00 00 00 80 3E 00 00 00 00 00 00 80 3F") and string.find(stringPacket, "3F 00 00 00 00 00 03 00 00")) or -- NA
  106.                 (string.find(stringPacket, myHeroHexNetworkID) == 5 and string.find(stringPacket, "00 D0 30 82 0A") == 35 and string.find(stringPacket, "00 00 80 3F "..myHeroHexNetworkID) == 65 and string.find(stringPacket, "00 00 00 80 3E 00 00 00 00 00 00 80 3F") == 173 and string.find(stringPacket, "3F 00 00 00 00 00 03 00 00") == 221) then -- EUW
  107.                 if nbStack then
  108.                     nbStack = nbStack - 1
  109.                     if debugMode then PrintChat("--nbStack: "..nbStack) end
  110.                     local BaseTime = (35 - (myHero:GetSpellData(_R).level - 1) * 4)
  111.                     local CDTime = BaseTime * (1 + myHero.cdr)
  112.                     NextShroomTime = GetGameTimer() + CDTime
  113.                     if nbStack == 2 then
  114.                         FreeShroom = true
  115.                     end
  116.                 end
  117.             end
  118.         elseif packet.size == 122 then  -- shroom on object
  119.             if (string.find(stringPacket, myHeroHexNetworkID) and string.find(stringPacket, "00 00 80 3F "..myHeroHexNetworkID)  and string.find(stringPacket, "00 00 00 80 3E 00 00 00 00 00 00 80 3F") and string.find(stringPacket, "3F 00 00 00 00 00 03 00 00")) or --NA
  120.                 (string.find(stringPacket, myHeroHexNetworkID) == 5 and string.find(stringPacket, myHeroHexNetworkID,87) == 176 and string.find(stringPacket, "00 D0 30 82 0A") == 35 and string.find(stringPacket, "00 00 80 3F "..myHeroHexNetworkID) == 65 and string.find(stringPacket, "00 00 00 80 3E 00 00 00 00 00 00 80 3F") == 224 and string.find(stringPacket, "3F 00 00 00 00 00 03 00 00") == 272) then -- EUW
  121.                 if nbStack then
  122.                     nbStack = nbStack - 1
  123.                     if debugMode then PrintChat("--nbStack: "..nbStack) end
  124.                     local BaseTime = (35 - (myHero:GetSpellData(_R).level - 1) * 4)
  125.                     local CDTime = BaseTime * (1 + myHero.cdr)
  126.                     NextShroomTime = GetGameTimer() + CDTime   
  127.                     if nbStack == 2 then
  128.                         FreeShroom = true
  129.                     end
  130.                 end
  131.             end
  132.         end
  133.     end
  134. end
  135.  
  136. function dumpPacket(p)
  137.     local sPacket = ""
  138.     for i=1,p.size,1 do
  139.         sPacket = sPacket .. string.format(" %02X",p:Decode1())
  140.     end
  141.     return sPacket
  142. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement