Simplest FFXI Bot Ever

03/08/2016 22:49 Ryutoki#1
This bot does only one thing: spam the enter key forever! Very useful for crafting.

Simplest FFXI Bot Ever is open source:

Code:
#include <Windows.h>
#include <iostream>
using namespace std;

// Function Prototypes:
void Wait(double);
void Enter();

// main:
void main() {
	BYTE keyState[256];
	GetKeyboardState((LPBYTE)&keyState);
	bool spam = TRUE;

	cout << "\n Welcome to the simplest FINAL FANTASY XI bot ever! \n This bot does only one thing: spam the enter key forever! \n\n (NOTE: Bot program must be run as administrator in order to work, \n and the FFXI window must be in focus.) \n\n Press any key to begin spamming." << endl;

	cin.get();

	cout << " Starting in 3 seconds..." << endl;
	Wait(1); // Wait for 1 second...

	cout << " Starting in 2 seconds..." << endl;
	Wait(1); // Wait for 1 second...

	cout << " Starting in 1 second..." << endl;
	Wait(1); // Wait for 1 second...

	cout << " Now spamming the Enter key..." << endl;

	while (spam == TRUE) {
		Enter(); // Press Enter Key
		Wait(0.5); // Wait for half a second...
	}
} // End main()

// Wait:
void Wait(double secs) {
	int whole = (int)secs;
	int decimal = (int)((secs - whole) * 10);
	int time = (whole * 1000) + (decimal * 100);
	Sleep(time);
}

// Enter:
void Enter() {
	keybd_event(VK_RETURN, 0x1c, KEYEVENTF_EXTENDEDKEY | 0, 0); // Key Down
	keybd_event(VK_RETURN, 0x9c, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0); // Key Up
}
Zip file contains .exe executable program, original .cpp source code file, and a text document for assistance in modifying and/or expanding the program in order to make your own version (assuming you have knowledge of C++ and an IDE to compile code).
03/14/2016 00:19 Amnzero#2
So question.
I have a level 80 fisher that nearly instantly drains stamina on most low level fish.
so how would i make it so it just types
/fish

then waits about 10 seconds until the fish is out of stamina, then just hits "enter" to reel it in

then types /fish again?

sort of a super basic fish bot?
03/20/2016 18:57 Ryutoki#3
Making it fish isn't too difficult. All you have to do is make it type the keys and letters you want. I went ahead and made a modified version to do exactly that. Here's the code for it:

Code:
#include <Windows.h>
#include <iostream>
using namespace std;

// Function Prototypes:
void Wait(double);
void Enter();
void ForwardSlash();
void Space();
void Fish();

// main:
void main() {
	BYTE keyState[256];
	GetKeyboardState((LPBYTE)&keyState);
	bool spam = TRUE;

	cout << "\n Welcome to the simplest FINAL FANTASY XI fishing bot ever! \n This bot does only one thing: type \"/fish\" once every ten seconds and press the enter key forever! \n\n (NOTE: Bot program must be run as administrator in order to work, \n and the FFXI window must be in focus.) \n\n Press any key to begin spamming." << endl;

	cin.get();

	cout << " Starting in 3 seconds..." << endl;
	Wait(1); // Wait for 1 second...

	cout << " Starting in 2 seconds..." << endl;
	Wait(1); // Wait for 1 second...

	cout << " Starting in 1 second..." << endl;
	Wait(1); // Wait for 1 second...

	cout << " Now spamming \"/fish...\"" << endl;

	while (spam == TRUE) {
		Fish();	// Type the characters ' ', '/', 'f', 'i', 's', and 'h'
		Wait(0.5);	// Wait for half a second...
		Enter();	// Press the Enter Key
		Wait(10);	// Wait for ten seconds...
		Enter();	// Press the Enter Key again to reel in the fish
		Wait(5);	// Wait for five seconds...
	}
} // End main()

  // Wait:
void Wait(double secs) {
	int whole = (int)secs;
	int decimal = (int)((secs - whole) * 10);
	int time = (whole * 1000) + (decimal * 100);
	Sleep(time);
}


///	Key:	Make:	Break:	VK:
//	Enter	1c	9c	0d
//	Space	39	b9	20
//	/	35	b5	6f
//	f	21	a1
//	i	17	97
//	s	1f	9f
//	h	23	a3


// Enter:
void Enter() {
	keybd_event(VK_RETURN, 0x1c, KEYEVENTF_EXTENDEDKEY | 0, 0); // Key Down
	keybd_event(VK_RETURN, 0x9c, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0); // Key Up
}

// Forward Slash ('/'):
void ForwardSlash() {
	keybd_event(VK_DIVIDE, 0x6f, KEYEVENTF_EXTENDEDKEY | 0, 0); // Key Down
	keybd_event(VK_DIVIDE, 0x6f, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0); // Key Up
}

// Space:
void Space()
{
	keybd_event(VK_SPACE, 0x20, KEYEVENTF_EXTENDEDKEY | 0, 0); // Key Down
	keybd_event(VK_SPACE, 0x20, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0); // Key Up
}

// Fish:
void Fish() {
	Space(); // This is just to open up the text entry field in the chatlog.
	ForwardSlash();

	keybd_event(VkKeyScan('f'), 0xa1, 0, 0); // Key Down
	keybd_event(VkKeyScan('f'), 0xa1, KEYEVENTF_KEYUP, 0); // Key Up

	keybd_event(VkKeyScan('i'), 0x97, 0, 0); // Key Down
	keybd_event(VkKeyScan('i'), 0x97, KEYEVENTF_KEYUP, 0); // Key Up

	keybd_event(VkKeyScan('s'), 0x9f, 0, 0); // Key Down
	keybd_event(VkKeyScan('s'), 0x9f, KEYEVENTF_KEYUP, 0); // Key Up

	keybd_event(VkKeyScan('h'), 0xa3, 0, 0); // Key Down
	keybd_event(VkKeyScan('h'), 0xa3, KEYEVENTF_KEYUP, 0); // Key Up
}
10/02/2016 20:09 973L#4
nice !
08/15/2019 02:31 Bing1256#5
Quote:
Originally Posted by Ryutoki View Post
Making it fish isn't too difficult. All you have to do is make it type the keys and letters you want. I went ahead and made a modified version to do exactly that. Here's the code for it:

Code:
#include <Windows.h>
#include <iostream>
using namespace std;

// Function Prototypes:
void Wait(double);
void Enter();
void ForwardSlash();
void Space();
void Fish();

// main:
void main() {
	BYTE keyState[256];
	GetKeyboardState((LPBYTE)&keyState);
	bool spam = TRUE;

	cout << "\n Welcome to the simplest FINAL FANTASY XI fishing bot ever! \n This bot does only one thing: type \"/fish\" once every ten seconds and press the enter key forever! \n\n (NOTE: Bot program must be run as administrator in order to work, \n and the FFXI window must be in focus.) \n\n Press any key to begin spamming." << endl;

	cin.get();

	cout << " Starting in 3 seconds..." << endl;
	Wait(1); // Wait for 1 second...

	cout << " Starting in 2 seconds..." << endl;
	Wait(1); // Wait for 1 second...

	cout << " Starting in 1 second..." << endl;
	Wait(1); // Wait for 1 second...

	cout << " Now spamming \"/fish...\"" << endl;

	while (spam == TRUE) {
		Fish();	// Type the characters ' ', '/', 'f', 'i', 's', and 'h'
		Wait(0.5);	// Wait for half a second...
		Enter();	// Press the Enter Key
		Wait(10);	// Wait for ten seconds...
		Enter();	// Press the Enter Key again to reel in the fish
		Wait(5);	// Wait for five seconds...
	}
} // End main()

  // Wait:
void Wait(double secs) {
	int whole = (int)secs;
	int decimal = (int)((secs - whole) * 10);
	int time = (whole * 1000) + (decimal * 100);
	Sleep(time);
}


///	Key:	Make:	Break:	VK:
//	Enter	1c	9c	0d
//	Space	39	b9	20
//	/	35	b5	6f
//	f	21	a1
//	i	17	97
//	s	1f	9f
//	h	23	a3


// Enter:
void Enter() {
	keybd_event(VK_RETURN, 0x1c, KEYEVENTF_EXTENDEDKEY | 0, 0); // Key Down
	keybd_event(VK_RETURN, 0x9c, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0); // Key Up
}

// Forward Slash ('/'):
void ForwardSlash() {
	keybd_event(VK_DIVIDE, 0x6f, KEYEVENTF_EXTENDEDKEY | 0, 0); // Key Down
	keybd_event(VK_DIVIDE, 0x6f, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0); // Key Up
}

// Space:
void Space()
{
	keybd_event(VK_SPACE, 0x20, KEYEVENTF_EXTENDEDKEY | 0, 0); // Key Down
	keybd_event(VK_SPACE, 0x20, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0); // Key Up
}

// Fish:
void Fish() {
	Space(); // This is just to open up the text entry field in the chatlog.
	ForwardSlash();

	keybd_event(VkKeyScan('f'), 0xa1, 0, 0); // Key Down
	keybd_event(VkKeyScan('f'), 0xa1, KEYEVENTF_KEYUP, 0); // Key Up

	keybd_event(VkKeyScan('i'), 0x97, 0, 0); // Key Down
	keybd_event(VkKeyScan('i'), 0x97, KEYEVENTF_KEYUP, 0); // Key Up

	keybd_event(VkKeyScan('s'), 0x9f, 0, 0); // Key Down
	keybd_event(VkKeyScan('s'), 0x9f, KEYEVENTF_KEYUP, 0); // Key Up

	keybd_event(VkKeyScan('h'), 0xa3, 0, 0); // Key Down
	keybd_event(VkKeyScan('h'), 0xa3, KEYEVENTF_KEYUP, 0); // Key Up
}
Do you have a completed version of the fishing version? I have tried to change the code but cannot get it to do anything but hit enter.
Thank you!
09/23/2019 07:59 Ryutoki#6
Quote:
Originally Posted by Bing1256 View Post
Do you have a completed version of the fishing version? I have tried to change the code but cannot get it to do anything but hit enter.
Thank you!
That is the completed version. Do you have Microsoft Visual Studio installed? The code I provided above should work if you create a new C++ Windows Console Application project and just copy/paste the above code.
03/01/2020 11:50 LtPepper#7
It wont let me start the bot