I've add the auction system off of the ftp site and I have it all setup and working, except I've changed the
messages, the problem I'm having is it looks like this:
A: [Strider] <a sword> MinBid: 100
A: [Joe-Bob] I'll pay 100 for a sword!
A: [Strider] a sword is going to Joe-Bob for 100 coins. <-- NOTE 1
A: [Strider] a sword is going once to Joe-Bob for 100 coins.
A: [Strider] a sword is going TWICE to Joe-Bob for 100 coins.
A: [Strider] a sword SOLD to Joe-Bob for 100 coins.
I've tweaked with the code and tried several different things but I can't get rid of the line that is marked
above, any help? I'll post the chunk of code that displays it now.
/***** LOTS OF CODE *****/
void auction_update(void)
{
if (auction.ticks == AUC_NONE) /* No auction */
return;
if (auction.ticks >= AUC_BID && auction.ticks <= AUC_TWICE) {
if (auction.bidder)
sprintf(buf2, "[%s] %s is going %s%sto %s for %ld coin%s.",
auction.seller->player.name,
auction.obj->short_description,
auction.ticks == AUC_ONCE ? "once " : "",
auction.ticks == AUC_TWICE ? "TWICE " : "",
auction.bidder->player.name,
auction.bid,
auction.bid != 1 ? "s" : "");
else if (auction.ticks == AUC_ONCE) {
sprintf(buf2, "[%s] Due to lack of interest, %s is no longer for sale.",
auction.seller->player.name, auction.obj->short_description);
auction_reset();
auction.ticks--;
} else
sprintf(buf2, "[%s] %s %ld coin%sminimum.",
auction.seller->player.name, auction.obj->short_description,
auction.bid, auction.bid != 1 ? "s " : " ");
AUC_OUT(buf2);
auction.ticks++;
return;
}
if (auction.ticks == AUC_SOLD) { /* Sold */
sprintf(buf2, "[%s] %s has been sold to %s for %ld coin%s",
auction.seller->player.name, auction.obj->short_description,
auction.bidder->player.name, auction.bid, auction.bid != 1 ? "s." : ".");
AUC_OUT(buf2);
/* Make sure object exists here on line below */
/* Swap gold */
GET_GOLD(auction.seller) += auction.bid;
GET_GOLD(auction.bidder) -= auction.bid;
/* Swap item */
obj_from_char(auction.obj);
obj_to_char(auction.obj, auction.bidder);
# if 0
} else {
/* Place whatever code here you wish to happen when the character
* no longer holds the object, if you simply don't let them get
* rid of it just delete the #if to #endif, I made the auctioner
* lose the value of the bid.
*/
}
#endif
auction_reset();
return;
}
}
Sorry to spam the list with this much code.
--
Leonard Burns IV
lburns@continet.com
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://cspo.queensu.ca/~fletcher/Circle/list_faq.html |
+-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/18/00 PST