Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ ### Game Defaults Setup v1 ###]]--
- --[[ ### by H® Shaft for Phasor v2 ###]]--
- -- don't edit --
- team_play = false
- falldamage = {}
- allowgrenades = {}
- default_frags = {}
- default_plasma = {}
- allowcamo = {}
- allowovershield = {}
- -- Edit the following table boolean values to your preferences --
- -- note: when fall damage is off/false, it can result in players being trapped
- -- also, when players fall thru the map, they can get trapped in falling forever
- -- fall damage on = true, off = false Boolean: -- trap areas:
- falldamage. beavercreek = false
- falldamage. bloodgulch = false
- falldamage. boardingaction = true -- between and beneath ships
- falldamage. carousel = false
- falldamage. chillout = true -- foggy pit area
- falldamage. damnation = true -- waterfall area
- falldamage. dangercanyon = true
- falldamage. deathisland = true
- falldamage. gephyrophobia = true -- beneath bridges and upper platforms
- falldamage. hangemhigh = false
- falldamage. icefields = false
- falldamage. infinity = true
- falldamage. longest = false
- falldamage. prisoner = true
- falldamage. putput = true
- falldamage. ratrace = false
- falldamage. sidewinder = false
- falldamage. timberland = false
- falldamage. wizard = true
- -- Allow Active-Camo? If set to true, Active-Camo is allowed, if false it won't spawn
- -- Map: Boolean:
- allowcamo. beavercreek = true -- battle creek
- allowcamo. bloodgulch = true
- allowcamo. boardingaction = true
- allowcamo. carousel = true -- derelict
- allowcamo. chillout = true
- allowcamo. damnation = true
- allowcamo. dangercanyon = true
- allowcamo. deathisland = true
- allowcamo. gephyrophobia = true
- allowcamo. hangemhigh = true
- allowcamo. icefields = true
- allowcamo. infinity = true
- allowcamo. longest = true
- allowcamo. prisoner = true
- allowcamo. putput = true -- chiron tl34
- allowcamo. ratrace = true
- allowcamo. sidewinder = true
- allowcamo. timberland = true
- allowcamo. wizard = true
- -- Allow Overshield? If set to true, Overshield is allowed, if false it won't spawn
- -- Map: Boolean:
- allowovershield. beavercreek = true -- battle creek
- allowovershield. bloodgulch = true
- allowovershield. boardingaction = true
- allowovershield. carousel = true -- derelict
- allowovershield. chillout = true
- allowovershield. damnation = true
- allowovershield. dangercanyon = true
- allowovershield. deathisland = true
- allowovershield. gephyrophobia = true
- allowovershield. hangemhigh = true
- allowovershield. icefields = true
- allowovershield. infinity = true
- allowovershield. longest = true
- allowovershield. prisoner = true
- allowovershield. putput = true -- chiron tl34
- allowovershield. ratrace = true
- allowovershield. sidewinder = true
- allowovershield. timberland = true
- allowovershield. wizard = true
- -- Allow grenades? If set to true, grenades are allowed
- -- Map: Boolean:
- allowgrenades. beavercreek = true -- battle creek
- allowgrenades. bloodgulch = true
- allowgrenades. boardingaction = true
- allowgrenades. carousel = true -- derelict
- allowgrenades. chillout = true
- allowgrenades. damnation = true
- allowgrenades. dangercanyon = true
- allowgrenades. deathisland = true
- allowgrenades. gephyrophobia = true
- allowgrenades. hangemhigh = true
- allowgrenades. icefields = true
- allowgrenades. infinity = true
- allowgrenades. longest = true
- allowgrenades. prisoner = true
- allowgrenades. putput = true -- chiron tl34
- allowgrenades. ratrace = true
- allowgrenades. sidewinder = true
- allowgrenades. timberland = true
- allowgrenades. wizard = true
- -- Default frag grenades count = Number of frags player will spawn with
- -- Map: # Frags:
- default_frags. beavercreek = 1 -- battle creek
- default_frags. bloodgulch = 2
- default_frags. boardingaction = 1
- default_frags. carousel = 1 -- derelict
- default_frags. chillout = 1
- default_frags. damnation = 1
- default_frags. dangercanyon = 2
- default_frags. deathisland = 2
- default_frags. gephyrophobia = 2
- default_frags. hangemhigh = 1
- default_frags. icefields = 2
- default_frags. infinity = 2
- default_frags. longest = 1
- default_frags. prisoner = 1
- default_frags. putput = 1 -- chiron tl34
- default_frags. ratrace = 1
- default_frags. sidewinder = 2
- default_frags. timberland = 2
- default_frags. wizard = 1
- -- Default plasma grenades count = Number of frags player will spawn with
- -- Map: # Plasmas:
- default_plasma. beavercreek = 1 -- battle creek
- default_plasma. bloodgulch = 1
- default_plasma. boardingaction = 1
- default_plasma. carousel = 1 -- derelict
- default_plasma. chillout = 1
- default_plasma. damnation = 1
- default_plasma. dangercanyon = 1
- default_plasma. deathisland = 1
- default_plasma. gephyrophobia = 1
- default_plasma. hangemhigh = 1
- default_plasma. icefields = 1
- default_plasma. infinity = 1
- default_plasma. longest = 1
- default_plasma. prisoner = 1
- default_plasma. putput = 1 -- chiron tl34
- default_plasma. ratrace = 1
- default_plasma. sidewinder = 1
- default_plasma. timberland = 1
- default_plasma. wizard = 1
- function GetRequiredVersion()
- return 200
- end
- function OnScriptLoad(process, game, persistent)
- if game == true or game == "PC" then
- GAME = "PC"
- gametype_base = 0x671340
- map_name = readstring(0x698F21)
- else
- GAME = "CE"
- gametype_base = 0x5F5498
- map_name = readstring(0x61D151)
- end
- if getteamplay() == true then team_play = true else team_play = false end
- -- setup default values if the map name is not listed in the tables
- if map_name then falldamage[map_name] = falldamage[map_name] or false end
- if map_name then allowgrenades[map_name] = allowgrenades[map_name] or false end
- if map_name then default_frags[map_name] = default_frags[map_name] or 0 end
- if map_name then default_plasma[map_name] = default_plasma[map_name] or 0 end
- if map_name then allowcamo[map_name] = allowcamo[map_name] or false end
- if map_name then allowovershield[map_name] = allowovershield[map_name] or false end
- end
- function OnNewGame(map)
- if GAME == "PC" then
- gametype_base = 0x671340
- map_name = readstring(0x698F21)
- elseif GAME == "CE" then
- gametype_base = 0x5F5498
- map_name = readstring(0x61D151)
- end
- if getteamplay() == true then team_play = true else team_play = false end
- -- setup default values if the map name is not listed in the tables
- if map_name then falldamage[map_name] = falldamage[map_name] or false end
- if map_name then allowgrenades[map_name] = allowgrenades[map_name] or false end
- if map_name then default_frags[map_name] = default_frags[map_name] or 0 end
- if map_name then default_plasma[map_name] = default_plasma[map_name] or 0 end
- if map_name then allowcamo[map_name] = allowcamo[map_name] or false end
- if map_name then allowovershield[map_name] = allowovershield[map_name] or false end
- end
- function getteamplay()
- if readbyte(gametype_base + 0x34) == 1 then
- return true
- else
- return false
- end
- end
- function OnPlayerJoin(player)
- if getplayer(player) then
- if not falldamage[map_name] then
- sendconsoletext(player, "Fall Damage is OFF")
- end
- end
- end
- function OnPlayerSpawn(player, m_objectId)
- if getplayer(player) then
- local m_objectId = getplayerobjectid(player)
- if m_objectId then
- local m_object = getobject(m_objectId)
- if m_object then
- if allowgrenades[map_name] then
- writebyte(m_object + 0x31E, default_frags[map_name])
- writebyte(m_object + 0x31F, default_plasma[map_name])
- else
- writebyte(m_object + 0x31E, 0)
- writebyte(m_object + 0x31F, 0)
- end
- end
- end
- end
- end
- function OnDamageLookup(receiving, causing, mapId)
- local tagname, tagtype = gettaginfo(mapId)
- if causing and receiving then
- local c_object = getobject(causing)
- local r_object = getobject(receiving)
- if c_object and r_object then
- local causer = objectaddrtoplayer(c_object)
- local receiver = objectaddrtoplayer(r_object)
- if causer and receiver then
- local c_team = getteam(causer)
- local r_team = getteam(receiver)
- if team_play and c_team == r_team and causer ~= receiver then
- return false
- end
- end
- end
- end
- if falldamage[map_name] and (tagname == "globals\\distance" or tagname == "globals\\falling") then
- odl_multiplier(1)
- elseif not falldamage[map_name] and (tagname == "globals\\distance" or tagname == "globals\\falling") then
- odl_multiplier(0.001)
- end
- return nil
- end
- function OnObjectCreationAttempt(mapId, parentId, player)
- if not allowcamo[map_name] then
- if mapId == gettagid("eqip", "powerups\\active camouflage") then
- return false
- end
- end
- if not allowovershield[map_name] then
- if mapId == gettagid("eqip", "powerups\\over shield") then
- return false
- end
- end
- if not allowgrenades[map_name] then
- if mapId == gettagid("eqip", "weapons\\frag grenade\\frag grenade") or mapId == gettagid("eqip", "weapons\\plasma grenade\\plasma grenade") then
- return false
- end
- end
- return nil
- end
- -- Created by H® Shaft thank you to Oxide, AelitePrime, Nugget & Wizard.
- -- Visit http://halorace.org/forum/index.php?topic=514.0 or
- -- Visit http://pastebin.com/u/HR_Shaft for more phasor scripts
Advertisement
Add Comment
Please, Sign In to add comment