RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
622
Author
RedAlert
Contributors
b@ldr
Quickbar Entry
javascript:$.getScript('https://twscripts.dev/scripts/massAttackPlanner.js');
Public?
Public
Mass Attack Planner

Approved: t14001534

This is a mass attack planner script.

mass-attack-planner.jpg

Here is how it works:

The script does not necessarily require PA to be used.
The script does require popups to be allowed on the browser.

The script itself can work even if you supply it with a large amount of villages. So you could tell the script to prepare a plan to attack like 20 villages and have to send on each target village 3 clearing nukes + 1 noble train + 1 support ... the script wont have a problem preparing the plan ... but you wont be able to save this kind of plan on the ingame Notebook (because of the bracket limitation).

For any bugs, suggestions, questions and or if you need help with the script, let me know by replying on the thread.
 
Last edited:
Upvote 4

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
622
Hello @.MAXIMUS. ,

With the current script infrastructure it is impossible to implement these suggestions.
It would require quiet a lot of changes on the script to be able to implement at least the easiest one of these 2 requests which is a "Send" button.

At the moment I'm not planning to spend that much time on this script but will add these suggestions on the TODO list.

Thank you!
 

.MAXIMUS.

Well-Known Member
Reaction score
18
Glad to hear that the "SEND" button is the easiest to implement as it is the most important.

it would be great if you could find the time to implement it.

Thanks for all the work.
 

Mercenaries

New Member
Reaction score
0
Hi @misteralb. I totally love this script, but I noticed that on Cas12 the script is calculating the times with 2 hours early than the actual launching times.

I have to mention that I'm using the script from the in-game Quick bar.

Would it be possible to implement some text boxes in which we would be able to set the World/ Troop speeds?

Cheers!
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
622
Hello @Mercenaries ,

Thank you for reporting this issue.

Does this time calculation issue happens all the time?

Also, is it always the same, 2 hours or its more random?
 

Mercenaries

New Member
Reaction score
0
@misteralb Sorry for the late reply, had a rough week at work.

It happens every time and it's a 2 hours difference, not random. This is the reason why I believe the script doesn't load the world/ troop speeds properly.

As a fellow programmer, I'd be more than happy to help if you need assistance with this
 

wellcome

Member
Reaction score
0
hello, I was doing an operation, I put 5 target villages and 20 villages to output the fulls, but the script only programmed 18 commands, they are close to each other so I don't think it's a matter of distance outside the arrival time

1678889389195.png

the coords:
458|458
459|457
460|457
459|455
455|453

394|504
392|503
394|507
388|506
387|506
385|508
386|510
384|507
384|508
382|505
387|508
383|506
387|502
389|504
393|500
388|501
384|500
384|503
381|509
383|507

result:

Landing time: 2023-03-18 08:01:00

[unit]ram[/unit] - 381|509 - 455|453 - 16/03/2023 09:36:58
[unit]ram[/unit] - 382|505 - 460|457 - 16/03/2023 10:13:25
[unit]ram[/unit] - 384|508 - 460|457 - 16/03/2023 10:15:13
[unit]ram[/unit] - 386|510 - 460|457 - 16/03/2023 10:30:20
[unit]ram[/unit] - 384|507 - 460|457 - 16/03/2023 10:31:49
[unit]ram[/unit] - 385|508 - 460|457 - 16/03/2023 10:40:05
[unit]ram[/unit] - 383|506 - 459|457 - 16/03/2023 10:48:12
[unit]ram[/unit] - 383|507 - 455|453 - 16/03/2023 11:01:00
[unit]ram[/unit] - 387|508 - 459|457 - 16/03/2023 11:54:01
[unit]ram[/unit] - 388|506 - 459|455 - 16/03/2023 12:18:27
[unit]ram[/unit] - 384|503 - 455|453 - 16/03/2023 12:35:50
[unit]ram[/unit] - 384|500 - 455|453 - 16/03/2023 13:26:36
[unit]ram[/unit] - 387|502 - 459|457 - 16/03/2023 13:33:50
[unit]ram[/unit] - 389|504 - 459|457 - 16/03/2023 13:51:33
[unit]ram[/unit] - 394|507 - 459|455 - 16/03/2023 14:23:47
[unit]ram[/unit] - 388|501 - 455|453 - 16/03/2023 14:48:25
[unit]ram[/unit] - 394|504 - 459|455 - 16/03/2023 15:19:00
[unit]ram[/unit] - 393|500 - 459|457 - 16/03/2023 16:37:51
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
622
hello, I was doing an operation, I put 5 target villages and 20 villages to output the fulls, but the script only programmed 18 commands, they are close to each other so I don't think it's a matter of distance outside the arrival time


