# id 402000530 (null), field 402000530
if not sm.hasHadQuest(34858):
    sm.startQuest(34858)
    sm.lockInGameUI(True, False)
    sm.removeAdditionalEffect()
    sm.showFadeTransition(0, 1000, 3000)
    sm.zoomCamera(500, 1000, 500, 50, -70)
    sm.sendDelay(500)
    sm.sendDelay(500)
    sm.forcedFlip(True)
    sm.removeOverlapScreen(1000)
    sm.sendDelay(3000)
    sm.createFieldTextEffect("#fnﾳﾪﾴﾮﾰ￭ﾵ￱ ExtraBold##fs18#Third Class: Gate Creation", 20, 2200, 6, -50, -50, 1, 4, 0, 0, 0)
    sm.setSpeakerType(3)
    sm.setParam(37)
    sm.setColor(1)
    sm.setInnerOverrideSpeakerTemplateID(3001304) # Professor Citrine
    sm.sendNext("#face0#The Verdant Flora use mana from the mytocrystals for our magic.")
    sm.sendSay("#face0#One thing we use that mana for is the #bCrystal Gate#k. That's what we will be learning about today.")
    sm.showFadeTransition(0, 1000, 3000)
    sm.zoomCamera(0, 1000, 0, -183, -1802)
    sm.sendDelay(500)
    sm.removeOverlapScreen(1000)
    sm.sendDelay(1500)
    sm.sendNext("#face0#The Sanctuary in which we live exists within the Crystal Gate.\r\nIt's a type of virtual space created with magic.")
    sm.zoomCamera(2000, 1200, 2000, -700, -2650)
    sm.sendNext("#face0#That is why the sky is perpetually dark and appears crystalline.")
    sm.showFadeTransition(0, 1000, 3000)
    sm.zoomCamera(0, 1000, 0, 50, -70)
    sm.sendDelay(500)
    sm.removeOverlapScreen(1000)
    sm.sendDelay(1500)
    sm.sendNext("#face0#The Crystal Gate hides us from the High Flora and protects us from attack.")
    sm.sendSay("#face0#It is a secret we must carefully hide from the High Flora.")
    sm.sendSay("#face0#Once you know how to create a gate, you'll find them to be very useful. However, making a gate is quite difficult.")
    sm.sendSay("#face0#Split into 2-member teams for this lesson.")
    sm.createQuestWithQRValue(34802, "class1=1;class2=1;class3=1;out=2;exp=1")
    sm.showFadeTransition(0, 1000, 3000)
    sm.sendDelay(300)
    sm.forcedFlip(True)
    sm.moveCamera(True, 0, 0, 0)
    sm.removeOverlapScreen(1000)
    sm.lockInGameUI(False, True)
elif not sm.hasHadQuest(34811):
    sm.startQuest(34811)
    sm.createQuestWithQRValue(34802, "class1=1;class2=1;class3=1;class4=1;class5=1;out=2;exp=1")
    sm.lockInGameUI(True, False)
    sm.showFadeTransition(0, 1000, 3000)
    sm.zoomCamera(500, 1000, 500, 50, -70)
    sm.sendDelay(500)
    sm.sendDelay(500)
    sm.forcedFlip(True)
    sm.removeOverlapScreen(1000)
    sm.spawnNpc(3001310, 520, 31)
    sm.showNpcSpecialActionByTemplateId(3001310, "summon", 0)
    sm.spawnNpc(3001311, 603, -31)
    sm.showNpcSpecialActionByTemplateId(3001311, "summon", 0)
    sm.setSpeakerType(3)
    sm.setParam(37)
    sm.setColor(1)
    sm.setInnerOverrideSpeakerTemplateID(3001304) # Professor Citrine
    sm.sendNext("#face0#Did everyone complete their assignment?")
    sm.sendDelay(1000)
    sm.sendDelay(1000)
    sm.speechBalloon(False, 0, 0, "!", 1000, 1, 0, 0, 0, 4, 3001310, 4600225)
    sm.setInnerOverrideSpeakerTemplateID(3001310) # Morian
    sm.sendNext("#face2#Uh... oops!")
    sm.setInnerOverrideSpeakerTemplateID(3001311) # Sinaria
    sm.sendSay("#face4#Tsk tsk.")
    sm.setInnerOverrideSpeakerTemplateID(3001304) # Professor Citrine
    sm.sendSay("#face0#Those that did not complete the assignment must stay after class.")
    sm.sendSay("#face0#Let's continue where we left off last time with Crystal Gate creation. If we're successful, we'll have a small space we can hide in! Aren't you excited?")
    sm.sendSay("#face0#We'll need to gather a special mytocrystal for the gate today. They're dangerous, so they're stored specially in the classroom.")
    sm.sendSay("#face0#Enter the portal on the right and gather #b20#k #i4036168# #t4036168# items by hunting #o2400403# monsters.")
    sm.setInnerOverrideSpeakerTemplateID(3001310) # Morian
    sm.sendSay("#face0#Let's go!")
    sm.showFadeTransition(0, 1000, 3000)
    sm.zoomCamera(0, 1000, 2147483647, 2147483647, 2147483647)
    sm.moveCamera(True, 0, 0, 0)
    sm.sendDelay(300)
    sm.removeOverlapScreen(1000)
    sm.lockInGameUI(False, True)
