1. Requirements
Link copied
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
Link copied
Basically the addon selects the required ability following instructions written in the script. E.g.:
use(Schivata:312)
use(Protezione della Natura:574) [!self.aura(Nature's Ward:820).exists]
use(Assalto Alfa:504)
This set of lines result in the following actions:
round 1: it casts
Schivata
round 2: it tries to cast
Schivata, but since it is on CD, it goes to the next line and casts
Protezione della Natura
round 3: it tries to cast
Schivata, 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
Assalto Alfa, 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
Link copied
3.1 The editor
Link copied
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
Link copied
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
Link copied
Conditions are written between brackets ([condition]):
if &
endif
3.4 Target
Link copied
self: checks a condition on your own pets
enemy: checks for a condition on your enemy's pet
3.5 Functions
Link copied
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
Link copied
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
Link copied
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(Presenza di Smeraldo:597)
use(Sogno di Smeraldo:598)
use(Morso di Smeraldo:525)
As it is written, the script will cast
Presenza di Smeraldo 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(Presenza di Smeraldo:597) [self(#1Proto-Draghetto di Smeraldo).aura(Emerald Presence).exists], which could be read as "cast
Presenza di Smeraldo if my
Proto-Draghetto di Smeraldo has
Emerald Presence active".
We want the opposite of that, so deny the condition by using a '!' before the target:
use(Presenza di Smeraldo:597) [!self(#1Proto-Draghetto di Smeraldo).aura(Emerald Presence).exists], translating into "cast
Presenza di Smeraldo if my
Proto-Draghetto di Smeraldo does NOT have
Emerald Presence active". Yay!
use(Presenza di Smeraldo:597) [!self(Proto-Draghetto di Smeraldo).aura(Emerald Presence).exists]
Next step: as of now, the script will cast
Sogno di Smeraldo 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(Sogno di Smeraldo:598) [self(Proto-Draghetto di Smeraldo).hp<1000]
You might choose to heal your whelp if it is below an amount expressed in percents, and not a fixed amount:
use(Sogno di Smeraldo:598) [self(Proto-Draghetto di Smeraldo).hpp<50]
This last condition will cast
Sogno di Smeraldo if your Whelp is below 50% health.
The final script:
use(Presenza di Smeraldo:597) [!self(Proto-Draghetto di Smeraldo).aura(Emerald Presence).exists]
use(Sogno di Smeraldo:598) [self(Proto-Draghetto di Smeraldo).hp<1000]
use(Morso di Smeraldo: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.
- 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 Gruppo di Caccia and Graffionero 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(Presenza di Smeraldo:597) [!self.aura(Emerald Presence:823).exists]
use(Sogno di Smeraldo:598) [self.hp<1000]
use(Morso di Smeraldo:525)
4.2 Small fragments
Link copied
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.
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, Rintanamento)
use(Deviazione: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
Soffio. Once the third pet enters the fight, your pet will cast
Bombardamento on CD and
Esca if your enemy uses
Rintanamento
if [enemy(#3).active]
use(Esca) [enemy.aura(Underground:340).exists]
use(Bombardamento)
endif
use(Soffio)
5. Resources
Link copied
1
Devi essere registrato per votare i commenti.ZadTheGlad
scritto il 2023-05-01 14:56:17
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
(edited)
1
Devi essere registrato per votare i commenti.Loeve scritto il 2018-11-22 13:53:57
5
Devi essere registrato per votare i commenti.Eekwibble
scritto il 2018-11-22 21:02:36
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...).
1
Devi essere registrato per votare i commenti.Malhado
scritto il 2023-01-24 21:26:32
0
Devi essere registrato per votare i commenti.Matt705 scritto il 2022-08-25 00:22:54
Anybody else getting this? Thanks in advance.
2
Devi essere registrato per votare i commenti.Jackie#1107
scritto il 2022-10-02 07:37:39
0
Devi essere registrato per votare i commenti.nataliem#2255
scritto il 2018-04-28 04:04:38
1
Devi essere registrato per votare i commenti.Prudentius
scritto il 2018-08-02 13:34:40
1
Devi essere registrato per votare i commenti.Mot
scritto il 2022-08-13 12:38:10
(I ask because I started playing WoW with Legion, so I wasn't aware of these things at the time).
1
Devi essere registrato per votare i commenti.Ellencia#3986
scritto il 2021-11-01 21:56:04
I couldn't find ID anyway.
1
Devi essere registrato per votare i commenti.PhoenixFire scritto il 2022-01-01 20:54:33
1
Devi essere registrato per votare i commenti.Cloud
scritto il 2021-07-05 00:44:03
1
Devi essere registrato per votare i commenti.Mot
scritto il 2020-12-29 09:06:14
2
Devi essere registrato per votare i commenti.Cithan#2540
scritto il 2020-12-26 07:41:46
2
Devi essere registrato per votare i commenti.Cithan#2540
scritto il 2020-12-26 10:26:56
1
Devi essere registrato per votare i commenti.Frostyuwu
scritto il 2020-09-16 02:27:41
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.
0
Devi essere registrato per votare i commenti.Rubberfruit scritto il 2020-11-26 17:06:02
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)
(edited)
0
Devi essere registrato per votare i commenti.Rubberfruit scritto il 2020-11-26 16:45:55
ability(id) [self.hp <= enemy.hp] does not work (edited)
1
Devi essere registrato per votare i commenti.Hmoff
scritto il 2020-11-12 00:25:33
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
1
Devi essere registrato per votare i commenti.raga#2470
scritto il 2020-10-28 07:49:49
0
Devi essere registrato per votare i commenti.Darkironman scritto il 2020-10-17 19:29:33
1
Devi essere registrato per votare i commenti.squishy930
scritto il 2020-10-18 13:14:24
1
Devi essere registrato per votare i commenti.Threewolves
scritto il 2020-07-31 19:01:04
2
Devi essere registrato per votare i commenti.DragonsAfterDark
scritto il 2020-07-31 21:16:23
1: Humanoid
2: Dragonkin
3: Flying
4: Undead
5: Critter
6: Magic
7: Elemental
8: Beast
9: Aquatic
10: Mechanical
2
Devi essere registrato per votare i commenti.Shenk
scritto il 2020-08-01 06:57:01
1
Devi essere registrato per votare i commenti.Threewolves
scritto il 2020-08-01 19:19:49
2
Devi essere registrato per votare i commenti.Zurdo
scritto il 2020-07-15 13:07:57
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 (edited)
1
Devi essere registrato per votare i commenti.Amber1019
scritto il 2020-03-12 10:17:18
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. (edited)
2
Devi essere registrato per votare i commenti.Shenk
scritto il 2020-03-12 11:03:08
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
1
Devi essere registrato per votare i commenti.Amber1019
scritto il 2020-03-14 10:04:42
1
Devi essere registrato per votare i commenti.Pankracy#2378
scritto il 2020-02-23 06:17:43
1
Devi essere registrato per votare i commenti.Lazey
scritto il 2020-02-23 15:01:18
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.
1
Devi essere registrato per votare i commenti.Pankracy#2378
scritto il 2020-02-27 10:20:13
(edited)
1
Devi essere registrato per votare i commenti.Theaxx
scritto il 2020-01-25 17:32:02
2
Devi essere registrato per votare i commenti.Lazey
scritto il 2020-01-25 17:52:08
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. (edited)
0
Devi essere registrato per votare i commenti.Sarah scritto il 2019-02-17 04:13:06
1
Devi essere registrato per votare i commenti.Puny
scritto il 2019-12-30 11:19:24
1
Devi essere registrato per votare i commenti.DragonsAfterDark
scritto il 2019-12-30 15:23:08
:)
0
Devi essere registrato per votare i commenti.Sally scritto il 2019-09-23 17:54:54
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.
1
Devi essere registrato per votare i commenti.Remte
scritto il 2019-09-24 02:37:34
1
Devi essere registrato per votare i commenti.DragonsAfterDark
scritto il 2019-09-24 09:38:11
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.
-6
Devi essere registrato per votare i commenti.JaneDoe scritto il 2019-03-24 01:34:30
3
Devi essere registrato per votare i commenti.Lazey
scritto il 2019-04-12 04:33:42
0
Devi essere registrato per votare i commenti.Hodaress scritto il 2019-03-10 20:36:50
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?
2
Devi essere registrato per votare i commenti.Lazey
scritto il 2019-04-12 04:22:55
1
Devi essere registrato per votare i commenti.Wazzak
scritto il 2018-05-11 09:20:04
1
Devi essere registrato per votare i commenti.Wazzak
scritto il 2018-05-11 11:28:47
1
Devi essere registrato per votare i commenti.Kiwicat#21513
scritto il 2018-12-03 22:39:51
2
Devi essere registrato per votare i commenti.Kiwicat#21513
scritto il 2018-12-03 22:33:23
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 ^^
1
Devi essere registrato per votare i commenti.BevansDesign#1728
scritto il 2018-09-12 17:33:54
1
Devi essere registrato per votare i commenti.Eekwibble
scritto il 2018-09-12 21:07:35
1
Devi essere registrato per votare i commenti.BevansDesign#1728
scritto il 2018-09-28 15:25:13
3
Devi essere registrato per votare i commenti.Kranthos
scritto il 2018-11-12 18:10:30
2
Devi essere registrato per votare i commenti.Eekwibble
scritto il 2018-11-13 21:17:37
1
Devi essere registrato per votare i commenti.Kranthos
scritto il 2018-11-14 10:52:37
1
Devi essere registrato per votare i commenti.Eekwibble
scritto il 2018-11-14 19:05:09
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.
2
Devi essere registrato per votare i commenti.HarleyDoc
scritto il 2018-10-10 16:19:37
0
Devi essere registrato per votare i commenti.Killdozer scritto il 2018-10-15 08:42:55
2
Devi essere registrato per votare i commenti.Kranthos
scritto il 2018-11-05 10:36:13
0
Devi essere registrato per votare i commenti.anon scritto il 2018-09-08 16:37:28
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
2
Devi essere registrato per votare i commenti.Kranthos
scritto il 2018-11-03 11:45:44
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
1
Devi essere registrato per votare i commenti.Kranthos
scritto il 2018-11-03 12:01:17
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 ]
0
Devi essere registrato per votare i commenti.gannymede scritto il 2018-09-09 16:55:59
9
Devi essere registrato per votare i commenti.Prudentius
scritto il 2018-08-30 14:21:45
1
Devi essere registrato per votare i commenti.Sloober
scritto il 2018-08-04 17:13:29
1
Devi essere registrato per votare i commenti.Aranesh
scritto il 2018-08-04 18:43:17
1
Devi essere registrato per votare i commenti.gsanta
scritto il 2018-08-03 08:38:23
1
Devi essere registrato per votare i commenti.Aranesh
scritto il 2018-08-03 09:28:58
1
Devi essere registrato per votare i commenti.Ivanella#1279
scritto il 2018-08-03 07:35:33
-1
Devi essere registrato per votare i commenti.Jameskirkt scritto il 2023-03-06 14:43:58
Un conseil intégrez kkun qui connais la cognition ou l'érgonomie.
(edited)
2
Devi essere registrato per votare i commenti.Falchor#2647
scritto il 2018-09-26 09:03:42
0
Devi essere registrato per votare i commenti.ThomasHah scritto il 2019-09-07 15:37:34
0
Devi essere registrato per votare i commenti.lrywlus scritto il 2019-05-20 23:39:30
Nuovo Commento: