Wink[SCRIPT] Test my special Bank Heist (super-hard mode)

Posts 1–15 of 16 · Page 1 of 2
[SCRIPT] Test my special Bank Heist (super-hard mode)
Run this after you're in-game on any Bank Heist job. It should work on multiplayer as well if you're hosting, perfect for trolling.

Your goals:
1) Rough up a few civilians.
2) Break into the vault and claim your reward.

Script:
Code:
function find_computer()
	local units = World:find_units_quick( "all" )
	for i,unit in ipairs( units ) do
		if unit.interaction and unit:interaction() and unit:interaction().tweak_data == "computer_test" then
			return unit
		end
	end
end

function spawn_loot(type, _position, z_offset)
	local position = mvector3.copy(_position)
	if z_offset then mvector3.set_z(position, position.z + z_offset) end
	if Network:is_client() then
		managers.network:session():send_to_host( "server_drop_carry", type, managers.money:get_bag_value( type ), nil, nil, 0, position, Rotation( math.UP, math.random() * 360 ), Vector3( 0,0,0 ), 0 )
	else 
		managers.player:server_drop_carry( type, managers.money:get_bag_value( type ), nil, nil, 0, position, Rotation( math.UP, math.random() * 360 ), Vector3( 0,0,0 ), 0 )
	end
end

function spawn(position, rotation)
	local unit_name = Idstring( "units/payday2/characters/ene_bulldozer_1/ene_bulldozer_1" )
	local spawn_ai = { init_state = "idle" }
	local unit = World:spawn_unit( unit_name, position, rotation )
	unit:base().made_of_gold = true
	unit:movement():set_character_anim_variables()
	unit:brain():set_spawn_ai( spawn_ai )
	unit:brain():set_active( true )
end

function spawn_cluster(position, num, cluster)
	for i=1,num do
		spawn(Vector3(position.x + (math.random() * cluster * 2 - cluster), position.y + (math.random() * cluster * 2 - cluster), position.z), Rotation( math.UP, math.random() * 360 ))
	end
end

if not _deadCop then _deadCop = CopDamage.die end
function CopDamage:die( variant )
	if self._unit:base().made_of_gold then
		spawn_loot("gold", self._unit:position(), 120)
	end
	return _deadCop(self, variant)
end

if not _drillDone then _drillDone = Drill.done end
function Drill:done()
	local result = _drillDone(self)
	if managers.job:current_level_id() == "branchbank" then
		local computer = find_computer()
		if computer and computer:position().x == -1281 then
			spawn_cluster(Vector3(-2068.93, 2197.47, 1.1), 3, 100)
			spawn_cluster(Vector3(-2222.62, 2285.03, 1.1), 3, 100)
		elseif computer and computer:position().x == -2920 then
			spawn_cluster(Vector3(-2246.11, 2061.04, 1.1), 3, 100)
			spawn_cluster(Vector3(-2175.62, 2285.41, 1.1), 3, 100)
		end
		Drill.done = _drillDone
		_drillDone = nil
	end
	return result
end

if not _deadCiv then _deadCiv = CivilianDamage.die end
function CivilianDamage:die( ... )
	spawn(self._unit:position(), self._unit:rotation())

	local result = _deadCiv( self, ... )
	self._unit:set_slot( 0 )
	managers.network:session():send_to_peers_synched( "remove_unit", self._unit )
	return result
end
Report back and let me know how your murderous exploits go!

Updates:
9/24/13 -- Dozers are made of gold now!
Haha I love it, the civs have a very very dark side, it works great.
Nice!

Not sure if it's supposed to work like this, but this is what happens when I run it. No cops, no alarms, any guards will stand still after being alerted, killing civvies DOES spawn bulldozers, but they dont do anything after spawning.
Quote Originally Posted by Sorox View Post
Nice!

Not sure if it's supposed to work like this, but this is what happens when I run it. No cops, no alarms, any guards will stand still after being alerted, killing civvies DOES spawn bulldozers, but they dont do anything after spawning.
Definitely not what is supposed to happen. There should be cops. There should be alarms. Guards should not stand still after being alerted. And dozers should move and shoot after spawning.

Example:
Dozers are made of gold now!
Hey, can you make it so that the bulldozers are replaced with cloakers? I know someone that made it so that all enemies were cloakers. Sure there Ai is not the best, but it would make a good troll and a WTF there are cloakers in Payday 2 now?
gold? i don't get it, tried this once in pub, game CTD lol.
Quote Originally Posted by Rampant_uterus View Post
gold? i don't get it, tried this once in pub, game CTD lol.
You have to be host. The dozers drop gold now (only dozers that are spawned by the script).
do these dozers do 2x dmg and have 4x health? otherwise >.>
I managed to finish it with my friends!

 
...
with 2x dmg, 2x armor, 10x health, armor peircing, unlimited ammo and 1 second armor regen
I know how in this one you made it so whenever you kill a civ a bulldozer replaces them, but could you make it so whenever you kill an enemy (cop,swat,fbi,etc) a bulldozer would spawn?
Idk if it can be done but would be great if it could, could troll very much with that.
Thanks.
Quote Originally Posted by sandman332 View Post
I know how in this one you made it so whenever you kill a civ a bulldozer replaces them, but could you make it so whenever you kill an enemy (cop,swat,fbi,etc) a bulldozer would spawn?
Idk if it can be done but would be great if it could, could troll very much with that.
Thanks.
Never ending requests from you.. for the silliest things.
If I could have 1 request, that would be for someone to make a script to spawn in cloakers. If I understood Lua and scripts I would do it myself.
This is gold...literally. Planning on doing this in Pub very soon to see reactions. "Okay vaults ope...OH Shiz! Bulldozers!"

Edit: People prompted freaked the hell out when they saw fifteen or so 'dozers...extremely amusing to see. Someone posted to twitter about it though, not good if goldfarb can do shit about it.
Quote Originally Posted by Solarian View Post
This is gold...literally. Planning on doing this in Pub very soon to see reactions. "Okay vaults ope...OH Shiz! Bulldozers!"

Edit: People prompted freaked the hell out when they saw fifteen or so 'dozers...extremely amusing to see. Someone posted to twitter about it though, not good if goldfarb can do shit about it.
Doesn't allow me to edit. Anyways, using the script has some interesting effects for certain events. If someone goes down and into custody their player model is still present. Then after they get released from custody they do not actually get back into play and Bain audio spams "They released [Hoxton] from custody, good work" until the mission is finished.
Posts 1–15 of 16 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?