Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, DotBot, Google

Members: 0
Guests: 9
Stats
Files
Topics
Posts
Members
Newest Member
481
3,739
19,386
621
KellieBusb
Today's Birthdays
Rane (42)
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » Skill Display Trouble.
Forum Rules | Mark all | Recent Posts

Skill Display Trouble.
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Mar 30, 2010, 7:38 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

I am having some trouble with the secret skills i put in.

If the skill hasn't been learned it should show up as ????????
But if it has the name should show up normal. This is what i got so far.

void do_alist( CHAR_DATA * ch, char *argument )
{
  int snRace[gsn_top_sn];
  int sn;
  int size = 0;
  int i;
  bool bioPrac = FALSE;
  bool canUse = FALSE;
int ii = 0;

  if( IS_NPC( ch ) )
    return;

  for( sn = gsn_first_ability; sn < gsn_first_weapon; sn++ )
  {
      if( ( skill_table[sn]->guild != CLASS_NONE
          && ( !IS_GUILDED( ch ) || ( ch->pcdata->clan->class != skill_table[sn]->guild ) ) ) )
      continue;
      if( sn == gsn_wss && !IS_DEMONRANKED( ch ) )
      continue;
      if( sn == gsn_bbk && ch->race == race_lookup( "saiyan" ) )
      if( ch->rank < 2 )
        continue;
      if( sn == gsn_super_dragonfist && ch->race == race_lookup( "saiyan" ) )
      if( !SAIYANRANKED( ch ) )
        continue;
      if( sn == gsn_finalshine && !is_saiyan_s ( ch ) )
      if( ch->rank < 2 )
        continue;
      if( sn == gsn_buster_shell  )
      if( ch->rank < 4 )
        continue;
      if( sn == gsn_unamek && !is_namek_n ( ch ) )
      if( !IS_RANKED  ( ch ) )
       continue;
      if( sn == gsn_dbpower && ch->race == race_lookup( "dragon" ) )
      if( ch->rank < 2 )
        continue;
      if( sn == gsn_shin_kamehameha && ch->race == race_lookup( "dragon" ) )
      if( ch->rank  < 8 )
        continue;
       if( sn == gsn_wizard4 && ch->race == race_lookup( "wizard" ) )
      if( ch->rank  < 4 )
        continue;

       if( sn == gsn_guard && !xIS_SET(ch->act, PLR_REINCARNATE) )
        continue;
      if( sn == gsn_guardian && ch->race == race_lookup( "kaio" ) )
      if( ch->rank < 5 )
        continue;
      if( sn == gsn_minion && ch->race == race_lookup( "demon" ) )
      if( ch->rank < 2 )
        continue;
      if( sn == gsn_instant_trans && ( ( is_android( ch ) || is_superandroid( ch ) ) && !wearing_sentient_chip( ch ) ) )
        continue;
      if ( sn == gsn_mystic && !IS_SET( ch->pcdata->flags, PCFLAG_KNOWSMYSTIC ) && !is_kaio( ch ) )
        continue;
      if ( sn == gsn_lssj && !IS_SET( ch->pcdata->flags, PCFLAG_KNOWSLSSJ )	)
        continue;
	  if ( sn == gsn_majin && !ch->canmajin )
        continue;	
    if( ( sn == gsn_t4 || sn == gsn_t3 || sn == gsn_t2 || sn == gsn_x1 ||
          sn == gsn_t1 || sn == gsn_omega || sn == gsn_vm1 ||
          sn == gsn_vm2 ) && ( ch->pcdata->learned[sn] < 1 || !is_android( ch ) ) )
      continue;

    if( sn == gsn_suppress && is_android( ch ) && ch->pcdata->learned[sn] < 1 )
      continue;

    if( sn == gsn_sent_chip && ( ch->pcdata->learned[sn] < 1 || !is_android( ch ) ) )
      continue;
    if( skill_table[sn]->min_level[ch->class] == 0 || skill_table[sn]->skill_level[ch->class] == 0 )
      continue;

    if( ch->pcdata->learned[sn] <= 0 && SPELL_FLAG( skill_table[sn], SF_SECRETSKILL ) )
      continue;

    if( ch->race == race_lookup( "bio-android" ) )
    {
      if( sn == gsn_semiperfect || sn == gsn_perfect || sn == gsn_ultraperfect )
      {
        bioPrac = FALSE;
      }
      else if( sn == gsn_clone || sn == gsn_ki_burst || sn == gsn_negative_spirit_bomb || sn == gsn_aura_light || sn == gsn_aura_shield || sn == gsn_customattack || sn == gsn_enhance || sn == gsn_regeneration)
      {
        bioPrac = TRUE;
      }
      else
      {
        bioPrac = TRUE;
        for( ii = 0; ii < MAX_RACE; ii++ )
        {
          if( ii == ch->class )
            continue;
          else
          {
            if( skill_table[sn]->skill_level[ii] > 0 )
            {
              bioPrac = FALSE;
            }
          }
        }
      }
    }
    if( ch->race == 6 && ch->pcdata->learned[sn] <= 0 && skill_table[sn]->skill_level[ch->class] >= 100000 && !bioPrac )
      continue;

    snRace[size] = sn;
    size++;
  }

  slistSort( snRace, size, ch->race );
    pager_printf_color( ch, "\n\r                          &RRacial Skills&z                            \n\r" ); 
    pager_printf_color( ch, "&z-----------------------------------------------------------------------&z\n\r" );   

  if( IS_WIZARD ( ch ) )
    pager_printf_color( ch, "&z              &WName&z                   &YML Needed&z       &zCurrent&z     &cMax&z\n\r" );
  else if( is_android( ch ) || is_superandroid( ch ) )  
    pager_printf_color( ch, "&z              &WName&z                   &YTL Needed&z       &zCurrent&z     &cMax&z\n\r" );
  else if( is_fierian ( ch ) )
    pager_printf_color( ch, "&z              &WName&z                   &YHL Needed&z       &zCurrent&z     &cMax&z\n\r" ); 
  else 
    pager_printf_color( ch, "&z              &WName&z                   &YPL Needed&z       &zCurrent&z     &cMax&z\n\r" );
    pager_printf_color( ch, "&z-----------------------------------------------------------------------&z\n\r" );

 for( i = 0; i < size; i++ )
  {
    if( skill_table[snRace[i]]->skill_level[ch->class] > ch->exp )
      canUse = FALSE;
    else
      canUse = TRUE;

    if ( ch->pcdata->learned[sn] == 0 && skill_table[snRace[i]]->secret > 0 )
    {
      stc("      &z?????????????????         &z???????????????       &z??????      &c???&w   \n\r", ch );
    }
else if( canUse )
    {
     pager_printf_color( ch, "   &W%20.20s     &Y%19s       &z%5.1f%%     &c%3d%%\n\r",
                                skill_table[snRace[i]]->name,
                                num_punct_ld( skill_table[snRace[i]]->skill_level[ch->class] ),
                                ch->pcdata->learned[snRace[i]], skill_table[snRace[i]]->skill_adept[ch->class],skill_table[snRace[i]]->focus, format_pl ( skill_table[snRace[i]]->min_mana ) );
    } 
    else
    {
			      pager_printf_color( ch, "   &z%20.20s     %19s       &z%5.1f%%     %3d%%\n\r",
                                skill_table[snRace[i]]->name,
                                num_punct_ld( skill_table[snRace[i]]->skill_level[ch->class] ),
                                ch->pcdata->learned[snRace[i]], skill_table[snRace[i]]->skill_adept[ch->class] );
    }

    }
return;
}

