Welcome to the Builder Academy

Question Upper and lower case in echos

More
20 Jun 2013 23:23 #3188 by Parnassus
Thanks so much. Now I just have to decide if I want it 29 lines worth for one character. :) But it's kinda nice to know that there isn't an easier way just so I can stop looking for it! Thanks for putting in the work for me.

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

More
21 Jun 2013 20:07 #3199 by Vatiken
dg_variables.c
Code:
int text_processed(char *field, char *subfield, struct trig_var_data *vd, char *str, size_t slen) { char *p, *p2; char tmpvar[MAX_STRING_LENGTH]; if (!str_cmp(field, "strlen")) { /* strlen */ snprintf(str, slen, "%d", (int)strlen(vd->value)); return TRUE; + } else if (!str_cmp(field, "toupper")) { /* toupper */ + char *upper = vd->value; + if (*upper) + snprintf(str, slen, "%c%s", UPPER(*upper), upper + 1); + return TRUE; } else if (!str_cmp(field, "trim")) { /*
Code:
1) Name : Speech Test 2) Intended for : Rooms 3) Trigger types: Speech 4) Numeric Arg : 100 5) Arguments : * 6) Commands: wait 1 sec %echo% String is %speech% wait 1 sec %echo% Upper String is %speech.toupper% W) Copy Trigger Q) Quit
Code:
' test string You say, 'test string' 500H 100M 82V (news) (motd) > String is test string 500H 100M 82V (news) (motd) > Upper String is Test string

tbaMUD developer/programmer
The following user(s) said Thank You: krell, Parnassus

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

More
21 Jun 2013 21:07 - 21 Jun 2013 21:11 #3200 by krell
Replied by krell on topic Upper and lower case in echos
Hrm, it seems I'll need to grab the latest changes from git.

[addendum]
Or merge the change locally by hand. :-)
Last edit: 21 Jun 2013 21:11 by krell.

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

More
22 Jun 2013 04:25 #3202 by Vatiken
Be quicker to just change it locally... I'm still trying to figure out how github works...

tbaMUD developer/programmer

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

More
22 Jun 2013 11:22 #3206 by Rumble
Looks like you figured out Github. I received email notification of the change. So if anyone wants the latest go to github.com/welcor/tbamud and "watch" us. Any updates you'll receive an email.

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com

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

Time to create page: 0.319 seconds