Advertisement
Koelion

Dont forget wards beta 0.3

May 15th, 2013
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 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("Wards", "Wards")
  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. if champion.team == player.team then
  38. wards[i] = 0
  39. lastwards[i] = 0
  40.  
  41. if stoper[i] == nil then
  42. stoper[i] = 0
  43. end
  44.  
  45. if przypomnienie[i] == nil then
  46. przypomnienie[i] = false
  47. end
  48.  
  49. for j=1, 6 do
  50. local item = champion:getItem(itemslot[j])
  51. if item ~= nil and item.id == 2044 then
  52. wards[i] = wards[i] + 1
  53. end
  54. if item ~= nil and item.id == 2043 then
  55. wards[i] = wards[i] + 1
  56. end
  57. end
  58.  
  59. if wards[i] > lastwards[i] then
  60. haveward[i] = true
  61. else
  62. haveward[i] = false
  63. end
  64.  
  65. if msg[i] == nil then
  66. msg[i] = 0
  67. end
  68.  
  69.  
  70. if isonrespawn(champion) then
  71.  
  72. stoper[i] = 0
  73. przypomnienie[i] = false
  74.  
  75. if msg[i] == 0 and not haveward[i] then
  76. if WardsConfig.solo then
  77. PrintChat("Buy Wards :)")
  78. else
  79. SendChat(champion.charName.." Please Buy Wards :)")
  80. end
  81. msg[i] = 1
  82. end
  83.  
  84. end
  85.  
  86. if not isonrespawn(champion) then
  87.  
  88. przypomnienie[i] = true
  89. if przypomnienie[i] and not haveward[i] then
  90. if os.clock()-stoper[i] >= waittime then
  91. stoper[i]=os.clock()
  92. SendChat(champion.charName.." Please Buy Wards :) Now you have 0 wards in inventory!")
  93. SendChat(champion.charName.." Be carefull!")
  94. przypomnienie[i] = false
  95. end
  96. end
  97.  
  98. if not haveward[i] then
  99. msg[i] = 0
  100. end
  101.  
  102. end
  103.  
  104. lastwards[i] = wards[i]
  105.  
  106. end
  107. end
  108.  
  109. end
  110.  
  111.  
  112. function isnear(xb,yb)
  113.  
  114. local xc
  115. local yc
  116. local xleft = xb - 50
  117. local xright = xb + 300
  118. local ytop = yb - 30
  119. local ydown = yb + 30
  120.  
  121. xc = GetCursorPos().x
  122. yc = GetCursorPos().y
  123.  
  124. if xc >= xleft and xc <= xright and yc >= ytop and yc <= ydown then
  125. return true
  126. end
  127.  
  128. end
  129.  
  130.  
  131. function isonrespawn(hero)
  132.  
  133. if hero.x > -200 and hero.x <400 and hero.z > 0 and hero.z < 600 then
  134. return true
  135. elseif hero.x > 13730 and hero.x < 14160 and hero.z > 14000 and hero.z < 14350 then
  136. return true
  137. else
  138. return false
  139. end
  140.  
  141. end
  142.  
  143.  
  144. function OnDraw()
  145.  
  146. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement