Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ fighting mobs question

fighting mobs question

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Lt_noodle   (39 posts)  Bio
Date Sat 11 Jun 2005 05:25 PM (UTC)
Message
Okay i searched about this and found nothing about but i found how to make the fight thingy like rom which is really good. But can someone tell me how to make it like every round you can see the condition of your opponents if he's dyin or if he's in excellent condition or whatever? Like in other rom games where the health of your opponent is located at the end of the round. This is an example: (got this from a different topic sorry for copyin.)



Your wrath *** DEVASTATES *** the Crested Gibbon! [71]
The Crested Gibbon is poisoned by the venom on the Blade of Denmark.
Your wrath *** DEVASTATES *** the Crested Gibbon! [65]
The Crested Gibbon is poisoned by the venom on the Blade of Denmark.
Your wrath misses the Crested Gibbon.
Your wrath *** DEVASTATES *** the Crested Gibbon! [72]
Your wrath *** DEVASTATES *** the Crested Gibbon! [74]
Your wrath *** DEVASTATES *** the Crested Gibbon! [64]
The Crested Gibbon is DEAD!!
You receive 0 experience points.
The Crested Gibbon's heart is torn from his chest.

Someone please help me. I tried everything and looked at fight.c because i know its in fight.c i even changed the damage outputs and all but it just won't work. Help me please. Thanks.
Top

Posted by Ithildin   USA  (262 posts)  Bio
Date Reply #1 on Sat 11 Jun 2005 05:47 PM (UTC)

Amended on Sat 11 Jun 2005 05:52 PM (UTC) by Ithildin

Message
Go here and click on code[a-f], then look under letter b and that gives you a battle prompt. Will need to port it a little for smaug.


http://darkoth.kyndig.com/


That should be what your looking for. It's an overall good site.

Ithildin

**********************Edit*************************

A quick search through the boards showed my original questions and a ported version for smaug.

Top

Posted by Lt_noodle   (39 posts)  Bio
Date Reply #2 on Sat 11 Jun 2005 07:34 PM (UTC)
Message
Umm it says for rom, not for smaug
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #3 on Sat 11 Jun 2005 08:08 PM (UTC)
Message
Read Ithildin's edit, there's a port.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Lt_noodle   (39 posts)  Bio
Date Reply #4 on Sat 11 Jun 2005 08:17 PM (UTC)
Message
alright do i put that in fight.c void new_dam_message?
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #5 on Sat 11 Jun 2005 08:24 PM (UTC)
Message
If the function already exists, then you'll need to append the new changes to it.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Lt_noodle   (39 posts)  Bio
Date Reply #6 on Sat 11 Jun 2005 08:42 PM (UTC)
Message
alright i downloaded the one from darkoth. I don't know where to put the code but i am workin on it but i got a question. How can i change the colors to the default smaugfuss color codes?
Top

Posted by Lt_noodle   (39 posts)  Bio
Date Reply #7 on Sat 11 Jun 2005 08:47 PM (UTC)
Message
damn i don't know what to do i looked everywhere for the
void bust_a_prompt( CHAR_DATA *ch )
on fight.c and i still can't find it.
Top

Posted by Ithildin   USA  (262 posts)  Bio
Date Reply #8 on Sun 12 Jun 2005 05:30 AM (UTC)

Amended on Sun 12 Jun 2005 05:36 AM (UTC) by Ithildin

Message
go into comm.c and find display_prompt

