Broland

Funny Phrases

Oct 19th, 2012
691
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.58 KB | None | 0 0
  1. --[[
  2. Funny Phrases 3.1
  3. Written by Broland
  4. Credits to Trus, Manciuszz, and Spudgy for the help
  5. -- Now taunts on spell cast
  6. ]]
  7. if myHero == nil then myHero = GetMyHero() end
  8.  
  9. infoTable = {
  10. {name="Annie", spell = _R, sendchat="KATTIBERS!!!"},
  11. {name="Blitzcrank", spell = _R, sendchat="QUIET!!"},
  12. {name="Caitlyn", spell = _R, sendchat="BOOM, HEADSHOT!!"},
  13. {name="Darius", spell = _R, sendchat="GET DUNKED KID!"},
  14. {name="Chogath", spell = _R, sendchat="NOM NOM NOM"},
  15. {name="Garen", spell = _R, sendchat="DEMACIA!!!"},
  16. {name="Karthus", spell = _R, sendchat="KABOOM!!!"},
  17. {name="Katarina", spell = _R, sendchat="SPIN 2 WIN!!!"},
  18. {name="Lux", spell = _R, sendchat="I'M FIRIN' MY LAZAR!!!"},
  19. {name="DrMundo", spell = _R, sendchat="MUNDO GO WHERE HE PLEASES"},
  20. {name="Pantheon", spell = _R, sendchat="This is SPARTA!!!"},
  21. {name="Sona", spell = _R, sendchat="Dance, Dance, Baby Tonight!"},
  22. {name="Tryndamere", spell = _R, sendchat="I'M TRYNDAQUEER! AHAHAHHA"},
  23. {name="Vladimir", spell = _W, sendchat="TROLOLOLOLOL"},
  24. }
  25.  
  26. for i = 1, #infoTable, 1 do
  27.         if myHero.charName == infoTable[i].name then
  28.         datIntel = infoTable[i]
  29.         break
  30.         end
  31. end
  32.  
  33. if datIntel ~= nil then
  34. --[[ Config ]] --
  35. local sendChat = true -- initial state of send chat feature
  36. local sendChatKey = 118 -- key for toggling send chat feature (F7=118)
  37.  
  38. -- (dance = 0, taunt=1, laugh=2, joke=3)
  39. function Emote(id)
  40. p = CLoLPacket(0x47)
  41. p:EncodeF(myHero.networkID)
  42. p:Encode1(id)
  43. p.dwArg1 = 1
  44. p.dwArg2 = 0
  45. SendPacket(p)
  46. end
  47.  
  48. --[[ Code ]] --
  49. alerted = false
  50.  
  51. function OnTick()
  52.         if myHero.dead then return end
  53.  
  54.         if myHero.charName == datIntel.name and myHero:CanUseSpell(datIntel.spell) == READY then
  55.         alerted = false
  56.         end
  57.  
  58.         if myHero.charName == datIntel.name and myHero:CanUseSpell(datIntel.spell) == COOLDOWN and sendChat == true and alerted == false then
  59.                 Emote(1)
  60.                 SendChat("/all "..datIntel.sendchat)
  61.                 alerted = true
  62.         end
  63. end
  64.  
  65. function OnWndMsg( msg, keycode )
  66.         if msg == KEY_DOWN then
  67.         return
  68.         end
  69.  
  70.         if sendChatKey ~= nil and keycode == sendChatKey then
  71.                 if sendChat == false then
  72.                         sendChat = true
  73.                         PrintChat("<font color='#7CFC00'> >>Funny Phrases Enabled</font>")
  74.                 else
  75.                         PrintChat("<font color='#7CFC00'> >>Funny Phrases Disabled</font>")
  76.                         sendChat = false
  77.                 end
  78.         end
  79. end
  80.  
  81. PrintChat(" >> Funny Phrases loaded")
  82. end
Advertisement
Add Comment
Please, Sign In to add comment