Page 8 of 19

Posted: Mon May 23, 2005 2:35 pm
by wardave
So /for a 0 to ${Group} needs to be changed to what? In advpath.inc

Posted: Mon May 23, 2005 2:45 pm
by fearless
The answer . . . is in the last post of the advpath thread (or close to last at least)

Posted: Sun Jun 19, 2005 12:09 am
by CodeCaster
The answer to the question I had posted here was embarassing enough for me to delete it. *bonk*

Thanks,
-CodeCaster

Posted: Sat Jul 02, 2005 11:32 am
by nytemyst
With string gone this has stoped working and my mind blow up trying to fix some of it hehe.

Posted: Sat Jul 02, 2005 12:20 pm
by fearless
Good luck.

Posted: Sat Jul 02, 2005 8:13 pm
by SirCodeAlot
For anyone who wants to try and tackle this, I have located all of the String TLO stuff:

Code: Select all

[****@**** genbot]$ grep -n "String\[" *
botcore.inc:476:   /if (!${String[ item alt spell slot ].Find[ ${MountItem.Arg[1].Arg[1,-]} ]}) /varset MountItem item ${MountItem}
botcore.inc:758:      /if (${String[ ${cmds-Routines.Lower} ].Find[ ${CurrCommand.Lower} ]}) {
botcore.inc:766:      /if (${String[ ${cmds-Shortcuts.Lower} ].Find[ ${CurrCommand.Lower} ]}) {
botcore.inc:781:         /if (${String[ ${cmds-${SectionsList.Arg[${GenFor}]}} ].Find[ ${CurrCommand} ]}) {
botcore.inc:949:   /vardata ${sList} String[${sDiv}${${sList}}${sDiv}${sDiv}]
botcore.inc:950:   /varset splaceholder ${String[${${sList}}].Arg[${sArg},${sDiv}]}
botcore.inc:952:   /varcalc sright ${sleft}+${String[${splaceholder}${sDiv}].Length}
botcore.inc:953:   /vardata ${sList} String[${${sList}.Left[${sleft}]}${${sList}.Right[-${sright}]}]
botcore.inc:960:   /vardata ${sList} String[${sDiv}${${sList}}${sDiv}${sDiv}]
botcore.inc:964:   /varset splaceholder ${String[${${sList}}].Arg[${sArg},${sDiv}]}
botcore.inc:966:   /varcalc sright ${sleft}+${String[${splaceholder}${sDiv}].Length}
botcore.inc:967:   /vardata ${sList} String[${${sList}.Left[${sleft}]}${sElement}${sDiv}${${sList}.Right[-${sright}]}]
botcore.inc:980:         /varcalc sright ${sleft}+${String[${oldElement}].Length}
botcore.inc:994:   /vardata ${sList} String[${sDiv}${${sList}}${sDiv}${sDiv}]
botcore.inc:997:   /varcalc sleft  ${String[${sDiv}${${sList}}${sDiv}].Find[${sDiv}${sName}${sDiv}]}-1
botcore.inc:998:   /varcalc sright ${sleft}+${String[${sName}${sDiv}].Length}
botcore.inc:999:   /vardata ${sList} String[${${sList}.Left[${sleft}]}${${sList}.Right[-${sright}]}]
botcore.inc:1057:         /if (${String[|${IgnGroupList}|].Find[|${ChatText.Arg[1]}|]}) /return
botcore.inc:1060:   /if (${String[ ${MasterList.Lower} ].Find[ ${ChatSender.Lower} ]}) {
botcore.inc:1111:   /if (${String[ ${MasterList.Lower} ].Find[ ${Param1.Lower} ]}) {
botcore.inc:1120:   /if (${String[ ${MasterList.Lower} ].Find[ ${IRCSender.Lower} ]}) {
botcore.inc:1136:   /if (${String[ ${MasterList.Lower} ].Find[ ${IRCSender.Lower} ]}) {
bothealer.inc:163:/if (${String[${Param0}].Equal[off]}) {
botmain.inc:116:      /if (${String[ ${cmds-Shortcuts.Lower} ].Find[ ${Param0.Lower} ]}) {
botmain.inc:160:      /if (!${String[ ${cmds-${SectionName}} ].Find[ ${Param${GenFor}} ]}) {
botmain.inc:217:      /if (${String[ true on 1 yes ].Find[ ${newValue} ]}) {
botmain.inc:220:      } else /if (${String[ false off 0 no ].Find[ ${newValue} ]}) {
botspell.inc:169:      /if (!${String[ ${BuffPtrList} ].Find[ ${GenFor} ]} && !${Ptr}) {
botspell.inc:190:            /if (!${String[|BuffSelfIconList|].Find[|${BuffType};${BuffCast}|]}) {
botspell.inc:198:      /if (${String[|${TimedBuffList}].Find[|${BuffSpell};]}) {
botspell.inc:202:            /if (!${String[|${BuffSelfList}|].Find[|${BuffType};${BuffCast}|]}) {
botspell.inc:257:         /if (${String[|${BuffSelfIconList}|].Find[|${CommandParam}|]}) {
botspell.inc:295:   /if (${String[|${TimedBuffList}].Find[|${BuffSpell};]}) {
botspell.inc:455:   /if (!${String[ item spell alt ].Find[ ${AddCastText.Lower.Arg[1,;].Arg[1,-]} ]}) {
botspell.inc:462:      /if (${String[|pb ae|self|ae pc v2|group v1|].Find[|${Spell[${AddCastText.Arg[2,;]}].TargetType.Lower}|]}) {
botspell.inc:466:      /if (${String[|pb ae|self|ae pc v2|group v1|].Find[|${FindItem[${AddCastText.Arg[2,;]}].Spell.TargetType.Lower}|]}) {
botspell.inc:470:   /if (!${String[ corpse pc npc pet assist- 0 ].Find[ ${AddCastTarget.Arg[1].Lower} ]}) {
botspell.inc:524:   /if (${String[ 1 2 3 4 5 6 7 ].Find[ ${CastStep} ]}) {
botspell.inc:793:   /if (${String[ gem1 gem2 gem3 gem4 gem5 gem6 gem7 gem8 gem9 ].Find[ ${RCType.Lower} ]}) {
[****@**** genbot]$ grep -n "String\[" * | wc
     39     268    3684
39 occurrences... all the line numbers and files are there. I may get around to it at some point, but I figured I'd post this if anyone needed a kick-start.

Posted: Sun Jul 03, 2005 12:42 am
by Tagger
can and will someone please update genbot for the one of us that have no idea what in the heck were doing but loving genbot...

I will donate to you personally if you can provide a updated version that works with todays zip...

Posted: Sun Jul 03, 2005 12:46 am
by DigitalMocking
SirCodeAlot wrote:For anyone who wants to try and tackle this, I have located all of the String TLO stuff:

Code: Select all

[****@**** genbot]$ grep -n "String\[" *
botcore.inc:476:   /if (!${String[ item alt spell slot ].Find[ ${MountItem.Arg[1].Arg[1,-]} ]}) /varset MountItem item ${MountItem}
botcore.inc:758:      /if (${String[ ${cmds-Routines.Lower} ].Find[ ${CurrCommand.Lower} ]}) {
botcore.inc:766:      /if (${String[ ${cmds-Shortcuts.Lower} ].Find[ ${CurrCommand.Lower} ]}) {
botcore.inc:781:         /if (${String[ ${cmds-${SectionsList.Arg[${GenFor}]}} ].Find[ ${CurrCommand} ]}) {
botcore.inc:950:   /varset splaceholder ${String[${${sList}}].Arg[${sArg},${sDiv}]}
botcore.inc:952:   /varcalc sright ${sleft}+${String[${splaceholder}${sDiv}].Length}
botcore.inc:964:   /varset splaceholder ${String[${${sList}}].Arg[${sArg},${sDiv}]}
botcore.inc:966:   /varcalc sright ${sleft}+${String[${splaceholder}${sDiv}].Length}
botcore.inc:980:         /varcalc sright ${sleft}+${String[${oldElement}].Length}
botcore.inc:997:   /varcalc sleft  ${String[${sDiv}${${sList}}${sDiv}].Find[${sDiv}${sName}${sDiv}]}-1
botcore.inc:998:   /varcalc sright ${sleft}+${String[${sName}${sDiv}].Length}
botcore.inc:1057:         /if (${String[|${IgnGroupList}|].Find[|${ChatText.Arg[1]}|]}) /return
botcore.inc:1060:   /if (${String[ ${MasterList.Lower} ].Find[ ${ChatSender.Lower} ]}) {
botcore.inc:1111:   /if (${String[ ${MasterList.Lower} ].Find[ ${Param1.Lower} ]}) {
botcore.inc:1120:   /if (${String[ ${MasterList.Lower} ].Find[ ${IRCSender.Lower} ]}) {
botcore.inc:1136:   /if (${String[ ${MasterList.Lower} ].Find[ ${IRCSender.Lower} ]}) {
bothealer.inc:163:/if (${String[${Param0}].Equal[off]}) {
botmain.inc:116:      /if (${String[ ${cmds-Shortcuts.Lower} ].Find[ ${Param0.Lower} ]}) {
botmain.inc:160:      /if (!${String[ ${cmds-${SectionName}} ].Find[ ${Param${GenFor}} ]}) {
botmain.inc:217:      /if (${String[ true on 1 yes ].Find[ ${newValue} ]}) {
botmain.inc:220:      } else /if (${String[ false off 0 no ].Find[ ${newValue} ]}) {
botspell.inc:169:      /if (!${String[ ${BuffPtrList} ].Find[ ${GenFor} ]} && !${Ptr}) {
botspell.inc:190:            /if (!${String[|BuffSelfIconList|].Find[|${BuffType};${BuffCast}|]}) {
botspell.inc:198:      /if (${String[|${TimedBuffList}].Find[|${BuffSpell};]}) {
botspell.inc:202:            /if (!${String[|${BuffSelfList}|].Find[|${BuffType};${BuffCast}|]}) {
botspell.inc:257:         /if (${String[|${BuffSelfIconList}|].Find[|${CommandParam}|]}) {
botspell.inc:295:   /if (${String[|${TimedBuffList}].Find[|${BuffSpell};]}) {
botspell.inc:455:   /if (!${String[ item spell alt ].Find[ ${AddCastText.Lower.Arg[1,;].Arg[1,-]} ]}) {
botspell.inc:462:      /if (${String[|pb ae|self|ae pc v2|group v1|].Find[|${Spell[${AddCastText.Arg[2,;]}].TargetType.Lower}|]}) {
botspell.inc:466:      /if (${String[|pb ae|self|ae pc v2|group v1|].Find[|${FindItem[${AddCastText.Arg[2,;]}].Spell.TargetType.Lower}|]}) {
botspell.inc:470:   /if (!${String[ corpse pc npc pet assist- 0 ].Find[ ${AddCastTarget.Arg[1].Lower} ]}) {
botspell.inc:524:   /if (${String[ 1 2 3 4 5 6 7 ].Find[ ${CastStep} ]}) {
botspell.inc:793:   /if (${String[ gem1 gem2 gem3 gem4 gem5 gem6 gem7 gem8 gem9 ].Find[ ${RCType.Lower} ]}) {
[****@**** genbot]$ grep -n "String\[" * | wc
     39     268    3684
39 occurrences... all the line numbers and files are there. I may get around to it at some point, but I figured I'd post this if anyone needed a kick-start.
Took out a few that don't need to be fixed... only ${String[]} has to be removed, you had a couple of false positives in that list.

Posted: Sun Jul 03, 2005 8:06 am
by dman
Those /vardata lines need to be fixed as well Digital, the String at the beginning of them will parse out to be ${String}

Edit: If I'm reading all these lines right, I only found 1 "misuse" of the Sting TLO, the rest of them use the String TLO to add spaces/dividers around a variable to make it match exactly what they want, or combine different string variables into a single string for the sake of the compare. This means I've had to add a temp variables for almost every occurance of the ${String}.

Also, not sure if its mentioned in the thread or not, but

Code: Select all

botspell.inc:190:            /if (!${String[|BuffSelfIconList|].Find[|${BuffType};${BuffCast}|]}) { 
doesn't have the Variable BuffSelfIconList enclosed in ${} so could have caused problems.

Posted: Sun Jul 03, 2005 10:56 am
by SirCodeAlot

Code: Select all

botcore.inc:758:      /if (${String[ ${cmds-Routines.Lower} ].Find[ ${CurrCommand.Lower} ]}) {
botcore.inc:766:      /if (${String[ ${cmds-Shortcuts.Lower} ].Find[ ${CurrCommand.Lower} ]}) { 
Just from those, which are the second and third lines of that layout, you can see they are used incorrectly. If you are using .Lower, then it is already a String... and then they are converting that to a string... I didn't look at the others in detail, but I am sure that they can all be fixed to be "correct".

Posted: Sun Jul 03, 2005 2:47 pm
by madmike
Ok, nonprogrammer, noncomputer literate less than Noob working on this Genbot problem with String TLO error.

So far I have discovered that in an example line such as:

Code: Select all

botcore.inc:1111:   /if (${String[ ${MasterList.Lower} ].Find[ ${Param1.Lower} ]}) { 
The ${MasterList} returns MasterToonsName NULL
The ${Param1} returns MasterToonsName

Changeing the code to

Code: Select all

/if ${MasterList.Equal[${Param1}]}
does not work, since MasterToonsName NULL does not equal MasterToonsName

However, doing

Code: Select all

/if ${MasterList.Left[-5].Equal[${Param1}]}
will force both side of the comparison to equate.

I don't think this is a good way to do this, since if there are more than one MasterToonsName in the MasterList, the deduction of 5 characters will need to be modified accordingly.

Is there a way to get the NULL to leave the MasterList some other way?

Thanks in advance to anyone that can answer this.


edit:

Ok, I think this code will do it, it SEEMS to work, but not completely sure.

Code: Select all

/if (${MasterList.Find[${Param1}]})
Am I on the right track for the easier String TLO problems?

After these changes comes the

Code: Select all

/vardata ${sList} String[${sDiv}${${sList}}${sDiv}${sDiv}]
stuff, which according to an earlier post will parse to bring a String TLO error.

Posted: Sun Jul 03, 2005 8:17 pm
by dman
SirCodeAlot, they can be, but without reading through the entire set of code, I am not sure what the signifigance of the leading and trailing spaces in each of those examples could be. It may be nothing, but I believe the string tlo was used in those cases to delibrately add those spaces to remove false matches on the largish strings genbot uses, and if that is the way it works, it is a correct way of using string, combining 3 separate strings into 1. If the spaces would have no signifigance, ingore this entire post. :) I only started thinking they might after seeing the ways it was used and all the cases where they did similiar without the use of the TLO.

Posted: Mon Jul 04, 2005 2:34 am
by CodeCaster
This whole thing is like micro$oft changing the way C# works just because they don't like the way people are using their product... hahaha...

Oh, so you wanna spend years developing macros that work perfectly fine, but not the way I like it? /break

Posted: Mon Jul 04, 2005 3:03 am
by Tagger
oh come on some one please just fix the darn thing so we can play again the right way ...
:)

I will donate 20$ to the person that fixes it and makes it work and post it so i can play again with genbot..

NooB
Tagger

Posted: Mon Jul 04, 2005 4:05 pm
by Slackro
Now looks like as good a time as any to re-write genbot to use a more sophisticated Spellcasting.inc

This sucks.