Module Rpym

You might also like

You are on page 1of 1

init python:

import time as time_lib

class Halloween2022Module(Module):
id="halloween_2022"
subscribe_on_events=["time_update", "change_location"]

def is_halloween(self):
curr_date = time_lib.strftime("%d-%m")
return curr_date in ["30-10", "31-10", "1-11"]

def on_init(self):
Quests.addQuest(Quest.from_json("halloween_2022/quest.json"))

if not hasattr(store, "halloween_ghost"):


store.halloween_ghost = KTCharacter("halloween_ghost")

def on_event(self, event):


if event.type == "time_update":
if (
CurrentPlace['place'].id == "home" and
event.is_morning and
self.is_halloween() and
checkpoints["mod.halloween.2021"] and
not checkpoints["mod.halloween.2022"]
):
Quests.quest("Хэллоуин 2022").start()
checkpoints["mod.halloween.2022"] = True
renpy.jump("halloween_2022")
elif event.type == "change_location":
if Quests.quest("Хэллоуин 2022").isNextGoal("02. Ино"):
if event.new_location == place_flowers and game.time.is_morning
and gg_form == "def":
renpy.jump("halloween_2022_02")
elif Quests.quest("Хэллоуин 2022").isNextGoal("03. Сакура"):
if event.new_location == place_hospital and
game.time.is_morning and gg_form == "def":
renpy.jump("halloween_2022_03")
elif Quests.quest("Хэллоуин 2022").isNextGoal("04. Река"):
if event.new_location == place_river and game.time.is_evening
and gg_form == "def":
renpy.jump("halloween_2022_04")

You might also like