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 Feb 19, 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 g.GetEvents() {
		switch e.(type) {
		case bot.PlayerSpawnEvent:
			log.Println("join server")
			g.UseItem(true) //swing
		case bot.SoundEffectEvent:
			s := e.(bot.SoundEffectEvent).Sound
			if s == 184 { // 184 is the sound of fish hooked
				g.UseItem(true) //reeling
				time.Sleep(time.Millisecond * 500)
				g.UseItem(true) //next 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.

In multi-game, this robot may be effected by other angler (if they are near enough that robot can "hear" the sound their fish bits) fishing machine is not needed

Clone this wiki locally