forked from Pickonme/BoL_Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSweg.lua
More file actions
74 lines (60 loc) · 1.59 KB
/
Copy pathSweg.lua
File metadata and controls
74 lines (60 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
function OnLoad()
_HANDLER = {}
_HANDLER.LaughBot = _LaughBot()
_HANDLER.GameOver = _GameOver()
PrintChat('<b><font color="#CCCCCC">Sweg by PQ loaded</b></font>')
end
function OnNotify(event, unit)
if unit.team == myHero.team then
if event:lower():find('penta') then
SendChat('/all PENTA FKN NOOBS! GET REKD!')
end
if event:lower():find('quadra') then
SendChat('/all QUADRA NOT EVEN CLOSE LOL!')
end
end
end
class('_LaughBot') -- Credits to Honda7 for the packet
function _LaughBot:__init()
AddRecvPacketCallback(function(p) self:OnRecvPacket(p) end)
AddSendPacketCallback(function(p) self:OnSendPacket(p) end)
end
function _LaughBot:OnSendPacket(p)
if p.header == Packet.headers.S_MOVE and (_LAST == nil or os.clock() - _LAST > 1) then
_LAST = os.clock()
self:SendLaughPacket()
end
end
function _LaughBot:OnRecvPacket(p)
if p.header == 65 then
p.pos = 1
if p:DecodeF() == myHero.networkID then
p:Replace1(255,5)
end
end
end
function _LaughBot:SendLaughPacket()
local p = CLoLPacket(71)
p.pos = 1
p:EncodeF(myHero.networkID)
p:Encode1(2)
p:Encode1(0)
SendPacket(p)
end
class('_GameOver')
function _GameOver:__init()
AddGameOverCallback(function(team) self:OnGameOver(team) end)
end
function _GameOver:OnGameOver(team)
if team == myHero.team then
SendChat('/all Close game, better uninstall')
else
SendChat('/all Stop hacking')
end
AddTickCallback(function()
local pos = GetEnemySpawnPos()
myHero:MoveTo(pos.x, pos.z)
CastSpell(SUMMONER_1, pos.x, pos.z)
CastSpell(SUMMONER_2, pos.x, pos.z)
end)
end