How do I write the line correctly to add multiple custom attacks for different unique monsters

amzina66

New member
My script is written like this, but it only uses the first custom attack for the for 1st unique listed. How do I correct this so all the bosses are targeted with this spell?

--[[ #### Custom Attack Setting ####
Allows custom skills to be used on custom monsters. See _monsters.txt for monster IDs
Format: [ID] = {timed skill id, untimed skill id}
Example: [156] = {38, -1} -- use Charged Bolt on Andariel ]]--
Config.CustomAttack = {
[544] = {49, -1} -- use lightning on Baal, [243] = {49, -1} use lightning on Diablo, [242 = {49, -1} use lightning on Mephisto, [211] = {49, -1} use lightning on Duriel, [156] = {49, -1} use lightning on Andariel --

}
 

Buck

Member
Is this really all on one line? Everything after the first {49, -1} is commented out within your file if it's how you typed above.

Config.CustomAttack = {
[544] = {49, -1} -- use lightning on Baal, [243] = {49, -1} use lightning on Diablo, [242 = {49, -1} use lightning on Mephisto, [211] = {49, -1} use lightning on Duriel, [156] = {49, -1} use lightning on Andariel --

}

This should work:
Config.CustomAttack = {
[544] = { 49, -1 }, -- use lightning on Baal
[243] = { 49, -1 }, --use lightning on Diablo
[242] = { 49, -1 }, --use lightning on Mephisto
[211] = { 49, -1 }, --use lightning on Duriel
[156] = { 49, -1 }, --use lightning on Andariel

}

Tip: open these things in notepad++. Anything green is a programming comment and the script will completely ignore.
 

amzina66

New member
Is this really all on one line? Everything after the first {49, -1} is commented out within your file if it's how you typed above.



This should work:


Tip: open these things in notepad++. Anything green is a programming comment and the script will completely ignore.
thanks
 

amzina66

New member
This creates an error and wont load the bot. I can delete everything past the first line and will work for the first line but not anything else.
 

Buck

Member
the format is correct programmically, have no idea if they are the right areas and skills however. Also not sure what else is in your configs that could be causing the problems. I would attached everything (clean them of any sensitive information), the issue is probably elsewhere.
 
To kind of piggy back on this topic.
Is there a way to swap weapons (weapon slot 0 vs 1) & then use a certain skill.

Ideology:
Use Weapon slot 0 for Farming - Skill FOH & Conviction. (Existing Logic)
Use weapon slot 1 for DIablo, Baal kill - Skill smite & fanatcism. (added Logic)
 
Top