Advertisement
Guest User

plinko war

a guest
Dec 27th, 2019
121
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ------ BEGIN SCRIPT ------
  2. -- Copy and Paste this text into an empty text file, and save it as
  3. -- YOURTITLEHERE.lua, in your Data/Missions/Training/ folder.
  4.  
  5. HedgewarsScriptLoad("/Scripts/Locale.lua")
  6. HedgewarsScriptLoad("/Scripts/Tracker.lua")
  7.  
  8. local hhs = {}
  9.  
  10. local wepArray = {
  11. amBazooka, amBee, amMortar, amDrill, amSnowball,
  12. amGrenade, amClusterBomb, amMolotov, amWatermelon, amHellishBomb, amGasBomb,
  13. amShotgun, amDEagle, amSniperRifle, amSineGun, amLandGun, amIceGun,
  14. amFirePunch, amWhip, amBaseballBat, amKamikaze, amSeduction, amHammer,
  15. amMine, amDynamite, amCake, amBallgun, amRCPlane, amSMine, amAirMine,
  16. amAirAttack, amMineStrike, amDrillStrike, amNapalm, amPiano, amBirdy,
  17. amBlowTorch, amPickHammer, amGirder, amRubber, amPortalGun,
  18. amRope, amParachute, amTeleport, amJetpack,
  19. amInvulnerable, amLaserSight, amVampiric,
  20. amLowGravity, amExtraDamage, amExtraTime, amResurrector, amTardis, amSwitch
  21. }
  22.  
  23. local crateArray = {
  24. amBazooka, amBee, amMortar, amDrill,
  25. amGrenade, amClusterBomb, amMolotov,
  26. amShotgun, amDEagle, amSniperRifle, amSineGun, amLandGun, amIceGun,
  27. amFirePunch, amWhip,
  28. amMine, amDynamite, amCake, amBallgun, amRCPlane, amSMine, amAirMine,
  29. amAirAttack, amMineStrike, amDrillStrike, amNapalm,
  30. amBlowTorch, amPickHammer, amRubber,
  31. amParachute, amTeleport,
  32. amInvulnerable, amLaserSight, amVampiric
  33. }
  34.  
  35. function onGameInit()
  36.  
  37. ClearGameFlags()
  38. EnableGameFlags(gfPerHogAmmo)
  39. Map = "BambooPlinko"
  40. Theme = "Golf"
  41. TurnTime = 45000
  42. Explosives = 0
  43. MinesNum = 0
  44. CaseFreq = 0
  45. Delay = 100
  46. HealthCaseProb = 35
  47. HealthCaseAmount = 25
  48. DamagePercent = 100
  49. MinesTime = 3000
  50. MineDudPercent = 0
  51. SuddenDeathTurns = 50
  52. WaterRise = 0
  53. HealthDecrease = 1
  54.  
  55. ------ TEAM LIST ------
  56.  
  57. AddTeam("The Police", "0xff4980c1", "Statue", "Castle", "British", "cm_star")
  58. hhs[1] = AddHog("Harris", 0, 1, "policecap")
  59. SetGearPosition(hhs[1], 1110, 817)
  60. setGearValue(hhs[1], "tag", "failure")
  61.  
  62. AddTeam("Clowns", "0xff1de6ba", "Rubberduck", "Castle", "Mobster", "cm_birdy")
  63. hhs[2] = AddHog("Patches", 1, 70, "WhySoSerious")
  64. SetGearPosition(hhs[2], 840, 691)
  65. hhs[3] = AddHog("Bingo", 1, 70, "clown-crossed")
  66. SetGearPosition(hhs[3], 481, 451)
  67. hhs[4] = AddHog("Chester", 1, 70, "Joker")
  68. SetGearPosition(hhs[4], 535, 697)
  69. hhs[5] = AddHog("Loopy", 1, 70, "clown-copper")
  70. SetGearPosition(hhs[5], 258, 692)
  71. hhs[6] = AddHog("Heckles", 1, 70, "clown")
  72. SetGearPosition(hhs[6], 1218, 212)
  73. hhs[7] = AddHog("Buster", 1, 70, "clown-crossed")
  74. SetGearPosition(hhs[7], 728, 451)
  75. hhs[8] = AddHog("Baggy", 1, 70, "WhySoSerious")
  76. SetGearPosition(hhs[8], 840, 91)
  77. hhs[9] = AddHog("Bozo", 1, 70, "Joker")
  78. SetGearPosition(hhs[9], 366, 91)
  79.  
  80. AddTeam("Street Fighters", "0xff1de6ba", "dragonball", "Castle", "Surfer", "cm_balrog")
  81. hhs[10] = AddHog("Balrog", 1, 80, "sf_balrog")
  82. SetGearPosition(hhs[10], 1681, 451)
  83. hhs[11] = AddHog("Blanka", 1, 80, "sf_blanka")
  84. SetGearPosition(hhs[11], 729, 571)
  85. hhs[12] = AddHog("Chunli", 1, 80, "sf_chunli")
  86. SetGearPosition(hhs[12], 830, 213)
  87. hhs[13] = AddHog("Guile", 1, 80, "sf_guile")
  88. SetGearPosition(hhs[13], 1914, 93)
  89. hhs[14] = AddHog("Honda", 1, 80, "sf_honda")
  90. SetGearPosition(hhs[14], 847, 571)
  91. hhs[15] = AddHog("Ken", 1, 80, "sf_ken")
  92. SetGearPosition(hhs[15], 1217, 91)
  93. hhs[16] = AddHog("Ryu", 1, 80, "sf_ryu")
  94. SetGearPosition(hhs[16], 1794, 693)
  95. hhs[17] = AddHog("Vega", 1, 80, "sf_vega")
  96. SetGearPosition(hhs[17], 1452, 91)
  97.  
  98. AddTeam("Cybernetic Empire", "0xff1de6ba", "Grave", "Castle", "Robot", "cm_binary")
  99. hhs[18] = AddHog("Unit 485", 1, 100, "cyborg1")
  100. SetGearPosition(hhs[18], 949, 333)
  101. hhs[19] = AddHog("Unit 189", 1, 100, "cyborg2")
  102. SetGearPosition(hhs[19], 1787, 454)
  103. hhs[20] = AddHog("Unit 883", 1, 1000, "cyborg2")
  104. SetGearPosition(hhs[20], 474, 573)
  105. setGearValue(hhs[20], "tag", "victory")
  106. hhs[21] = AddHog("Unit 638", 1, 100, "cyborg2")
  107. SetGearPosition(hhs[21], 1204, 331)
  108. hhs[22] = AddHog("Unit 709", 1, 100, "cyborg1")
  109. SetGearPosition(hhs[22], 586, 575)
  110. hhs[23] = AddHog("Unit 333", 1, 100, "cyborg1")
  111. SetGearPosition(hhs[23], 714, 213)
  112. hhs[24] = AddHog("Unit 527", 1, 100, "cyborg1")
  113. SetGearPosition(hhs[24], 246, 211)
  114. hhs[25] = AddHog("Unit 234", 1, 100, "cyborg2")
  115. SetGearPosition(hhs[25], 657, 696)
  116. end
  117.  
  118. function LoadHogWeapons()
  119.  
  120. AddAmmo(hhs[1], amBazooka, 100)
  121. AddAmmo(hhs[1], amGrenade, 100)
  122. AddAmmo(hhs[1], amShotgun, 100)
  123. AddAmmo(hhs[1], amWhip, 100)
  124.  
  125. AddAmmo(hhs[2], amGasBomb, 100)
  126. AddAmmo(hhs[2], amBaseballBat, 100)
  127. AddAmmo(hhs[2], amKamikaze, 1)
  128. AddAmmo(hhs[2], amBallgun, 1)
  129.  
  130. AddAmmo(hhs[3], amGasBomb, 100)
  131. AddAmmo(hhs[3], amBaseballBat, 100)
  132. AddAmmo(hhs[3], amKamikaze, 1)
  133. AddAmmo(hhs[3], amBallgun, 1)
  134.  
  135. AddAmmo(hhs[4], amGasBomb, 100)
  136. AddAmmo(hhs[4], amBaseballBat, 100)
  137. AddAmmo(hhs[4], amKamikaze, 1)
  138. AddAmmo(hhs[4], amBallgun, 1)
  139.  
  140. AddAmmo(hhs[5], amGasBomb, 100)
  141. AddAmmo(hhs[5], amBaseballBat, 100)
  142. AddAmmo(hhs[5], amKamikaze, 1)
  143. AddAmmo(hhs[5], amBallgun, 1)
  144.  
  145. AddAmmo(hhs[6], amGasBomb, 100)
  146. AddAmmo(hhs[6], amBaseballBat, 100)
  147. AddAmmo(hhs[6], amKamikaze, 1)
  148. AddAmmo(hhs[6], amBallgun, 1)
  149.  
  150. AddAmmo(hhs[7], amGasBomb, 100)
  151. AddAmmo(hhs[7], amBaseballBat, 100)
  152. AddAmmo(hhs[7], amKamikaze, 1)
  153. AddAmmo(hhs[7], amBallgun, 1)
  154.  
  155. AddAmmo(hhs[8], amGasBomb, 100)
  156. AddAmmo(hhs[8], amBaseballBat, 100)
  157. AddAmmo(hhs[8], amKamikaze, 1)
  158. AddAmmo(hhs[8], amBallgun, 1)
  159.  
  160. AddAmmo(hhs[9], amGasBomb, 100)
  161. AddAmmo(hhs[9], amBaseballBat, 100)
  162. AddAmmo(hhs[9], amKamikaze, 1)
  163. AddAmmo(hhs[9], amBallgun, 1)
  164.  
  165. AddAmmo(hhs[10], amBee, 2)
  166. AddAmmo(hhs[10], amSineGun, 100)
  167. AddAmmo(hhs[10], amIceGun, 2)
  168. AddAmmo(hhs[10], amLowGravity, 100)
  169.  
  170. AddAmmo(hhs[11], amBee, 2)
  171. AddAmmo(hhs[11], amSineGun, 100)
  172. AddAmmo(hhs[11], amIceGun, 2)
  173. AddAmmo(hhs[11], amLowGravity, 100)
  174.  
  175. AddAmmo(hhs[12], amBee, 2)
  176. AddAmmo(hhs[12], amSineGun, 100)
  177. AddAmmo(hhs[12], amIceGun, 2)
  178. AddAmmo(hhs[12], amLowGravity, 100)
  179.  
  180. AddAmmo(hhs[13], amBee, 2)
  181. AddAmmo(hhs[13], amSineGun, 100)
  182. AddAmmo(hhs[13], amIceGun, 2)
  183. AddAmmo(hhs[13], amLowGravity, 100)
  184.  
  185. AddAmmo(hhs[14], amBee, 2)
  186. AddAmmo(hhs[14], amSineGun, 100)
  187. AddAmmo(hhs[14], amIceGun, 2)
  188. AddAmmo(hhs[14], amLowGravity, 100)
  189.  
  190. AddAmmo(hhs[15], amBee, 2)
  191. AddAmmo(hhs[15], amSineGun, 100)
  192. AddAmmo(hhs[15], amIceGun, 2)
  193. AddAmmo(hhs[15], amLowGravity, 100)
  194.  
  195. AddAmmo(hhs[16], amBee, 2)
  196. AddAmmo(hhs[16], amSineGun, 100)
  197. AddAmmo(hhs[16], amIceGun, 2)
  198. AddAmmo(hhs[16], amLowGravity, 100)
  199.  
  200. AddAmmo(hhs[17], amBee, 2)
  201. AddAmmo(hhs[17], amSineGun, 100)
  202. AddAmmo(hhs[17], amIceGun, 2)
  203. AddAmmo(hhs[17], amLowGravity, 100)
  204.  
  205. AddAmmo(hhs[18], amBazooka, 100)
  206. AddAmmo(hhs[18], amMortar, 100)
  207. AddAmmo(hhs[18], amShotgun, 100)
  208.  
  209. AddAmmo(hhs[19], amBazooka, 100)
  210. AddAmmo(hhs[19], amMortar, 100)
  211. AddAmmo(hhs[19], amShotgun, 100)
  212.  
  213. AddAmmo(hhs[20], amWatermelon, 100)
  214.  
  215. AddAmmo(hhs[21], amBazooka, 100)
  216. AddAmmo(hhs[21], amMortar, 100)
  217. AddAmmo(hhs[21], amShotgun, 100)
  218.  
  219. AddAmmo(hhs[22], amBazooka, 100)
  220. AddAmmo(hhs[22], amMortar, 100)
  221. AddAmmo(hhs[22], amShotgun, 100)
  222.  
  223. AddAmmo(hhs[23], amBazooka, 100)
  224. AddAmmo(hhs[23], amMortar, 100)
  225. AddAmmo(hhs[23], amShotgun, 100)
  226.  
  227. AddAmmo(hhs[24], amBazooka, 100)
  228. AddAmmo(hhs[24], amMortar, 100)
  229. AddAmmo(hhs[24], amShotgun, 100)
  230.  
  231. AddAmmo(hhs[25], amBazooka, 100)
  232. AddAmmo(hhs[25], amMortar, 100)
  233. AddAmmo(hhs[25], amShotgun, 100)
  234.  
  235. end
  236.  
  237.  
  238. function LoadSprite(pX, pY, pSprite, pFrame, pTint, p1, p2, p3, pLandFlags)
  239. PlaceSprite(pX, pY, pSprite, pFrame, pTint, p1, p2, p3, pLandFlags)
  240. end
  241.  
  242.  
  243. function LoadGearData()
  244.  
  245. --BEGIN CORE DATA--
  246.  
  247. ------ PORTAL DISTANCE and UFO FUEL ------
  248. ufoFuel = 0
  249. portalDistance = 5000
  250.  
  251. ------ GIRDER LIST ------
  252. LoadSprite(126, 167, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  253. LoadSprite(123, 291, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  254. LoadSprite(123, 410, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  255. LoadSprite(122, 529, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  256. LoadSprite(124, 648, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  257. LoadSprite(124, 771, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  258. LoadSprite(187, 834, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  259. LoadSprite(306, 832, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  260. LoadSprite(421, 832, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  261. LoadSprite(544, 833, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  262. LoadSprite(664, 835, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  263. LoadSprite(787, 835, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  264. LoadSprite(909, 834, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  265. LoadSprite(1024, 834, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  266. LoadSprite(1145, 836, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  267. LoadSprite(1267, 834, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  268. LoadSprite(1388, 833, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  269. LoadSprite(1502, 832, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  270. LoadSprite(1624, 835, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  271. LoadSprite(1747, 835, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  272. LoadSprite(1868, 838, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  273. LoadSprite(1927, 771, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  274. LoadSprite(1927, 657, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  275. LoadSprite(1927, 529, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  276. LoadSprite(1925, 415, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  277. LoadSprite(1924, 290, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  278. LoadSprite(1923, 175, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  279. LoadSprite(185, 716, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  280. LoadSprite(304, 715, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  281. LoadSprite(424, 713, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  282. LoadSprite(541, 714, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  283. LoadSprite(666, 713, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  284. LoadSprite(785, 714, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  285. LoadSprite(906, 715, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  286. LoadSprite(1144, 716, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  287. LoadSprite(1264, 713, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  288. LoadSprite(1384, 714, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  289. LoadSprite(1507, 714, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  290. LoadSprite(1625, 714, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  291. LoadSprite(1748, 716, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  292. LoadSprite(1867, 716, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  293. LoadSprite(482, 653, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
  294. LoadSprite(482, 536, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
  295. LoadSprite(485, 410, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
  296. LoadSprite(426, 293, sprAmGirder, 1, 4294967295, nil, nil, nil, lfNormal)
  297. LoadSprite(546, 291, sprAmGirder, 3, 4294967295, nil, nil, nil, lfNormal)
  298. LoadSprite(960, 648, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
  299. LoadSprite(966, 528, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
  300. LoadSprite(1021, 464, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  301. LoadSprite(1139, 467, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  302. LoadSprite(1205, 531, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
  303. LoadSprite(1139, 590, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  304. LoadSprite(1441, 529, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
  305. LoadSprite(1443, 408, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
  306. LoadSprite(1560, 412, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
  307. LoadSprite(1559, 526, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
  308. LoadSprite(1562, 655, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
  309. LoadSprite(1447, 649, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
  310. LoadSprite(1383, 350, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  311. LoadSprite(1624, 350, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  312. LoadSprite(1629, 226, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  313. LoadSprite(1386, 229, sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
  314. LoadSprite(124, 223, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  315. LoadSprite(122, 349, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  316. LoadSprite(124, 467, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  317. LoadSprite(123, 579, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  318. LoadSprite(124, 704, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  319. LoadSprite(135, 815, sprAmGirder, 1, 2516582650, nil, nil, nil, lfIndestructible)
  320. LoadSprite(238, 831, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  321. LoadSprite(363, 833, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  322. LoadSprite(484, 832, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  323. LoadSprite(602, 834, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  324. LoadSprite(733, 835, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  325. LoadSprite(845, 835, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  326. LoadSprite(970, 832, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  327. LoadSprite(1090, 834, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  328. LoadSprite(1209, 835, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  329. LoadSprite(1327, 834, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  330. LoadSprite(1444, 832, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  331. LoadSprite(1570, 834, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  332. LoadSprite(1688, 836, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  333. LoadSprite(1803, 836, sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
  334. LoadSprite(1917, 817, sprAmGirder, 3, 2516582650, nil, nil, nil, lfIndestructible)
  335. LoadSprite(1930, 707, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  336. LoadSprite(1929, 585, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  337. LoadSprite(1927, 469, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  338. LoadSprite(1926, 345, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  339. LoadSprite(1925, 217, sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
  340. LoadSprite(485, 776, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
  341. LoadSprite(966, 771, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
  342. LoadSprite(1205, 771, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
  343. LoadSprite(1441, 773, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
  344. LoadSprite(1563, 771, sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
  345.  
  346. ------ HEALTH CRATE LIST ------
  347. tempG = SetHealth(SpawnHealthCrate(809, 813), 25)
  348. tempG = SetHealth(SpawnHealthCrate(321, 810), 25)
  349. tempG = SetHealth(SpawnHealthCrate(1044, 812), 25)
  350. tempG = SetHealth(SpawnHealthCrate(1044, 806), 25)
  351. tempG = SetHealth(SpawnHealthCrate(1044, 806), 25)
  352. tempG = SetHealth(SpawnHealthCrate(1044, 806), 25)
  353. tempG = SetHealth(SpawnHealthCrate(1389, 811), 25)
  354. tempG = SetHealth(SpawnHealthCrate(1505, 779), 25)
  355. tempG = SetHealth(SpawnHealthCrate(1801, 806), 25)
  356.  
  357. ------ AMMO CRATE LIST ------
  358. tempG = SpawnAmmoCrate(429, 808, amRCPlane)
  359. setGearValue(tempG, "caseType", "ammo")
  360. setGearValue(tempG, "contents", "amRCPlane")
  361. setGearValue(tempG, "tag", "collection")
  362. tempG = SpawnAmmoCrate(1173, 809, amMolotov)
  363. setGearValue(tempG, "caseType", "ammo")
  364. setGearValue(tempG, "contents", "amMolotov")
  365. setGearValue(tempG, "tag", "collection")
  366. tempG = SpawnAmmoCrate(1173, 809, amMolotov)
  367. setGearValue(tempG, "caseType", "ammo")
  368. setGearValue(tempG, "contents", "amMolotov")
  369. setGearValue(tempG, "tag", "collection")
  370. tempG = SpawnAmmoCrate(1173, 809, amFirePunch)
  371. setGearValue(tempG, "caseType", "ammo")
  372. setGearValue(tempG, "contents", "amFirePunch")
  373. setGearValue(tempG, "tag", "collection")
  374. tempG = SpawnAmmoCrate(1173, 809, amFirePunch)
  375. setGearValue(tempG, "caseType", "ammo")
  376. setGearValue(tempG, "contents", "amFirePunch")
  377. setGearValue(tempG, "tag", "collection")
  378. tempG = SpawnAmmoCrate(1173, 809, amFirePunch)
  379. setGearValue(tempG, "caseType", "ammo")
  380. setGearValue(tempG, "contents", "amFirePunch")
  381. setGearValue(tempG, "tag", "collection")
  382. tempG = SpawnAmmoCrate(1173, 809, amFirePunch)
  383. setGearValue(tempG, "caseType", "ammo")
  384. setGearValue(tempG, "contents", "amFirePunch")
  385. setGearValue(tempG, "tag", "collection")
  386. tempG = SpawnAmmoCrate(1173, 809, amAirAttack)
  387. setGearValue(tempG, "caseType", "ammo")
  388. setGearValue(tempG, "contents", "amAirAttack")
  389. setGearValue(tempG, "tag", "collection")
  390. tempG = SpawnAmmoCrate(1173, 809, amAirAttack)
  391. setGearValue(tempG, "caseType", "ammo")
  392. setGearValue(tempG, "contents", "amAirAttack")
  393. setGearValue(tempG, "tag", "collection")
  394. tempG = SpawnAmmoCrate(1173, 809, amAirAttack)
  395. setGearValue(tempG, "caseType", "ammo")
  396. setGearValue(tempG, "contents", "amAirAttack")
  397. setGearValue(tempG, "tag", "collection")
  398. tempG = SpawnAmmoCrate(1173, 809, amAirAttack)
  399. setGearValue(tempG, "caseType", "ammo")
  400. setGearValue(tempG, "contents", "amAirAttack")
  401. setGearValue(tempG, "tag", "collection")
  402. tempG = SpawnAmmoCrate(1173, 809, amAirAttack)
  403. setGearValue(tempG, "caseType", "ammo")
  404. setGearValue(tempG, "contents", "amAirAttack")
  405. setGearValue(tempG, "tag", "collection")
  406. tempG = SpawnAmmoCrate(1173, 809, amAirAttack)
  407. setGearValue(tempG, "caseType", "ammo")
  408. setGearValue(tempG, "contents", "amAirAttack")
  409. setGearValue(tempG, "tag", "collection")
  410. tempG = SpawnAmmoCrate(1173, 809, amAirAttack)
  411. setGearValue(tempG, "caseType", "ammo")
  412. setGearValue(tempG, "contents", "amAirAttack")
  413. setGearValue(tempG, "tag", "collection")
  414. tempG = SpawnAmmoCrate(1173, 809, amAirAttack)
  415. setGearValue(tempG, "caseType", "ammo")
  416. setGearValue(tempG, "contents", "amAirAttack")
  417. setGearValue(tempG, "tag", "collection")
  418. tempG = SpawnAmmoCrate(1173, 809, amMineStrike)
  419. setGearValue(tempG, "caseType", "ammo")
  420. setGearValue(tempG, "contents", "amMineStrike")
  421. setGearValue(tempG, "tag", "collection")
  422. tempG = SpawnAmmoCrate(1173, 809, amMineStrike)
  423. setGearValue(tempG, "caseType", "ammo")
  424. setGearValue(tempG, "contents", "amMineStrike")
  425. setGearValue(tempG, "tag", "collection")
  426. tempG = SpawnAmmoCrate(1173, 809, amMineStrike)
  427. setGearValue(tempG, "caseType", "ammo")
  428. setGearValue(tempG, "contents", "amMineStrike")
  429. setGearValue(tempG, "tag", "collection")
  430. tempG = SpawnAmmoCrate(1173, 809, amMineStrike)
  431. setGearValue(tempG, "caseType", "ammo")
  432. setGearValue(tempG, "contents", "amMineStrike")
  433. setGearValue(tempG, "tag", "collection")
  434. tempG = SpawnAmmoCrate(1173, 809, amMineStrike)
  435. setGearValue(tempG, "caseType", "ammo")
  436. setGearValue(tempG, "contents", "amMineStrike")
  437. setGearValue(tempG, "tag", "collection")
  438. tempG = SpawnAmmoCrate(1173, 809, amMineStrike)
  439. setGearValue(tempG, "caseType", "ammo")
  440. setGearValue(tempG, "contents", "amMineStrike")
  441. setGearValue(tempG, "tag", "collection")
  442. tempG = SpawnAmmoCrate(1173, 809, amMineStrike)
  443. setGearValue(tempG, "caseType", "ammo")
  444. setGearValue(tempG, "contents", "amMineStrike")
  445. setGearValue(tempG, "tag", "collection")
  446. tempG = SpawnAmmoCrate(1173, 809, amMineStrike)
  447. setGearValue(tempG, "caseType", "ammo")
  448. setGearValue(tempG, "contents", "amMineStrike")
  449. setGearValue(tempG, "tag", "collection")
  450. tempG = SpawnAmmoCrate(1173, 809, amDrillStrike)
  451. setGearValue(tempG, "caseType", "ammo")
  452. setGearValue(tempG, "contents", "amDrillStrike")
  453. setGearValue(tempG, "tag", "collection")
  454. tempG = SpawnAmmoCrate(1173, 809, amDrillStrike)
  455. setGearValue(tempG, "caseType", "ammo")
  456. setGearValue(tempG, "contents", "amDrillStrike")
  457. setGearValue(tempG, "tag", "collection")
  458. tempG = SpawnAmmoCrate(1173, 809, amDrillStrike)
  459. setGearValue(tempG, "caseType", "ammo")
  460. setGearValue(tempG, "contents", "amDrillStrike")
  461. setGearValue(tempG, "tag", "collection")
  462. tempG = SpawnAmmoCrate(1173, 809, amDrillStrike)
  463. setGearValue(tempG, "caseType", "ammo")
  464. setGearValue(tempG, "contents", "amDrillStrike")
  465. setGearValue(tempG, "tag", "collection")
  466. tempG = SpawnAmmoCrate(1173, 809, amDrillStrike)
  467. setGearValue(tempG, "caseType", "ammo")
  468. setGearValue(tempG, "contents", "amDrillStrike")
  469. setGearValue(tempG, "tag", "collection")
  470. tempG = SpawnAmmoCrate(1173, 809, amDrillStrike)
  471. setGearValue(tempG, "caseType", "ammo")
  472. setGearValue(tempG, "contents", "amDrillStrike")
  473. setGearValue(tempG, "tag", "collection")
  474. tempG = SpawnAmmoCrate(1173, 809, amDrillStrike)
  475. setGearValue(tempG, "caseType", "ammo")
  476. setGearValue(tempG, "contents", "amDrillStrike")
  477. setGearValue(tempG, "tag", "collection")
  478. tempG = SpawnAmmoCrate(1173, 809, amDrillStrike)
  479. setGearValue(tempG, "caseType", "ammo")
  480. setGearValue(tempG, "contents", "amDrillStrike")
  481. setGearValue(tempG, "tag", "collection")
  482. tempG = SpawnAmmoCrate(1173, 809, amNapalm)
  483. setGearValue(tempG, "caseType", "ammo")
  484. setGearValue(tempG, "contents", "amNapalm")
  485. setGearValue(tempG, "tag", "collection")
  486. tempG = SpawnAmmoCrate(1173, 809, amNapalm)
  487. setGearValue(tempG, "caseType", "ammo")
  488. setGearValue(tempG, "contents", "amNapalm")
  489. setGearValue(tempG, "tag", "collection")
  490. tempG = SpawnAmmoCrate(1173, 809, amNapalm)
  491. setGearValue(tempG, "caseType", "ammo")
  492. setGearValue(tempG, "contents", "amNapalm")
  493. setGearValue(tempG, "tag", "collection")
  494. tempG = SpawnAmmoCrate(1173, 809, amNapalm)
  495. setGearValue(tempG, "caseType", "ammo")
  496. setGearValue(tempG, "contents", "amNapalm")
  497. setGearValue(tempG, "tag", "collection")
  498. tempG = SpawnAmmoCrate(1173, 809, amNapalm)
  499. setGearValue(tempG, "caseType", "ammo")
  500. setGearValue(tempG, "contents", "amNapalm")
  501. setGearValue(tempG, "tag", "collection")
  502. tempG = SpawnAmmoCrate(1173, 809, amNapalm)
  503. setGearValue(tempG, "caseType", "ammo")
  504. setGearValue(tempG, "contents", "amNapalm")
  505. setGearValue(tempG, "tag", "collection")
  506. tempG = SpawnAmmoCrate(1173, 809, amNapalm)
  507. setGearValue(tempG, "caseType", "ammo")
  508. setGearValue(tempG, "contents", "amNapalm")
  509. setGearValue(tempG, "tag", "collection")
  510. tempG = SpawnAmmoCrate(1173, 809, amNapalm)
  511. setGearValue(tempG, "caseType", "ammo")
  512. setGearValue(tempG, "contents", "amNapalm")
  513. setGearValue(tempG, "tag", "collection")
  514. tempG = SpawnAmmoCrate(1173, 809, amPiano)
  515. setGearValue(tempG, "caseType", "ammo")
  516. setGearValue(tempG, "contents", "amPiano")
  517. setGearValue(tempG, "tag", "collection")
  518. tempG = SpawnAmmoCrate(1173, 809, amClusterBomb)
  519. setGearValue(tempG, "caseType", "ammo")
  520. setGearValue(tempG, "contents", "amClusterBomb")
  521. setGearValue(tempG, "tag", "collection")
  522. tempG = SpawnAmmoCrate(1173, 809, amClusterBomb)
  523. setGearValue(tempG, "caseType", "ammo")
  524. setGearValue(tempG, "contents", "amClusterBomb")
  525. setGearValue(tempG, "tag", "collection")
  526. tempG = SpawnAmmoCrate(1173, 809, amGirder)
  527. setGearValue(tempG, "caseType", "ammo")
  528. setGearValue(tempG, "contents", "amGirder")
  529. setGearValue(tempG, "tag", "collection")
  530. tempG = SpawnAmmoCrate(1173, 809, amBlowTorch)
  531. setGearValue(tempG, "caseType", "ammo")
  532. setGearValue(tempG, "contents", "amBlowTorch")
  533. setGearValue(tempG, "tag", "collection")
  534. tempG = SpawnAmmoCrate(1173, 809, amBazooka)
  535. setGearValue(tempG, "caseType", "ammo")
  536. setGearValue(tempG, "contents", "amBazooka")
  537. setGearValue(tempG, "tag", "collection")
  538. tempG = SpawnAmmoCrate(1173, 809, amMortar)
  539. setGearValue(tempG, "caseType", "ammo")
  540. setGearValue(tempG, "contents", "amMortar")
  541. setGearValue(tempG, "tag", "collection")
  542. tempG = SpawnAmmoCrate(1173, 809, amShotgun)
  543. setGearValue(tempG, "caseType", "ammo")
  544. setGearValue(tempG, "contents", "amShotgun")
  545. setGearValue(tempG, "tag", "collection")
  546.  
  547. ------ UTILITY CRATE LIST ------
  548. tempG = SpawnUtilityCrate(1173, 809, amRope)
  549. setGearValue(tempG, "caseType", "util")
  550. setGearValue(tempG, "contents", "amRope")
  551. setGearValue(tempG, "tag", "collection")
  552. tempG = SpawnUtilityCrate(1173, 809, amRope)
  553. setGearValue(tempG, "caseType", "util")
  554. setGearValue(tempG, "contents", "amRope")
  555. setGearValue(tempG, "tag", "collection")
  556. tempG = SpawnUtilityCrate(1173, 809, amRope)
  557. setGearValue(tempG, "caseType", "util")
  558. setGearValue(tempG, "contents", "amRope")
  559. setGearValue(tempG, "tag", "collection")
  560. tempG = SpawnUtilityCrate(1173, 809, amRope)
  561. setGearValue(tempG, "caseType", "util")
  562. setGearValue(tempG, "contents", "amRope")
  563. setGearValue(tempG, "tag", "collection")
  564. tempG = SpawnUtilityCrate(1173, 809, amParachute)
  565. setGearValue(tempG, "caseType", "util")
  566. setGearValue(tempG, "contents", "amParachute")
  567. setGearValue(tempG, "tag", "collection")
  568. tempG = SpawnUtilityCrate(1173, 809, amParachute)
  569. setGearValue(tempG, "caseType", "util")
  570. setGearValue(tempG, "contents", "amParachute")
  571. setGearValue(tempG, "tag", "collection")
  572. tempG = SpawnUtilityCrate(1173, 809, amParachute)
  573. setGearValue(tempG, "caseType", "util")
  574. setGearValue(tempG, "contents", "amParachute")
  575. setGearValue(tempG, "tag", "collection")
  576. tempG = SpawnUtilityCrate(1173, 809, amParachute)
  577. setGearValue(tempG, "caseType", "util")
  578. setGearValue(tempG, "contents", "amParachute")
  579. setGearValue(tempG, "tag", "collection")
  580. tempG = SpawnUtilityCrate(1504, 809, amExtraTime)
  581. setGearValue(tempG, "caseType", "util")
  582. setGearValue(tempG, "contents", "amExtraTime")
  583. setGearValue(tempG, "tag", "collection")
  584. tempG = SpawnUtilityCrate(1850, 809, amExtraTime)
  585. setGearValue(tempG, "caseType", "util")
  586. setGearValue(tempG, "contents", "amExtraTime")
  587. setGearValue(tempG, "tag", "collection")
  588. tempG = SpawnUtilityCrate(375, 809, amExtraTime)
  589. setGearValue(tempG, "caseType", "util")
  590. setGearValue(tempG, "contents", "amExtraTime")
  591. setGearValue(tempG, "tag", "collection")
  592. tempG = SpawnUtilityCrate(878, 809, amExtraTime)
  593. setGearValue(tempG, "caseType", "util")
  594. setGearValue(tempG, "contents", "amExtraTime")
  595. setGearValue(tempG, "tag", "collection")
  596.  
  597. --END CORE DATA--
  598.  
  599. LoadHogWeapons()
  600.  
  601. end
  602.  
  603.  
  604. function onGameStart()
  605.  
  606. LoadGearData()
  607. DetermineMissionGoal()
  608.  
  609. end
  610.  
  611.  
  612. function onNewTurn()
  613. --insert code according to taste
  614. end
  615.  
  616.  
  617. function onGameTick()
  618. runOnGears(UpdateTagCircles)
  619. end
  620.  
  621. function UpdateTagCircles(gear)
  622. if getGearValue(gear,"tag") ~= nil then
  623. if getGearValue(gear,"tCirc") == nil then
  624. setGearValue(gear, "tCirc",AddVisualGear(0,0,vgtCircle,0,true))
  625. end
  626.  
  627. if getGearValue(gear,"tag") == "victory" then
  628. SetVisualGearValues(getGearValue(gear,"tCirc"), GetX(gear), GetY(gear), 100, 255, 1, 10, 0, 150, 3, 0xff0000ff)
  629. elseif getGearValue(gear,"tag") == "failure" then
  630. SetVisualGearValues(getGearValue(gear,"tCirc"), GetX(gear), GetY(gear), 100, 255, 1, 10, 0, 150, 3, 0x00ff00ff)
  631. elseif getGearValue(gear,"tag") == "collection" then
  632. SetVisualGearValues(getGearValue(gear,"tCirc"), GetX(gear), GetY(gear), 100, 255, 1, 10, 0, 150, 3, 0x0000ffff)
  633. end
  634. end
  635. end
  636.  
  637. function CheckForConditions(gear)
  638. if getGearValue(gear,"tag") == "victory" then
  639. victoryObj = victoryObj +1
  640. elseif getGearValue(gear,"tag") == "failure" then
  641. failObj = failObj +1
  642. elseif getGearValue(gear,"tag") == "collection" then
  643. collectObj = collectObj +1
  644. end
  645. end
  646.  
  647. function CheckForConclusion(gear)
  648.  
  649. if getGearValue(gear,"tag") == "failure" then
  650. EndGameIn("failure")
  651. else
  652.  
  653. victoryObj = 0
  654. failObj = 0
  655. collectObj = 0
  656. runOnGears(CheckForConditions)
  657.  
  658. if GetGearType(gear) ~= gtCase then
  659.  
  660. victoryObj = victoryObj - 1
  661.  
  662. if (victoryObj == 0) and (collectObj == 0) then
  663. EndGameIn("victory")
  664. end
  665.  
  666. else
  667.  
  668. if (GetGearMessage(gear) == 256) and (getGearValue(gear,"tag") == "collection") then
  669. if GetHogLevel(CurrentHedgehog) ~= 0 then
  670. EndGameIn("failure")
  671. else
  672. collectObj = collectObj - 1
  673. if (victoryObj == 0) and (collectObj == 0) then
  674. EndGameIn("victory")
  675. end
  676. end
  677. elseif (GetGearMessage(gear) == 0) and (getGearValue(gear,"tag") == "victory") then
  678. victoryObj = victoryObj - 1
  679. if (victoryObj == 0) and (collectObj == 0) then
  680. EndGameIn("victory")
  681. end
  682. else
  683. EndGameIn("failure")
  684. end
  685.  
  686. end
  687.  
  688. end
  689.  
  690. end
  691.  
  692. function DetermineMissionGoal()
  693.  
  694. victoryObj = 0
  695. failObj = 0
  696. collectObj = 0
  697. vComment = ""
  698. fComment = ""
  699. collectComment = ""
  700.  
  701. runOnGears(CheckForConditions)
  702.  
  703. if victoryObj > 0 then
  704. if victoryObj == 1 then
  705. vComment = loc("Kill the red-circled hog")
  706. else
  707. vComment = loc("Kill all red-circled hogs")
  708. end
  709. end
  710.  
  711. if collectObj > 0 then
  712. if collectObj == 1 then
  713. collectComment = loc("The blue-circled crate must be collected")
  714. else
  715. collectComment = loc("All blue-circled crates must be collected")
  716. end
  717. end
  718.  
  719. if (collectObj == 0) and (victoryObj == 0) then
  720. vComment = loc("Destroy the enemy.")
  721. end
  722.  
  723. if failObj > 0 then
  724. if failObj == 1 then
  725. fComment = loc("Your green-circled hog must survive")
  726. else
  727. fComment = loc("Your green-circled hogs must survive")
  728. end
  729. end
  730.  
  731. ShowMission(loc("User Challenge"), loc("Mission Goals") .. ":", collectComment .. "|" .. vComment .. "|" .. fComment .. "| |".. loc("Mission made by KarBoy2314PL") .. "|" .. loc("using HedgeEditor"), 0, 0)
  732.  
  733. end
  734.  
  735. function isATrackedGear(gear)
  736. if (GetGearType(gear) == gtHedgehog) or
  737. (GetGearType(gear) == gtExplosives) or
  738. (GetGearType(gear) == gtMine) or
  739. (GetGearType(gear) == gtSMine) or
  740. (GetGearType(gear) == gtAirMine) or
  741. (GetGearType(gear) == gtTarget) or
  742. (GetGearType(gear) == gtKnife) or
  743. (GetGearType(gear) == gtPortal) or
  744. (GetGearType(gear) == gtCase)
  745. then
  746. return(true)
  747. else
  748. return(false)
  749. end
  750. end
  751.  
  752.  
  753. function onGearAdd(gear)
  754. if isATrackedGear(gear) then
  755. trackGear(gear)
  756. end
  757. end
  758.  
  759.  
  760. function EndGameIn(c)
  761.  
  762. teamCounter = 0
  763. lastRecordedTeam = ""
  764. for i = 1, #hhs do
  765.  
  766. if GetHogTeamName(hhs[i]) ~= lastRecordedTeam then --er, is this okay without nill checks?
  767.  
  768. lastRecordedTeam = GetHogTeamName(hhs[i])
  769. teamCounter = teamCounter + 1
  770. if teamCounter == 9 then
  771. teamCounter = 1
  772. end
  773.  
  774. if (c == "victory") and (GetHogLevel(hhs[i]) ~= 0) then
  775. DismissTeam(GetHogTeamName(hhs[i]))
  776. ShowMission(loc("User Challenge"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0)
  777. elseif (c == "failure") and (GetHogLevel(hhs[i]) == 0) then
  778. DismissTeam(GetHogTeamName(hhs[i]))
  779. ShowMission(loc("User Challenge"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
  780. elseif (c == "victory") and (GetHogLevel(hhs[i]) == 0) then
  781. PlaySound(sndVictory,hhs[i]) -- check if we actually need this
  782. end
  783.  
  784. end
  785.  
  786. end
  787.  
  788. end
  789.  
  790.  
  791. function onGearDelete(gear)
  792.  
  793. --insert code according to taste
  794.  
  795. if isATrackedGear(gear) then
  796.  
  797. if getGearValue(gear,"tag") ~= nil then
  798. CheckForConclusion(gear)
  799. end
  800.  
  801. if getGearValue(gear, "tCirc") ~= nil then
  802. DeleteVisualGear(getGearValue(gear, "tCirc"))
  803. end
  804.  
  805. if GetGearType(gear) == gtHedgehog then
  806.  
  807. hx,hy = GetGearPosition(hhs[1])
  808.  
  809. SetHealth(SpawnHealthCrate(hx,hy), 25)
  810. SpawnUtilityCrate(hx,hy, amRope)
  811. SpawnUtilityCrate(hx,hy, amExtraTime)
  812. SpawnUtilityCrate(hx,hy, amGirder)
  813. SpawnUtilityCrate(hx,hy, amBlowTorch)
  814.  
  815. randomwep = wepArray[GetRandom(#wepArray)]
  816. SpawnAmmoCrate(hx,hy,randomwep)
  817.  
  818. randomwep = wepArray[GetRandom(#wepArray)]
  819. SpawnAmmoCrate(hx,hy,randomwep)
  820.  
  821. randomwep = wepArray[GetRandom(#wepArray)]
  822. SpawnAmmoCrate(hx,hy,randomwep)
  823.  
  824. randomwep = wepArray[GetRandom(#wepArray)]
  825. SpawnAmmoCrate(hx,hy,randomwep)
  826.  
  827. randomwep = wepArray[GetRandom(#wepArray)]
  828. SpawnAmmoCrate(hx,hy,randomwep)
  829. end
  830.  
  831. trackDeletion(gear)
  832.  
  833. end
  834.  
  835. end
  836.  
  837.  
  838. --enable and/or alter code according to taste
  839. function onAmmoStoreInit()
  840.  
  841. for i = 1, #wepArray do
  842. SetAmmo(wepArray[i], 0, 0, 0, 8)
  843. end
  844.  
  845. SetAmmo(amSkip, 9, 0, 0, 0)
  846.  
  847. end
  848.  
  849. ------ END GENERATED MISSION ------
Advertisement
RAW Paste Data Copied
Advertisement