View Full Version : 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
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
If you want the level name to change you could do this:
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:
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.
Thanks for the code, now where do we put that?
arlecchina
01-05-2010, 07:47 PM
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.
Arianna
01-06-2010, 03:56 AM
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
If you want the level name to change you could do this:
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:
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?
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.