Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, DotBot, Bing

Members: 0
Guests: 10
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SWR FUSS » SWR: Adjusting score display
Forum Rules | Mark all | Recent Posts

SWR: Adjusting score display
< Newer Topic :: Older Topic > trying to get the IF check to work

Pages:<< prev 1 next >>
Post is unread #1 Nov 30, 2008, 10:15 pm
Go to the top of the page
Go to the bottom of the page

chaoscayne
Fledgling
GroupMembers
Posts15
JoinedNov 29, 2008

Heyas...maybe someone can help me with a little problem. On my mud I was trying to correct a code issue that would allow max level of FORCE (or psyonic on my mud) to be seen before they have discovered their potential and leveled to 10+

how it looks now:

Smuggler Level: 101 Max: 121 Exp: 5000000 Next: 5100500
Specialization: SpecName Level: Current Points: Avail
Ambassador Level: 100 Max: 110 Exp: 4900500 Next: 5000000
Psyonic Level: 1 Max: 25 Exp: 0 Next: 12500

Code that I have:
int ability;

for ( ability = 0 ; ability < MAX_RL_ABILITY ; ability++ )
if ( ability != FORCE_ABILITY && ch->skill_level[ability] >= 101)
ch_printf( ch, "&c%-15s &CLevel: %-3d Max: %-3d Exp: %-10ld Next: %-10ld\n\r &bSpecialization: &cSpecName &bLevel: &cCurrent &bPoints: &cAvail\n\r",
ability_name[ability], ch->skill_level[ability], max_level(ch, ability), ch->experience[ability],
exp_level( ch->skill_level[ability]+1 ) );
else
if ( ability != FORCE_ABILITY && ch->skill_level[ability] <= 100 )
ch_printf( ch, "&c%-15s &CLevel: %-3d Max: %-3d Exp: %-10ld Next: %-10ld\n\r",
ability_name[ability], ch->skill_level[ability], max_level(ch, ability), ch->experience[ability],
exp_level( ch->skill_level[ability]+1 ) );
else
if ( ability == FORCE_ABILITY && ch->skill_level[FORCE_ABILITY] <= 10 )
ch_printf( ch, "&c%-15s &CLevel: %-3d Max: ??? Exp: ??? Next: ???\n\r",
ability_name[ability], ch->skill_level[ability], ch->experience[ability]);

how i want it to look:

Smuggler Level: 101 Max: 121 Exp: 5000000 Next: 5100500
Specialization: SpecName Level: Current Points: Avail
Ambassador Level: 100 Max: 110 Exp: 4900500 Next: 5000000
Psyonic Level: 1 Max: ??? Exp: ??? Next: ???


i figure i've got the wrong sign somewhere and not catching it....but plugging at this code for about 8 hours now. only part that refused to work for me is the level masking on Psyonic ONLY

       
Post is unread #2 Dec 2, 2008, 8:18 pm
Go to the top of the page
Go to the bottom of the page

Keberus
Conjurer
GroupFUSS Project Team
Posts341
JoinedJun 4, 2005

Can you show us your whole do_score using the code tag please.
       
Post is unread #3 Dec 2, 2008, 10:27 pm
Go to the top of the page
Go to the bottom of the page

chaoscayne
Fledgling
GroupMembers
Posts15
JoinedNov 29, 2008

