{"action":"opened","issue":{"url":"https://api.github.com/repos/wiredgizmo/dota/issues/1","labels_url":"https://api.github.com/repos/wiredgizmo/dota/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/wiredgizmo/dota/issues/1/comments","events_url":"https://api.github.com/repos/wiredgizmo/dota/issues/1/events","html_url":"https://github.com/wiredgizmo/dota/issues/1","id":85720950,"number":1,"title":"test ","user":{"login":"wiredgizmo","id":12772486,"avatar_url":"https://avatars.githubusercontent.com/u/12772486?v=3","gravatar_id":"","url":"https://api.github.com/users/wiredgizmo","html_url":"https://github.com/wiredgizmo","followers_url":"https://api.github.com/users/wiredgizmo/followers","following_url":"https://api.github.com/users/wiredgizmo/following{/other_user}","gists_url":"https://api.github.com/users/wiredgizmo/gists{/gist_id}","starred_url":"https://api.github.com/users/wiredgizmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wiredgizmo/subscriptions","organizations_url":"https://api.github.com/users/wiredgizmo/orgs","repos_url":"https://api.github.com/users/wiredgizmo/repos","events_url":"https://api.github.com/users/wiredgizmo/events{/privacy}","received_events_url":"https://api.github.com/users/wiredgizmo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-06T08:02:39Z","updated_at":"2015-06-06T08:02:39Z","closed_at":null,"body":"require(\"libs.DrawManager3D\")\r\n\r\nlocal key = string.byte(\"M\")\r\n\r\nlocal me = nil local play = false local activated = true\r\n\r\nlocal rec1 = drawMgr3D:CreateRect(Vector(-2272,1792,0), Vector(0,0,0), Vector2D(0,0), Vector2D(30,30), 0x000000ff, drawMgr:GetTextureId(\"NyanUI/other/fav_heart\")) rec1.visible = false\r\nlocal rec2 = drawMgr3D:CreateRect(Vector(3000,-2450,0), Vector(0,0,0), Vector2D(0,0), Vector2D(30,30), 0x000000ff, drawMgr:GetTextureId(\"NyanUI/other/fav_heart\")) rec2.visible = false\r\n\r\nfunction Tick(tick)\r\n\tif not PlayingGame() then return end\r\n\tme = entityList:GetMyHero() if not me then return end\r\n\t\r\n\tif activated then\t\r\n\t\tif not rec1.visible then\r\n\t\t\trec1.visible = true\r\n\t\t\trec2.visible = true\r\n\t\tend\r\n\r\n\t\tlocal runes = entityList:GetEntities(function (ent) return ent.classId==CDOTA_Item_Rune and GetDistance2D(ent,me) < 200 end)[1]\t\t\r\n\t\tif runes then \r\n\t\t\tentityList:GetMyPlayer():Select(me)\r\n\t\t\tentityList:GetMyPlayer():TakeRune(runes)\r\n\t\tend\t\t\r\n\tend\r\nend\r\n\r\nfunction Key(msg,code)\r\n\tif msg ~= KEY_UP and code == key and not client.chat then\r\n\t\tactivated = not activated\r\n\tend\r\nend\r\n\r\nfunction Load()\r\n\tif PlayingGame() then\r\n\t\tplay = true\r\n\t\tscript:RegisterEvent(EVENT_KEY,Key)\r\n\t\tscript:RegisterEvent(EVENT_FRAME,Tick)\r\n\t\tscript:UnregisterEvent(Load)\r\n\tend\r\nend\r\n\r\nfunction GameClose()\r\n\tif play then\r\n\t\tme = nil\r\n\t\trec1.visible = false\r\n\t\trec2.visible = false\r\n\t\tscript:UnregisterEvent(Tick)\r\n\t\tscript:UnregisterEvent(Key)\r\n\t\tscript:RegisterEvent(EVENT_TICK,Load)\r\n\t\tplay = false\r\n\tend\r\nend\r\n\r\nscript:RegisterEvent(EVENT_TICK,Load)\r\nscript:RegisterEvent(EVENT_CLOSE,GameClose)"}}