Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ ### Tea-Bag Lovin v1-057 ###]]--
- --[[ ### for Phasor 057 by H® Shaft ###]]--
- -- Detects victim location. You must be near the victims death to be able to tea-bag them.
- -- derived from AelitePrime's t-bag script, but with fixes, he had errors on lines 52 and 56 (receiver_id) which caused it not to work.
- -- added some stanky lovin to it: When a player tea-bags their victim, it announces various phrases:
- -- "H® Shaft is playin' hide the salami with Oxide's corpse!" or "H® Shaft is ridin' the wild pony with Oxide's corpse!"
- -- 10 Different variations, add your own! (add a quoted sex act to the sexsayin table at the bottom, separated by a comma)
- -- yes, you can now tea-bag your own corpse, you sick self-lovin bastard.
- -- don't edit --
- crouch = {}
- victim_coords = {}
- tbag = {}
- function GetRequiredVersion()
- return 10057
- end
- function OnClientUpdate(player, m_objectId)
- local m_player = getplayer(player)
- local id = resolveplayer(player)
- local m_objectId = getplayerobjectid(player)
- local m_object = getobject(m_objectId)
- if tbag[player] == nil then
- tbag[player] = {}
- end
- if m_objectId then
- if tbag[player].name and tbag[player].x then
- if check_sphere(m_objectId, tbag[player].x, tbag[player].y, tbag[player].z, 10) then
- if m_object then
- if getobject(readdword(m_object, 0x11C)) == nil then
- local obj_crouch = readbyte(m_object, 0x2A0)
- if obj_crouch == 3 and crouch[id] == nil then
- crouch[id] = OnPlayerCrouch(player)
- elseif obj_crouch ~= 3 then
- crouch[id] = nil
- end
- end
- if crouch[id] == false then
- writebit(m_object, 0x208, 7, 0)
- end
- end
- end
- end
- end
- end
- function OnPlayerKill(killer, victim, mode)
- tbag[victim] = {}
- if mode == 4 then
- tbag[killer].count = 0
- tbag[killer].name = getname(victim)
- if victim_coords[victim] == nil then victim_coords[victim] = {} end
- if victim_coords[victim].x then
- tbag[killer].x = victim_coords[victim].x
- tbag[killer].y = victim_coords[victim].y
- tbag[killer].z = victim_coords[victim].z
- end
- elseif mode == 6 then
- tbag[victim].count = 0
- tbag[victim].name = getname(victim)
- if victim_coords[victim] == nil then victim_coords[victim] = {} end
- if victim_coords[victim].x then
- tbag[victim].x = victim_coords[victim].x
- tbag[victim].y = victim_coords[victim].y
- tbag[victim].z = victim_coords[victim].z
- end
- end
- end
- function OnDamageLookup(receiving_obj, causing_obj, tagdata, tagname)
- local receiver = objecttoplayer(receiving_obj)
- local causer = objecttoplayer(causing_obj)
- if receiver ~= nil then
- local r_object = getobject(receiver)
- if r_object then
- local x,y,z = getobjectcoords(receiver)
- if victim_coords[receiver] == nil then
- victim_coords[receiver] = {}
- end
- if victim_coords[receiver] then
- victim_coords[receiver].x = x
- victim_coords[receiver].y = y
- victim_coords[receiver].z = z
- end
- end
- end
- end
- function OnPlayerCrouch(player)
- if tbag[player].count == nil then
- tbag[player].count = 0
- end
- tbag[player].count = tbag[player].count + 1
- if tbag[player].count == 4 then
- tbag[player].count = 0
- local sexact = generatesexact(sexslang)
- say(getname(player).. " is " .. sexact .. " with " .. tbag[player].name .. "'s corpse!")
- tbag[player].name = nil
- end
- return true
- end
- function check_sphere(m_objectId, X, Y, Z, R)
- local Pass = false
- if getobject(m_objectId) then
- local x,y,z = getobjectcoords(m_objectId)
- if (X - x)^2 + (Y - y)^2 + (Z - z)^2 <= R then
- Pass = true
- end
- end
- return Pass
- end
- function generatesexact(sexslang)
- local sexcount = #sexsayin
- local sex_verb = getrandomnumber(1, sexcount+1)
- local sex_type = string.format("%s", sexsayin[sex_verb])
- if sex_type then
- return sex_type
- else
- return nil
- end
- end
- sexsayin = {"makin' sweet love", "bumpin' uglies", "bumpin' fuzzies", "butterin' the muffin", "doin' the funky chicken",
- "ridin' the wild pony", "makin' bacon", "doggie-stylin'", "playin' hide the salami", "slappin' bellies", "humpin' the rump"}
- function OnScriptLoad(process) end
- function OnGameEnd(mode) end
- function OnServerChat(player, chattype, message) return 1 end
- function OnPlayerSpawn(player, m_objectId) end
- function OnScriptUnload() end
- function OnNewGame(map) end
- function OnServerCommand(player, command) return 1 end
- function OnTeamDecision(team) return team end
- function OnPlayerJoin(player, team) end
- function OnPlayerLeave(player, team) end
- function OnKillMultiplier(player, multiplier) end
- function OnPlayerSpawnEnd(player, m_objectId) end
- function OnTeamChange(relevant, player, team, dest_team) return 1 end
- function OnWeaponReload(player, weapon) return 1 end
- function OnVehicleEject(player, forceEject) return 1 end
- function OnWeaponAssignment(player, object, count, tag) end
- function OnObjectCreation(m_objectId, player_owner, tag) end
- function OnVehicleEntry(relevant, player, vehicleId, vehicle_tag, seat) return 1 end
- function OnObjectInteraction(player, m_ObjectId, tagType, tagName) return 1 end
- -- functions by Oxide, Smiley, Chalonic & =CE= Chris --
- -- 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
Advertisement