macman104
Member
Okay, well I wasn't really sure how to title this subject without making it too long, so hopefully the title isn't too nondescript. Anyway, I see two different ways of accomplishing the same task, and I was wondering if there is a functional difference between the two, or at least how does mafia perceive the two different structures differently. When you are adventuring for a specific set of conditions you may have a code that looks something like this
Now, that's one way of accomplishing it, but how does mafia interpret it differently from this:
I realize the difference, where one uses all the adventures you have and the other just keeps using one adventure. And upon writing this question, I guess I see that the
way could enter an infinite loop, but besides that is there an advantage to using one over the other? Also, I was thinking, how often does mafia check your adventures left? I mean, if it says, okay you have 60 adventures left, will it realize if one of those adventures doesn't use a turn for some reason, and recognize it needs to adventure one more extra time if you use the my_adventures() approach. Any other differences I'm missing?
EDIT: Another way that I noticed in someones script was to use the following option:
are there advantages of this over the others?
Code:
while(item_amount($item[some item]) < setlimit)
{
adventure(my_adventures(), $location[a spot]);
}
Now, that's one way of accomplishing it, but how does mafia interpret it differently from this:
Code:
while(item_amount($item[some item]) < setlimit)
{
adventure(1, $location[a spot]);
}
I realize the difference, where one uses all the adventures you have and the other just keeps using one adventure. And upon writing this question, I guess I see that the
Code:
adventure(1, $location[a spot]);
EDIT: Another way that I noticed in someones script was to use the following option:
Code:
while(item_amount($item[some item]) < setlimit && my_adventures() > 0)
{
adventure(1, $location[a spot]);
}