heres the code
void do_score(CHAR_DATA * ch, char *argument)
{
    char            buf[MAX_STRING_LENGTH];
    AFFECT_DATA    *paf;
    int iLang, drug, background;

       for ( background  = 0 ; background < MAX_BACKGROUND ; background++ )

    if (IS_NPC(ch))
    {
	do_oldscore(ch, argument);
	return;
    }
    set_char_color(AT_SCORE, ch);

    ch_printf(ch, "\n\r&CScore for %s.\n\r", ch->pcdata->title);
    set_char_color(AT_SCORE, ch);
    if ( get_trust( ch ) != ch->top_level )
	ch_printf( ch, "&cYou are trusted at level &C%d.\n\r", get_trust( ch ) );

    send_to_char("&C------------------------------------------------------------------------------------\n\r", ch);

    ch_printf(ch,   "&cRace: %-17.10s &cBackground: %-14s &cLog In:  &C%s\r",
	capitalize(get_race(ch)), get_background_ability(ch),  ( IS_NPC(ch) ? "(null)" : ctime(&(ch->pcdata->logon)) ) );

    ch_printf(ch,   "&cHitroll: &C%-2.2d  &cDamroll: &C%-2.2d     &cArmor: &C%-4d            &cSaved:  &C%s\r",
		GET_HITROLL(ch), GET_DAMROLL(ch), GET_AC(ch),
		(ch->pcdata && ch->pcdata->save_time) ? ctime(&(ch->pcdata->save_time)) : "no\n" );

    ch_printf(ch,   "&cAlign: &C%-5d   &cWimpy: &C%-3d    &cEVC: &C%2d                 &cTime:  &C%s\r",
		ch->alignment, ch->wimpy, race_table[ch->race].perm_EVC + dex_app[get_curr_dex(ch)].mod_dex + (ch->skill_level[COMBAT_ABILITY]/20), ctime(&current_time) );

    if ( ch->skill_level[FORCE_ABILITY] > 1
    || IS_IMMORTAL(ch) )
      	ch_printf(ch, "&cHit Points: &C%d &cof &C%d     &cMove: &C%d &cof &C%d     &cEnergy: &C%d &cof &C%d\n\r",
            ch->hit, ch->max_hit, ch->move, ch->max_move, ch->mana, ch->max_mana );
    else
      	ch_printf(ch, "&cHit Points: &C%d &cof &C%d     &cMove: &C%d &cof &C%d\n\r",
            ch->hit, ch->max_hit, ch->move, ch->max_move);

    ch_printf(ch, "&cStr: &C%2d&c(&B%2d&c) &cDex: &C%2d&c(&B%2d&c) &cCon: &C%2d&c(&B%2d&c) &cInt: &C%2d&c(&B%2d&c) &cWis: &C%2d&c(&B%2d&c) &cCha: &C%2d&c(&B%2d&c) &cLck: &C?? &cPsy: &C??\n\r",
	get_curr_str(ch), str_app[get_curr_str(ch)].mod_str, get_curr_dex(ch), dex_app[get_curr_dex(ch)].mod_dex, get_curr_con(ch),con_app[get_curr_con(ch)].mod_con, get_curr_int(ch),int_app[get_curr_int(ch)].mod_int, get_curr_wis(ch), wis_app[get_curr_wis(ch)].mod_wis, get_curr_cha(ch), cha_app[get_curr_cha(ch)].mod_cha);


    send_to_char("&C------------------------------------------------------------------------------------\n\r", ch);

    {
       int ability;

/*         for ( ability = 0 ; ability < MAX_RL_ABILITY ; ability++ )
          if ( ability != FORCE_ABILITY || ch->skill_level[FORCE_ABILITY] > 1 )
            ch_printf( ch, "&c%-15s   &CLevel: %-3d   Max: %-3d   Exp: %-10ld   Next: %-10ld\n\r",
            ability_name[ability], ch->skill_level[ability], max_level(ch, ability), ch->experience[ability],
            exp_level( ch->skill_level[ability]+1 ) );
          else
            ch_printf( ch, "&c%-15s   &CLevel: %-3d   Max: ???   Exp: ???          Next: ???\n\r",
            ability_name[ability], ch->skill_level[ability], ch->experience[ability]);
*/
       for ( ability = 0 ; ability < MAX_RL_ABILITY ; ability++ )
          if ( ability != FORCE_ABILITY &&  ch->skill_level[ability] >= 101)
            ch_printf( ch, "&c%-15s   &CLevel: %-3d   Max: %-3d   Exp: %-10ld   Next: %-10ld\n\r  &bSpecialization: &cSpecName     &bLevel: &cCurrent   &bPoints: &cAvail\n\r",
            ability_name[ability], ch->skill_level[ability], max_level(ch, ability), ch->experience[ability],
            exp_level( ch->skill_level[ability]+1 ) );
	    else
          if ( ability != FORCE_ABILITY &&  ch->skill_level[ability] <= 100 )
            ch_printf( ch, "&c%-15s   &CLevel: %-3d   Max: %-3d   Exp: %-10ld   Next: %-10ld\n\r",
            ability_name[ability], ch->skill_level[ability], max_level(ch, ability), ch->experience[ability],
            exp_level( ch->skill_level[ability]+1 ) );
	    if ( ability == FORCE_ABILITY && ch->skill_level[FORCE_ABILITY] <= 10 ) 
            ch_printf( ch, "&c%-15s   &CLevel: %-3d   Max: ???   Exp: ???          Next: ???\n\r",
            ability_name[ability], ch->skill_level[ability], ch->experience[ability]);
          else
    }

    send_to_char("&C------------------------------------------------------------------------------------\n\r", ch);



    ch_printf(ch, "&cCREDITS: &C%-10d   &cBANK: &C%-10d    &cPkills: &C%-5.5d   &cMkills: &C%-5.5d\n\r",
	ch->gold, ch->pcdata->bank, ch->pcdata->pkills, ch->pcdata->mkills);

    ch_printf(ch, "&cWeight: &C%5.5d &c(&Cmax %7.7d&c)    Items: &C%5.5d &c(&Cmax %5.5d&c)\n\r",
	ch->carry_weight, can_carry_w(ch) , ch->carry_number, can_carry_n(ch));
    ch_printf(ch, "&cTime Played: &C%d Hours &C%d Minutes.\n\r",
	ch->pcdata->played/3600,(ch->pcdata->played%3600)/60);
    ch_printf(ch, "&cPager: &C(%c) %3d   &cAutoExit(&C%c&c)  AutoLoot(&C%c&c)  Autosac(&C%c&c)\n\r",
	IS_SET(ch->pcdata->flags, PCFLAG_PAGERON) ? 'X' : ' ',
	ch->pcdata->pagerlen, IS_SET(ch->act, PLR_AUTOEXIT) ? 'X' : ' ',
	IS_SET(ch->act, PLR_AUTOLOOT) ? 'X' : ' ', IS_SET(ch->act, PLR_AUTOSAC) ? 'X' : ' ');

    switch (ch->position)
    {
	case POS_DEAD:
		sprintf(buf, "&CYou are slowly decomposing. ";);
		break;
	case POS_MORTAL:
		sprintf(buf, "&CYou are mortally wounded. ";);
		break;
	case POS_INCAP:
		sprintf(buf, "&CYou are incapacitated. ";);
		break;
	case POS_STUNNED:
		sprintf(buf, "&CYou are stunned. ";);
		break;
	case POS_SLEEPING:
		sprintf(buf, "&CYou are sleeping. ";);
		break;
	case POS_RESTING:
		sprintf(buf, "&CYou are resting. ";);
		break;
	case POS_STANDING:
		sprintf(buf, "&CYou are standing. ";);
		break;
	case POS_FIGHTING:
		sprintf(buf, "&CYou are fighting. " );
		break;
	case POS_MOUNTED:
		sprintf(buf, "&CYou are mounted. ";);
		break;
        case POS_SITTING:
		sprintf(buf, "&CYou are sitting. ";);
		break;
    }

    send_to_char( buf, ch );

    if (!IS_NPC(ch) && ch->pcdata->condition[COND_DRUNK] > 10)
	send_to_char("&CYou are drunk.\n\r", ch);
    if (!IS_NPC(ch) && ch->pcdata->condition[COND_THIRST] == 0)
	send_to_char("&CYou are in danger of dehydrating.\n\r", ch);
    if (!IS_NPC(ch) && ch->pcdata->condition[COND_FULL] == 0)
	send_to_char("&CYou are starving to death.\n\r", ch);
    if ( ch->position != POS_SLEEPING )
	switch( ch->mental_state / 10 )
	{
	    default:   send_to_char( "&CYou're completely messed up!\n\r", ch );	break;
	    case -10:  send_to_char( "&CYou're barely conscious.\n\r", ch );	break;
	    case  -9:  send_to_char( "&CYou can barely keep your eyes open.\n\r", ch );	break;
	    case  -8:  send_to_char( "&CYou're extremely drowsy.\n\r", ch );	break;
	    case  -7:  send_to_char( "&CYou feel very unmotivated.\n\r", ch );	break;
	    case  -6:  send_to_char( "&CYou feel sedated.\n\r", ch );		break;
	    case  -5:  send_to_char( "&CYou feel sleepy.\n\r", ch );		break;
	    case  -4:  send_to_char( "&CYou feel tired.\n\r", ch );		break;
	    case  -3:  send_to_char( "&CYou could use a rest.\n\r", ch );		break;
	    case  -2:  send_to_char( "&CYou feel a little under the weather.\n\r", ch );	break;
	    case  -1:  send_to_char( "&CYou feel fine.\n\r", ch );		break;
	    case   0:  send_to_char( "&CYou feel great.\n\r", ch );		break;
	    case   1:  send_to_char( "&CYou feel energetic.\n\r", ch );	break;
	    case   2:  send_to_char( "&CYour mind is racing.\n\r", ch );	break;
	    case   3:  send_to_char( "&CYou can't think straight.\n\r", ch );	break;
	    case   4:  send_to_char( "&CYour mind is going 100 miles an hour.\n\r", ch );	break;
	    case   5:  send_to_char( "&CYou're high as a kite.\n\r", ch );	break;
	    case   6:  send_to_char( "&CYour mind and body are slipping apart.\n\r", ch );	break;
	    case   7:  send_to_char( "&CReality is slipping away.\n\r", ch );	break;
	    case   8:  send_to_char( "&CYou have no idea what is real, and what is not.\n\r", ch );	break;
	    case   9:  send_to_char( "&CYou feel immortal.\n\r", ch );	break;
	    case  10:  send_to_char( "&CYou are a Supreme Entity.\n\r", ch );	break;
	}
    else
    if ( ch->mental_state >45 )
	send_to_char( "&CYour sleep is filled with strange and vivid dreams.\n\r", ch );
    else
    if ( ch->mental_state >25 )
	send_to_char( "&CYour sleep is uneasy.\n\r", ch );
    else
    if ( ch->mental_state <-35 )
	send_to_char( "&CYou are deep in a much needed sleep.\n\r", ch );
    else
    if ( ch->mental_state <-25 )
	send_to_char( "&CYou are in deep slumber.\n\r", ch );

    if ( !IS_NPC(ch) )
    {
    	if (ch->pcdata->target && ch->pcdata->target[0] != '\0' )
    	{
    		sprintf( buf,
    		"&cYour current alias focus is : &C%s.\n\r", ch->pcdata->target);
    		send_to_char( buf, ch );
    	}
    	else 
    	send_to_char( "&cYou have no current target.\n\r", ch);
    }

    send_to_char("&cSPICE Level/Addiction: &C", ch );
    for ( drug = 0; drug <= 9; drug++ )
	if ( ch->pcdata->drug_level[drug] > 0 || ch->pcdata->drug_level[drug] > 0 )
	{
	    ch_printf( ch, "%s&c(&C%d&c/&C%d&c) ", spice_table[drug],
	                                 ch->pcdata->drug_level[drug],
	                                 ch->pcdata->addiction[drug] );
	}
    send_to_char("\n\r&cLanguages: &c", ch );
    for ( iLang = 0; lang_array[iLang] != LANG_UNKNOWN; iLang++ )
	if ( knows_language( ch, lang_array[iLang], ch )
	||  (IS_NPC(ch) && ch->speaks == 0) )
	{
	    if ( lang_array[iLang] & ch->speaking
	    ||  (IS_NPC(ch) && !ch->speaking) )
		set_char_color( AT_RED, ch );
	    send_to_char( lang_names[iLang], ch );
	    send_to_char( " ", ch );
	    set_char_color( AT_SCORE, ch );
	}

    send_to_char( "\n\r", ch );
    ch_printf( ch, "&cWANTED ON: &C%s\n\r",
             flag_string(ch->pcdata->wanted_flags, planet_flags) );

    if ( ch->pcdata->bestowments && ch->pcdata->bestowments[0] != '\0' )
	ch_printf( ch, "&cYou are bestowed with the command(s): &C%s.\n\r",
		ch->pcdata->bestowments );

    if ( ch->pcdata->clan )
    {
      send_to_char( "&C----------------------------------------------------------------------------\n\r", ch);
      ch_printf(ch, "&cORGANIZATION: &C%-35s &cSALARY: &C%-10d    &cPkills/Deaths: &C%3.3d&c/&C%3.3d",
		ch->pcdata->clan->name, ch->pcdata->salary, ch->pcdata->clan->pkills, ch->pcdata->clan->pdeaths) ;
      send_to_char( "\n\r", ch );
    }
    if (IS_IMMORTAL(ch))
    {
	send_to_char( "&C----------------------------------------------------------------------------\n\r", ch);

	ch_printf(ch, "&cIMMORTAL DATA:  Wizinvis [&C%s&c]  Wizlevel (&C%d&c)\n\r",
		IS_SET(ch->act, PLR_WIZINVIS) ? "X" : " ", ch->pcdata->wizinvis );

	ch_printf(ch, "&cBamfin:  &C%s\n\r", (ch->pcdata->bamfin[0] != '\0')
		? ch->pcdata->bamfin : "%s appears in a swirling mist.", ch->name);
	ch_printf(ch, "&cBamfout: &C%s\n\r", (ch->pcdata->bamfout[0] != '\0')
		? ch->pcdata->bamfout : "%s leaves in a swirling mist.", ch->name);


	/* Area Loaded info - Scryn 8/11*/
	if (ch->pcdata->area)
	{
	    ch_printf(ch, "&cVnums:   Room (&C%-5.5d &c- &C%-5.5d&c)   Object (&C%-5.5d &c- &C%-5.5d&c)   Mob (&C%-5.5d &c- &C%-5.5d&c)\n\r",
		ch->pcdata->area->low_r_vnum, ch->pcdata->area->hi_r_vnum,
		ch->pcdata->area->low_o_vnum, ch->pcdata->area->hi_o_vnum,
		ch->pcdata->area->low_m_vnum, ch->pcdata->area->hi_m_vnum);
	    ch_printf(ch, "&cArea Loaded [&C%s&c]\n\r", (IS_SET (ch->pcdata->area->status, AREA_LOADED)) ? "yes" : "no";);
	}
    }
    if (ch->first_affect)
    {
	int i;
	SKILLTYPE *sktmp;

	i = 0;
	send_to_char( "&C----------------------------------------------------------------------------\n\r", ch);
	send_to_char("&cAFFECT DATA:                            &C", ch);
	for (paf = ch->first_affect; paf; paf = paf->next)
	{
	    if ( (sktmp=get_skilltype(paf->type)) == NULL )
		continue;
	    if (ch->top_level < 20)
	    {
		ch_printf(ch, "&c[&C%-34.34s&c]    ", sktmp->name);
		if (i == 0)
		   i = 2;
		if ((++i % 3) == 0)
		   send_to_char("\n\r", ch);
	     }
	     else
	     {
		if (paf->modifier == 0)
		    ch_printf(ch, "&c[&C%-24.24s&c;&C%5d rds&c]    ",
			sktmp->name,
			paf->duration);
		else
		if (paf->modifier > 999)
		    ch_printf(ch, "&c[&C%-15.15s&c; &C%7.7s;%5d rds&c]    ",
			sktmp->name,
			tiny_affect_loc_name(paf->location),
			paf->duration);
		else
		    ch_printf(ch, "&c[&C%-11.11s&c;&C%+-3.3d %7.7s&c;&C%5d rds&c]    ",
			sktmp->name,
			paf->modifier,
			tiny_affect_loc_name(paf->location),
			paf->duration);
		if (i == 0)
		    i = 1;
		if ((++i % 2) == 0)
		    send_to_char("\n\r", ch);
	    }
	}
    }
    send_to_char("\n\r", ch);
    return;
}

