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
➜ Random Question about transformtions
Random Question about transformtions
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Lex_Luther
Canada (4 posts) 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. | Top |
|
Posted by
| Zeno
USA (2,871 posts) 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 | Top |
|
Posted by
| Nick Cash
USA (626 posts) 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 | Top |
|
Posted by
| Nick Cash
USA (626 posts) 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 | 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.
12,737 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top