Baddog-11

Instant Win v2.0

12 posts in this topic

This Script is for all those that complained that you don't get any EXP anymore when you use the normal Instant Win Script. This script is a combination of 3 different Scripts.
1. It instantly secures the maximum possible amount of the most expensive Bag in the mission.
2. It instantly adds a high amount of small loot
3. It instantly wins the round

I tested the script myself on White X-Mas mission and i got instantly 50.000.000 EXP

Spoiler

--Purpose: Instantly win any game, host only. v2.0 Add Bags/money for EXP
if ( not GameSetup ) then
	return
end
local pairs = pairs
local Application = Application
local digest_value = Application.digest_value --(number, false[convert back to number]/true[convert to string])
local Global = Global
local G_game_settings = Global.game_settings
local managers = managers
local M_network = managers.network
local M_loot = managers.loot
local secure_small_loot = M_loot.secure_small_loot
local get_secured_bonus_bags_amount = M_loot.get_secured_bonus_bags_amount
local tweak_data = tweak_data
local T_levels = tweak_data.levels
local T_money = tweak_data.money_manager
local T_M_bag_values = tweak_data.money_manager.bag_values
-- Secure most expensive Bag
local BEST_BAG = false
local get_the_most_expensive_bag = function()
	local best_val = 0
	local best_bag = ''
	local A = Application
	local digest_value = digest_value
	for name,val in pairs(T_M_bag_values) do
		val = digest_value( A, val, false ) --Why OVERKILL do that ?
		if ( val>best_val ) then
			best_val = val
			best_bag = name
		end
	end
	if ( best_bag == '' ) then
		m_log_error('{inventory_menu.lua}->get_the_most_expensive_bag()', 'best_bag is empty string. Mustn\'t happen actually.')
		best_bag = 'hope_diamond'
	end
	BEST_BAG = best_bag --Preload to don't iterate over again
	return best_bag
end
local secure_rupies = function()
	local level = G_game_settings.level_id
	if ( level ) then
		local bag_limit = T_levels[level].max_bags or 20 --This will be pointless to secure more than limit
		local best_bag = BEST_BAG or get_the_most_expensive_bag() --Detects the most expensive bag. Better than rechecking tweak datas again after update
		local secure = M_loot.secure
		for i = get_secured_bonus_bags_amount(M_loot) + 1, bag_limit do --To prevent oversecuring
			secure(M_loot, best_bag, 1, true)
		end
	end
end
-- Secure some Money
add_some_cash = function()
	for i = 13,37 do
		secure_small_loot(M_loot, "gen_atm", 3)
	end
end
-- Instant Win
you_winner = function()
secure_rupies()
add_some_cash()
	local num_winners = M_network:session():amount_of_alive_players()
	M_network._session:send_to_peers( "mission_ended", true, num_winners )
	game_state_machine:change_state_by_name( "victoryscreen", { num_winners = num_winners, personal_win = true } )
end
return you_winner

 

Installation :  Go to "...trainer\keybinded" and replace the old instant_win script with this one.  
9

Share this post


Link to post
Share on other sites

well done baddog, should make it into next version :)

3

Share this post


Link to post
Share on other sites

when i do this everybody in my lobby dissconects (only white xmas)

 

0

Share this post


Link to post
Share on other sites

This one is fantastic, thank you ever so much for sharing!

I have just one question:
I am taking a look at the code and can't really understand where I can tweak the "amount" of exp given. I mean this is wonderful but I like it to be way "lighter" in terms of reward so I can use it multiple times and level up at a lower pace. For now I enjoy playing Hoxton Breakout in DW but it is very time consuming, that's why I'd love to finish it quickly and just take enough exp for a couple of levels each time.

Reasons for that can be various but mostly is because I am yes a cheater but for relaxing purposes. If that makes sense :D

Thanks for all the help given!

0

Share this post


Link to post
Share on other sites

You can't change the Amount of EXP the script gives you since its only function is to find the most expensive Bag in the current mission and add as many Bags as possible till you have hit the Missions Bag limit and then instantly End the mission.

0

Share this post


Link to post
Share on other sites

Oh sure thing, I thought so.

I messed up with the script a lot (and redo my character a couple of times :D) and found a way to at least "contain" the exp flow.
Where it says:

local bag_limit = T_levels[level].max_bags or 20

I changed it into:

local bag_limit = 20

And increased/decreased the amount of bags until I was satisfied.

Oh and by the way, I tried multiple heists but only Cook Off gives experience points so far.
It is just me?

Thank you again for your awesome script!

0

Share this post


Link to post
Share on other sites

Its possible to lunch in multiplier for up my friend ? I have test this in multiplayer but my friend only crash 

 

0

Share this post


Link to post
Share on other sites
On 10/18/2016 at 8:26 PM, Derstro said:

Its possible to lunch in multiplier for up my friend ? I have test this in multiplayer but my friend only crash 

 

me too

0

Share this post


Link to post
Share on other sites
14 hours ago, Shojimeguro said:

me too

It works for me...

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Stop being a peeping tom and join the community.... we got cookies


Join the crew now

Sign in

Already part of the crew? Board right here


Sign In Now