The3vilM0nk3y

Untitled

Aug 13th, 2017
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.73 KB | None | 0 0
  1. -- Country Info
  2. function onLoad()
  3. contReference = {
  4. alaska = "nAmerica",
  5. northwestterritory = "nAmerica",
  6. greenland = "nAmerica",
  7. alberta = "nAmerica",
  8. ontario = "nAmerica",
  9. quebec = "nAmerica",
  10. westernunitedstates = "nAmerica",
  11. easternunitedstates = "nAmerica",
  12. centralamerica = "nAmerica",
  13. venezuela = "sAmerica",
  14. brazil = "sAmerica",
  15. peru = "sAmerica",
  16. argentina = "sAmerica",
  17. iceland = "europe",
  18. scandinavia = "europe",
  19. ukrane = "europe",
  20. greatbritain = "europe",
  21. northerneurope = "europe",
  22. westerneurope = "europe",
  23. southerneurope = "europe",
  24. northafrica = "africa",
  25. egypt = "africa",
  26. eastafrica = "africa",
  27. congo = "africa",
  28. madagascar = "africa",
  29. southafrica = "africa",
  30. ural = "asia",
  31. siberia = "asia",
  32. yakutsk = "asia",
  33. kamchatka = "asia",
  34. irkutsk = "asia",
  35. mongolia = "asia",
  36. japan = "asia",
  37. afghanistan = "asia",
  38. china = "asia",
  39. middleeast = "asia",
  40. india = "asia",
  41. siam = "asia",
  42. indonesia = "australia",
  43. newguinea = "australia",
  44. westernaustralia = "australia",
  45. easternaustralia = "australia",
  46. }
  47. continents = {
  48. nAmerica = {
  49. alaska = {
  50. borders = {"northwestterritory","alberta","kamchatka"},
  51. owner = "test",
  52. units = 0,
  53. buttonindex = 0,
  54. button = {
  55. index = 0, click_function = 'clicked', function_owner = self,
  56. label = 'Alaska', position = {x = -1.2, y = 0.94, z = -0.62}, rotation = {x = 0, y = 0, z = 0},
  57. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  58. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}
  59. }
  60. },
  61. northwestterritory = {
  62. borders = {"alaska","alberta","ontario","greenland"},
  63. owner = nil,
  64. units = 0,
  65. buttonindex = 1,
  66. button = {
  67. index = 1, click_function = 'clicked', function_owner = self,
  68. label = 'North West Territory', position = {x = -0.94, y = 0.94, z = -0.62}, rotation = {x = 0, y = 0, z = 0},
  69. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  70. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}
  71. }
  72. },
  73. greenland = {
  74. borders = {"northwestterritory","ontario","quebec","iceland"},
  75. owner = nil,
  76. units = 0,
  77. buttonindex = 2,
  78. button = {
  79. index = 2, click_function = 'clicked', function_owner = self,
  80. label = 'Greenland', position = {x = -0.41, y = 0.94, z = -0.72}, rotation = {x = 0, y = 0, z = 0},
  81. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  82. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}
  83. }
  84. },
  85. alberta = {
  86. borders = {"alaska","northwestterritory","ontario","westernunitedstates"},
  87. owner = nil,
  88. units = 0,
  89. buttonindex = 3,
  90. button = {
  91. index = 3, click_function = 'clicked', function_owner = self,
  92. label = 'Alberta', position = {x = -0.96, y = 0.94, z = -0.47}, rotation = {x = 0, y = 0, z = 0},
  93. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  94. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}
  95. }
  96. },
  97. ontario = {
  98. borders = {"northwestterritory","alberta","westernunitedstates","easternunitedstates","quebec","greenland"},
  99. owner = nil,
  100. units = 0,
  101. buttonindex = 4,
  102. button = {
  103. index = 4, click_function = 'clicked', function_owner = self,
  104. label = 'Ontario', position = {x = -0.78, y = 0.94, z = -0.43}, rotation = {x = 0, y = 0, z = 0},
  105. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  106. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  107. },
  108. quebec = {
  109. borders = {"ontario","easternunitedstates","greenland"},
  110. owner = nil,
  111. units = 0,
  112. buttonindex = 5,
  113. button = {
  114. index = 5, click_function = 'clicked', function_owner = self,
  115. label = 'Quebec', position = {x = -0.59, y = 0.94, z = -0.43}, rotation = {x = 0, y = 0, z = 0},
  116. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  117. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  118. },
  119. westernunitedstates = {
  120. borders = {"alberta","ontario","easternunitedstates","centralamerica"},
  121. owner = nil,
  122. units = 0,
  123. buttonindex = 6,
  124. button = {
  125. index = 6, click_function = 'clicked', function_owner = self,
  126. label = 'Western United States', position = {x = -0.95, y = 0.94, z = -0.27}, rotation = {x = 0, y = 0, z = 0},
  127. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  128. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  129. },
  130. easternunitedstates = {
  131. borders = {"ontario","quebec","westernunitedstates","centralamerica"},
  132. owner = nil,
  133. units = 0,
  134. buttonindex = 7,
  135. button = {
  136. index = 7, click_function = 'clicked', function_owner = self,
  137. label = 'Eastern United States', position = {x = -0.76, y = 0.94, z = -0.18}, rotation = {x = 0, y = 0, z = 0},
  138. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  139. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  140. },
  141. centralamerica = {
  142. borders = {"westernunitedstates","easternunitedstates","venezuela"},
  143. owner = nil,
  144. units = 0,
  145. buttonindex = 8,
  146. button = {
  147. index = 8, click_function = 'clicked', function_owner = self,
  148. label = 'Central America', position = {x = -0.87, y = 0.94, z = 0.01}, rotation = {x = 0, y = 0, z = 0},
  149. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  150. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  151. },
  152. },
  153. southamerica = {
  154. venezuela = {
  155. borders = {"centralamerica","peru","brazil"},
  156. owner = nil,
  157. units = 0,
  158. buttonindex = 9,
  159. button = {
  160. index = 9, click_function = 'clicked', function_owner = self,
  161. label = 'Venezuela', position = {x = -0.75, y = 0.94, z = 0.14}, rotation = {x = 0, y = 0, z = 0},
  162. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  163. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  164. },
  165. peru = {
  166. borders = {"venezuela","brazil","argentina"},
  167. owner = nil,
  168. units = 0,
  169. buttonindex = 10,
  170. button = {
  171. index = 10, click_function = 'clicked', function_owner = self,
  172. label = 'Peru', position = {x = -0.68, y = 0.94, z = 0.39}, rotation = {x = 0, y = 0, z = 0},
  173. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  174. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  175. },
  176. brazil = {
  177. borders = {"venezuela","peru","argentina","northafrica"},
  178. owner = nil,
  179. units = 0,
  180. buttonindex = 11,
  181. button = {
  182. index = 11, click_function = 'clicked', function_owner = self,
  183. label = 'Brazil', position = {x = -0.53, y = 0.94, z = 0.31}, rotation = {x = 0, y = 0, z = 0},
  184. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  185. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  186. },
  187. argentina = {
  188. borders = {"peru","brazil"},
  189. owner = nil,
  190. units = 0,
  191. buttonindex = 12,
  192. button = {
  193. index = 12, click_function = 'clicked', function_owner = self,
  194. label = 'Argentina', position = {x = -0.64, y = 0.94, z = 0.58}, rotation = {x = 0, y = 0, z = 0},
  195. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  196. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  197. },
  198. },
  199. europe = {
  200. iceland = {
  201. borders = {"greenland","scandinavia","greatbritain"},
  202. owner = nil,
  203. units = 0,
  204. buttonindex = 13,
  205. button = {
  206. index = 13, click_function = 'clicked', function_owner = self,
  207. label = 'Iceland', position = {x = -0.19, y = 0.94, z = -0.53}, rotation = {x = 0, y = 0, z = 0},
  208. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  209. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  210. },
  211. scandinavia = {
  212. borders = {"iceland","ukrane","greatbritain","northerneurope"},
  213. owner = nil,
  214. units = 0,
  215. buttonindex = 14,
  216. button = {
  217. index = 14, click_function = 'clicked', function_owner = self,
  218. label = 'Scandinavia', position = {x = 0.04, y = 0.94, z = -0.59}, rotation = {x = 0, y = 0, z = 0},
  219. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  220. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  221. },
  222. ukrane = {
  223. borders = {"scandinavia","northerneurope","southerneurope","middleeast","afghanistan","ural"},
  224. owner = nil,
  225. units = 0,
  226. buttonindex = 15,
  227. button = {
  228. index = 15, click_function = 'clicked', function_owner = self,
  229. label = 'Ukrane', position = {x = 0.29, y = 0.94, z = -0.41}, rotation = {x = 0, y = 0, z = 0},
  230. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  231. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  232. },
  233. greatbritain = {
  234. borders = {"iceland","scandinavia","northerneurope","westerneurope"},
  235. owner = nil,
  236. units = 0,
  237. buttonindex = 16,
  238. button = {
  239. index = 16, click_function = 'clicked', function_owner = self,
  240. label = 'Great Britain', position = {x = -0.23, y = 0.94, z = -0.3}, rotation = {x = 0, y = 0, z = 0},
  241. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  242. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  243. },
  244. northerneurope = {
  245. borders = {"greatbritain","westerneurope","southerneurope","ukrane","scandinavia"},
  246. owner = nil,
  247. units = 0,
  248. buttonindex = 17,
  249. button = {
  250. index = 17, click_function = 'clicked', function_owner = self,
  251. label = 'Northern Europe', position = {x = 0.07, y = 0.94, z = -0.26}, rotation = {x = 0, y = 0, z = 0},
  252. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  253. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  254. },
  255. westerneurope = {
  256. borders = {"greatbritain","northafrica","southerneurope","northerneurope"},
  257. owner = nil,
  258. units = 0,
  259. buttonindex = 18,
  260. button = {
  261. index = 18, click_function = 'clicked', function_owner = self,
  262. label = 'Western Europe', position = {x = -0.19, y = 0.94, z = 0}, rotation = {x = 0, y = 0, z = 0},
  263. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  264. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  265. },
  266. southerneurope = {
  267. borders = {"northerneurope","westerneurope","northafrica","egypt","middleeast","ukrane"},
  268. owner = nil,
  269. units = 0,
  270. buttonindex = 19,
  271. button = {
  272. index = 19, click_function = 'clicked', function_owner = self,
  273. label = 'Southern Europe', position = {x = 0.07, y = 0.94, z = -0.12}, rotation = {x = 0, y = 0, z = 0},
  274. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  275. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  276. },
  277. },
  278. africa = {
  279. northafrica = {
  280. borders = {"westerneurope","brazil","congo","eastafrica","egypt","southerneurope"},
  281. owner = nil,
  282. units = 0,
  283. buttonindex = 20,
  284. button = {
  285. index = 20, click_function = 'clicked', function_owner = self,
  286. label = 'North Africa', position = {x = -0.07, y = 0.94, z = 0.28}, rotation = {x = 0, y = 0, z = 0},
  287. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  288. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  289. },
  290. egypt = {
  291. borders = {"southerneurope","northafrica","eastafrica","middleeast"},
  292. owner = nil,
  293. units = 0,
  294. buttonindex = 21,
  295. button = {
  296. index = 21, click_function = 'clicked', function_owner = self,
  297. label = 'Egypt', position = {x = 0.13, y = 0.94, z = 0.18}, rotation = {x = 0, y = 0, z = 0},
  298. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  299. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  300. },
  301. eastafrica = {
  302. borders = {"egypt","northafrica","congo","southafrica","madagascar","middleeast"},
  303. owner = nil,
  304. units = 0,
  305. buttonindex = 22,
  306. button = {
  307. index = 22, click_function = 'clicked', function_owner = self,
  308. label = 'East Africa', position = {x = 0.26, y = 0.94, z = 0.39}, rotation = {x = 0, y = 0, z = 0},
  309. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  310. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  311. },
  312. congo = {
  313. borders = {"northafrica","southafrica","eastafrica"},
  314. owner = nil,
  315. units = 0,
  316. buttonindex = 23,
  317. button = {
  318. index = 23, click_function = 'clicked', function_owner = self,
  319. label = 'Congo', position = {x = 0.14, y = 0.94, z = 0.5}, rotation = {x = 0, y = 0, z = 0},
  320. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  321. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  322. },
  323. southafrica = {
  324. borders = {"congo","madagascar","eastafrica"},
  325. owner = nil,
  326. units = 0,
  327. buttonindex = 24,
  328. button = {
  329. index = 24, click_function = 'clicked', function_owner = self,
  330. label = 'South Africa', position = {x = 0.15, y = 0.94, z = 0.78}, rotation = {x = 0, y = 0, z = 0},
  331. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  332. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  333. },
  334. madagascar = {
  335. borders = {"southafrica","eastafrica"},
  336. owner = nil,
  337. units = 0,
  338. buttonindex = 25,
  339. button = {
  340. index = 25, click_function = 'clicked', function_owner = self,
  341. label = 'Madagascar', position = {x = 0.38, y = 0.94, z = 0.69}, rotation = {x = 0, y = 0, z = 0},
  342. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  343. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  344. },
  345. },
  346. asia = {
  347. ural = {
  348. borders = {"ukrane","afghanistan","china","siberia"},
  349. owner = nil,
  350. units = 0,
  351. buttonindex = 26,
  352. button = {
  353. index = 26, click_function = 'clicked', function_owner = self,
  354. label = 'Ural', position = {x = 0.56, y = 0.94, z = -0.48}, rotation = {x = 0, y = 0, z = 0},
  355. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  356. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  357. },
  358. siberia = {
  359. borders = {"ural","china","mongolia","irkutsk","yakutsk"},
  360. owner = nil,
  361. units = 0,
  362. buttonindex = 27,
  363. button = {
  364. index = 27, click_function = 'clicked', function_owner = self,
  365. label = 'Siberia', position = {x = 0.7, y = 0.94, z = -0.58}, rotation = {x = 0, y = 0, z = 0},
  366. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  367. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  368. },
  369. yakutsk = {
  370. borders = {"siberia","irkutsk","kamchatka"},
  371. owner = nil,
  372. units = 0,
  373. buttonindex = 28,
  374. button = {
  375. index = 28, click_function = 'clicked', function_owner = self,
  376. label = 'Yakutsk', position = {x = 0.91, y = 0.94, z = -0.67}, rotation = {x = 0, y = 0, z = 0},
  377. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  378. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  379. },
  380. kamchatka = {
  381. borders = {"yakutsk","irkutsk","mongolia","japan","alaska"},
  382. owner = nil,
  383. units = 0,
  384. buttonindex = 29,
  385. button = {
  386. index = 29, click_function = 'clicked', function_owner = self,
  387. label = 'Kamchatka', position = {x = 1.12, y = 0.94, z = -0.65}, rotation = {x = 0, y = 0, z = 0},
  388. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  389. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  390. },
  391. irkutsk = {
  392. borders = {"yakutsk","siberia","mongolia","kamchatka","yakutsk"},
  393. owner = nil,
  394. units = 0,
  395. buttonindex = 30,
  396. button = {
  397. index = 30, click_function = 'clicked', function_owner = self,
  398. label = 'Irkutsk', position = {x = 0.88, y = 0.94, z = -0.43}, rotation = {x = 0, y = 0, z = 0},
  399. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  400. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  401. },
  402. mongolia = {
  403. borders = {"irkutsk","siberia","china","japan","kamchatka"},
  404. owner = nil,
  405. units = 0,
  406. buttonindex = 31,
  407. button = {
  408. index = 31, click_function = 'clicked', function_owner = self,
  409. label = 'Mongolia', position = {x = 0.9, y = 0.94, z = -0.26}, rotation = {x = 0, y = 0, z = 0},
  410. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  411. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  412. },
  413. afghanistan = {
  414. borders = {"ukrane","middleeast","india","china","ural"},
  415. owner = nil,
  416. units = 0,
  417. buttonindex = 32,
  418. button = {
  419. index = 32, click_function = 'clicked', function_owner = self,
  420. label = 'Afghanistan', position = {x = 0.52, y = 0.94, z = -0.21}, rotation = {x = 0, y = 0, z = 0},
  421. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  422. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  423. },
  424. japan = {
  425. borders = {"mongolia","kamchatka"},
  426. owner = nil,
  427. units = 0,
  428. buttonindex = 33,
  429. button = {
  430. index = 33, click_function = 'clicked', function_owner = self,
  431. label = 'Japan', position = {x = 1.21, y = 0.94, z = -0.3}, rotation = {x = 0, y = 0, z = 0},
  432. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  433. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  434. },
  435. china = {
  436. borders = {"siberia","ural","afghanistan","india","siam","mongolia"},
  437. owner = nil,
  438. units = 0,
  439. buttonindex = 34,
  440. button = {
  441. index = 34, click_function = 'clicked', function_owner = self,
  442. label = 'China', position = {x = 0.83, y = 0.94, z = -0.08}, rotation = {x = 0, y = 0, z = 0},
  443. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  444. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  445. },
  446. middleeast = {
  447. borders = {"ukrane","southerneurope","egypt","eastafrica","india","afghanistan"},
  448. owner = nil,
  449. units = 0,
  450. buttonindex = 35,
  451. button = {
  452. index = 35, click_function = 'clicked', function_owner = self,
  453. label = 'Middle East', position = {x = 0.38, y = 0.94, z = 0.02}, rotation = {x = 0, y = 0, z = 0},
  454. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  455. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  456. },
  457. india = {
  458. borders = {"afghanistan","middleeast","siam","china"},
  459. owner = nil,
  460. units = 0,
  461. buttonindex = 36,
  462. button = {
  463. index = 36, click_function = 'clicked', function_owner = self,
  464. label = 'India', position = {x = 0.66, y = 0.94, z = 0.06}, rotation = {x = 0, y = 0, z = 0},
  465. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  466. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  467. },
  468. siam = {
  469. borders = {"india","china","indonesia"},
  470. owner = nil,
  471. units = 0,
  472. buttonindex = 37,
  473. button = {
  474. index = 37, click_function = 'clicked', function_owner = self,
  475. label = 'Siam', position = {x = 0.9, y = 0.94, z = 0.16}, rotation = {x = 0, y = 0, z = 0},
  476. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  477. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  478. },
  479. },
  480. australia = {
  481. indonesia = {
  482. borders = {"siam","westernaustralia","newguinea"},
  483. owner = nil,
  484. units = 0,
  485. buttonindex = 38,
  486. button = {
  487. index = 38, click_function = 'clicked', function_owner = self,
  488. label = 'Indonesia', position = {x = 1.02, y = 0.94, z = 0.48}, rotation = {x = 0, y = 0, z = 0},
  489. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  490. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  491. },
  492. newguinea = {
  493. borders = {"indonesia","easternaustralia"},
  494. owner = nil,
  495. units = 0,
  496. buttonindex = 39,
  497. button = {
  498. index = 39, click_function = 'clicked', function_owner = self,
  499. label = 'New Guinea', position = {x = 1.26, y = 0.94, z = 0.42}, rotation = {x = 0, y = 0, z = 0},
  500. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  501. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  502. },
  503. westernaustralia = {
  504. borders = {"indonesia","easternaustralia"},
  505. owner = nil,
  506. units = 0,
  507. buttonindex = 40,
  508. button = {
  509. index = 40, click_function = 'clicked', function_owner = self,
  510. label = 'Western Austrailia', position = {x = 1.06, y = 0.94, z = 0.64}, rotation = {x = 0, y = 0, z = 0},
  511. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  512. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  513. },
  514. easternaustralia = {
  515. borders = {"newguinea","westernaustralia"},
  516. owner = nil,
  517. units = 0,
  518. buttonindex = 41,
  519. button = {
  520. index = 41, click_function = 'clicked', function_owner = self,
  521. label = 'Eastern Austrailia', position = {x = 1.28, y = 0.94, z = 0.68}, rotation = {x = 0, y = 0, z = 0},
  522. scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
  523. color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
  524. }
  525. }
  526. }
  527. pColors = {
  528. White = {{1,1,1},{0.25, 0.25, 0.25}},
  529. Brown = {{0.443, 0.231, 0.09},{0.25, 0.25, 0.25}},
  530. Red = {{0.856, 0.1, 0.094},{0.25, 0.25, 0.25}},
  531. Orange = {{0.956, 0.392, 0.113},{0.25, 0.25, 0.25}},
  532. Yellow = {{0.905, 0.898, 0.172},{0.25, 0.25, 0.25}},
  533. Green = {{0.192, 0.701, 0.168},{0.25, 0.25, 0.25}},
  534. Teal = {{0.129, 0.694, 0.607},{0.25, 0.25, 0.25}},
  535. Blue = {{0.118, 0.53, 1},{0.25, 0.25, 0.25}},
  536. Purple = {{0.627, 0.125, 0.941},{0.25, 0.25, 0.25}},
  537. Pink = {{0.96, 0.439, 0.807},{0.25, 0.25, 0.25}}
  538. }
  539.  
  540. createTerritoryButtons()
  541. updateTroopCount("alaska",999)
  542. updateOwner("alaska","Red")
  543. end
  544.  
  545. -- Setup
  546. function createTerritoryButtons()
  547. for i,c in pairs(continents) do
  548. for j,t in pairs(c) do
  549. self.createButton(t.button)
  550. end
  551. end
  552. end
  553. function updateTroopCount(territory,amount)
  554. continents[contReference[territory]][territory].button.label = amount
  555. continents[contReference[territory]][territory].units = amount
  556. self.editButton(continents[contReference[territory]][territory].button)
  557. end
  558. function updateOwner(territory,owner)
  559. continents[contReference[territory]][territory].owner = owner
  560. continents[contReference[territory]][territory].button.color = pColors[owner][1]
  561. continents[contReference[territory]][territory].button.font_color = pColors[owner][2]
  562. self.editButton(continents[contReference[territory]][territory].button)
  563. end
  564.  
  565.  
  566.  
  567. -- Begin turn reinforcements
  568.  
  569. -- Combat
  570.  
  571. -- Strategic Move
  572.  
  573. -- End Turn
Advertisement
Add Comment
Please, Sign In to add comment