Welcome to the Builder Academy

Question Can we get a tutorial for adding stats

More
04 Oct 2012 11:06 #858 by Liko
Hello,

I was wondering if we could get some kinda of tutorial for adding new stat like luck. I'm able to add it, but I seem to mess up on saving/loading the new stat for NPCS.

Randian(0.0.0)
Owner/Developer

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

More
04 Oct 2012 23:09 - 04 Oct 2012 23:10 #859 by Rumble
Tink made one a while back I posted here. Please post back if you do any updates or find any mistakes.

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com
Last edit: 04 Oct 2012 23:10 by Rumble.

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

More
05 Oct 2012 18:54 #862 by Liko
Works perfect expect they need to add this to dg_variables.c

1. Open dg_variables.c and search case 'L' and add the following
Code:
else if (!str_cmp(field, "Luck")) { if (subfield && *subfield) { int addition = atoi(subfield); int max = (IS_NPC(c) || GET_LEVEL(c) >= LVL_GRGOD) ? 25 : 18; GET_LUCK(c) += addition; if(GET_LUCK(c) > max) GET_LUCK(c) = max; if(GET_LUCK(c) < 1) GET_LUCK(c) = 1; } snprintf(str, slen, "%d", GET_LUCK(c)); }

Randian(0.0.0)
Owner/Developer

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

Time to create page: 0.164 seconds