Advertisement
HR_Shaft

Hyperspace! for SAPP and stock PC/CE Maps

Nov 5th, 2015
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 21.96 KB | None | 0 0
  1. -- Hyperspace! for SAPP with stock PC/CE Maps
  2. -- by H® Shaft
  3.  
  4. -- Enables players to hyperspace jump (teleport) to random locations by pressing their flashlight key ('q' standard key), in or out of a vehicle
  5. -- All games: allows broad use of the entire map, not just spawn locations. Hyperspace coordinates are balanced for team games and you can add your own
  6. -- Natural danger: sometimes you will hyperspace and die (fall thru map, under vehicles, etc)
  7. -- CTF and Oddball: You cannot engage hyperspace while holding the Oddball or Flag
  8. -- You can set the number of times a player may engage hyperspace per life and per game, even if they quit and rejoin: counts are bound to players CD hash.
  9. -- You can enable/disable if the player can engage hyperspace while in a hog, or ghost (Tanks, Turrets & Banshees cannot hyperspace)
  10. -- Admins may type "coord" to display and record into sapp log the map name and coordinates to allow you to setup coordinates of your own
  11.  
  12. -- edit to your preference:
  13. -- Number of times a player may hyperspace jump during one game.
  14. hyper_limit_game = 12
  15.  
  16. -- Number of times a player may hyperspace jump during one lifetime. When player dies, this resets to zero.
  17. hyper_limit_life = 3   
  18.  
  19. -- Enable Hyperspace while driving a vehicle? true = enable, false = disable  (Tanks, Turrets & Banshees are disabled by default)
  20. enable_vehicle_hyperspace = true   
  21.  
  22.  
  23. -- sapp api version
  24. api_version = "1.9.0.0"
  25.  
  26. function OnScriptLoad()
  27.     register_callback(cb['EVENT_TICK'],"OnTick")
  28.     register_callback(cb['EVENT_GAME_START'], "OnNewGame")
  29.     register_callback(cb['EVENT_CHAT'], "OnPlayerChat")
  30.     register_callback(cb['EVENT_JOIN'], "OnPlayerJoin")
  31.     register_callback(cb['EVENT_DIE'], "OnPlayerDeath")
  32.     register_callback(cb['EVENT_VEHICLE_ENTER'], "OnVehicleEntry")
  33.     register_callback(cb['EVENT_VEHICLE_EXIT'], "OnVehicleExit")
  34.     if get_var(0, "$gt") ~= "n/a" then
  35.         map_name = get_var(0,"$map")       
  36.         Load_Tables()
  37.     end
  38. end
  39.  
  40. function OnNewGame()
  41.     map_name = get_var(0,"$map")
  42.     Load_Tables()
  43.     for i=1,16 do
  44.         if player_present(i) then
  45.             local hash = get_var(i,"$hash")
  46.             hyper_calls_game[hash] = hyper_calls_game[hash] or 0
  47.             hyper_calls_life[hash] = hyper_calls_life[hash] or 0
  48.             player_vehicle[i] = nil
  49.         end
  50.     end    
  51. end
  52.  
  53. function OnPlayerJoin(PlayerIndex)
  54.     if player_alive(PlayerIndex) then
  55.         local hash = get_var(PlayerIndex,"$hash")
  56.         hyper_calls_game[hash] = hyper_calls_game[hash] or 0
  57.         hyper_calls_life[hash] = hyper_calls_life[hash] or 0
  58.         player_vehicle[PlayerIndex] = nil
  59.         say(PlayerIndex, "Hyperspace Enabled! Press Flashlight button (Q) to activate Hyperspace Jump.")
  60.     end
  61. end
  62.  
  63. function OnPlayerLeave(PlayerIndex)
  64.     player_vehicle[PlayerIndex] = nil
  65. end
  66.  
  67. function OnPlayerDeath(PlayerIndex, Killer)
  68.     if player_present(PlayerIndex) then
  69.         local hash = get_var(PlayerIndex,"$hash")
  70.         hyper_calls_life[hash] = 0
  71.         player_vehicle[PlayerIndex] = nil
  72.     end
  73. end
  74.  
  75. function OnVehicleEntry(PlayerIndex, Seat)
  76.     if Seat == "0" then
  77.         if enable_vehicle_hyperspace then
  78.             player_vehicle[PlayerIndex] = GetPlayerVehicleTagName(PlayerIndex)
  79.             if (player_vehicle[PlayerIndex] ~= nil) then
  80.                 if ((player_vehicle[PlayerIndex] == "vehicles\\ghost\\ghost_mp") or (player_vehicle[PlayerIndex] == "vehicles\\rwarthog\\rwarthog") or (player_vehicle[PlayerIndex] == "vehicles\\warthog\\mp_warthog")) then
  81.                     say(PlayerIndex, "Hyperspace Enabled! Press Flashlight button (Q) to activate Hyperspace Jump.")
  82.                 end
  83.             end
  84.         end
  85.     else
  86.         player_vehicle[PlayerIndex] = nil
  87.     end
  88. end
  89.  
  90. function OnVehicleExit(PlayerIndex)
  91.     player_vehicle[PlayerIndex] = nil
  92. end
  93.    
  94. function OnPlayerChat(PlayerIndex, Message)
  95.     local response = nil
  96.     local Message = string.lower(Message)
  97.     local isadmin = nil
  98.     if (tonumber(get_var(PlayerIndex,"$lvl"))) > 0 then
  99.         isadmin = true
  100.     else
  101.         isadmin = false
  102.     end    
  103.     -- | type "coord" to retrieve your coordinates x,y,z
  104.     -- | records map name and coordinates entries into log: map name, x,y,z
  105.     if (Message == "coord") then
  106.         if isadmin == true then
  107.             local player_static = get_player(PlayerIndex)
  108.             local x,y,z = GetPlayerCoords(PlayerIndex)
  109.             local map_name = get_var(0,"$map")
  110.             local data = string.format("%s, %s, %s, %s, %s", tostring(map_name),tostring(x),tostring(y),tostring(z))
  111.             execute_command("log_note \""..data.."\"")     
  112.             say(PlayerIndex, "X: " .. x .. "  Y: " .. y .. "  Z: " .. z)
  113.             response = false
  114.         else
  115.             response = true
  116.         end
  117.     end
  118.     return response
  119. end
  120.  
  121. function OnTick()
  122.     for PlayerIndex=1,16 do
  123.         if player_alive(PlayerIndex) then
  124.             local player_object = get_dynamic_player(PlayerIndex)
  125.             local player_obj_id = read_dword(get_player(PlayerIndex) + 0x34)
  126.             local vehicleId = read_dword(player_object + 0x11C)
  127.             local vehicle_object = get_object_memory(vehicleId)
  128.             if (player_object ~= 0) then
  129.                 if isinvehicle(PlayerIndex) then
  130.                     local bool = false
  131.                     if PlayerIsDriver(PlayerIndex) and (read_bit(player_object + 0x208, 4) == 1) then
  132.                         if enable_vehicle_hyperspace then
  133.                             if ((player_vehicle[PlayerIndex] == "vehicles\\c gun turret\\c gun turret_mp") or (player_vehicle[PlayerIndex] == "vehicles\\scorpion\\scorpion_mp") or (player_vehicle[PlayerIndex] == "vehicles\\banshee\\banshee_mp")) then
  134.                                 bool = true
  135.                             end
  136.                             if (bool == true) then
  137.                                 say(PlayerIndex, "**OOPS** You cannot hyperspace while in the tank, turret or banshee!")   
  138.                             else
  139.                                 player_obj_id = vehicleId
  140.                                 OnHyperSpace(PlayerIndex, player_obj_id)
  141.                             end
  142.                         end
  143.                     end
  144.                 else
  145.                     bool = false
  146.                     if (read_bit(player_object + 0x208, 4) == 1) then
  147.                         OnHyperSpace(PlayerIndex, player_obj_id)
  148.                     end            
  149.                 end
  150.             end
  151.         end
  152.     end
  153. end                    
  154.  
  155. function OnHyperSpace(PlayerIndex, player_obj_id)
  156.     local coord = SelectHyperCoord()
  157.     local hash = get_var(PlayerIndex,"$hash")
  158.     hyper_calls_game[hash] = hyper_calls_game[hash] or 0
  159.     hyper_calls_life[hash] = hyper_calls_life[hash] or 0
  160.     local player_object = get_dynamic_player(PlayerIndex)  
  161.     local weaponId = read_dword(player_object + 0x118)
  162.     local weap_obj = get_object_memory(weaponId)
  163.     if (player_object ~= 0) then
  164.         if (weap_obj ~= 0) then
  165.             local weap_name = read_string(read_dword(read_word(weap_obj) * 32 + 0x40440038))
  166.             if (weap_name == "weapons\\flag\\flag") or (weap_name == "weapons\\ball\\ball") then
  167.                 say(PlayerIndex, "**OOPS** You cannot hyperspace while holding oddball or flag!")
  168.                 goto continue
  169.             end
  170.         end
  171.         if hyper_calls_life[hash] < hyper_limit_life then
  172.             if hyper_calls_game[hash] < hyper_limit_game then
  173.                 if coord then
  174.                     moveobject(player_obj_id, hyperspace_coord[coord][1], hyperspace_coord[coord][2], hyperspace_coord[coord][3]+0.15)
  175.                     write_dword(get_player(PlayerIndex) + 0xF0, 0)
  176.                     write_dword(get_player(PlayerIndex) + 0x164, 0)
  177.                 end
  178.                 hyper_calls_game[hash] = hyper_calls_game[hash] + 1
  179.                 hyper_calls_life[hash] = hyper_calls_life[hash] + 1
  180.                 say(PlayerIndex, "You have " .. hyper_limit_life - hyper_calls_life[hash] .. " hyperspace jumps remaining this LIFE and " .. hyper_limit_game - hyper_calls_game[hash].. " remaining this GAME.")
  181.             else
  182.                 say(PlayerIndex, "**OOPS** You have 0 Hyperspace Jumps remaining this GAME.")
  183.             end
  184.         else
  185.             say(PlayerIndex, "**OOPS** You have 0 Hyperspace Jumps remaining this LIFE.")
  186.         end
  187.     end
  188.     ::continue::   
  189. end
  190.  
  191. function SelectHyperCoord()
  192.     if #hyperspace_coord > 0 then
  193.         return rand(1, #hyperspace_coord+1)
  194.     end
  195.     return nil 
  196. end
  197.  
  198. function GetPlayerVehicleTagName(PlayerIndex)
  199.     if isinvehicle(PlayerIndex) then
  200.         local player_object = get_dynamic_player(PlayerIndex)
  201.         local vehicleId = read_dword(player_object + 0x11C)
  202.         local vehicle_obj = get_object_memory(vehicleId)
  203.         local veh_name = read_string(read_dword(read_word(vehicle_obj) * 32 + 0x40440038))
  204.         if veh_name ~= nil then
  205.             return veh_name
  206.         else
  207.             return nil
  208.         end
  209.     end
  210. end
  211.  
  212. function GetPlayerCoords(PlayerIndex)
  213.     local player_object = get_dynamic_player(PlayerIndex)
  214.     if (player_object ~= 0) then
  215.         local x,y,z = read_vector3d(get_dynamic_player(PlayerIndex) + 0x5C)
  216.         local vehicle_objectid = read_dword(player_object + 0x11C)
  217.         local vehicle_object = get_object_memory(vehicle_objectid)
  218.         if(vehicle_object ~= 0 and vehicle_object ~= nil) then
  219.             local vx,vy,vz = read_vector3d(vehicle_object + 0x5C)
  220.             x = x + vx
  221.             y = y + vy
  222.             z = z + vz
  223.         end
  224.         return math.round(x, 2),math.round(y, 2),math.round(z, 2)
  225.     end
  226.     return nil 
  227. end
  228.  
  229. function isinvehicle(PlayerIndex)
  230.     local player_object = get_dynamic_player(PlayerIndex)
  231.     local vehicleId = read_dword(player_object + 0x11C)
  232.     if vehicleId == 0xFFFFFFFF then
  233.         return false
  234.     else
  235.         return true
  236.     end
  237. end
  238.  
  239. function PlayerIsDriver(PlayerIndex)
  240.     if (player_alive(PlayerIndex) == false) then return false end
  241.     local player_object = get_dynamic_player(PlayerIndex)
  242.     local player_object_id = read_dword(get_player(PlayerIndex) + 0x34)
  243.     local vehicleId = read_dword(player_object + 0x11C)
  244.     if (vehicleId == 0xFFFFFFFF) then return false end
  245.     local obj_id = get_object_memory(vehicleId)
  246.     return read_dword(obj_id + 0x324) == player_object_id
  247. end
  248.        
  249. function moveobject(ObjectID, x, y, z)
  250.     local object = get_object_memory(ObjectID)
  251.     if get_object_memory(ObjectID) ~= 0 then
  252.         local veh_obj = get_object_memory(read_dword(object + 0x11C))
  253.         write_vector3d((veh_obj ~= 0 and veh_obj or object) + 0x5C, x, y, z)
  254.     end
  255. end
  256.  
  257. function math.round(num, idp)
  258.   return tonumber(string.format("%." .. (idp or 0) .. "f", num))
  259. end
  260.  
  261. function Load_Tables()
  262.     hyperspace_coord = {}
  263.     hyper_calls_game = {}
  264.     hyper_calls_life = {}
  265.     player_vehicle = {}
  266.     for i=1,16 do
  267.         if player_present(i) then
  268.             local hash = get_var(i,"$hash")
  269.             hyper_calls_game[hash] = hyper_calls_game[hash] or 0
  270.             hyper_calls_life[hash] = hyper_calls_life[hash] or 0
  271.             player_vehicle[i] = GetPlayerVehicleTagName(i)
  272.         end
  273.     end
  274.    
  275.     if map_name == "bloodgulch" then
  276.         hyperspace_coord[1] = {27.765, -68.956, 0.814}
  277.         hyperspace_coord[2] = {78.675, -65.064, 5.124}
  278.         hyperspace_coord[3] = {71.056, -87.134, 5.934}
  279.         hyperspace_coord[4] = {24.034, -108.528, 2.814}
  280.         hyperspace_coord[5] = {68.872, -94.818, 1.934}
  281.         hyperspace_coord[6] = {95.161, -90.663, 5.414}
  282.         hyperspace_coord[7] = {104.015, -108.722, 2.014}
  283.         hyperspace_coord[8] = {99.938, -112.221, 4.484}
  284.         hyperspace_coord[9] = {75.196, -132.243, 0.224}
  285.         hyperspace_coord[10] = {46.746, -150.693, 4.664}
  286.         hyperspace_coord[11] = {62.088, -155.783, 6.094}
  287.         hyperspace_coord[12] = {115.724, -127.820, 1.904}
  288.         hyperspace_coord[13] = {125.209, -180.481, 6.514}
  289.         hyperspace_coord[14] = {78.985, -179.657, 1.854}
  290.         hyperspace_coord[15] = {58.753, -123.087, 0.554}   
  291.     elseif map_name == "dangercanyon" then
  292.         hyperspace_coord[1] = {34.736, -7.265, -0.776}
  293.         hyperspace_coord[2] = {51.490, 29.940, -9.556}
  294.         hyperspace_coord[3] = {27.078, 26.459, 0.454}
  295.         hyperspace_coord[4] = {21.222, 53.724, -8.886}
  296.         hyperspace_coord[5] = {4.750, 36.134, -7.886}
  297.         hyperspace_coord[6] = {-4.682, 47.397, -7.886}
  298.         hyperspace_coord[7] = {-26.567, 46.216, -9.516}
  299.         hyperspace_coord[8] = {-26.740, 26.168, 0.424}
  300.         hyperspace_coord[9] = {-58.930, 19.913, -9.046}
  301.         hyperspace_coord[10] = {-35.574, -7.524, -0.826}
  302.         hyperspace_coord[11] = {-0.095, 16.004, -0.480}
  303.         hyperspace_coord[12] = {-16.163, 20.354, 0.480}
  304.         hyperspace_coord[13] = {16.305, 20.547, 0.480}
  305.         hyperspace_coord[14] = {4.931, 33.303, 0.480}
  306.         hyperspace_coord[15] = {-4.972, 33.261, 0.480}
  307.         hyperspace_coord[16] = {-5.517, 54.629, 0.710}
  308.         hyperspace_coord[17] = {5.023, 55.362, 0.710}      
  309.     elseif map_name == "deathisland" then
  310.         hyperspace_coord[1] = {-33.178, -24.972, 10.068}
  311.         hyperspace_coord[2] = {-37.525, 21.940, 15.068}
  312.         hyperspace_coord[3] = {-75.184, 18.807, 2.218}
  313.         hyperspace_coord[4] = {-68.700, 19.106, 15.638}
  314.         hyperspace_coord[5] = {-30.180, 53.309, 11.168}
  315.         hyperspace_coord[6] = {-18.347, 35.498, 15.138}
  316.         hyperspace_coord[7] = {15.143, 44.042, 4.318}
  317.         hyperspace_coord[8] = {8.737, 28.474, 10.558}
  318.         hyperspace_coord[9] = {5.428, 10.959, 12.518}
  319.         hyperspace_coord[10] = {-28.905, 9.967, 23.038}
  320.         hyperspace_coord[11] = {-22.920, -28.805, 20.398}
  321.         hyperspace_coord[12] = {11.705, -20.327, 18.938}
  322.         hyperspace_coord[13] = {4.943, -28.034, 3.628}
  323.         hyperspace_coord[14] = {-23.681, -41.145, 8.318}
  324.         hyperspace_coord[15] = {43.185, -41.258, 2.678}
  325.         hyperspace_coord[16] = {43.238, -36.708, 13.958}
  326.         hyperspace_coord[17] = {35.804, -1.491, 9.388}
  327.         hyperspace_coord[18] = {33.087, 33.355, 7.898}
  328.         hyperspace_coord[19] = {18.616, 30.431, 18.388}
  329.         hyperspace_coord[20] = {8.155, -2.428, 20.878}
  330.         hyperspace_coord[21] = {40.705, 45.331, 3.418}
  331.         hyperspace_coord[22] = {34.775, 17.417, 5.378}
  332.         hyperspace_coord[23] = {-69.873, 12.690, 2.268}
  333.         hyperspace_coord[24] = {-29.030, -7.034, 5.938}
  334.     elseif map_name == "icefields" then
  335.         hyperspace_coord[1] = {22.750, 9.500, 1.3}
  336.         hyperspace_coord[2] = {-0.625, -0.458, 2.925}
  337.         hyperspace_coord[3] = {-22.699, 15.685, 9.275}
  338.         hyperspace_coord[4] = {-29.200, 49.053, 9.135}
  339.         hyperspace_coord[5] = {-52.994, 65.216, 2.705}
  340.         hyperspace_coord[6] = {-77.914, 54.044, 1.3}
  341.         hyperspace_coord[7] = {-45.024, 28.381, 1.3}
  342.         hyperspace_coord[8] = {-5.641, 36.686, 1.3}
  343.     elseif map_name == "gephyrophobia" then
  344.         hyperspace_coord[1] = {68.81, -110.08, -0.184}
  345.         hyperspace_coord[2] = {64.28, -74.03, -0.184}
  346.         hyperspace_coord[3] = {68.95, -39.61, -0.184}
  347.         hyperspace_coord[4] = {-19.89, -32.06, -0.184}
  348.         hyperspace_coord[5] = {-21.19, -78.55, -0.184}
  349.         hyperspace_coord[6] = {-21.34, -106.19, -0.184}    
  350.         hyperspace_coord[7] = {39.549, -69.047, -12.195}
  351.         hyperspace_coord[8] = {14.079, -74.159, -12.195}
  352.         hyperspace_coord[9] = {26.886, -72.053, 11.405}
  353.         hyperspace_coord[10] = {23.062, -40.741, -17.845}
  354.         hyperspace_coord[11] = {30.367, -105.614, -17.845}
  355.         hyperspace_coord[12] = {26.840, -72.365, -16.675}
  356.     elseif map_name == "infinity" then
  357.         hyperspace_coord[1] = {0.728, -165.882, 13.411}
  358.         hyperspace_coord[2] = {49.620, -138.104, 15.361}
  359.         hyperspace_coord[3] = {-42.124, -118.236, 14.071}
  360.         hyperspace_coord[4] = {-20.727, -63.191, 12.821}
  361.         hyperspace_coord[5] = {27.663, -66.958, 11.601}
  362.         hyperspace_coord[6] = {55.543, -0.009, 10.051}
  363.         hyperspace_coord[7] = {-1.968, 49.324, 10.121}
  364.         hyperspace_coord[8] = {-51.869, 4.706, 11.761}
  365.         hyperspace_coord[9] = {3.624, -41.338, 27.761}
  366.         hyperspace_coord[10] = {2.766, -84.036, 27.641}
  367.         hyperspace_coord[11] = {-0.536, -78.371, 13.781}
  368.         hyperspace_coord[12] = {22.859, -45.771, 14.38}
  369.     elseif map_name == "sidewinder" then
  370.         hyperspace_coord[1] = {-32.938, -13.044, -0.721}
  371.         hyperspace_coord[2] = {33.985, -12.170, -1.581}
  372.         hyperspace_coord[3] = {-0.321, 25.175, -3.651}
  373.         hyperspace_coord[4] = {-35.259, 10.442, -3.251}
  374.         hyperspace_coord[5] = {40.533, 11.924, -3.641}
  375.         hyperspace_coord[6] = {10.084, -12.067, 0.509}
  376.         hyperspace_coord[7] = {-4.426, -11.080, 0.509}
  377.         hyperspace_coord[8] = {-45.192, 39.458, 0.349}
  378.         hyperspace_coord[9] = {46.377, 39.846, 0.349}
  379.     elseif map_name == "timberland" then
  380.         hyperspace_coord[1] = {-38.672, 33.566, -19.331}
  381.         hyperspace_coord[2] = {32.380, 31.987, -20.941}
  382.         hyperspace_coord[3] = {25.598, 13.687, -20.681}
  383.         hyperspace_coord[4] = {-17.864, 12.050, -20.441}
  384.         hyperspace_coord[5] = {-24.920, -12.816, -20.441}
  385.         hyperspace_coord[6] = {21.240, -9.139, -20.671}
  386.         hyperspace_coord[7] = {39.357, -34.002, -19.341}
  387.         hyperspace_coord[8] = {-28.002, -30.099, -19.831}
  388.         hyperspace_coord[9] = {3.732, -15.392, -21.501}
  389.         hyperspace_coord[10] = {1.619, 16.556, -21.501}
  390.     elseif map_name == "beavercreek" then -- battle creek  
  391.         hyperspace_coord[1] = {16.984, 19.294, 5.364}
  392.         hyperspace_coord[2] = {10.970, 21.504, 3.104}
  393.         hyperspace_coord[3] = {6.433, 17.221, 3.224}
  394.         hyperspace_coord[4] = {6.429, 10.395, 3.224}
  395.         hyperspace_coord[5] = {-0.528, 18.334, -0.046}
  396.         hyperspace_coord[6] = {3.401, 9.412, -0.046}
  397.         hyperspace_coord[7] = {17.798, 5.751, 3.744}
  398.         hyperspace_coord[8] = {13.403, 6.129, 5.014}
  399.         hyperspace_coord[9] = {22.597, 16.795, 2.244}
  400.         hyperspace_coord[10] = {22.852, 10.768, 2.244}
  401.         hyperspace_coord[11] = {28.746, 8.869, -0.016}
  402.         hyperspace_coord[12] = {24.236, 18.087, -0.016}
  403.         hyperspace_coord[13] = {13.967, 14.560, -0.246}
  404.     elseif map_name == "boardingaction" then
  405.         hyperspace_coord[1] = {18.010, 19.843, 5.471}
  406.         hyperspace_coord[2] = {20.968, -10.919, 5.471}
  407.         hyperspace_coord[3] = {21.019, -3.501, 3.081}
  408.         hyperspace_coord[4] = {17.766, 14.506, 3.081}
  409.         hyperspace_coord[5] = {18.928, 18.882, -2.009}
  410.         hyperspace_coord[6] = {16.315, 0.910, -2.009}
  411.         hyperspace_coord[7] = {20.069, -19.093, -2.009}
  412.         hyperspace_coord[8] = {1.412, -19.032, -2.009}
  413.         hyperspace_coord[9] = {3.289, -0.977, -2.009}
  414.         hyperspace_coord[10] = {2.671, 16.779, -4.509}
  415.         hyperspace_coord[11] = {3.108, -13.714, -4.509}
  416.         hyperspace_coord[12] = {0.086, -10.078, 0.431}
  417.         hyperspace_coord[13] = {0.553, 14.843, 0.431}
  418.         hyperspace_coord[14] = {0.218, 18.366, 2.951}
  419.         hyperspace_coord[15] = {0.518, -14.468, 2.951}
  420.         hyperspace_coord[16] = {1.560, -19.892, 5.401}
  421.         hyperspace_coord[17] = {-1.495, 11.778, 5.401}
  422.     elseif map_name == "carousel" then -- derelict
  423.         hyperspace_coord[1] = {0.045, 0.460, -0.575}
  424.         hyperspace_coord[2] = {9.145, 0.269, -0.575}
  425.         hyperspace_coord[3] = {0.048, -8.718, -0.575}
  426.         hyperspace_coord[4] = {-9.010, -0.065, -0.575}
  427.         hyperspace_coord[5] = {-0.024, 8.831, -0.575}
  428.         hyperspace_coord[6] = {13.755, 5.636, -0.575}
  429.         hyperspace_coord[7] = {-13.835, -5.731, -0.575}
  430.         hyperspace_coord[8] = {0.012, -0.063, -2.395}
  431.         hyperspace_coord[9] = {0.009, -5.978, -2.395}
  432.         hyperspace_coord[10] = {5.951, -0.144, -2.395}
  433.         hyperspace_coord[11] = {0.055, 6.002, -2.395}
  434.         hyperspace_coord[12] = {-5.774, 0.020, -2.395}
  435.         hyperspace_coord[13] = {1.694, 13.831, -3.255}
  436.         hyperspace_coord[14] = {-1.822, -13.972, -3.255}
  437.     elseif map_name == "chillout" then
  438.         hyperspace_coord[1] = {1.512, 10.120, 0.861}
  439.         hyperspace_coord[2] = {-1.749, 11.100, 4.301}
  440.         hyperspace_coord[3] = {5.190, 12.174, 2.241}
  441.         hyperspace_coord[4] = {5.051, 7.015, 3.681}
  442.         hyperspace_coord[5] = {1.508, 4.784, 3.291}
  443.         hyperspace_coord[6] = {3.651, -0.384, 2.531}
  444.         hyperspace_coord[7] = {-0.944, -0.475, 2.901}
  445.         hyperspace_coord[8] = {1.463, -1.988, 0.111}
  446.         hyperspace_coord[9] = {9.715, 0.897, 0.111}
  447.         hyperspace_coord[10] = {8.550, 10.841, 0.111}
  448.         hyperspace_coord[11] = {-6.089, 1.016, 0.111}
  449.         hyperspace_coord[12] = {-9.279, 0.963, 1.781}
  450.         hyperspace_coord[13] = {-7.982, 6.448, 0.301}
  451.         hyperspace_coord[14] = {11.075, 3.795, 3.656}
  452.         hyperspace_coord[15] = {8.558, 1.047, 2.546}
  453.     elseif map_name == "damnation" then
  454.         hyperspace_coord[1] = {3.606, 7.521, 3.521}
  455.         hyperspace_coord[2] = {-7.431, 7.966, 3.521}
  456.         hyperspace_coord[3] = {-9.837, 1.488, -0.069}
  457.         hyperspace_coord[4] = {-1.893, -1.537, -0.069}
  458.         hyperspace_coord[5] = {2.431, 1.635, 0.171}
  459.         hyperspace_coord[6] = {-6.946, -6.078, 0.011}
  460.         hyperspace_coord[7] = {-5.797, -7.364, 3.591}
  461.         hyperspace_coord[8] = {5.887, 2.985, 3.591}
  462.         hyperspace_coord[9] = {1.126, -5.936, 3.591}
  463.         hyperspace_coord[10] = {7.188, -9.800, 4.611}
  464.         hyperspace_coord[11] = {9.843, -5.068, 6.821}
  465.         hyperspace_coord[12] = {-0.717, -0.966, 8.341}
  466.         hyperspace_coord[13] = {-6.386, 11.847, 3.531}
  467.         hyperspace_coord[14] = {1.300, 13.085, 1.471}
  468.     elseif map_name == "hangemhigh" then
  469.         hyperspace_coord[1] = {16.02, -7.17, -3.46}
  470.         hyperspace_coord[2] = {21.04, -1.80, -4.40}
  471.         hyperspace_coord[3] = {34.57, -5.06, -5.58}
  472.         hyperspace_coord[4] = {29.01, -16.60, -5.58}
  473.         hyperspace_coord[5] = {15.63, -18.05, -5.58}
  474.         hyperspace_coord[6] = {7.12, -21.80, -7.95}
  475.         hyperspace_coord[7] = {21.56, -2.44, -9.25}
  476.         hyperspace_coord[8] = {31.54, 11.73, -7.95}
  477.         hyperspace_coord[9] = {34.85, 14.85, -5.13}
  478.     elseif map_name == "longest" then
  479.         hyperspace_coord[1] = {-6.813, -9.464, 2.151}
  480.         hyperspace_coord[2] = {2.110, -10.611, 2.151}
  481.         hyperspace_coord[3] = {4.885, -19.451, 2.151}
  482.         hyperspace_coord[4] = {-3.831, -18.137, 2.151}
  483.         hyperspace_coord[5] = {-15.149, -10.811, 0.161}
  484.         hyperspace_coord[6] = {13.305, -18.204, 0.161}
  485.     elseif map_name == "prisoner" then
  486.         hyperspace_coord[1] = {-11.247, 3.474, 1.513}
  487.         hyperspace_coord[2] = {3.645, 4.985, 1.513}
  488.         hyperspace_coord[3] = {-9.275, 3.999, 3.363}
  489.         hyperspace_coord[4] = {9.139, -3.615, 3.363}
  490.         hyperspace_coord[5] = {-1.508, -0.147, 1.493}
  491.         hyperspace_coord[6] = {10.011, 3.252, -0.237}
  492.         hyperspace_coord[7] = {-9.109, 3.958, -0.237}  
  493.     elseif map_name == "putput" then -- chiron tl34
  494.         hyperspace_coord[1] = {33.424, -9.752, 1.503}
  495.         hyperspace_coord[2] = {-3.036, -5.018, 0.833}
  496.         hyperspace_coord[3] = {-3.162, -34.607, 3.573}
  497.         hyperspace_coord[4] = {13.607, -31.400, 2.923}
  498.         hyperspace_coord[5] = {14.796, -20.330, 0.293}
  499.     elseif map_name == "ratrace" then
  500.         hyperspace_coord[1] = {6.930, 2.812, -0.333}
  501.         hyperspace_coord[2] = {-7.843, -14.639, -2.013}
  502.         hyperspace_coord[3] = {20.718, 0.094, -1.963}
  503.         hyperspace_coord[4] = {2.537, -24.147, -3.453}
  504.         hyperspace_coord[5] = {11.573, -11.296, 0.357}
  505.         hyperspace_coord[6] = {-3.391, -13.534, 0.357}
  506.         hyperspace_coord[7] = {16.691, -19.692, -1.003}
  507.     elseif map_name == "wizard" then
  508.         hyperspace_coord[1] = {4.586, -5.058, -4.2}
  509.         hyperspace_coord[2] = {5.155, 4.820, -4.2}
  510.         hyperspace_coord[3] = {-4.733, 5.064, -4.2}
  511.         hyperspace_coord[4] = {-4.794, -4.913, -4.2}
  512.         hyperspace_coord[5] = {-9.209, -9.249, -2.3}
  513.         hyperspace_coord[6] = {9.270, 9.235, -2.3}
  514.  
  515.     -- add your map name below @ "YOUR_MAP_NAME"
  516.     -- remove the "--" below (in front of 'elseif') and add your map name, and replace 0,0,0 with your custom coordinates
  517.     -- ensure the index ([index]) is numbered sequentially 1,2,3,4 etc
  518.    
  519.     -- elseif map_name == "YOUR_MAP_NAME" then
  520.         --hyperspace_coord[1] = {0,0,0}
  521.         --hyperspace_coord[2] = {0,0,0}
  522.         --hyperspace_coord[3] = {0,0,0}
  523.         --hyperspace_coord[4] = {0,0,0}
  524.         --hyperspace_coord[5] = {0,0,0}
  525.         --hyperspace_coord[6] = {0,0,0}
  526.         --hyperspace_coord[7] = {0,0,0}
  527.         --hyperspace_coord[8] = {0,0,0}    
  528.        
  529.     end
  530. end
  531.  
  532. function OnError(Message)
  533.     print(debug.traceback())
  534. end
  535.  
  536. -- Created by H® Shaft
  537. -- Visit http://halorace.org/forum/index.php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement