osu-repy/test.py

20 lines
644 B
Python
Raw Normal View History

2019-03-13 10:59:06 +01:00
from osuRepy.frame import ReplayFrame # ReplayFrame
from osuRepy.replay import Replay # Replay instance
2019-03-13 05:43:26 +01:00
2019-03-13 10:59:06 +01:00
from osuRepy.helpers import osuButtons, osuMods # Enum helpers
2019-03-13 05:43:26 +01:00
2019-03-13 11:13:55 +01:00
replay = Replay(beatmap_hash = "9e66c0a0eadced7d07f06b3968a74cc0") # Create replay instance
2019-03-13 05:43:26 +01:00
2019-03-13 10:59:06 +01:00
replay.write( ReplayFrame(2, 256, 192, osuButtons.M1) ) # Add replay frame (time, x, y, buttons)
replay.set_score(score = 29284624,
s300 = 416,
s50 = 2,
miss = 1,
combo = 358) # Set score info
replay.set_mods(osuMods.HIDDEN | osuMods.DOUBLETIME) # Enable HDDT mods
replay.set_timestamp(1552466941) # Set unix timestamp
replay.save("myReplay.osr") # Export replay to file