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

Can we add custom methods for ConditionParser?

iyake

Member
Joined
Oct 19, 2014
Messages
143
Reaction score
5
1) Is there a way to get orderbot to use plugin/custom methods for the condition attribute? i.e. if I wanted to define a HasAtLeastHQ(itemId, Count) method somewhere and have all if/while conditions use it.

2) Is there a way to invoke the parser on a string to get the resulting boolean so that we can leverage condition parser for our own tags?
 
1) just creating a public static class inside the ff14bot namespace should be sufficient. I've already added HasAtLeastHQ etc for the next version which should be ready in a few days.

2)
Code:
var Conditional = ScriptManager.GetCondition(Condition);
return Conditional();
 
Back
Top