Re: need help with unusual php/mysql/array manipulation script
| From: | Chris Earle | Date: | Sat, 27 Jul 2002 05:08:12 +0000 |
| Subject: | Re: need help with unusual php/mysql/array manipulation script | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-109928@lists.php.net to get a copy of this message | ||
Ahhh, good old UO. I remember GMing my taming, crazy what they've done to
the game since I've quit (120 skill, insane!).
I'm not completely sure of a few things about your question and I think that
I could help if you supply the answers to my questions.
Does one tamer's taming of an animal increase ALL animals by a generic
amount (i.e., John tames "a cow" for the first time, then Bill tames it,
then John tames "a polar bear" for the first time and, again, Bill retames
it; do both examples raise the requirement 9.8 points or is it based on the
animal)?
If it is generic the answer is simple, if not, it might get a little more
complicated.
"Spam" <spam@bittersweet2.com> wrote in message
news:1103_1027739971@news.php.net...
> I run an online gaming fansite, and most people that
> visit my site want to know what would be best to raise
> their skill on. I started a script which basically
> takes numeric data (0-120) and pulls the information
> they need from my database. I got the easy part down,
> which you can see here:
>
> http://www.tamingarchive.com/main/whattotame.php
>
> The complete listing of everything within the database
> is listed here:
>
> http://www.tamingarchive.com/tameables/
>
> Basically, the script pulls the animals from the
> database based on their "min" value. Problem is when
> multiple people use the same animal for skill. If Joe
> tames it, it might be 59.1 required skill, but if Bob
> comes and retames it, it takes 63.9 skill (+4.9). I
> need to be able to somehow add creatures into my array
> that I just pulled from the database with the
> necessary amount added to the "min" value and sort it
> all by the "min" value. My desired output would be
> like this:
>
> Rat -0.9
> Sewer Rat -0.9
> Cow 11.1
> Rat (2nd) 3.9
> Sewer Rat (2nd) 3.9
> Cow (2nd) 15.9
> Rat (3rd) 18.3
> Sewer Rat (3rd) 18.3
>
> My select statement just does multiple OR comparisons
> to see if adding the 2nd & 3rd retame values to the
> "min" value will still put it within my desired range.
> The "quality" part of the script is just a comparison
> on the "min" value.
>
> I don't even know where to begin to add these modified
> values to my array. I'm awful with arrays anyway.
> Any help would be greatly appreciated.
>
> sasha
>
>