I'm working on a pretty big script at the moment, but it's not quite far along enough yet to post, so I'm just going to ask this here instead of posting a potentially very buggy script in the In-Progress section...
The main thing I want to check is, as usual, whether I've done something right or wrong with a portion of the script.
Here it is:
I don't have a character with any pixels or a need for any potions at the moment, so I can't test it out properly, but is there anyone who can just take a look at this and let me know if it'll do what I'm wanting it to do?
The main thing that I'm hoping will work are the or statements within the and statements.
The main thing I want to check is, as usual, whether I've done something right or wrong with a portion of the script.
Here it is:
Code:
void closet_red_pixel_potion() {
if(closet_amount($item[red pixel potion]) < 4 && item_amount($item[red pixel potion]) >= 4) {
put_closet((4 - closet_amount($item[red pixel potion])), $item[red pixel potion]);
}
if(closet_amount($item[red pixel potion]) == 3 && (closet_amount($item[black pixel]) >= 3 || item_amount($item[black pixel]) >= 3) && (closet_amount($item[red pixel]) >= 2 || item_amount($item[red pixel]) >= 2)) {
create(1, $item[red pixel potion]);
put_closet(1, $item[red pixel potion]);
}
if(closet_amount($item[red pixel potion]) == 2 && (closet_amount($item[black pixel]) >= 6 || item_amount($item[black pixel]) >= 6) && (closet_amount($item[red pixel]) >= 4 || item_amount($item[red pixel]) >= 4)) {
create(2, $item[red pixel potion]);
put_closet(2, $item[red pixel potion]);
}
if(closet_amount($item[red pixel potion]) == 1 && (closet_amount($item[black pixel]) >= 9 || item_amount($item[black pixel]) >= 9) && (closet_amount($item[red pixel]) >= 6 || item_amount($item[red pixel]) >= 6)) {
create(3, $item[red pixel potion]);
put_closet(3, $item[red pixel potion]);
}
if(closet_amount($item[red pixel potion]) == 0 && (closet_amount($item[black pixel]) >= 12 || item_amount($item[black pixel]) >= 12) && (closet_amount($item[red pixel]) >= 8 || item_amount($item[red pixel]) >= 8)) {
create(4, $item[red pixel potion]);
put_closet(4, $item[red pixel potion]);
}
}
I don't have a character with any pixels or a need for any potions at the moment, so I can't test it out properly, but is there anyone who can just take a look at this and let me know if it'll do what I'm wanting it to do?
The main thing that I'm hoping will work are the or statements within the and statements.