# id 402000615 (null), field 402000615
sm.setMapTaggedObjectVisible("core0", False, 0, 0)
sm.setMapTaggedObjectVisible("core1", False, 0, 0)
if not sm.hasHadQuest(34901):
    sm.changeBGM("Bgm28.img/helisiumWarcry", 0, 0)
    sm.showNpcSpecialActionByTemplateId(3001509, "summon", 0)
    sm.showNpcSpecialActionByTemplateId(3001510, "summon", 0)
    sm.showNpcSpecialActionByTemplateId(3001512, "summon", 0)
    sm.showNpcSpecialActionByTemplateId(3001513, "summon", 0)
    sm.showNpcSpecialActionByTemplateId(3001516, "summon", 0)
    sm.showNpcSpecialActionByTemplateId(3001515, "summon", 0)
    sm.showNpcSpecialActionByTemplateId(3001521, "summon", 0)
    sm.showNpcSpecialActionByTemplateId(3001522, "summon", 0)
    sm.showNpcSpecialActionByTemplateId(3001514, "summon", 0)
    sm.showNpcSpecialActionByTemplateId(3001520, "summon", 0)
    sm.showNpcSpecialActionByTemplateId(3001519, "summon", 0)
    sm.showNpcSpecialActionByTemplateId(3001517, "summon", 0)
    sm.showNpcSpecialActionByTemplateId(3001518, "summon", 0)
    sm.lockInGameUI(True, False)
    sm.removeAdditionalEffect()
    sm.zoomCamera(0, 3000, 0, 200, -130)
    sm.sendDelay(500)
    sm.sendDelay(500)
    sm.speechBalloon(True, 0, 0, "Our refuge isn't safe anymore.", 1000, 0, 0, 0, 0, 4, 3001517, 102647)
    sm.sendDelay(1100)
    sm.speechBalloon(True, 0, 0, "I'm so scared.", 1000, 0, 0, 0, 0, 4, 3001518, 102647)
    sm.zoomCamera(3000, 2000, 3000, 440, 150)
    sm.sendDelay(3500)
    sm.setSpeakerType(3)
    sm.setParam(37)
    sm.setColor(1)
    sm.setInnerOverrideSpeakerTemplateID(3001508) # Zippy
    sm.sendNext("#face2#It's okay. It might be tough, but we can rebuild our home if we have to. At least we're all safe. That's what matters.")
    sm.setInnerOverrideSpeakerTemplateID(3001510) # Ferret
    sm.sendSay("#face2#I'm detecting monster signals everywhere. We need to be ready to move.")
    sm.setInnerOverrideSpeakerTemplateID(3001508) # Zippy
    sm.sendSay("#face2#So, Ark, was it? What do you plan to do?")
    sm.zoomCamera(3000, 2000, 3000, 150, 150)
    sm.sendDelay(1000)
    sm.setInnerOverrideSpeakerTemplateID(3001500) # Ark
    sm.sendNext("#face0#Don't worry, I won't bother you. Wouldn't want you to take me prisoner again... Thanks for letting me go, by the way.")
    sm.sendDelay(2000)
    sm.setInnerOverrideSpeakerTemplateID(3001508) # Zippy
    sm.sendNext("#face2#Oh, that's not what I meant. I don't think you'll hurt us. I just think we'd be safer if we all stick together.")
    sm.setInnerOverrideSpeakerTemplateID(3001510) # Ferret
    sm.sendSay("#face0#It's up to you. But since you're not an enemy, we've got no problem with you staying.")
    sm.blind(True, 150, 0, 0, 0, 3000)
    sm.sendDelay(500)
    sm.setInnerOverrideSpeakerTemplateID(3001509) # Salvo
    sm.sendNext("#face3#Won't get eaten by monsters! No! No! No!\r\nCause we're gonna stop talking! Go! Go! Go!")
    sm.setInnerOverrideSpeakerTemplateID(3001512) # Digs
    sm.sendSay("#face0#He's right. We don't have time to chat. Let's do a headcount. Zippy, Salvo, Ferret, myself, Digs, and Grit... One, two, three, four...")
    sm.setInnerOverrideSpeakerTemplateID(3001513) # Grit
    sm.sendSay("#face0#Bull, Slink, all the kids... Wait a minute. Are we missing a kid?!")
    sm.sendDelay(1100)
    sm.setInnerOverrideSpeakerTemplateID(3001500) # Ark
    sm.sendNext("#face0#(Hm, they seem nice enough. And they don't think I'm a monster anymore. Maybe traveling with them wouldn't be such a bad idea.)")
    sm.sendSay("#face0#(At least for a little while. Once I get more information and figure out who I am... Ark... I can move on.)")
    sm.sendDelay(300)
    sm.blind(False, 0, 0, 0, 0, 300)
    sm.sendDelay(300)
    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.zoomCamera(0, 2000, 0, 410, 150)
    sm.setInnerOverrideSpeakerTemplateID(3001508) # Zippy
    sm.sendNext("#face3# Mar?!")
    sm.zoomCamera(500, 3000, 500, 410, 150)
    sm.sendNext("#face1#Mar is missing! Oh no. He always takes a nap in the refuge this time of day! He must still be there!")
    sm.blind(False, 0, 0, 0, 0, 500)
    sm.sendDelay(500)
    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.zoomCamera(0, 2000, 0, 150, 150)
    sm.blind(True, 150, 0, 0, 0, 2000)
    sm.sendDelay(500)
    sm.setInnerOverrideSpeakerTemplateID(3001500) # Ark
    sm.sendNext("#face5#(The caravan is distraught over leaving someone behind, but the monsters are closing in fast. They need to get out of here.)")
    sm.sendSay("#face5#...")
    sm.sendSay("#face5#(If I send the others on and go after the kid myself, they might all make it.)")
    sm.sendDelay(300)
    sm.blind(False, 0, 0, 0, 0, 300)
    sm.zoomCamera(3000, 2000, 3000, 380, 150)
    sm.setInnerOverrideSpeakerTemplateID(3001508) # Zippy
    sm.sendNext("#face3#We can't leave Mar behind, but there are so many monsters! What do we do?")
    sm.forcedMove(False, 270)
    sm.sendDelay(3000)
    sm.setInnerOverrideSpeakerTemplateID(3001500) # Ark
    sm.sendNext("#face0#You all need to hide now. I'll get Mar. Where will I find him?")
    sm.sendDelay(1000)
    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.moveCamera(True, 0, 0, 0)
    sm.lockInGameUI(False, True)
    sm.closeUI(1207)
    sm.closeUI(1208)
