#31
|
||||
|
||||
I'll try that a little later. The only problem with the rarity thing is that a rare will pop up all three at the same time. A user can then just open the links in different tabs and also get as many as they want. Which is why I want each egg to be unique. Then when you click one egg it can no longer be taken(adopted).
|
#32
|
|||
|
|||
You have your adopt page set up to work differently than I have mine. I may be able figure out a solution if I see your code.
I have a few vague ideas of how this might be achieved. |
#33
|
||||
|
||||
PHP Code:
|
#34
|
|||
|
|||
Okay, since my adopting is set up different than yours I don't really have the ability to easily test this. The idea behind this code it to set a variable when the page is loaded and when one of the adoptables is clicked/adopted the value of that variable changes. And if the link is clicked a second time refresh the page so that it can't be adopted more than once.
Try this In the functions.php add this function: PHP Code:
Then change your adopt.php code to this modified version: PHP Code:
*is not sure if I did it right* |
#35
|
||||
|
||||
I tried the function part first:
Parse error: syntax error, unexpected ';' in /home/taleofdr/public_html/functions/functions.php on line 117 |
#36
|
|||
|
|||
Nevermind I figured out what was wrong. XP
Try this PHP Code:
Last edited by !Alive; 03-24-2012 at 03:37 PM. |
#37
|
||||
|
||||
Ok I think it's working :) I clicked on an egg and then tried to click it again and it said the id was invalid which means it can only be adopted once so that's good :) But... the rare and uncommon ones that I have still show up 3 at one time.
|
#38
|
|||
|
|||
Have you assigned each adoptable with a rarity number?
|
#39
|
||||
|
||||
Yes I have 5 dragon species available right now. Two are uncommon, One is uncommon, and the other two are rare.
|
#40
|
|||
|
|||
Hmm... It just seems like an odd coincidence for multiple rare and uncommon to appear with the chances of them appearing....
I have only seen three kinds of egg in the lair. The shiny black and white, the one with two layers of scales and a colorful one. The black and white and scales one occur most often. |
|
|
What's New? |
What's Hot? |
What's Popular? |