heres what it looks like in game:
Score for Choas the destoryer .
------------------------------------------------------------------------------------
Race: Human             Background: Drifter        Log In:  Tue Dec  2 18:18:44 2008
Hitroll: 10  Damroll: 12     Armor: -119            Saved:  Tue Dec  2 22:13:06 2008
Align: 0       Wimpy: 0      EVC: 16                 Time:  Tue Dec  2 22:21:57 2008
Hit Points: 250 of 250     Move: 1000 of 1000     Energy: 0 of 0
Str: 25( 7) Dex: 25( 7) Con: 12( 1) Int: 11( 0) Wis: 12( 1) Cha: 14( 2) Lck: ?? Psy: ??
------------------------------------------------------------------------------------
Soldier           Level: 199   Max: 200   Exp: 19602000     Next: 1407374903353780
  Specialization: SpecName     Level: Current   Points: Avail
Pilot             Level: 100   Max: 200   Exp: 4900500      Next: 1407374888553280
Engineer          Level: 100   Max: 200   Exp: 4900500      Next: 1407374888553280
Mercenary         Level: 100   Max: 200   Exp: 4900500      Next: 1407374888553280
Smuggler          Level: 101   Max: 200   Exp: 5000000      Next: 1407374888653780
  Specialization: SpecName     Level: Current   Points: Avail
