Advertisement
Guest User

Untitled

a guest
Jul 31st, 2014
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. --[[
  2. Pick a Card 1.3 by eXtragoZ
  3. Credits: Sumizome's, Keoshin, Taikumi, Zynox, Weee, h0nda & ikita
  4. Thanks Kilua for telling me a more efficient way to do it
  5.  
  6. It requires AllClass
  7.  
  8. Features:
  9. -Checks spell name and select the chosen card
  10.  
  11. Press T to pick the Red card
  12. Press E to pick the Blue card
  13. Press Spacebar to pick the Yellow card
  14. ]]--
  15. if myHero.charName ~= "TwistedFate" then return end
  16. require "AllClass"
  17. --[[ Code ]]
  18. local selected = "goldcardlock"
  19. local lastUse = 0
  20. function OnLoad()
  21. PaCConfig = scriptConfig("Pick a Card 1.3", "pickacard")
  22. PaCConfig:addParam("selectgold", "Select Gold", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  23. PaCConfig:addParam("selectblue", "Select Blue", SCRIPT_PARAM_ONKEYDOWN, false, 69)
  24. PaCConfig:addParam("selectred", "Select Red", SCRIPT_PARAM_ONKEYDOWN, false, 84)
  25. PaCConfig:permaShow("selectgold")
  26. PaCConfig:permaShow("selectblue")
  27. PaCConfig:permaShow("selectred")
  28. end
  29. function OnTick()
  30. if myHero:CanUseSpell(_W) == READY and GetTickCount()-lastUse <= 2300 then
  31. if myHero:GetSpellData(_W).name == selected then CastSpell(_W) end
  32. end
  33. if myHero:CanUseSpell(_W) == READY and GetTickCount()-lastUse >= 2400 then
  34. if PaCConfig.selectgold then selected = "goldcardlock"
  35. elseif PaCConfig.selectblue then selected = "bluecardlock"
  36. elseif PaCConfig.selectred then selected = "redcardlock"
  37. else return end
  38. CastSpell(_W)
  39. lastUse = GetTickCount()
  40. end
  41. end
  42. function OnWndMsg(msg,key)
  43. SC__OnWndMsg(msg,key)
  44. end
  45. function OnDraw()
  46. SC__OnDraw()
  47. end
  48. PrintChat(" >> Pick a Card 1.3 loaded!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement