以3 wonders为例这里给出一个我编写的c++脚本,打完最终boss后在bonnus total= 300000跳出来之前存档,并且加载一次资料,使得目前在“已加载资料”的界面中:
\b代表
4代表
O代表
40代表
38代表
keypress代表按下按键,keyrelease代表松开按键,sleep_for括号里面代表延迟多少毫秒
control->keyPress('\b');
std::this_thread::sleep_for(std::chrono::milliseconds(200));
control->keyRelease('\b');
std::this_thread::sleep_for(std::chrono::milliseconds(200));
control->keyPress('4');
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
control->keyRelease('4');
std::this_thread::sleep_for(std::chrono::milliseconds(500));
while (1)
{
for (int i = 0; i < 6; ++i)
{
std::this_thread::sleep_for(std::chrono::milliseconds(300));
control->keyPress('4');
std::this_thread::sleep_for(std::chrono::milliseconds(200));
control->keyRelease('4');
}
std::this_thread::sleep_for(std::chrono::milliseconds(300));
control->keyPress('O');
std::this_thread::sleep_for(std::chrono::milliseconds(120));
control->keyRelease('O');
std::this_thread::sleep_for(std::chrono::milliseconds(400));
control->keyPress(40);
std::this_thread::sleep_for(std::chrono::milliseconds(120));
control->keyRelease(40);
std::this_thread::sleep_for(std::chrono::milliseconds(230));
control->keyPress('\b');
std::this_thread::sleep_for(std::chrono::milliseconds(120));
control->keyRelease('\b');
std::this_thread::sleep_for(std::chrono::milliseconds(900));
control->keyPress('\b');
std::this_thread::sleep_for(std::chrono::milliseconds(120));
control->keyRelease('\b');
std::this_thread::sleep_for(std::chrono::milliseconds(600));
control->keyPress(38);
std::this_thread::sleep_for(std::chrono::milliseconds(100));
control->keyRelease(38);
std::this_thread::sleep_for(std::chrono::milliseconds(200));
control->keyPress('\b');
std::this_thread::sleep_for(std::chrono::milliseconds(120));
control->keyRelease('\b');
std::this_thread::sleep_for(std::chrono::milliseconds(3850));
control->keyPress('\b');
std::this_thread::sleep_for(std::chrono::milliseconds(120));
control->keyRelease('\b');
std::this_thread::sleep_for(std::chrono::milliseconds(200));
}
2023-02-16 12:55修改
湖南