Code:
void Get_best_acc1(){
if(item_amount($item[Jekyllin hide belt]) > 0 && !have_equipped($item[Jekyllin hide belt])){
equip($slot[acc1], $item[Jekyllin hide belt]);
}
Code:
void Get_best_acc2(){
if(item_amount($item[Jekyllin hide belt]) > 0 && !have_equipped($item[Jekyllin hide belt])){
equip($slot[acc2], $item[Jekyllin hide belt]);
}
Code:
void Get_best_acc3(){
if(item_amount($item[Jekyllin hide belt]) > 0 && !have_equipped($item[Jekyllin hide belt])){
equip($slot[acc3], $item[Jekyllin hide belt]);
}
Looking at this, it looks to me that if one happens to possess three jek belts, it will fail to equip all three of them, even though that is what you intend to do.
In my experience, when you equip() an item, its item_amount is decremented, so simply checking if you have one of them should be enough. I may be wrong on this, but I do recall having to work around that when writing a boolean got_item() function. Its simple enough to find out if its true.
I'm mostly posting because I recently wrote some code to handle equipping the 'best' of a set of accessories, and I ran into similar problems. (do I have this? is it already equipped elsewhere? do I have a spare one?). Smart accessory outfitting is surprisingly tricky, but I think I found a good solution.
BTW: indentation is good, m'kay?