The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Ember's pet hack
I have made Embers pets in flash with a counter in it. When a day is passed the image changed in a dead pet and a member must click the 'feed me' button to restart the counter. But what i had completly overlooked was the fact that in the postbit these counters starts at zero over and over on each time you look or open the posting/reply. I hope that there is a way to use a flash counter or another method that let's the counter run to it's end no matter if a petowner post or reply's. Is this possible?
example flash: http://www.cyberty.nl/forum/images/pets/FishFemale.swf |
#2
|
||||
|
||||
Nice idea.
It would seem to me that in order to do this properly, you'll need to pass a "last fed time" variable into flash and then when the user clicks feed me, update the database again with the "last fed time" I don't know much about flash, but it seems to me it could be done easier with plain old php. Just add a "last fed" timestamp in the user table and set everyone's to today's time (beause it will need to start with something) Then if last fed was over X days ago (depending on what you want to set it for) display the dead pet image. If last fed was under X days ago, everything is okay. I think instead of the pet being fed by clicking a button however, it should be based on when you last posted - in that case, you would not need to add anything to the database at all and could use the preexisting lastpost field (or lastvisit or lastactivity, depending on what you really want to do) Then if your last post was over X days ago, it could display the dead graphic and if not, display the normal one. |
#3
|
||||
|
||||
Yes it could be done with just php, but i'm not so good in writing such code for it.
The flash code that put's feed times into the database could be similar to the sorts of code that put scores into the db as in Futureal's flash arcade. But these are in this case not absolute values, they must decrease and later increase with use of a commandbutton or other action but that's level pro php/flash i guess. Maybe a cron job to render that section to zero after 24 hours. |
#4
|
||||
|
||||
It would be easier to add a field in the user table for "last fed" than to use a counter inside of Flash. Again, I think flash pets could be really cool if they had any specific actions, but I think for this sort of hack, flash is complete overkill.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|