[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Random Question about transformtions
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Random Question about transformtions

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


Posted by Lex_Luther   Canada  (4 posts)  [Biography] bio
Date Fri 09 Apr 2004 12:05 AM (UTC)
Message
How would i link the trans like you have to have ssj1 to do ssj2 and use the same command for that. If someone could do a demo for me it would help so much thanks.
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #1 on Fri 09 Apr 2004 01:04 AM (UTC)
Message
Its not too hard, just make it one (big) function, with a few ifchecks for the argument, so it can check what your typing.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Reply #2 on Fri 09 Apr 2004 01:06 AM (UTC)
Message
Ok, something like this? Note: not a command, just a bunch of checks..

if ( ch->form == NORMAL )
   transform_player( ch, SSJ1 );
else if ( ch->form == SSJ1 )
   transform_player( ch, SSJ2 );

return;

Then...

void transform_player( CHAR_DATA *ch, int form )
{
  ch->form = form;

  // double max pl
  if ( ch->form == SSJ1 )
  {
    send_to_char( "Your hair turns blonde and the air crackles with energy about you!\n\r", ch );
    ch->maxpl *= 2;
    return;
  }

  // 4 max times pl
  if ( ch->form == SSJ2 )
  {
    send_to_char( "Your hair grows and your muscles being to buldge with strength!\n\r", ch );
    ch->maxpl *= 2;
    return;
  }

  // 8 times max pl
  if ( ch->form == SSJ3 )
  {
    send_to_char( "Your hair is now obscenely long and you feel as strong as a god!\n\r", ch );
    ch->maxpl *= 2;
    return;
  }

  return;
}

Uh, something like that perhaps. Of course there are several things wrong with that, such as it increases max pl and not the persons actual pl at the moment. Also, you would have to add code (transform_player_down?) to downsize their pl again. Or perhaps store it in a variable withing the char_data struct.

~Nick Cash
http://www.nick-cash.com
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Reply #3 on Fri 09 Apr 2004 01:36 AM (UTC)
Message
Also, I forgot, you would need something such as this in mud.h:

typedef enum { NORMAL, SSJ1, SSJ2, SSJ3 } forms;

So yeah. Let me know if you need me to flesh my idea out a bit more.

~Nick Cash
http://www.nick-cash.com
[Go to top] 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.


2,866 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]