rebuildmap1.txt 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. gamesignsmap = getScriptVar("gamesigns");
  2. gamesignloc = map.get(gamesignsmap, "rebuildsign1");
  3. gamesworld = world.get("games");
  4. lobbyspawnloc = loc.new(gamesworld, 985, 85, 957);
  5. mapname = "§35x5";
  6. middleloc = loc.new(gamesworld, 3017, 101, 2989);
  7. radius = 100;
  8. minplayers = 1;
  9. maxplayers = 5;
  10. picture_length = 5;
  11. solve_to_win = 10;
  12. spawns = list.new();
  13. list.add(spawns, loc.new(gamesworld, 3017.5, 101, 2989.5));
  14. list.add(spawns, loc.new(gamesworld, 3009.5, 101, 2989.5));
  15. list.add(spawns, loc.new(gamesworld, 3001.5, 101, 2989.5));
  16. list.add(spawns, loc.new(gamesworld, 2993.5, 101, 2989.5));
  17. list.add(spawns, loc.new(gamesworld, 2985.5, 101, 2989.5));
  18. picture_edge = list.new();
  19. list.add(picture_edge, loc.new(gamesworld, 3019, 102, 2999));
  20. list.add(picture_edge, loc.new(gamesworld, 3011, 102, 2999));
  21. list.add(picture_edge, loc.new(gamesworld, 3003, 102, 2999));
  22. list.add(picture_edge, loc.new(gamesworld, 2995, 102, 2999));
  23. list.add(picture_edge, loc.new(gamesworld, 2987, 102, 2999));
  24. bottom_edge = list.new();
  25. list.add(bottom_edge, loc.new(gamesworld, 3019, 101, 2993));
  26. list.add(bottom_edge, loc.new(gamesworld, 3011, 101, 2993));
  27. list.add(bottom_edge, loc.new(gamesworld, 3003, 101, 2993));
  28. list.add(bottom_edge, loc.new(gamesworld, 2995, 101, 2993));
  29. list.add(bottom_edge, loc.new(gamesworld, 2987, 101, 2993));
  30. etagen = 9; //Anzahl der Etagen, auf denen die Vorlagen verteilt sind
  31. y_diff = 6; //Höhendifferenz zwischen den Etagen
  32. y = 107; //Y-Höhe der obersten Etage
  33. templates = list.new();
  34. bottom_templates = list.new();
  35. for(i = 0; i < etagen; i++) {
  36. list.add(templates, loc.new(gamesworld, 3016, y, 2973));
  37. list.add(templates, loc.new(gamesworld, 3006, y, 2973));
  38. list.add(templates, loc.new(gamesworld, 2996, y, 2973));
  39. list.add(templates, loc.new(gamesworld, 2986, y, 2973));
  40. list.add(templates, loc.new(gamesworld, 3016, y, 2963));
  41. list.add(templates, loc.new(gamesworld, 3006, y, 2963));
  42. list.add(templates, loc.new(gamesworld, 2996, y, 2963));
  43. list.add(templates, loc.new(gamesworld, 2986, y, 2963));
  44. list.add(bottom_templates, loc.new(gamesworld, 3016, y, 2967));
  45. list.add(bottom_templates, loc.new(gamesworld, 3006, y, 2967));
  46. list.add(bottom_templates, loc.new(gamesworld, 2996, y, 2967));
  47. list.add(bottom_templates, loc.new(gamesworld, 2986, y, 2967));
  48. list.add(bottom_templates, loc.new(gamesworld, 3016, y, 2957));
  49. list.add(bottom_templates, loc.new(gamesworld, 3006, y, 2957));
  50. list.add(bottom_templates, loc.new(gamesworld, 2996, y, 2957));
  51. list.add(bottom_templates, loc.new(gamesworld, 2986, y, 2957));
  52. y -= y_diff;
  53. }
  54. to_build_edges = list.new();
  55. bottom_check_edges = list.new();
  56. for(i = 0; i < solve_to_win; i++) {
  57. //Random Vorlage auswählen
  58. size = list.getSize(templates);
  59. picture_index = math.random(0, size - 1);
  60. //Random Vorlage zur Liste hinzufügen
  61. list.add(to_build_edges, list.getIndex(templates, picture_index));
  62. list.add(bottom_check_edges, list.getIndex(bottom_templates, picture_index));
  63. //Random Vorlage aus All-Liste entfernen
  64. list.removeIndex(templates, picture_index);
  65. list.removeIndex(bottom_templates, picture_index);
  66. }