right after the case a break, put this:


        case 'C':  /* Tank */
	  //if ( !IS_IMMORTAL( ch ) ) break;
          if ( !ch->fighting || ( victim = ch->fighting->who ) == NULL )
             strcpy( pbuf, "N/A" );
          else if(!victim->fighting||(victim = victim->fighting->who)==NULL)
             strcpy( pbuf, "N/A" );
          else {
              if ( victim->max_hit > 0 )
                    percent = (100 * victim->hit) / victim->max_hit;
              else
                    percent = -1;
                   if (percent >= 100)
                       sprintf (pbuf, "&g<&cT:&w%s &cTC: &gPerfect Health", victim->name );
                   else if (percent >= 90)
                       sprintf (pbuf, "&g<&cT:&w%s &cTC: &OSlightly Scratched", victim->name);
                   else if (percent >= 80)
                       sprintf (pbuf, "&g<&cT:&w%s &cTC: &YFew Bruises", victim->name);
                    else if (percent >= 70) 
                       sprintf (pbuf, "&g<&cT:&w%s &cTC: &YSome Cuts", victim->name);
                    else if (percent >= 60)
                       sprintf (pbuf, "&g<&cT:&w%s &cTC: &PSeveral Wounds", victim->name);
                    else if (percent >= 50)
                       sprintf (pbuf, "&g<&cT:&w%s &cTC: &pNasty Wounds", victim->name);
                    else if (percent >= 40)
                       sprintf (pbuf, "&g<&cT:&w%s &cTC: &pBleeding Freely", victim->name);
                    else if (percent >= 30)
                       sprintf (pbuf, "&g<&cT:&w%s &cTC: &rCovered in Blood", victim->name);
                    else if (percent >= 20)
                       sprintf (pbuf, "&g<&cT:&w%s &cTC: &rLeaking Guts", victim->name);
                    else if (percent >= 10)
                       sprintf (pbuf, "&g<&cT:&w%s &cTC: &RAlmost Dead", victim->name);
                    else
                       sprintf (pbuf, "&g<&cT:&w%s &cTC: &RDYING", victim->name);
             }
          break;
        case 'c':
	  //if ( !IS_IMMORTAL( ch ) ) break;
          if ( !ch->fighting || ( victim = ch->fighting->who ) == NULL )
             strcpy( pbuf, "N/A" );
          else {
              if ( victim->max_hit > 0 )
                    percent = (100 * victim->hit) / victim->max_hit;
              else
                    percent = -1;
                if (percent >= 100)
                       sprintf (pbuf, "&cE:&w%s &cEC: &gPerfect Health&g>", victim->name);
                   else if (percent >= 90)
                       sprintf (pbuf, "&cE:&w%s &cEC: &OSlightly Scratched&g>", victim->name);
                   else if (percent >= 80)
                       sprintf (pbuf, "&cE:&w%s &cEC: &YFew Bruises&g>", victim->name);
                    else if (percent >= 70)
                       sprintf (pbuf, "&cE:&w%s &cEC: &YSome Cuts&g>", victim->name);
                    else if (percent >= 60)
                       sprintf (pbuf, "&cE:&w%s &cEC: &PSeveral Wounds&g>", victim->name);
                    else if (percent >= 50)
                       sprintf (pbuf, "&cE:&w%s &cEC: &pNasty Wounds&g>", victim->name);
                    else if (percent >= 40)
                       sprintf (pbuf, "&cE:&w%s &cEC: &pBleeding Freely&g>", victim->name);
                    else if (percent >= 30)
                       sprintf (pbuf, "&cE:&w%s &cEC: &rCovered in Blood&g>", victim->name);
                    else if (percent >= 20)
                       sprintf (pbuf, "&cE:&w%s &cEC: &rLeaking Guts&g>", victim->name);
                    else if (percent >= 10)
                       sprintf (pbuf, "&cE:&w%s &cEC: &RAlmost Dead&g>", victim->name);
                    else
                       sprintf (pbuf, "&cE:&w%s &cEC: &RDYING&g>", victim->name);
           }
          break;


And then modify it to your liking.

*****edit*****

You will also have to change your default_prompts. Find char *default_fprompt and char *default_prompt and put this in instead:


char *default_fprompt( CHAR_DATA *ch )
{
  static char buf[60];

  strcpy(buf, "<&g%hhp ");
  if ( IS_VAMPIRE(ch) )
    strcat(buf, "&R%bbp ");
    
  else
  strcat(buf, " &g%vmv> ");
  
  if ( IS_NPC(ch) || IS_IMMORTAL(ch) )
    strcat(buf, "%i%R");
  strcat(buf, "\n\r%C %c ");  
  return buf;
}

char *default_prompt( CHAR_DATA *ch )
{
  
		
  static char buf[60];

  strcpy(buf, "&g<%hhp ");
  if ( IS_VAMPIRE(ch) )
    strcat(buf, "&R%bbp");
  else
  strcat(buf, " &g%vmv> ");
  strcat(buf, "\n\r&g<   > ");
   
  return buf;
	


}


That should do the trick for you.
Top

Posted by Lt_noodle   (39 posts)  Bio
Date Reply #9 on Sun 12 Jun 2005 05:47 PM (UTC)
Message
alright i got some minor problems after that but it worked out real good. Thanks man. NOW THE AUTOMAPPER.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


27,781 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.