Welcome to the Builder Academy

Question How to change the name of Happyhour?

More
06 Mar 2018 03:36 #7650 by Nero
Hi,

I am a beginner coder for Circle Muds. We have a MUD that is already up and running but we want to be able to start implementing and integrating some more stuff to the MUD just to get some new ideas, zones, etc going.

One thing I want to do is add the happyhour feature however, I want to change the syntax from happyhour to bonus. So if someone types bonus, it does the same thing if someone typed happyhour. How would I go about changing that in the code?

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

More
07 Mar 2018 04:41 #7660 by rudeboyrave
the quickest way to do this would be to edit the message shown on the who screen to show the word bonus instead of happy hour when one is going on... in act.informative.c change

if (IS_HAPPYHOUR > 0){
send_to_char(ch, "It's a Happy Hour! Type \tRhappyhour\tW to see the current bonuses.\r\n");
to
if (IS_HAPPYHOUR > 0){
send_to_char(ch, "It's a BONUS!! Type \tRbonus\tW to see the current bonuses.\r\n");


you could also edit interpreter.c and change
{ "happyhour", "ha" , POS_DEAD , do_happyhour, 0, 0 },
to
{ "bonus", "bo" , POS_DEAD , do_happyhour, 0, 0 },

and in act.other.c find do_happyhour and change all the send_to_char 's to say bonus instead of happyhour.


this is the easiest way to do this i think. it changes the look of everything without making all the changes to rename everything bonus from happy.

CyberASSAULT
www.cyberassault.org
cyberassault.org 11111
A post-apocalyptic, sci-fi MUD.

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

More
10 Mar 2018 23:12 #7688 by Nero
Thanks for your response. For some reason I am having trouble integrating this into my circle mud files. I have everything in the right place but when typing 'happyhour' in the cmd prompt, nothing happens it gives me no dialogue at all just says, huh!?!.

The only difference between tbamud's files and mine is that I do not have an act.h - so I placed most of the code in the act.informative.c. I also do not have a DG_VARIABLES and instead use DG_SCRIPTS but it's essentially the same file.

What am I missing here?

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

More
11 Mar 2018 00:05 #7689 by rudeboyrave
the reason the happyhour command isnt working is that we changed the command to bonus.
here:
you could also edit interpreter.c and change
{ "happyhour", "ha" , POS_DEAD , do_happyhour, 0, 0 },
to
{ "bonus", "bo" , POS_DEAD , do_happyhour, 0, 0 },


if you want the happyhour command to work as well as the bonus command then you would need to add
{ "happyhour", "ha" , POS_DEAD , do_happyhour, 0, 0 },
in interpreter.c

CyberASSAULT
www.cyberassault.org
cyberassault.org 11111
A post-apocalyptic, sci-fi MUD.

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

More
17 Mar 2018 01:15 #7705 by Nero
It's currently set to happyhour as of right now to keep it simple for the integration

I do have { "happyhour", "ha" , POS_DEAD , do_happyhour, 0, 0 }, in my interpreter.c

The only thing is I do not have an act.h file where the ACMD(do_happyhour); resides so I am not sure where the best alternative place is for me to put that.

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

More
18 Mar 2018 16:19 #7708 by thomas
act.wizard.h/.c ?

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

Time to create page: 0.230 seconds