I'm attempting to create a concise list of how to do certain actions so that other users can stumble across the forum and possibly use this information to create their own mods (as I am working on in my spare time).
As many of you probably already know the general structure of the CharacterProfile.lua file is always the same. You can view arrays as a tier or series of tiers to get to your information much like stairs in a house...you can stop on the 2nd floor to see the bedroom or go to the 3rd floor and use the bathrom.
Using lua2phparray.php or some other form of lua parser you can "parse" the lua file into a php array. Once you do that the return will be a giant array with many small arrays on the inside. the first tier of that array in our case is rpgoCPpref generally and myProfile second.
now using...
- Code: Select all
foreach(array_keys($myArray) as $realm_name)
{
$realm = $myArray[$realm_name];
print_r(array_keys($myArray));
echo "<br><br>";
}
which outputs the following
- Code: Select all
Array ( [0] => rpgoCPpref [1] => myProfile )
Array ( [0] => rpgoCPpref [1] => myProfile )
is there a way to get and store the values rpgoCPpref and myProfile without knowing that they are called that...and stored in a variable able to be echo'd out without an array.
I ask this because the next few tiers are character names that are dynamic and are not consistant with each user.
I've attempted to look for several ways to do this but I'm not sure on exactly what to do to get those values.
Anyone mind giving me a hand?
Thanks
Insane