What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

New "If" Statement Addition

Beowulfe

Community Developer
Joined
Nov 4, 2010
Messages
194
Reaction score
20
Hey guys,

Just wanted to say that the new <If> tag for questing is awesome. :D

I wanted to know if it was possible to get the same functionality in place and able to be used inside of <GrindArea> or at least inside a <Hotspots> tag. This would allow for some very nifty stuff, for instance:

-Allow a gathering profile that works all the way from lowest level to max level of a profession, using <if> statements to determine current profession level, moving to a trainer when at a certain profession level (using a plugin to train the profession), then moving to a different zone after training for further profession leveling.

-Allowing complex travel paths that don't screw up if the bot closes or crashes, for instance, Kickazz recently added a swimming path to his 1-60 grind profile (Alliance) to get to WPL at level 34, but if the bot crashes before it gets to WPL and manages to level up, it will swim *ALL* the way back and start swimming again. These if statements could be used to determine what zone it was in and simply continue the swim, rather than restarting from the first hotspot again.


Probably lots of other uses too, just a couple quick ones off the top of my head. :)
 
Beowulfe said:
Just wanted to say that the new <If> tag for questing is awesome
I couldn't agree more!

We've submitted Bugtracker #210 and Bugtracker #250 asking for similar functionality in some key places.

After Apoc got done laughing at me, he explained the current Conditional= attribute is not a general mechanism, and to extend it would take considerable effort. However, I think its niggling at him, and he'll look into it when he gets some time. :D

Beowulfe said:
using <if> statements to determine current profession level

That should be possible today, and the documentation on the &lt;If&gt; page has been updated to show you how in the "Commonly used Predicate Expression" section (see 'Professions'). The example should work, however to be honest, I didn't test it.

Its getting there, just going to take some time.

cheers,
CJ
 
Thanks for the reply. :)

That should be possible today, and the documentation on the &lt;If&gt; page has been updated to show you how in the "Commonly used Predicate Expression" section (see 'Professions'). The example should work, however to be honest, I didn't test it.

Yeah, I actually checked the page out - the problem is, as far as I can tell, those &lt;If&gt; statements only work inside &lt;QuestOrder&gt; tags, and you can't really make a profession-leveling profile in a quest order. :p

I was trying to use them in a normal grinding profile and it wasn't doing anything at all as far as I could tell, which is why I made this post. Would be useful to have in grinding profiles just as much as in questing profiles. :)
 
Beowulfe said:
Would be useful to have in grinding profiles just as much as in questing profiles.

You actually don't need a grinding profile&mdash;questing is sufficient. I believe you can 'cheat', easily...

<tt>&lt;QuestOrder&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;If Condition="Me.GetSkill(Styx.SkillLine.Herbalism).CurrentValue &amp;lt; 75"&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SetGrindArea&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!-- ... --&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/SetGrindArea&gt;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;GrindTo Level=??? /&gt; &lt;!-- Use a CustomBehavior to get this done--&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;CustomBehavior ...to run off and train... --&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/If&gt;
&lt;/QuestOrder&gt;</tt>

So our problem isn't Questing vs. Grinding profile. Anything you can do in a Grinding profile, you can do in a Questing profile.

But as you point out, we do have other problems to solve...
  • How to terminate a GrindTo directive when our skill is no longer being levelled
  • How to force Honorbuddy to run off to train

Both of these can be addressed with the new CustomBehavior tag, as natfoth has so capably demonstrated:

Alas, CustomBehavior isn't documented well--its coming Real Soon Now(TM). The point is, the problem can be solved today, but requires a bit of programming skill.

Just my $0.02,
CJ
 
Last edited:
Back
Top