^

TD Scripts

1. Pré-requisitos


Para este guia, é necessário instalar os seguintes addons: Rematch, tdBattlePetScript, tdBattlePetScript Rematch. Presume-se que a instalação e configuração estão prontas, e os times estão salvos ou são fáceis de serem configurados.

2. Como funciona


Basicamente o addon seleciona a habilidade apropriada seguindo instruções escritas no script. Ex.:

use(Esquivar:312)
use(Proteção da Natureza:574) [!self.aura(Unknown Ability (ID: 820):820).exists]
use(Golpe Alfa:504)
As linhas acima resultam nas seguintes ações:
rodada 1: lança Esquivar
rodada 2: tenta lançar Esquivar, mas como está recarregando, segue para a linha seguinte e lança Proteção da Natureza
rodada 3: tenta lançar Esquivar, mas como está recarregando, segue para a linha seguinte. Como a aura Unknown Ability (ID: 820) está ativa, segue para linha seguinte e lança Golpe Alfa, e assim por diante.

Resumindo: cada linha é lida sequencialmente até encontrar um comando que pode ser executado. O desafio é escrever scripts capazes de lançar as habilidades de acordo com a estratégia selecionada.

3. Criação de scripts


3.1 O editor



A maneira mais simples de escrever um script é durante a batalha com o time previamente salvo no Rematch.
Depois de começar a batalha, abra o Rematch, clique com o botão direito sobre o respectivo time e selecione 'Write script'.
Uma nova janela será aberta, o 'Script editor'. Durante a batalha e enquanto o editor estiver ativo é possível escrever os scripts usando a funcionalidade de auto-completar.










Com o editor de scripts abert e durante a batalha, comece a digitar a ação desejada e logo aparecerá uma lista do tipo 'dropdown'.







Após selecionar uma ação (digite 'Ente'r ou clique sobre a ação) uma nova lista com as habilidades disponíveis para a mascote ativa será mostrada.






Novamente, selecione a ação desejada e, caso necessário, as condições para que esta ação seja executada. Comece digitando um colchete '[' seguido pela primeira letra da condição. As opções são: target (self, enemy) ou weather (clima).





De qualquer forma, uma nova lista será apresentada, se houver uma.









Caso parâmetros adicionais sejam necessários, como com as auras, uma nova lista será apresentada. Como antes, selecione a opção apropriada.

Uma vez familiarizado com os comandos, é possível iniciar digitando um comando seguido por um ponto para ativar a lista com as opções disponíveis. Lembre-se de fechar a condição com outro colchete: ']'.


Escrever e editar um script não é difícil pois o addon traz uma lista de comando, tornando a tarefa bem mais fácil. Boa sorte!


3.2 Ações


ability/use: lança uma habilidade
change: troca as mascotes
catch: captura uma mascote, se possível
standby: passa uma rodada
quit: sai da batalha

3.3 Condições


Condições são escritas entre colchetes ([condition]):
if & endif

3.4 Alvo


self: verifica por uma condição nas suas mascotes
enemy: verifica por uma condição nas mascotes do seu inimigo

3.5 Funções


dead (boolean)
hp (compare)
hp.full (boolean)
hpp (compare)
aura.exists (boolean)
aura.duration (compare)
weather (boolean)
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)

4. Exemplo prático


Embora o editor ajude muito com a funcionalidade de auto-completar, não é suficiente para escrever bons scripts. Uma boa idéia é escolher uma batalha e brincar com o editor até se sentir mais confiante com os comandos e poder escrever scripts mais complexos. Abaixo há uma lista de exemplos de mestres de mascotes que usam estratégias específicas. Presume-se que o time está carregado, as habilidades selecionadas foram aquelas mencionadas na estratégia, e que a mascote recomendada está sendo usada e não uma mascote equivalente.

4.1 Bichos Ululantes


