Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Mys v1.1.x Mods (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=20)
-   -   Giving pets a Gender (http://www.mysidiaadoptables.com/forum/showthread.php?t=1148)

Seapyramid 01-23-2010 09:51 AM

RE: Giving pets a Gender
 
That is normal but why a new table? They can stay in the owned adoptables table but if the owner field is blank then they are not owned and will not show up on anyones profile because they are abandoned. It a lot easier, especially when you are learning to use the wheel given you, not reinvent it. :):)

Sea

Tkrules 01-23-2010 12:09 PM

RE: Giving pets a Gender
 
I recently added this mod to my site and it works somewhat. The row Gender does display correctly in the table. However, any pet I adopt has no gender, the row is always blank. I have also tried adding the values male and female to the row gender in the table owned_adoptables to no avail. Any help would be appreciated.

Roconza 01-23-2010 01:11 PM

RE: Giving pets a Gender
 
@Seapyramid

I had started to use the abandoned script posted here but the download was lost in the move now I'm to scared to mess with it and I don't know how to make the abandoned adoptable open to claim by other members. So now I have a DB with abandoned pets and nothing to do with them.

Seapyramid 01-24-2010 03:21 AM

RE: Giving pets a Gender
 
Quote:

Originally Posted by Roconza
@Seapyramid

I had started to use the abandoned script posted here but the download was lost in the move now I'm to scared to mess with it and I don't know how to make the abandoned adoptable open to claim by other members. So now I have a DB with abandoned pets and nothing to do with them.

Very simply.. set it up so when someone abandons it just updates to owned_adoptables... owner field to ""

Like this:

PHP Code:

mysql_query("UPDATE " $prefix "owned_adoptables SET owner='' WHERE aid='$id'"); 

Then when you have you page for them to take abandons... use something like..

PHP Code:

                $query2 "SELECT aid,name,currentlevel FROM " $prefix "owned_adoptables WHERE owner = ''"

to show them & someting like

PHP Code:

        $query0 "SELECT name,item FROM " $prefix "owned_adoptables WHERE aid='$id' LIMIT 1";
        
$result0 mysql_query($query0);
        
$num0 mysql_numrows($result0);
        switch (
true) {
            
//**************************************************
            // Adoptable Exists
            //**************************************************
            
case ($num0 0):
                
// <editor-fold defaultstate="collapsed" desc="Adoptable Exists">
                
$row0 mysql_fetch_assoc($result0);
                
$name $row0["name"];
                
$item $row0["item"];
                
$image "";
                if (
$item != "yes") {
                    
$image getcurrentimage($id);
                } else {
                    
$image getcurrentitemimage($id);
                }
                
$article_title "Signing New Contract with " $name "<br /><br />";
                
$article_content "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;You are signing a contract with " $name ". Doing so will require a signing bonus of 200 Gold Pieces. When you're ready to sign a contract with this Companion, click on the <i>Sign Contract</i> button below.<br /><br />
                <center><a href='levelup.php=" 
$id "'><img src='" $image "' border='0'></a></center><br />
                <form name='form1' method='post' action='doabandon.php'>
                <p><input name='aid' type='hidden' id='aid' value='" 
$id "'>
                <input name='name' type='hidden' id='name' value='" 
$name "'></p>
                <p><input type='submit' name='submit' value='Sign Contract'></p></form>"
;
                
$_SESSION['abandon']=1;
                
// </editor-fold>
                
break; 

when they adopt

Now I will say once again.. my code is HIGHLY OPTIMIZED & WILL NO LONGER WORK with the basic script!!

What I offer is some insight & direction.. not a "fix".

Sea

Hall of Famer 03-14-2010 01:35 AM

RE: Giving pets a Gender
 
umm so this is 50% male and 50% female for all adoptables... Is it possible to specify that certain adoptables can only be male or female?

Seapyramid 03-14-2010 05:19 PM

RE: Giving pets a Gender
 
It is . I have now set up a gender system where gender is male, female or both.. if both it randoms & chooses a gender. It also has the option of setting gender for one pet & the alt the other gender, if main pet & alt are meant to be different sexes.

Hall of Famer 03-14-2010 11:32 PM

RE: Giving pets a Gender
 
Sounds cool, would you send me a private message about this? Thanks. ^^

Seapyramid 03-14-2010 11:56 PM

RE: Giving pets a Gender
 
Sure, sending it now

SieghartZeke 03-30-2010 06:30 AM

RE: Giving pets a Gender
 
Here my problem...why i dont show the gender in the Myadopts page??
I Have added the code for show...but i dont show none!!!
WHy?

athenscott 04-29-2010 02:17 AM

RE: Giving pets a Gender
 
Thanks for sharing valuable code. As I have seen it had worked for some people and not for others. So I going to try it with positive feeling that it will work for me and revert back to you with update shortly.


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

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