Ambassador        Level: 100   Max: 200   Exp: 4900500      Next: 1407374888553280
Psyonic           Level: 5     Max: 200   Exp: 8000         Next: 1407374883565780
------------------------------------------------------------------------------------
CREDITS: 5000         BANK: 0             Pkills: 00000   Mkills: 00000
Weight: 00002 (max 1000000)    Items: 00002 (max 22000)
Time Played: 26 Hours 43 Minutes.
Pager: ( )  24   AutoExit(X)  AutoLoot( )  Autosac( )
You are standing. You feel great.
You have no current target.
SPICE Level/Addiction: 
Languages: Basic Malakii 
WANTED ON: 
----------------------------------------------------------------------------
IMMORTAL DATA:  Wizinvis [ ]  Wizlevel (110)
Bamfin:  A massive semi-corporeal being suddenly appears in a flash of blinding light followed by a thunderous shockwave.
Bamfout: You suddenly feel drained and barely capable of coherent thought.

       
Post is unread #4 Dec 2, 2008, 10:49 pm
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

This:
    send_to_char("&C------------------------------------------------------------------------------------\n\r", ch);

    {
       int ability;

/*         for ( ability = 0 ; ability < MAX_RL_ABILITY ; ability++ )
          if ( ability != FORCE_ABILITY || ch->skill_level[FORCE_ABILITY] > 1 )
            ch_printf( ch, "&c%-15s   &CLevel: %-3d   Max: %-3d   Exp: %-10ld   Next: %-10ld\n\r",
            ability_name[ability], ch->skill_level[ability], max_level(ch, ability), ch->experience[ability],
            exp_level( ch->skill_level[ability]+1 ) );
          else
            ch_printf( ch, "&c%-15s   &CLevel: %-3d   Max: ???   Exp: ???          Next: ???\n\r",
            ability_name[ability], ch->skill_level[ability], ch->experience[ability]);
*/
       for ( ability = 0 ; ability < MAX_RL_ABILITY ; ability++ )
          if ( ability != FORCE_ABILITY &&  ch->skill_level[ability] >= 101)
            ch_printf( ch, "&c%-15s   &CLevel: %-3d   Max: %-3d   Exp: %-10ld   Next: %-10ld\n\r  &bSpecialization: &cSpecName     &bLevel: &cCurrent   &bPoints: &cAvail\n\r",
            ability_name[ability], ch->skill_level[ability], max_level(ch, ability), ch->experience[ability],
            exp_level( ch->skill_level[ability]+1 ) );
	    else
          if ( ability != FORCE_ABILITY &&  ch->skill_level[ability] <= 100 )
            ch_printf( ch, "&c%-15s   &CLevel: %-3d   Max: %-3d   Exp: %-10ld   Next: %-10ld\n\r",
            ability_name[ability], ch->skill_level[ability], max_level(ch, ability), ch->experience[ability],
            exp_level( ch->skill_level[ability]+1 ) );
	    if ( ability == FORCE_ABILITY && ch->skill_level[FORCE_ABILITY] <= 10 ) 
            ch_printf( ch, "&c%-15s   &CLevel: %-3d   Max: ???   Exp: ???          Next: ???\n\r",
            ability_name[ability], ch->skill_level[ability], ch->experience[ability]);
          else
    }

    send_to_char("&C------------------------------------------------------------------------------------\n\r", ch);