A masmorra 'Bichos Ululantes' oferece uma excelente oportunidade para aprimorar suas habilidades. Até vencer a última batalha, as batalhas podem ser repetidas e é possível sair da masmorra, curar as mascotes e reiniciar. Há algumas mascotes aleatórias nas batalhas, mas somente poucas famílias e poucas habilidades. As 3 primeiras batalhas requerem uma mascote com um conjunto fixo de habilidades, fazendo dela um ótimo lugar para praticar. O script pode funcionar para a maioria das batalhas onde o mesmo conjunto de mascotes + habilidades é usado, tornando este script muito útil. O link para a estratégia é here.
A estratégia:
Prio 1: Manter Presença Esmeralda ativa
Prio 2: Usar Sonho Esmeralda quando os pontos de vida estiverem abaixo de ~1000
Prio 3: Mordida Esmeralda

use(Presença Esmeralda:597)
use(Sonho Esmeralda:598)
use(Mordida Esmeralda:525)
Da maneira como está escrito, o script lançará Presença Esmeralda sempre que estiver disponível. Como esta habilidade não possui recarga, é preciso adicionar uma condição que impeça o lançamento caso a aura já esteja presente.
As condições disponíveis são 'aura(Unknown Ability (ID: 823)).exists' ou 'aura(Unknown Ability (ID: 823)).duration'. A condição que parece se ajustar melhor é a primeira.
Após a alteração, teremos use(Presença Esmeralda:597) [self(#1Protodragonete de Esmeralda).aura(Unknown Ability (ID: 823)).exists], que pode ser traduzida como "lance Presença Esmeralda se minha mascote Protodragonete de Esmeralda tem a habilidade Unknown Ability (ID: 823) ativa".
Queremos o oposto disso, então negue a condição usando '!' antes do início da condição: use(Presença Esmeralda:597) [!self(#1Protodragonete de Esmeralda).aura(Unknown Ability (ID: 823)).exists], traduzida como "lance Presença Esmeralda se minha mascote Protodragonete de Esmeralda NÃO tiver a habilidade Unknown Ability (ID: 823) ativa". Eba!

use(Presença Esmeralda:597) [!self(Protodragonete de Esmeralda).aura(Unknown Ability (ID: 823)).exists]
Próximo passo: agora, o scripts lançará Sonho Esmeralda sempre que estiver disponível, que pode não ser desejado, especialmente no início da batalha. Adicionemos outra condição que lançará a habilidade quando o dragonete estiver com a vida baixa.

use(Sonho Esmeralda:598) [self(Protodragonete de Esmeralda).hp<1000]
Você pode optar por curar sua mascote se ela estiver com a vida abaixo de um percentual ao invés de um valor determinado:

use(Sonho Esmeralda:598) [self(Protodragonete de Esmeralda).hpp<50]
Esta última condição lançará Sonho Esmeralda quando seu dragonete estiver abaixo dos 50% de vida.
O script final:

use(Presença Esmeralda:597) [!self(Protodragonete de Esmeralda).aura(Unknown Ability (ID: 823)).exists]
use(Sonho Esmeralda:598) [self(Protodragonete de Esmeralda).hp<1000]
use(Mordida Esmeralda:525)
Caso seu dragonete morra, é possível trocar por outro equivalente com as mesmas habilidades, e o script continuará funcionando. Para trocar as mascotes, adicione a seguinte linha: change(#2) [self(#1).dead] (troque para a mascote 2 se a mascote 1 estiver morta)

Algumas considerações sobre a maneira como o script está escrito.
  • Se seu time tiver duas mascotes Protodragonete de Esmeralda, o script pode não funcionar conforme o esperado caso você troque de mascotes. Para evitar problemas, ao invés de especificar a mascote, use a posição do time, ou somente 'self'. Isto permite usar uma mascote diferente com as mesmas habilidade, como Dragonetinho Onírico ou Dragonetinho Esmeralda
  • Não use a posição da habilidade para lançar habilidades. Pode causar problemas se você usar uma alternativa cujas habilidades estão em posições distintas, como no caso dos dinossauros Zandalari, onde as habilidades Grupo de Caça e Garra Negra estão em uma posição diferente.
  • Use o código da habilidade ou o nome seguido do código. Alguns jogadores podem estar usando o jogo numa linguagem diferente da sua, e para estes o script deixa de funcionar no caso de se suar somente o nome das habilidades
  • É possível deixar somente o código da habilidade, que resulta em um script mais curto, mas não é necessário

Uma sugestão para todos os scripts (altere conforme necessário):

change(#2) [self(#1).dead]
use(Presença Esmeralda:597) [!self.aura(Unknown Ability (ID: 823):823).exists]
use(Sonho Esmeralda:598) [self.hp<1000]
use(Mordida Esmeralda:525)

4.2 Fragmentos


Os scripts são escritos para uma estratégia específica, mas há algumas ações comuns que podem ser usadas em muitos scripts. Ajuste-os às suas necessidades, verificando as condições corretas, e as use quando apropriado.
  • Passar na primeira rodada:
standby [round=1]
  • Trocar para um pet de nível baixo e de volta (mude a posição para os valores apropriados):

change(#2) [self(#1).dead & !self(#2).played]
change(#3) [self(#2).active]
  • Usar uma habilidade defensiva (esquiva) para bloquear uma habilidade inimiga (neste caso, Escavar)

use(Deflexão:490) [enemy.aura(Unknown Ability (ID: 340):340).exists]
  • Mudar o conjunto de habilidades usadas dependendo da mascote inimiga ativa

Se as mascotes inimigas ativas são as duas primeiras, a sua mascote lançará Sopro. Quando a terceira mascote entra na luta, sua mascote lançará Passagem de Bombardeio quando disponível e Isca caso seu inimigo lance Escavar

if [enemy(#3).active]
use(Isca) [enemy.aura(Unknown Ability (ID: 340):340).exists]
use(Passagem de Bombardeio)
endif
use(Sopro)

5. Links adicionais






ZadTheGlad

escreveu em 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
(edited)

Loeve escreveu em 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

escreveu em 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

escreveu em 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 escreveu em 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

escreveu em 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. (edited)

nataliem#2255

escreveu em 2018-04-28 04:04:38

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

Prudentius

escreveu em 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

escreveu em 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

escreveu em 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 escreveu em 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

escreveu em 2021-07-05 00:44:03

nice write up.

Mot

escreveu em 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

escreveu em 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

escreveu em 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

escreveu em 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 escreveu em 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)
(edited)

Rubberfruit escreveu em 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 (edited)

Hmoff

escreveu em 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

escreveu em 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. (edited)

Darkironman escreveu em 2020-10-17 19:29:33

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

squishy930

escreveu em 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

escreveu em 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

escreveu em 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

escreveu em 2020-08-01 06:57:01

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

Threewolves

escreveu em 2020-08-01 19:19:49

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

Zurdo

escreveu em 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 (edited)

Amber1019

escreveu em 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. (edited)

Shenk

escreveu em 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

escreveu em 2020-03-14 10:04:42

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

Pankracy#2378

escreveu em 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 (edited)

Lazey

escreveu em 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

escreveu em 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 !!!!
(edited)

Theaxx

escreveu em 2020-01-25 17:32:02

How do you find the ID of a certain pet?

Lazey

escreveu em 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. (edited)

Sarah escreveu em 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

escreveu em 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

escreveu em 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 escreveu em 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

escreveu em 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

escreveu em 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 escreveu em 2019-03-24 01:34:30

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

Lazey

escreveu em 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 escreveu em 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

escreveu em 2019-04-12 04:22:55

World of Warcraft_retail_WTFAccountACCOUNTNAMESavedVariablestdBattlePetScript.lua

Wazzak

escreveu em 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

escreveu em 2018-05-11 11:28:47

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

Kiwicat#21513

escreveu em 2018-12-03 22:39:51

It's okay. People make mistakes :P

Kiwicat#21513

escreveu em 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

escreveu em 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

escreveu em 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

escreveu em 2018-09-28 15:25:13

Oh, that's easy. Thanks!

Kranthos

escreveu em 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

escreveu em 2018-11-13 21:17:37

Good catch. ^

Kranthos

escreveu em 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

escreveu em 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

escreveu em 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 escreveu em 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

escreveu em 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 escreveu em 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

escreveu em 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

escreveu em 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 escreveu em 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

escreveu em 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

escreveu em 2018-08-04 17:13:29

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

Aranesh

escreveu em 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

escreveu em 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

escreveu em 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

escreveu em 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.

Novo Comentário:





































Nome:

Ligação: