• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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,444
Posts
13
Years
  • Seen Apr 22, 2024
screen.png

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:

Radical Raptr

#BAMFPokemonNerd
1,121
Posts
13
Years
You've outdone yourself once again, FL, your scripts are gold. It's long overdue, but finally this one has been done, kudos man!
 
220
Posts
9
Years
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.
 

FL

Pokémon Island Creator
2,444
Posts
13
Years
  • Seen Apr 22, 2024
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.
 
63
Posts
9
Years
  • Age 33
  • Seen Aug 15, 2017
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:

mustafa505

Aeon Developer
306
Posts
14
Years
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:
2iuc6dy.jpg

and just in case a attachment of the script:
 
Last edited:
63
Posts
9
Years
  • Age 33
  • Seen Aug 15, 2017
Thanks Mustafa505, appreciate your help a lot =]
 
Last edited:
220
Posts
9
Years
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.

wall_c10.jpg


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.
 
1,224
Posts
10
Years
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.)
 
220
Posts
9
Years
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:
40
Posts
8
Years
  • Age 33
  • Seen Apr 11, 2024
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.
R8CgSbk.png


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
 

FL

Pokémon Island Creator
2,444
Posts
13
Years
  • Seen Apr 22, 2024
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.
R8CgSbk.png


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.
 
40
Posts
8
Years
  • Age 33
  • Seen Apr 11, 2024
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.
 

Pokébook1

Marene
114
Posts
8
Years
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.
 

FL

Pokémon Island Creator
2,444
Posts
13
Years
  • Seen Apr 22, 2024
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).
 

Pokébook1

Marene
114
Posts
8
Years
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....
 
824
Posts
8
Years
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.
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
this script is for Unreal time and I want one for Real time
This script is for whatever time system you're using. Didn't you try using this script before making statements like this? It will work just fine.
 
  • Like
Reactions: FL

Pokébook1

Marene
114
Posts
8
Years
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