elif not sm.hasHadQuest(34928):
    sm.lockInGameUI(True, False)
    sm.zoomCamera(0, 1000, 0, 267, 60)
    sm.spawnNpc(3001510, 280, 95)
    sm.showNpcSpecialActionByTemplateId(3001510, "summon", 0)
    sm.setSpeakerType(3)
    sm.setParam(37)
    sm.setColor(1)
    sm.setInnerOverrideSpeakerTemplateID(3001510) # Ferret
    sm.sendNext("#face0#I'm picking up a signal somewhere near here.")
    sm.sendDelay(1000)
    sm.zoomCamera(3000, 2000, 3000, 765, 150)
    sm.moveNpcByTemplateId(3001510, False, 600, 100)
    sm.sendDelay(1000)
    sm.forcedMove(False, 520)
    sm.sendDelay(2000)
    sm.sendNext("#face4#This way, I think. Just below here.")
    sm.zoomCamera(2000, 2000, 2000, 765, -10)
    sm.sendDelay(2000)
    sm.setInnerOverrideSpeakerTemplateID(3001500) # Ark
    sm.sendNext("#face3#(There's something nagging at the back of my mind, but I can't put my finger on what.)")
    sm.zoomCamera(500, 2000, 500, 765, 150)
    sm.flipNpcByTemplateId(3001510, True)
    sm.setInnerOverrideSpeakerTemplateID(3001510) # Ferret
    sm.sendNext("#face0#Right here, Ark.")
    sm.sendDelay(1000)
    sm.sendDelay(1000)
    sm.showEffect("Effect/Direction17.img/effect/ark/sand/wind", 0, -100, 0, 0, 864975, 0, 0)
    sm.sendDelay(300)
    sm.showEffect("Effect/Direction17.img/effect/ark/sand/wind", 0, -100, 0, 0, 864975, 0, 0)
    sm.showEffect("Effect/Direction17.img/effect/ark/sand/wind", 0, -100, 0, 0, 864975, 0, 0)
    sm.sendDelay(500)
    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.moveCamera(True, 0, 0, 0)
    sm.lockInGameUI(False, True)
    sm.createQuestWithQRValue(34928, "e1=1")
    sm.createQuestWithQRValue(34995, "00=h1;01=h1;10=h0;02=h1;11=h0;12=h0;04=h0;13=h0;05=h0;14=h0;23=h0;06=h0;15=h0;24=h0;07=h1;16=h0;17=h0;09=h0")
    sm.setMapTaggedObjectVisible("core0", True, 0, 0)
    sm.setMapTaggedObjectVisible("core1", True, 0, 0)
