• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script: Wall Clock

FL

Pokémon Island Creator
  • 2,544
    Posts
    14
    Years
    • Seen yesterday
    [PokeCommunity.com] Wall Clock

    Wall Clock from Ruby/Sapphire/Emerald.

    Link

    Tested on Essentials v13 and v20.1. If this script isn't working on latest Essentials version, please inform on this thread.
     
    Last edited:
    It works perfectly, thanks FL. Can I make a suggestion? Can we have pinball mini games in pokemon essentials? For prizes, we can give random items for the winners. Or making a pinball mini game like ruby and sapphire with random rewards.
     
    You've outdone yourself once again, FL, your scripts are gold. It's long overdue, but finally this one has been done, kudos man!
    This is a very simple scripts that took me around 2 hours. And I spend almost all the time formatting the images, making the right x/y image positions and making the script instructions =)

    It works perfectly, thanks FL. Can I make a suggestion? Can we have pinball mini games in pokemon essentials? For prizes, we can give random items for the winners. Or making a pinball mini game like ruby and sapphire with random rewards.
    A basic pinball probably takes 10 times the time of doing this script and I don't like making long scripts, specially if I never will use it.

    A pinball uses too many physics and making colliders for the entire stage is annoying. Probably is easier to take a color detection, hum. Anyway, I guess that is faster to port a pinball algorithm from another language.
     
    I have a syntax error with this line:

    time.hour>=12"clockpm" : "clockam"))

    EDIT: I have triple checked and the actual line is the same as the one in the OP, but it gets messed up here.
     
    Last edited:
    I have a syntax error with this line:

    time.hour>=12"clockpm" : "clockam"))

    EDIT: I have triple checked and the actual line is the same as the one in the OP, but it gets messed up here.

    Same here can you attach a text file? the codes are getting messy everyday, its probably the vBulletin or browser which is eating the codes :D

    EDIT
    Found a way to copy the script correctly, now in the normal version of the forum, the script codes are eaten by something, so goto thread tools> show printable version> copy script>install>test>done.

    Here is proof it works smoothly:
    [PokeCommunity.com] Wall Clock

    and just in case a attachment of the script:
     
    Last edited:
    Thanks Mustafa505, appreciate your help a lot =]
     
    Last edited:
    Hey, guys, i have an error here when i call the script in an event:

    Called script:

    'pbWallClock(true)' for boy clock
    'pbWallClock(false)' for girl clock
    'pbWallClock($Trainer.gender==0)' for clock of the player gender
    'pbWallClock($Trainer.gender!=0)' for clock of the opposite of player gender

    I think somethings here is missing.

    And i got this error in this event, when it tried to call this script.

    [PokeCommunity.com] Wall Clock


    Note: I put this script above main in data script.
    And i put the graphics in graphics\pictures.
    The only problem is called the script in event.
     
    Don't say the whole thing

    Code:
    pbWallClock(true)

    You're calling a method. ' will never be in a method name, symbols are not allowed in method names. Method names will also always start with a lower case letter.
    Your next problem is "for boy clock". Comment that out (add a # in front of it. This will leave the text there for your future reference, but prevent the interpreter from trying to read it.)
     
    Thanks for your explanation, mej71.

    After a few tests in my project, and i figure out what's the problem.
    I interpreter all wrong.

    It's 4 ways to call the script:

    pbWallClock(true) - for boy clock
    pbWallClock(false) - for girl clock
    pbWallClock($Trainer.gender==0) - for clock of the player gender
    pbWallClock($Trainer.gender!=0) - for clock of the opposite of player gender

    And now worked perfectly fine.
     
    Last edited:
    I'm having an issue with this script.

    I use a base game that was simply updated to 15.1
    No new scripts added beforehand.

    This is what I get when I attempt to playtest.
    [PokeCommunity.com] Wall Clock


    My script is exactly as originally posted but here is the def that includes line 70:
    Code:
    63  def pbUpdateClock
    64    time = pbGetTimeNow
    65    @sprites["pointerminute"].angle=(-time.min)*6
    66    @sprites["pointerhour"].angle=(-time.hour%12)*30+(-time.min)/2
    67    @sprites["pmam"].dispose if @sprites["pmam"]
    68    @sprites["pmam"]=IconSprite.new(0,0,@viewport)
    69    @sprites["pmam"].setBitmap(IMAGEPATH+(
    70        time.hour>=12"clockpm" : "clockam"))
    71   @sprites["pmam"].x=@sprites["clock"].x+(
    72        @sprites["clock"].bitmap.width-@sprites["pmam"].bitmap.width)/2
    73    @sprites["pmam"].y=@sprites["clock"].y+176
    74  end
     
    I'm having an issue with this script.

    I use a base game that was simply updated to 15.1
    No new scripts added beforehand.

    This is what I get when I attempt to playtest.
    [PokeCommunity.com] Wall Clock


    My script is exactly as originally posted but here is the def that includes line 70:
    Code:
    63  def pbUpdateClock
    64    time = pbGetTimeNow
    65    @sprites["pointerminute"].angle=(-time.min)*6
    66    @sprites["pointerhour"].angle=(-time.hour%12)*30+(-time.min)/2
    67    @sprites["pmam"].dispose if @sprites["pmam"]
    68    @sprites["pmam"]=IconSprite.new(0,0,@viewport)
    69    @sprites["pmam"].setBitmap(IMAGEPATH+(
    70        time.hour>=12"clockpm" : "clockam"))
    71   @sprites["pmam"].x=@sprites["clock"].x+(
    72        @sprites["clock"].bitmap.width-@sprites["pmam"].bitmap.width)/2
    73    @sprites["pmam"].y=@sprites["clock"].y+176
    74  end
    PokéCommunity is breaking my codes:

    Found a way to copy the script correctly, now in the normal version of the forum, the script codes are eaten by something, so goto thread tools> show printable version> copy script>install>test>done.
     
    I'm sure I copied directly from a printable version but anyhow, I did manage to figure it out. In my way of understanding, that line is asking a question. "if it's 12 then I am either am or pm" I put the question mark in and it worked. :D

    Could have copied and pasted again from the printable version but I wanted to see if I could figure out that form of code myself.
     
    Sorry posting it here so LATE (August 22nd 2015) Late, sorry
    Please don't bann me

    I want to use a script for (Real Time System)
    with Clock designs/images and like I click on a clock in-game and then appears a bigger Clock in the game with the Real Time.
     
    Sorry posting it here so LATE (August 22nd 2015) Late, sorry
    Please don't bann me

    I want to use a script for (Real Time System)
    with Clock designs/images and like I click on a clock in-game and then appears a bigger Clock in the game with the Real Time.
    The thread revival limit does not in this subsection.

    That you want is exactly what the script does, just download the image examples, follow the instructions on the script and create events with the script command(s).
     
    I know that this script does the same thing that I want, but this script is for Unreal time and I want one for Real time and I already searched it in the Wiki of Essentials and in google too and couldn't find anything....
     
    I know that this script does the same thing that I want, but this script is for Unreal time and I want one for Real time and I already searched it in the Wiki of Essentials and in google too and couldn't find anything....

    Real time - the player playing at night darkens the game as if it's night time, etc. - is already built into Essentials.
     
    I didn't try it out because the name of this Script is Unreal Time and I want a real Time Script but whatever I'll try this Script out, right now then I see if it works, thanks Maruno for your help.
     
    Back
    Top