Becomes:
    send_to_char("&C------------------------------------------------------------------------------------\n\r", ch);

    {
       int ability;

       for ( ability = 0 ; ability < MAX_RL_ABILITY ; ability++ )
          if( ability != FORCE_ABILITY || ch->skill_level[FORCE_ABILITY] > 10 )
          {
            ch_printf( ch, "&c%-15s   &CLevel: %-3d   Max: %-3d   Exp: %-10ld   Next: %-10ld\n\r",
               ability_name[ability], ch->skill_level[ability], max_level(ch, ability), ch->experience[ability],
               exp_level( ch->skill_level[ability]+1 ) );
            if( ch->skill_level[ability] >= 101 /*&& ability != FORCE_ABILITY */) //See post
               ch_printf( ch, "  &bSpecialization: &cSpecName     &bLevel: &cCurrent   &bPoints: &cAvail\n\r" /*add values here */ );
          else
            ch_printf( ch, "&c%-15s   &CLevel: %-3d   Max: ???   Exp: ???          Next: ???\n\r",
            ability_name[ability], ch->skill_level[ability], ch->experience[ability]);
    }

    send_to_char("&C------------------------------------------------------------------------------------\n\r", ch);


See where it says "//See post" Yep, I'll explain here. If you want Psyonics or whatever to have the Specialization stuff, leave that "/*&& ability != FORCE_ABILITY */" commented out. If it doesn't get that, then uncomment it.

If this doesn't work, lemme know, and I'll try again.
       
Post is unread #5 Dec 3, 2008, 12:37 am   Last edited Dec 3, 2008, 1:18 am by chaoscayne
Go to the top of the page
Go to the bottom of the page

chaoscayne
Fledgling
GroupMembers
Posts15
JoinedNov 29, 2008

now i'm utterly confused....i've got double prints on ability classes under lvl 101 AND it's also ??? out the levels

------------------------------------------------------------------------------------
Soldier           Level: 199   Max: 200   Exp: 19602000     Next: 140733213188532
  Specialization: SpecName     Level: Current   Points: Avail
Pilot             Level: 100   Max: 200   Exp: 4900500      Next: 140733198388032
Pilot             Level: 100   Max: ???   Exp: ???          Next: ???
Engineer          Level: 101   Max: 200   Exp: 5000000      Next: 140733198488532
  Specialization: SpecName     Level: Current   Points: Avail
Mercenary         Level: 100   Max: 200   Exp: 4900500      Next: 140733198388032
Mercenary         Level: 100   Max: ???   Exp: ???          Next: ???
Smuggler          Level: 101   Max: 200   Exp: 5000000      Next: 140733198488532
  Specialization: SpecName     Level: Current   Points: Avail
Ambassador        Level: 50    Max: 200   Exp: 1200500      Next: 140733194638032
Ambassador        Level: 50    Max: ???   Exp: ???          Next: ???
Psyonic           Level: 5     Max: 200   Exp: 8000         Next: 140733193400532
Psyonic           Level: 5     Max: ???   Exp: ???          Next: ???
------------------------------------------------------------------------------------


Did some playing with the code.....I believe that because of the formula is why it's not working the way it should. It wants to list all the professions and not differentiate between them when using != NAME_ABILITY...i tried using it's # reference found in mud.h but that just gave me a blank screen

here is a simpler, similar, version of the code
void do_level( CHAR_DATA *ch, char *argument )
{ 
       int ability;
    
       for ( ability = 0 ; ability < MAX_RL_ABILITY ; ability++ )
          if ( ability != FORCE_ABILITY || ch->skill_level[FORCE_ABILITY] > 1 )
            ch_printf( ch, "%-15s   Level: %-3d   Max: %-3d   Exp: %-10ld   Next: %-10ld\n\r",
            ability_name[ability], ch->skill_level[ability], max_level(ch, ability), ch->experience[ability],
            exp_level( ch->skill_level[ability]+1 ) );
          else
            ch_printf( ch, "%-15s   Level: %-3d   Max: ???   Exp: ???          Next: ???\n\r",
            ability_name[ability], ch->skill_level[ability], ch->experience[ability]);
}

which displays this:
Soldier           Level: 199   Max: 200   Exp: 19602000     Next: 19800500  
Pilot             Level: 100   Max: 200   Exp: 4900500      Next: 5000000   
Engineer          Level: 101   Max: 200   Exp: 5000000      Next: 5100500   
Mercenary         Level: 100   Max: 200   Exp: 4900500      Next: 5000000   
Smuggler          Level: 101   Max: 200   Exp: 5000000      Next: 5100500   
Ambassador        Level: 50    Max: 200   Exp: 1200500      Next: 1250000   
Psyonic           Level: 1     Max: 200   Exp: 0            Next: 500       

which of course still displays Psyonic max levels when current level is equal-to-or-under 10, when according to the code should not
       
Post is unread #6 Dec 3, 2008, 2:11 am
Go to the top of the page
Go to the bottom of the page

Keberus
Conjurer
GroupFUSS Project Team
Posts341
JoinedJun 4, 2005

I'm not sure if it's really this simple but maybe you just need braces for the for loop, try changing:
void do_level( CHAR_DATA *ch, char *argument )
{ 
       int ability;
    
       for ( ability = 0 ; ability < MAX_RL_ABILITY ; ability++ )
          if ( ability != FORCE_ABILITY || ch->skill_level[FORCE_ABILITY] > 1 )
            ch_printf( ch, "%-15s   Level: %-3d   Max: %-3d   Exp: %-10ld   Next: %-10ld\n\r",
            ability_name[ability], ch->skill_level[ability], max_level(ch, ability), ch->experience[ability],
            exp_level( ch->skill_level[ability]+1 ) );
          else
            ch_printf( ch, "%-15s   Level: %-3d   Max: ???   Exp: ???          Next: ???\n\r",
            ability_name[ability], ch->skill_level[ability], ch->experience[ability]);
}


to:
void do_level( CHAR_DATA *ch, char *argument )
{ 
       int ability;
    
       for ( ability = 0 ; ability < MAX_RL_ABILITY ; ability++ )
       {
          if ( ability != FORCE_ABILITY || ch->skill_level[FORCE_ABILITY] > 1 )
            ch_printf( ch, "%-15s   Level: %-3d   Max: %-3d   Exp: %-10ld   Next: %-10ld\n\r",
            ability_name[ability], ch->skill_level[ability], max_level(ch, ability), ch->experience[ability],
            exp_level( ch->skill_level[ability]+1 ) );
          else
            ch_printf( ch, "%-15s   Level: %-3d   Max: ???   Exp: ???          Next: ???\n\r",
            ability_name[ability], ch->skill_level[ability], ch->experience[ability]);
      }
}


Let us know if that helps
       
Post is unread #7 Dec 3, 2008, 7:44 am
Go to the top of the page
Go to the bottom of the page

tphegley
Magician
GroupMembers
Posts176
JoinedMay 21, 2006

ch_printf( ch, "%-15s   Level: %-3d   Max: ???   Exp: ???          Next: ???\n\r",
            ability_name[ability], ch->skill_level[ability], ch->experience[ability]);


Isn't that trying to add another declaration? You have the ability name %-15s, the skill_level %-3d, but no experienced because you don't have anymore declarations.

Maybe I missed something. This could be giving you a warning.

I'll look at the other code and see what's up, but I'm not familiar with SWR code that well.
       
Post is unread #8 Dec 3, 2008, 7:48 am   Last edited Dec 3, 2008, 7:52 am by tphegley
Go to the top of the page
Go to the bottom of the page

tphegley
Magician
GroupMembers
Posts176
JoinedMay 21, 2006

Maybe change the if check

if ( ability != FORCE_ABILITY || ch->skill_level[FORCE_ABILITY] > 1 )


to

if ( ability != FORCE_ABILITY)


or

if ( ch->skill_level[FORCE_ABILITY] > 1 )


Try Keberus' idea first as he's more familiar with the code.
       
Post is unread #9 Dec 3, 2008, 9:26 am   Last edited Dec 3, 2008, 9:27 am by Kayle
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

Well, You got a double showing because I was a dumbass and forgot a brace it should look like:

    send_to_char("&C------------------------------------------------------------------------------------\n\r", ch);

    {
       int ability;

       for ( ability = 0 ; ability < MAX_RL_ABILITY ; ability++ )
       {
          if( ability != FORCE_ABILITY || ch->skill_level[FORCE_ABILITY] > 10 )
          {
            ch_printf( ch, "&c%-15s   &CLevel: %-3d   Max: %-3d   Exp: %-10ld   Next: %-10ld\n\r",
               ability_name[ability], ch->skill_level[ability], max_level(ch, ability), ch->experience[ability],
               exp_level( ch->skill_level[ability]+1 ) );
            if( ch->skill_level[ability] >= 101 /*&& ability != FORCE_ABILITY */) //See post
               ch_printf( ch, "  &bSpecialization: &cSpecName     &bLevel: &cCurrent   &bPoints: &cAvail\n\r" /*add values here */ );
          }
          else
            ch_printf( ch, "&c%-15s   &CLevel: %-3d   Max: ???   Exp: %-10ld       Next: ???\n\r",
            ability_name[ability], ch->skill_level[ability], ch->experience[ability]);
       }
    }

    send_to_char("&C------------------------------------------------------------------------------------\n\r", ch);


Edit: it was trying to show experience, but didn't have a spot to, so I added one.
       
Post is unread #10 Dec 3, 2008, 4:54 pm
Go to the top of the page
Go to the bottom of the page

chaoscayne
Fledgling
GroupMembers
Posts15
JoinedNov 29, 2008

I tried both the adding brackets for do_level and changing the code for level display in do_score.
Still no change to Psyonic (FORCE_ABILITY) display...still displaying current/max level and exp at less than current level 10, and displaying specialization when over lvl 101
       
Post is unread #11 Dec 3, 2008, 5:38 pm
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

Can you show me the part of the code where FORCE_ABILITY is defined?
       
Post is unread #12 Dec 3, 2008, 5:46 pm
Go to the top of the page
Go to the bottom of the page

Keberus
Conjurer
GroupFUSS Project Team
Posts341
JoinedJun 4, 2005

I was looking through stock swrfuss and theres no MAX_RL_ABILITY. I'd like to see where you define MAX_RL_ABILITY, as well as the ability_name reference in mud.h and const.c
       
Post is unread #13 Dec 3, 2008, 5:50 pm
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

I don't think they're using SWRFUSS, I think they're using SWRiP, but I could be wrong.
       
Post is unread #14 Dec 3, 2008, 6:23 pm
Go to the top of the page
Go to the bottom of the page

Keberus
Conjurer
GroupFUSS Project Team
Posts341
JoinedJun 4, 2005

I loaded up stock swrip2.0 and score and level work like they are supposed to. Deinitly makes me want to see the ability_name in const, MAX_RL_ABILITY in mud and ABILTY_FORCE and all the rest, as far as references in mud.h as well.
       
Post is unread #15 Dec 3, 2008, 7:23 pm
Go to the top of the page
Go to the bottom of the page

chaoscayne
Fledgling
GroupMembers
Posts15
JoinedNov 29, 2008

okay that last bit made me take a look at them again.....it would have seemed that i screwed up the numbers......fixed and works perfectly now...thanks all for the wondorous help! :lol: :biggrin:
       
Post is unread #16 Dec 3, 2008, 7:39 pm
Go to the top of the page
Go to the bottom of the page

Keberus
Conjurer
GroupFUSS Project Team
Posts341
JoinedJun 4, 2005


chaoscayne said:

okay that last bit made me take a look at them again.....it would have seemed that i screwed up the numbers......fixed and works perfectly now...thanks all for the wondorous help! :lol: :biggrin:


No problem, glad you got it working.
       
Post is unread #17 Dec 3, 2008, 8:09 pm
Go to the top of the page
Go to the bottom of the page

chaoscayne
Fledgling
GroupMembers
Posts15
JoinedNov 29, 2008

now the trick is to figure out the virtual ship system that came with the code so i can get it fully installed and add the 2 more ship size classes. Again thank you for the help!
       
Pages:<< prev 1 next >>