rebuildmap2.txt 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. gamesignsmap = getScriptVar("gamesigns");
  2. gamesignloc = map.get(gamesignsmap, "rebuildsign2");
  3. gamesworld = world.get("games");
  4. lobbyspawnloc = loc.new(gamesworld, 1003, 85, 957);
  5. mapname = "§38x8";
  6. middleloc = loc.new(gamesworld, -2057, 101, -2007);
  7. radius = 100;
  8. minplayers = 1;
  9. maxplayers = 10;
  10. picture_length = 8;
  11. solve_to_win = 10;
  12. spawns = list.new();
  13. list.add(spawns, loc.new(gamesworld, -2008, 101, -2015));
  14. list.add(spawns, loc.new(gamesworld, -2019, 101, -2015));
  15. list.add(spawns, loc.new(gamesworld, -2030, 101, -2015));
  16. list.add(spawns, loc.new(gamesworld, -2041, 101, -2015));
  17. list.add(spawns, loc.new(gamesworld, -2052, 101, -2015));
  18. list.add(spawns, loc.new(gamesworld, -2063, 101, -2015));
  19. list.add(spawns, loc.new(gamesworld, -2074, 101, -2015));
  20. list.add(spawns, loc.new(gamesworld, -2085, 101, -2015));
  21. list.add(spawns, loc.new(gamesworld, -2096, 101, -2015));
  22. list.add(spawns, loc.new(gamesworld, -2107, 101, -2015));
  23. picture_edge = list.new();
  24. list.add(picture_edge, loc.new(gamesworld, -2004, 101, -2000));
  25. list.add(picture_edge, loc.new(gamesworld, -2015, 101, -2000));
  26. list.add(picture_edge, loc.new(gamesworld, -2026, 101, -2000));
  27. list.add(picture_edge, loc.new(gamesworld, -2037, 101, -2000));
  28. list.add(picture_edge, loc.new(gamesworld, -2048, 101, -2000));
  29. list.add(picture_edge, loc.new(gamesworld, -2059, 101, -2000));
  30. list.add(picture_edge, loc.new(gamesworld, -2070, 101, -2000));
  31. list.add(picture_edge, loc.new(gamesworld, -2081, 101, -2000));
  32. list.add(picture_edge, loc.new(gamesworld, -2092, 101, -2000));
  33. list.add(picture_edge, loc.new(gamesworld, -2103, 101, -2000));
  34. bottom_edge = list.new();
  35. list.add(bottom_edge, loc.new(gamesworld, -2004, 101, -2011));
  36. list.add(bottom_edge, loc.new(gamesworld, -2015, 101, -2011));
  37. list.add(bottom_edge, loc.new(gamesworld, -2026, 101, -2011));
  38. list.add(bottom_edge, loc.new(gamesworld, -2037, 101, -2011));
  39. list.add(bottom_edge, loc.new(gamesworld, -2048, 101, -2011));
  40. list.add(bottom_edge, loc.new(gamesworld, -2059, 101, -2011));
  41. list.add(bottom_edge, loc.new(gamesworld, -2070, 101, -2011));
  42. list.add(bottom_edge, loc.new(gamesworld, -2081, 101, -2011));
  43. list.add(bottom_edge, loc.new(gamesworld, -2092, 101, -2011));
  44. list.add(bottom_edge, loc.new(gamesworld, -2103, 101, -2011));
  45. etagen = 6; //Anzahl der Etagen, auf denen die Vorlagen verteilt sind
  46. y_diff = 11; //Höhendifferenz zwischen den Etagen
  47. y = 90; //Y-Höhe der obersten Etage
  48. templates = list.new();
  49. bottom_templates = list.new();
  50. for(i = 0; i < etagen; i++) {
  51. list.add(templates, loc.new(gamesworld, -2004, y, -2000));
  52. list.add(templates, loc.new(gamesworld, -2015, y, -2000));
  53. list.add(templates, loc.new(gamesworld, -2026, y, -2000));
  54. list.add(templates, loc.new(gamesworld, -2037, y, -2000));
  55. list.add(templates, loc.new(gamesworld, -2048, y, -2000));
  56. list.add(templates, loc.new(gamesworld, -2059, y, -2000));
  57. list.add(templates, loc.new(gamesworld, -2070, y, -2000));
  58. list.add(templates, loc.new(gamesworld, -2081, y, -2000));
  59. list.add(templates, loc.new(gamesworld, -2092, y, -2000));
  60. list.add(templates, loc.new(gamesworld, -2103, y, -2000));
  61. list.add(bottom_templates, loc.new(gamesworld, -2004, y, -2011));
  62. list.add(bottom_templates, loc.new(gamesworld, -2015, y, -2011));
  63. list.add(bottom_templates, loc.new(gamesworld, -2026, y, -2011));
  64. list.add(bottom_templates, loc.new(gamesworld, -2037, y, -2011));
  65. list.add(bottom_templates, loc.new(gamesworld, -2048, y, -2011));
  66. list.add(bottom_templates, loc.new(gamesworld, -2059, y, -2011));
  67. list.add(bottom_templates, loc.new(gamesworld, -2070, y, -2011));
  68. list.add(bottom_templates, loc.new(gamesworld, -2081, y, -2011));
  69. list.add(bottom_templates, loc.new(gamesworld, -2092, y, -2011));
  70. list.add(bottom_templates, loc.new(gamesworld, -2103, y, -2011));
  71. y -= y_diff;
  72. }
  73. to_build_edges = list.new();
  74. bottom_check_edges = list.new();
  75. for(i = 0; i < solve_to_win; i++) {
  76. //Random Vorlage auswählen
  77. size = list.getSize(templates);
  78. picture_index = math.random(0, size - 1);
  79. //Random Vorlage zur Liste hinzufügen
  80. list.add(to_build_edges, list.getIndex(templates, picture_index));
  81. list.add(bottom_check_edges, list.getIndex(bottom_templates, picture_index));
  82. //Random Vorlage aus All-Liste entfernen
  83. list.removeIndex(templates, picture_index);
  84. list.removeIndex(bottom_templates, picture_index);
  85. }