Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local recal = false
- local przypomnienie = {}
- local haveward = {}
- local move = false
- local onrespawn = false
- local stoper = {}
- local hstoper = 0
- local waittime = 180
- local itemslot = {ITEM_1,ITEM_2,ITEM_3,ITEM_4,ITEM_5,ITEM_6}
- local wards = {}
- local lastwards = {}
- local hwards = 0
- local hlastwards = 0
- local xt,yt = 250,30
- local msg = {}
- function OnLoad()
- WardsConfig = scriptConfig("Wards", "Wards")
- WardsConfig:addParam("solo","Solo Queue/ Only prints fot you to buy wards",SCRIPT_PARAM_ONOFF, true)
- end
- function OnTick()
- for i=1, heroManager.iCount do
- local champion = heroManager:GetHero(i)
- if champion.team == player.team then
- wards[i] = 0
- lastwards[i] = 0
- if stoper[i] == nil then
- stoper[i] = 0
- end
- if przypomnienie[i] == nil then
- przypomnienie[i] = false
- end
- for j=1, 6 do
- local item = champion:getItem(itemslot[j])
- if item ~= nil and item.id == 2044 then
- wards[i] = wards[i] + 1
- end
- if item ~= nil and item.id == 2043 then
- wards[i] = wards[i] + 1
- end
- end
- if wards[i] > lastwards[i] then
- haveward[i] = true
- else
- haveward[i] = false
- end
- if msg[i] == nil then
- msg[i] = 0
- end
- if isonrespawn(champion) then
- stoper[i] = 0
- przypomnienie[i] = false
- if msg[i] == 0 and not haveward[i] then
- if WardsConfig.solo then
- PrintChat("Buy Wards :)")
- else
- SendChat(champion.charName.." Please Buy Wards :)")
- end
- msg[i] = 1
- end
- end
- if not isonrespawn(champion) then
- przypomnienie[i] = true
- if przypomnienie[i] and not haveward[i] then
- if os.clock()-stoper[i] >= waittime then
- stoper[i]=os.clock()
- SendChat(champion.charName.." Please Buy Wards :) Now you have 0 wards in inventory!")
- SendChat(champion.charName.." Be carefull!")
- przypomnienie[i] = false
- end
- end
- if not haveward[i] then
- msg[i] = 0
- end
- end
- lastwards[i] = wards[i]
- end
- end
- end
- function isnear(xb,yb)
- local xc
- local yc
- local xleft = xb - 50
- local xright = xb + 300
- local ytop = yb - 30
- local ydown = yb + 30
- xc = GetCursorPos().x
- yc = GetCursorPos().y
- if xc >= xleft and xc <= xright and yc >= ytop and yc <= ydown then
- return true
- end
- end
- function isonrespawn(hero)
- if hero.x > -200 and hero.x <400 and hero.z > 0 and hero.z < 600 then
- return true
- elseif hero.x > 13730 and hero.x < 14160 and hero.z > 14000 and hero.z < 14350 then
- return true
- else
- return false
- end
- end
- function OnDraw()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement