Skip to content
This repository was archived by the owner on Jun 12, 2019. It is now read-only.

Auto Fish

Tnze edited this page Jan 22, 2019 · 10 revisions

This guide shows how do you create a fishing robot using gomcbot. After you join a server, use g.UseItem(true) to swing your rod (which hold in hand beforehand). Then listening the sound of fish hooked and call g.UseItem(true) again to reel-in.

for e := range events { //Reciving events
	switch e {
	case mb.PlayerSpawnEvent:
		fmt.Println("Player is spawn! start fishing!")
		go func() {
			g.SetSoundCallBack(func(s int32) {
				if s == 184 { // 184 is the sound of fish hooked
					g.UseItem(true) //reeling
					time.Sleep(time.Millisecond * 500)
					g.UseItem(true) //swing
				}
			})
			g.UseItem(true) //swing
		}()
	}
}

After preparing fishing (look at water and hold a fishing rod), quit game and run the code. You could join with another account to check if robot is work.

Clone this wiki locally