Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local total = 1
- local status = 2
- local wait_time = 0
- local get_loot_box = function()
- EchoConsole("Get box " .. tostring(total))
- local loot_interface = Managers.backend:get_interface("loot")
- loot_interface:generate_end_of_level_loot(true, true, "hardest", "catacombs", 3, 4, 2, "bright_wizard", 312050, 313370, nil, nil)
- total = total + 1
- end
- Mods.hook.set("", "BackendInterfaceLootPlayfab.end_of_level_loot_request_cb", function(func, self, id, result)
- func(self, id, result)
- status = 2
- end)
- Mods.hook.set("", "MatchmakingManager.update", function(func, self, dt, t)
- safe_pcall(function()
- if status == 0 then
- if total < 100 then
- get_loot_box()
- status = 1
- else
- Mods.exec("loadfile", "chest_open")
- end
- elseif status == 2 then
- wait_time = t
- status = 3
- elseif status == 3 then
- if wait_time + 1 < t then
- status = 0
- end
- end
- end)
- return func(self, dt, t)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement