PDA

View Full Version : gender ratio script


maximillion
06-24-2011, 12:19 PM
hey hof,

about that gender ratio script.. will that also solve the random adopting? like if i add a male horse, regardless how many times it's adopted.. will it always be a male?

Hall of Famer
06-24-2011, 03:25 PM
Well yes. If you set the gender ratio to be 0, it will always be male regardless of how many times you adopt the same species. Similarly for all female adoptables, just change 0 to 100 to make this happen.

maximillion
06-24-2011, 03:51 PM
i'm gonna attempt it over the weekend, but i don't know php.. so i know for a fact i'll screw up the whole site..

SilverDragonTears
06-24-2011, 04:22 PM
What's the coding you're working with? I can help you out ^^

maximillion
06-24-2011, 06:12 PM
hof's gender ratio mod for 1.1 to use in version 1.2..

SilverDragonTears
06-24-2011, 06:19 PM
Where can I find it? I'll take a look at it once I install it.

maximillion
06-24-2011, 06:41 PM
http://www.mysidiaadoptables.com/forum/showthread.php?t=1611

hof, about yer tutorial.. the gender column already exists.. second to last item in the table.. so i can't add it

http://img850.imageshack.us/img850/5448/unledkmi.png

so would i just move it to the bottom and change the value 10 to 40??? this is why i shouldn't be touching the db and php... lol

Inf3rnal
06-25-2011, 11:29 AM
It really doesn't matter what location it is in the database.

Just change the value to 40 and you should be still able to pull the info.

maximillion
06-25-2011, 01:06 PM
v1.2 nadopt.php has:
$alternates = $_POST["alternates"];
$altoutlevel = $_POST["altoutlevel"];
$altchance = $_POST["altchance"];

doesn't have "SECURE" sections:
$alternates = $_POST["alternates"];
$alternates = secure($alternates);

$altoutlevel = $_POST["altoutlevel"];
$altoutlevel = secure($altoutlevel);

$altchance = $_POST["altchance"];
$altchance = secure($altchance);

so do i add the secure parts? or just the "post" part for the gender ratio mod?

also, v1.2 doesn't say:
mysql_query("INSERT INTO ".$prefix."adoptables VALUES ('', '$name', '$description','$eggimage','$cba','$promocode', '$freqcond', '$number','$datecond','$date','$adoptscond','$maxn umcond','$morethannum','$usergroupcond','$usergrou ps','$alternates','$altoutlevel','$altchance')");

but rather:
runquery("INSERT INTO ".$prefix."adoptables VALUES ('', '$name', '$class' ,'$description','$eggimage','$cba','$promocode', '$freqcond', '$number','$datecond','$date','$adoptscond','$maxn umcond','$morethannum','$usergroupcond','$usergrou ps','$alternates','$altoutlevel','$altchance', '$cost')");

:cfrown:

and ofcourse now i gotta install that person's script cause it's not installed... i'm sorry, but when 1.2 was done this should all have been done.. this is frustrating that, i don't know php and here i am attempting it... just getting pissed off now!


EDIT:
Before you proceed, make sure you you have Arianna's gender system on your script already. Her thread can be found here:
http://www.rusnakweb.com/forum/showthread.php?tid=1367&page=1
dead link... LOL, yeah this is great!!!!



http://www.getsmileyface.com/new/angry/14.gif

ruletka
06-25-2011, 02:14 PM
http://www.mysidiaadoptables.com/forum/showthread.php?t=1148 is the gender system. You could just add something like
if($type=Put a certain type here) {
$gender = "Male";
}

to your adoptable page, but its not that advanced :(

maximillion
06-25-2011, 02:21 PM
ty, been reading through it.. seems a few people have had issues with it.. so i already know i will.

thanks for the link :)


just went through my site and the gender thing is already there... so i don't have to add her mod, but hof's tutorial is not percise and needs updating because he mentions things that are not actually in v1.2

ruletka
06-25-2011, 03:34 PM
Hm, I'll attempt to make this mod for you.

maximillion
06-25-2011, 05:28 PM
k...... ty

EDIT: lol, 10 character minimum limit..

ruletka
06-26-2011, 12:18 AM
Ah >< Hof already has a gender ratio mod? nevermind. Well I can install it for you if your having problems with it.

Hall of Famer
06-26-2011, 01:33 PM
Well the script was already available, but not compatible with the latest release since it was quite old. You may need to modify the script a bit in order for it to work on Mys v1.2.x.

maximillion
06-26-2011, 02:49 PM
well, i don't know php for the umpteenth time.. and the one person that could really help me out - wants to get paid for it. i don't think that right since he helps code the script. he's a nice guy otherwise.. helpful too. i just don't agree to what was said to me is all.

although i don't like multiple people having access to my site (because it's proven to be more of a hassle in the past for me coding wise), but i'll accept help from someone that really knows 1.2 coding and can actually incorporate hof's gender mod.

this thing is the only real thing stopping me from moving on with this script...

maximillion
06-27-2011, 11:59 AM
i'd like to thank fadillzzz and ruletka for helping me out with the gender ratio script..

thank you very much! :)