Im fairly new to coding so give me a break on this.
im using swr 1.2 fuss
Putty to conect to my host, and winscp to edit sourcecode files.
Instead of having the stats pulled from a number range, I want to set a number, have the race tables add to this and then display the stats in table like format and then have the user select a stat number and then add a value to it. The value they added would then be subtracted from a 'statpool' and if they went below this it would return a message saying they do not have that many stats to spend.
This is what I have so far, most of it is probably wrong though.
case CON_ROLL_STATS:
ch->perm_str = 13;
ch->perm_int = 13;
ch->perm_wis = 13;
ch->perm_dex = 13;
ch->perm_con = 13;
ch->perm_cha = 13;
ch->perm_str += race_table[ch->race].str_plus;
ch->perm_int += race_table[ch->race].int_plus;
ch->perm_wis += race_table[ch->race].wis_plus;
ch->perm_dex += race_table[ch->race].dex_plus;
ch->perm_con += race_table[ch->race].con_plus;
ch->perm_cha += race_table[ch->race].cha_plus;
ch->perm_str + stradd;
ch->perm_int + intadd;
ch->perm_wis + wisadd;
ch->perm_dex + dexadd;
ch->perm_con + conadd;
ch->perm_cha + chaadd;
sprintf( buf, "\r\n1.STR: %d/27 2.INT: %d/27 3.WIS: %d/27 4.DEX: %d/27 5.CON: %d/27 6.CHA: %d/27\r\n",
ch->perm_str, ch->perm_int, ch->perm_wis, ch->perm_dex, ch->perm_con, ch->perm_cha );
write_to_buffer( d, buf, 0 );
write_to_buffer( d, "\r\nEnter the Number of the Stat you would like to change. ", 0 );
d->connected = CON_STATS_OK;
break;
case CON_STATS_OK:
switch ( argument[0] )
{
case '1':
case 'one':
write_to_buffer( d, "\r\nYou have Chosen Str. How much would you like to add, Str= %d/27, you have %d points left in your stat pool.\r\n",
ch->perm_str, Statpool;
I just started a class in programming about a month ago so I am really new to this.
Thanks in advance for any help I get.
im using swr 1.2 fuss
Putty to conect to my host, and winscp to edit sourcecode files.
Instead of having the stats pulled from a number range, I want to set a number, have the race tables add to this and then display the stats in table like format and then have the user select a stat number and then add a value to it. The value they added would then be subtracted from a 'statpool' and if they went below this it would return a message saying they do not have that many stats to spend.
This is what I have so far, most of it is probably wrong though.
case CON_ROLL_STATS:
ch->perm_str = 13;
ch->perm_int = 13;
ch->perm_wis = 13;
ch->perm_dex = 13;
ch->perm_con = 13;
ch->perm_cha = 13;
ch->perm_str += race_table[ch->race].str_plus;
ch->perm_int += race_table[ch->race].int_plus;
ch->perm_wis += race_table[ch->race].wis_plus;
ch->perm_dex += race_table[ch->race].dex_plus;
ch->perm_con += race_table[ch->race].con_plus;
ch->perm_cha += race_table[ch->race].cha_plus;
ch->perm_str + stradd;
ch->perm_int + intadd;
ch->perm_wis + wisadd;
ch->perm_dex + dexadd;
ch->perm_con + conadd;
ch->perm_cha + chaadd;
sprintf( buf, "\r\n1.STR: %d/27 2.INT: %d/27 3.WIS: %d/27 4.DEX: %d/27 5.CON: %d/27 6.CHA: %d/27\r\n",
ch->perm_str, ch->perm_int, ch->perm_wis, ch->perm_dex, ch->perm_con, ch->perm_cha );
write_to_buffer( d, buf, 0 );
write_to_buffer( d, "\r\nEnter the Number of the Stat you would like to change. ", 0 );
d->connected = CON_STATS_OK;
break;
case CON_STATS_OK:
switch ( argument[0] )
{
case '1':
case 'one':
write_to_buffer( d, "\r\nYou have Chosen Str. How much would you like to add, Str= %d/27, you have %d points left in your stat pool.\r\n",
ch->perm_str, Statpool;
I just started a class in programming about a month ago so I am really new to this.
Thanks in advance for any help I get.