View Single Post
  #13  
Old 01-17-2002, 02:32 AM
GrowlZP2P GrowlZP2P is offline
Registered User
Join Date: Dec 2001
Location: Corpadverticus, which in case you don't know is the recently-formed and Blockbuster Video-sponsored Tenth Circle of Hell
Posts: 57
GrowlZP2P is on a distinguished road
Send a message via AIM to GrowlZP2P Send a message via Yahoo to GrowlZP2P
"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.
__________________


AIM: GrowlZ1010 | Y! IM: GrowlZ1010 | MSN: [email protected] | Email: [email protected]

- I use obscenely long words to befuddle my adversaries, therefore I am -

Current Favorite Quote: Real programmers don't document. If it was hard to write, it should be hard
to understand.
Reply With Quote