--[[ ### Tea-Bag Lovin v1 ###]]-- --[[ ### for Phasor v2 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 makin sweet love with Oxide's corpse!" or "H® Shaft is doin the funky chicken 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 200 end function OnScriptLoad(process, game, persistent) end function OnClientUpdate(player) 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, causing, tagid, tagdata) if receiving then local r_object = getobject(receiving) if r_object then local player = objectaddrtoplayer(r_object) if player then local x,y,z = getobjectcoords(receiving) if victim_coords[player] == nil then victim_coords[player] = {} end if victim_coords[player] then victim_coords[player].x = x victim_coords[player].y = y victim_coords[player].z = z end end end end return nil 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"} -- 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