Author Topic: Zolarus Chripora - Pseudocode like code  (Read 3041 times)

Zefk

  • Hero Member
  • *****
  • Posts: 536
  • Just helping Solarus
    • View Profile
    • Zelzec
Zolarus Chripora - Pseudocode like code
« on: May 15, 2016, 06:11:07 am »
Zolarus Chripora

About:
I have only decided to start making the "Pseudocode like code" for now, but I will probably code it. No date decided. A small short game pack template with most needed scripts that I am "thinking" of making if I get time. Not really decided. The name is based on "Solarus Christopho." The name of the Engine and Creator. This project is suppose to be easy plug and go for those with little programming experience. Christopho has already made many of the needed scripts and the scripts can be found in the source code of his games.

Started Pseudocode:
5-16-16 (May 16, 2016)

Started some scripts:
8-25-16 (August 25, 2016)

Pseudocode:
What is Pseudocode like code? It is basically just an outline of the code. Normally easier to read and simplified. It will not function until programmed.

Currently working on:
14. Inventory system
14.5. Storage bag

--I will be delete Pseudocode as the working script is completed. No more will be made because I am experienced enough with Solarus to just script them now.
Scripts:
Scripts thinking of making for Zolarus Chripora: (I am posting this here to clean up the help guide project.)

10. Easy custom rain system (use multiple png images like rain drops, leaves, particle images, spores, flower, etc. I will be making this with opensource images.) - Pseudocode like code
11. Easy custom menu system  - Pseudocode like code
12. Rotating ARPG all in one menu
13. Easy custom crafting
14. Inventory system
14.5. Storage bag
15. Map location and the ability to teleport by picking places on the map
16. Deed karma system
17. Marriage system
18. Memory based Matching card Game
19. Black jack
20. Checker and maybe chess or shogi
21. Slot machine
22. Monster card game
23. Monster turnbased battle game
24. Coordinate grab script

Completed scripts for Zolarus script pack: (Many of the scripts will be modified to be shorter and have more customization options with arrays, but I will keep the older scripts here.)

New:
Advanced Number Input: Here
Advanced Digit Display: Here
Multiple Digit Display script: Here
New Bank Script: Here
Menu Dialog Display: Here
Character Input Script: Here
Pick Name Script: Here
Gallery Script: Here
Jam Station: Here (A Bug in the engine crashes the second page)
Time System Script: Here


Old:
-Volume Control script by Zefk: Here and the entire project: Here
-Input Number script by Zefk: Here
-Bank script: Here



Suggestions:
Thinking....many complicated scripts take full time....Ally AI, etc. Let me know of a good script to add.

Return to Solarus Resource Help Project

Zefk

  • Hero Member
  • *****
  • Posts: 536
  • Just helping Solarus
    • View Profile
    • Zelzec
Re: Zolarus Chripora - Pseudocode like code
« Reply #1 on: May 16, 2016, 10:06:11 am »
Custom Menu System - Pseudocode like code

About:
This is Pseudocode like code for a custom system. I am not all that good with Lua yet. Of course there will need to be changing for it to actually work. I am still adding to this.

Code: Lua
  1. local  browse = 0
  2. local  menu = false
  3. local  item_button = false
  4. local  skill_button = false
  5. local  equipment_button = false
  6. local  status_button = false
  7. local  save_button = false
  8. local  logout_button = false
  9.  
  10. local menu_img = sol.surface.create("Menu.png")
  11. local item_button_img = sol.surface.create("Item Button.png")
  12. local skill_button_img = sol.surface.create("Skill Button.png")
  13. local equipment_button_img = sol.surface.create("Equipment Button.png")
  14. local status_button_img = sol.surface.create("Status Button.png")
  15. local save_button_img = sol.surface.create("Save Button.png")
  16. local logout_button_img = sol.surface.create("Logout Button.png")
  17.  
  18. function sol.main:on_draw(screen)
  19.  
  20. --Display bottom layer menu
  21.  
  22. if command == "w"
  23. then
  24.      sol.audio.play_sound("menu/Menu Browse")
  25.      menu = true
  26.      if menu = true
  27.      then
  28.           menu_img:draw(screen)
  29.      end
  30. end  
  31.  
  32. --Down control for buttons
  33.  
  34. if command == "down"
  35. then
  36.      sol.audio.play_sound("menu/Menu Browse")
  37.      if browse < 5
  38.      then
  39.           browse = browse + 1
  40.      end
  41. end
  42.  
  43. --up control for buttons
  44.  
  45. if command == "up"
  46. then
  47.      sol.audio.play_sound("menu/Menu Browse")
  48.      if browse > 0
  49.      then
  50.           browse = browse -1
  51.      end
  52. end
  53.  
  54. --Showing buttons for going up and down
  55. if browse == 0
  56. then
  57.      item_button = true
  58.       if item_button = true
  59.       then
  60.            item_button_img:draw(screen)
  61.      end
  62. end
  63.  
  64. if browse == 1
  65. then
  66.      skill_button = true
  67.      if skill_button = true
  68.      then
  69.           skill_button_img:draw(screen)
  70.      end
  71. end
  72.  
  73. if browse == 2
  74. then
  75.      equipment_button = true
  76.      if equipment_button = true
  77.      then
  78.           equipment_button_img:draw(screen)
  79.      end
  80. end
  81.  
  82. if browse == 3
  83. then
  84.      status_button = true
  85.      if status_button = true
  86.      then
  87.           status_button_img:draw(screen)
  88.      end
  89. end
  90.  
  91. if browse == 4
  92. then
  93.      save_button = true
  94.      if save_button = true
  95.      then
  96.           save_button_img:draw(screen)
  97.      end
  98. end
  99.  
  100. if browse == 5
  101. then
  102.      logout_button = true
  103.      if logout_button = true
  104.      then
  105.           logout_button_img:draw(screen)
  106.      end
  107. end
  108.  
  109. --Exit Menu
  110.  
  111. if command == "EXC and or X"
  112. then
  113.      sol.audio.play_sound("menu/Menu click")
  114.      browse = 0
  115.      menu = false
  116.      item_button = false
  117.      skill_button = false
  118.      equipment_button = false
  119.      status_button = false
  120.      save_button = false
  121.      logout_button = false
  122.    
  123. end
  124.  
  125. --Activate or call the menus from the buttons (change it an elseif)
  126.  
  127. if command == "Z"
  128. then
  129.      sol.audio.play_sound("menu/Menu click")
  130.      if browse == 0
  131.      then
  132.      require("scripts.Item")
  133.      item();
  134.      end
  135.      if browse == 1
  136.      then
  137.      require("scripts.Skill")
  138.      skill();
  139.      end
  140.      if browse == 2
  141.      then
  142.      require("scripts.Equipment")
  143.      equipment();
  144.      end
  145.      if browse == 3
  146.      then
  147.      require("scripts.Status")
  148.      status();
  149.      end
  150.      if browse == 4
  151.      then
  152.      require("scripts.Save")
  153.      save();
  154.      end
  155.      if browse == 5
  156.      then
  157.      require("scripts.Logout")
  158.      logout();
  159.      end
  160.  
  161. end  
  162.    
  163. end
  164. end

Item.lua

Skill.lua

Equipment.lua

Status.lua

Save.lua

Logout.lua


     

Zefk

  • Hero Member
  • *****
  • Posts: 536
  • Just helping Solarus
    • View Profile
    • Zelzec
Re: Zolarus Chripora - Pseudocode like code
« Reply #2 on: May 19, 2016, 08:04:45 am »
Easy custom rain system - Pseudocode like code

About:
You can use multiple png images like rain drops, leaves, particle images, spores, flower, etc. I will be making this with opensource images. Understand this is Pseudocode like code and it will not be functional yet. I am still adding to this.

Timer.lua
Code: Lua
  1. --Move these locals to type 1-4 scripts and finish them.
  2. local type_one = false
  3. local type_two = false
  4. local type_three = false
  5. local type_four = false
  6.  
  7. --Require scripts to work
  8. require("scripts.Type1")  
  9. require("scripts.Type2")
  10. require("scripts.Type3")
  11. require("scripts.Type4")
  12.  
  13. --Activate scripts
  14. first();
  15. second();
  16. third();
  17. fourth();
  18.  
  19. --Nest this loop, so it can be stopped
  20. --Rain timer cycle
  21. while( true ) do
  22.  
  23.  rain_seconds = rain_seconds + 1
  24.  if rain_seconds == 1
  25.  then
  26.      rain_seconds = 2
  27.      rain_seconds = 3
  28.      rain_seconds = 4
  29.      rain_seconds = 5
  30.      rain_seconds = 6
  31.      rain_seconds = 7
  32.      rain_seconds = 8
  33.      rain_seconds = 1
  34.      rain_seconds = 0
  35.   end
  36. end
  37.  
  38.  
  39.  

Type1.lua
Code: Lua
  1. -- Easy custom rain system
  2. -- Can be use for more than rain. Ex: spores, snow, magic paticles, ect.
  3. -- Requires rain timer.lua
  4.  
  5. local rain_type_one = false
  6. local rain_type_two = false
  7. local rain_type_three = false
  8. local rain_type_four = false
  9.  
  10. --Eight frames for rain pattern one
  11. local type_one_rain_frame_one = false
  12. local type_one_rain_frame_two = false
  13. local type_one_rain_frame_three = false
  14. local type_one_rain_frame_four = false
  15. local type_one_rain_frame_five = false
  16. local type_one_rain_frame_six = false
  17. local type_one_rain_frame_seven = false
  18. local type_one_rain_frame_eight = false
  19.  
  20. --load the eight(8) frames for type one pattern.
  21. local type_one_rain_frame_one_img = sol.surface.create("p1-1.png")
  22. local type_one_rain_frame_two_img = sol.surface.create("p1-2.png")
  23. local type_one_rain_frame_three_img = sol.surface.create("p1-3.png")
  24. local type_one_rain_frame_four_img = sol.surface.create("p1-4.png")
  25. local type_one_rain_frame_five_img = sol.surface.create("p1-5.png")
  26. local type_one_rain_frame_six_img = sol.surface.create("p1-6.png")
  27. local type_one_rain_frame_seven_img = sol.surface.create("p1-7.png")
  28. local type_one_rain_frame_eight_img = sol.surface.create("p1-8.png")
  29.  
  30. --show and remove images one after another for type 1.
  31. if rain_seconds >=1
  32. then
  33.     type_one_rain_frame_one = true
  34.     type_one_rain_frame_one_img:draw(screen)
  35.     if rain_seconds >=2
  36.     then
  37.         type_one_rain_frame_one = false
  38.         type_one_rain_frame_two = true
  39.         type_one_rain_frame_two_img:draw(screen)
  40.         if rain_seconds >=3
  41.         then
  42.             type_one_rain_frame_two = false
  43.             type_one_rain_frame_three = true
  44.             type_one_rain_frame_three_img:draw(screen)
  45.             if rain_seconds >=4
  46.             then
  47.                 type_one_rain_frame_three = false
  48.                 type_one_rain_frame_four = true
  49.                 type_one_rain_frame_four_img:draw(screen)
  50.                 if rain_seconds >=5
  51.                 then
  52.                     type_one_rain_frame_four = false
  53.                     type_one_rain_frame_five = true
  54.                     type_one_rain_frame_five_img:draw(screen)
  55.                     if rain_seconds >=6
  56.                     then
  57.                         type_one_rain_frame_five = false
  58.                         type_one_rain_frame_six = true
  59.                         type_one_rain_frame_six_img:draw(screen)
  60.                         if rain_seconds >=7
  61.                         then
  62.                             type_one_rain_frame_six = false
  63.                             type_one_rain_frame_seven = true
  64.                             type_one_rain_frame_seven_img:draw(screen)
  65.                             if rain_seconds >=8
  66.                             then
  67.                                type_one_rain_frame_seven = false
  68.                                type_one_rain_frame_eight= true
  69.                                type_one_rain_frame_eight_img:draw(screen)
  70.                            end
  71.                         end
  72.                      end
  73.                   end
  74.                end
  75.             end
  76.          end
  77.       end
  78.    end
  79. end
  80.  
  81.  
  82.  

Type2.lua
Code: Lua
  1. --Eight frames for rain pattern two
  2. local type_two_rain_frame_one = false
  3. local type_two_rain_frame_two = false
  4. local type_two_rain_frame_three = false
  5. local type_two_rain_frame_four = false
  6. local type_two_rain_frame_five = false
  7. local type_two_rain_frame_six = false
  8. local type_two_rain_frame_seven = false
  9. local type_two_rain_frame_eight = false
  10.  
  11. --load the eight(8) frames for type 2 pattern.
  12. local type_two_rain_frame_one_img = sol.surface.create("p2-1.png")
  13. local type_two_rain_frame_two_img = sol.surface.create("p2-2.png")
  14. local type_two_rain_frame_three_img = sol.surface.create("p2-3.png")
  15. local type_two_rain_frame_four_img = sol.surface.create("p2-4.png")
  16. local type_two_rain_frame_five_img = sol.surface.create("p2-5.png")
  17. local type_two_rain_frame_six_img = sol.surface.create("p2-6.png")
  18. local type_two_rain_frame_seven_img = sol.surface.create("p2-7.png")
  19. local type_two_rain_frame_eight_img = sol.surface.create("p2-8.png")
  20.  
  21. --show and remove images one after another for type 2.
  22. if rain_seconds >=1
  23. then
  24.     type_two_rain_frame_one = true
  25.     type_two_rain_frame_one_img:draw(screen)
  26.     if rain_seconds >=2
  27.     then
  28.         type_two_rain_frame_one = false
  29.         type_two_rain_frame_two = true
  30.         type_two_rain_frame_two_img:draw(screen)
  31.         if rain_seconds >=3
  32.         then
  33.             type_two_rain_frame_two = false
  34.             type_two_rain_frame_three = true
  35.             type_two_rain_frame_three_img:draw(screen)
  36.             if rain_seconds >=4
  37.             then
  38.                 type_two_rain_frame_three = false
  39.                 type_two_rain_frame_four = true
  40.                 type_two_rain_frame_four_img:draw(screen)
  41.                 if rain_seconds >=5
  42.                 then
  43.                     type_two_rain_frame_four = false
  44.                     type_two_rain_frame_five = true
  45.                     type_two_rain_frame_five_img:draw(screen)
  46.                     if rain_seconds >=6
  47.                     then
  48.                         type_two_rain_frame_five = false
  49.                         type_two_rain_frame_six = true
  50.                         type_two_rain_frame_six_img:draw(screen)
  51.                         if rain_seconds >=7
  52.                         then
  53.                             type_two_rain_frame_six = false
  54.                             type_two_rain_frame_seven = true
  55.                             type_two_rain_frame_seven_img:draw(screen)
  56.                             if rain_seconds >=8
  57.                             then
  58.                                type_two_rain_frame_seven = false
  59.                                type_two_rain_frame_eight= true
  60.                                type_two_rain_frame_eight_img:draw(screen)
  61.                            end
  62.                         end
  63.                      end
  64.                   end
  65.                end
  66.             end
  67.          end
  68.       end
  69.    end
  70. end
  71.  
  72.  
  73.  

Type3.lua
Code: Lua
  1. --Eight frames for rain pattern three
  2. local type_three_rain_frame_one = false
  3. local type_three_rain_frame_two = false
  4. local type_three_rain_frame_three = false
  5. local type_three_rain_frame_four = false
  6. local type_three_rain_frame_five = false
  7. local type_three_rain_frame_six = false
  8. local type_three_rain_frame_seven = false
  9. local type_three_rain_frame_eight = false
  10.  
  11.  
  12.  
  13. --load the eight(8) frames for type 3 pattern.
  14. local type_three_rain_frame_one_img = sol.surface.create("p3-1.png")
  15. local type_three_rain_frame_two_img = sol.surface.create("p3-2.png")
  16. local type_three_rain_frame_three_img = sol.surface.create("p3-3.png")
  17. local type_three_rain_frame_four_img = sol.surface.create("p3-4.png")
  18. local type_three_rain_frame_five_img = sol.surface.create("p3-5.png")
  19. local type_three_rain_frame_six_img = sol.surface.create("p3-6.png")
  20. local type_three_rain_frame_seven_img = sol.surface.create("p3-7.png")
  21. local type_three_rain_frame_eight_img = sol.surface.create("p3-8.png")
  22.  
  23. --show and remove images one after another for type 3.
  24. if rain_seconds >=1
  25. then
  26.     type_three_rain_frame_one = true
  27.     type_three_rain_frame_one_img:draw(screen)
  28.     if rain_seconds >=2
  29.     then
  30.         type_three_rain_frame_one = false
  31.         type_three_rain_frame_two = true
  32.         type_three_rain_frame_two_img:draw(screen)
  33.         if rain_seconds >=3
  34.         then
  35.             type_three_rain_frame_two = false
  36.             type_three_rain_frame_three = true
  37.             type_three_rain_frame_three_img:draw(screen)
  38.             if rain_seconds >=4
  39.             then
  40.                 type_three_rain_frame_three = false
  41.                 type_three_rain_frame_four = true
  42.                 type_three_rain_frame_four_img:draw(screen)
  43.                 if rain_seconds >=5
  44.                 then
  45.                     type_three_rain_frame_four = false
  46.                     type_three_rain_frame_five = true
  47.                     type_three_rain_frame_five_img:draw(screen)
  48.                     if rain_seconds >=6
  49.                     then
  50.                         type_three_rain_frame_five = false
  51.                         type_three_rain_frame_six = true
  52.                         type_three_rain_frame_six_img:draw(screen)
  53.                         if rain_seconds >=7
  54.                         then
  55.                             type_three_rain_frame_six = false
  56.                             type_three_rain_frame_seven = true
  57.                             type_three_rain_frame_seven_img:draw(screen)
  58.                             if rain_seconds >=8
  59.                             then
  60.                                 type_three_rain_frame_seven = false
  61.                                 type_three_rain_frame_eight= true
  62.                                 type_three_rain_frame_eight_img:draw(screen)
  63.                            end
  64.                         end
  65.                      end
  66.                   end
  67.                end
  68.             end
  69.          end
  70.       end
  71.    end
  72. end
  73.  
  74.  
  75.  

