I mostly use genbot for autofollow. When I copied the newest version down today that no longer worked - it would be straight to me instead of following my path and once it caught up to me once it would get stuck and just face me and not move.
After fixing the obvious typos still in the code (recommend using an editor that highlights those for you), I eventually worked out why follow wasn't working... It was defaulting to "FollowMode 1" which is the old mode I think and not working right.
OK, so I changed the ini to use FollowMode 2 (advpath follow), but then it just says "Unable to follow XXX". So I fixed that too. Then I changed the code so it sets the mode to default to 2 for new INI files, cause why would anyone want to use the old broken version?
Then I noticed MoveTo had the same problems so I changed those parts as well.
Note that for this fix to work you need to delete your old char's INI file or manually change FollowMode and MoveToMode in it to "2" instead of "1".
Here are all the changes I made:
Typos:
botcore.inc (12.25):
Added braces:
Code: Select all
Sub Do-FollowMode
/if (!${Defined[Param0][color=red]}[/color]) /return
/varset FollowMode ${Param0}
/return
Sub Do-MoveToMode
/if (!${Defined[Param0][color=red]}[/color]) /return
/varset MoveToMode ${Param0}
/return
bothealer.inc (12.23):
Added ending quote:
Code: Select all
Sub Do-settankheal
/if (!${Defined[Param0]}) {
/call ChatOut 3 ${MasterName} "My tank heal is ${TankSpell}[color=red]"[/color]
/return
}
/varset TankSpell "${CommandParam}"
/call ChatOut 3 ${MasterName} "I'll use ${TankSpell} to heal tanks."
/return
bothealer.inc (12.24):
Removed this extra brace:
Code: Select all
/varset TankList ${Ini[${IniFile},Healer,TankList,NotFound]}
/varset CasterList ${Ini[${IniFile},Healer,CasterList,NotFound]}
/if (${TankList.Equal[NotFound]} && ${CasterList.Equal[NotFound]}) {
/ini ${IniFile} Healer TankList "Warrior|Shadow Knight|Paladin|Monk|Beastlord|Ranger|Shaman|Berserker"
/ini ${IniFile} Healer CasterList "Necromancer|Wizard|Enchanter|Magician|Rogue|Druid|Cleric|Bard"
/ini ${IniFile} Healer
[color=red]}[/color]
}
/return
botcore.ini (12.25):
Fixes to FollowMode/MoveToMode default settings:
Code: Select all
/varset FollowMode ${Ini[${IniFile},Core,FollowMode,1]}
/if (${FollowMode}==1) {
/ini ${IniFile} Core FollowMode [color=red]2[/color]
/varset FollowMode [color=red]2[/color]
}
/varset MoveToMode ${Ini[${IniFile},Core,MoveToMode,1]}
/if (${MoveToMode}==1) {
/ini ${IniFile} Core MoveToMode [color=red]2[/color]
/varset MoveToMode [color=red]2[/color]
}
Fix to actually using FollowMode 2:
Code: Select all
/if (${FollowMode}==2) {
[color=red]/target ${FollowTarget}[/color]
/call FollowFunction "${Target.CleanName}"
}
I also notice that if I just sent "follow" alone, instead of picking the master as it is supposed to do, sometimes it will run with an old Param0. Like if I do "snt spell1 on Gerald" and then "follow", debugging code shows that the follow command is getting a Param0 of "spell1 on Gerald" leftover from the last command. Then it kind of picks something at random to follow. Maybe I'll try to fix that later.
Other suggestions:
"cmds Spell" and similiar help commands are case sensitive now. If you type "cmds spell" it tells you "NULL" which isn't very user friendly. I can't figure out how string manitpulation works right now though so I didn't fix that.
Also I think that "spellgem" should get saved to the ini file when you change it through the spellgem command.
-GT