how to break fishing
This commit is contained in:
parent
e60ed21dc7
commit
8eb0e5ffaa
44
README.md
44
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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue