Advertisement
Koelion

Dont forget wards beta 0.1

May 15th, 2013
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.47 KB | None | 0 0
  1.  
  2. local recal = false
  3. local przypomnienie = {}
  4. local haveward = {}
  5. local move = false
  6. local onrespawn = false
  7.  
  8. local stoper = {}
  9. local hstoper = 0
  10. local waittime = 180
  11.  
  12. local itemslot = {ITEM_1,ITEM_2,ITEM_3,ITEM_4,ITEM_5,ITEM_6}
  13. local wards = {}
  14. local lastwards = {}
  15.  
  16. local hwards = 0
  17. local hlastwards = 0
  18.  
  19. local xt,yt = 250,30
  20.  
  21. local msg = {}
  22.  
  23.  
  24. function OnLoad()
  25.  
  26. WardsConfig = scriptConfig("Pantheon Basic Config", "Pantheon")
  27. WardsConfig:addParam("solo","Solo Queue/ Only prints fot you to buy wards",SCRIPT_PARAM_ONOFF, true)
  28.  
  29. end
  30.  
  31.  
  32. function OnTick()
  33.  
  34. for i=1, heroManager.iCount do
  35.  
  36. local champion = heroManager:GetHero(i)
  37. wards[i] = 0
  38. lastwards[i] = 0
  39.  
  40. if stoper[i] == nil then
  41. stoper[i] = 0
  42. end
  43.  
  44. if przypomnienie[i] == nil then
  45. przypomnienie[i] = false
  46. end
  47.  
  48. for j=1, 6 do
  49. local item = champion:getItem(itemslot[j])
  50. if item ~= nil and item.id == 2044 then
  51. wards[i] = wards[i] + 1
  52. end
  53. if item ~= nil and item.id == 2043 then
  54. wards[i] = wards[i] + 1
  55. end
  56. end
  57.  
  58. if wards[i] > lastwards[i] then
  59. haveward[i] = true
  60. else
  61. haveward[i] = false
  62. end
  63.  
  64. if msg[i] == nil then
  65. msg[i] = 0
  66. end
  67.  
  68.  
  69. if isonrespawn(champion) then
  70.  
  71. stoper[i] = 0
  72. przypomnienie[i] = false
  73.  
  74. if msg[i] == 0 and not haveward[i] then
  75. if WardsConfig.solo then
  76. PrintChat("Buy Wards :)")
  77. else
  78. SendChat(champion.charName.." Please Buy Wards :)")
  79. end
  80. msg[i] = 1
  81. end
  82.  
  83. end
  84.  
  85. if not isonrespawn(champion) then
  86.  
  87. przypomnienie[i] = true
  88. if przypomnienie[i] and not haveward[i] then
  89. if os.clock()-stoper[i] >= waittime then
  90. stoper[i]=os.clock()
  91. SendChat(champion.charName.." Please Buy Wards :) Now you have 0 wards in inventory!")
  92. przypomnienie[i] = false
  93. end
  94. end
  95.  
  96. if not haveward[i] then
  97. msg[i] = 0
  98. end
  99.  
  100. end
  101.  
  102. lastwards[i] = wards[i]
  103.  
  104. end
  105.  
  106. end
  107.  
  108.  
  109. function isnear(xb,yb)
  110.  
  111. local xc
  112. local yc
  113. local xleft = xb - 50
  114. local xright = xb + 300
  115. local ytop = yb - 30
  116. local ydown = yb + 30
  117.  
  118. xc = GetCursorPos().x
  119. yc = GetCursorPos().y
  120.  
  121. if xc >= xleft and xc <= xright and yc >= ytop and yc <= ydown then
  122. return true
  123. end
  124.  
  125. end
  126.  
  127.  
  128. function isonrespawn(hero)
  129.  
  130. if hero.x > -200 and hero.x <400 and hero.z > 0 and hero.z < 600 then
  131. return true
  132. else
  133. return false
  134. end
  135.  
  136. end
  137.  
  138.  
  139. function OnDraw()
  140.  
  141. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement