^

Pet Battle Scripts schreiben

1. Requirements


For this guide, it is necessary to install the addon Pet Battle Scripts.
It is assumed that installation and setup are already done, and teams are set or easy to set by you.

2. How it works


Basically the addon selects the required ability following instructions written in the script. E.g.:

use(Ausweichen:312)
use(Schutz der Natur:574) [!self.aura(Nature's Ward:820).exists]
use(Alphastoß:504)
This set of lines result in the following actions:
round 1: it casts Ausweichen
round 2: it tries to cast Ausweichen, but since it is on CD, it goes to the next line and casts Schutz der Natur
round 3: it tries to cast Ausweichen, but since it is on CD, it tries the next line. Since aura Nature's Ward is active, it goes to the next line and casts Alphastoß, and so on.

To summarize: each line is read sequentially until it finds a command that can be executed. The challenge here is writing scripts able to cast the spells according to the desired strategy.

3. Script creation


3.1 The editor



The easiest way to write a script is when you are doing a pet battle with a team previously saved on Rematch.
After starting the fight, open Rematch, right click over the corresponding team and select 'Write script'.
It will open a new window, the 'Script editor'. During the battle, and while the script editor is active it is possible to write a script using the auto-complete feature.










With the script editor opened and during a fight, start typing the desired action and it will soon show an dropdown list.







After selecting an action (type Enter or click over the action) a new list with the abilities available to the active pet will be shown.






Again, select the desired ability and if needed add the conditions when this action will be executed. Start by typing a bracket '[' followed by the first letter of the condition. Options are a target (self, enemy) or weather.





Anyway, a new list will be shown, it there is any.









In case there are additional required parameters, as with auras, a new list will be shown. As before, select the appropriate option.

Once you are familiar with the commands, you might just type the command followed by a dot to activate the dropdownlist with the available options. Remember to close the condition with a bracket: ']'.


Writing and editing a script is not difficult itself since the addon makes it very easy with the dropdown lists. Good luck!


3.2 Actions


ability/use: casts an ability
change: changes active pets
catch: catches a pet, if possible
standby: pass a round
quit: quits the fight

3.3 Conditions


Conditions are written between brackets ([condition]):
if & endif

3.4 Target


self: checks a condition on your own pets
enemy: checks for a condition on your enemy's pet

3.5 Functions


dead (boolean)
exists (boolean)
hp (compare)
hp.can_explode (boolean)
hp.full (boolean)
hp.high (boolean)
hp.low (boolean)
hpp (compare)
aura.exists (boolean)
aura.duration (compare)
weather (boolean)
weather.duration (compare)
active (boolean)
ability.usable (boolean)
ability.duration (compare)
ability.strong (boolean)
ability.weak (boolean)
ability.type (equality)
round (boolean)
played (boolean)
speed (compare)
speed.fast (boolean)
speed.slow (boolean)
level (compare)
level.max (boolean)
power (compare)
type (equality)
quality (compare)
id (equality)
is (boolean)

4. Pratical examples


Although the script helps a lot with its auto-complete feature, it won't be enough to write good scripts. It is a good idea to choose a fight and play with the script editor until you feel more confident with the commands and becomes able to write more complex scripts. Below there will be some examples taken from pet battlers using specific strategies. It is assumed that the team is loaded, the abilities are the ones mentioned on the strategy guide, and that the recommended pet is being used, not an equivalent.

4.1 Wailing Critters


The Wailing Critters dungeon offers a nice opportunity to start improving your skills. Until you win the last fight the dungeon is repeatable and you might leave the dungeon, heal, and restart. There is also some random pets in the back row, but only a few families and abilities. The first 3 fights require only one pet with a fixed set of abilities, turning it into a nice place to practice your skills. The script might work for most of the fight where the same pet+abilities are being used, making it a very useful script. The link for the strategy is here.
The strategy:
Prio 1: Keep Emerald Presence active
Prio 2: Use Emerald Dream when you drop below ~1000 health
Prio 3: Emerald Bite

use(Smaragdpräsenz:597)
use(Smaragdgrüner Traum:598)
use(Smaragdbiss:525)
As it is written, the script will cast Smaragdpräsenz every time it is available. This ability does not have a CD, so we have to add a condition that prevents it from casting if the aura is already present.
The only conditions available are the 'aura(Emerald Presence).exists' or 'aura(Emerald Presence).duration'. The condition that seems to fit the strategy better is the first one.
After writing it, we would have use(Smaragdpräsenz:597) [self(#1Smaragdgrüner Protowelpe).aura(Emerald Presence).exists], which could be read as "cast Smaragdpräsenz if my Smaragdgrüner Protowelpe has Emerald Presence active".
We want the opposite of that, so deny the condition by using a '!' before the target: use(Smaragdpräsenz:597) [!self(#1Smaragdgrüner Protowelpe).aura(Emerald Presence).exists], translating into "cast Smaragdpräsenz if my Smaragdgrüner Protowelpe does NOT have Emerald Presence active". Yay!

use(Smaragdpräsenz:597) [!self(Smaragdgrüner Protowelpe).aura(Emerald Presence).exists]
Next step: as of now, the script will cast Smaragdgrüner Traum on CD, which might not be required, specially at the beginning of the fight. Let's add the condition that will cast the ability once your whelp is low on health.

use(Smaragdgrüner Traum:598) [self(Smaragdgrüner Protowelpe).hp<1000]
You might choose to heal your whelp if it is below an amount expressed in percents, and not a fixed amount:

use(Smaragdgrüner Traum:598) [self(Smaragdgrüner Protowelpe).hpp<50]
This last condition will cast Smaragdgrüner Traum if your Whelp is below 50% health.
The final script:

use(Smaragdpräsenz:597) [!self(Smaragdgrüner Protowelpe).aura(Emerald Presence).exists]
use(Smaragdgrüner Traum:598) [self(Smaragdgrüner Protowelpe).hp<1000]
use(Smaragdbiss:525)
If your proto-whelp dies you may change it to another equivalent pet with the same abilities, and the script will keep working. To change pets add the following line: change(#2) [self(#1).dead] (change to pet number 2 if my pet number 1 is dead)

Now, some remarks about the way the script is written.
  • If your team has two Smaragdgrüner Protowelpe, the script might not work as expected if you change pets. To avoid problems, instead of naming it, give it the team position, or just use the 'self' target. This will also allow you to use a different pet with the same skills, like the Traumwelpling or the Smaragdgrüner Welpling
  • Do not use a slot number for abilities. It might cause problems if you use an alternative pet whose abilites are on different slot positions, like the Zandalari pets where the abilites Jagdrudel and Schwarze Klaue sometimes are on a different tier.
  • Use either the ability's code number or both name and code. Some players might use a localized version of the game, and for them the script will not work if you use only the name of the abilities
  • You might leave only the abilities code number, which will result in a shorter script, but it is not necessary

A suggestion for all scripts (change to the appropriate team slot):

change(#2) [self(#1).dead]
use(Smaragdpräsenz:597) [!self.aura(Emerald Presence:823).exists]
use(Smaragdgrüner Traum:598) [self.hp<1000]
use(Smaragdbiss:525)

4.2 Small fragments


Scripts are written for a specific strategy, but there are many common actions that can be use in many scripts. Adjust them to your needs, checking for the right conditions, and apply them when suitable.
  • Pass on first round:
standby [round=1]
  • Change pet to leveling and back (change slot numbers where appropriate):

change(#2) [self(#1).dead & !self(#2).played]
change(#3) [self(#2).active]
  • Use a dodge ability to block an enemy's ability (in this case, Eingraben)

use(Abwehr:490) [enemy.aura(Underground:340).exists]
  • Change the use of abilities depending on active enemy pet

If the enemy's pets are the first or second, you pet will cast Atem. Once the third pet enters the fight, your pet will cast Bomberangriff on CD and Lockvogel if your enemy uses Eingraben

if [enemy(#3).active]
use(Lockvogel) [enemy.aura(Underground:340).exists]
use(Bomberangriff)
endif
use(Atem)

5. Resources





ZadTheGlad

schrieb am 2023-05-01 14:56:17

Must admit that I haven't quite grasped the art of script-writing yet, but nonetheless, I'm having a bash :-)

I'm trying to write a script for my 'Silence' team which is 'Eye of Corruption' in #1 spot, 'Iron Starlette' in #2 spot, and level 1 carry pet in #3 spot. It works well up until the point where I want Iron Starlette to change from Wind-up to Powerball - it just keeps on repeating Wind-Up. Could anyone please give me an idea of what's missing?

Here's the script:
use(Life Exchange:277)
use(Eyeblast:475)
use(Nether Blast:608)
change(Iron Starlette:1387)
use(Wind-Up:459)
use(Powerball:566)
use(Explode:282)

Thanks in advance :-)

After repeatedly 'having a bash' and editing the script myself, I finally got it to work as I wanted ☺ Here's the working version:

# Pet Battle Scripts
# Version: 2
# Name: Silence
# Data: XjFeVF5TcGx1Z2luXlNSZW1hdGNoXlNrZXleTjE1NDkxMl5TZXh0cmFeU1NpbGVuY2U6NE45MDoyMjI4Mk9LOjExMjcxQkI6Wkw6XnReXg==
# Code Start
use(Life Exchange:277)
use(Eyeblast:475)
use(Nether Blast:608)
change(Starlet:1387)
use(Wind-Up:459) [round=4]
use(Wind-Up:459) [round=5]

use(Powerball:566) [round=6]
use(Explode:282) [round=7]
change(next)
# Code End
(editiert)

Loeve schrieb am 2018-11-22 13:53:57

What is the difference between "Rematch string" and TD String" ?I see both when I look at your pet battle strategies

Eekwibble

schrieb am 2018-11-22 21:02:36

Rematch strings are copy/pasteable macros that you can import and export into and out of the addon Rematch. These strings import teams of pets to the given position in the in-game graphic for the selected opponent and also includes the abilities that have been chosen.

TDScripts work on the same principle but with a much easier to understand code. Scripts are for the actual battles themselves. They are the code the game uses to apply the moves you select.

I find it easiest to think of it as the 'TD' standing for 'Top Down', meaning the code written will read from the top line to the bottom, and as each conditional is met - i.e.; your pet does something (or doesn't, if the command was 'standby') - the script restarts at the top.

TL:DR:
Rematch is an addon that allows for easier customisation of pets for specific battles than the standard UI;
tdBattlePetScript is a plug-in for Rematch that allows specific moves to be used in a programmed format to complete battles at the repeated press of a single button (that makes it sound boring; it isn't... It's awesome...).

Malhado

schrieb am 2023-01-24 21:26:32

I've spent some years wondering what was the "TD" meaning. Thanks! @Aranesh should add this ifo to this page.

Matt705 schrieb am 2022-08-25 00:22:54

I'm trying to use the TDScript Editor for the first time and when I start typing an ability to use it doesn't come up with a selection for that pet. According to the instructions above, I should just be able to start typing the desired action, e.g. Use, and then a dropdown list should appear but it's not. So I now have to manually search each ability to find its ID.

Anybody else getting this? Thanks in advance.

Jackie#1107

schrieb am 2022-10-02 07:37:39

I was having this issue too, until I checked again. You have to be in a fight in order for the Editor to prepopulate any details. I'm still trying to learn about how to create scripts also, and this was the first hurdle for me. (editiert)

nataliem#2255

schrieb am 2018-04-28 04:04:38

Will using a TD Script put your account at risk of being banned for botting?

Prudentius

schrieb am 2018-08-02 13:34:40

No, all actions are being performed by an ingame addon using the available API. If Blizzard does not desire this behavior they will take steps (as they have proven many times during Legion to break this functionality.

Mot

schrieb am 2022-08-13 12:38:10

What steps did Blizz take during Legion to break this functionality?
(I ask because I started playing WoW with Legion, so I wasn't aware of these things at the time).

Ellencia#3986

schrieb am 2021-11-01 21:56:04

I guess Skill's number ID is not a essential part of script.
I couldn't find ID anyway.

PhoenixFire schrieb am 2022-01-01 20:54:33

If you publish a script and someone uses a different language like russian, or spanish, then the script fails if it doesn't have the Skill's number ID. In that way it is essential if you ever publish your script on xufu or anywhere else for public use.

Cloud

schrieb am 2021-07-05 00:44:03

nice write up.

Mot

schrieb am 2020-12-29 09:06:14

Thanks for this excellent intro to scripting. This, and the link to the API, was the incentive that – finally – made me write my own scripts!

Cithan#2540

schrieb am 2020-12-26 07:41:46

After using tdScript to level 300+ pets suddenly the Auto option doesn't light up for me any more. The only thing I can think of that might have broke it is that I pasted a script into wow without making the script window active first so it changed some options including turning nameplates off. Has anyone had this happen to them and do you know what dependencies to check to ensure it can enable again? I'm at a loss ...

Cithan#2540

schrieb am 2020-12-26 10:26:56

I fixed my problem - there was some kind of data corruption in the Rematch.lua saved variables file. In that file there are two variables (dictionaries) RematchSaved and RematchSettings. I made a backup of the file then deleted it, the logged in, imported one team, logged out. Then I edited the newly created file to have the RematchSaved variable from my backup. Then within RematchSettings there is a dictionary entry called "TeamGroups" - I copied over that also from my backup. Finally I logged back in and found that the auto button is fully working again!

Frostyuwu

schrieb am 2020-09-16 02:27:41

Could someone help me with a code?
use(Life Exchange:277)
use(Amplify Magic:488)
use(Eyeblast:475)
standby
standby
use(Amplify Magic:488)
use(Life Exchange:277)
use(Eyeblast:475)
change(Brilliant Spore:1540)
use(Explode)
change(Jade Owl:845)
use(Hawk Eye:521)
use(Lift-Off:170)

this is for Pearlhusk Krawler
Pearlhusk Crawler (NPC#154914)

1: Mini Mindslayer (1,1,2)
2: Brilliant Spore (1,1,2)
3: Jade Owl (1,2,1)

So at the eyeblast step before changing to spore, sometimes mindlayer dies and sometimes lives, regardless, if you switch to the next pet, and use the abilities stated, it's still a win. However, when i run the code, it doesn't work. If mindslayer lives, I still want to switch to the spore and continue with explode. What happens is that it either doesn't change pets, or the spore is not using the ability assigned, and I don't know how to fix it. Maybe this can't be a code because of the rng? Thanks for the help.

Rubberfruit schrieb am 2020-11-26 17:06:02

standby [round ~ 4, 5]
use(Life Exchange:277) [round ~ 1, 7]
use(Amplify Magic:488)
use(Eyeblast:475)
change(Brilliant Spore:1540)
use(Explode:282)
change(Jade Owl:845)
use(Hawk Eye:521) [!self.aura(Hawk Eye:520).exists]
use(Lift-Off:170)
(editiert)

Rubberfruit schrieb am 2020-11-26 16:45:55

How do you write the condition, My pet health is below the enemy pet health.
ability(id) [self.hp <= enemy.hp] does not work (editiert)

Hmoff

schrieb am 2020-11-12 00:25:33

Hey all! I've been sleeping on the site but now I'm ready to post and try to write a script.. be kind

So I'm hunting Rare's in Ice crown and I'm seeing a lot of cockroaches teams.

So what I wanna do is
have my leveling pet in slot 1 and Dart level 25 beast is slot 2
use skill 1 or pass then switch to dart and use skill 1 and when enemy pet has less then 450 HP use skill 2 devour and then back to skill 1 and so on and so on



raga#2470

schrieb am 2020-10-28 07:49:49

Is there a way to find out how much damage a certain ability will do? I'm specifically interested in the minimum amount of damage an ability will do. (editiert)

Darkironman schrieb am 2020-10-17 19:29:33

Is anybody else having issues with writing scripts? I can not open the editor.

squishy930

schrieb am 2020-10-18 13:14:24

I am. At first when I clicked "Write Script" nothing would happen and now the option is gone.

Threewolves

schrieb am 2020-07-31 19:01:04

Can the numerical list of pet families be added here? I'm have trouble finding the numerical indicator for critters/mech/dragonkin, etc.

DragonsAfterDark

schrieb am 2020-07-31 21:16:23

Should be the order they come up in on the Rematch bar.

1: Humanoid
2: Dragonkin
3: Flying
4: Undead
5: Critter
6: Magic
7: Elemental
8: Beast
9: Aquatic
10: Mechanical

Shenk

schrieb am 2020-08-01 06:57:01

it's the order in which the families are listed in rematch

Threewolves

schrieb am 2020-08-01 19:19:49

Thx y'all. Just what I was looking for.

Zurdo

schrieb am 2020-07-15 13:07:57

Script to help farm rare pets

quit [enemy(#1).quality!=4 & enemy(#2).quality!=4 & enemy(#3).quality!=4]
quit [enemy(#1).quality!=4 & enemy(#2).quality!=4 & !enemy(#3).exists]
quit [enemy(#1).quality!=4 & !enemy(#2).exists & !enemy(#3).exists]
test(Rare pet found!)

Will quit on press if no rare found, if found, need to quit manually and battle with team of your choice.

Enjoy hunting (editiert)

Amber1019

schrieb am 2020-03-12 10:17:18

How do I find aura spell IDs?
For example, I need the aura ID for "Pumped Up" that striders get after using the ability "Pump" (ID:297).
I'm wanting my moths to use their Cocoon Strike (ID: 506) if "Pumped Up" is found to be an active aura on the enemy team. But Rematch doesn't put abilities IDs in auras/buffs.

Would be great if the TD Script addon could record your moves and create a script for you, somehow. :( lol

Edit/Update: I remembered that wowhead has spell IDs in its URL for spells/auras/etc.
For example, Pumped Up is ID 296, as seen in this URL:
https://www.wowhead.com/pet-ability=296/pumped-up

I'd still appreciate if anyone else knows of ways to get IDs of things Rematch doesn't give. (editiert)

Shenk

schrieb am 2020-03-12 11:03:08

usually (!) the ID of an aura comes right before the spell that applies it, like in your pump example.
the easiest way to see the ID is by just using in ingame within a script, since td will give you the auto-fill option that also adds the aura's ID by itself

Amber1019

schrieb am 2020-03-14 10:04:42

Yeah, I've begun to notice that trend with the IDs. Thank you! :)

Pankracy#2378

schrieb am 2020-02-23 06:17:43

Great staff ;))). Yet it's still quite a BLACK MAGIC for me ;(((. For instance, I have completely no idea what should I write the script to swap slot 1 pet to slot 2 carry pet and then slot 3 pet. Also it's still REALLY unclear for me HOW to write, what steps should be used as well as what words should be used (there is nothing about it in this article and, well, sorry but I am NOT programmer, math and physics were always totally understandable for me, so all that staff looks like rocket science and I simply DO NOT understad it ;(((. Can you please PM me full guide STEP BY STEP, what command, brackets, comas, numbers and so on should be used when ??? Thanks in advance (editiert)

Lazey

schrieb am 2020-02-23 15:01:18

A good start is to try to understand (and learn from) other peoples' scripts, especially on this page where you see the intended usage of abilities, priorities, pet changes.

If that is not for you, it would be best to link/describe a specific situation/fight that you want to do try to write a script for (or want to understand an existing one). And maybe use the Discord that is linked on the front page, formatting/editing is easier there.

Pankracy#2378

schrieb am 2020-02-27 10:20:13

Thank you so much for quick answer ;). Actually I didn’t look at this from such point of view - simply look at someone else’s script to see how it was written command by command. Will try then, thanks once more, KUDOS !!!!
(editiert)

Theaxx

schrieb am 2020-01-25 17:32:02

How do you find the ID of a certain pet?

Lazey

schrieb am 2020-01-25 17:52:08

If you're talking about Species-ID and you're using Rematch, you can find that ID for your own pets on the pet cards if you activated Species-IDs and Ability-IDs in pet card options.

Since we're in the tdBPS section I guess you have it installed, so another easy way (especially for enemy pets) is to start the fight and open the script editor and then start typing something like "if [ enem" and then let the AutoFill do it's magic. If you select the names it should add the Species-ID too. (editiert)

Sarah schrieb am 2019-02-17 04:13:06

Yeah.... This is far too complicated for my tiny non-tech-savvy brain. For the life of me, I can't get any of my own TD scripts to work :( I have all my steps/guides typed out in the Notes for each team, but I'm having major trouble actually creating a functional/working script.

Puny

schrieb am 2019-12-30 11:19:24

I'm in the same boat, I have no idea how to get anything working. I just wanted to be able to use the scripts from this site already set up but there is no step by step instructions on how to do that. I really need an idiot's guide.

DragonsAfterDark

schrieb am 2019-12-30 15:23:08

How to use the scripts are on a different page: https://www.wow-petguide.com/index.php?m=UsingTDScripts

:)

Sally schrieb am 2019-09-23 17:54:54

I am working on a script vs Eleanor. He has a deadly charge "Death Bleat", that I want to kick.
I need to use kick on the round after he used "Death Bleat", when the ability has 7 turns cooldown. I have not found anything in the API to check for cooldown left.

Remte

schrieb am 2019-09-24 02:37:34

The cooldown doesn't start until the damage is released, so it'd still be 8 turns (but no risk of repeating that because of an interrupt's cooldown).

DragonsAfterDark

schrieb am 2019-09-24 09:38:11

I'm assuming you mean that Death Bleat is a two-round ability, and you need to Kick on the second part before it can charge?

You can go about that in one of two ways:

ability(Kick:307) [enemy.aura

Using this method, you need to wait until Eleanor has done the first round of Death Bleat. Once they do the first round, and you start typing in aura for the script, it should give you a list of all the auras on Eleanor, and one of them should be whatever comes up for their first round of Death Bleat. It would end up looking like:

ability(Kick:307) [enemy.aura(Whatever the Aura's Name is Here).exists]

Or, as Remte pointed out, if the CD doesn't start until the damage is released, you'd need to do something like this:

ability(Kick:307) [enemy.ability(Death Bleat's Code Here).duration=8]

You'll get the specific code for Eleanor's Death Bleat when you start typing in ability. I only have player pet codes copied down, and not enemy pets, so I can't say what the code will look like.

JaneDoe schrieb am 2019-03-24 01:34:30

Is it possible to use TD Script WITHOUT that terrible REMATCH?

Lazey

schrieb am 2019-04-12 04:33:42

Maybe No, because Rematch is not terrible at all ;-) And Yes, tdBPS should work standalone too, but far more difficult for selecting saved scripts because all is optimized for the combination of these two addons.

Hodaress schrieb am 2019-03-10 20:36:50

During the script creation, where are the scripts saved to?

That is, which file is modified. I've backed up my teams and thought I was also backing up my scripts. However, during the most recent WoW update, my WTF folder was corrupted and I had to restore from an earlier version I had saved to a different hard drive last month. This WTF folder had all of my saved teams and scripts but although the teams restored, the scripts did not. So, I'm look for where the scripts are stored so I can also back that file up also.

Any suggestions?

Lazey

schrieb am 2019-04-12 04:22:55

World of Warcraft_retail_WTFAccountACCOUNTNAMESavedVariablestdBattlePetScript.lua

Wazzak

schrieb am 2018-05-11 09:20:04

While botting is difficult to describe, I think I know a simple way to describe a bot: once running, no other action from you is required. It runs attended and executes a lot of actions for you. The scripting requires you to type a key (a single key, in most cases) for every single action you do. If you type the standard shortcut 'A' the script won't start the fight, battle against all enemies, changes pets, heals after leaving or anything similar. What it does is select a single action from a list that fits the required conditions and does a single action, like casting a standard ability. Next action requires another action from you, and so on. Macros are very similar to scripts, since you click on a single button but it might cast abilities according to a sequence, or change abilities according to certain conditions. Blizzard has not yet removed the ability to write a macro. ;)

Wazzak

schrieb am 2018-05-11 11:28:47

Just a mistake: 'It runs unattended'. Sorry for the mistake.

Kiwicat#21513

schrieb am 2018-12-03 22:39:51

It's okay. People make mistakes :P

Kiwicat#21513

schrieb am 2018-12-03 22:33:23

Thank you so much for this guide and thanks to whoever invented TD script and rematch <3
I created my first script today and it was so satisfying when I finally got it to succeed. In the beginning, all the commands made no sense to me, but now its like I learned a new language ^^

BevansDesign#1728

schrieb am 2018-09-12 17:33:54

Is it possible to do something like "use(ability#1)" without defining a specific ability? It would be nice when using a leveling pet in slot 1, where you want to just have it do ANYTHING for the first turn. Currently I use "standby" to make it wait a turn, but it'd be nice to get it to use an ability instead for a little extra damage.

Eekwibble

schrieb am 2018-09-12 21:07:35

The vast majority of my scripts have 'ability(#1)' as the last line. Without any other conditionals above it, this will make any active pet use its first ability by default.

BevansDesign#1728

schrieb am 2018-09-28 15:25:13

Oh, that's easy. Thanks!

Kranthos

schrieb am 2018-11-12 18:10:30

Be careful with this. Some pets have multi-round abilities in slot 1, and this could cause them to stay in the battle for longer than you would want. For example, if your level 10+ pet was a Mini Mindslayer with Mana Surge in slot 1, or a Globe Yeti with Rampage there, it would be stuck for three rounds.

Eekwibble

schrieb am 2018-11-13 21:17:37

Good catch. ^

Kranthos

schrieb am 2018-11-14 10:52:37

I took a closer look at this and found there are even some pets that have multi-round abilities at level 1! For example, the Pygmy Cow has stampede as its first ability, and Trashy has "family reunion" (same as stampede). No idea how many other pets, if any, are also like this.

Eekwibble

schrieb am 2018-11-14 19:05:09

Prudentius actually first posted it but a way around this is also in a lot (if not all) of my scripts.
It is to have the opening line read:

change(next) [ self(#1).dead and !self(#3).played ]

and have the carry pet in the 2nd slot, that way its attack never gets used.

There are other ways and most of them involve putting the swap commands at the start of the script.

HarleyDoc

schrieb am 2018-10-10 16:19:37

I am definitely an amateur pet battler at best, but I'm slowly immersing myself in the loads of information and strategies. I have a question though. What is the real purpose behind the TD scripts? Why not just push the buttons and do the battles manually? I'm only asking because I honestly don't get it.

Killdozer schrieb am 2018-10-15 08:42:55

Some battles are fixed. The npc will always use it's moves in a certain order each time. The scripts use the moves of a predetermined rematch team to win. You basically just press one button that selects the moves in a predetermined order that will lead to a win.

Kranthos

schrieb am 2018-11-05 10:36:13

If you do the pet battle world quests you'll probably use the same team and strategy each time you face a particular trainer - as Killdozer says, most trainer NPCs use scripted strategies that become predictable. Using the Rematch add-in lets you store the team, and the TD script add-in lets you store and automate the associated strategy, rather than having to remember them every time. You can use Rematch's note feature to record your strategy for a particular team if you prefer not to automate it with a TD script.

anon schrieb am 2018-09-08 16:37:28

does anyone have script for catching wild rare pets as in

1. start of the fight check if ENEMY team pet 1 2 3 one of them is RARE it will start fight else it will forfeit the fight
2. if the current enemy pet you're fighting is poor/common/uncommon it will kill it and when it gets to rare pet it will damage it under >35?% or whatever the catch % is and try to capture it

pets to use
any pet with superbark / weakening blow

Kranthos

schrieb am 2018-11-03 11:45:44

You could try something like this. I can't find a way to test whether a pet has already been caged, in case there are two or more rare pets in the enemy team, but this should still work. The "weakener" should be in slot 1, and I've included two suggestions for "killers" for the other slots in your team.


quit [ enemy(#1).quality!~Rare,4 & enemy(#2).quality!~Rare,4 & enemy(#3).quality!~Rare,4 ]

if [ enemy.quality~Rare,4 ]
catch
change(#1)
use(Superbark:1357)
use(Weakening Blow:826)
endif

test(This section is for, e.g., an Emerald Protowhelp#2,2,2) [ round<1 ]
use(Emerald Presence:597) [ !self.aura(Emerald Presence:823).exists ]
use(Emerald Dream:598) [ self.hpp<50 ]
use(Emerald Bite:525)

test(This section is for, e.g., a Darkmoon Tonk#1,1,2) [ round<1 ]
use(Ion Cannon:209) [ enemy.hp<=488 & enemy.type~Elemental,7 ]
use(Ion Cannon:209) [ enemy.hp<=732 & enemy.type!~Beast,8 ]
use(Ion Cannon:209) [ enemy.hp<=1098 ]
use(Shock and Awe:646)
use(Missile:777)

change(next)
standby

Kranthos

schrieb am 2018-11-03 12:01:17

Oops, the Ion Cannon lines should have read:


use(Ion Cannon:209) [ enemy.hp<=1098 & enemy.type~Beast,8 ]
use(Ion Cannon:209) [ enemy.hp<=732 & enemy.type!~Elemental,7 ]
use(Ion Cannon:209) [ enemy.hp<=488 ]

gannymede schrieb am 2018-09-09 16:55:59

Hi, When I try to import a script into TDScripts, the Save button is disabled and I can't ever write or add a script. Has anyone else seen this? Thank you!

Prudentius

schrieb am 2018-08-30 14:21:45

Please, please, PLEASE! Do not use the full pet name in your TD Script! This makes it incompatible when using substitution pets even if they are a carbon copy for the moveset!

Sloober

schrieb am 2018-08-04 17:13:29

How do i add a TD script to a pet strategy?

Aranesh

schrieb am 2018-08-04 18:43:17

You can only add one "officially" if you are the creator of a strategy. But you are always very welcome to post one into the comments :-)

gsanta

schrieb am 2018-08-03 08:38:23

I saw this page today for the first time only due to the recent comment. Is it linked somewhere on the main that I'm not seeing?

Aranesh

schrieb am 2018-08-03 09:28:58

"Technically" it should still be hidden because it's still being reviewed. But at this point I guess I can just as well put it online ^^

Ivanella#1279

schrieb am 2018-08-03 07:35:33

Wish this was higher in the Google search results. Only found it when I was trying to write a new strategy.

Neuer Kommentar:





































Name:

Link: