01-22-2024, 04:11 AM
How to add custom spells and runes to OTBot?
1. Introduction
This tutorial will teach you how to add custom spells and runes to OTBots, so you can use those runes and spells on Targeting, Runemaker, Healer, LUA -> cast(), etc.
You can also FIX spells and runes if the spellwords, mana points or rune id are different in the server you are playing. If you try to create a spell or rune that already exists, Bot will overwrite the existing one with the information you provided.
Bot can load custom spells and runes from a xml file its folder, so you will need to create or edit existing to add custom stuff.
There's an example file on Bots folder, it's called "custom_spells_runes_example.xml", which add a custom rune, a custom spell to create that rune and a common spell.
There are two ways to make this XML file be loaded on Bot:
1. OTBot will automatically "custom_spells_runes.xml". So you would just need to create a file with name "custom_spells_runes.xml".
2. Use startup option -customspellrunes "xmlPath", you can find more information on release thread. Example: -customspellrunes "C:\Bots\custom_spells_runes_X_SERVER.xml"
That means if you rename "custom_spells_runes_example.xml" to "custom_spells_runes.xml" then Bot will load "Custom Spell", "Custom Rune Spell" and "Custom Rune" that are specified in that file as example.
2. About XML file
Here's "custom_spells_runes_example.xml" contents:
Line #16 creates a spell with name "Custom Spell", which has spellwords "exori vis", requires 25 mana points, it's an instant spell (check line #13) and it's an attack spell (check line #14).
Line #17 creates a spell with name "Custom Rune Spell", which has spellwords "exori vis", requires 25 mana points, it's an instant spell (check line #13) and it's an attack spell (check line #14).
It's important that you create spell with correct information, because a mistake could lead your character to death or banishment. If you create a spell with wrong spellwords, Bot could keep spamming that spell and could be flagged as a bot. What if it was a healing spell? Character would not heal and die!
Also, Bot uses those information to load spell on its Tools. Runemaker for example ONLY loads spells of type "ItemTransformation"; Targeting ONLY loads spells of "Type" = "Instant" and "Category" = "Attack"; Healer ONLY loads spells of "Type" = "Instant" and "Category" = "Healing".
3. Types and Categories
We are 3 types and 6 categories, which will be explained below.
Type
Category
Warning: If it's rune spell then the Type should be according rune's effect.
4. Tutorial to create spell and rune
I will not use "custom_spells_runes_example.xml" contents on this example.
Let's say that I want to add a custom "Avalanche" rune spell and a custom rune that's created by Avalanche rune spell. So we are going to create a spell and a rune.
1. Create a .xml file on Bots folder with name "custom_spells_runes.xml".
2. Open that new file with your prefered text editor, even notepad.
3. We are going to start creating the basic structure of the .xml file, which is:
4. Now, let's start creating the Avalanche spell. So we need to create a "Spell" tag inside Spells and setup it.
4.1. It's "Avalanche" spell, so write "Avalanche" on Spell's Name attribute.
4.2. Its spellwords are "adori mas frio", so write it on Spell's Words attribute.
4.3. That spell requires 530 mana points, so write it on Spell's Mana attribute.
4.4. That spell is used to transform a blank rune into avalanche rune, so write "ItemTransformation" on Spell's Type attribute.
4.5. Avalanche rune inflict damage on creatures, that means Category is Attack, so write "Attack" on Spell's Category attribute.
5. Finally, we have this structure:
6. Now, let's start creating the Avalanche rune. So we need to create a "Spell" tag inside Spells and setup it.
6.1. It's "Avalanche" rune, so write "Avalanche Rune" on Rune's Name attribute.
6.2. Let's say that avalanche rune id is 3158, which may be different from server to server, so write 3158 on Rune's Id attribute.
6.3. The spell to create this rune is "Avalanche", which we just created, it should match a spell name, so write it on Rune's Spell attribute.
7. Finally, we have this structure:
8. This structure will create Avalanche spell and Avalanche rune on Bot.
9. The end!
When you start OTBots, Bot will read custom_spells_runes.xml file or custom filename if you used Startup Option then add your custom spells and runes.
1. Introduction
This tutorial will teach you how to add custom spells and runes to OTBots, so you can use those runes and spells on Targeting, Runemaker, Healer, LUA -> cast(), etc.
You can also FIX spells and runes if the spellwords, mana points or rune id are different in the server you are playing. If you try to create a spell or rune that already exists, Bot will overwrite the existing one with the information you provided.

Bot can load custom spells and runes from a xml file its folder, so you will need to create or edit existing to add custom stuff.
There's an example file on Bots folder, it's called "custom_spells_runes_example.xml", which add a custom rune, a custom spell to create that rune and a common spell.
There are two ways to make this XML file be loaded on Bot:
1. OTBot will automatically "custom_spells_runes.xml". So you would just need to create a file with name "custom_spells_runes.xml".
2. Use startup option -customspellrunes "xmlPath", you can find more information on release thread. Example: -customspellrunes "C:\Bots\custom_spells_runes_X_SERVER.xml"
That means if you rename "custom_spells_runes_example.xml" to "custom_spells_runes.xml" then Bot will load "Custom Spell", "Custom Rune Spell" and "Custom Rune" that are specified in that file as example.
2. About XML file
Here's "custom_spells_runes_example.xml" contents:
<!--
This .xml is an example to add custom spells and runes to Bot.
There are two ways to make this file be loaded on Bot:
1. OTBot will automatically "custom_spells_runes.xml". So you would just need to rename this file from "custom_spells_runes_example.xml" to "custom_spells_runes.xml".
2. Use startup option -customspellrunes "xmlPath", you can find more information on release thread. Example: -customspellrunes "C:\Bots\custom_spells_runes.xml"
-->
<OTBots>
<Spells>
<!--
Name = Spell name.
Words = Magic words to cast spell.
Mana = Mana required to cast spell.
Type = Instant, Creation, ItemTransformation
Category = Attack, Healing, Summon, Supply, Support and Strike. If it is a rune then Category should be according the rune effects.
-->
<Spell Name="Custom Spell" Words="exori vis" Mana="25" Type="Instant" Category="Attack" />
<Spell Name="Custom Rune Spell" Words="adori mas frigo" Mana="530" Type="ItemTransformation" Category="Attack" />
</Spells>
<Runes>
<!--
Name = Rune name.
Id = Rune item id.
Spell = Rune spell name.
-->
<Rune Name="Custom Rune" Id="3158" Spell="Custom Rune Spell" />
</Runes>
</OTBots>Line #16 creates a spell with name "Custom Spell", which has spellwords "exori vis", requires 25 mana points, it's an instant spell (check line #13) and it's an attack spell (check line #14).
Line #17 creates a spell with name "Custom Rune Spell", which has spellwords "exori vis", requires 25 mana points, it's an instant spell (check line #13) and it's an attack spell (check line #14).
It's important that you create spell with correct information, because a mistake could lead your character to death or banishment. If you create a spell with wrong spellwords, Bot could keep spamming that spell and could be flagged as a bot. What if it was a healing spell? Character would not heal and die!
Also, Bot uses those information to load spell on its Tools. Runemaker for example ONLY loads spells of type "ItemTransformation"; Targeting ONLY loads spells of "Type" = "Instant" and "Category" = "Attack"; Healer ONLY loads spells of "Type" = "Instant" and "Category" = "Healing".
3. Types and Categories
We are 3 types and 6 categories, which will be explained below.
Type
- Instant = spells which give a direct result, have an instant effect. Example: Light spell ('utevo lux'), Berserk ('exori'), etc.
- ItemTransformation = spells that transform items into another item. Example: Great Fireball Rune spell that turns a blank rune into a GFB rune.
- Creation = spells that creates items. Example: Create blank rune spell ('adori blank') that creates a blank rune.
Category
Warning: If it's rune spell then the Type should be according rune's effect.
- Attack = spells that inflict damage. Example: Fire Wave, Great Fireball Rune Spell, Berserk...
- Healing = spells used to regain hitpoints / mana points. Example: Light Healing, Ultimate Healing Rune, Heal Friend...
- Summon = spells used to summon creatures, trainers, etc. Example: Summon Creature...
- Supply = spells used to create supplies. Example: Conjure Power Bolt, Conjure Poisoned Arrow...
- Support = spells used in place of some tools, and provide general support for the caster. Example: Invisible, Destroy Field rune spell, Levitate...
- Strike = spells that its effects happens in front of you. Example: Energy Strike, Death Strike...
4. Tutorial to create spell and rune
I will not use "custom_spells_runes_example.xml" contents on this example.
Let's say that I want to add a custom "Avalanche" rune spell and a custom rune that's created by Avalanche rune spell. So we are going to create a spell and a rune.
1. Create a .xml file on Bots folder with name "custom_spells_runes.xml".
2. Open that new file with your prefered text editor, even notepad.
3. We are going to start creating the basic structure of the .xml file, which is:
<OTBots>
<Spells>
</Spells>
<Runes>
</Runes>
</OTBots>4.1. It's "Avalanche" spell, so write "Avalanche" on Spell's Name attribute.
4.2. Its spellwords are "adori mas frio", so write it on Spell's Words attribute.
4.3. That spell requires 530 mana points, so write it on Spell's Mana attribute.
4.4. That spell is used to transform a blank rune into avalanche rune, so write "ItemTransformation" on Spell's Type attribute.
4.5. Avalanche rune inflict damage on creatures, that means Category is Attack, so write "Attack" on Spell's Category attribute.
5. Finally, we have this structure:
<OTBots>
<Spells>
<Spell Name="Avalanche" Words="adori mas frigo" Mana="530" Type="ItemTransformation" Category="Attack" />
</Spells>
<Runes>
</Runes>
</OTBots>6.1. It's "Avalanche" rune, so write "Avalanche Rune" on Rune's Name attribute.
6.2. Let's say that avalanche rune id is 3158, which may be different from server to server, so write 3158 on Rune's Id attribute.
6.3. The spell to create this rune is "Avalanche", which we just created, it should match a spell name, so write it on Rune's Spell attribute.
7. Finally, we have this structure:
<OTBots>
<Spells>
<Spell Name="Avalanche" Words="adori mas frigo" Mana="530" Type="ItemTransformation" Category="Attack" />
</Spells>
<Runes>
<Rune Name="Avalanche Rune" Id="3158" Spell="Avalanche" />
</Runes>
</OTBots>9. The end!
When you start OTBots, Bot will read custom_spells_runes.xml file or custom filename if you used Startup Option then add your custom spells and runes.

