User | Post |
Kyoufu Kawa
Posts: 1110/2481 |
I did. |
Trekvarten
Posts: 2/11 |
Thank you for answering. You should have written earlier that you already knew about the clock system, then I wouldn't have needed to search myself EDIT: I mean you should have written it in this forum (no offense) 'cause I'm not frequenting your page |
Kyoufu Kawa
Posts: 1104/2481 |
I found the clock data before, even the fact it runs backwards, but never wrote any Rubikode for it. I'll look over your code a bit and fix it wherever needed.
#org 0x6B09F8 comparefarbytetobyte 0x02024F3F 0x06 if 02 goto 0x123456 comparefarbytetobyte 0x02024F3F 0x12 if 00 goto 0x123456 'same offset? setweather 00 doweather end #org 0x123456 setweather 0x0B 'because B is not a valid decimal value. Only #raw assumes hex. doweather end |
Trekvarten
Posts: 1/11 |
I think I'll take the good news first. Ok: I think I've found a way to do time based events in rubikon. As I think nobody has already found it I'll post it here: As I looked through the WHOLE forum I only saw people searching for some kind of AM/PM boolean. But the game doesn't store the time like
[hour 0 - 12] [min 0-60] [AM/PM true/false]
It stores it like this:
[hour (24 MINUS actual hour)] [min (60 MINUS actual min)]
The time goes BACKWARDS. E.G. if the time is 11:00 PM the values are ( 01 3C[=60] )h if it is 02:43 PM the vals are ( 0A[=10] 11[=17] )h if it's 10:03 AM the vals are ( 0E[=14] 39[=57] )h and so on... The adress in ruby is (02 02 4F 3E)h in RAM And now to the problem:
#org 0x6B09F8 comparefarbytetobyte 0x02024F3F 0x0600 'compare time to 6 o'clock pm if 02 goto 0x123456 'if later goto nighttime weather changer comparefarbytetobyte 0x02024F3F 0x1200 'compare time to 6 o'clock am if 00 goto 0x123456 'if earlier goto nighttime weather changer setweather 00 'normal doweather end #org 0x123456 setweather 0B 'dark doweather end
Why isn't this working? Everytime I compile it says RTE 53 Type: mismatch If anyone knows please make an example with the same adresses as above.
PS I'm swedish so if my english isn't that good please don't get angry or something like that... |