Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Evolution by name changing (http://www.mysidiaadoptables.com/forum/showthread.php?t=1260)

ruko 01-04-2010 08:58 PM

Evolution by name changing
 
Is there a code or feature to like, when it reaches to a certain level, the pet or pokemon name changes to something else?

Arianna 01-05-2010 04:03 AM

RE: Evolution by name changing
 
No, there isn't. I don't plan to code one, and I think this question has been asked before, and other people have said no. Sorry.

arlecchina 01-05-2010 03:28 PM

RE: Evolution by name changing
 
If you want the level name to change you could do this:

PHP Code:

if($currentlevel == "0"){
$levelname="Insert what you want here";
}
else if(
$currentlevel == "1"){
$levelname="Insert what you want here";


And then use $levelname whenever you refer to the level.

You should add if the currentl level is 2, 3, 4, and so on (depending on how many levels you are using).

If you want the actual pet's name to change you could do this:

PHP Code:

if($currentlevel == "0"){
$petname="Insert what you want here";
}
else if(
$currentlevel == "1"){
$petname="Insert what you want here";


And then use $name whenever you refer to the pet's name.

You should add if the currentl level is 2, 3, 4, and so on (depending on how many levels you are using).

I use titles in my site so when a pet reaches a certain level they have a title before their actual name. Such as Prince Polly or King Polly.

So i put $petname before I put the pet's actual name (which I think is usually refered to as $name).

So $name get's Polly from the database but $petname get's it's info from the if statement referring to the current level.

ruko 01-05-2010 07:43 PM

RE: Evolution by name changing
 
Thanks for the code, now where do we put that?

arlecchina 01-05-2010 07:47 PM

RE: Evolution by name changing
 
Quote:

Originally Posted by ruko
Thanks for the code, now where do we put that?

I have put it in any place where either the level or the pet's name is mentioned. levelup.php or myadopts.php are the files I would start with.

If you're asking where exactly to put it in those files, I can't easily answer that. There are many places where you might want to put it. My suggestion is to study those files and how they work and decide where you want to use it.

You can make it easier by creating a function in the functions.php that handles the level name or pet name and then call that function in the levelup.php and myadopts.php files.

ruko 01-05-2010 10:02 PM

RE: Evolution by name changing
 
oaky, thanks :)

Arianna 01-06-2010 03:56 AM

RE: Evolution by name changing
 
Oh, I was assuming that it was different for each pet. Like, pet one would have it's 'type' variable being changed to one thing, while pet two would have it being changed to another. Sorry.

Hall of Famer 02-10-2010 07:42 PM

RE: Evolution by name changing
 
Quote:

Originally Posted by arlecchina
If you want the level name to change you could do this:

PHP Code:

if($currentlevel == "0"){
$levelname="Insert what you want here";
}
else if(
$currentlevel == "1"){
$levelname="Insert what you want here";


And then use $levelname whenever you refer to the level.

You should add if the currentl level is 2, 3, 4, and so on (depending on how many levels you are using).

If you want the actual pet's name to change you could do this:

PHP Code:

if($currentlevel == "0"){
$petname="Insert what you want here";
}
else if(
$currentlevel == "1"){
$petname="Insert what you want here";


And then use $name whenever you refer to the pet's name.

You should add if the currentl level is 2, 3, 4, and so on (depending on how many levels you are using).

I use titles in my site so when a pet reaches a certain level they have a title before their actual name. Such as Prince Polly or King Polly.

So i put $petname before I put the pet's actual name (which I think is usually refered to as $name).

So $name get's Polly from the database but $petname get's it's info from the if statement referring to the current level.

Would you tell me which script file to modify?


All times are GMT -5. The time now is 08:32 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.