Type4.lua
Code: Lua
  1. --Eight frames for rain pattern four
  2. local type_four_rain_frame_one = false
  3. local type_four_rain_frame_two = false
  4. local type_four_rain_frame_three = false
  5. local type_four_rain_frame_four = false
  6. local type_four_rain_frame_five = false
  7. local type_four_rain_frame_six = false
  8. local type_four_rain_frame_seven = false
  9. local type_four_rain_frame_eight = false
  10.  
  11.  
  12. --load the eight(8) frames for type 4 pattern.
  13. local type_four_rain_frame_one_img = sol.surface.create("p4-1.png")
  14. local type_four_rain_frame_two_img = sol.surface.create("p4-2.png")
  15. local type_four_rain_frame_three_img = sol.surface.create("p4-3.png")
  16. local type_four_rain_frame_four_img = sol.surface.create("p4-4.png")
  17. local type_four_rain_frame_five_img = sol.surface.create("p4-5.png")
  18. local type_four_rain_frame_six_img = sol.surface.create("p4-6.png")
  19. local type_four_rain_frame_seven_img = sol.surface.create("p4-7.png")
  20. local type_four_rain_frame_eight_img = sol.surface.create("p4-8.png")
  21.  
  22. --show and remove images one after another for type 4.
  23. if rain_seconds >=1
  24. then
  25.     type_four_rain_frame_one = true
  26.     type_four_rain_frame_one_img:draw(screen)
  27.     if rain_seconds >=2
  28.     then
  29.         type_four_rain_frame_one = false
  30.         type_four_rain_frame_two = true
  31.         type_four_rain_frame_two_img:draw(screen)
  32.         if rain_seconds >=3
  33.         then
  34.             type_four_rain_frame_two = false
  35.             type_four_rain_frame_three = true
  36.             type_four_rain_frame_three_img:draw(screen)
  37.             if rain_seconds >=4
  38.             then
  39.                 type_four_rain_frame_three = false
  40.                 type_four_rain_frame_four = true
  41.                 type_four_rain_frame_four_img:draw(screen)
  42.                 if rain_seconds >=5
  43.                 then
  44.                     type_four_rain_frame_four = false
  45.                     type_four_rain_frame_five = true
  46.                     type_four_rain_frame_five_img:draw(screen)
  47.                     if rain_seconds >=6
  48.                     then
  49.                         type_four_rain_frame_five = false
  50.                         type_four_rain_frame_six = true
  51.                         type_four_rain_frame_six_img:draw(screen)
  52.                         if rain_seconds >=7
  53.                         then
  54.                             type_four_rain_frame_six = false
  55.                             type_four_rain_frame_seven = true
  56.                             type_four_rain_frame_seven_img:draw(screen)
  57.                             if rain_seconds >=8
  58.                             then
  59.                                 type_four_rain_frame_seven = false
  60.                                 type_four_rain_frame_eight= true
  61.                                 type_four_rain_frame_eight_img:draw(screen)
  62.                            end
  63.                         end
  64.                      end
  65.                   end
  66.                end
  67.             end
  68.          end
  69.       end
  70.    end
  71. end
  72.  
  73.  
  74.  

20degree

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
    • Sylvain Personnal Website
Re: Zolarus Chripora - Pseudocode like code
« Reply #3 on: September 12, 2016, 10:41:59 am »
Here is an example of code for the current time of the computer for the software futurepinball.

1st there is a timer component: 1 timer = 1000ms (micro seconds) = 1 second
Code: [Select]
' *****************************************************************
' ***** This display the current time and date in the HudDmd ******
' *****************************************************************

Sub DmdDate_Expired()
DmdDate.Enabled = False

Dim CurrentDateTime
Dim CurrentYear
Dim CurrentMonth
Dim CurrentDay
Dim CurrentHour
Dim CurrentMinute
Dim CurrentSecond

CurrentDateTime = Now()

CurrentYear = Year(CurrentDateTime)
CurrentMonth = Month(CurrentDateTime)
CurrentDay = Day(CurrentDateTime)
CurrentHour = Hour(CurrentDateTime)
CurrentMinute = Minute(CurrentDateTime)
CurrentSecond = Second(CurrentDateTime)

If (CurrentMonth = 1) Then
CurrentMonth = "JANUARY"
ElseIf (CurrentMonth = 2) Then
CurrentMonth = "FEBRUARY"
ElseIf (CurrentMonth = 3) Then
CurrentMonth = "MARCH"
ElseIf (CurrentMonth = 4) Then
CurrentMonth = "APRIL"
ElseIf (CurrentMonth = 5) Then
CurrentMonth = "MAY"
ElseIf (CurrentMonth = 6) Then
CurrentMonth = "JUNE"
ElseIf (CurrentMonth = 7) Then
CurrentMonth = "JULY"
ElseIf (CurrentMonth = 8) Then
CurrentMonth = "AUGUST"
ElseIf (CurrentMonth = 9) Then
CurrentMonth = "SEPTEMBER"
ElseIf (CurrentMonth = 10) Then
CurrentMonth = "OCTOBER"
ElseIf (CurrentMonth = 11) Then
CurrentMonth = "NOVEMBER"
ElseIf (CurrentMonth = 12) Then
CurrentMonth = "DECEMBER"
End If

