Guest User

MiniMap Timers

a guest
Jan 13th, 2014
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 332.66 KB | None | 0 0
  1. mapTimers v0.3 (3.14 LoL patch)
  2.  
  3. Author: SurfaceS
  4. Updated by TEAM DEKLAND
  5. ]]
  6. do
  7. --[[ GLOBAL ]]
  8. monsters = {
  9. summonerRift = {
  10. { -- baron
  11. name = "baron",
  12. spawn = 900,
  13. respawn = 420,
  14. advise = true,
  15. camps = {
  16. {
  17. pos = { x = 4600, y = 60, z = 10250 },
  18. name = "monsterCamp_12",
  19. creeps = { { { name = "Worm12.1.1" }, }, },
  20. team = TEAM_NEUTRAL,
  21. },
  22. },
  23. },
  24. { -- dragon
  25. name = "dragon",
  26. spawn = 150,
  27. respawn = 360,
  28. advise = true,
  29. camps = {
  30. {
  31. pos = { x = 9459, y = 60, z = 4193 },
  32. name = "monsterCamp_6",
  33. creeps = { { { name = "Dragon6.1.1" }, }, },
  34. team = TEAM_NEUTRAL,
  35. },
  36. },
  37. },
  38. { -- blue
  39. name = "blue",
  40. spawn = 115,
  41. respawn = 300,
  42. advise = true,
  43. camps = {
  44. {
  45. pos = { x = 3632, y = 60, z = 7600 },
  46. name = "monsterCamp_1",
  47. creeps = { { { name = "AncientGolem1.1.1" }, { name = "YoungLizard1.1.2" }, { name = "YoungLizard1.1.3" }, }, },
  48. team = TEAM_BLUE,
  49. },
  50. {
  51. pos = { x = 10386, y = 60, z = 6811 },
  52. name = "monsterCamp_7",
  53. creeps = { { { name = "AncientGolem7.1.1" }, { name = "YoungLizard7.1.2" }, { name = "YoungLizard7.1.3" }, }, },
  54. team = TEAM_RED,
  55. },
  56. },
  57. },
  58. { -- red
  59. name = "red",
  60. spawn = 115,
  61. respawn = 300,
  62. advise = true,
  63. camps = {
  64. {
  65. pos = { x = 7455, y = 60, z = 3890 },
  66. name = "monsterCamp_4",
  67. creeps = { { { name = "LizardElder4.1.1" }, { name = "YoungLizard4.1.2" }, { name = "YoungLizard4.1.3" }, }, },
  68. team = TEAM_BLUE,
  69. },
  70. {
  71. pos = { x = 6504, y = 60, z = 10584 },
  72. name = "monsterCamp_10",
  73. creeps = { { { name = "LizardElder10.1.1" }, { name = "YoungLizard10.1.2" }, { name = "YoungLizard10.1.3" }, }, },
  74. team = TEAM_RED,
  75. },
  76. },
  77. },
  78. { -- wolves
  79. name = "wolves",
  80. spawn = 115,
  81. respawn = 50,
  82. advise = false,
  83. camps = {
  84. {
  85. name = "monsterCamp_2",
  86. creeps = { { { name = "GiantWolf2.1.3" }, { name = "wolf2.1.1" }, { name = "wolf2.1.2" }, }, },
  87. team = TEAM_BLUE,
  88. },
  89. {
  90. name = "monsterCamp_8",
  91. creeps = { { { name = "GiantWolf8.1.3" }, { name = "wolf8.1.1" }, { name = "wolf8.1.2" }, }, },
  92. team = TEAM_RED,
  93. },
  94. },
  95. },
  96. { -- wraiths
  97. name = "wraiths",
  98. spawn = 115,
  99. respawn = 50,
  100. advise = false,
  101. camps = {
  102. {
  103. name = "monsterCamp_3",
  104. creeps = { { { name = "Wraith3.1.3" }, { name = "LesserWraith3.1.1" }, { name = "LesserWraith3.1.2" }, { name = "LesserWraith3.1.4" }, }, },
  105. team = TEAM_BLUE,
  106. },
  107. {
  108. name = "monsterCamp_9",
  109. creeps = { { { name = "Wraith9.1.3" }, { name = "LesserWraith9.1.1" }, { name = "LesserWraith9.1.2" }, { name = "LesserWraith9.1.4" }, }, },
  110. team = TEAM_RED,
  111. },
  112. },
  113. },
  114. { -- GreatWraiths
  115. name = "GreatWraiths",
  116. spawn = 115,
  117. respawn = 50,
  118. advise = false,
  119. camps = {
  120. {
  121. name = "monsterCamp_13",
  122. creeps = { { { name = "GreatWraith13.1.1" }, }, },
  123. team = TEAM_BLUE,
  124. },
  125. {
  126. name = "monsterCamp_14",
  127. creeps = { { { name = "GreatWraith14.1.1" }, }, },
  128. team = TEAM_RED,
  129. },
  130. },
  131. },
  132. { -- Golems
  133. name = "Golems",
  134. spawn = 115,
  135. respawn = 50,
  136. advise = false,
  137. camps = {
  138. {
  139. name = "monsterCamp_5",
  140. creeps = { { { name = "Golem5.1.2" }, { name = "SmallGolem5.1.1" }, }, },
  141. team = TEAM_BLUE,
  142. },
  143. {
  144. name = "monsterCamp_11",
  145. creeps = { { { name = "Golem11.1.2" }, { name = "SmallGolem11.1.1" }, }, },
  146. team = TEAM_RED,
  147. },
  148. },
  149. },
  150. },
  151. twistedTreeline = {
  152. { -- Wraith
  153. name = "Wraith",
  154. spawn = 100,
  155. respawn = 50,
  156. advise = false,
  157. camps = {
  158. {
  159. --pos = { x = 4414, y = 60, z = 5774 },
  160. name = "monsterCamp_1",
  161. creeps = {
  162. { { name = "TT_NWraith1.1.1" }, { name = "TT_NWraith21.1.2" }, { name = "TT_NWraith21.1.3" }, },
  163. },
  164. team = TEAM_BLUE,
  165. },
  166. {
  167. --pos = { x = 11008, y = 60, z = 5775 },
  168. name = "monsterCamp_4",
  169. creeps = {
  170. { { name = "TT_NWraith4.1.1" }, { name = "TT_NWraith24.1.2" }, { name = "TT_NWraith24.1.3" }, },
  171. },
  172. team = TEAM_RED,
  173. },
  174. },
  175. },
  176. { -- Golems
  177. name = "Golems",
  178. respawn = 50,
  179. spawn = 100,
  180. advise = false,
  181. camps = {
  182. {
  183. --pos = { x = 5088, y = 60, z = 8065 },
  184. name = "monsterCamp_2",
  185. creeps = {
  186. { { name = "TT_NGolem2.1.1" }, { name = "TT_NGolem22.1.2" } },
  187. },
  188. team = TEAM_BLUE,
  189. },
  190. {
  191. --pos = { x = 10341, y = 60, z = 8084 },
  192. name = "monsterCamp_5",
  193. creeps = {
  194. { { name = "TT_NGolem5.1.1" }, { name = "TT_NGolem25.1.2" } },
  195. },
  196. team = TEAM_RED,
  197. },
  198. },
  199. },
  200. { -- Wolves
  201. name = "Wolves",
  202. respawn = 50,
  203. spawn = 100,
  204. advise = false,
  205. camps = {
  206. {
  207. --pos = { x = 6148, y = 60, z = 5993 },
  208. name = "monsterCamp_3",
  209. creeps = { { { name = "TT_NWolf3.1.1" }, { name = "TT_NWolf23.1.2" }, { name = "TT_NWolf23.1.3" } }, },
  210. team = TEAM_BLUE,
  211. },
  212. {
  213. --pos = { x = 9239, y = 60, z = 6022 },
  214. name = "monsterCamp_6",
  215. creeps = { { { name = "TT_NWolf6.1.1" }, { name = "TT_NWolf26.1.2" }, { name = "TT_NWolf26.1.3" } }, },
  216. team = TEAM_RED,
  217. },
  218. },
  219. },
  220. { -- Heal
  221. name = "Heal",
  222. spawn = 115,
  223. respawn = 90,
  224. advise = true,
  225. camps = {
  226. {
  227. pos = { x = 7711, y = 60, z = 6722 },
  228. name = "monsterCamp_7",
  229. creeps = { { { name = "TT_Relic7.1.1" }, }, },
  230. team = TEAM_NEUTRAL,
  231. },
  232. },
  233. },
  234. { -- Vilemaw
  235. name = "Vilemaw",
  236. spawn = 600,
  237. respawn = 300,
  238. advise = true,
  239. camps = {
  240. {
  241. pos = { x = 7711, y = 60, z = 10080 },
  242. name = "monsterCamp_8",
  243. creeps = { { { name = "TT_Spiderboss8.1.1" }, }, },
  244. team = TEAM_NEUTRAL,
  245. },
  246. },
  247. },
  248. },
  249. crystalScar = {},
  250. provingGrounds = {
  251. { -- Heal
  252. name = "Heal",
  253. spawn = 190,
  254. respawn = 40,
  255. advise = false,
  256. camps = {
  257. {
  258. pos = { x = 8922, y = 60, z = 7868 },
  259. name = "monsterCamp_1",
  260. creeps = { { { name = "OdinShieldRelic1.1.1" }, }, },
  261. team = TEAM_NEUTRAL,
  262. },
  263. {
  264. pos = { x = 7473, y = 60, z = 6617 },
  265. name = "monsterCamp_2",
  266. creeps = { { { name = "OdinShieldRelic2.1.1" }, }, },
  267. team = TEAM_NEUTRAL,
  268. },
  269. {
  270. pos = { x = 5929, y = 60, z = 5190 },
  271. name = "monsterCamp_3",
  272. creeps = { { { name = "OdinShieldRelic3.1.1" }, }, },
  273. team = TEAM_NEUTRAL,
  274. },
  275. {
  276. pos = { x = 4751, y = 60, z = 3901 },
  277. name = "monsterCamp_4",
  278. creeps = { { { name = "OdinShieldRelic4.1.1" }, }, },
  279. team = TEAM_NEUTRAL,
  280. },
  281. },
  282. },
  283. },
  284. howlingAbyss = {
  285. { -- Heal
  286. name = "Heal",
  287. spawn = 190,
  288. respawn = 40,
  289. advise = false,
  290. camps = {
  291. {
  292. pos = { x = 8922, y = 60, z = 7868 },
  293. name = "monsterCamp_1",
  294. creeps = { { { name = "HA_AP_HealthRelic1.1.1" }, }, },
  295. team = TEAM_NEUTRAL,
  296. },
  297. {
  298. pos = { x = 7473, y = 60, z = 6617 },
  299. name = "monsterCamp_2",
  300. creeps = { { { name = "HA_AP_HealthRelic2.1.1" }, }, },
  301. team = TEAM_NEUTRAL,
  302. },
  303. {
  304. pos = { x = 5929, y = 60, z = 5190 },
  305. name = "monsterCamp_3",
  306. creeps = { { { name = "HA_AP_HealthRelic3.1.1" }, }, },
  307. team = TEAM_NEUTRAL,
  308. },
  309. {
  310. pos = { x = 4751, y = 60, z = 3901 },
  311. name = "monsterCamp_4",
  312. creeps = { { { name = "HA_AP_HealthRelic4.1.1" }, }, },
  313. team = TEAM_NEUTRAL,
  314. },
  315. },
  316. },
  317. },
  318. }
  319.  
  320. altars = {
  321. summonerRift = {},
  322. twistedTreeline = {
  323. {
  324. name = "Left Altar",
  325. spawn = 180,
  326. respawn = 85,
  327. advise = true,
  328. objectName = "TT_Buffplat_L",
  329. locked = false,
  330. lockNames = {"TT_Lock_Blue_L.troy", "TT_Lock_Purple_L.troy", "TT_Lock_Neutral_L.troy", },
  331. unlockNames = {"TT_Unlock_Blue_L.troy", "TT_Unlock_purple_L.troy", "TT_Unlock_Neutral_L.troy", },
  332. },
  333. {
  334. name = "Right Altar",
  335. spawn = 180,
  336. respawn = 85,
  337. advise = true,
  338. objectName = "TT_Buffplat_R",
  339. locked = false,
  340. lockNames = {"TT_Lock_Blue_R.troy", "TT_Lock_Purple_R.troy", "TT_Lock_Neutral_R.troy", },
  341. unlockNames = {"TT_Unlock_Blue_R.troy", "TT_Unlock_purple_R.troy", "TT_Unlock_Neutral_R.troy", },
  342. },
  343. },
  344. crystalScar = {},
  345. provingGrounds = {},
  346. howlingAbyss = {},
  347. }
  348.  
  349. relics = {
  350. summonerRift = {},
  351. twistedTreeline = {},
  352. crystalScar = {
  353. {
  354. pos = { x = 5500, y = 60, z = 6500 },
  355. name = "Relic",
  356. team = TEAM_BLUE,
  357. spawn = 180,
  358. respawn = 180,
  359. advise = true,
  360. locked = false,
  361. precenceObject = (player.team == TEAM_BLUE and "Odin_Prism_Green.troy" or "Odin_Prism_Red.troy"),
  362. },
  363. {
  364. pos = { x = 7550, y = 60, z = 6500 },
  365. name = "Relic",
  366. team = TEAM_RED,
  367. spawn = 180,
  368. respawn = 180,
  369. advise = true,
  370. locked = false,
  371. precenceObject = (player.team == TEAM_RED and "Odin_Prism_Green.troy" or "Odin_Prism_Red.troy"),
  372. },
  373. },
  374. provingGrounds = {},
  375. howlingAbyss = {},
  376. }
  377.  
  378. heals = {
  379. summonerRift = {},
  380. twistedTreeline = {},
  381. provingGrounds = {},
  382. crystalScar = {
  383. {
  384. name = "Heal",
  385. objectName = "OdinShieldRelic",
  386. respawn = 30,
  387. objects = {},
  388. },
  389. },
  390. howlingAbyss = {},
  391. }
  392.  
  393. inhibitors = {}
  394.  
  395. function addCampCreepAltar(object)
  396. if object ~= nil and object.name ~= nil then
  397. if object.name == "Order_Inhibit_Gem.troy" or object.name == "Chaos_Inhibit_Gem.troy" then
  398. table.insert(inhibitors, { object = object, destroyed = false, lefttime = 0, x = object.x, y = object.y, z = object.z, minimap = GetMinimap(object), textTick = 0 })
  399. return
  400. elseif object.name == "Order_Inhibit_Crystal_Shatter.troy" or object.name == "Chaos_Inhibit_Crystal_Shatter.troy" then
  401. for i,inhibitor in pairs(inhibitors) do
  402. if GetDistance(inhibitor, object) < 200 then
  403. local tick = GetTickCount()
  404. inhibitor.dtime = tick
  405. inhibitor.rtime = tick + 300000
  406. inhibitor.ltime = 300000
  407. inhibitor.destroyed = true
  408. end
  409. end
  410. return
  411. end
  412. for i,monster in pairs(monsters[mapName]) do
  413. for j,camp in pairs(monster.camps) do
  414. if camp.name == object.name then
  415. camp.object = object
  416. return
  417. end
  418. if object.type == "obj_AI_Minion" then
  419. for k,creepPack in ipairs(camp.creeps) do
  420. for l,creep in ipairs(creepPack) do
  421. if object.name == creep.name then
  422. creep.object = object
  423. return
  424. end
  425. end
  426. end
  427. end
  428. end
  429. end
  430. for i,altar in pairs(altars[mapName]) do
  431. if altar.objectName == object.name then
  432. altar.object = object
  433. altar.textTick = 0
  434. altar.minimap = GetMinimap(object)
  435. end
  436. if altar.locked then
  437. for j,lockName in pairs(altar.unlockNames) do
  438. if lockName == object.name then
  439. altar.locked = false
  440. return
  441. end
  442. end
  443. else
  444. for j,lockName in pairs(altar.lockNames) do
  445. if lockName == object.name then
  446. altar.drawColor = 0
  447. altar.drawText = ""
  448. altar.locked = true
  449. altar.advised = false
  450. altar.advisedBefore = false
  451. return
  452. end
  453. end
  454. end
  455. end
  456. for i,relic in pairs(relics[mapName]) do
  457. if relic.precenceObject == object.name then
  458. relic.object = object
  459. relic.textTick = 0
  460. relic.locked = false
  461. return
  462. end
  463. end
  464. for i,heal in pairs(heals[mapName]) do
  465. if heal.objectName == object.name then
  466. for j,healObject in pairs(heal.objects) do
  467. if (GetDistance(healObject, object) < 50) then
  468. healObject.object = object
  469. healObject.found = true
  470. healObject.locked = false
  471. return
  472. end
  473. end
  474. local k = #heal.objects + 1
  475. heals[mapName][i].objects[k] = {found = true, locked = false, object = object, x = object.x, y = object.y, z = object.z, minimap = GetMinimap(object), textTick = 0,}
  476. return
  477. end
  478. end
  479. end
  480. end
  481.  
  482. function removeCreep(object)
  483. if object ~= nil and object.type == "obj_AI_Minion" and object.name ~= nil then
  484. for i,monster in pairs(monsters[mapName]) do
  485. for j,camp in pairs(monster.camps) do
  486. for k,creepPack in ipairs(camp.creeps) do
  487. for l,creep in ipairs(creepPack) do
  488. if object.name == creep.name then
  489. creep.object = nil
  490. return
  491. end
  492. end
  493. end
  494. end
  495. end
  496. end
  497. end
  498.  
  499. function OnLoad()
  500. mapName = GetGame().map.shortName
  501. if monsters[mapName] == nil then
  502. mapName = nil
  503. monsters = nil
  504. addCampCreepAltar = nil
  505. removeCreep = nil
  506. addAltarObject = nil
  507. return
  508. else
  509. startTick = GetGame().tick
  510. -- CONFIG
  511. MMTConfig = scriptConfig("Timers 0.2", "minimapTimers")
  512. MMTConfig:addParam("pingOnRespawn", "Ping on respawn", SCRIPT_PARAM_ONOFF, true) -- ping location on respawn
  513. MMTConfig:addParam("pingOnRespawnBefore", "Ping before respawn", SCRIPT_PARAM_ONOFF, true) -- ping location before respawn
  514. MMTConfig:addParam("textOnRespawn", "Chat on respawn", SCRIPT_PARAM_ONOFF, true) -- print chat text on respawn
  515. MMTConfig:addParam("textOnRespawnBefore", "Chat before respawn", SCRIPT_PARAM_ONOFF, true) -- print chat text before respawn
  516. MMTConfig:addParam("adviceEnemyMonsters", "Advice enemy monster", SCRIPT_PARAM_ONOFF, true) -- advice enemy monster, or just our monsters
  517. MMTConfig:addParam("adviceBefore", "Advice Time", SCRIPT_PARAM_SLICE, 20, 1, 40, 0) -- time in second to advice before monster respawn
  518. MMTConfig:addParam("textOnMap", "Text on map", SCRIPT_PARAM_ONOFF, true) -- time in second on map
  519. for i,monster in pairs(monsters[mapName]) do
  520. monster.isSeen = false
  521. for j,camp in pairs(monster.camps) do
  522. camp.enemyTeam = (camp.team == TEAM_ENEMY)
  523. camp.textTick = 0
  524. camp.status = 0
  525. camp.drawText = ""
  526. camp.drawColor = 0xFF00FF00
  527. end
  528. end
  529. for i = 1, objManager.maxObjects do
  530. local object = objManager:getObject(i)
  531. if object ~= nil then
  532. addCampCreepAltar(object)
  533. end
  534. end
  535. AddCreateObjCallback(addCampCreepAltar)
  536. AddDeleteObjCallback(removeCreep)
  537. end
  538. end
  539. function OnTick()
  540. if GetGame().isOver then return end
  541. local GameTime = (GetTickCount()-startTick) / 1000
  542. local monsterCount = 0
  543. for i,monster in pairs(monsters[mapName]) do
  544. for j,camp in pairs(monster.camps) do
  545. local campStatus = 0
  546. for k,creepPack in ipairs(camp.creeps) do
  547. for l,creep in ipairs(creepPack) do
  548. if creep.object ~= nil and creep.object.valid and creep.object.dead == false then
  549. if l == 1 then
  550. campStatus = 1
  551. elseif campStatus ~= 1 then
  552. campStatus = 2
  553. end
  554. end
  555. end
  556. end
  557. --[[ Not used until camp.showOnMinimap work
  558. if (camp.object and camp.object.showOnMinimap == 1) then
  559. -- camp is here
  560. if campStatus == 0 then campStatus = 3 end
  561. elseif camp.status == 3 then -- empty not seen when killed
  562. campStatus = 5
  563. elseif campStatus == 0 and (camp.status == 1 or camp.status == 2) then
  564. campStatus = 4
  565. camp.deathTick = tick
  566. end
  567. ]]
  568. -- temp fix until camp.showOnMinimap work
  569. -- not so good
  570. if camp.object ~= nil and camp.object.valid then
  571. camp.minimap = GetMinimap(camp.object)
  572. if campStatus == 0 then
  573. if (camp.status == 1 or camp.status == 2) then
  574. campStatus = 4
  575. camp.advisedBefore = false
  576. camp.advised = false
  577. camp.respawnTime = math.ceil(GameTime) + monster.respawn
  578. camp.respawnText = (camp.enemyTeam and "Enemy " or "")..monster.name.." respawn at "..TimerText(camp.respawnTime)
  579. elseif (camp.status == 4) then
  580. campStatus = 4
  581. else
  582. campStatus = 3
  583. end
  584. end
  585. elseif camp.pos ~= nil then
  586. camp.minimap = GetMinimap(camp.pos)
  587. if (GameTime < monster.spawn) then
  588. campStatus = 4
  589. camp.advisedBefore = true
  590. camp.advised = true
  591. camp.respawnTime = monster.spawn
  592. camp.respawnText = (camp.enemyTeam and "Enemy " or "")..monster.name.." spawn at "..TimerText(camp.respawnTime)
  593. end
  594. end
  595. if camp.status ~= campStatus or campStatus == 4 then
  596. if campStatus ~= 0 then
  597. if monster.isSeen == false then monster.isSeen = true end
  598. camp.status = campStatus
  599. end
  600. if camp.status == 1 then -- ready
  601. camp.drawText = "ready"
  602. camp.drawColor = 0xFF00FF00
  603. elseif camp.status == 2 then -- ready, master creeps dead
  604. camp.drawText = "stolen"
  605. camp.drawColor = 0xFFFF0000
  606. elseif camp.status == 3 then -- ready, not creeps shown
  607. camp.drawText = " ?"
  608. camp.drawColor = 0xFF00FF00
  609. elseif camp.status == 4 then -- empty from creeps kill
  610. local secondLeft = math.ceil(math.max(0, camp.respawnTime - GameTime))
  611. if monster.advise == true and (MMTConfig.adviceEnemyMonsters == true or camp.enemyTeam == false) then
  612. if secondLeft == 0 and camp.advised == false then
  613. camp.advised = true
  614. if MMTConfig.textOnRespawn then PrintChat("<font color='#00FFCC'>"..(camp.enemyTeam and "Enemy " or "")..monster.name.."</font><font color='#FFAA00'> has respawned</font>") end
  615. if MMTConfig.pingOnRespawn then PingSignal(PING_FALLBACK,camp.object.x,camp.object.y,camp.object.z,2) end
  616. elseif secondLeft <= MMTConfig.adviceBefore and camp.advisedBefore == false then
  617. camp.advisedBefore = true
  618. if MMTConfig.textOnRespawnBefore then PrintChat("<font color='#00FFCC'>"..(camp.enemyTeam and "Enemy " or "")..monster.name.."</font><font color='#FFAA00'> will respawn in </font><font color='#00FFCC'>"..secondLeft.." sec</font>") end
  619. if MMTConfig.pingOnRespawnBefore then PingSignal(PING_FALLBACK,camp.object.x,camp.object.y,camp.object.z,2) end
  620. end
  621. end
  622. -- temp fix until camp.showOnMinimap work
  623. if secondLeft == 0 then
  624. camp.status = 0
  625. end
  626. camp.drawText = " "..TimerText(secondLeft)
  627. camp.drawColor = 0xFFFFFF00
  628. elseif camp.status == 5 then -- camp found empty (not using yet)
  629. camp.drawText = " -"
  630. camp.drawColor = 0xFFFF0000
  631. end
  632. end
  633. -- shift click
  634. if IsKeyDown(16) and camp.status == 4 then
  635. camp.drawText = " "..(camp.respawnTime ~= nil and TimerText(camp.respawnTime) or "")
  636. camp.textUnder = (CursorIsUnder(camp.minimap.x - 9, camp.minimap.y - 5, 20, 8))
  637. else
  638. camp.textUnder = false
  639. end
  640. if MMTConfig.textOnMap and camp.status == 4 and camp.object and camp.object.valid and camp.textTick < GetTickCount() and camp.floatText ~= camp.drawText then
  641. camp.floatText = camp.drawText
  642. camp.textTick = GetTickCount() + 1000
  643. PrintFloatText(camp.object,6,camp.floatText)
  644. end
  645. end
  646. end
  647.  
  648. -- altars
  649. for i,altar in pairs(altars[mapName]) do
  650. if altar.object and altar.object.valid then
  651. if altar.locked then
  652. if GameTime < altar.spawn then
  653. altar.secondLeft = math.ceil(math.max(0, altar.spawn - GameTime))
  654. else
  655. local tmpTime = ((altar.object.mana > 39600) and (altar.object.mana - 39900) / 20100 or (39600 - altar.object.mana) / 20100)
  656. altar.secondLeft = math.ceil(math.max(0, tmpTime * altar.respawn))
  657. end
  658. altar.unlockTime = math.ceil(GameTime + altar.secondLeft)
  659. altar.unlockText = altar.name.." unlock at "..TimerText(altar.unlockTime)
  660. altar.drawColor = 0xFFFFFF00
  661. if altar.advise == true then
  662. if altar.secondLeft == 0 and altar.advised == false then
  663. altar.advised = true
  664. if MMTConfig.textOnRespawn then PrintChat("<font color='#00FFCC'>"..altar.name.."</font><font color='#FFAA00'> is unlocked</font>") end
  665. if MMTConfig.pingOnRespawn then PingSignal(PING_FALLBACK,altar.object.x,altar.object.y,altar.object.z,2) end
  666. elseif altar.secondLeft <= MMTConfig.adviceBefore and altar.advisedBefore == false then
  667. altar.advisedBefore = true
  668. if MMTConfig.textOnRespawnBefore then PrintChat("<font color='#00FFCC'>"..altar.name.."</font><font color='#FFAA00'> will unlock in </font><font color='#00FFCC'>"..altar.secondLeft.." sec</font>") end
  669. if MMTConfig.pingOnRespawnBefore then PingSignal(PING_FALLBACK,altar.object.x,altar.object.y,altar.object.z,2) end
  670. end
  671. end
  672. -- shift click
  673. if IsKeyDown(16) then
  674. altar.drawText = " "..(altar.unlockTime ~= nil and TimerText(altar.unlockTime) or "")
  675. altar.textUnder = (CursorIsUnder(altar.minimap.x - 9, altar.minimap.y - 5, 20, 8))
  676. else
  677. altar.drawText = " "..(altar.secondLeft ~= nil and TimerText(altar.secondLeft) or "")
  678. altar.textUnder = false
  679. end
  680. if MMTConfig.textOnMap and altar.object and altar.object.valid and altar.textTick < GetTickCount() and altar.floatText ~= altar.drawText then
  681. altar.floatText = altar.drawText
  682. altar.textTick = GetTickCount() + 1000
  683. PrintFloatText(altar.object,6,altar.floatText)
  684. end
  685. end
  686. end
  687. end
  688.  
  689. -- relics
  690. for i,relic in pairs(relics[mapName]) do
  691. if (not relic.locked and (not relic.object or not relic.object.valid or relic.dead)) then
  692. if GameTime < relic.spawn then
  693. relic.unlockTime = relic.spawn - GameTime
  694. else
  695. relic.unlockTime = math.ceil(GameTime + relic.respawn)
  696. end
  697. relic.advised = false
  698. relic.advisedBefore = false
  699. relic.drawText = ""
  700. relic.unlockText = relic.name.." respawn at "..TimerText(relic.unlockTime)
  701. relic.drawColor = 4288610048
  702. --FF9EFF00
  703. relic.minimap = GetMinimap(relic.pos)
  704. relic.locked = true
  705. end
  706. if relic.locked then
  707. relic.secondLeft = math.ceil(math.max(0, relic.unlockTime - GameTime))
  708. if relic.advise == true then
  709. if relic.secondLeft == 0 and relic.advised == false then
  710. relic.advised = true
  711. if MMTConfig.textOnRespawn then PrintChat("<font color='#00FFCC'>"..relic.name.."</font><font color='#FFAA00'> has respawned</font>") end
  712. if MMTConfig.pingOnRespawn then PingSignal(PING_FALLBACK,relic.pos.x,relic.pos.y,relic.pos.z,2) end
  713. elseif relic.secondLeft <= MMTConfig.adviceBefore and relic.advisedBefore == false then
  714. relic.advisedBefore = true
  715. if MMTConfig.textOnRespawnBefore then PrintChat("<font color='#00FFCC'>"..relic.name.."</font><font color='#FFAA00'> will respawn in </font><font color='#00FFCC'>"..relic.secondLeft.." sec</font>") end
  716. if MMTConfig.pingOnRespawnBefore then PingSignal(PING_FALLBACK,relic.pos.x,relic.pos.y,relic.pos.z,2) end
  717. end
  718. end
  719. -- shift click
  720. if IsKeyDown(16) then
  721. relic.drawText = " "..(relic.unlockTime ~= nil and TimerText(relic.unlockTime) or "")
  722. relic.textUnder = (CursorIsUnder(relic.minimap.x - 9, relic.minimap.y - 5, 20, 8))
  723. else
  724. relic.drawText = " "..(relic.secondLeft ~= nil and TimerText(relic.secondLeft) or "")
  725. relic.textUnder = false
  726. end
  727. end
  728. end
  729.  
  730. for i,heal in pairs(heals[mapName]) do
  731. for j,healObject in pairs(heal.objects) do
  732. if (not healObject.locked and healObject.found and (not healObject.object or not healObject.object.valid or healObject.object.dead)) then
  733. healObject.drawColor = 0xFF00FF04
  734. healObject.unlockTime = math.ceil(GameTime + heal.respawn)
  735. healObject.drawText = ""
  736. healObject.found = false
  737. healObject.locked = true
  738. end
  739. if healObject.locked then
  740. -- shift click
  741. local secondLeft = math.ceil(math.max(0, healObject.unlockTime - GameTime))
  742. if IsKeyDown(16) then
  743. healObject.drawText = " "..(healObject.unlockTime ~= nil and TimerText(healObject.unlockTime) or "")
  744. healObject.textUnder = (CursorIsUnder(healObject.minimap.x - 9, healObject.minimap.y - 5, 20, 8))
  745. else
  746. healObject.drawText = " "..(secondLeft ~= nil and TimerText(secondLeft) or "")
  747. healObject.textUnder = false
  748. end
  749. if secondLeft == 0 then healObject.locked = false end
  750. end
  751. end
  752. end
  753. -- inhib
  754. for i,inhibitor in pairs(inhibitors) do
  755. if inhibitor.destroyed then
  756. local tick = GetTickCount()
  757. if inhibitor.rtime < tick then
  758. inhibitor.destroyed = false
  759. else
  760. inhibitor.ltime = (inhibitor.rtime - GetTickCount()) / 1000;
  761. inhibitor.drawText = TimerText(inhibitor.ltime)
  762. --inhibitor.drawText = (IsKeyDown(16) and TimerText(inhibitor.rtime) or TimerText(inhibitor.rtime))
  763. if MMTConfig.textOnMap and inhibitor.textTick < tick then
  764. inhibitor.textTick = tick + 1000
  765. PrintFloatText(inhibitor.object,6,inhibitor.drawText)
  766. end
  767. end
  768. end
  769. end
  770. end
  771.  
  772. function OnDraw()
  773. if GetGame().isOver then return end
  774. for i,monster in pairs(monsters[mapName]) do
  775. if monster.isSeen == true then
  776. for j,camp in pairs(monster.camps) do
  777. if camp.status == 2 then
  778. DrawText("X",16,camp.minimap.x - 4, camp.minimap.y - 5, camp.drawColor)
  779. elseif camp.status == 4 then
  780. DrawText(camp.drawText,16,camp.minimap.x - 9, camp.minimap.y - 5, camp.drawColor)
  781. end
  782. end
  783. end
  784. end
  785. for i,altar in pairs(altars[mapName]) do
  786. if altar.locked then
  787. DrawText(altar.drawText,16,altar.minimap.x - 9, altar.minimap.y - 5, altar.drawColor)
  788. end
  789. end
  790. for i,relic in pairs(relics[mapName]) do
  791. if relic.locked then
  792. DrawText(relic.drawText,16,relic.minimap.x - 9, relic.minimap.y - 5, relic.drawColor)
  793. end
  794. end
  795. for i,heal in pairs(heals[mapName]) do
  796. for j,healObject in pairs(heal.objects) do
  797. if healObject.locked then
  798. DrawText(healObject.drawText,16,healObject.minimap.x - 9, healObject.minimap.y - 5, healObject.drawColor)
  799. end
  800. end
  801. end
  802. for i,inhibitor in pairs(inhibitors) do
  803. if inhibitor.destroyed == true then
  804. DrawText(inhibitor.drawText,16,inhibitor.minimap.x - 9, inhibitor.minimap.y - 5, 0xFFFFFF00)
  805. end
  806. end
  807. end
  808.  
  809. function OnWndMsg(msg,key)
  810. if msg == WM_LBUTTONDOWN and IsKeyDown(16) then
  811. for i,monster in pairs(monsters[mapName]) do
  812. if monster.isSeen == true then
  813. if monster.iconUnder then
  814. monster.advise = not monster.advise
  815. break
  816. else
  817. for j,camp in pairs(monster.camps) do
  818. if camp.textUnder then
  819. if camp.respawnText ~= nil then SendChat(""..camp.respawnText) end
  820. break
  821. end
  822. end
  823. end
  824. end
  825. end
  826. for i,altar in pairs(altars[mapName]) do
  827. if altar.locked and altar.textUnder then
  828. if altar.unlockText ~= nil then SendChat(""..altar.unlockText) end
  829. break
  830. end
  831. end
  832. end
  833. end
  834. end
  835.  
  836.  
  837.  
  838. --[[
  839. Script: minimapTimers v0.3 (3.14 LoL patch)
  840.  
  841. Author: SurfaceS
  842. Updated by TEAM DEKLAND
  843. ]]
  844. do
  845. --[[ GLOBAL ]]
  846. monsters = {
  847. summonerRift = {
  848. { -- baron
  849. name = "baron",
  850. spawn = 900,
  851. respawn = 420,
  852. advise = true,
  853. camps = {
  854. {
  855. pos = { x = 4600, y = 60, z = 10250 },
  856. name = "monsterCamp_12",
  857. creeps = { { { name = "Worm12.1.1" }, }, },
  858. team = TEAM_NEUTRAL,
  859. },
  860. },
  861. },
  862. { -- dragon
  863. name = "dragon",
  864. spawn = 150,
  865. respawn = 360,
  866. advise = true,
  867. camps = {
  868. {
  869. pos = { x = 9459, y = 60, z = 4193 },
  870. name = "monsterCamp_6",
  871. creeps = { { { name = "Dragon6.1.1" }, }, },
  872. team = TEAM_NEUTRAL,
  873. },
  874. },
  875. },
  876. { -- blue
  877. name = "blue",
  878. spawn = 115,
  879. respawn = 300,
  880. advise = true,
  881. camps = {
  882. {
  883. pos = { x = 3632, y = 60, z = 7600 },
  884. name = "monsterCamp_1",
  885. creeps = { { { name = "AncientGolem1.1.1" }, { name = "YoungLizard1.1.2" }, { name = "YoungLizard1.1.3" }, }, },
  886. team = TEAM_BLUE,
  887. },
  888. {
  889. pos = { x = 10386, y = 60, z = 6811 },
  890. name = "monsterCamp_7",
  891. creeps = { { { name = "AncientGolem7.1.1" }, { name = "YoungLizard7.1.2" }, { name = "YoungLizard7.1.3" }, }, },
  892. team = TEAM_RED,
  893. },
  894. },
  895. },
  896. { -- red
  897. name = "red",
  898. spawn = 115,
  899. respawn = 300,
  900. advise = true,
  901. camps = {
  902. {
  903. pos = { x = 7455, y = 60, z = 3890 },
  904. name = "monsterCamp_4",
  905. creeps = { { { name = "LizardElder4.1.1" }, { name = "YoungLizard4.1.2" }, { name = "YoungLizard4.1.3" }, }, },
  906. team = TEAM_BLUE,
  907. },
  908. {
  909. pos = { x = 6504, y = 60, z = 10584 },
  910. name = "monsterCamp_10",
  911. creeps = { { { name = "LizardElder10.1.1" }, { name = "YoungLizard10.1.2" }, { name = "YoungLizard10.1.3" }, }, },
  912. team = TEAM_RED,
  913. },
  914. },
  915. },
  916. { -- wolves
  917. name = "wolves",
  918. spawn = 115,
  919. respawn = 50,
  920. advise = false,
  921. camps = {
  922. {
  923. name = "monsterCamp_2",
  924. creeps = { { { name = "GiantWolf2.1.3" }, { name = "wolf2.1.1" }, { name = "wolf2.1.2" }, }, },
  925. team = TEAM_BLUE,
  926. },
  927. {
  928. name = "monsterCamp_8",
  929. creeps = { { { name = "GiantWolf8.1.3" }, { name = "wolf8.1.1" }, { name = "wolf8.1.2" }, }, },
  930. team = TEAM_RED,
  931. },
  932. },
  933. },
  934. { -- wraiths
  935. name = "wraiths",
  936. spawn = 115,
  937. respawn = 50,
  938. advise = false,
  939. camps = {
  940. {
  941. name = "monsterCamp_3",
  942. creeps = { { { name = "Wraith3.1.3" }, { name = "LesserWraith3.1.1" }, { name = "LesserWraith3.1.2" }, { name = "LesserWraith3.1.4" }, }, },
  943. team = TEAM_BLUE,
  944. },
  945. {
  946. name = "monsterCamp_9",
  947. creeps = { { { name = "Wraith9.1.3" }, { name = "LesserWraith9.1.1" }, { name = "LesserWraith9.1.2" }, { name = "LesserWraith9.1.4" }, }, },
  948. team = TEAM_RED,
  949. },
  950. },
  951. },
  952. { -- GreatWraiths
  953. name = "GreatWraiths",
  954. spawn = 115,
  955. respawn = 50,
  956. advise = false,
  957. camps = {
  958. {
  959. name = "monsterCamp_13",
  960. creeps = { { { name = "GreatWraith13.1.1" }, }, },
  961. team = TEAM_BLUE,
  962. },
  963. {
  964. name = "monsterCamp_14",
  965. creeps = { { { name = "GreatWraith14.1.1" }, }, },
  966. team = TEAM_RED,
  967. },
  968. },
  969. },
  970. { -- Golems
  971. name = "Golems",
  972. spawn = 115,
  973. respawn = 50,
  974. advise = false,
  975. camps = {
  976. {
  977. name = "monsterCamp_5",
  978. creeps = { { { name = "Golem5.1.2" }, { name = "SmallGolem5.1.1" }, }, },
  979. team = TEAM_BLUE,
  980. },
  981. {
  982. name = "monsterCamp_11",
  983. creeps = { { { name = "Golem11.1.2" }, { name = "SmallGolem11.1.1" }, }, },
  984. team = TEAM_RED,
  985. },
  986. },
  987. },
  988. },
  989. twistedTreeline = {
  990. { -- Wraith
  991. name = "Wraith",
  992. spawn = 100,
  993. respawn = 50,
  994. advise = false,
  995. camps = {
  996. {
  997. --pos = { x = 4414, y = 60, z = 5774 },
  998. name = "monsterCamp_1",
  999. creeps = {
  1000. { { name = "TT_NWraith1.1.1" }, { name = "TT_NWraith21.1.2" }, { name = "TT_NWraith21.1.3" }, },
  1001. },
  1002. team = TEAM_BLUE,
  1003. },
  1004. {
  1005. --pos = { x = 11008, y = 60, z = 5775 },
  1006. name = "monsterCamp_4",
  1007. creeps = {
  1008. { { name = "TT_NWraith4.1.1" }, { name = "TT_NWraith24.1.2" }, { name = "TT_NWraith24.1.3" }, },
  1009. },
  1010. team = TEAM_RED,
  1011. },
  1012. },
  1013. },
  1014. { -- Golems
  1015. name = "Golems",
  1016. respawn = 50,
  1017. spawn = 100,
  1018. advise = false,
  1019. camps = {
  1020. {
  1021. --pos = { x = 5088, y = 60, z = 8065 },
  1022. name = "monsterCamp_2",
  1023. creeps = {
  1024. { { name = "TT_NGolem2.1.1" }, { name = "TT_NGolem22.1.2" } },
  1025. },
  1026. team = TEAM_BLUE,
  1027. },
  1028. {
  1029. --pos = { x = 10341, y = 60, z = 8084 },
  1030. name = "monsterCamp_5",
  1031. creeps = {
  1032. { { name = "TT_NGolem5.1.1" }, { name = "TT_NGolem25.1.2" } },
  1033. },
  1034. team = TEAM_RED,
  1035. },
  1036. },
  1037. },
  1038. { -- Wolves
  1039. name = "Wolves",
  1040. respawn = 50,
  1041. spawn = 100,
  1042. advise = false,
  1043. camps = {
  1044. {
  1045. --pos = { x = 6148, y = 60, z = 5993 },
  1046. name = "monsterCamp_3",
  1047. creeps = { { { name = "TT_NWolf3.1.1" }, { name = "TT_NWolf23.1.2" }, { name = "TT_NWolf23.1.3" } }, },
  1048. team = TEAM_BLUE,
  1049. },
  1050. {
  1051. --pos = { x = 9239, y = 60, z = 6022 },
  1052. name = "monsterCamp_6",
  1053. creeps = { { { name = "TT_NWolf6.1.1" }, { name = "TT_NWolf26.1.2" }, { name = "TT_NWolf26.1.3" } }, },
  1054. team = TEAM_RED,
  1055. },
  1056. },
  1057. },
  1058. { -- Heal
  1059. name = "Heal",
  1060. spawn = 115,
  1061. respawn = 90,
  1062. advise = true,
  1063. camps = {
  1064. {
  1065. pos = { x = 7711, y = 60, z = 6722 },
  1066. name = "monsterCamp_7",
  1067. creeps = { { { name = "TT_Relic7.1.1" }, }, },
  1068. team = TEAM_NEUTRAL,
  1069. },
  1070. },
  1071. },
  1072. { -- Vilemaw
  1073. name = "Vilemaw",
  1074. spawn = 600,
  1075. respawn = 300,
  1076. advise = true,
  1077. camps = {
  1078. {
  1079. pos = { x = 7711, y = 60, z = 10080 },
  1080. name = "monsterCamp_8",
  1081. creeps = { { { name = "TT_Spiderboss8.1.1" }, }, },
  1082. team = TEAM_NEUTRAL,
  1083. },
  1084. },
  1085. },
  1086. },
  1087. crystalScar = {},
  1088. provingGrounds = {
  1089. { -- Heal
  1090. name = "Heal",
  1091. spawn = 190,
  1092. respawn = 40,
  1093. advise = false,
  1094. camps = {
  1095. {
  1096. pos = { x = 8922, y = 60, z = 7868 },
  1097. name = "monsterCamp_1",
  1098. creeps = { { { name = "OdinShieldRelic1.1.1" }, }, },
  1099. team = TEAM_NEUTRAL,
  1100. },
  1101. {
  1102. pos = { x = 7473, y = 60, z = 6617 },
  1103. name = "monsterCamp_2",
  1104. creeps = { { { name = "OdinShieldRelic2.1.1" }, }, },
  1105. team = TEAM_NEUTRAL,
  1106. },
  1107. {
  1108. pos = { x = 5929, y = 60, z = 5190 },
  1109. name = "monsterCamp_3",
  1110. creeps = { { { name = "OdinShieldRelic3.1.1" }, }, },
  1111. team = TEAM_NEUTRAL,
  1112. },
  1113. {
  1114. pos = { x = 4751, y = 60, z = 3901 },
  1115. name = "monsterCamp_4",
  1116. creeps = { { { name = "OdinShieldRelic4.1.1" }, }, },
  1117. team = TEAM_NEUTRAL,
  1118. },
  1119. },
  1120. },
  1121. },
  1122. howlingAbyss = {
  1123. { -- Heal
  1124. name = "Heal",
  1125. spawn = 190,
  1126. respawn = 40,
  1127. advise = false,
  1128. camps = {
  1129. {
  1130. pos = { x = 8922, y = 60, z = 7868 },
  1131. name = "monsterCamp_1",
  1132. creeps = { { { name = "HA_AP_HealthRelic1.1.1" }, }, },
  1133. team = TEAM_NEUTRAL,
  1134. },
  1135. {
  1136. pos = { x = 7473, y = 60, z = 6617 },
  1137. name = "monsterCamp_2",
  1138. creeps = { { { name = "HA_AP_HealthRelic2.1.1" }, }, },
  1139. team = TEAM_NEUTRAL,
  1140. },
  1141. {
  1142. pos = { x = 5929, y = 60, z = 5190 },
  1143. name = "monsterCamp_3",
  1144. creeps = { { { name = "HA_AP_HealthRelic3.1.1" }, }, },
  1145. team = TEAM_NEUTRAL,
  1146. },
  1147. {
  1148. pos = { x = 4751, y = 60, z = 3901 },
  1149. name = "monsterCamp_4",
  1150. creeps = { { { name = "HA_AP_HealthRelic4.1.1" }, }, },
  1151. team = TEAM_NEUTRAL,
  1152. },
  1153. },
  1154. },
  1155. },
  1156. }
  1157.  
  1158. altars = {
  1159. summonerRift = {},
  1160. twistedTreeline = {
  1161. {
  1162. name = "Left Altar",
  1163. spawn = 180,
  1164. respawn = 85,
  1165. advise = true,
  1166. objectName = "TT_Buffplat_L",
  1167. locked = false,
  1168. lockNames = {"TT_Lock_Blue_L.troy", "TT_Lock_Purple_L.troy", "TT_Lock_Neutral_L.troy", },
  1169. unlockNames = {"TT_Unlock_Blue_L.troy", "TT_Unlock_purple_L.troy", "TT_Unlock_Neutral_L.troy", },
  1170. },
  1171. {
  1172. name = "Right Altar",
  1173. spawn = 180,
  1174. respawn = 85,
  1175. advise = true,
  1176. objectName = "TT_Buffplat_R",
  1177. locked = false,
  1178. lockNames = {"TT_Lock_Blue_R.troy", "TT_Lock_Purple_R.troy", "TT_Lock_Neutral_R.troy", },
  1179. unlockNames = {"TT_Unlock_Blue_R.troy", "TT_Unlock_purple_R.troy", "TT_Unlock_Neutral_R.troy", },
  1180. },
  1181. },
  1182. crystalScar = {},
  1183. provingGrounds = {},
  1184. howlingAbyss = {},
  1185. }
  1186.  
  1187. relics = {
  1188. summonerRift = {},
  1189. twistedTreeline = {},
  1190. crystalScar = {
  1191. {
  1192. pos = { x = 5500, y = 60, z = 6500 },
  1193. name = "Relic",
  1194. team = TEAM_BLUE,
  1195. spawn = 180,
  1196. respawn = 180,
  1197. advise = true,
  1198. locked = false,
  1199. precenceObject = (player.team == TEAM_BLUE and "Odin_Prism_Green.troy" or "Odin_Prism_Red.troy"),
  1200. },
  1201. {
  1202. pos = { x = 7550, y = 60, z = 6500 },
  1203. name = "Relic",
  1204. team = TEAM_RED,
  1205. spawn = 180,
  1206. respawn = 180,
  1207. advise = true,
  1208. locked = false,
  1209. precenceObject = (player.team == TEAM_RED and "Odin_Prism_Green.troy" or "Odin_Prism_Red.troy"),
  1210. },
  1211. },
  1212. provingGrounds = {},
  1213. howlingAbyss = {},
  1214. }
  1215.  
  1216. heals = {
  1217. summonerRift = {},
  1218. twistedTreeline = {},
  1219. provingGrounds = {},
  1220. crystalScar = {
  1221. {
  1222. name = "Heal",
  1223. objectName = "OdinShieldRelic",
  1224. respawn = 30,
  1225. objects = {},
  1226. },
  1227. },
  1228. howlingAbyss = {},
  1229. }
  1230.  
  1231. inhibitors = {}
  1232.  
  1233. function addCampCreepAltar(object)
  1234. if object ~= nil and object.name ~= nil then
  1235. if object.name == "Order_Inhibit_Gem.troy" or object.name == "Chaos_Inhibit_Gem.troy" then
  1236. table.insert(inhibitors, { object = object, destroyed = false, lefttime = 0, x = object.x, y = object.y, z = object.z, minimap = GetMinimap(object), textTick = 0 })
  1237. return
  1238. elseif object.name == "Order_Inhibit_Crystal_Shatter.troy" or object.name == "Chaos_Inhibit_Crystal_Shatter.troy" then
  1239. for i,inhibitor in pairs(inhibitors) do
  1240. if GetDistance(inhibitor, object) < 200 then
  1241. local tick = GetTickCount()
  1242. inhibitor.dtime = tick
  1243. inhibitor.rtime = tick + 300000
  1244. inhibitor.ltime = 300000
  1245. inhibitor.destroyed = true
  1246. end
  1247. end
  1248. return
  1249. end
  1250. for i,monster in pairs(monsters[mapName]) do
  1251. for j,camp in pairs(monster.camps) do
  1252. if camp.name == object.name then
  1253. camp.object = object
  1254. return
  1255. end
  1256. if object.type == "obj_AI_Minion" then
  1257. for k,creepPack in ipairs(camp.creeps) do
  1258. for l,creep in ipairs(creepPack) do
  1259. if object.name == creep.name then
  1260. creep.object = object
  1261. return
  1262. end
  1263. end
  1264. end
  1265. end
  1266. end
  1267. end
  1268. for i,altar in pairs(altars[mapName]) do
  1269. if altar.objectName == object.name then
  1270. altar.object = object
  1271. altar.textTick = 0
  1272. altar.minimap = GetMinimap(object)
  1273. end
  1274. if altar.locked then
  1275. for j,lockName in pairs(altar.unlockNames) do
  1276. if lockName == object.name then
  1277. altar.locked = false
  1278. return
  1279. end
  1280. end
  1281. else
  1282. for j,lockName in pairs(altar.lockNames) do
  1283. if lockName == object.name then
  1284. altar.drawColor = 0
  1285. altar.drawText = ""
  1286. altar.locked = true
  1287. altar.advised = false
  1288. altar.advisedBefore = false
  1289. return
  1290. end
  1291. end
  1292. end
  1293. end
  1294. for i,relic in pairs(relics[mapName]) do
  1295. if relic.precenceObject == object.name then
  1296. relic.object = object
  1297. relic.textTick = 0
  1298. relic.locked = false
  1299. return
  1300. end
  1301. end
  1302. for i,heal in pairs(heals[mapName]) do
  1303. if heal.objectName == object.name then
  1304. for j,healObject in pairs(heal.objects) do
  1305. if (GetDistance(healObject, object) < 50) then
  1306. healObject.object = object
  1307. healObject.found = true
  1308. healObject.locked = false
  1309. return
  1310. end
  1311. end
  1312. local k = #heal.objects + 1
  1313. heals[mapName][i].objects[k] = {found = true, locked = false, object = object, x = object.x, y = object.y, z = object.z, minimap = GetMinimap(object), textTick = 0,}
  1314. return
  1315. end
  1316. end
  1317. end
  1318. end
  1319.  
  1320. function removeCreep(object)
  1321. if object ~= nil and object.type == "obj_AI_Minion" and object.name ~= nil then
  1322. for i,monster in pairs(monsters[mapName]) do
  1323. for j,camp in pairs(monster.camps) do
  1324. for k,creepPack in ipairs(camp.creeps) do
  1325. for l,creep in ipairs(creepPack) do
  1326. if object.name == creep.name then
  1327. creep.object = nil
  1328. return
  1329. end
  1330. end
  1331. end
  1332. end
  1333. end
  1334. end
  1335. end
  1336.  
  1337. function OnLoad()
  1338. mapName = GetGame().map.shortName
  1339. if monsters[mapName] == nil then
  1340. mapName = nil
  1341. monsters = nil
  1342. addCampCreepAltar = nil
  1343. removeCreep = nil
  1344. addAltarObject = nil
  1345. return
  1346. else
  1347. startTick = GetGame().tick
  1348. -- CONFIG
  1349. MMTConfig = scriptConfig("Timers 0.2", "minimapTimers")
  1350. MMTConfig:addParam("pingOnRespawn", "Ping on respawn", SCRIPT_PARAM_ONOFF, true) -- ping location on respawn
  1351. MMTConfig:addParam("pingOnRespawnBefore", "Ping before respawn", SCRIPT_PARAM_ONOFF, true) -- ping location before respawn
  1352. MMTConfig:addParam("textOnRespawn", "Chat on respawn", SCRIPT_PARAM_ONOFF, true) -- print chat text on respawn
  1353. MMTConfig:addParam("textOnRespawnBefore", "Chat before respawn", SCRIPT_PARAM_ONOFF, true) -- print chat text before respawn
  1354. MMTConfig:addParam("adviceEnemyMonsters", "Advice enemy monster", SCRIPT_PARAM_ONOFF, true) -- advice enemy monster, or just our monsters
  1355. MMTConfig:addParam("adviceBefore", "Advice Time", SCRIPT_PARAM_SLICE, 20, 1, 40, 0) -- time in second to advice before monster respawn
  1356. MMTConfig:addParam("textOnMap", "Text on map", SCRIPT_PARAM_ONOFF, true) -- time in second on map
  1357. for i,monster in pairs(monsters[mapName]) do
  1358. monster.isSeen = false
  1359. for j,camp in pairs(monster.camps) do
  1360. camp.enemyTeam = (camp.team == TEAM_ENEMY)
  1361. camp.textTick = 0
  1362. camp.status = 0
  1363. camp.drawText = ""
  1364. camp.drawColor = 0xFF00FF00
  1365. end
  1366. end
  1367. for i = 1, objManager.maxObjects do
  1368. local object = objManager:getObject(i)
  1369. if object ~= nil then
  1370. addCampCreepAltar(object)
  1371. end
  1372. end
  1373. AddCreateObjCallback(addCampCreepAltar)
  1374. AddDeleteObjCallback(removeCreep)
  1375. end
  1376. end
  1377. function OnTick()
  1378. if GetGame().isOver then return end
  1379. local GameTime = (GetTickCount()-startTick) / 1000
  1380. local monsterCount = 0
  1381. for i,monster in pairs(monsters[mapName]) do
  1382. for j,camp in pairs(monster.camps) do
  1383. local campStatus = 0
  1384. for k,creepPack in ipairs(camp.creeps) do
  1385. for l,creep in ipairs(creepPack) do
  1386. if creep.object ~= nil and creep.object.valid and creep.object.dead == false then
  1387. if l == 1 then
  1388. campStatus = 1
  1389. elseif campStatus ~= 1 then
  1390. campStatus = 2
  1391. end
  1392. end
  1393. end
  1394. end
  1395. --[[ Not used until camp.showOnMinimap work
  1396. if (camp.object and camp.object.showOnMinimap == 1) then
  1397. -- camp is here
  1398. if campStatus == 0 then campStatus = 3 end
  1399. elseif camp.status == 3 then -- empty not seen when killed
  1400. campStatus = 5
  1401. elseif campStatus == 0 and (camp.status == 1 or camp.status == 2) then
  1402. campStatus = 4
  1403. camp.deathTick = tick
  1404. end
  1405. ]]
  1406. -- temp fix until camp.showOnMinimap work
  1407. -- not so good
  1408. if camp.object ~= nil and camp.object.valid then
  1409. camp.minimap = GetMinimap(camp.object)
  1410. if campStatus == 0 then
  1411. if (camp.status == 1 or camp.status == 2) then
  1412. campStatus = 4
  1413. camp.advisedBefore = false
  1414. camp.advised = false
  1415. camp.respawnTime = math.ceil(GameTime) + monster.respawn
  1416. camp.respawnText = (camp.enemyTeam and "Enemy " or "")..monster.name.." respawn at "..TimerText(camp.respawnTime)
  1417. elseif (camp.status == 4) then
  1418. campStatus = 4
  1419. else
  1420. campStatus = 3
  1421. end
  1422. end
  1423. elseif camp.pos ~= nil then
  1424. camp.minimap = GetMinimap(camp.pos)
  1425. if (GameTime < monster.spawn) then
  1426. campStatus = 4
  1427. camp.advisedBefore = true
  1428. camp.advised = true
  1429. camp.respawnTime = monster.spawn
  1430. camp.respawnText = (camp.enemyTeam and "Enemy " or "")..monster.name.." spawn at "..TimerText(camp.respawnTime)
  1431. end
  1432. end
  1433. if camp.status ~= campStatus or campStatus == 4 then
  1434. if campStatus ~= 0 then
  1435. if monster.isSeen == false then monster.isSeen = true end
  1436. camp.status = campStatus
  1437. end
  1438. if camp.status == 1 then -- ready
  1439. camp.drawText = "ready"
  1440. camp.drawColor = 0xFF00FF00
  1441. elseif camp.status == 2 then -- ready, master creeps dead
  1442. camp.drawText = "stolen"
  1443. camp.drawColor = 0xFFFF0000
  1444. elseif camp.status == 3 then -- ready, not creeps shown
  1445. camp.drawText = " ?"
  1446. camp.drawColor = 0xFF00FF00
  1447. elseif camp.status == 4 then -- empty from creeps kill
  1448. local secondLeft = math.ceil(math.max(0, camp.respawnTime - GameTime))
  1449. if monster.advise == true and (MMTConfig.adviceEnemyMonsters == true or camp.enemyTeam == false) then
  1450. if secondLeft == 0 and camp.advised == false then
  1451. camp.advised = true
  1452. if MMTConfig.textOnRespawn then PrintChat("<font color='#00FFCC'>"..(camp.enemyTeam and "Enemy " or "")..monster.name.."</font><font color='#FFAA00'> has respawned</font>") end
  1453. if MMTConfig.pingOnRespawn then PingSignal(PING_FALLBACK,camp.object.x,camp.object.y,camp.object.z,2) end
  1454. elseif secondLeft <= MMTConfig.adviceBefore and camp.advisedBefore == false then
  1455. camp.advisedBefore = true
  1456. if MMTConfig.textOnRespawnBefore then PrintChat("<font color='#00FFCC'>"..(camp.enemyTeam and "Enemy " or "")..monster.name.."</font><font color='#FFAA00'> will respawn in </font><font color='#00FFCC'>"..secondLeft.." sec</font>") end
  1457. if MMTConfig.pingOnRespawnBefore then PingSignal(PING_FALLBACK,camp.object.x,camp.object.y,camp.object.z,2) end
  1458. end
  1459. end
  1460. -- temp fix until camp.showOnMinimap work
  1461. if secondLeft == 0 then
  1462. camp.status = 0
  1463. end
  1464. camp.drawText = " "..TimerText(secondLeft)
  1465. camp.drawColor = 0xFFFFFF00
  1466. elseif camp.status == 5 then -- camp found empty (not using yet)
  1467. camp.drawText = " -"
  1468. camp.drawColor = 0xFFFF0000
  1469. end
  1470. end
  1471. -- shift click
  1472. if IsKeyDown(16) and camp.status == 4 then
  1473. camp.drawText = " "..(camp.respawnTime ~= nil and TimerText(camp.respawnTime) or "")
  1474. camp.textUnder = (CursorIsUnder(camp.minimap.x - 9, camp.minimap.y - 5, 20, 8))
  1475. else
  1476. camp.textUnder = false
  1477. end
  1478. if MMTConfig.textOnMap and camp.status == 4 and camp.object and camp.object.valid and camp.textTick < GetTickCount() and camp.floatText ~= camp.drawText then
  1479. camp.floatText = camp.drawText
  1480. camp.textTick = GetTickCount() + 1000
  1481. PrintFloatText(camp.object,6,camp.floatText)
  1482. end
  1483. end
  1484. end
  1485.  
  1486. -- altars
  1487. for i,altar in pairs(altars[mapName]) do
  1488. if altar.object and altar.object.valid then
  1489. if altar.locked then
  1490. if GameTime < altar.spawn then
  1491. altar.secondLeft = math.ceil(math.max(0, altar.spawn - GameTime))
  1492. else
  1493. local tmpTime = ((altar.object.mana > 39600) and (altar.object.mana - 39900) / 20100 or (39600 - altar.object.mana) / 20100)
  1494. altar.secondLeft = math.ceil(math.max(0, tmpTime * altar.respawn))
  1495. end
  1496. altar.unlockTime = math.ceil(GameTime + altar.secondLeft)
  1497. altar.unlockText = altar.name.." unlock at "..TimerText(altar.unlockTime)
  1498. altar.drawColor = 0xFFFFFF00
  1499. if altar.advise == true then
  1500. if altar.secondLeft == 0 and altar.advised == false then
  1501. altar.advised = true
  1502. if MMTConfig.textOnRespawn then PrintChat("<font color='#00FFCC'>"..altar.name.."</font><font color='#FFAA00'> is unlocked</font>") end
  1503. if MMTConfig.pingOnRespawn then PingSignal(PING_FALLBACK,altar.object.x,altar.object.y,altar.object.z,2) end
  1504. elseif altar.secondLeft <= MMTConfig.adviceBefore and altar.advisedBefore == false then
  1505. altar.advisedBefore = true
  1506. if MMTConfig.textOnRespawnBefore then PrintChat("<font color='#00FFCC'>"..altar.name.."</font><font color='#FFAA00'> will unlock in </font><font color='#00FFCC'>"..altar.secondLeft.." sec</font>") end
  1507. if MMTConfig.pingOnRespawnBefore then PingSignal(PING_FALLBACK,altar.object.x,altar.object.y,altar.object.z,2) end
  1508. end
  1509. end
  1510. -- shift click
  1511. if IsKeyDown(16) then
  1512. altar.drawText = " "..(altar.unlockTime ~= nil and TimerText(altar.unlockTime) or "")
  1513. altar.textUnder = (CursorIsUnder(altar.minimap.x - 9, altar.minimap.y - 5, 20, 8))
  1514. else
  1515. altar.drawText = " "..(altar.secondLeft ~= nil and TimerText(altar.secondLeft) or "")
  1516. altar.textUnder = false
  1517. end
  1518. if MMTConfig.textOnMap and altar.object and altar.object.valid and altar.textTick < GetTickCount() and altar.floatText ~= altar.drawText then
  1519. altar.floatText = altar.drawText
  1520. altar.textTick = GetTickCount() + 1000
  1521. PrintFloatText(altar.object,6,altar.floatText)
  1522. end
  1523. end
  1524. end
  1525. end
  1526.  
  1527. -- relics
  1528. for i,relic in pairs(relics[mapName]) do
  1529. if (not relic.locked and (not relic.object or not relic.object.valid or relic.dead)) then
  1530. if GameTime < relic.spawn then
  1531. relic.unlockTime = relic.spawn - GameTime
  1532. else
  1533. relic.unlockTime = math.ceil(GameTime + relic.respawn)
  1534. end
  1535. relic.advised = false
  1536. relic.advisedBefore = false
  1537. relic.drawText = ""
  1538. relic.unlockText = relic.name.." respawn at "..TimerText(relic.unlockTime)
  1539. relic.drawColor = 4288610048
  1540. --FF9EFF00
  1541. relic.minimap = GetMinimap(relic.pos)
  1542. relic.locked = true
  1543. end
  1544. if relic.locked then
  1545. relic.secondLeft = math.ceil(math.max(0, relic.unlockTime - GameTime))
  1546. if relic.advise == true then
  1547. if relic.secondLeft == 0 and relic.advised == false then
  1548. relic.advised = true
  1549. if MMTConfig.textOnRespawn then PrintChat("<font color='#00FFCC'>"..relic.name.."</font><font color='#FFAA00'> has respawned</font>") end
  1550. if MMTConfig.pingOnRespawn then PingSignal(PING_FALLBACK,relic.pos.x,relic.pos.y,relic.pos.z,2) end
  1551. elseif relic.secondLeft <= MMTConfig.adviceBefore and relic.advisedBefore == false then
  1552. relic.advisedBefore = true
  1553. if MMTConfig.textOnRespawnBefore then PrintChat("<font color='#00FFCC'>"..relic.name.."</font><font color='#FFAA00'> will respawn in </font><font color='#00FFCC'>"..relic.secondLeft.." sec</font>") end
  1554. if MMTConfig.pingOnRespawnBefore then PingSignal(PING_FALLBACK,relic.pos.x,relic.pos.y,relic.pos.z,2) end
  1555. end
  1556. end
  1557. -- shift click
  1558. if IsKeyDown(16) then
  1559. relic.drawText = " "..(relic.unlockTime ~= nil and TimerText(relic.unlockTime) or "")
  1560. relic.textUnder = (CursorIsUnder(relic.minimap.x - 9, relic.minimap.y - 5, 20, 8))
  1561. else
  1562. relic.drawText = " "..(relic.secondLeft ~= nil and TimerText(relic.secondLeft) or "")
  1563. relic.textUnder = false
  1564. end
  1565. end
  1566. end
  1567.  
  1568. for i,heal in pairs(heals[mapName]) do
  1569. for j,healObject in pairs(heal.objects) do
  1570. if (not healObject.locked and healObject.found and (not healObject.object or not healObject.object.valid or healObject.object.dead)) then
  1571. healObject.drawColor = 0xFF00FF04
  1572. healObject.unlockTime = math.ceil(GameTime + heal.respawn)
  1573. healObject.drawText = ""
  1574. healObject.found = false
  1575. healObject.locked = true
  1576. end
  1577. if healObject.locked then
  1578. -- shift click
  1579. local secondLeft = math.ceil(math.max(0, healObject.unlockTime - GameTime))
  1580. if IsKeyDown(16) then
  1581. healObject.drawText = " "..(healObject.unlockTime ~= nil and TimerText(healObject.unlockTime) or "")
  1582. healObject.textUnder = (CursorIsUnder(healObject.minimap.x - 9, healObject.minimap.y - 5, 20, 8))
  1583. else
  1584. healObject.drawText = " "..(secondLeft ~= nil and TimerText(secondLeft) or "")
  1585. healObject.textUnder = false
  1586. end
  1587. if secondLeft == 0 then healObject.locked = false end
  1588. end
  1589. end
  1590. end
  1591. -- inhib
  1592. for i,inhibitor in pairs(inhibitors) do
  1593. if inhibitor.destroyed then
  1594. local tick = GetTickCount()
  1595. if inhibitor.rtime < tick then
  1596. inhibitor.destroyed = false
  1597. else
  1598. inhibitor.ltime = (inhibitor.rtime - GetTickCount()) / 1000;
  1599. inhibitor.drawText = TimerText(inhibitor.ltime)
  1600. --inhibitor.drawText = (IsKeyDown(16) and TimerText(inhibitor.rtime) or TimerText(inhibitor.rtime))
  1601. if MMTConfig.textOnMap and inhibitor.textTick < tick then
  1602. inhibitor.textTick = tick + 1000
  1603. PrintFloatText(inhibitor.object,6,inhibitor.drawText)
  1604. end
  1605. end
  1606. end
  1607. end
  1608. end
  1609.  
  1610. function OnDraw()
  1611. if GetGame().isOver then return end
  1612. for i,monster in pairs(monsters[mapName]) do
  1613. if monster.isSeen == true then
  1614. for j,camp in pairs(monster.camps) do
  1615. if camp.status == 2 then
  1616. DrawText("X",16,camp.minimap.x - 4, camp.minimap.y - 5, camp.drawColor)
  1617. elseif camp.status == 4 then
  1618. DrawText(camp.drawText,16,camp.minimap.x - 9, camp.minimap.y - 5, camp.drawColor)
  1619. end
  1620. end
  1621. end
  1622. end
  1623. for i,altar in pairs(altars[mapName]) do
  1624. if altar.locked then
  1625. DrawText(altar.drawText,16,altar.minimap.x - 9, altar.minimap.y - 5, altar.drawColor)
  1626. end
  1627. end
  1628. for i,relic in pairs(relics[mapName]) do
  1629. if relic.locked then
  1630. DrawText(relic.drawText,16,relic.minimap.x - 9, relic.minimap.y - 5, relic.drawColor)
  1631. end
  1632. end
  1633. for i,heal in pairs(heals[mapName]) do
  1634. for j,healObject in pairs(heal.objects) do
  1635. if healObject.locked then
  1636. DrawText(healObject.drawText,16,healObject.minimap.x - 9, healObject.minimap.y - 5, healObject.drawColor)
  1637. end
  1638. end
  1639. end
  1640. for i,inhibitor in pairs(inhibitors) do
  1641. if inhibitor.destroyed == true then
  1642. DrawText(inhibitor.drawText,16,inhibitor.minimap.x - 9, inhibitor.minimap.y - 5, 0xFFFFFF00)
  1643. end
  1644. end
  1645. end
  1646.  
  1647. function OnWndMsg(msg,key)
  1648. if msg == WM_LBUTTONDOWN and IsKeyDown(16) then
  1649. for i,monster in pairs(monsters[mapName]) do
  1650. if monster.isSeen == true then
  1651. if monster.iconUnder then
  1652. monster.advise = not monster.advise
  1653. break
  1654. else
  1655. for j,camp in pairs(monster.camps) do
  1656. if camp.textUnder then
  1657. if camp.respawnText ~= nil then SendChat(""..camp.respawnText) end
  1658. break
  1659. end
  1660. end
  1661. end
  1662. end
  1663. end
  1664. for i,altar in pairs(altars[mapName]) do
  1665. if altar.locked and altar.textUnder then
  1666. if altar.unlockText ~= nil then SendChat(""..altar.unlockText) end
  1667. break
  1668. end
  1669. end
  1670. end
  1671. end
  1672. end
  1673.  
  1674.  
  1675.  
  1676. --[[
  1677. Script: minimapTimers v0.3 (3.14 LoL patch)
  1678.  
  1679. Author: SurfaceS
  1680. Updated by TEAM DEKLAND
  1681. ]]
  1682. do
  1683. --[[ GLOBAL ]]
  1684. monsters = {
  1685. summonerRift = {
  1686. { -- baron
  1687. name = "baron",
  1688. spawn = 900,
  1689. respawn = 420,
  1690. advise = true,
  1691. camps = {
  1692. {
  1693. pos = { x = 4600, y = 60, z = 10250 },
  1694. name = "monsterCamp_12",
  1695. creeps = { { { name = "Worm12.1.1" }, }, },
  1696. team = TEAM_NEUTRAL,
  1697. },
  1698. },
  1699. },
  1700. { -- dragon
  1701. name = "dragon",
  1702. spawn = 150,
  1703. respawn = 360,
  1704. advise = true,
  1705. camps = {
  1706. {
  1707. pos = { x = 9459, y = 60, z = 4193 },
  1708. name = "monsterCamp_6",
  1709. creeps = { { { name = "Dragon6.1.1" }, }, },
  1710. team = TEAM_NEUTRAL,
  1711. },
  1712. },
  1713. },
  1714. { -- blue
  1715. name = "blue",
  1716. spawn = 115,
  1717. respawn = 300,
  1718. advise = true,
  1719. camps = {
  1720. {
  1721. pos = { x = 3632, y = 60, z = 7600 },
  1722. name = "monsterCamp_1",
  1723. creeps = { { { name = "AncientGolem1.1.1" }, { name = "YoungLizard1.1.2" }, { name = "YoungLizard1.1.3" }, }, },
  1724. team = TEAM_BLUE,
  1725. },
  1726. {
  1727. pos = { x = 10386, y = 60, z = 6811 },
  1728. name = "monsterCamp_7",
  1729. creeps = { { { name = "AncientGolem7.1.1" }, { name = "YoungLizard7.1.2" }, { name = "YoungLizard7.1.3" }, }, },
  1730. team = TEAM_RED,
  1731. },
  1732. },
  1733. },
  1734. { -- red
  1735. name = "red",
  1736. spawn = 115,
  1737. respawn = 300,
  1738. advise = true,
  1739. camps = {
  1740. {
  1741. pos = { x = 7455, y = 60, z = 3890 },
  1742. name = "monsterCamp_4",
  1743. creeps = { { { name = "LizardElder4.1.1" }, { name = "YoungLizard4.1.2" }, { name = "YoungLizard4.1.3" }, }, },
  1744. team = TEAM_BLUE,
  1745. },
  1746. {
  1747. pos = { x = 6504, y = 60, z = 10584 },
  1748. name = "monsterCamp_10",
  1749. creeps = { { { name = "LizardElder10.1.1" }, { name = "YoungLizard10.1.2" }, { name = "YoungLizard10.1.3" }, }, },
  1750. team = TEAM_RED,
  1751. },
  1752. },
  1753. },
  1754. { -- wolves
  1755. name = "wolves",
  1756. spawn = 115,
  1757. respawn = 50,
  1758. advise = false,
  1759. camps = {
  1760. {
  1761. name = "monsterCamp_2",
  1762. creeps = { { { name = "GiantWolf2.1.3" }, { name = "wolf2.1.1" }, { name = "wolf2.1.2" }, }, },
  1763. team = TEAM_BLUE,
  1764. },
  1765. {
  1766. name = "monsterCamp_8",
  1767. creeps = { { { name = "GiantWolf8.1.3" }, { name = "wolf8.1.1" }, { name = "wolf8.1.2" }, }, },
  1768. team = TEAM_RED,
  1769. },
  1770. },
  1771. },
  1772. { -- wraiths
  1773. name = "wraiths",
  1774. spawn = 115,
  1775. respawn = 50,
  1776. advise = false,
  1777. camps = {
  1778. {
  1779. name = "monsterCamp_3",
  1780. creeps = { { { name = "Wraith3.1.3" }, { name = "LesserWraith3.1.1" }, { name = "LesserWraith3.1.2" }, { name = "LesserWraith3.1.4" }, }, },
  1781. team = TEAM_BLUE,
  1782. },
  1783. {
  1784. name = "monsterCamp_9",
  1785. creeps = { { { name = "Wraith9.1.3" }, { name = "LesserWraith9.1.1" }, { name = "LesserWraith9.1.2" }, { name = "LesserWraith9.1.4" }, }, },
  1786. team = TEAM_RED,
  1787. },
  1788. },
  1789. },
  1790. { -- GreatWraiths
  1791. name = "GreatWraiths",
  1792. spawn = 115,
  1793. respawn = 50,
  1794. advise = false,
  1795. camps = {
  1796. {
  1797. name = "monsterCamp_13",
  1798. creeps = { { { name = "GreatWraith13.1.1" }, }, },
  1799. team = TEAM_BLUE,
  1800. },
  1801. {
  1802. name = "monsterCamp_14",
  1803. creeps = { { { name = "GreatWraith14.1.1" }, }, },
  1804. team = TEAM_RED,
  1805. },
  1806. },
  1807. },
  1808. { -- Golems
  1809. name = "Golems",
  1810. spawn = 115,
  1811. respawn = 50,
  1812. advise = false,
  1813. camps = {
  1814. {
  1815. name = "monsterCamp_5",
  1816. creeps = { { { name = "Golem5.1.2" }, { name = "SmallGolem5.1.1" }, }, },
  1817. team = TEAM_BLUE,
  1818. },
  1819. {
  1820. name = "monsterCamp_11",
  1821. creeps = { { { name = "Golem11.1.2" }, { name = "SmallGolem11.1.1" }, }, },
  1822. team = TEAM_RED,
  1823. },
  1824. },
  1825. },
  1826. },
  1827. twistedTreeline = {
  1828. { -- Wraith
  1829. name = "Wraith",
  1830. spawn = 100,
  1831. respawn = 50,
  1832. advise = false,
  1833. camps = {
  1834. {
  1835. --pos = { x = 4414, y = 60, z = 5774 },
  1836. name = "monsterCamp_1",
  1837. creeps = {
  1838. { { name = "TT_NWraith1.1.1" }, { name = "TT_NWraith21.1.2" }, { name = "TT_NWraith21.1.3" }, },
  1839. },
  1840. team = TEAM_BLUE,
  1841. },
  1842. {
  1843. --pos = { x = 11008, y = 60, z = 5775 },
  1844. name = "monsterCamp_4",
  1845. creeps = {
  1846. { { name = "TT_NWraith4.1.1" }, { name = "TT_NWraith24.1.2" }, { name = "TT_NWraith24.1.3" }, },
  1847. },
  1848. team = TEAM_RED,
  1849. },
  1850. },
  1851. },
  1852. { -- Golems
  1853. name = "Golems",
  1854. respawn = 50,
  1855. spawn = 100,
  1856. advise = false,
  1857. camps = {
  1858. {
  1859. --pos = { x = 5088, y = 60, z = 8065 },
  1860. name = "monsterCamp_2",
  1861. creeps = {
  1862. { { name = "TT_NGolem2.1.1" }, { name = "TT_NGolem22.1.2" } },
  1863. },
  1864. team = TEAM_BLUE,
  1865. },
  1866. {
  1867. --pos = { x = 10341, y = 60, z = 8084 },
  1868. name = "monsterCamp_5",
  1869. creeps = {
  1870. { { name = "TT_NGolem5.1.1" }, { name = "TT_NGolem25.1.2" } },
  1871. },
  1872. team = TEAM_RED,
  1873. },
  1874. },
  1875. },
  1876. { -- Wolves
  1877. name = "Wolves",
  1878. respawn = 50,
  1879. spawn = 100,
  1880. advise = false,
  1881. camps = {
  1882. {
  1883. --pos = { x = 6148, y = 60, z = 5993 },
  1884. name = "monsterCamp_3",
  1885. creeps = { { { name = "TT_NWolf3.1.1" }, { name = "TT_NWolf23.1.2" }, { name = "TT_NWolf23.1.3" } }, },
  1886. team = TEAM_BLUE,
  1887. },
  1888. {
  1889. --pos = { x = 9239, y = 60, z = 6022 },
  1890. name = "monsterCamp_6",
  1891. creeps = { { { name = "TT_NWolf6.1.1" }, { name = "TT_NWolf26.1.2" }, { name = "TT_NWolf26.1.3" } }, },
  1892. team = TEAM_RED,
  1893. },
  1894. },
  1895. },
  1896. { -- Heal
  1897. name = "Heal",
  1898. spawn = 115,
  1899. respawn = 90,
  1900. advise = true,
  1901. camps = {
  1902. {
  1903. pos = { x = 7711, y = 60, z = 6722 },
  1904. name = "monsterCamp_7",
  1905. creeps = { { { name = "TT_Relic7.1.1" }, }, },
  1906. team = TEAM_NEUTRAL,
  1907. },
  1908. },
  1909. },
  1910. { -- Vilemaw
  1911. name = "Vilemaw",
  1912. spawn = 600,
  1913. respawn = 300,
  1914. advise = true,
  1915. camps = {
  1916. {
  1917. pos = { x = 7711, y = 60, z = 10080 },
  1918. name = "monsterCamp_8",
  1919. creeps = { { { name = "TT_Spiderboss8.1.1" }, }, },
  1920. team = TEAM_NEUTRAL,
  1921. },
  1922. },
  1923. },
  1924. },
  1925. crystalScar = {},
  1926. provingGrounds = {
  1927. { -- Heal
  1928. name = "Heal",
  1929. spawn = 190,
  1930. respawn = 40,
  1931. advise = false,
  1932. camps = {
  1933. {
  1934. pos = { x = 8922, y = 60, z = 7868 },
  1935. name = "monsterCamp_1",
  1936. creeps = { { { name = "OdinShieldRelic1.1.1" }, }, },
  1937. team = TEAM_NEUTRAL,
  1938. },
  1939. {
  1940. pos = { x = 7473, y = 60, z = 6617 },
  1941. name = "monsterCamp_2",
  1942. creeps = { { { name = "OdinShieldRelic2.1.1" }, }, },
  1943. team = TEAM_NEUTRAL,
  1944. },
  1945. {
  1946. pos = { x = 5929, y = 60, z = 5190 },
  1947. name = "monsterCamp_3",
  1948. creeps = { { { name = "OdinShieldRelic3.1.1" }, }, },
  1949. team = TEAM_NEUTRAL,
  1950. },
  1951. {
  1952. pos = { x = 4751, y = 60, z = 3901 },
  1953. name = "monsterCamp_4",
  1954. creeps = { { { name = "OdinShieldRelic4.1.1" }, }, },
  1955. team = TEAM_NEUTRAL,
  1956. },
  1957. },
  1958. },
  1959. },
  1960. howlingAbyss = {
  1961. { -- Heal
  1962. name = "Heal",
  1963. spawn = 190,
  1964. respawn = 40,
  1965. advise = false,
  1966. camps = {
  1967. {
  1968. pos = { x = 8922, y = 60, z = 7868 },
  1969. name = "monsterCamp_1",
  1970. creeps = { { { name = "HA_AP_HealthRelic1.1.1" }, }, },
  1971. team = TEAM_NEUTRAL,
  1972. },
  1973. {
  1974. pos = { x = 7473, y = 60, z = 6617 },
  1975. name = "monsterCamp_2",
  1976. creeps = { { { name = "HA_AP_HealthRelic2.1.1" }, }, },
  1977. team = TEAM_NEUTRAL,
  1978. },
  1979. {
  1980. pos = { x = 5929, y = 60, z = 5190 },
  1981. name = "monsterCamp_3",
  1982. creeps = { { { name = "HA_AP_HealthRelic3.1.1" }, }, },
  1983. team = TEAM_NEUTRAL,
  1984. },
  1985. {
  1986. pos = { x = 4751, y = 60, z = 3901 },
  1987. name = "monsterCamp_4",
  1988. creeps = { { { name = "HA_AP_HealthRelic4.1.1" }, }, },
  1989. team = TEAM_NEUTRAL,
  1990. },
  1991. },
  1992. },
  1993. },
  1994. }
  1995.  
  1996. altars = {
  1997. summonerRift = {},
  1998. twistedTreeline = {
  1999. {
  2000. name = "Left Altar",
  2001. spawn = 180,
  2002. respawn = 85,
  2003. advise = true,
  2004. objectName = "TT_Buffplat_L",
  2005. locked = false,
  2006. lockNames = {"TT_Lock_Blue_L.troy", "TT_Lock_Purple_L.troy", "TT_Lock_Neutral_L.troy", },
  2007. unlockNames = {"TT_Unlock_Blue_L.troy", "TT_Unlock_purple_L.troy", "TT_Unlock_Neutral_L.troy", },
  2008. },
  2009. {
  2010. name = "Right Altar",
  2011. spawn = 180,
  2012. respawn = 85,
  2013. advise = true,
  2014. objectName = "TT_Buffplat_R",
  2015. locked = false,
  2016. lockNames = {"TT_Lock_Blue_R.troy", "TT_Lock_Purple_R.troy", "TT_Lock_Neutral_R.troy", },
  2017. unlockNames = {"TT_Unlock_Blue_R.troy", "TT_Unlock_purple_R.troy", "TT_Unlock_Neutral_R.troy", },
  2018. },
  2019. },
  2020. crystalScar = {},
  2021. provingGrounds = {},
  2022. howlingAbyss = {},
  2023. }
  2024.  
  2025. relics = {
  2026. summonerRift = {},
  2027. twistedTreeline = {},
  2028. crystalScar = {
  2029. {
  2030. pos = { x = 5500, y = 60, z = 6500 },
  2031. name = "Relic",
  2032. team = TEAM_BLUE,
  2033. spawn = 180,
  2034. respawn = 180,
  2035. advise = true,
  2036. locked = false,
  2037. precenceObject = (player.team == TEAM_BLUE and "Odin_Prism_Green.troy" or "Odin_Prism_Red.troy"),
  2038. },
  2039. {
  2040. pos = { x = 7550, y = 60, z = 6500 },
  2041. name = "Relic",
  2042. team = TEAM_RED,
  2043. spawn = 180,
  2044. respawn = 180,
  2045. advise = true,
  2046. locked = false,
  2047. precenceObject = (player.team == TEAM_RED and "Odin_Prism_Green.troy" or "Odin_Prism_Red.troy"),
  2048. },
  2049. },
  2050. provingGrounds = {},
  2051. howlingAbyss = {},
  2052. }
  2053.  
  2054. heals = {
  2055. summonerRift = {},
  2056. twistedTreeline = {},
  2057. provingGrounds = {},
  2058. crystalScar = {
  2059. {
  2060. name = "Heal",
  2061. objectName = "OdinShieldRelic",
  2062. respawn = 30,
  2063. objects = {},
  2064. },
  2065. },
  2066. howlingAbyss = {},
  2067. }
  2068.  
  2069. inhibitors = {}
  2070.  
  2071. function addCampCreepAltar(object)
  2072. if object ~= nil and object.name ~= nil then
  2073. if object.name == "Order_Inhibit_Gem.troy" or object.name == "Chaos_Inhibit_Gem.troy" then
  2074. table.insert(inhibitors, { object = object, destroyed = false, lefttime = 0, x = object.x, y = object.y, z = object.z, minimap = GetMinimap(object), textTick = 0 })
  2075. return
  2076. elseif object.name == "Order_Inhibit_Crystal_Shatter.troy" or object.name == "Chaos_Inhibit_Crystal_Shatter.troy" then
  2077. for i,inhibitor in pairs(inhibitors) do
  2078. if GetDistance(inhibitor, object) < 200 then
  2079. local tick = GetTickCount()
  2080. inhibitor.dtime = tick
  2081. inhibitor.rtime = tick + 300000
  2082. inhibitor.ltime = 300000
  2083. inhibitor.destroyed = true
  2084. end
  2085. end
  2086. return
  2087. end
  2088. for i,monster in pairs(monsters[mapName]) do
  2089. for j,camp in pairs(monster.camps) do
  2090. if camp.name == object.name then
  2091. camp.object = object
  2092. return
  2093. end
  2094. if object.type == "obj_AI_Minion" then
  2095. for k,creepPack in ipairs(camp.creeps) do
  2096. for l,creep in ipairs(creepPack) do
  2097. if object.name == creep.name then
  2098. creep.object = object
  2099. return
  2100. end
  2101. end
  2102. end
  2103. end
  2104. end
  2105. end
  2106. for i,altar in pairs(altars[mapName]) do
  2107. if altar.objectName == object.name then
  2108. altar.object = object
  2109. altar.textTick = 0
  2110. altar.minimap = GetMinimap(object)
  2111. end
  2112. if altar.locked then
  2113. for j,lockName in pairs(altar.unlockNames) do
  2114. if lockName == object.name then
  2115. altar.locked = false
  2116. return
  2117. end
  2118. end
  2119. else
  2120. for j,lockName in pairs(altar.lockNames) do
  2121. if lockName == object.name then
  2122. altar.drawColor = 0
  2123. altar.drawText = ""
  2124. altar.locked = true
  2125. altar.advised = false
  2126. altar.advisedBefore = false
  2127. return
  2128. end
  2129. end
  2130. end
  2131. end
  2132. for i,relic in pairs(relics[mapName]) do
  2133. if relic.precenceObject == object.name then
  2134. relic.object = object
  2135. relic.textTick = 0
  2136. relic.locked = false
  2137. return
  2138. end
  2139. end
  2140. for i,heal in pairs(heals[mapName]) do
  2141. if heal.objectName == object.name then
  2142. for j,healObject in pairs(heal.objects) do
  2143. if (GetDistance(healObject, object) < 50) then
  2144. healObject.object = object
  2145. healObject.found = true
  2146. healObject.locked = false
  2147. return
  2148. end
  2149. end
  2150. local k = #heal.objects + 1
  2151. heals[mapName][i].objects[k] = {found = true, locked = false, object = object, x = object.x, y = object.y, z = object.z, minimap = GetMinimap(object), textTick = 0,}
  2152. return
  2153. end
  2154. end
  2155. end
  2156. end
  2157.  
  2158. function removeCreep(object)
  2159. if object ~= nil and object.type == "obj_AI_Minion" and object.name ~= nil then
  2160. for i,monster in pairs(monsters[mapName]) do
  2161. for j,camp in pairs(monster.camps) do
  2162. for k,creepPack in ipairs(camp.creeps) do
  2163. for l,creep in ipairs(creepPack) do
  2164. if object.name == creep.name then
  2165. creep.object = nil
  2166. return
  2167. end
  2168. end
  2169. end
  2170. end
  2171. end
  2172. end
  2173. end
  2174.  
  2175. function OnLoad()
  2176. mapName = GetGame().map.shortName
  2177. if monsters[mapName] == nil then
  2178. mapName = nil
  2179. monsters = nil
  2180. addCampCreepAltar = nil
  2181. removeCreep = nil
  2182. addAltarObject = nil
  2183. return
  2184. else
  2185. startTick = GetGame().tick
  2186. -- CONFIG
  2187. MMTConfig = scriptConfig("Timers 0.2", "minimapTimers")
  2188. MMTConfig:addParam("pingOnRespawn", "Ping on respawn", SCRIPT_PARAM_ONOFF, true) -- ping location on respawn
  2189. MMTConfig:addParam("pingOnRespawnBefore", "Ping before respawn", SCRIPT_PARAM_ONOFF, true) -- ping location before respawn
  2190. MMTConfig:addParam("textOnRespawn", "Chat on respawn", SCRIPT_PARAM_ONOFF, true) -- print chat text on respawn
  2191. MMTConfig:addParam("textOnRespawnBefore", "Chat before respawn", SCRIPT_PARAM_ONOFF, true) -- print chat text before respawn
  2192. MMTConfig:addParam("adviceEnemyMonsters", "Advice enemy monster", SCRIPT_PARAM_ONOFF, true) -- advice enemy monster, or just our monsters
  2193. MMTConfig:addParam("adviceBefore", "Advice Time", SCRIPT_PARAM_SLICE, 20, 1, 40, 0) -- time in second to advice before monster respawn
  2194. MMTConfig:addParam("textOnMap", "Text on map", SCRIPT_PARAM_ONOFF, true) -- time in second on map
  2195. for i,monster in pairs(monsters[mapName]) do
  2196. monster.isSeen = false
  2197. for j,camp in pairs(monster.camps) do
  2198. camp.enemyTeam = (camp.team == TEAM_ENEMY)
  2199. camp.textTick = 0
  2200. camp.status = 0
  2201. camp.drawText = ""
  2202. camp.drawColor = 0xFF00FF00
  2203. end
  2204. end
  2205. for i = 1, objManager.maxObjects do
  2206. local object = objManager:getObject(i)
  2207. if object ~= nil then
  2208. addCampCreepAltar(object)
  2209. end
  2210. end
  2211. AddCreateObjCallback(addCampCreepAltar)
  2212. AddDeleteObjCallback(removeCreep)
  2213. end
  2214. end
  2215. function OnTick()
  2216. if GetGame().isOver then return end
  2217. local GameTime = (GetTickCount()-startTick) / 1000
  2218. local monsterCount = 0
  2219. for i,monster in pairs(monsters[mapName]) do
  2220. for j,camp in pairs(monster.camps) do
  2221. local campStatus = 0
  2222. for k,creepPack in ipairs(camp.creeps) do
  2223. for l,creep in ipairs(creepPack) do
  2224. if creep.object ~= nil and creep.object.valid and creep.object.dead == false then
  2225. if l == 1 then
  2226. campStatus = 1
  2227. elseif campStatus ~= 1 then
  2228. campStatus = 2
  2229. end
  2230. end
  2231. end
  2232. end
  2233. --[[ Not used until camp.showOnMinimap work
  2234. if (camp.object and camp.object.showOnMinimap == 1) then
  2235. -- camp is here
  2236. if campStatus == 0 then campStatus = 3 end
  2237. elseif camp.status == 3 then -- empty not seen when killed
  2238. campStatus = 5
  2239. elseif campStatus == 0 and (camp.status == 1 or camp.status == 2) then
  2240. campStatus = 4
  2241. camp.deathTick = tick
  2242. end
  2243. ]]
  2244. -- temp fix until camp.showOnMinimap work
  2245. -- not so good
  2246. if camp.object ~= nil and camp.object.valid then
  2247. camp.minimap = GetMinimap(camp.object)
  2248. if campStatus == 0 then
  2249. if (camp.status == 1 or camp.status == 2) then
  2250. campStatus = 4
  2251. camp.advisedBefore = false
  2252. camp.advised = false
  2253. camp.respawnTime = math.ceil(GameTime) + monster.respawn
  2254. camp.respawnText = (camp.enemyTeam and "Enemy " or "")..monster.name.." respawn at "..TimerText(camp.respawnTime)
  2255. elseif (camp.status == 4) then
  2256. campStatus = 4
  2257. else
  2258. campStatus = 3
  2259. end
  2260. end
  2261. elseif camp.pos ~= nil then
  2262. camp.minimap = GetMinimap(camp.pos)
  2263. if (GameTime < monster.spawn) then
  2264. campStatus = 4
  2265. camp.advisedBefore = true
  2266. camp.advised = true
  2267. camp.respawnTime = monster.spawn
  2268. camp.respawnText = (camp.enemyTeam and "Enemy " or "")..monster.name.." spawn at "..TimerText(camp.respawnTime)
  2269. end
  2270. end
  2271. if camp.status ~= campStatus or campStatus == 4 then
  2272. if campStatus ~= 0 then
  2273. if monster.isSeen == false then monster.isSeen = true end
  2274. camp.status = campStatus
  2275. end
  2276. if camp.status == 1 then -- ready
  2277. camp.drawText = "ready"
  2278. camp.drawColor = 0xFF00FF00
  2279. elseif camp.status == 2 then -- ready, master creeps dead
  2280. camp.drawText = "stolen"
  2281. camp.drawColor = 0xFFFF0000
  2282. elseif camp.status == 3 then -- ready, not creeps shown
  2283. camp.drawText = " ?"
  2284. camp.drawColor = 0xFF00FF00
  2285. elseif camp.status == 4 then -- empty from creeps kill
  2286. local secondLeft = math.ceil(math.max(0, camp.respawnTime - GameTime))
  2287. if monster.advise == true and (MMTConfig.adviceEnemyMonsters == true or camp.enemyTeam == false) then
  2288. if secondLeft == 0 and camp.advised == false then
  2289. camp.advised = true
  2290. if MMTConfig.textOnRespawn then PrintChat("<font color='#00FFCC'>"..(camp.enemyTeam and "Enemy " or "")..monster.name.."</font><font color='#FFAA00'> has respawned</font>") end
  2291. if MMTConfig.pingOnRespawn then PingSignal(PING_FALLBACK,camp.object.x,camp.object.y,camp.object.z,2) end
  2292. elseif secondLeft <= MMTConfig.adviceBefore and camp.advisedBefore == false then
  2293. camp.advisedBefore = true
  2294. if MMTConfig.textOnRespawnBefore then PrintChat("<font color='#00FFCC'>"..(camp.enemyTeam and "Enemy " or "")..monster.name.."</font><font color='#FFAA00'> will respawn in </font><font color='#00FFCC'>"..secondLeft.." sec</font>") end
  2295. if MMTConfig.pingOnRespawnBefore then PingSignal(PING_FALLBACK,camp.object.x,camp.object.y,camp.object.z,2) end
  2296. end
  2297. end
  2298. -- temp fix until camp.showOnMinimap work
  2299. if secondLeft == 0 then
  2300. camp.status = 0
  2301. end
  2302. camp.drawText = " "..TimerText(secondLeft)
  2303. camp.drawColor = 0xFFFFFF00
  2304. elseif camp.status == 5 then -- camp found empty (not using yet)
  2305. camp.drawText = " -"
  2306. camp.drawColor = 0xFFFF0000
  2307. end
  2308. end
  2309. -- shift click
  2310. if IsKeyDown(16) and camp.status == 4 then
  2311. camp.drawText = " "..(camp.respawnTime ~= nil and TimerText(camp.respawnTime) or "")
  2312. camp.textUnder = (CursorIsUnder(camp.minimap.x - 9, camp.minimap.y - 5, 20, 8))
  2313. else
  2314. camp.textUnder = false
  2315. end
  2316. if MMTConfig.textOnMap and camp.status == 4 and camp.object and camp.object.valid and camp.textTick < GetTickCount() and camp.floatText ~= camp.drawText then
  2317. camp.floatText = camp.drawText
  2318. camp.textTick = GetTickCount() + 1000
  2319. PrintFloatText(camp.object,6,camp.floatText)
  2320. end
  2321. end
  2322. end
  2323.  
  2324. -- altars
  2325. for i,altar in pairs(altars[mapName]) do
  2326. if altar.object and altar.object.valid then
  2327. if altar.locked then
  2328. if GameTime < altar.spawn then
  2329. altar.secondLeft = math.ceil(math.max(0, altar.spawn - GameTime))
  2330. else
  2331. local tmpTime = ((altar.object.mana > 39600) and (altar.object.mana - 39900) / 20100 or (39600 - altar.object.mana) / 20100)
  2332. altar.secondLeft = math.ceil(math.max(0, tmpTime * altar.respawn))
  2333. end
  2334. altar.unlockTime = math.ceil(GameTime + altar.secondLeft)
  2335. altar.unlockText = altar.name.." unlock at "..TimerText(altar.unlockTime)
  2336. altar.drawColor = 0xFFFFFF00
  2337. if altar.advise == true then
  2338. if altar.secondLeft == 0 and altar.advised == false then
  2339. altar.advised = true
  2340. if MMTConfig.textOnRespawn then PrintChat("<font color='#00FFCC'>"..altar.name.."</font><font color='#FFAA00'> is unlocked</font>") end
  2341. if MMTConfig.pingOnRespawn then PingSignal(PING_FALLBACK,altar.object.x,altar.object.y,altar.object.z,2) end
  2342. elseif altar.secondLeft <= MMTConfig.adviceBefore and altar.advisedBefore == false then
  2343. altar.advisedBefore = true
  2344. if MMTConfig.textOnRespawnBefore then PrintChat("<font color='#00FFCC'>"..altar.name.."</font><font color='#FFAA00'> will unlock in </font><font color='#00FFCC'>"..altar.secondLeft.." sec</font>") end
  2345. if MMTConfig.pingOnRespawnBefore then PingSignal(PING_FALLBACK,altar.object.x,altar.object.y,altar.object.z,2) end
  2346. end
  2347. end
  2348. -- shift click
  2349. if IsKeyDown(16) then
  2350. altar.drawText = " "..(altar.unlockTime ~= nil and TimerText(altar.unlockTime) or "")
  2351. altar.textUnder = (CursorIsUnder(altar.minimap.x - 9, altar.minimap.y - 5, 20, 8))
  2352. else
  2353. altar.drawText = " "..(altar.secondLeft ~= nil and TimerText(altar.secondLeft) or "")
  2354. altar.textUnder = false
  2355. end
  2356. if MMTConfig.textOnMap and altar.object and altar.object.valid and altar.textTick < GetTickCount() and altar.floatText ~= altar.drawText then
  2357. altar.floatText = altar.drawText
  2358. altar.textTick = GetTickCount() + 1000
  2359. PrintFloatText(altar.object,6,altar.floatText)
  2360. end
  2361. end
  2362. end
  2363. end
  2364.  
  2365. -- relics
  2366. for i,relic in pairs(relics[mapName]) do
  2367. if (not relic.locked and (not relic.object or not relic.object.valid or relic.dead)) then
  2368. if GameTime < relic.spawn then
  2369. relic.unlockTime = relic.spawn - GameTime
  2370. else
  2371. relic.unlockTime = math.ceil(GameTime + relic.respawn)
  2372. end
  2373. relic.advised = false
  2374. relic.advisedBefore = false
  2375. relic.drawText = ""
  2376. relic.unlockText = relic.name.." respawn at "..TimerText(relic.unlockTime)
  2377. relic.drawColor = 4288610048
  2378. --FF9EFF00
  2379. relic.minimap = GetMinimap(relic.pos)
  2380. relic.locked = true
  2381. end
  2382. if relic.locked then
  2383. relic.secondLeft = math.ceil(math.max(0, relic.unlockTime - GameTime))
  2384. if relic.advise == true then
  2385. if relic.secondLeft == 0 and relic.advised == false then
  2386. relic.advised = true
  2387. if MMTConfig.textOnRespawn then PrintChat("<font color='#00FFCC'>"..relic.name.."</font><font color='#FFAA00'> has respawned</font>") end
  2388. if MMTConfig.pingOnRespawn then PingSignal(PING_FALLBACK,relic.pos.x,relic.pos.y,relic.pos.z,2) end
  2389. elseif relic.secondLeft <= MMTConfig.adviceBefore and relic.advisedBefore == false then
  2390. relic.advisedBefore = true
  2391. if MMTConfig.textOnRespawnBefore then PrintChat("<font color='#00FFCC'>"..relic.name.."</font><font color='#FFAA00'> will respawn in </font><font color='#00FFCC'>"..relic.secondLeft.." sec</font>") end
  2392. if MMTConfig.pingOnRespawnBefore then PingSignal(PING_FALLBACK,relic.pos.x,relic.pos.y,relic.pos.z,2) end
  2393. end
  2394. end
  2395. -- shift click
  2396. if IsKeyDown(16) then
  2397. relic.drawText = " "..(relic.unlockTime ~= nil and TimerText(relic.unlockTime) or "")
  2398. relic.textUnder = (CursorIsUnder(relic.minimap.x - 9, relic.minimap.y - 5, 20, 8))
  2399. else
  2400. relic.drawText = " "..(relic.secondLeft ~= nil and TimerText(relic.secondLeft) or "")
  2401. relic.textUnder = false
  2402. end
  2403. end
  2404. end
  2405.  
  2406. for i,heal in pairs(heals[mapName]) do
  2407. for j,healObject in pairs(heal.objects) do
  2408. if (not healObject.locked and healObject.found and (not healObject.object or not healObject.object.valid or healObject.object.dead)) then
  2409. healObject.drawColor = 0xFF00FF04
  2410. healObject.unlockTime = math.ceil(GameTime + heal.respawn)
  2411. healObject.drawText = ""
  2412. healObject.found = false
  2413. healObject.locked = true
  2414. end
  2415. if healObject.locked then
  2416. -- shift click
  2417. local secondLeft = math.ceil(math.max(0, healObject.unlockTime - GameTime))
  2418. if IsKeyDown(16) then
  2419. healObject.drawText = " "..(healObject.unlockTime ~= nil and TimerText(healObject.unlockTime) or "")
  2420. healObject.textUnder = (CursorIsUnder(healObject.minimap.x - 9, healObject.minimap.y - 5, 20, 8))
  2421. else
  2422. healObject.drawText = " "..(secondLeft ~= nil and TimerText(secondLeft) or "")
  2423. healObject.textUnder = false
  2424. end
  2425. if secondLeft == 0 then healObject.locked = false end
  2426. end
  2427. end
  2428. end
  2429. -- inhib
  2430. for i,inhibitor in pairs(inhibitors) do
  2431. if inhibitor.destroyed then
  2432. local tick = GetTickCount()
  2433. if inhibitor.rtime < tick then
  2434. inhibitor.destroyed = false
  2435. else
  2436. inhibitor.ltime = (inhibitor.rtime - GetTickCount()) / 1000;
  2437. inhibitor.drawText = TimerText(inhibitor.ltime)
  2438. --inhibitor.drawText = (IsKeyDown(16) and TimerText(inhibitor.rtime) or TimerText(inhibitor.rtime))
  2439. if MMTConfig.textOnMap and inhibitor.textTick < tick then
  2440. inhibitor.textTick = tick + 1000
  2441. PrintFloatText(inhibitor.object,6,inhibitor.drawText)
  2442. end
  2443. end
  2444. end
  2445. end
  2446. end
  2447.  
  2448. function OnDraw()
  2449. if GetGame().isOver then return end
  2450. for i,monster in pairs(monsters[mapName]) do
  2451. if monster.isSeen == true then
  2452. for j,camp in pairs(monster.camps) do
  2453. if camp.status == 2 then
  2454. DrawText("X",16,camp.minimap.x - 4, camp.minimap.y - 5, camp.drawColor)
  2455. elseif camp.status == 4 then
  2456. DrawText(camp.drawText,16,camp.minimap.x - 9, camp.minimap.y - 5, camp.drawColor)
  2457. end
  2458. end
  2459. end
  2460. end
  2461. for i,altar in pairs(altars[mapName]) do
  2462. if altar.locked then
  2463. DrawText(altar.drawText,16,altar.minimap.x - 9, altar.minimap.y - 5, altar.drawColor)
  2464. end
  2465. end
  2466. for i,relic in pairs(relics[mapName]) do
  2467. if relic.locked then
  2468. DrawText(relic.drawText,16,relic.minimap.x - 9, relic.minimap.y - 5, relic.drawColor)
  2469. end
  2470. end
  2471. for i,heal in pairs(heals[mapName]) do
  2472. for j,healObject in pairs(heal.objects) do
  2473. if healObject.locked then
  2474. DrawText(healObject.drawText,16,healObject.minimap.x - 9, healObject.minimap.y - 5, healObject.drawColor)
  2475. end
  2476. end
  2477. end
  2478. for i,inhibitor in pairs(inhibitors) do
  2479. if inhibitor.destroyed == true then
  2480. DrawText(inhibitor.drawText,16,inhibitor.minimap.x - 9, inhibitor.minimap.y - 5, 0xFFFFFF00)
  2481. end
  2482. end
  2483. end
  2484.  
  2485. function OnWndMsg(msg,key)
  2486. if msg == WM_LBUTTONDOWN and IsKeyDown(16) then
  2487. for i,monster in pairs(monsters[mapName]) do
  2488. if monster.isSeen == true then
  2489. if monster.iconUnder then
  2490. monster.advise = not monster.advise
  2491. break
  2492. else
  2493. for j,camp in pairs(monster.camps) do
  2494. if camp.textUnder then
  2495. if camp.respawnText ~= nil then SendChat(""..camp.respawnText) end
  2496. break
  2497. end
  2498. end
  2499. end
  2500. end
  2501. end
  2502. for i,altar in pairs(altars[mapName]) do
  2503. if altar.locked and altar.textUnder then
  2504. if altar.unlockText ~= nil then SendChat(""..altar.unlockText) end
  2505. break
  2506. end
  2507. end
  2508. end
  2509. end
  2510. end
  2511.  
  2512. [/code][/spoiler]Masz tutaj timera do jungli:
  2513.  
  2514. [spoiler][code]
  2515.  
  2516. --[[
  2517. Script: minimapTimers v0.3 (3.14 LoL patch)
  2518.  
  2519. Author: SurfaceS
  2520. Updated by TEAM DEKLAND
  2521. ]]
  2522. do
  2523. --[[ GLOBAL ]]
  2524. monsters = {
  2525. summonerRift = {
  2526. { -- baron
  2527. name = "baron",
  2528. spawn = 900,
  2529. respawn = 420,
  2530. advise = true,
  2531. camps = {
  2532. {
  2533. pos = { x = 4600, y = 60, z = 10250 },
  2534. name = "monsterCamp_12",
  2535. creeps = { { { name = "Worm12.1.1" }, }, },
  2536. team = TEAM_NEUTRAL,
  2537. },
  2538. },
  2539. },
  2540. { -- dragon
  2541. name = "dragon",
  2542. spawn = 150,
  2543. respawn = 360,
  2544. advise = true,
  2545. camps = {
  2546. {
  2547. pos = { x = 9459, y = 60, z = 4193 },
  2548. name = "monsterCamp_6",
  2549. creeps = { { { name = "Dragon6.1.1" }, }, },
  2550. team = TEAM_NEUTRAL,
  2551. },
  2552. },
  2553. },
  2554. { -- blue
  2555. name = "blue",
  2556. spawn = 115,
  2557. respawn = 300,
  2558. advise = true,
  2559. camps = {
  2560. {
  2561. pos = { x = 3632, y = 60, z = 7600 },
  2562. name = "monsterCamp_1",
  2563. creeps = { { { name = "AncientGolem1.1.1" }, { name = "YoungLizard1.1.2" }, { name = "YoungLizard1.1.3" }, }, },
  2564. team = TEAM_BLUE,
  2565. },
  2566. {
  2567. pos = { x = 10386, y = 60, z = 6811 },
  2568. name = "monsterCamp_7",
  2569. creeps = { { { name = "AncientGolem7.1.1" }, { name = "YoungLizard7.1.2" }, { name = "YoungLizard7.1.3" }, }, },
  2570. team = TEAM_RED,
  2571. },
  2572. },
  2573. },
  2574. { -- red
  2575. name = "red",
  2576. spawn = 115,
  2577. respawn = 300,
  2578. advise = true,
  2579. camps = {
  2580. {
  2581. pos = { x = 7455, y = 60, z = 3890 },
  2582. name = "monsterCamp_4",
  2583. creeps = { { { name = "LizardElder4.1.1" }, { name = "YoungLizard4.1.2" }, { name = "YoungLizard4.1.3" }, }, },
  2584. team = TEAM_BLUE,
  2585. },
  2586. {
  2587. pos = { x = 6504, y = 60, z = 10584 },
  2588. name = "monsterCamp_10",
  2589. creeps = { { { name = "LizardElder10.1.1" }, { name = "YoungLizard10.1.2" }, { name = "YoungLizard10.1.3" }, }, },
  2590. team = TEAM_RED,
  2591. },
  2592. },
  2593. },
  2594. { -- wolves
  2595. name = "wolves",
  2596. spawn = 115,
  2597. respawn = 50,
  2598. advise = false,
  2599. camps = {
  2600. {
  2601. name = "monsterCamp_2",
  2602. creeps = { { { name = "GiantWolf2.1.3" }, { name = "wolf2.1.1" }, { name = "wolf2.1.2" }, }, },
  2603. team = TEAM_BLUE,
  2604. },
  2605. {
  2606. name = "monsterCamp_8",
  2607. creeps = { { { name = "GiantWolf8.1.3" }, { name = "wolf8.1.1" }, { name = "wolf8.1.2" }, }, },
  2608. team = TEAM_RED,
  2609. },
  2610. },
  2611. },
  2612. { -- wraiths
  2613. name = "wraiths",
  2614. spawn = 115,
  2615. respawn = 50,
  2616. advise = false,
  2617. camps = {
  2618. {
  2619. name = "monsterCamp_3",
  2620. creeps = { { { name = "Wraith3.1.3" }, { name = "LesserWraith3.1.1" }, { name = "LesserWraith3.1.2" }, { name = "LesserWraith3.1.4" }, }, },
  2621. team = TEAM_BLUE,
  2622. },
  2623. {
  2624. name = "monsterCamp_9",
  2625. creeps = { { { name = "Wraith9.1.3" }, { name = "LesserWraith9.1.1" }, { name = "LesserWraith9.1.2" }, { name = "LesserWraith9.1.4" }, }, },
  2626. team = TEAM_RED,
  2627. },
  2628. },
  2629. },
  2630. { -- GreatWraiths
  2631. name = "GreatWraiths",
  2632. spawn = 115,
  2633. respawn = 50,
  2634. advise = false,
  2635. camps = {
  2636. {
  2637. name = "monsterCamp_13",
  2638. creeps = { { { name = "GreatWraith13.1.1" }, }, },
  2639. team = TEAM_BLUE,
  2640. },
  2641. {
  2642. name = "monsterCamp_14",
  2643. creeps = { { { name = "GreatWraith14.1.1" }, }, },
  2644. team = TEAM_RED,
  2645. },
  2646. },
  2647. },
  2648. { -- Golems
  2649. name = "Golems",
  2650. spawn = 115,
  2651. respawn = 50,
  2652. advise = false,
  2653. camps = {
  2654. {
  2655. name = "monsterCamp_5",
  2656. creeps = { { { name = "Golem5.1.2" }, { name = "SmallGolem5.1.1" }, }, },
  2657. team = TEAM_BLUE,
  2658. },
  2659. {
  2660. name = "monsterCamp_11",
  2661. creeps = { { { name = "Golem11.1.2" }, { name = "SmallGolem11.1.1" }, }, },
  2662. team = TEAM_RED,
  2663. },
  2664. },
  2665. },
  2666. },
  2667. twistedTreeline = {
  2668. { -- Wraith
  2669. name = "Wraith",
  2670. spawn = 100,
  2671. respawn = 50,
  2672. advise = false,
  2673. camps = {
  2674. {
  2675. --pos = { x = 4414, y = 60, z = 5774 },
  2676. name = "monsterCamp_1",
  2677. creeps = {
  2678. { { name = "TT_NWraith1.1.1" }, { name = "TT_NWraith21.1.2" }, { name = "TT_NWraith21.1.3" }, },
  2679. },
  2680. team = TEAM_BLUE,
  2681. },
  2682. {
  2683. --pos = { x = 11008, y = 60, z = 5775 },
  2684. name = "monsterCamp_4",
  2685. creeps = {
  2686. { { name = "TT_NWraith4.1.1" }, { name = "TT_NWraith24.1.2" }, { name = "TT_NWraith24.1.3" }, },
  2687. },
  2688. team = TEAM_RED,
  2689. },
  2690. },
  2691. },
  2692. { -- Golems
  2693. name = "Golems",
  2694. respawn = 50,
  2695. spawn = 100,
  2696. advise = false,
  2697. camps = {
  2698. {
  2699. --pos = { x = 5088, y = 60, z = 8065 },
  2700. name = "monsterCamp_2",
  2701. creeps = {
  2702. { { name = "TT_NGolem2.1.1" }, { name = "TT_NGolem22.1.2" } },
  2703. },
  2704. team = TEAM_BLUE,
  2705. },
  2706. {
  2707. --pos = { x = 10341, y = 60, z = 8084 },
  2708. name = "monsterCamp_5",
  2709. creeps = {
  2710. { { name = "TT_NGolem5.1.1" }, { name = "TT_NGolem25.1.2" } },
  2711. },
  2712. team = TEAM_RED,
  2713. },
  2714. },
  2715. },
  2716. { -- Wolves
  2717. name = "Wolves",
  2718. respawn = 50,
  2719. spawn = 100,
  2720. advise = false,
  2721. camps = {
  2722. {
  2723. --pos = { x = 6148, y = 60, z = 5993 },
  2724. name = "monsterCamp_3",
  2725. creeps = { { { name = "TT_NWolf3.1.1" }, { name = "TT_NWolf23.1.2" }, { name = "TT_NWolf23.1.3" } }, },
  2726. team = TEAM_BLUE,
  2727. },
  2728. {
  2729. --pos = { x = 9239, y = 60, z = 6022 },
  2730. name = "monsterCamp_6",
  2731. creeps = { { { name = "TT_NWolf6.1.1" }, { name = "TT_NWolf26.1.2" }, { name = "TT_NWolf26.1.3" } }, },
  2732. team = TEAM_RED,
  2733. },
  2734. },
  2735. },
  2736. { -- Heal
  2737. name = "Heal",
  2738. spawn = 115,
  2739. respawn = 90,
  2740. advise = true,
  2741. camps = {
  2742. {
  2743. pos = { x = 7711, y = 60, z = 6722 },
  2744. name = "monsterCamp_7",
  2745. creeps = { { { name = "TT_Relic7.1.1" }, }, },
  2746. team = TEAM_NEUTRAL,
  2747. },
  2748. },
  2749. },
  2750. { -- Vilemaw
  2751. name = "Vilemaw",
  2752. spawn = 600,
  2753. respawn = 300,
  2754. advise = true,
  2755. camps = {
  2756. {
  2757. pos = { x = 7711, y = 60, z = 10080 },
  2758. name = "monsterCamp_8",
  2759. creeps = { { { name = "TT_Spiderboss8.1.1" }, }, },
  2760. team = TEAM_NEUTRAL,
  2761. },
  2762. },
  2763. },
  2764. },
  2765. crystalScar = {},
  2766. provingGrounds = {
  2767. { -- Heal
  2768. name = "Heal",
  2769. spawn = 190,
  2770. respawn = 40,
  2771. advise = false,
  2772. camps = {
  2773. {
  2774. pos = { x = 8922, y = 60, z = 7868 },
  2775. name = "monsterCamp_1",
  2776. creeps = { { { name = "OdinShieldRelic1.1.1" }, }, },
  2777. team = TEAM_NEUTRAL,
  2778. },
  2779. {
  2780. pos = { x = 7473, y = 60, z = 6617 },
  2781. name = "monsterCamp_2",
  2782. creeps = { { { name = "OdinShieldRelic2.1.1" }, }, },
  2783. team = TEAM_NEUTRAL,
  2784. },
  2785. {
  2786. pos = { x = 5929, y = 60, z = 5190 },
  2787. name = "monsterCamp_3",
  2788. creeps = { { { name = "OdinShieldRelic3.1.1" }, }, },
  2789. team = TEAM_NEUTRAL,
  2790. },
  2791. {
  2792. pos = { x = 4751, y = 60, z = 3901 },
  2793. name = "monsterCamp_4",
  2794. creeps = { { { name = "OdinShieldRelic4.1.1" }, }, },
  2795. team = TEAM_NEUTRAL,
  2796. },
  2797. },
  2798. },
  2799. },
  2800. howlingAbyss = {
  2801. { -- Heal
  2802. name = "Heal",
  2803. spawn = 190,
  2804. respawn = 40,
  2805. advise = false,
  2806. camps = {
  2807. {
  2808. pos = { x = 8922, y = 60, z = 7868 },
  2809. name = "monsterCamp_1",
  2810. creeps = { { { name = "HA_AP_HealthRelic1.1.1" }, }, },
  2811. team = TEAM_NEUTRAL,
  2812. },
  2813. {
  2814. pos = { x = 7473, y = 60, z = 6617 },
  2815. name = "monsterCamp_2",
  2816. creeps = { { { name = "HA_AP_HealthRelic2.1.1" }, }, },
  2817. team = TEAM_NEUTRAL,
  2818. },
  2819. {
  2820. pos = { x = 5929, y = 60, z = 5190 },
  2821. name = "monsterCamp_3",
  2822. creeps = { { { name = "HA_AP_HealthRelic3.1.1" }, }, },
  2823. team = TEAM_NEUTRAL,
  2824. },
  2825. {
  2826. pos = { x = 4751, y = 60, z = 3901 },
  2827. name = "monsterCamp_4",
  2828. creeps = { { { name = "HA_AP_HealthRelic4.1.1" }, }, },
  2829. team = TEAM_NEUTRAL,
  2830. },
  2831. },
  2832. },
  2833. },
  2834. }
  2835.  
  2836. altars = {
  2837. summonerRift = {},
  2838. twistedTreeline = {
  2839. {
  2840. name = "Left Altar",
  2841. spawn = 180,
  2842. respawn = 85,
  2843. advise = true,
  2844. objectName = "TT_Buffplat_L",
  2845. locked = false,
  2846. lockNames = {"TT_Lock_Blue_L.troy", "TT_Lock_Purple_L.troy", "TT_Lock_Neutral_L.troy", },
  2847. unlockNames = {"TT_Unlock_Blue_L.troy", "TT_Unlock_purple_L.troy", "TT_Unlock_Neutral_L.troy", },
  2848. },
  2849. {
  2850. name = "Right Altar",
  2851. spawn = 180,
  2852. respawn = 85,
  2853. advise = true,
  2854. objectName = "TT_Buffplat_R",
  2855. locked = false,
  2856. lockNames = {"TT_Lock_Blue_R.troy", "TT_Lock_Purple_R.troy", "TT_Lock_Neutral_R.troy", },
  2857. unlockNames = {"TT_Unlock_Blue_R.troy", "TT_Unlock_purple_R.troy", "TT_Unlock_Neutral_R.troy", },
  2858. },
  2859. },
  2860. crystalScar = {},
  2861. provingGrounds = {},
  2862. howlingAbyss = {},
  2863. }
  2864.  
  2865. relics = {
  2866. summonerRift = {},
  2867. twistedTreeline = {},
  2868. crystalScar = {
  2869. {
  2870. pos = { x = 5500, y = 60, z = 6500 },
  2871. name = "Relic",
  2872. team = TEAM_BLUE,
  2873. spawn = 180,
  2874. respawn = 180,
  2875. advise = true,
  2876. locked = false,
  2877. precenceObject = (player.team == TEAM_BLUE and "Odin_Prism_Green.troy" or "Odin_Prism_Red.troy"),
  2878. },
  2879. {
  2880. pos = { x = 7550, y = 60, z = 6500 },
  2881. name = "Relic",
  2882. team = TEAM_RED,
  2883. spawn = 180,
  2884. respawn = 180,
  2885. advise = true,
  2886. locked = false,
  2887. precenceObject = (player.team == TEAM_RED and "Odin_Prism_Green.troy" or "Odin_Prism_Red.troy"),
  2888. },
  2889. },
  2890. provingGrounds = {},
  2891. howlingAbyss = {},
  2892. }
  2893.  
  2894. heals = {
  2895. summonerRift = {},
  2896. twistedTreeline = {},
  2897. provingGrounds = {},
  2898. crystalScar = {
  2899. {
  2900. name = "Heal",
  2901. objectName = "OdinShieldRelic",
  2902. respawn = 30,
  2903. objects = {},
  2904. },
  2905. },
  2906. howlingAbyss = {},
  2907. }
  2908.  
  2909. inhibitors = {}
  2910.  
  2911. function addCampCreepAltar(object)
  2912. if object ~= nil and object.name ~= nil then
  2913. if object.name == "Order_Inhibit_Gem.troy" or object.name == "Chaos_Inhibit_Gem.troy" then
  2914. table.insert(inhibitors, { object = object, destroyed = false, lefttime = 0, x = object.x, y = object.y, z = object.z, minimap = GetMinimap(object), textTick = 0 })
  2915. return
  2916. elseif object.name == "Order_Inhibit_Crystal_Shatter.troy" or object.name == "Chaos_Inhibit_Crystal_Shatter.troy" then
  2917. for i,inhibitor in pairs(inhibitors) do
  2918. if GetDistance(inhibitor, object) < 200 then
  2919. local tick = GetTickCount()
  2920. inhibitor.dtime = tick
  2921. inhibitor.rtime = tick + 300000
  2922. inhibitor.ltime = 300000
  2923. inhibitor.destroyed = true
  2924. end
  2925. end
  2926. return
  2927. end
  2928. for i,monster in pairs(monsters[mapName]) do
  2929. for j,camp in pairs(monster.camps) do
  2930. if camp.name == object.name then
  2931. camp.object = object
  2932. return
  2933. end
  2934. if object.type == "obj_AI_Minion" then
  2935. for k,creepPack in ipairs(camp.creeps) do
  2936. for l,creep in ipairs(creepPack) do
  2937. if object.name == creep.name then
  2938. creep.object = object
  2939. return
  2940. end
  2941. end
  2942. end
  2943. end
  2944. end
  2945. end
  2946. for i,altar in pairs(altars[mapName]) do
  2947. if altar.objectName == object.name then
  2948. altar.object = object
  2949. altar.textTick = 0
  2950. altar.minimap = GetMinimap(object)
  2951. end
  2952. if altar.locked then
  2953. for j,lockName in pairs(altar.unlockNames) do
  2954. if lockName == object.name then
  2955. altar.locked = false
  2956. return
  2957. end
  2958. end
  2959. else
  2960. for j,lockName in pairs(altar.lockNames) do
  2961. if lockName == object.name then
  2962. altar.drawColor = 0
  2963. altar.drawText = ""
  2964. altar.locked = true
  2965. altar.advised = false
  2966. altar.advisedBefore = false
  2967. return
  2968. end
  2969. end
  2970. end
  2971. end
  2972. for i,relic in pairs(relics[mapName]) do
  2973. if relic.precenceObject == object.name then
  2974. relic.object = object
  2975. relic.textTick = 0
  2976. relic.locked = false
  2977. return
  2978. end
  2979. end
  2980. for i,heal in pairs(heals[mapName]) do
  2981. if heal.objectName == object.name then
  2982. for j,healObject in pairs(heal.objects) do
  2983. if (GetDistance(healObject, object) < 50) then
  2984. healObject.object = object
  2985. healObject.found = true
  2986. healObject.locked = false
  2987. return
  2988. end
  2989. end
  2990. local k = #heal.objects + 1
  2991. heals[mapName][i].objects[k] = {found = true, locked = false, object = object, x = object.x, y = object.y, z = object.z, minimap = GetMinimap(object), textTick = 0,}
  2992. return
  2993. end
  2994. end
  2995. end
  2996. end
  2997.  
  2998. function removeCreep(object)
  2999. if object ~= nil and object.type == "obj_AI_Minion" and object.name ~= nil then
  3000. for i,monster in pairs(monsters[mapName]) do
  3001. for j,camp in pairs(monster.camps) do
  3002. for k,creepPack in ipairs(camp.creeps) do
  3003. for l,creep in ipairs(creepPack) do
  3004. if object.name == creep.name then
  3005. creep.object = nil
  3006. return
  3007. end
  3008. end
  3009. end
  3010. end
  3011. end
  3012. end
  3013. end
  3014.  
  3015. function OnLoad()
  3016. mapName = GetGame().map.shortName
  3017. if monsters[mapName] == nil then
  3018. mapName = nil
  3019. monsters = nil
  3020. addCampCreepAltar = nil
  3021. removeCreep = nil
  3022. addAltarObject = nil
  3023. return
  3024. else
  3025. startTick = GetGame().tick
  3026. -- CONFIG
  3027. MMTConfig = scriptConfig("Timers 0.2", "minimapTimers")
  3028. MMTConfig:addParam("pingOnRespawn", "Ping on respawn", SCRIPT_PARAM_ONOFF, true) -- ping location on respawn
  3029. MMTConfig:addParam("pingOnRespawnBefore", "Ping before respawn", SCRIPT_PARAM_ONOFF, true) -- ping location before respawn
  3030. MMTConfig:addParam("textOnRespawn", "Chat on respawn", SCRIPT_PARAM_ONOFF, true) -- print chat text on respawn
  3031. MMTConfig:addParam("textOnRespawnBefore", "Chat before respawn", SCRIPT_PARAM_ONOFF, true) -- print chat text before respawn
  3032. MMTConfig:addParam("adviceEnemyMonsters", "Advice enemy monster", SCRIPT_PARAM_ONOFF, true) -- advice enemy monster, or just our monsters
  3033. MMTConfig:addParam("adviceBefore", "Advice Time", SCRIPT_PARAM_SLICE, 20, 1, 40, 0) -- time in second to advice before monster respawn
  3034. MMTConfig:addParam("textOnMap", "Text on map", SCRIPT_PARAM_ONOFF, true) -- time in second on map
  3035. for i,monster in pairs(monsters[mapName]) do
  3036. monster.isSeen = false
  3037. for j,camp in pairs(monster.camps) do
  3038. camp.enemyTeam = (camp.team == TEAM_ENEMY)
  3039. camp.textTick = 0
  3040. camp.status = 0
  3041. camp.drawText = ""
  3042. camp.drawColor = 0xFF00FF00
  3043. end
  3044. end
  3045. for i = 1, objManager.maxObjects do
  3046. local object = objManager:getObject(i)
  3047. if object ~= nil then
  3048. addCampCreepAltar(object)
  3049. end
  3050. end
  3051. AddCreateObjCallback(addCampCreepAltar)
  3052. AddDeleteObjCallback(removeCreep)
  3053. end
  3054. end
  3055. function OnTick()
  3056. if GetGame().isOver then return end
  3057. local GameTime = (GetTickCount()-startTick) / 1000
  3058. local monsterCount = 0
  3059. for i,monster in pairs(monsters[mapName]) do
  3060. for j,camp in pairs(monster.camps) do
  3061. local campStatus = 0
  3062. for k,creepPack in ipairs(camp.creeps) do
  3063. for l,creep in ipairs(creepPack) do
  3064. if creep.object ~= nil and creep.object.valid and creep.object.dead == false then
  3065. if l == 1 then
  3066. campStatus = 1
  3067. elseif campStatus ~= 1 then
  3068. campStatus = 2
  3069. end
  3070. end
  3071. end
  3072. end
  3073. --[[ Not used until camp.showOnMinimap work
  3074. if (camp.object and camp.object.showOnMinimap == 1) then
  3075. -- camp is here
  3076. if campStatus == 0 then campStatus = 3 end
  3077. elseif camp.status == 3 then -- empty not seen when killed
  3078. campStatus = 5
  3079. elseif campStatus == 0 and (camp.status == 1 or camp.status == 2) then
  3080. campStatus = 4
  3081. camp.deathTick = tick
  3082. end
  3083. ]]
  3084. -- temp fix until camp.showOnMinimap work
  3085. -- not so good
  3086. if camp.object ~= nil and camp.object.valid then
  3087. camp.minimap = GetMinimap(camp.object)
  3088. if campStatus == 0 then
  3089. if (camp.status == 1 or camp.status == 2) then
  3090. campStatus = 4
  3091. camp.advisedBefore = false
  3092. camp.advised = false
  3093. camp.respawnTime = math.ceil(GameTime) + monster.respawn
  3094. camp.respawnText = (camp.enemyTeam and "Enemy " or "")..monster.name.." respawn at "..TimerText(camp.respawnTime)
  3095. elseif (camp.status == 4) then
  3096. campStatus = 4
  3097. else
  3098. campStatus = 3
  3099. end
  3100. end
  3101. elseif camp.pos ~= nil then
  3102. camp.minimap = GetMinimap(camp.pos)
  3103. if (GameTime < monster.spawn) then
  3104. campStatus = 4
  3105. camp.advisedBefore = true
  3106. camp.advised = true
  3107. camp.respawnTime = monster.spawn
  3108. camp.respawnText = (camp.enemyTeam and "Enemy " or "")..monster.name.." spawn at "..TimerText(camp.respawnTime)
  3109. end
  3110. end
  3111. if camp.status ~= campStatus or campStatus == 4 then
  3112. if campStatus ~= 0 then
  3113. if monster.isSeen == false then monster.isSeen = true end
  3114. camp.status = campStatus
  3115. end
  3116. if camp.status == 1 then -- ready
  3117. camp.drawText = "ready"
  3118. camp.drawColor = 0xFF00FF00
  3119. elseif camp.status == 2 then -- ready, master creeps dead
  3120. camp.drawText = "stolen"
  3121. camp.drawColor = 0xFFFF0000
  3122. elseif camp.status == 3 then -- ready, not creeps shown
  3123. camp.drawText = " ?"
  3124. camp.drawColor = 0xFF00FF00
  3125. elseif camp.status == 4 then -- empty from creeps kill
  3126. local secondLeft = math.ceil(math.max(0, camp.respawnTime - GameTime))
  3127. if monster.advise == true and (MMTConfig.adviceEnemyMonsters == true or camp.enemyTeam == false) then
  3128. if secondLeft == 0 and camp.advised == false then
  3129. camp.advised = true
  3130. if MMTConfig.textOnRespawn then PrintChat("<font color='#00FFCC'>"..(camp.enemyTeam and "Enemy " or "")..monster.name.."</font><font color='#FFAA00'> has respawned</font>") end
  3131. if MMTConfig.pingOnRespawn then PingSignal(PING_FALLBACK,camp.object.x,camp.object.y,camp.object.z,2) end
  3132. elseif secondLeft <= MMTConfig.adviceBefore and camp.advisedBefore == false then
  3133. camp.advisedBefore = true
  3134. if MMTConfig.textOnRespawnBefore then PrintChat("<font color='#00FFCC'>"..(camp.enemyTeam and "Enemy " or "")..monster.name.."</font><font color='#FFAA00'> will respawn in </font><font color='#00FFCC'>"..secondLeft.." sec</font>") end
  3135. if MMTConfig.pingOnRespawnBefore then PingSignal(PING_FALLBACK,camp.object.x,camp.object.y,camp.object.z,2) end
  3136. end
  3137. end
  3138. -- temp fix until camp.showOnMinimap work
  3139. if secondLeft == 0 then
  3140. camp.status = 0
  3141. end
  3142. camp.drawText = " "..TimerText(secondLeft)
  3143. camp.drawColor = 0xFFFFFF00
  3144. elseif camp.status == 5 then -- camp found empty (not using yet)
  3145. camp.drawText = " -"
  3146. camp.drawColor = 0xFFFF0000
  3147. end
  3148. end
  3149. -- shift click
  3150. if IsKeyDown(16) and camp.status == 4 then
  3151. camp.drawText = " "..(camp.respawnTime ~= nil and TimerText(camp.respawnTime) or "")
  3152. camp.textUnder = (CursorIsUnder(camp.minimap.x - 9, camp.minimap.y - 5, 20, 8))
  3153. else
  3154. camp.textUnder = false
  3155. end
  3156. if MMTConfig.textOnMap and camp.status == 4 and camp.object and camp.object.valid and camp.textTick < GetTickCount() and camp.floatText ~= camp.drawText then
  3157. camp.floatText = camp.drawText
  3158. camp.textTick = GetTickCount() + 1000
  3159. PrintFloatText(camp.object,6,camp.floatText)
  3160. end
  3161. end
  3162. end
  3163.  
  3164. -- altars
  3165. for i,altar in pairs(altars[mapName]) do
  3166. if altar.object and altar.object.valid then
  3167. if altar.locked then
  3168. if GameTime < altar.spawn then
  3169. altar.secondLeft = math.ceil(math.max(0, altar.spawn - GameTime))
  3170. else
  3171. local tmpTime = ((altar.object.mana > 39600) and (altar.object.mana - 39900) / 20100 or (39600 - altar.object.mana) / 20100)
  3172. altar.secondLeft = math.ceil(math.max(0, tmpTime * altar.respawn))
  3173. end
  3174. altar.unlockTime = math.ceil(GameTime + altar.secondLeft)
  3175. altar.unlockText = altar.name.." unlock at "..TimerText(altar.unlockTime)
  3176. altar.drawColor = 0xFFFFFF00
  3177. if altar.advise == true then
  3178. if altar.secondLeft == 0 and altar.advised == false then
  3179. altar.advised = true
  3180. if MMTConfig.textOnRespawn then PrintChat("<font color='#00FFCC'>"..altar.name.."</font><font color='#FFAA00'> is unlocked</font>") end
  3181. if MMTConfig.pingOnRespawn then PingSignal(PING_FALLBACK,altar.object.x,altar.object.y,altar.object.z,2) end
  3182. elseif altar.secondLeft <= MMTConfig.adviceBefore and altar.advisedBefore == false then
  3183. altar.advisedBefore = true
  3184. if MMTConfig.textOnRespawnBefore then PrintChat("<font color='#00FFCC'>"..altar.name.."</font><font color='#FFAA00'> will unlock in </font><font color='#00FFCC'>"..altar.secondLeft.." sec</font>") end
  3185. if MMTConfig.pingOnRespawnBefore then PingSignal(PING_FALLBACK,altar.object.x,altar.object.y,altar.object.z,2) end
  3186. end
  3187. end
  3188. -- shift click
  3189. if IsKeyDown(16) then
  3190. altar.drawText = " "..(altar.unlockTime ~= nil and TimerText(altar.unlockTime) or "")
  3191. altar.textUnder = (CursorIsUnder(altar.minimap.x - 9, altar.minimap.y - 5, 20, 8))
  3192. else
  3193. altar.drawText = " "..(altar.secondLeft ~= nil and TimerText(altar.secondLeft) or "")
  3194. altar.textUnder = false
  3195. end
  3196. if MMTConfig.textOnMap and altar.object and altar.object.valid and altar.textTick < GetTickCount() and altar.floatText ~= altar.drawText then
  3197. altar.floatText = altar.drawText
  3198. altar.textTick = GetTickCount() + 1000
  3199. PrintFloatText(altar.object,6,altar.floatText)
  3200. end
  3201. end
  3202. end
  3203. end
  3204.  
  3205. -- relics
  3206. for i,relic in pairs(relics[mapName]) do
  3207. if (not relic.locked and (not relic.object or not relic.object.valid or relic.dead)) then
  3208. if GameTime < relic.spawn then
  3209. relic.unlockTime = relic.spawn - GameTime
  3210. else
  3211. relic.unlockTime = math.ceil(GameTime + relic.respawn)
  3212. end
  3213. relic.advised = false
  3214. relic.advisedBefore = false
  3215. relic.drawText = ""
  3216. relic.unlockText = relic.name.." respawn at "..TimerText(relic.unlockTime)
  3217. relic.drawColor = 4288610048
  3218. --FF9EFF00
  3219. relic.minimap = GetMinimap(relic.pos)
  3220. relic.locked = true
  3221. end
  3222. if relic.locked then
  3223. relic.secondLeft = math.ceil(math.max(0, relic.unlockTime - GameTime))
  3224. if relic.advise == true then
  3225. if relic.secondLeft == 0 and relic.advised == false then
  3226. relic.advised = true
  3227. if MMTConfig.textOnRespawn then PrintChat("<font color='#00FFCC'>"..relic.name.."</font><font color='#FFAA00'> has respawned</font>") end
  3228. if MMTConfig.pingOnRespawn then PingSignal(PING_FALLBACK,relic.pos.x,relic.pos.y,relic.pos.z,2) end
  3229. elseif relic.secondLeft <= MMTConfig.adviceBefore and relic.advisedBefore == false then
  3230. relic.advisedBefore = true
  3231. if MMTConfig.textOnRespawnBefore then PrintChat("<font color='#00FFCC'>"..relic.name.."</font><font color='#FFAA00'> will respawn in </font><font color='#00FFCC'>"..relic.secondLeft.." sec</font>") end
  3232. if MMTConfig.pingOnRespawnBefore then PingSignal(PING_FALLBACK,relic.pos.x,relic.pos.y,relic.pos.z,2) end
  3233. end
  3234. end
  3235. -- shift click
  3236. if IsKeyDown(16) then
  3237. relic.drawText = " "..(relic.unlockTime ~= nil and TimerText(relic.unlockTime) or "")
  3238. relic.textUnder = (CursorIsUnder(relic.minimap.x - 9, relic.minimap.y - 5, 20, 8))
  3239. else
  3240. relic.drawText = " "..(relic.secondLeft ~= nil and TimerText(relic.secondLeft) or "")
  3241. relic.textUnder = false
  3242. end
  3243. end
  3244. end
  3245.  
  3246. for i,heal in pairs(heals[mapName]) do
  3247. for j,healObject in pairs(heal.objects) do
  3248. if (not healObject.locked and healObject.found and (not healObject.object or not healObject.object.valid or healObject.object.dead)) then
  3249. healObject.drawColor = 0xFF00FF04
  3250. healObject.unlockTime = math.ceil(GameTime + heal.respawn)
  3251. healObject.drawText = ""
  3252. healObject.found = false
  3253. healObject.locked = true
  3254. end
  3255. if healObject.locked then
  3256. -- shift click
  3257. local secondLeft = math.ceil(math.max(0, healObject.unlockTime - GameTime))
  3258. if IsKeyDown(16) then
  3259. healObject.drawText = " "..(healObject.unlockTime ~= nil and TimerText(healObject.unlockTime) or "")
  3260. healObject.textUnder = (CursorIsUnder(healObject.minimap.x - 9, healObject.minimap.y - 5, 20, 8))
  3261. else
  3262. healObject.drawText = " "..(secondLeft ~= nil and TimerText(secondLeft) or "")
  3263. healObject.textUnder = false
  3264. end
  3265. if secondLeft == 0 then healObject.locked = false end
  3266. end
  3267. end
  3268. end
  3269. -- inhib
  3270. for i,inhibitor in pairs(inhibitors) do
  3271. if inhibitor.destroyed then
  3272. local tick = GetTickCount()
  3273. if inhibitor.rtime < tick then
  3274. inhibitor.destroyed = false
  3275. else
  3276. inhibitor.ltime = (inhibitor.rtime - GetTickCount()) / 1000;
  3277. inhibitor.drawText = TimerText(inhibitor.ltime)
  3278. --inhibitor.drawText = (IsKeyDown(16) and TimerText(inhibitor.rtime) or TimerText(inhibitor.rtime))
  3279. if MMTConfig.textOnMap and inhibitor.textTick < tick then
  3280. inhibitor.textTick = tick + 1000
  3281. PrintFloatText(inhibitor.object,6,inhibitor.drawText)
  3282. end
  3283. end
  3284. end
  3285. end
  3286. end
  3287.  
  3288. function OnDraw()
  3289. if GetGame().isOver then return end
  3290. for i,monster in pairs(monsters[mapName]) do
  3291. if monster.isSeen == true then
  3292. for j,camp in pairs(monster.camps) do
  3293. if camp.status == 2 then
  3294. DrawText("X",16,camp.minimap.x - 4, camp.minimap.y - 5, camp.drawColor)
  3295. elseif camp.status == 4 then
  3296. DrawText(camp.drawText,16,camp.minimap.x - 9, camp.minimap.y - 5, camp.drawColor)
  3297. end
  3298. end
  3299. end
  3300. end
  3301. for i,altar in pairs(altars[mapName]) do
  3302. if altar.locked then
  3303. DrawText(altar.drawText,16,altar.minimap.x - 9, altar.minimap.y - 5, altar.drawColor)
  3304. end
  3305. end
  3306. for i,relic in pairs(relics[mapName]) do
  3307. if relic.locked then
  3308. DrawText(relic.drawText,16,relic.minimap.x - 9, relic.minimap.y - 5, relic.drawColor)
  3309. end
  3310. end
  3311. for i,heal in pairs(heals[mapName]) do
  3312. for j,healObject in pairs(heal.objects) do
  3313. if healObject.locked then
  3314. DrawText(healObject.drawText,16,healObject.minimap.x - 9, healObject.minimap.y - 5, healObject.drawColor)
  3315. end
  3316. end
  3317. end
  3318. for i,inhibitor in pairs(inhibitors) do
  3319. if inhibitor.destroyed == true then
  3320. DrawText(inhibitor.drawText,16,inhibitor.minimap.x - 9, inhibitor.minimap.y - 5, 0xFFFFFF00)
  3321. end
  3322. end
  3323. end
  3324.  
  3325. function OnWndMsg(msg,key)
  3326. if msg == WM_LBUTTONDOWN and IsKeyDown(16) then
  3327. for i,monster in pairs(monsters[mapName]) do
  3328. if monster.isSeen == true then
  3329. if monster.iconUnder then
  3330. monster.advise = not monster.advise
  3331. break
  3332. else
  3333. for j,camp in pairs(monster.camps) do
  3334. if camp.textUnder then
  3335. if camp.respawnText ~= nil then SendChat(""..camp.respawnText) end
  3336. break
  3337. end
  3338. end
  3339. end
  3340. end
  3341. end
  3342. for i,altar in pairs(altars[mapName]) do
  3343. if altar.locked and altar.textUnder then
  3344. if altar.unlockText ~= nil then SendChat(""..altar.unlockText) end
  3345. break
  3346. end
  3347. end
  3348. end
  3349. end
  3350. end
  3351.  
  3352.  
  3353.  
  3354. --[[
  3355. Script: minimapTimers v0.3 (3.14 LoL patch)
  3356.  
  3357. Author: SurfaceS
  3358. Updated by TEAM DEKLAND
  3359. ]]
  3360. do
  3361. --[[ GLOBAL ]]
  3362. monsters = {
  3363. summonerRift = {
  3364. { -- baron
  3365. name = "baron",
  3366. spawn = 900,
  3367. respawn = 420,
  3368. advise = true,
  3369. camps = {
  3370. {
  3371. pos = { x = 4600, y = 60, z = 10250 },
  3372. name = "monsterCamp_12",
  3373. creeps = { { { name = "Worm12.1.1" }, }, },
  3374. team = TEAM_NEUTRAL,
  3375. },
  3376. },
  3377. },
  3378. { -- dragon
  3379. name = "dragon",
  3380. spawn = 150,
  3381. respawn = 360,
  3382. advise = true,
  3383. camps = {
  3384. {
  3385. pos = { x = 9459, y = 60, z = 4193 },
  3386. name = "monsterCamp_6",
  3387. creeps = { { { name = "Dragon6.1.1" }, }, },
  3388. team = TEAM_NEUTRAL,
  3389. },
  3390. },
  3391. },
  3392. { -- blue
  3393. name = "blue",
  3394. spawn = 115,
  3395. respawn = 300,
  3396. advise = true,
  3397. camps = {
  3398. {
  3399. pos = { x = 3632, y = 60, z = 7600 },
  3400. name = "monsterCamp_1",
  3401. creeps = { { { name = "AncientGolem1.1.1" }, { name = "YoungLizard1.1.2" }, { name = "YoungLizard1.1.3" }, }, },
  3402. team = TEAM_BLUE,
  3403. },
  3404. {
  3405. pos = { x = 10386, y = 60, z = 6811 },
  3406. name = "monsterCamp_7",
  3407. creeps = { { { name = "AncientGolem7.1.1" }, { name = "YoungLizard7.1.2" }, { name = "YoungLizard7.1.3" }, }, },
  3408. team = TEAM_RED,
  3409. },
  3410. },
  3411. },
  3412. { -- red
  3413. name = "red",
  3414. spawn = 115,
  3415. respawn = 300,
  3416. advise = true,
  3417. camps = {
  3418. {
  3419. pos = { x = 7455, y = 60, z = 3890 },
  3420. name = "monsterCamp_4",
  3421. creeps = { { { name = "LizardElder4.1.1" }, { name = "YoungLizard4.1.2" }, { name = "YoungLizard4.1.3" }, }, },
  3422. team = TEAM_BLUE,
  3423. },
  3424. {
  3425. pos = { x = 6504, y = 60, z = 10584 },
  3426. name = "monsterCamp_10",
  3427. creeps = { { { name = "LizardElder10.1.1" }, { name = "YoungLizard10.1.2" }, { name = "YoungLizard10.1.3" }, }, },
  3428. team = TEAM_RED,
  3429. },
  3430. },
  3431. },
  3432. { -- wolves
  3433. name = "wolves",
  3434. spawn = 115,
  3435. respawn = 50,
  3436. advise = false,
  3437. camps = {
  3438. {
  3439. name = "monsterCamp_2",
  3440. creeps = { { { name = "GiantWolf2.1.3" }, { name = "wolf2.1.1" }, { name = "wolf2.1.2" }, }, },
  3441. team = TEAM_BLUE,
  3442. },
  3443. {
  3444. name = "monsterCamp_8",
  3445. creeps = { { { name = "GiantWolf8.1.3" }, { name = "wolf8.1.1" }, { name = "wolf8.1.2" }, }, },
  3446. team = TEAM_RED,
  3447. },
  3448. },
  3449. },
  3450. { -- wraiths
  3451. name = "wraiths",
  3452. spawn = 115,
  3453. respawn = 50,
  3454. advise = false,
  3455. camps = {
  3456. {
  3457. name = "monsterCamp_3",
  3458. creeps = { { { name = "Wraith3.1.3" }, { name = "LesserWraith3.1.1" }, { name = "LesserWraith3.1.2" }, { name = "LesserWraith3.1.4" }, }, },
  3459. team = TEAM_BLUE,
  3460. },
  3461. {
  3462. name = "monsterCamp_9",
  3463. creeps = { { { name = "Wraith9.1.3" }, { name = "LesserWraith9.1.1" }, { name = "LesserWraith9.1.2" }, { name = "LesserWraith9.1.4" }, }, },
  3464. team = TEAM_RED,
  3465. },
  3466. },
  3467. },
  3468. { -- GreatWraiths
  3469. name = "GreatWraiths",
  3470. spawn = 115,
  3471. respawn = 50,
  3472. advise = false,
  3473. camps = {
  3474. {
  3475. name = "monsterCamp_13",
  3476. creeps = { { { name = "GreatWraith13.1.1" }, }, },
  3477. team = TEAM_BLUE,
  3478. },
  3479. {
  3480. name = "monsterCamp_14",
  3481. creeps = { { { name = "GreatWraith14.1.1" }, }, },
  3482. team = TEAM_RED,
  3483. },
  3484. },
  3485. },
  3486. { -- Golems
  3487. name = "Golems",
  3488. spawn = 115,
  3489. respawn = 50,
  3490. advise = false,
  3491. camps = {
  3492. {
  3493. name = "monsterCamp_5",
  3494. creeps = { { { name = "Golem5.1.2" }, { name = "SmallGolem5.1.1" }, }, },
  3495. team = TEAM_BLUE,
  3496. },
  3497. {
  3498. name = "monsterCamp_11",
  3499. creeps = { { { name = "Golem11.1.2" }, { name = "SmallGolem11.1.1" }, }, },
  3500. team = TEAM_RED,
  3501. },
  3502. },
  3503. },
  3504. },
  3505. twistedTreeline = {
  3506. { -- Wraith
  3507. name = "Wraith",
  3508. spawn = 100,
  3509. respawn = 50,
  3510. advise = false,
  3511. camps = {
  3512. {
  3513. --pos = { x = 4414, y = 60, z = 5774 },
  3514. name = "monsterCamp_1",
  3515. creeps = {
  3516. { { name = "TT_NWraith1.1.1" }, { name = "TT_NWraith21.1.2" }, { name = "TT_NWraith21.1.3" }, },
  3517. },
  3518. team = TEAM_BLUE,
  3519. },
  3520. {
  3521. --pos = { x = 11008, y = 60, z = 5775 },
  3522. name = "monsterCamp_4",
  3523. creeps = {
  3524. { { name = "TT_NWraith4.1.1" }, { name = "TT_NWraith24.1.2" }, { name = "TT_NWraith24.1.3" }, },
  3525. },
  3526. team = TEAM_RED,
  3527. },
  3528. },
  3529. },
  3530. { -- Golems
  3531. name = "Golems",
  3532. respawn = 50,
  3533. spawn = 100,
  3534. advise = false,
  3535. camps = {
  3536. {
  3537. --pos = { x = 5088, y = 60, z = 8065 },
  3538. name = "monsterCamp_2",
  3539. creeps = {
  3540. { { name = "TT_NGolem2.1.1" }, { name = "TT_NGolem22.1.2" } },
  3541. },
  3542. team = TEAM_BLUE,
  3543. },
  3544. {
  3545. --pos = { x = 10341, y = 60, z = 8084 },
  3546. name = "monsterCamp_5",
  3547. creeps = {
  3548. { { name = "TT_NGolem5.1.1" }, { name = "TT_NGolem25.1.2" } },
  3549. },
  3550. team = TEAM_RED,
  3551. },
  3552. },
  3553. },
  3554. { -- Wolves
  3555. name = "Wolves",
  3556. respawn = 50,
  3557. spawn = 100,
  3558. advise = false,
  3559. camps = {
  3560. {
  3561. --pos = { x = 6148, y = 60, z = 5993 },
  3562. name = "monsterCamp_3",
  3563. creeps = { { { name = "TT_NWolf3.1.1" }, { name = "TT_NWolf23.1.2" }, { name = "TT_NWolf23.1.3" } }, },
  3564. team = TEAM_BLUE,
  3565. },
  3566. {
  3567. --pos = { x = 9239, y = 60, z = 6022 },
  3568. name = "monsterCamp_6",
  3569. creeps = { { { name = "TT_NWolf6.1.1" }, { name = "TT_NWolf26.1.2" }, { name = "TT_NWolf26.1.3" } }, },
  3570. team = TEAM_RED,
  3571. },
  3572. },
  3573. },
  3574. { -- Heal
  3575. name = "Heal",
  3576. spawn = 115,
  3577. respawn = 90,
  3578. advise = true,
  3579. camps = {
  3580. {
  3581. pos = { x = 7711, y = 60, z = 6722 },
  3582. name = "monsterCamp_7",
  3583. creeps = { { { name = "TT_Relic7.1.1" }, }, },
  3584. team = TEAM_NEUTRAL,
  3585. },
  3586. },
  3587. },
  3588. { -- Vilemaw
  3589. name = "Vilemaw",
  3590. spawn = 600,
  3591. respawn = 300,
  3592. advise = true,
  3593. camps = {
  3594. {
  3595. pos = { x = 7711, y = 60, z = 10080 },
  3596. name = "monsterCamp_8",
  3597. creeps = { { { name = "TT_Spiderboss8.1.1" }, }, },
  3598. team = TEAM_NEUTRAL,
  3599. },
  3600. },
  3601. },
  3602. },
  3603. crystalScar = {},
  3604. provingGrounds = {
  3605. { -- Heal
  3606. name = "Heal",
  3607. spawn = 190,
  3608. respawn = 40,
  3609. advise = false,
  3610. camps = {
  3611. {
  3612. pos = { x = 8922, y = 60, z = 7868 },
  3613. name = "monsterCamp_1",
  3614. creeps = { { { name = "OdinShieldRelic1.1.1" }, }, },
  3615. team = TEAM_NEUTRAL,
  3616. },
  3617. {
  3618. pos = { x = 7473, y = 60, z = 6617 },
  3619. name = "monsterCamp_2",
  3620. creeps = { { { name = "OdinShieldRelic2.1.1" }, }, },
  3621. team = TEAM_NEUTRAL,
  3622. },
  3623. {
  3624. pos = { x = 5929, y = 60, z = 5190 },
  3625. name = "monsterCamp_3",
  3626. creeps = { { { name = "OdinShieldRelic3.1.1" }, }, },
  3627. team = TEAM_NEUTRAL,
  3628. },
  3629. {
  3630. pos = { x = 4751, y = 60, z = 3901 },
  3631. name = "monsterCamp_4",
  3632. creeps = { { { name = "OdinShieldRelic4.1.1" }, }, },
  3633. team = TEAM_NEUTRAL,
  3634. },
  3635. },
  3636. },
  3637. },
  3638. howlingAbyss = {
  3639. { -- Heal
  3640. name = "Heal",
  3641. spawn = 190,
  3642. respawn = 40,
  3643. advise = false,
  3644. camps = {
  3645. {
  3646. pos = { x = 8922, y = 60, z = 7868 },
  3647. name = "monsterCamp_1",
  3648. creeps = { { { name = "HA_AP_HealthRelic1.1.1" }, }, },
  3649. team = TEAM_NEUTRAL,
  3650. },
  3651. {
  3652. pos = { x = 7473, y = 60, z = 6617 },
  3653. name = "monsterCamp_2",
  3654. creeps = { { { name = "HA_AP_HealthRelic2.1.1" }, }, },
  3655. team = TEAM_NEUTRAL,
  3656. },
  3657. {
  3658. pos = { x = 5929, y = 60, z = 5190 },
  3659. name = "monsterCamp_3",
  3660. creeps = { { { name = "HA_AP_HealthRelic3.1.1" }, }, },
  3661. team = TEAM_NEUTRAL,
  3662. },
  3663. {
  3664. pos = { x = 4751, y = 60, z = 3901 },
  3665. name = "monsterCamp_4",
  3666. creeps = { { { name = "HA_AP_HealthRelic4.1.1" }, }, },
  3667. team = TEAM_NEUTRAL,
  3668. },
  3669. },
  3670. },
  3671. },
  3672. }
  3673.  
  3674. altars = {
  3675. summonerRift = {},
  3676. twistedTreeline = {
  3677. {
  3678. name = "Left Altar",
  3679. spawn = 180,
  3680. respawn = 85,
  3681. advise = true,
  3682. objectName = "TT_Buffplat_L",
  3683. locked = false,
  3684. lockNames = {"TT_Lock_Blue_L.troy", "TT_Lock_Purple_L.troy", "TT_Lock_Neutral_L.troy", },
  3685. unlockNames = {"TT_Unlock_Blue_L.troy", "TT_Unlock_purple_L.troy", "TT_Unlock_Neutral_L.troy", },
  3686. },
  3687. {
  3688. name = "Right Altar",
  3689. spawn = 180,
  3690. respawn = 85,
  3691. advise = true,
  3692. objectName = "TT_Buffplat_R",
  3693. locked = false,
  3694. lockNames = {"TT_Lock_Blue_R.troy", "TT_Lock_Purple_R.troy", "TT_Lock_Neutral_R.troy", },
  3695. unlockNames = {"TT_Unlock_Blue_R.troy", "TT_Unlock_purple_R.troy", "TT_Unlock_Neutral_R.troy", },
  3696. },
  3697. },
  3698. crystalScar = {},
  3699. provingGrounds = {},
  3700. howlingAbyss = {},
  3701. }
  3702.  
  3703. relics = {
  3704. summonerRift = {},
  3705. twistedTreeline = {},
  3706. crystalScar = {
  3707. {
  3708. pos = { x = 5500, y = 60, z = 6500 },
  3709. name = "Relic",
  3710. team = TEAM_BLUE,
  3711. spawn = 180,
  3712. respawn = 180,
  3713. advise = true,
  3714. locked = false,
  3715. precenceObject = (player.team == TEAM_BLUE and "Odin_Prism_Green.troy" or "Odin_Prism_Red.troy"),
  3716. },
  3717. {
  3718. pos = { x = 7550, y = 60, z = 6500 },
  3719. name = "Relic",
  3720. team = TEAM_RED,
  3721. spawn = 180,
  3722. respawn = 180,
  3723. advise = true,
  3724. locked = false,
  3725. precenceObject = (player.team == TEAM_RED and "Odin_Prism_Green.troy" or "Odin_Prism_Red.troy"),
  3726. },
  3727. },
  3728. provingGrounds = {},
  3729. howlingAbyss = {},
  3730. }
  3731.  
  3732. heals = {
  3733. summonerRift = {},
  3734. twistedTreeline = {},
  3735. provingGrounds = {},
  3736. crystalScar = {
  3737. {
  3738. name = "Heal",
  3739. objectName = "OdinShieldRelic",
  3740. respawn = 30,
  3741. objects = {},
  3742. },
  3743. },
  3744. howlingAbyss = {},
  3745. }
  3746.  
  3747. inhibitors = {}
  3748.  
  3749. function addCampCreepAltar(object)
  3750. if object ~= nil and object.name ~= nil then
  3751. if object.name == "Order_Inhibit_Gem.troy" or object.name == "Chaos_Inhibit_Gem.troy" then
  3752. table.insert(inhibitors, { object = object, destroyed = false, lefttime = 0, x = object.x, y = object.y, z = object.z, minimap = GetMinimap(object), textTick = 0 })
  3753. return
  3754. elseif object.name == "Order_Inhibit_Crystal_Shatter.troy" or object.name == "Chaos_Inhibit_Crystal_Shatter.troy" then
  3755. for i,inhibitor in pairs(inhibitors) do
  3756. if GetDistance(inhibitor, object) < 200 then
  3757. local tick = GetTickCount()
  3758. inhibitor.dtime = tick
  3759. inhibitor.rtime = tick + 300000
  3760. inhibitor.ltime = 300000
  3761. inhibitor.destroyed = true
  3762. end
  3763. end
  3764. return
  3765. end
  3766. for i,monster in pairs(monsters[mapName]) do
  3767. for j,camp in pairs(monster.camps) do
  3768. if camp.name == object.name then
  3769. camp.object = object
  3770. return
  3771. end
  3772. if object.type == "obj_AI_Minion" then
  3773. for k,creepPack in ipairs(camp.creeps) do
  3774. for l,creep in ipairs(creepPack) do
  3775. if object.name == creep.name then
  3776. creep.object = object
  3777. return
  3778. end
  3779. end
  3780. end
  3781. end
  3782. end
  3783. end
  3784. for i,altar in pairs(altars[mapName]) do
  3785. if altar.objectName == object.name then
  3786. altar.object = object
  3787. altar.textTick = 0
  3788. altar.minimap = GetMinimap(object)
  3789. end
  3790. if altar.locked then
  3791. for j,lockName in pairs(altar.unlockNames) do
  3792. if lockName == object.name then
  3793. altar.locked = false
  3794. return
  3795. end
  3796. end
  3797. else
  3798. for j,lockName in pairs(altar.lockNames) do
  3799. if lockName == object.name then
  3800. altar.drawColor = 0
  3801. altar.drawText = ""
  3802. altar.locked = true
  3803. altar.advised = false
  3804. altar.advisedBefore = false
  3805. return
  3806. end
  3807. end
  3808. end
  3809. end
  3810. for i,relic in pairs(relics[mapName]) do
  3811. if relic.precenceObject == object.name then
  3812. relic.object = object
  3813. relic.textTick = 0
  3814. relic.locked = false
  3815. return
  3816. end
  3817. end
  3818. for i,heal in pairs(heals[mapName]) do
  3819. if heal.objectName == object.name then
  3820. for j,healObject in pairs(heal.objects) do
  3821. if (GetDistance(healObject, object) < 50) then
  3822. healObject.object = object
  3823. healObject.found = true
  3824. healObject.locked = false
  3825. return
  3826. end
  3827. end
  3828. local k = #heal.objects + 1
  3829. heals[mapName][i].objects[k] = {found = true, locked = false, object = object, x = object.x, y = object.y, z = object.z, minimap = GetMinimap(object), textTick = 0,}
  3830. return
  3831. end
  3832. end
  3833. end
  3834. end
  3835.  
  3836. function removeCreep(object)
  3837. if object ~= nil and object.type == "obj_AI_Minion" and object.name ~= nil then
  3838. for i,monster in pairs(monsters[mapName]) do
  3839. for j,camp in pairs(monster.camps) do
  3840. for k,creepPack in ipairs(camp.creeps) do
  3841. for l,creep in ipairs(creepPack) do
  3842. if object.name == creep.name then
  3843. creep.object = nil
  3844. return
  3845. end
  3846. end
  3847. end
  3848. end
  3849. end
  3850. end
  3851. end
  3852.  
  3853. function OnLoad()
  3854. mapName = GetGame().map.shortName
  3855. if monsters[mapName] == nil then
  3856. mapName = nil
  3857. monsters = nil
  3858. addCampCreepAltar = nil
  3859. removeCreep = nil
  3860. addAltarObject = nil
  3861. return
  3862. else
  3863. startTick = GetGame().tick
  3864. -- CONFIG
  3865. MMTConfig = scriptConfig("Timers 0.2", "minimapTimers")
  3866. MMTConfig:addParam("pingOnRespawn", "Ping on respawn", SCRIPT_PARAM_ONOFF, true) -- ping location on respawn
  3867. MMTConfig:addParam("pingOnRespawnBefore", "Ping before respawn", SCRIPT_PARAM_ONOFF, true) -- ping location before respawn
  3868. MMTConfig:addParam("textOnRespawn", "Chat on respawn", SCRIPT_PARAM_ONOFF, true) -- print chat text on respawn
  3869. MMTConfig:addParam("textOnRespawnBefore", "Chat before respawn", SCRIPT_PARAM_ONOFF, true) -- print chat text before respawn
  3870. MMTConfig:addParam("adviceEnemyMonsters", "Advice enemy monster", SCRIPT_PARAM_ONOFF, true) -- advice enemy monster, or just our monsters
  3871. MMTConfig:addParam("adviceBefore", "Advice Time", SCRIPT_PARAM_SLICE, 20, 1, 40, 0) -- time in second to advice before monster respawn
  3872. MMTConfig:addParam("textOnMap", "Text on map", SCRIPT_PARAM_ONOFF, true) -- time in second on map
  3873. for i,monster in pairs(monsters[mapName]) do
  3874. monster.isSeen = false
  3875. for j,camp in pairs(monster.camps) do
  3876. camp.enemyTeam = (camp.team == TEAM_ENEMY)
  3877. camp.textTick = 0
  3878. camp.status = 0
  3879. camp.drawText = ""
  3880. camp.drawColor = 0xFF00FF00
  3881. end
  3882. end
  3883. for i = 1, objManager.maxObjects do
  3884. local object = objManager:getObject(i)
  3885. if object ~= nil then
  3886. addCampCreepAltar(object)
  3887. end
  3888. end
  3889. AddCreateObjCallback(addCampCreepAltar)
  3890. AddDeleteObjCallback(removeCreep)
  3891. end
  3892. end
  3893. function OnTick()
  3894. if GetGame().isOver then return end
  3895. local GameTime = (GetTickCount()-startTick) / 1000
  3896. local monsterCount = 0
  3897. for i,monster in pairs(monsters[mapName]) do
  3898. for j,camp in pairs(monster.camps) do
  3899. local campStatus = 0
  3900. for k,creepPack in ipairs(camp.creeps) do
  3901. for l,creep in ipairs(creepPack) do
  3902. if creep.object ~= nil and creep.object.valid and creep.object.dead == false then
  3903. if l == 1 then
  3904. campStatus = 1
  3905. elseif campStatus ~= 1 then
  3906. campStatus = 2
  3907. end
  3908. end
  3909. end
  3910. end
  3911. --[[ Not used until camp.showOnMinimap work
  3912. if (camp.object and camp.object.showOnMinimap == 1) then
  3913. -- camp is here
  3914. if campStatus == 0 then campStatus = 3 end
  3915. elseif camp.status == 3 then -- empty not seen when killed
  3916. campStatus = 5
  3917. elseif campStatus == 0 and (camp.status == 1 or camp.status == 2) then
  3918. campStatus = 4
  3919. camp.deathTick = tick
  3920. end
  3921. ]]
  3922. -- temp fix until camp.showOnMinimap work
  3923. -- not so good
  3924. if camp.object ~= nil and camp.object.valid then
  3925. camp.minimap = GetMinimap(camp.object)
  3926. if campStatus == 0 then
  3927. if (camp.status == 1 or camp.status == 2) then
  3928. campStatus = 4
  3929. camp.advisedBefore = false
  3930. camp.advised = false
  3931. camp.respawnTime = math.ceil(GameTime) + monster.respawn
  3932. camp.respawnText = (camp.enemyTeam and "Enemy " or "")..monster.name.." respawn at "..TimerText(camp.respawnTime)
  3933. elseif (camp.status == 4) then
  3934. campStatus = 4
  3935. else
  3936. campStatus = 3
  3937. end
  3938. end
  3939. elseif camp.pos ~= nil then
  3940. camp.minimap = GetMinimap(camp.pos)
  3941. if (GameTime < monster.spawn) then
  3942. campStatus = 4
  3943. camp.advisedBefore = true
  3944. camp.advised = true
  3945. camp.respawnTime = monster.spawn
  3946. camp.respawnText = (camp.enemyTeam and "Enemy " or "")..monster.name.." spawn at "..TimerText(camp.respawnTime)
  3947. end
  3948. end
  3949. if camp.status ~= campStatus or campStatus == 4 then
  3950. if campStatus ~= 0 then
  3951. if monster.isSeen == false then monster.isSeen = true end
  3952. camp.status = campStatus
  3953. end
  3954. if camp.status == 1 then -- ready
  3955. camp.drawText = "ready"
  3956. camp.drawColor = 0xFF00FF00
  3957. elseif camp.status == 2 then -- ready, master creeps dead
  3958. camp.drawText = "stolen"
  3959. camp.drawColor = 0xFFFF0000
  3960. elseif camp.status == 3 then -- ready, not creeps shown
  3961. camp.drawText = " ?"
  3962. camp.drawColor = 0xFF00FF00
  3963. elseif camp.status == 4 then -- empty from creeps kill
  3964. local secondLeft = math.ceil(math.max(0, camp.respawnTime - GameTime))
  3965. if monster.advise == true and (MMTConfig.adviceEnemyMonsters == true or camp.enemyTeam == false) then
  3966. if secondLeft == 0 and camp.advised == false then
  3967. camp.advised = true
  3968. if MMTConfig.textOnRespawn then PrintChat("<font color='#00FFCC'>"..(camp.enemyTeam and "Enemy " or "")..monster.name.."</font><font color='#FFAA00'> has respawned</font>") end
  3969. if MMTConfig.pingOnRespawn then PingSignal(PING_FALLBACK,camp.object.x,camp.object.y,camp.object.z,2) end
  3970. elseif secondLeft <= MMTConfig.adviceBefore and camp.advisedBefore == false then
  3971. camp.advisedBefore = true
  3972. if MMTConfig.textOnRespawnBefore then PrintChat("<font color='#00FFCC'>"..(camp.enemyTeam and "Enemy " or "")..monster.name.."</font><font color='#FFAA00'> will respawn in </font><font color='#00FFCC'>"..secondLeft.." sec</font>") end
  3973. if MMTConfig.pingOnRespawnBefore then PingSignal(PING_FALLBACK,camp.object.x,camp.object.y,camp.object.z,2) end
  3974. end
  3975. end
  3976. -- temp fix until camp.showOnMinimap work
  3977. if secondLeft == 0 then
  3978. camp.status = 0
  3979. end
  3980. camp.drawText = " "..TimerText(secondLeft)
  3981. camp.drawColor = 0xFFFFFF00
  3982. elseif camp.status == 5 then -- camp found empty (not using yet)
  3983. camp.drawText = " -"
  3984. camp.drawColor = 0xFFFF0000
  3985. end
  3986. end
  3987. -- shift click
  3988. if IsKeyDown(16) and camp.status == 4 then
  3989. camp.drawText = " "..(camp.respawnTime ~= nil and TimerText(camp.respawnTime) or "")
  3990. camp.textUnder = (CursorIsUnder(camp.minimap.x - 9, camp.minimap.y - 5, 20, 8))
  3991. else
  3992. camp.textUnder = false
  3993. end
  3994. if MMTConfig.textOnMap and camp.status == 4 and camp.object and camp.object.valid and camp.textTick < GetTickCount() and camp.floatText ~= camp.drawText then
  3995. camp.floatText = camp.drawText
  3996. camp.textTick = GetTickCount() + 1000
  3997. PrintFloatText(camp.object,6,camp.floatText)
  3998. end
  3999. end
  4000. end
  4001.  
  4002. -- altars
  4003. for i,altar in pairs(altars[mapName]) do
  4004. if altar.object and altar.object.valid then
  4005. if altar.locked then
  4006. if GameTime < altar.spawn then
  4007. altar.secondLeft = math.ceil(math.max(0, altar.spawn - GameTime))
  4008. else
  4009. local tmpTime = ((altar.object.mana > 39600) and (altar.object.mana - 39900) / 20100 or (39600 - altar.object.mana) / 20100)
  4010. altar.secondLeft = math.ceil(math.max(0, tmpTime * altar.respawn))
  4011. end
  4012. altar.unlockTime = math.ceil(GameTime + altar.secondLeft)
  4013. altar.unlockText = altar.name.." unlock at "..TimerText(altar.unlockTime)
  4014. altar.drawColor = 0xFFFFFF00
  4015. if altar.advise == true then
  4016. if altar.secondLeft == 0 and altar.advised == false then
  4017. altar.advised = true
  4018. if MMTConfig.textOnRespawn then PrintChat("<font color='#00FFCC'>"..altar.name.."</font><font color='#FFAA00'> is unlocked</font>") end
  4019. if MMTConfig.pingOnRespawn then PingSignal(PING_FALLBACK,altar.object.x,altar.object.y,altar.object.z,2) end
  4020. elseif altar.secondLeft <= MMTConfig.adviceBefore and altar.advisedBefore == false then
  4021. altar.advisedBefore = true
  4022. if MMTConfig.textOnRespawnBefore then PrintChat("<font color='#00FFCC'>"..altar.name.."</font><font color='#FFAA00'> will unlock in </font><font color='#00FFCC'>"..altar.secondLeft.." sec</font>") end
  4023. if MMTConfig.pingOnRespawnBefore then PingSignal(PING_FALLBACK,altar.object.x,altar.object.y,altar.object.z,2) end
  4024. end
  4025. end
  4026. -- shift click
  4027. if IsKeyDown(16) then
  4028. altar.drawText = " "..(altar.unlockTime ~= nil and TimerText(altar.unlockTime) or "")
  4029. altar.textUnder = (CursorIsUnder(altar.minimap.x - 9, altar.minimap.y - 5, 20, 8))
  4030. else
  4031. altar.drawText = " "..(altar.secondLeft ~= nil and TimerText(altar.secondLeft) or "")
  4032. altar.textUnder = false
  4033. end
  4034. if MMTConfig.textOnMap and altar.object and altar.object.valid and altar.textTick < GetTickCount() and altar.floatText ~= altar.drawText then
  4035. altar.floatText = altar.drawText
  4036. altar.textTick = GetTickCount() + 1000
  4037. PrintFloatText(altar.object,6,altar.floatText)
  4038. end
  4039. end
  4040. end
  4041. end
  4042.  
  4043. -- relics
  4044. for i,relic in pairs(relics[mapName]) do
  4045. if (not relic.locked and (not relic.object or not relic.object.valid or relic.dead)) then
  4046. if GameTime < relic.spawn then
  4047. relic.unlockTime = relic.spawn - GameTime
  4048. else
  4049. relic.unlockTime = math.ceil(GameTime + relic.respawn)
  4050. end
  4051. relic.advised = false
  4052. relic.advisedBefore = false
  4053. relic.drawText = ""
  4054. relic.unlockText = relic.name.." respawn at "..TimerText(relic.unlockTime)
  4055. relic.drawColor = 4288610048
  4056. --FF9EFF00
  4057. relic.minimap = GetMinimap(relic.pos)
  4058. relic.locked = true
  4059. end
  4060. if relic.locked then
  4061. relic.secondLeft = math.ceil(math.max(0, relic.unlockTime - GameTime))
  4062. if relic.advise == true then
  4063. if relic.secondLeft == 0 and relic.advised == false then
  4064. relic.advised = true
  4065. if MMTConfig.textOnRespawn then PrintChat("<font color='#00FFCC'>"..relic.name.."</font><font color='#FFAA00'> has respawned</font>") end
  4066. if MMTConfig.pingOnRespawn then PingSignal(PING_FALLBACK,relic.pos.x,relic.pos.y,relic.pos.z,2) end
  4067. elseif relic.secondLeft <= MMTConfig.adviceBefore and relic.advisedBefore == false then
  4068. relic.advisedBefore = true
  4069. if MMTConfig.textOnRespawnBefore then PrintChat("<font color='#00FFCC'>"..relic.name.."</font><font color='#FFAA00'> will respawn in </font><font color='#00FFCC'>"..relic.secondLeft.." sec</font>") end
  4070. if MMTConfig.pingOnRespawnBefore then PingSignal(PING_FALLBACK,relic.pos.x,relic.pos.y,relic.pos.z,2) end
  4071. end
  4072. end
  4073. -- shift click
  4074. if IsKeyDown(16) then
  4075. relic.drawText = " "..(relic.unlockTime ~= nil and TimerText(relic.unlockTime) or "")
  4076. relic.textUnder = (CursorIsUnder(relic.minimap.x - 9, relic.minimap.y - 5, 20, 8))
  4077. else
  4078. relic.drawText = " "..(relic.secondLeft ~= nil and TimerText(relic.secondLeft) or "")
  4079. relic.textUnder = false
  4080. end
  4081. end
  4082. end
  4083.  
  4084. for i,heal in pairs(heals[mapName]) do
  4085. for j,healObject in pairs(heal.objects) do
  4086. if (not healObject.locked and healObject.found and (not healObject.object or not healObject.object.valid or healObject.object.dead)) then
  4087. healObject.drawColor = 0xFF00FF04
  4088. healObject.unlockTime = math.ceil(GameTime + heal.respawn)
  4089. healObject.drawText = ""
  4090. healObject.found = false
  4091. healObject.locked = true
  4092. end
  4093. if healObject.locked then
  4094. -- shift click
  4095. local secondLeft = math.ceil(math.max(0, healObject.unlockTime - GameTime))
  4096. if IsKeyDown(16) then
  4097. healObject.drawText = " "..(healObject.unlockTime ~= nil and TimerText(healObject.unlockTime) or "")
  4098. healObject.textUnder = (CursorIsUnder(healObject.minimap.x - 9, healObject.minimap.y - 5, 20, 8))
  4099. else
  4100. healObject.drawText = " "..(secondLeft ~= nil and TimerText(secondLeft) or "")
  4101. healObject.textUnder = false
  4102. end
  4103. if secondLeft == 0 then healObject.locked = false end
  4104. end
  4105. end
  4106. end
  4107. -- inhib
  4108. for i,inhibitor in pairs(inhibitors) do
  4109. if inhibitor.destroyed then
  4110. local tick = GetTickCount()
  4111. if inhibitor.rtime < tick then
  4112. inhibitor.destroyed = false
  4113. else
  4114. inhibitor.ltime = (inhibitor.rtime - GetTickCount()) / 1000;
  4115. inhibitor.drawText = TimerText(inhibitor.ltime)
  4116. --inhibitor.drawText = (IsKeyDown(16) and TimerText(inhibitor.rtime) or TimerText(inhibitor.rtime))
  4117. if MMTConfig.textOnMap and inhibitor.textTick < tick then
  4118. inhibitor.textTick = tick + 1000
  4119. PrintFloatText(inhibitor.object,6,inhibitor.drawText)
  4120. end
  4121. end
  4122. end
  4123. end
  4124. end
  4125.  
  4126. function OnDraw()
  4127. if GetGame().isOver then return end
  4128. for i,monster in pairs(monsters[mapName]) do
  4129. if monster.isSeen == true then
  4130. for j,camp in pairs(monster.camps) do
  4131. if camp.status == 2 then
  4132. DrawText("X",16,camp.minimap.x - 4, camp.minimap.y - 5, camp.drawColor)
  4133. elseif camp.status == 4 then
  4134. DrawText(camp.drawText,16,camp.minimap.x - 9, camp.minimap.y - 5, camp.drawColor)
  4135. end
  4136. end
  4137. end
  4138. end
  4139. for i,altar in pairs(altars[mapName]) do
  4140. if altar.locked then
  4141. DrawText(altar.drawText,16,altar.minimap.x - 9, altar.minimap.y - 5, altar.drawColor)
  4142. end
  4143. end
  4144. for i,relic in pairs(relics[mapName]) do
  4145. if relic.locked then
  4146. DrawText(relic.drawText,16,relic.minimap.x - 9, relic.minimap.y - 5, relic.drawColor)
  4147. end
  4148. end
  4149. for i,heal in pairs(heals[mapName]) do
  4150. for j,healObject in pairs(heal.objects) do
  4151. if healObject.locked then
  4152. DrawText(healObject.drawText,16,healObject.minimap.x - 9, healObject.minimap.y - 5, healObject.drawColor)
  4153. end
  4154. end
  4155. end
  4156. for i,inhibitor in pairs(inhibitors) do
  4157. if inhibitor.destroyed == true then
  4158. DrawText(inhibitor.drawText,16,inhibitor.minimap.x - 9, inhibitor.minimap.y - 5, 0xFFFFFF00)
  4159. end
  4160. end
  4161. end
  4162.  
  4163. function OnWndMsg(msg,key)
  4164. if msg == WM_LBUTTONDOWN and IsKeyDown(16) then
  4165. for i,monster in pairs(monsters[mapName]) do
  4166. if monster.isSeen == true then
  4167. if monster.iconUnder then
  4168. monster.advise = not monster.advise
  4169. break
  4170. else
  4171. for j,camp in pairs(monster.camps) do
  4172. if camp.textUnder then
  4173. if camp.respawnText ~= nil then SendChat(""..camp.respawnText) end
  4174. break
  4175. end
  4176. end
  4177. end
  4178. end
  4179. end
  4180. for i,altar in pairs(altars[mapName]) do
  4181. if altar.locked and altar.textUnder then
  4182. if altar.unlockText ~= nil then SendChat(""..altar.unlockText) end
  4183. break
  4184. end
  4185. end
  4186. end
  4187. end
  4188. end
  4189.  
  4190.  
  4191.  
  4192. --[[
  4193. Script: minimapTimers v0.3 (3.14 LoL patch)
  4194.  
  4195. Author: SurfaceS
  4196. Updated by TEAM DEKLAND
  4197. ]]
  4198. do
  4199. --[[ GLOBAL ]]
  4200. monsters = {
  4201. summonerRift = {
  4202. { -- baron
  4203. name = "baron",
  4204. spawn = 900,
  4205. respawn = 420,
  4206. advise = true,
  4207. camps = {
  4208. {
  4209. pos = { x = 4600, y = 60, z = 10250 },
  4210. name = "monsterCamp_12",
  4211. creeps = { { { name = "Worm12.1.1" }, }, },
  4212. team = TEAM_NEUTRAL,
  4213. },
  4214. },
  4215. },
  4216. { -- dragon
  4217. name = "dragon",
  4218. spawn = 150,
  4219. respawn = 360,
  4220. advise = true,
  4221. camps = {
  4222. {
  4223. pos = { x = 9459, y = 60, z = 4193 },
  4224. name = "monsterCamp_6",
  4225. creeps = { { { name = "Dragon6.1.1" }, }, },
  4226. team = TEAM_NEUTRAL,
  4227. },
  4228. },
  4229. },
  4230. { -- blue
  4231. name = "blue",
  4232. spawn = 115,
  4233. respawn = 300,
  4234. advise = true,
  4235. camps = {
  4236. {
  4237. pos = { x = 3632, y = 60, z = 7600 },
  4238. name = "monsterCamp_1",
  4239. creeps = { { { name = "AncientGolem1.1.1" }, { name = "YoungLizard1.1.2" }, { name = "YoungLizard1.1.3" }, }, },
  4240. team = TEAM_BLUE,
  4241. },
  4242. {
  4243. pos = { x = 10386, y = 60, z = 6811 },
  4244. name = "monsterCamp_7",
  4245. creeps = { { { name = "AncientGolem7.1.1" }, { name = "YoungLizard7.1.2" }, { name = "YoungLizard7.1.3" }, }, },
  4246. team = TEAM_RED,
  4247. },
  4248. },
  4249. },
  4250. { -- red
  4251. name = "red",
  4252. spawn = 115,
  4253. respawn = 300,
  4254. advise = true,
  4255. camps = {
  4256. {
  4257. pos = { x = 7455, y = 60, z = 3890 },
  4258. name = "monsterCamp_4",
  4259. creeps = { { { name = "LizardElder4.1.1" }, { name = "YoungLizard4.1.2" }, { name = "YoungLizard4.1.3" }, }, },
  4260. team = TEAM_BLUE,
  4261. },
  4262. {
  4263. pos = { x = 6504, y = 60, z = 10584 },
  4264. name = "monsterCamp_10",
  4265. creeps = { { { name = "LizardElder10.1.1" }, { name = "YoungLizard10.1.2" }, { name = "YoungLizard10.1.3" }, }, },
  4266. team = TEAM_RED,
  4267. },
  4268. },
  4269. },
  4270. { -- wolves
  4271. name = "wolves",
  4272. spawn = 115,
  4273. respawn = 50,
  4274. advise = false,
  4275. camps = {
  4276. {
  4277. name = "monsterCamp_2",
  4278. creeps = { { { name = "GiantWolf2.1.3" }, { name = "wolf2.1.1" }, { name = "wolf2.1.2" }, }, },
  4279. team = TEAM_BLUE,
  4280. },
  4281. {
  4282. name = "monsterCamp_8",
  4283. creeps = { { { name = "GiantWolf8.1.3" }, { name = "wolf8.1.1" }, { name = "wolf8.1.2" }, }, },
  4284. team = TEAM_RED,
  4285. },
  4286. },
  4287. },
  4288. { -- wraiths
  4289. name = "wraiths",
  4290. spawn = 115,
  4291. respawn = 50,
  4292. advise = false,
  4293. camps = {
  4294. {
  4295. name = "monsterCamp_3",
  4296. creeps = { { { name = "Wraith3.1.3" }, { name = "LesserWraith3.1.1" }, { name = "LesserWraith3.1.2" }, { name = "LesserWraith3.1.4" }, }, },
  4297. team = TEAM_BLUE,
  4298. },
  4299. {
  4300. name = "monsterCamp_9",
  4301. creeps = { { { name = "Wraith9.1.3" }, { name = "LesserWraith9.1.1" }, { name = "LesserWraith9.1.2" }, { name = "LesserWraith9.1.4" }, }, },
  4302. team = TEAM_RED,
  4303. },
  4304. },
  4305. },
  4306. { -- GreatWraiths
  4307. name = "GreatWraiths",
  4308. spawn = 115,
  4309. respawn = 50,
  4310. advise = false,
  4311. camps = {
  4312. {
  4313. name = "monsterCamp_13",
  4314. creeps = { { { name = "GreatWraith13.1.1" }, }, },
  4315. team = TEAM_BLUE,
  4316. },
  4317. {
  4318. name = "monsterCamp_14",
  4319. creeps = { { { name = "GreatWraith14.1.1" }, }, },
  4320. team = TEAM_RED,
  4321. },
  4322. },
  4323. },
  4324. { -- Golems
  4325. name = "Golems",
  4326. spawn = 115,
  4327. respawn = 50,
  4328. advise = false,
  4329. camps = {
  4330. {
  4331. name = "monsterCamp_5",
  4332. creeps = { { { name = "Golem5.1.2" }, { name = "SmallGolem5.1.1" }, }, },
  4333. team = TEAM_BLUE,
  4334. },
  4335. {
  4336. name = "monsterCamp_11",
  4337. creeps = { { { name = "Golem11.1.2" }, { name = "SmallGolem11.1.1" }, }, },
  4338. team = TEAM_RED,
  4339. },
  4340. },
  4341. },
  4342. },
  4343. twistedTreeline = {
  4344. { -- Wraith
  4345. name = "Wraith",
  4346. spawn = 100,
  4347. respawn = 50,
  4348. advise = false,
  4349. camps = {
  4350. {
  4351. --pos = { x = 4414, y = 60, z = 5774 },
  4352. name = "monsterCamp_1",
  4353. creeps = {
  4354. { { name = "TT_NWraith1.1.1" }, { name = "TT_NWraith21.1.2" }, { name = "TT_NWraith21.1.3" }, },
  4355. },
  4356. team = TEAM_BLUE,
  4357. },
  4358. {
  4359. --pos = { x = 11008, y = 60, z = 5775 },
  4360. name = "monsterCamp_4",
  4361. creeps = {
  4362. { { name = "TT_NWraith4.1.1" }, { name = "TT_NWraith24.1.2" }, { name = "TT_NWraith24.1.3" }, },
  4363. },
  4364. team = TEAM_RED,
  4365. },
  4366. },
  4367. },
  4368. { -- Golems
  4369. name = "Golems",
  4370. respawn = 50,
  4371. spawn = 100,
  4372. advise = false,
  4373. camps = {
  4374. {
  4375. --pos = { x = 5088, y = 60, z = 8065 },
  4376. name = "monsterCamp_2",
  4377. creeps = {
  4378. { { name = "TT_NGolem2.1.1" }, { name = "TT_NGolem22.1.2" } },
  4379. },
  4380. team = TEAM_BLUE,
  4381. },
  4382. {
  4383. --pos = { x = 10341, y = 60, z = 8084 },
  4384. name = "monsterCamp_5",
  4385. creeps = {
  4386. { { name = "TT_NGolem5.1.1" }, { name = "TT_NGolem25.1.2" } },
  4387. },
  4388. team = TEAM_RED,
  4389. },
  4390. },
  4391. },
  4392. { -- Wolves
  4393. name = "Wolves",
  4394. respawn = 50,
  4395. spawn = 100,
  4396. advise = false,
  4397. camps = {
  4398. {
  4399. --pos = { x = 6148, y = 60, z = 5993 },
  4400. name = "monsterCamp_3",
  4401. creeps = { { { name = "TT_NWolf3.1.1" }, { name = "TT_NWolf23.1.2" }, { name = "TT_NWolf23.1.3" } }, },
  4402. team = TEAM_BLUE,
  4403. },
  4404. {
  4405. --pos = { x = 9239, y = 60, z = 6022 },
  4406. name = "monsterCamp_6",
  4407. creeps = { { { name = "TT_NWolf6.1.1" }, { name = "TT_NWolf26.1.2" }, { name = "TT_NWolf26.1.3" } }, },
  4408. team = TEAM_RED,
  4409. },
  4410. },
  4411. },
  4412. { -- Heal
  4413. name = "Heal",
  4414. spawn = 115,
  4415. respawn = 90,
  4416. advise = true,
  4417. camps = {
  4418. {
  4419. pos = { x = 7711, y = 60, z = 6722 },
  4420. name = "monsterCamp_7",
  4421. creeps = { { { name = "TT_Relic7.1.1" }, }, },
  4422. team = TEAM_NEUTRAL,
  4423. },
  4424. },
  4425. },
  4426. { -- Vilemaw
  4427. name = "Vilemaw",
  4428. spawn = 600,
  4429. respawn = 300,
  4430. advise = true,
  4431. camps = {
  4432. {
  4433. pos = { x = 7711, y = 60, z = 10080 },
  4434. name = "monsterCamp_8",
  4435. creeps = { { { name = "TT_Spiderboss8.1.1" }, }, },
  4436. team = TEAM_NEUTRAL,
  4437. },
  4438. },
  4439. },
  4440. },
  4441. crystalScar = {},
  4442. provingGrounds = {
  4443. { -- Heal
  4444. name = "Heal",
  4445. spawn = 190,
  4446. respawn = 40,
  4447. advise = false,
  4448. camps = {
  4449. {
  4450. pos = { x = 8922, y = 60, z = 7868 },
  4451. name = "monsterCamp_1",
  4452. creeps = { { { name = "OdinShieldRelic1.1.1" }, }, },
  4453. team = TEAM_NEUTRAL,
  4454. },
  4455. {
  4456. pos = { x = 7473, y = 60, z = 6617 },
  4457. name = "monsterCamp_2",
  4458. creeps = { { { name = "OdinShieldRelic2.1.1" }, }, },
  4459. team = TEAM_NEUTRAL,
  4460. },
  4461. {
  4462. pos = { x = 5929, y = 60, z = 5190 },
  4463. name = "monsterCamp_3",
  4464. creeps = { { { name = "OdinShieldRelic3.1.1" }, }, },
  4465. team = TEAM_NEUTRAL,
  4466. },
  4467. {
  4468. pos = { x = 4751, y = 60, z = 3901 },
  4469. name = "monsterCamp_4",
  4470. creeps = { { { name = "OdinShieldRelic4.1.1" }, }, },
  4471. team = TEAM_NEUTRAL,
  4472. },
  4473. },
  4474. },
  4475. },
  4476. howlingAbyss = {
  4477. { -- Heal
  4478. name = "Heal",
  4479. spawn = 190,
  4480. respawn = 40,
  4481. advise = false,
  4482. camps = {
  4483. {
  4484. pos = { x = 8922, y = 60, z = 7868 },
  4485. name = "monsterCamp_1",
  4486. creeps = { { { name = "HA_AP_HealthRelic1.1.1" }, }, },
  4487. team = TEAM_NEUTRAL,
  4488. },
  4489. {
  4490. pos = { x = 7473, y = 60, z = 6617 },
  4491. name = "monsterCamp_2",
  4492. creeps = { { { name = "HA_AP_HealthRelic2.1.1" }, }, },
  4493. team = TEAM_NEUTRAL,
  4494. },
  4495. {
  4496. pos = { x = 5929, y = 60, z = 5190 },
  4497. name = "monsterCamp_3",
  4498. creeps = { { { name = "HA_AP_HealthRelic3.1.1" }, }, },
  4499. team = TEAM_NEUTRAL,
  4500. },
  4501. {
  4502. pos = { x = 4751, y = 60, z = 3901 },
  4503. name = "monsterCamp_4",
  4504. creeps = { { { name = "HA_AP_HealthRelic4.1.1" }, }, },
  4505. team = TEAM_NEUTRAL,
  4506. },
  4507. },
  4508. },
  4509. },
  4510. }
  4511.  
  4512. altars = {
  4513. summonerRift = {},
  4514. twistedTreeline = {
  4515. {
  4516. name = "Left Altar",
  4517. spawn = 180,
  4518. respawn = 85,
  4519. advise = true,
  4520. objectName = "TT_Buffplat_L",
  4521. locked = false,
  4522. lockNames = {"TT_Lock_Blue_L.troy", "TT_Lock_Purple_L.troy", "TT_Lock_Neutral_L.troy", },
  4523. unlockNames = {"TT_Unlock_Blue_L.troy", "TT_Unlock_purple_L.troy", "TT_Unlock_Neutral_L.troy", },
  4524. },
  4525. {
  4526. name = "Right Altar",
  4527. spawn = 180,
  4528. respawn = 85,
  4529. advise = true,
  4530. objectName = "TT_Buffplat_R",
  4531. locked = false,
  4532. lockNames = {"TT_Lock_Blue_R.troy", "TT_Lock_Purple_R.troy", "TT_Lock_Neutral_R.troy", },
  4533. unlockNames = {"TT_Unlock_Blue_R.troy", "TT_Unlock_purple_R.troy", "TT_Unlock_Neutral_R.troy", },
  4534. },
  4535. },
  4536. crystalScar = {},
  4537. provingGrounds = {},
  4538. howlingAbyss = {},
  4539. }
  4540.  
  4541. relics = {
  4542. summonerRift = {},
  4543. twistedTreeline = {},
  4544. crystalScar = {
  4545. {
  4546. pos = { x = 5500, y = 60, z = 6500 },
  4547. name = "Relic",
  4548. team = TEAM_BLUE,
  4549. spawn = 180,
  4550. respawn = 180,
  4551. advise = true,
  4552. locked = false,
  4553. precenceObject = (player.team == TEAM_BLUE and "Odin_Prism_Green.troy" or "Odin_Prism_Red.troy"),
  4554. },
  4555. {
  4556. pos = { x = 7550, y = 60, z = 6500 },
  4557. name = "Relic",
  4558. team = TEAM_RED,
  4559. spawn = 180,
  4560. respawn = 180,
  4561. advise = true,
  4562. locked = false,
  4563. precenceObject = (player.team == TEAM_RED and "Odin_Prism_Green.troy" or "Odin_Prism_Red.troy"),
  4564. },
  4565. },
  4566. provingGrounds = {},
  4567. howlingAbyss = {},
  4568. }
  4569.  
  4570. heals = {
  4571. summonerRift = {},
  4572. twistedTreeline = {},
  4573. provingGrounds = {},
  4574. crystalScar = {
  4575. {
  4576. name = "Heal",
  4577. objectName = "OdinShieldRelic",
  4578. respawn = 30,
  4579. objects = {},
  4580. },
  4581. },
  4582. howlingAbyss = {},
  4583. }
  4584.  
  4585. inhibitors = {}
  4586.  
  4587. function addCampCreepAltar(object)
  4588. if object ~= nil and object.name ~= nil then
  4589. if object.name == "Order_Inhibit_Gem.troy" or object.name == "Chaos_Inhibit_Gem.troy" then
  4590. table.insert(inhibitors, { object = object, destroyed = false, lefttime = 0, x = object.x, y = object.y, z = object.z, minimap = GetMinimap(object), textTick = 0 })
  4591. return
  4592. elseif object.name == "Order_Inhibit_Crystal_Shatter.troy" or object.name == "Chaos_Inhibit_Crystal_Shatter.troy" then
  4593. for i,inhibitor in pairs(inhibitors) do
  4594. if GetDistance(inhibitor, object) < 200 then
  4595. local tick = GetTickCount()
  4596. inhibitor.dtime = tick
  4597. inhibitor.rtime = tick + 300000
  4598. inhibitor.ltime = 300000
  4599. inhibitor.destroyed = true
  4600. end
  4601. end
  4602. return
  4603. end
  4604. for i,monster in pairs(monsters[mapName]) do
  4605. for j,camp in pairs(monster.camps) do
  4606. if camp.name == object.name then
  4607. camp.object = object
  4608. return
  4609. end
  4610. if object.type == "obj_AI_Minion" then
  4611. for k,creepPack in ipairs(camp.creeps) do
  4612. for l,creep in ipairs(creepPack) do
  4613. if object.name == creep.name then
  4614. creep.object = object
  4615. return
  4616. end
  4617. end
  4618. end
  4619. end
  4620. end
  4621. end
  4622. for i,altar in pairs(altars[mapName]) do
  4623. if altar.objectName == object.name then
  4624. altar.object = object
  4625. altar.textTick = 0
  4626. altar.minimap = GetMinimap(object)
  4627. end
  4628. if altar.locked then
  4629. for j,lockName in pairs(altar.unlockNames) do
  4630. if lockName == object.name then
  4631. altar.locked = false
  4632. return
  4633. end
  4634. end
  4635. else
  4636. for j,lockName in pairs(altar.lockNames) do
  4637. if lockName == object.name then
  4638. altar.drawColor = 0
  4639. altar.drawText = ""
  4640. altar.locked = true
  4641. altar.advised = false
  4642. altar.advisedBefore = false
  4643. return
  4644. end
  4645. end
  4646. end
  4647. end
  4648. for i,relic in pairs(relics[mapName]) do
  4649. if relic.precenceObject == object.name then
  4650. relic.object = object
  4651. relic.textTick = 0
  4652. relic.locked = false
  4653. return
  4654. end
  4655. end
  4656. for i,heal in pairs(heals[mapName]) do
  4657. if heal.objectName == object.name then
  4658. for j,healObject in pairs(heal.objects) do
  4659. if (GetDistance(healObject, object) < 50) then
  4660. healObject.object = object
  4661. healObject.found = true
  4662. healObject.locked = false
  4663. return
  4664. end
  4665. end
  4666. local k = #heal.objects + 1
  4667. heals[mapName][i].objects[k] = {found = true, locked = false, object = object, x = object.x, y = object.y, z = object.z, minimap = GetMinimap(object), textTick = 0,}
  4668. return
  4669. end
  4670. end
  4671. end
  4672. end
  4673.  
  4674. function removeCreep(object)
  4675. if object ~= nil and object.type == "obj_AI_Minion" and object.name ~= nil then
  4676. for i,monster in pairs(monsters[mapName]) do
  4677. for j,camp in pairs(monster.camps) do
  4678. for k,creepPack in ipairs(camp.creeps) do
  4679. for l,creep in ipairs(creepPack) do
  4680. if object.name == creep.name then
  4681. creep.object = nil
  4682. return
  4683. end
  4684. end
  4685. end
  4686. end
  4687. end
  4688. end
  4689. end
  4690.  
  4691. function OnLoad()
  4692. mapName = GetGame().map.shortName
  4693. if monsters[mapName] == nil then
  4694. mapName = nil
  4695. monsters = nil
  4696. addCampCreepAltar = nil
  4697. removeCreep = nil
  4698. addAltarObject = nil
  4699. return
  4700. else
  4701. startTick = GetGame().tick
  4702. -- CONFIG
  4703. MMTConfig = scriptConfig("Timers 0.2", "minimapTimers")
  4704. MMTConfig:addParam("pingOnRespawn", "Ping on respawn", SCRIPT_PARAM_ONOFF, true) -- ping location on respawn
  4705. MMTConfig:addParam("pingOnRespawnBefore", "Ping before respawn", SCRIPT_PARAM_ONOFF, true) -- ping location before respawn
  4706. MMTConfig:addParam("textOnRespawn", "Chat on respawn", SCRIPT_PARAM_ONOFF, true) -- print chat text on respawn
  4707. MMTConfig:addParam("textOnRespawnBefore", "Chat before respawn", SCRIPT_PARAM_ONOFF, true) -- print chat text before respawn
  4708. MMTConfig:addParam("adviceEnemyMonsters", "Advice enemy monster", SCRIPT_PARAM_ONOFF, true) -- advice enemy monster, or just our monsters
  4709. MMTConfig:addParam("adviceBefore", "Advice Time", SCRIPT_PARAM_SLICE, 20, 1, 40, 0) -- time in second to advice before monster respawn
  4710. MMTConfig:addParam("textOnMap", "Text on map", SCRIPT_PARAM_ONOFF, true) -- time in second on map
  4711. for i,monster in pairs(monsters[mapName]) do
  4712. monster.isSeen = false
  4713. for j,camp in pairs(monster.camps) do
  4714. camp.enemyTeam = (camp.team == TEAM_ENEMY)
  4715. camp.textTick = 0
  4716. camp.status = 0
  4717. camp.drawText = ""
  4718. camp.drawColor = 0xFF00FF00
  4719. end
  4720. end
  4721. for i = 1, objManager.maxObjects do
  4722. local object = objManager:getObject(i)
  4723. if object ~= nil then
  4724. addCampCreepAltar(object)
  4725. end
  4726. end
  4727. AddCreateObjCallback(addCampCreepAltar)
  4728. AddDeleteObjCallback(removeCreep)
  4729. end
  4730. end
  4731. function OnTick()
  4732. if GetGame().isOver then return end
  4733. local GameTime = (GetTickCount()-startTick) / 1000
  4734. local monsterCount = 0
  4735. for i,monster in pairs(monsters[mapName]) do
  4736. for j,camp in pairs(monster.camps) do
  4737. local campStatus = 0
  4738. for k,creepPack in ipairs(camp.creeps) do
  4739. for l,creep in ipairs(creepPack) do
  4740. if creep.object ~= nil and creep.object.valid and creep.object.dead == false then
  4741. if l == 1 then
  4742. campStatus = 1
  4743. elseif campStatus ~= 1 then
  4744. campStatus = 2
  4745. end
  4746. end
  4747. end
  4748. end
  4749. --[[ Not used until camp.showOnMinimap work
  4750. if (camp.object and camp.object.showOnMinimap == 1) then
  4751. -- camp is here
  4752. if campStatus == 0 then campStatus = 3 end
  4753. elseif camp.status == 3 then -- empty not seen when killed
  4754. campStatus = 5
  4755. elseif campStatus == 0 and (camp.status == 1 or camp.status == 2) then
  4756. campStatus = 4
  4757. camp.deathTick = tick
  4758. end
  4759. ]]
  4760. -- temp fix until camp.showOnMinimap work
  4761. -- not so good
  4762. if camp.object ~= nil and camp.object.valid then
  4763. camp.minimap = GetMinimap(camp.object)
  4764. if campStatus == 0 then
  4765. if (camp.status == 1 or camp.status == 2) then
  4766. campStatus = 4
  4767. camp.advisedBefore = false
  4768. camp.advised = false
  4769. camp.respawnTime = math.ceil(GameTime) + monster.respawn
  4770. camp.respawnText = (camp.enemyTeam and "Enemy " or "")..monster.name.." respawn at "..TimerText(camp.respawnTime)
  4771. elseif (camp.status == 4) then
  4772. campStatus = 4
  4773. else
  4774. campStatus = 3
  4775. end
  4776. end
  4777. elseif camp.pos ~= nil then
  4778. camp.minimap = GetMinimap(camp.pos)
  4779. if (GameTime < monster.spawn) then
  4780. campStatus = 4
  4781. camp.advisedBefore = true
  4782. camp.advised = true
  4783. camp.respawnTime = monster.spawn
  4784. camp.respawnText = (camp.enemyTeam and "Enemy " or "")..monster.name.." spawn at "..TimerText(camp.respawnTime)
  4785. end
  4786. end
  4787. if camp.status ~= campStatus or campStatus == 4 then
  4788. if campStatus ~= 0 then
  4789. if monster.isSeen == false then monster.isSeen = true end
  4790. camp.status = campStatus
  4791. end
  4792. if camp.status == 1 then -- ready
  4793. camp.drawText = "ready"
  4794. camp.drawColor = 0xFF00FF00
  4795. elseif camp.status == 2 then -- ready, master creeps dead
  4796. camp.drawText = "stolen"
  4797. camp.drawColor = 0xFFFF0000
  4798. elseif camp.status == 3 then -- ready, not creeps shown
  4799. camp.drawText = " ?"
  4800. camp.drawColor = 0xFF00FF00
  4801. elseif camp.status == 4 then -- empty from creeps kill
  4802. local secondLeft = math.ceil(math.max(0, camp.respawnTime - GameTime))
  4803. if monster.advise == true and (MMTConfig.adviceEnemyMonsters == true or camp.enemyTeam == false) then
  4804. if secondLeft == 0 and camp.advised == false then
  4805. camp.advised = true
  4806. if MMTConfig.textOnRespawn then PrintChat("<font color='#00FFCC'>"..(camp.enemyTeam and "Enemy " or "")..monster.name.."</font><font color='#FFAA00'> has respawned</font>") end
  4807. if MMTConfig.pingOnRespawn then PingSignal(PING_FALLBACK,camp.object.x,camp.object.y,camp.object.z,2) end
  4808. elseif secondLeft <= MMTConfig.adviceBefore and camp.advisedBefore == false then
  4809. camp.advisedBefore = true
  4810. if MMTConfig.textOnRespawnBefore then PrintChat("<font color='#00FFCC'>"..(camp.enemyTeam and "Enemy " or "")..monster.name.."</font><font color='#FFAA00'> will respawn in </font><font color='#00FFCC'>"..secondLeft.." sec</font>") end
  4811. if MMTConfig.pingOnRespawnBefore then PingSignal(PING_FALLBACK,camp.object.x,camp.object.y,camp.object.z,2) end
  4812. end
  4813. end
  4814. -- temp fix until camp.showOnMinimap work
  4815. if secondLeft == 0 then
  4816. camp.status = 0
  4817. end
  4818. camp.drawText = " "..TimerText(secondLeft)
  4819. camp.drawColor = 0xFFFFFF00
  4820. elseif camp.status == 5 then -- camp found empty (not using yet)
  4821. camp.drawText = " -"
  4822. camp.drawColor = 0xFFFF0000
  4823. end
  4824. end
  4825. -- shift click
  4826. if IsKeyDown(16) and camp.status == 4 then
  4827. camp.drawText = " "..(camp.respawnTime ~= nil and TimerText(camp.respawnTime) or "")
  4828. camp.textUnder = (CursorIsUnder(camp.minimap.x - 9, camp.minimap.y - 5, 20, 8))
  4829. else
  4830. camp.textUnder = false
  4831. end
  4832. if MMTConfig.textOnMap and camp.status == 4 and camp.object and camp.object.valid and camp.textTick < GetTickCount() and camp.floatText ~= camp.drawText then
  4833. camp.floatText = camp.drawText
  4834. camp.textTick = GetTickCount() + 1000
  4835. PrintFloatText(camp.object,6,camp.floatText)
  4836. end
  4837. end
  4838. end
  4839.  
  4840. -- altars
  4841. for i,altar in pairs(altars[mapName]) do
  4842. if altar.object and altar.object.valid then
  4843. if altar.locked then
  4844. if GameTime < altar.spawn then
  4845. altar.secondLeft = math.ceil(math.max(0, altar.spawn - GameTime))
  4846. else
  4847. local tmpTime = ((altar.object.mana > 39600) and (altar.object.mana - 39900) / 20100 or (39600 - altar.object.mana) / 20100)
  4848. altar.secondLeft = math.ceil(math.max(0, tmpTime * altar.respawn))
  4849. end
  4850. altar.unlockTime = math.ceil(GameTime + altar.secondLeft)
  4851. altar.unlockText = altar.name.." unlock at "..TimerText(altar.unlockTime)
  4852. altar.drawColor = 0xFFFFFF00
  4853. if altar.advise == true then
  4854. if altar.secondLeft == 0 and altar.advised == false then
  4855. altar.advised = true
  4856. if MMTConfig.textOnRespawn then PrintChat("<font color='#00FFCC'>"..altar.name.."</font><font color='#FFAA00'> is unlocked</font>") end
  4857. if MMTConfig.pingOnRespawn then PingSignal(PING_FALLBACK,altar.object.x,altar.object.y,altar.object.z,2) end
  4858. elseif altar.secondLeft <= MMTConfig.adviceBefore and altar.advisedBefore == false then
  4859. altar.advisedBefore = true
  4860. if MMTConfig.textOnRespawnBefore then PrintChat("<font color='#00FFCC'>"..altar.name.."</font><font color='#FFAA00'> will unlock in </font><font color='#00FFCC'>"..altar.secondLeft.." sec</font>") end
  4861. if MMTConfig.pingOnRespawnBefore then PingSignal(PING_FALLBACK,altar.object.x,altar.object.y,altar.object.z,2) end
  4862. end
  4863. end
  4864. -- shift click
  4865. if IsKeyDown(16) then
  4866. altar.drawText = " "..(altar.unlockTime ~= nil and TimerText(altar.unlockTime) or "")
  4867. altar.textUnder = (CursorIsUnder(altar.minimap.x - 9, altar.minimap.y - 5, 20, 8))
  4868. else
  4869. altar.drawText = " "..(altar.secondLeft ~= nil and TimerText(altar.secondLeft) or "")
  4870. altar.textUnder = false
  4871. end
  4872. if MMTConfig.textOnMap and altar.object and altar.object.valid and altar.textTick < GetTickCount() and altar.floatText ~= altar.drawText then
  4873. altar.floatText = altar.drawText
  4874. altar.textTick = GetTickCount() + 1000
  4875. PrintFloatText(altar.object,6,altar.floatText)
  4876. end
  4877. end
  4878. end
  4879. end
  4880.  
  4881. -- relics
  4882. for i,relic in pairs(relics[mapName]) do
  4883. if (not relic.locked and (not relic.object or not relic.object.valid or relic.dead)) then
  4884. if GameTime < relic.spawn then
  4885. relic.unlockTime = relic.spawn - GameTime
  4886. else
  4887. relic.unlockTime = math.ceil(GameTime + relic.respawn)
  4888. end
  4889. relic.advised = false
  4890. relic.advisedBefore = false
  4891. relic.drawText = ""
  4892. relic.unlockText = relic.name.." respawn at "..TimerText(relic.unlockTime)
  4893. relic.drawColor = 4288610048
  4894. --FF9EFF00
  4895. relic.minimap = GetMinimap(relic.pos)
  4896. relic.locked = true
  4897. end
  4898. if relic.locked then
  4899. relic.secondLeft = math.ceil(math.max(0, relic.unlockTime - GameTime))
  4900. if relic.advise == true then
  4901. if relic.secondLeft == 0 and relic.advised == false then
  4902. relic.advised = true
  4903. if MMTConfig.textOnRespawn then PrintChat("<font color='#00FFCC'>"..relic.name.."</font><font color='#FFAA00'> has respawned</font>") end
  4904. if MMTConfig.pingOnRespawn then PingSignal(PING_FALLBACK,relic.pos.x,relic.pos.y,relic.pos.z,2) end
  4905. elseif relic.secondLeft <= MMTConfig.adviceBefore and relic.advisedBefore == false then
  4906. relic.advisedBefore = true
  4907. if MMTConfig.textOnRespawnBefore then PrintChat("<font color='#00FFCC'>"..relic.name.."</font><font color='#FFAA00'> will respawn in </font><font color='#00FFCC'>"..relic.secondLeft.." sec</font>") end
  4908. if MMTConfig.pingOnRespawnBefore then PingSignal(PING_FALLBACK,relic.pos.x,relic.pos.y,relic.pos.z,2) end
  4909. end
  4910. end
  4911. -- shift click
  4912. if IsKeyDown(16) then
  4913. relic.drawText = " "..(relic.unlockTime ~= nil and TimerText(relic.unlockTime) or "")
  4914. relic.textUnder = (CursorIsUnder(relic.minimap.x - 9, relic.minimap.y - 5, 20, 8))
  4915. else
  4916. relic.drawText = " "..(relic.secondLeft ~= nil and TimerText(relic.secondLeft) or "")
  4917. relic.textUnder = false
  4918. end
  4919. end
  4920. end
  4921.  
  4922. for i,heal in pairs(heals[mapName]) do
  4923. for j,healObject in pairs(heal.objects) do
  4924. if (not healObject.locked and healObject.found and (not healObject.object or not healObject.object.valid or healObject.object.dead)) then
  4925. healObject.drawColor = 0xFF00FF04
  4926. healObject.unlockTime = math.ceil(GameTime + heal.respawn)
  4927. healObject.drawText = ""
  4928. healObject.found = false
  4929. healObject.locked = true
  4930. end
  4931. if healObject.locked then
  4932. -- shift click
  4933. local secondLeft = math.ceil(math.max(0, healObject.unlockTime - GameTime))
  4934. if IsKeyDown(16) then
  4935. healObject.drawText = " "..(healObject.unlockTime ~= nil and TimerText(healObject.unlockTime) or "")
  4936. healObject.textUnder = (CursorIsUnder(healObject.minimap.x - 9, healObject.minimap.y - 5, 20, 8))
  4937. else
  4938. healObject.drawText = " "..(secondLeft ~= nil and TimerText(secondLeft) or "")
  4939. healObject.textUnder = false
  4940. end
  4941. if secondLeft == 0 then healObject.locked = false end
  4942. end
  4943. end
  4944. end
  4945. -- inhib
  4946. for i,inhibitor in pairs(inhibitors) do
  4947. if inhibitor.destroyed then
  4948. local tick = GetTickCount()
  4949. if inhibitor.rtime < tick then
  4950. inhibitor.destroyed = false
  4951. else
  4952. inhibitor.ltime = (inhibitor.rtime - GetTickCount()) / 1000;
  4953. inhibitor.drawText = TimerText(inhibitor.ltime)
  4954. --inhibitor.drawText = (IsKeyDown(16) and TimerText(inhibitor.rtime) or TimerText(inhibitor.rtime))
  4955. if MMTConfig.textOnMap and inhibitor.textTick < tick then
  4956. inhibitor.textTick = tick + 1000
  4957. PrintFloatText(inhibitor.object,6,inhibitor.drawText)
  4958. end
  4959. end
  4960. end
  4961. end
  4962. end
  4963.  
  4964. function OnDraw()
  4965. if GetGame().isOver then return end
  4966. for i,monster in pairs(monsters[mapName]) do
  4967. if monster.isSeen == true then
  4968. for j,camp in pairs(monster.camps) do
  4969. if camp.status == 2 then
  4970. DrawText("X",16,camp.minimap.x - 4, camp.minimap.y - 5, camp.drawColor)
  4971. elseif camp.status == 4 then
  4972. DrawText(camp.drawText,16,camp.minimap.x - 9, camp.minimap.y - 5, camp.drawColor)
  4973. end
  4974. end
  4975. end
  4976. end
  4977. for i,altar in pairs(altars[mapName]) do
  4978. if altar.locked then
  4979. DrawText(altar.drawText,16,altar.minimap.x - 9, altar.minimap.y - 5, altar.drawColor)
  4980. end
  4981. end
  4982. for i,relic in pairs(relics[mapName]) do
  4983. if relic.locked then
  4984. DrawText(relic.drawText,16,relic.minimap.x - 9, relic.minimap.y - 5, relic.drawColor)
  4985. end
  4986. end
  4987. for i,heal in pairs(heals[mapName]) do
  4988. for j,healObject in pairs(heal.objects) do
  4989. if healObject.locked then
  4990. DrawText(healObject.drawText,16,healObject.minimap.x - 9, healObject.minimap.y - 5, healObject.drawColor)
  4991. end
  4992. end
  4993. end
  4994. for i,inhibitor in pairs(inhibitors) do
  4995. if inhibitor.destroyed == true then
  4996. DrawText(inhibitor.drawText,16,inhibitor.minimap.x - 9, inhibitor.minimap.y - 5, 0xFFFFFF00)
  4997. end
  4998. end
  4999. end
  5000.  
  5001. function OnWndMsg(msg,key)
  5002. if msg == WM_LBUTTONDOWN and IsKeyDown(16) then
  5003. for i,monster in pairs(monsters[mapName]) do
  5004. if monster.isSeen == true then
  5005. if monster.iconUnder then
  5006. monster.advise = not monster.advise
  5007. break
  5008. else
  5009. for j,camp in pairs(monster.camps) do
  5010. if camp.textUnder then
  5011. if camp.respawnText ~= nil then SendChat(""..camp.respawnText) end
  5012. break
  5013. end
  5014. end
  5015. end
  5016. end
  5017. end
  5018. for i,altar in pairs(altars[mapName]) do
  5019. if altar.locked and altar.textUnder then
  5020. if altar.unlockText ~= nil then SendChat(""..altar.unlockText) end
  5021. break
  5022. end
  5023. end
  5024. end
  5025. end
  5026. end
Advertisement
Add Comment
Please, Sign In to add comment