Heyo... again.
I'm making a quest page, and I figured out most of the code to begin with which I'm super proud of.
I have this code that works:
But I was wondering if there was any way to make a confirmation button before it just takes the items. Preferably this would be without having to direct to a subpage. Basically, i want from "if($berries>=3){" to the end (the part that says there's not enough berries) to pop up only if they have stated that they want to hand over their berries. I can do this with a subpage, but I don't want to have to make a new subpage for each fetch quest I end up making...
I'm making a quest page, and I figured out most of the code to begin with which I'm super proud of.
I have this code that works:
PHP:
if($questsdone == 0){
//------------ Fetch Quest ------------------------
$document->add(new Comment("Heya! I was wondering if you could find me 3 berries. Not the strawberries. Those are gross... I just don't like going foraging. I have some gold to spare."));
//------------- Selects Item ------------------------
$item = new OwnedItem(2, $profile);
//----------Counts the number of item on a given profile ----------------
$berries = $item->getQuantity($profile);
//------Now we need to make sure they have the correct number of berries.
if($berries >= 3){
$document->add(new Comment("Thank you so much! Here's your reward!"));
$item->remove(3, $profile);
$mysidia->user->changeMoney(50);
} else {
$document->add(new Comment("You don't have enough berries yet..."));
}
}