If you could post sample could that would be lovely thank you! Im a little confused
Viewing post in Is there a block that blocks objects?
I'm doing this on a text editor at work, so I hope I got it right:
booleans {
has_bought_ring : boolean "false";
}
on_command {
: match "get ring" {
: if (is_present "ring" && !has_bought_ring) {
: print "\"$100 please.\"";
}
}
: match "buy ring;give money" {
: if (is_present "ring") {
: if (is_carried "money") {
: set_true "has_bought_ring";
: destroy "money";
: print "\"It's yours.\"";
}
: print "No money.";
}
}
}
I am assuming that you are in a jewelry store with a ring on display. There is a shop attendant to sell you the ring. It costs $100. You have some money in your pocket. It happens to be $100. The money is destroyed when you buy the ring so that you can't use it again. After purchasing the ring, it is left for you to take. Alternatively, replace :destroy "money"; with :swap o1 = "money" o2 = "ring"; if you want the ring to be pocketted automatically.
A sample transcript might go like this:
> GET RING
"$100 please."
> BUY RING
"It's yours."
>GET RING
[auto redescribe occurs]