summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoryn Aaron <zoryn4163@gmail.com>2016-02-28 23:15:38 -0500
committerZoryn Aaron <zoryn4163@gmail.com>2016-02-28 23:15:38 -0500
commit8eb0e5ffaad9b0048dc4024c3395593fb130ecc0 (patch)
treebbf26c3b4d261a72cf73bd061519f49670aa080f
parente60ed21dc7a15bf18e33d6cc3f563c7bc18d9e03 (diff)
downloadSMAPI-8eb0e5ffaad9b0048dc4024c3395593fb130ecc0.tar.gz
SMAPI-8eb0e5ffaad9b0048dc4024c3395593fb130ecc0.tar.bz2
SMAPI-8eb0e5ffaad9b0048dc4024c3395593fb130ecc0.zip
how to break fishing
-rw-r--r--README.md44
1 files changed, 44 insertions, 0 deletions
diff --git a/README.md b/README.md
index 547cc691..787d3c8d 100644
--- a/README.md
+++ b/README.md
@@ -59,4 +59,48 @@ It is recommended to subscribe to an event (from Events.cs) to be able to interf
Console.WriteLine("TestMod sees that the following key was pressed: " + key);
}
}
+ }
+
+
+Break Fishing (WARNING: SOFTLOCKS YOUR GAME):
+
+ public override void Entry()
+ {
+ Events.UpdateTick += Events_UpdateTick;
+ Events.Initialize += Events_Initialize;
+ }
+
+ private FieldInfo cmg;
+ private bool gotGame;
+ private SBobberBar sb;
+ void Events_Initialize()
+ {
+ cmg = SGame.StaticFields.First(x => x.Name == "activeClickableMenu");
+ }
+
+ void Events_UpdateTick()
+ {
+ if (cmg != null && cmg.GetValue(null) != null)
+ {
+ if (cmg.GetValue(null).GetType() == typeof(BobberBar))
+ {
+ if (!gotGame)
+ {
+ gotGame = true;
+ BobberBar b = (BobberBar)cmg.GetValue(null);
+ sb = SBobberBar.ConstructFromBaseClass(b);
+ }
+ else
+ {
+ sb.bobberPosition = Extensions.Random.Next(0, 750);
+ sb.treasure = true;
+ sb.distanceFromCatching = 0.5f;
+ }
+ }
+ else
+ {
+ gotGame = false;
+ sb = null;
+ }
+ }
} \ No newline at end of file