the coords:
458|458
459|457
460|457
459|455
455|453

394|504
392|503
394|507
388|506
387|506
385|508
386|510
384|507
384|508
382|505
387|508
383|506
387|502
389|504
393|500
388|501
384|500
384|503
381|509
383|507

result:

Landing time: 2023-03-18 08:01:00

[unit]ram[/unit] - 381|509 - 455|453 - 16/03/2023 09:36:58
[unit]ram[/unit] - 382|505 - 460|457 - 16/03/2023 10:13:25
[unit]ram[/unit] - 384|508 - 460|457 - 16/03/2023 10:15:13
[unit]ram[/unit] - 386|510 - 460|457 - 16/03/2023 10:30:20
[unit]ram[/unit] - 384|507 - 460|457 - 16/03/2023 10:31:49
[unit]ram[/unit] - 385|508 - 460|457 - 16/03/2023 10:40:05
[unit]ram[/unit] - 383|506 - 459|457 - 16/03/2023 10:48:12
[unit]ram[/unit] - 383|507 - 455|453 - 16/03/2023 11:01:00
[unit]ram[/unit] - 387|508 - 459|457 - 16/03/2023 11:54:01
[unit]ram[/unit] - 388|506 - 459|455 - 16/03/2023 12:18:27
[unit]ram[/unit] - 384|503 - 455|453 - 16/03/2023 12:35:50
[unit]ram[/unit] - 384|500 - 455|453 - 16/03/2023 13:26:36
[unit]ram[/unit] - 387|502 - 459|457 - 16/03/2023 13:33:50
[unit]ram[/unit] - 389|504 - 459|457 - 16/03/2023 13:51:33
[unit]ram[/unit] - 394|507 - 459|455 - 16/03/2023 14:23:47
[unit]ram[/unit] - 388|501 - 455|453 - 16/03/2023 14:48:25
[unit]ram[/unit] - 394|504 - 459|455 - 16/03/2023 15:19:00
[unit]ram[/unit] - 393|500 - 459|457 - 16/03/2023 16:37:51
The script does not double assign villages. It creates unique combinations of target and origin villages.

So it could happen that an origin village can make it in time for 2 different target villages, but once assigned to 1 target the other one will not be created as a possible combo.

So you had 5 destination villages and 20 originating villages and 5 attacks from an origin village towards a destination village, this is your input.

First of all it could be that some won't be reach in time.

Second it could be that a combination is not possible because the originating village has been planned to be used on another combination.

The max the script could have generated with this input is not 25 combos, because there are only 20 origin villages, it's 20 combos. So generating 18 combos it's good, not ideal but good.

This script is better used if you provide more villages as input than what is actually needed.

So if you have 5 destinations and want to have 5 attacks per destination, the script would have provided 25 combos if you provided as input 30 origin villages for example.

There will be of course the problem that these villages all need to make it in time to the destination villages but at least when you provide more villages than needed the script will not run into the issue of not having possible combos.

Origin village A can reach in time 3 destination villages, but it will be sent to the first one.
Origin village B can reach to one of those 3 villages too, one of those that origin village A could not make it (that's why it's better to provide some more origin villages, if you have of course).
 

UltimoConfine

New Member
Reaction score
0
It would be nice if the output of the script was divided by attacking player, it would be easier to share with people
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
622
It would be nice if the output of the script was divided by attacking player, it would be easier to share with people
The script is supposed to work for your own account only and does not take into account the fact that you can actually use it to plan commands for other players too (provided you have their off, def coordinates).

I am not planning on adding new features on this script. I might solve bugs on the script, if there are, but will not work on adding new features on this script since it's pretty old and probably obsolete. It's far better to work on a new and better mass attack planner than try to add support on this one for new features.
 

xadrero

New Member
Reaction score
0
Script Not working?
Screen Shot 07-24-23 at 01.02 PM.PNG
 

Attachments

  • Screen Shot 07-24-23 at 01.03 PM.PNG
    Screen Shot 07-24-23 at 01.03 PM.PNG
    42.1 KB · Views: 2
Top