elif not sm.hasHadQuest(34813):
    sm.lockInGameUI(True, False)
    sm.removeAdditionalEffect()
    sm.blind(True, 255, 0, 0, 0, 0)
    sm.forcedFlip(True)
    sm.sendDelay(1000)
    sm.zoomCamera(0, 2000, 0, 358, 63)
    sm.spawnNpc(3001301, 500, 63)
    sm.showNpcSpecialActionByTemplateId(3001301, "summon", 0)
    sm.spawnNpc(3001300, 283, 63)
    sm.showNpcSpecialActionByTemplateId(3001300, "summon", 0)
    sm.blind(False, 0, 0, 0, 0, 1000)
    sm.sendDelay(1000)
    sm.setSpeakerType(3)
    sm.setParam(37)
    sm.setColor(1)
    sm.setInnerOverrideSpeakerTemplateID(3001301) # Agate
    sm.sendNext("#face1#Very well done today! I'll see you tomorrow!")
    sm.setInnerOverrideSpeakerTemplateID(3001350) # Illium
    sm.sendSay("#face9#Thanks! Bye!")
    sm.showNpcSpecialActionByTemplateId(3001301, "disappear", 0)
    sm.sendDelay(750)
    sm.spawnNpc(3001310, -142, 63)
    sm.showNpcSpecialActionByTemplateId(3001310, "summon", 0)
    sm.moveNpcByTemplateId(3001310, False, 300, 150)
    sm.sendDelay(2000)
    sm.setInnerOverrideSpeakerTemplateID(3001310) # Morian
    sm.sendNext("#face0#Illium!")
    sm.sendDelay(1000)
    sm.forcedFlip(True)
    sm.setInnerOverrideSpeakerTemplateID(3001350) # Illium
    sm.sendNext("#face0#Hey, Morian! What are you still doing here?")
    sm.setInnerOverrideSpeakerTemplateID(3001310) # Morian
    sm.sendSay("#face0#I just finished my private tutoring session. How was your training?")
    sm.setInnerOverrideSpeakerTemplateID(3001350) # Illium
    sm.sendSay("#face9#Better than usual! Thanks to Agate, I've improved a lot. It's amazing!")
    sm.setInnerOverrideSpeakerTemplateID(3001310) # Morian
    sm.sendSay("#face0#Yeah, no offense, but you weren't exactly a mytocrystal expert when you started.")
    sm.setInnerOverrideSpeakerTemplateID(3001350) # Illium
    sm.sendSay("#face0#Ha ha, yeah. You've been really helpful too.")
    sm.setInnerOverrideSpeakerTemplateID(3001310) # Morian
    sm.sendSay("#face0#No problem! But, hey, I'm hungry! Want to grab a bite to eat?")
    sm.setInnerOverrideSpeakerTemplateID(3001350) # Illium
    sm.sendSay("#face0#I'd better not. I want to get a head start on my statue for the Festival of the Gods.")
    sm.setInnerOverrideSpeakerTemplateID(3001310) # Morian
    sm.sendSay("#face0#Ah, good idea! I'll leave you to it then. Bye!")
    sm.setInnerOverrideSpeakerTemplateID(3001350) # Illium
    sm.sendSay("#face0#See you!")
    sm.moveNpcByTemplateId(3001310, True, 350, 150)
    sm.sendDelay(2000)
    sm.sendDelay(1000)
    sm.sendNext("#face0#Hey, Ex? I think I should get started on my statue today. Want to point me in the direction of the lab?")
    sm.setInnerOverrideSpeakerTemplateID(3001300) # Ex
    sm.sendSay("#face0#Certainly, Sir.")
    sm.showFadeTransition(0, 1000, 3000)
    sm.createQuestWithQRValue(34813, "d=1;m=0;item2=1;exp=1;d2=1")
    sm.moveCamera(True, 0, 0, 0)
    sm.removeOverlapScreen(1000)
    sm.lockInGameUI(False, True)
