Notifications
Clear all
2022-08-29 11:20
/*
* @Author: 失控的指令 冰巫师墨舞
* @Date: 2022-08-28 10:13:16
* @Last Modified by: ahq安河桥
* @Last Modified time: 2022-08-29 10:00:00
*/
#include "avz.h"
#include "avz_more.h"
using namespace AvZ;
using namespace cresc;
PaoOperator p1;
PaoOperator p3;
PaoOperator p5;
PaoOperator p7;
PaoOperator p;
int leng1 = 1314;
void Script()
{
AverageSpawn({ZOMBIE});
KeyConnect('X', [=]() { AvZ::SetGameSpeed(0.5); });
KeyConnect('Q', [=]() { AvZ::SetGameSpeed(5); });
KeyConnect('A', [=]() { AvZ::SetGameSpeed(2); });
KeyConnect('Z', [=]() { AvZ::SetGameSpeed(1); });
KeyConnect('S', [=]() { Card(FLOWER_POT,MouseRow(),MouseCol());Card(TALL_NUT,MouseRow(),MouseCol()); });
SetZombies({
PJ_0,
CG_3,
GL_7,
BC_12,
XC_15,
QQ_16,
TT_18,
BJ_20,
FT_21,
TL_22,
BY_23,
HY_32,
HY_32,
});
SelectCards({
ICE_SHROOM,
M_ICE_SHROOM,
DOOM_SHROOM,
CHERRY_BOMB,
JALAPENO,
SQUASH,
FLOWER_POT,
TALL_NUT,
COB_CANNON,
KERNEL_PULT,
});
SetTime(-599, 1);
p1.resetPaoList({{1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}});
p3.resetPaoList({{1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}});
p5.resetPaoList({{1, 5}, {2, 5}, {3, 5}, {5, 5}});
p7.resetPaoList({{1, 7}, {2, 7}, {3, 7}, {5, 7}});
SetTime(-599, 10);
p1.resetPaoList({{3, 1}, {4, 1}, {5, 1}, {1, 1}, {2, 1}});
p3.resetPaoList({{3, 3}, {4, 3}, {5, 3}, {1, 3}, {2, 3}});
p5.resetPaoList({{3, 5}, {4, 5}, {5, 5}, {2, 5}});
p7.resetPaoList({{3, 7}, {4, 7}, {5, 7}, {2, 7}});
SetTime(-599, 20);
p1.resetPaoList({{1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}});
p3.resetPaoList({{1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}});
p5.resetPaoList({{1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}});
p7.resetPaoList({{1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}});
p.autoGetPaoList();
for (auto wave : {1, 11}) {
SetTime(379 - 387, wave);
p3.roofPao(2, 9);
p5.roofPao(4, 9);
SetTime(379 + 142 - 387);
p1.roofPao(2, 8.9125);
Delay(129 + 3);
p3.roofPao(2, 8.65);
SetTime(379 + 147 - 387);
p7.roofPao(4, 8.4875);
Delay(136 - 4);
p5.roofPao(4, 8.7125);
SetTime(601 + 32 - 100);
Card(FLOWER_POT, 5, 9);
Card(ICE_SHROOM, 5, 9);
SetPlantActiveTime(ICE_SHROOM, 100);
Delay(101);
Shovel(5, 9);
}
for (auto wave : {2}) {
SetTime(leng1 - 200 - 387, wave);
p1.roofPao(2, 9.0625);
p7.roofPao(4, 8.6);
Delay(212);
p3.roofPao(2, 7.775);
p5.roofPao(4, 7.775);
}
for (auto wave : {12}) {
SetTime(leng1 - 200 - 387, wave);
p1.roofPao(2, 9.1375);
p7.roofPao(4, 8.675);
Delay(212);
p3.roofPao(2, 7.775);
p.rawRoofPao(1, 5, 4, 7.775);
}
for (auto wave : {3}) {
SetTime(400 - 387, wave);
p.rawRoofPao(4, 7, 2, 9);
SetTime(400 - 387 + 219);
Shovel(4, 7);
Card(KERNEL_PULT, 4, 7);
Card(M_ICE_SHROOM, 4, 8);
SetPlantActiveTime(ICE_SHROOM, 420);
Delay(751);
Card(KERNEL_PULT, 4, 8);
Card(COB_CANNON, 4, 7);
SetTime(400 + 107 - 387);
p1.roofPao(2, 8.85);
p7.roofPao(4, 8.3875);
Delay(129);
p1.roofPao(2, 8.75);
p.rawRoofPao(4, 5, 4, 8.75);
}
for (auto wave : {13}) {
SetTime(400 - 387, wave);
p.rawRoofPao(1, 7, 4, 8.45);
SetTime(400 - 387 + 219);
Shovel(1, 7);
Card(KERNEL_PULT, 1, 7);
Card(M_ICE_SHROOM, 1, 8);
SetPlantActiveTime(ICE_SHROOM, 420);
Delay(751);
Card(KERNEL_PULT, 1, 8);
Card(COB_CANNON, 1, 7);
SetTime(400 + 107 - 387);
p1.roofPao(2, 8.85);
p7.roofPao(4, 8.3875);
Delay(129);
p1.roofPao(2, 8.75);
p5.roofPao(4, 8.75);
}
for (auto wave : {4, 14}) {
SetTime(leng1 - 200 - 387, wave);
p3.roofPao(2, 8.675);
p7.roofPao(4, 8.5875);
Delay(212);
p3.roofPao(2, 8.5375);
p5.roofPao(4, 8.4125);
}
for (auto wave : {5}) {
SetTime(225 - 387, wave);
p1.roofPao(2, 9.1625);
p.rawRoofPao(4, 7, 4, 8.65);
Delay(107);
p3.roofPao(2, 8.1875);
p5.roofPao(4, 8.1875);
}
for (auto wave : {15}) {
SetTime(225 - 387, wave);
p1.roofPao(2, 9.1625);
p.rawRoofPao(1, 7, 4, 8.65);
Delay(107);
p3.roofPao(2, 8.1875);
p5.roofPao(4, 8.1875);
SetTime(44);
Card(FLOWER_POT, 5, 9);
SetTime(396);
Card(TALL_NUT, 5, 9);
}
for (auto wave : {6}) {
SetTime(294 - 100, wave);
Card(FLOWER_POT, 3, 9);
Card(DOOM_SHROOM, 3, 9);
SetTime(294 + 106 - 387);
p1.roofPao(2, 8.4125);
p7.roofPao(4, 8.45);
Delay(107);
p3.roofPao(2, 8.75);
p5.roofPao(4, 8.75);
}
for (auto wave : {16}) {
SetTime(294 - 100, wave);
Card(FLOWER_POT, 2, 9);
Card(DOOM_SHROOM, 2, 9);
SetTime(294 + 106 - 387);
p1.roofPao(2, 8.4125);
p7.roofPao(4, 8.45);
Delay(107);
p3.roofPao(2, 8.75);
p5.roofPao(4, 8.75);
}
for (auto wave : {7}) {
SetTime(369 - 387, wave);
p1.roofPao(2, 9);
p7.roofPao(4, 9);
Delay(128);
p3.roofPao(2, 8.475);
p5.roofPao(4, 8.35);
SetTime(601 + 1 - 100);
Card(FLOWER_POT, 5, 9);
Card(ICE_SHROOM, 5, 9);
SetPlantActiveTime(ICE_SHROOM, 100);
Delay(101);
Card(SQUASH, 5, 9);
Delay(126);
Card(KERNEL_PULT, 5, 9);
Delay(751);
Card(FLOWER_POT, 1, 9);
Card(KERNEL_PULT, 1, 9);
Delay(751);
Card(KERNEL_PULT, 4, 5);
Delay(751);
Card(KERNEL_PULT, 4, 6);
Card(COB_CANNON, 4, 5);
}
for (auto wave : {17}) {
SetTime(369 - 387, wave);
p1.roofPao(2, 9);
p7.roofPao(4, 9);
Delay(128);
p3.roofPao(2, 8.475);
p.rawRoofPao(1, 5, 4, 8.35);
SetTime(369 + 128 - 387 + 223);
Shovel(1, 5);
SetTime(601 + 1 - 100);
Card(FLOWER_POT, 5, 9);
Card(ICE_SHROOM, 5, 9);
SetPlantActiveTime(ICE_SHROOM, 100);
Delay(101);
Card(SQUASH, 5, 9);
Delay(126);
Card(KERNEL_PULT, 5, 9);
Delay(751);
Card(FLOWER_POT, 1, 9);
Card(KERNEL_PULT, 1, 9);
Delay(751);
Card(KERNEL_PULT, 1, 5);
Delay(751);
Card(KERNEL_PULT, 1, 6);
Card(COB_CANNON, 1, 5);
}
for (auto wave : {8}) {
SetTime(393 - 387, wave);
p1.roofPao(2, 9);
p1.roofPao(2, 9);
p.rawRoofPao(4, 5, 4, 9);
SetTime(393 - 387 + 223);
Shovel(4, 5);
Card(JALAPENO, 4, 6);
SetTime(1100 - 387);
p7.roofPao(3, 8.15);
SetTime(1160);
Shovel({{1, 9}, {1, 9}, {5, 9}, {5, 9}});
SetTime(1472 - 387);
p3.roofPao(2, 9);
p7.roofPao(4, 9);
Delay(212);
p3.roofPao(2, 7.4125);
p5.roofPao(4, 7.4125);
}
for (auto wave : {18}) {
SetTime(393 - 387, wave);
p1.roofPao(2, 9);
p1.roofPao(3, 9);
p5.roofPao(4, 9);
SetTime(393 - 100);
Card(JALAPENO, 1, 6);
SetTime(1100 - 387);
p7.roofPao(3, 8.15);
SetTime(1160);
Shovel({{1, 9}, {1, 9}, {5, 9}, {5, 9}});
SetTime(1472 - 387);
p3.roofPao(2, 9);
p7.roofPao(4, 9);
Delay(212);
p3.roofPao(2, 7.4125);
p5.roofPao(4, 7.4125);
}
for (auto wave : {9}) {
SetTime(359 - 387, wave);
p1.roofPao(2, 9);
p.rawRoofPao(4, 7, 4, 9);
Delay(107);
p3.roofPao(2, 7.825);
p5.roofPao(4, 7.825);
SetTime(359 + 107 - 420);
Card(M_ICE_SHROOM, 4, 6);
SetPlantActiveTime(ICE_SHROOM, 420);
SetTime(1067 - 387);
p1.roofPao(2, 9);
p7.roofPao(4, 9);
Delay(212);
p3.roofPao(2, 8.75);
p5.roofPao(4, 8.75);
SetTime(1951 - 387);
p1.roofPao(2, 9);
p7.roofPao(4, 9);
}
for (auto wave : {19}) {
SetTime(330 - 387, wave);
p1.roofPao(2, 9.1625);
p.rawRoofPao(1, 7, 4, 9);
Delay(107);
p3.roofPao(2, 7.9625);
p5.roofPao(4, 7.9625);
SetTime(330 + 107 - 420);
Card(M_ICE_SHROOM, 1, 6);
SetPlantActiveTime(ICE_SHROOM, 420);
SetTime(1038 - 387);
p1.roofPao(2, 9);
p7.roofPao(4, 9);
Delay(212);
p3.roofPao(2, 8.75);
p5.roofPao(4, 8.75);
SetTime(2185 - 387);
p1.roofPao(2, 9);
p7.roofPao(4, 9);
Delay(387);
Card(FLOWER_POT, 5, 9);
SetTime(2185, 19);
RecoverCard(ICE_SHROOM, 5, 9);
}
for (auto wave : {10}) {
SetTime(226 - 100, wave);
Card(FLOWER_POT, 4, 9);
Card(DOOM_SHROOM, 4, 9);
SetTime(287 - 387);
p1.roofPao(2, 9.0375);
p7.roofPao(4, 9);
Delay(107);
p3.roofPao(2, 8.875);
p5.roofPao(4, 8.875);
}
for (auto wave : {20}) {
SetTime(199 - 387, wave);
p1.roofPao(2, 8.3125);
p7.roofPao(4, 8.3125);
SetTime(1000 - 387);
p.roofPao({{2, 9}, {2, 9}, {4, 9}, {4, 9}, {2, 9}, {2, 9}, {4, 9}, {4, 9}});
}
InsertTimeOperation(0, 3, [=]() {
if (isZombieExist(ZOMBONI, 5)) {
SetTime(400, 3);
Card(FLOWER_POT, 5, 9);
Card(CHERRY_BOMB, 5, 9);
Delay(101);
Shovel(5, 9);
} else {
SetTime(300, 3);
Card(FLOWER_POT, 5, 9);
Card(CHERRY_BOMB, 5, 9);
Delay(101);
Shovel(5, 9);
}
});
InsertTimeOperation(0, 13, [=]() {
if (isZombieExist(ZOMBONI, 1)) {
SetTime(400, 13);
Card(FLOWER_POT, 1, 9);
Card(CHERRY_BOMB, 1, 9);
Delay(101);
Shovel(1, 9);
} else {
SetTime(300, 13);
Card(FLOWER_POT, 1, 9);
Card(CHERRY_BOMB, 1, 9);
Delay(101);
Shovel(1, 9);
}
});
}
6 Replies
2022-08-29 11:26
四个月前看到渐强的ME20,没想到这个童年的小游戏还能用脚本控制,所以有了兴趣下载了vsc,暑假即将结束,就发个这个作为离别吧,很高兴能和大家在群里聊天讨论,祝大家一切安好!
2023-01-19 15:10
这个阵的脚本复制粘贴到avz1,为啥运行不了啊