[PHP] Random Figure Generator Script

Results 1 to 4 of 4
  1. #1
    Account Upgraded | Title Enabled! yifan_lu is offline
    MemberRank
    Jun 2007 Join Date
    Next to a computer screenLocation
    692Posts

    [PHP] Random Figure Generator Script

    This is a PHP function that generates a VALID habbo figure. Why? It is useful for may things, for example: In register.php, if a user doesn't have flash, you can generate some random figures (like Habbo), or for the new v31 flash which shows a bunch of random habbos, you can use it to generate 30 figures, etc. You can even write a bot for HoloCMS that registers a bunch of random bots. The possibilities are endless. The example script provided generates 10 or whatever you define amount of random figures and their associated image.

    To install, just make sure figuredata.xml is under the folder /xml/, the example script is just an example, you should integrate it with HoloCMS or whatever you are using it for, just please don't remove the credits (users won't see it, it's just so I get credits if you redistribute it (which is allowed) in your scripts)

    How does it work? First it uses rand() to randomize club status and gender if not defined. Second, it goes through the list of settypes (from the figuredata XML) and if 1) it is required for the figure (head,body,legs), or 2) rand() returns 1 (for the extra stuff), then add it to the figure. 3) if the figure is colorable, then generate a random color from that set's palette.

    Download it either here: http://phpretro.pastebin.com/f49a8f02 (no XML) or from the attachment (XML included)

    Again, this is just a useless demo script until someone intergrates it with their script or makes something out of it. I'll look forward to your creations. (I already intergrated it with PHPRetro in register.php and v31 flash)

    EDIT: For those who just want to see the script in action: http://demo.phpretro.com/figure.php?count=10
    EDIT 2: Grief on the other forums shortened the script: http://phpretro.pastebin.com/f7860f926
    Attached Files Attached Files


  2. #2
    Account Upgraded | Title Enabled! nuno.cards is offline
    MemberRank
    Jun 2007 Join Date
    Home ^^Location
    322Posts

    Re: [PHP] Random Figure Generator Script

    Nice =D good job
    Now go to phpretro xD

  3. #3
    Infraction Banned Swineflu is offline
    MemberRank
    May 2009 Join Date
    AmericaLocation
    770Posts

    Re: [PHP] Random Figure Generator Script

    Nice release Yifan

  4. #4
    Enthusiast Elitex is offline
    MemberRank
    Jun 2009 Join Date
    48Posts

    Re: [PHP] Random Figure Generator Script

    Looks nice.



Advertisement