Bloody Knuckles
New member
I'm thinking of writing a script to do the easy quests. Only thing is I don't know how to handle the buffs. I was thinking of making a list of relevant buffs. Then I'd write a function to search for the lowest duration relevant buff, and casting that buff. Repeat until below a certain mana percentage.
Then, I'd call that function after every adventure.
Something like this:
Some questions
How do I grab lowest duration buff? Does it show if the duration is zero? (That is, if I don't have any buffs).
Any help would be appreciated.
Then, I'd call that function after every adventure.
Something like this:
Code:
while(QUEST_NOT_DONE)
{
adventureAt();
foo
}
foo()
{
while( mana/total_mana > 0.3 )
cast(grabLowestDurationRelevantBuff());
}
grabLowestDurationRelevantBuff()
{
switch (lowestDurationBuff )
case BuffA
return BuffA
case BuffB
return BuffB
case BuffC
return BuffC
Default
throw error;
}
Some questions
How do I grab lowest duration buff? Does it show if the duration is zero? (That is, if I don't have any buffs).
Any help would be appreciated.