Welcome to the Builder Academy

Question Question about Current Quest in Score

More
23 Aug 2014 10:39 #5002 by Liko
Hello,

Like the topic says, I have a question about this line of code:
Code:
if (GET_QUEST(ch) == NOTHING) send_to_char(ch, "and you are not on a quest at the moment.\r\n"); else send_to_char(ch, "and your current quest is %d.\r\n", GET_QUEST(ch) == NOTHING ? -1 : GET_QUEST(ch));

Shouldn't "and your current quest is %d" say the name of the quest instead of the quest number?

Example: and your current quest is Fetching the Milk!

I believe it would be easier for players and admins if it displayed the name. If you're using a chat channel and you can say I'm on quest 65 it is a pain to find what quest it is unless you memorized them or made a huge quest list.

- Liko

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

More
23 Aug 2014 11:42 #5003 by thomas
yes, I think it should. Also I think the number should stil lshow if you have wizflags on. I suggest you make a pull request with this :)

Please Log in or Create an account to join the conversation.

More
23 Aug 2014 23:39 #5004 by WhiskyTest
I like that idea :)
Code:
if (GET_QUEST(ch) == NOTHING) send_to_char(ch, "and you are not on a quest at the moment.\r\n"); else { send_to_char(ch, "and your current quest is %s", QST_DESC(real_quest(GET_QUEST(ch)))); if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_SHOWVNUMS)) send_to_char(ch, " [%d]\r\n", GET_QUEST(ch)); else send_to_char(ch, "\r\n"); }

Please Log in or Create an account to join the conversation.

More
27 Aug 2014 05:45 - 27 Aug 2014 09:13 #5010 by Liko
So here is what I did.

1. Open act.informative.c and under #include "asciimap.h"
Code:
#include "quest.h"

2. search do_score and find your quest block and add this"
Code:
if(GET_QUEST(ch) == NOTHING) { send_to_char(ch, " \tDCurrent Quest\tw: \tDYou are not on a \tGquest\tD at this time.\tn\r\n"); } else { send_to_char(ch, " \tDCurrent Quest\tw: \tD%s\tw(\tD%s\tw) \tw(\tc%d\tw)\tn\r\n", QST_NAME(real_quest(GET_QUEST(ch))), QST_DESC(real_quest(GET_QUEST(ch))), GET_QUEST(ch) == NOTHING ? -1 : GET_QUEST(ch)); }

3. close and compile.

Now mine displays the quest name, quest description, and quest vnum. The player can see all of this just increase of a bug and it makes it extremely easy to track down which quest it is. I liked yours WhiskyTest, but noticed it was just the quest description and quest vnum for immortals. I just added the actual quest name to be included and vnum for all.

Randian(0.0.0)
Owner/Developer
Last edit: 27 Aug 2014 09:13 by Liko. Reason: Removed add_commas

Please Log in or Create an account to join the conversation.

More
27 Aug 2014 08:33 #5011 by WhiskyTest
Cool, I don't have the add_commas function but yeah that looks nice too

Please Log in or Create an account to join the conversation.

More
27 Aug 2014 09:12 #5012 by Liko

WhiskyTest wrote: Cool, I don't have the add_commas function but yeah that looks nice too


Opps forgot that was in there. add_commas is nice. It can read past 2.14b numbers.

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

Time to create page: 0.268 seconds