Everything seems to work right, But I can't it to display the skill if learned.
       
Post is unread #2 Mar 30, 2010, 7:40 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

Btw The skill works if learned, I just don't understand why it won't display.
       
Post is unread #3 Apr 2, 2010, 6:45 pm
Go to the top of the page
Go to the bottom of the page

Keberus
Conjurer
GroupFUSS Project Team
Posts341
JoinedJun 4, 2005

You don't see the skill at all, or you see ????'s instead of the skill info?
       
Post is unread #4 Apr 2, 2010, 9:14 pm
Go to the top of the page
Go to the bottom of the page

Andril
Magician
GroupMembers
Posts147
JoinedJun 9, 2009

Well, one thing I notice that needs work is this:
   else if( canUse )
   {
      pager_printf_color( ch, "   &W%20.20s     &Y%19s       &z%5.1f%%     &c%3d%%\n\r",
         skill_table[snRace[i]]->name,                                    // name
         num_punct_ld( skill_table[snRace[i]]->skill_level[ch->class] ),  // pl needed?
         ch->pcdata->learned[snRace[i]],                                  // current?
         skill_table[snRace[i]]->skill_adept[ch->class],                  // max?
         skill_table[snRace[i]]->focus,                                   // ???????
         format_pl( skill_table[snRace[i]]->min_mana ) );                 // ???????
   }

You have two extra items in there for the formatting. This could be what's causing the problem but I couldn't say that for sure.
       
Post is unread #5 Apr 3, 2010, 1:36 am
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

I took care of that, and Fixed this problem. Thanks though.
       
Pages:<< prev 1 next >>