kolton / d2bot-with-kolbot

d2bot game manager by D3STROY3R with kolbot libs by kolton for d2bs
346 stars 332 forks source link

Line 473 "lightning undefined" #1717

Closed Tannerd00 closed 5 years ago

Tannerd00 commented 5 years ago

// Sorceress config file

/* Brief instructions:

function LoadConfig() { /* Sequence config

Tannerd00 commented 5 years ago

Just want to know why I am getting the error. I tried putting lightning in the brackets without upper case and even tried without anything inputted on that line at all. I feel like it shouldn't be getting stuck there...?

mayphilc commented 5 years ago

You dont even have attacks set up for starters. There is no reason to ever type "lightning" anywhere for any reason. I'd suggest follow the very simple setup instructions that explain this in its entirety and show you how to set this file up for your first run

mayphilc commented 5 years ago

Actually I overlooked the real issue, again just points to the fact you didnt follow the instructions or skipped some of them idk. You out the spell I'd for lightning (49) inside the bracket and (0) where the spell should be. Recopy the entore attack section from a fresh config, look at the sample attack.txt file included with the bot and see how its done properly. I wont give you the direct answer because you wont learn how ton use the bot if I do, but I've at least told you where too find the answer. Gl

Tannerd00 commented 5 years ago

// Sorceress config file

/* Brief instructions:

function LoadConfig() { /* Sequence config

Tannerd00 commented 5 years ago

I changed like you said still get same error "Line 473 "lightning undefined"

mayphilc commented 5 years ago

Paste JUST he attack config from your file

This is the file you need to reference:

https://github.com/kolton/d2bot-with-kolbot/blob/master/d2bs/kolbot/libs/config/Templates/Attacks.txt

Tannerd00 commented 5 years ago

I did as you said still same problem. that's not the line its having error on homie. read title and find that line its the immune line...

mayphilc commented 5 years ago

The only problem you have is what I posted above, these lines:

Config.AttackSkill[42] = 0; // Preattack skill. Config.AttackSkill[49] = 0; // Primary skill to bosses. Config.AttackSkill[49] = 0; // Primary untimed skill to bosses. Keep at -1 if Config.AttackSkill[1] is untimed skill. Config.AttackSkill[49] = 0; // Primary skill to others. Config.AttackSkill[49] = 0; // Primary untimed skill to others. Keep at -1 if Config.AttackSkill[3] is untimed skill. Config.AttackSkill[49] = 0; // Secondary skill if monster is immune to primary. Config.AttackSkill[49] = 0; // Secondary untimed skill if monster is immune to primary untimed.

Are incorrect. See the file i posted for examples

Tannerd00 commented 5 years ago

Config.AttackSkill[0] = -1; // Preattack skill. Not implemented yet. Config.AttackSkill[1] = 49; // Primary skill to bosses. Config.AttackSkill[2] = -1; // Primary untimed skill to bosses. Keep at -1 if Config.AttackSkill[1] is untimed skill. Config.AttackSkill[3] = 53; // Primary skill to others. Config.AttackSkill[4] = -1; // Primary untimed skill to bosses. Keep at -1 if Config.AttackSkill[3] is untimed skill. Config.AttackSkill[5] = -1; // Secondary skill if monster is immune to primary. Config.AttackSkill[6] = -1; // Secondary untimed skill if monster is immune to primary untimed.

Tannerd00 commented 5 years ago

it didn't work homie still says line 473 is wrong

Spoofzor commented 5 years ago

Hey @Tannerd00 do me a quick favor? Instead of copy and pasting your config file here, please paste it at pastebin.com or somewhere similar. Then provide us with the link.

Reason being, Pastebin will maintain line numbers and syntax highlighting - making it much easier to read through and solve. We have no idea which line 473 is just by looking at it. No worries though we have all done this. I know I have.

While we await the pastebin link I might have found your problem, but I'm not sure.

So the most important thing to solve THIS error is line 473 In a clean Sorceress.js config, line 473 is the line:

Config.SkipImmune = []; This, paired with the error "lightning undefined", makes me think that you might have something like: Config.SkipImmune = [lightning]; When it should be like the examples in the config in the line above

Edit: Spelling.

P.S. BUT, you don't have these fields filled out in the config you pasted above, so I'm not convinced. Pastebin link of your actual Sorceress.YourName.js config please.

Tannerd00 commented 5 years ago

How do I get to skip light immunes then if " Config.SkipImmune = [lightning]; " doesn't work properly? I just decided to just not go to light immune areas since nobody can seem to help... I am also having trouble finding out how to find boss Classids and Names for "Config.StaticList = [];" if someone would copy/paste what it should look like for "baal" that would be awesome.

Tannerd00 commented 5 years ago

If "Config.SkipImmune = [lightning];" isn't correct then what is correct way to fill that line out?

Tannerd00 commented 5 years ago

https://pastebin.com/Fq522HJj

Spoofzor commented 5 years ago

If "Config.SkipImmune = [lightning];" isn't correct then what is correct way to fill that line out?

See my previous response:

This, paired with the error "lightning undefined", makes me think that you might have something like: Config.SkipImmune = [lightning]; When it should be like the examples in the config in the line above

Look at lines above 473: 471 and 472. Notice any differences between the examples given and what you are asking?

Next,

I am also having trouble finding out how to find boss Classids and Names for "Config.StaticList = [];" if someone would copy/paste what it should look like for "baal" that would be awesome.

I will give you the answer to this one for two reasons. One, it may not be obvious how simple it is. Two, perhaps it will give you a hint if you are still unsure about the lightning problem above.

You don't NEED the Boss ID numbers, their names as strings will work.

Config.CastStatic = 50;
Config.StaticList = ["Andariel","Mephisto","Diablo","Baal"];

Will cast static on Andariel, Mephisto, Diablo, and Baal until Config.CastStatic hp%

I hope this helps.

Tannerd00 commented 5 years ago

Thank you for teaching me the hard way. I figured it out! thanks!