If (CurrentHour = 0) Then
CurrentHour ="00"
ElseIf (CurrentHour = 1) Then
CurrentHour = "01"
ElseIf (CurrentHour = 2) Then
CurrentHour = "02"
ElseIf (CurrentHour = 3) Then
CurrentHour = "03"
ElseIf (CurrentHour = 4) Then
CurrentHour = "04"
ElseIf (CurrentHour = 5) Then
CurrentHour = "05"
ElseIf (CurrentHour = 6) Then
CurrentHour = "06"
ElseIf (CurrentHour = 7) Then
CurrentHour = "07"
ElseIf (CurrentHour = 8) Then
CurrentHour = "08"
ElseIf (CurrentHour = 9) Then
CurrentHour = "09"
Else
CurrentHour = CurrentHour
End If

If (CurrentMinute = 0) Then
CurrentMinute ="00"
ElseIf (CurrentMinute = 1) Then
CurrentMinute = "01"
ElseIf (CurrentMinute = 2) Then
CurrentMinute = "02"
ElseIf (CurrentMinute = 3) Then
CurrentMinute = "03"
ElseIf (CurrentMinute = 4) Then
CurrentMinute = "04"
ElseIf (CurrentMinute = 5) Then
CurrentMinute = "05"
ElseIf (CurrentMinute = 6) Then
CurrentMinute = "06"
ElseIf (CurrentMinute = 7) Then
CurrentMinute = "07"
ElseIf (CurrentMinute = 8) Then
CurrentMinute = "08"
ElseIf (CurrentMinute = 9) Then
CurrentMinute = "09"
Else
CurrentMinute = CurrentMinute
End If

If (CurrentSecond = 0) Then
CurrentSecond = "00"
ElseIf (CurrentSecond = 1) Then
CurrentSecond = "01"
ElseIf (CurrentSecond = 2) Then
CurrentSecond = "02"
ElseIf (CurrentSecond = 3) Then
CurrentSecond ="03"
ElseIf (CurrentSecond = 4) Then
CurrentSecond = "04"
ElseIf (CurrentSecond = 5) Then
CurrentSecond = "05"
ElseIf (CurrentSecond = 6) Then
CurrentSecond = "06"
ElseIf (CurrentSecond = 7) Then
CurrentSecond = "07"
ElseIf (CurrentSecond = 8) Then
CurrentSecond = "08"
ElseIf (CurrentSecond = 9) Then
CurrentSecond = "09"
ElseIf (CurrentSecond = 55) Then
DmdDate.Enabled = False
Else
CurrentSecond = CurrentSecond
End If

DmdShowDate.FlushQueue()
DmdShowDate.FlushAnimation()
DmdShowDate.QueueText "[y1][f3]" &CurrentHour& "H " &CurrentMinute& "M " &CurrentSecond& "[y11]" &CurrentMonth& " " &CurrentDay& "[y21]" &CurrentYear

DmdDate.Interval = 1000
DmdDate.Enabled = True
End Sub
The object named: DmdShowDate, is some dmd (dot matrix display) object. If you wonder what is: [y1][f3]? There are simply some coordinations and font type for the dmd.

I know it's not LUA, but there are month's that have 5 weeks if you want to show the current time of the computer.

A+

Zefk

  • Hero Member
  • *****
  • Posts: 536
  • Just helping Solarus
    • View Profile
    • Zelzec
Re: Zolarus Chripora - Pseudocode like code
« Reply #4 on: September 13, 2016, 03:22:05 am »
None of the code posted here will work without quite a bit of tweaking, so I do not mind that it is not related to Lua.

Zefk

  • Hero Member
  • *****
  • Posts: 536
  • Just helping Solarus
    • View Profile
    • Zelzec
Re: Zolarus Chripora - Pseudocode like code
« Reply #5 on: September 15, 2016, 11:34:51 am »
Input number script completed:

I made this input script because I need it for a bank script I am working on.
Download

I will probably update it later, but it is functional.

YouTube Video: (Sorry for the blur. This is YouTube's fault. My video is super clear.)
https://youtu.be/orWRphRfncw