"Are you sure you want to buy item 1 for $$$?", then a sleep command, then set a flag which lets the player buy something? Like:
NPC Code:
if (playersays(#c,buy item 1)){
message Are you sure you want to buy item 1 for $$$?;
sleep 5;
set canbuyitem1;
}
if (playersays(#c,yes) && canbuyitem1){
// buying stuff...
}
if (playersays(#c,no) && canbuyitem1){
message;
unset canbuyitem1;
}
Or am I thinking bad here? :P
Maybe something along the lines of this: (I'm assuming stall control is done by flags, like ownsstall1)
NPC Code:
// For example:
// Player GrowlZ says "sell apple 1 10"
if (playerchats && strcontains(#c,sell) && ownsstall1){
tokenize #c;
if (strequals(#t(2),1)){
stall1.price1=#t(3);
putnpc ,#t(1).txt,x,y;
}
}
Then the player could choose the price before placing and the level would have variables to control the co-ordinates of any item placed. The script of the item to be sold would use the stall1.price1 variable as its cost. Combining the two of these would help stop people charging extortionate rates for things after giving away freebies.