Skip to content

Instantly share code, notes, and snippets.

@CaptainPRICE
Last active August 31, 2016 20:53
Show Gist options
  • Save CaptainPRICE/5237200cdde685e63f9af1dadfe2c819 to your computer and use it in GitHub Desktop.
Save CaptainPRICE/5237200cdde685e63f9af1dadfe2c819 to your computer and use it in GitHub Desktop.
I was pissed how Dollhouse achievement is somehow "protected" (the internal function simply didn't work inside a loop/hook/timer and so on), compared to others in achievements library, so I have found a way around it - as usually.
-- Whatever I have tried... It just simply did not increment Dollhouse achievement, it seems it is "protected" in some awkward way.
-- See: https://imgur.com/a/mT7aA
--local DollhouseID = 25
--[[hook.Add("Think", "Dollhouse achievement unlocker", function()
if achievements.GetCount(DollhouseID) < achievements.GetGoal(DollhouseID) then
achievements.SpawnedRagdoll()
print(achievements.GetName(DollhouseID), achievements.GetCount(DollhouseID) .. " / " .. achievements.GetGoal(DollhouseID))
else
timer.Simple(1.0, function() hook.Remove("Think", "Dollhouse achievement unlocker") end)
end
end)]]
--[[timer.Create("Dollhouse achievement unlocker", 0.01, 0, function()
if achievements.GetCount(DollhouseID) < achievements.GetGoal(DollhouseID) then
achievements.SpawnedRagdoll()
print(achievements.GetName(DollhouseID), achievements.GetCount(DollhouseID) .. " / " .. achievements.GetGoal(DollhouseID))
else
timer.Remove("Dollhouse achievement unlocker")
end
end)]]
-- Other failure attempts...
-- lua_openscript_cl ... include ... fuckin' achievement still doesn't want to increment! ...
-- .......
// 13 minutes later, I have figured how to get around it. Copy and paste the following line into console (while in-game, preferably singleplayer instead of multiplayer), several times:
sv_allowcslua "1"; alias "unlock_dollhouse" "lua_run_cl achievements.SpawnedRagdoll()"; lua_run_cl for _ = 1, achievements.GetGoal(25) - achievements.GetCount(25) do RunConsoleCommand("unlock_dollhouse") end
// Enjoy your new stats,
// CaptainPRICE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment