# id 867202910 (Abrup Basin : Grim Vale Canyon End), field 867202910
sm.lockInGameUI(True, False)
sm.spawnNpc(9400596, -1108, 450)
sm.showNpcSpecialActionByTemplateId(9400596, "summon", 0)
sm.flipNpcByTemplateId(9400596, False)
sm.spawnNpc(9400599, -1014, 450)
sm.showNpcSpecialActionByTemplateId(9400599, "summon", 0)
sm.flipNpcByTemplateId(9400599, False)
sm.spawnNpc(9400682, -940, 450)
sm.showNpcSpecialActionByTemplateId(9400682, "summon", 0)
sm.spawnNpc(9400682, -850, 450)
sm.showNpcSpecialActionByTemplateId(9400682, "summon", 0)
sm.spawnNpc(9400585, -750, 450)
sm.showNpcSpecialActionByTemplateId(9400585, "summon", 0)
sm.flipNpcByTemplateId(9400585, True)
sm.spawnNpc(9400590, -670, 450)
sm.showNpcSpecialActionByTemplateId(9400590, "summon", 0)
sm.flipNpcByTemplateId(9400590, True)
sm.spawnNpc(9400683, -640, 450)
sm.showNpcSpecialActionByTemplateId(9400683, "summon", 0)
sm.spawnNpc(9400682, -545, 450)
sm.showNpcSpecialActionByTemplateId(9400682, "summon", 0)
sm.spawnNpc(9400603, -470, 450)
sm.showNpcSpecialActionByTemplateId(9400603, "summon", 0)
sm.flipNpcByTemplateId(9400603, True)
sm.spawnNpc(9400585, -390, 450)
sm.showNpcSpecialActionByTemplateId(9400585, "summon", 0)
sm.flipNpcByTemplateId(9400585, False)
sm.spawnNpc(9400682, -294, 450)
sm.showNpcSpecialActionByTemplateId(9400682, "summon", 0)
sm.spawnNpc(9400682, -230, 450)
sm.showNpcSpecialActionByTemplateId(9400682, "summon", 0)
sm.spawnNpc(9400683, -75, 450)
sm.showNpcSpecialActionByTemplateId(9400683, "summon", 0)
sm.spawnNpc(9400581, -110, 450)
sm.showNpcSpecialActionByTemplateId(9400581, "summon", 0)
sm.flipNpcByTemplateId(9400581, True)
sm.spawnNpc(9400684, 0, 450)
sm.showNpcSpecialActionByTemplateId(9400684, "summon", 0)
sm.flipNpcByTemplateId(9400684, False)
sm.spawnNpc(9400682, 85, 450)
sm.showNpcSpecialActionByTemplateId(9400682, "summon", 0)
sm.spawnNpc(9400681, 850, 450)
sm.showNpcSpecialActionByTemplateId(9400681, "summon", 0)
sm.flipNpcByTemplateId(9400681, True)
sm.showNpcSpecialActionByTemplateId(9400596, "attack1", -1)
sm.showNpcSpecialActionByTemplateId(9400599, "attack1", -1)
sm.showNpcSpecialActionByTemplateId(9400585, "attack1", -1)
sm.showNpcSpecialActionByTemplateId(9400590, "attack1", -1)
sm.showNpcSpecialActionByTemplateId(9400603, "attack1", -1)
sm.showNpcSpecialActionByTemplateId(9400585, "attack1", -1)
sm.showNpcSpecialActionByTemplateId(9400581, "attack1", -1)
sm.showNpcSpecialActionByTemplateId(9400684, "attack1", -1)
sm.playSound("Sound/Mob.img/9402279/Die", 100)
sm.showNpcSpecialActionByTemplateId(9400681, "special1", -1)
sm.sendDelay(3000)
sm.setSpeakerType(3)
sm.setParam(56)
sm.setColor(1)
sm.sendNext("#bWe... we won!")
sm.sendDelay(500)
sm.resetNpcSpecialActionByTemplateId(9400681)
sm.showNpcSpecialActionByTemplateId(9400681, "special2", -1)
sm.sendDelay(500)
sm.setParam(37)
sm.setInnerOverrideSpeakerTemplateID(9400603) # Guard
sm.sendNext("We've defeated the monster!")
sm.sendDelay(500)
sm.showNpcSpecialActionByTemplateId(9400682, "die", -1)
sm.playSound("Sound/Mob.img/9402290/Die", 100)
sm.sendDelay(150)
sm.showNpcSpecialActionByTemplateId(9400683, "die", -1)
sm.playSound("Sound/Mob.img/9402290/Die", 100)
sm.sendDelay(110)
sm.showNpcSpecialActionByTemplateId(9400682, "die", -1)
sm.playSound("Sound/Mob.img/9402290/Die", 100)
sm.sendDelay(90)
sm.showNpcSpecialActionByTemplateId(9400682, "die", -1)
sm.playSound("Sound/Mob.img/9402290/Die", 100)
sm.sendDelay(150)
sm.showNpcSpecialActionByTemplateId(9400682, "die", -1)
sm.playSound("Sound/Mob.img/9402290/Die", 100)
sm.sendDelay(120)
sm.showNpcSpecialActionByTemplateId(9400683, "die", -1)
sm.playSound("Sound/Mob.img/9402290/Die", 100)
sm.sendDelay(100)
sm.showNpcSpecialActionByTemplateId(9400682, "die", -1)
sm.playSound("Sound/Mob.img/9402290/Die", 100)
sm.sendDelay(150)
sm.showNpcSpecialActionByTemplateId(9400682, "die", -1)
sm.playSound("Sound/Mob.img/9402290/Die", 100)
sm.sendDelay(200)
sm.resetNpcSpecialActionByTemplateId(9400596)
sm.resetNpcSpecialActionByTemplateId(9400599)
sm.resetNpcSpecialActionByTemplateId(9400585)
sm.resetNpcSpecialActionByTemplateId(9400590)
sm.resetNpcSpecialActionByTemplateId(9400603)
sm.resetNpcSpecialActionByTemplateId(9400585)
sm.resetNpcSpecialActionByTemplateId(9400581)
sm.resetNpcSpecialActionByTemplateId(9400684)
sm.sendDelay(1000)
sm.flipNpcByTemplateId(9400590, False)
sm.sendDelay(150)
sm.sendDelay(110)
sm.sendDelay(90)
sm.sendDelay(150)
sm.sendDelay(120)
sm.sendDelay(100)
sm.sendDelay(150)
sm.sendDelay(200)
sm.flipNpcByTemplateId(9400585, False)
sm.flipNpcByTemplateId(9400603, False)
sm.flipNpcByTemplateId(9400581, False)
sm.sendDelay(500)
sm.sendDelay(500)
sm.sendDelay(1500)
sm.speechBalloon(False, 0, 0, "#fs15##eIt's over! Finally!", 2000, 0, 0, 0, 0, 4, 9400585, 4878499)
sm.moveNpcByTemplateId(9400590, False, 400, 300)
sm.sendDelay(500)
sm.blind(True, 255, 0, 0, 0, 500)
sm.sendDelay(500)
sm.sendNext("We've defeated the monster!")
sm.playSound("Sound/PL_MONAD.img/EP1/ACT3/battlecry2", 128)
sm.spawnNpc(9400587, 60, 430)
sm.showNpcSpecialActionByTemplateId(9400587, "summon", 0)
sm.forcedFlip(True)
sm.moveNpcByTemplateId(9400684, True, 20, 100)
sm.speechBalloon(False, 0, 0, "#fs15##eWe won!", 2000, 0, 0, 0, 0, 4, 9400596, 4878499)
sm.speechBalloon(False, 0, 0, "#fs15##eWe made it! We made it!", 2000, 0, 0, 0, 0, 4, 9400599, 4878499)
sm.blind(True, 255, 0, 0, 0, 0)
sm.sendDelay(1200)
sm.blind(False, 0, 0, 0, 0, 1000)
sm.sendDelay(1400)
sm.sendDelay(2000)
sm.setInnerOverrideSpeakerTemplateID(9400587) # Kan
sm.sendNext("#face0#We'll finally be able to go home...")
sm.setInnerOverrideSpeakerTemplateID(9400581) # Butler
sm.sendSay("#face0#Ha! We've done it! Mission complete, and with no need of reinforcements.")
sm.setParam(56)
sm.sendSay("#bI just hope this really is the end of it. ")
sm.setParam(37)
sm.setInnerOverrideSpeakerTemplateID(9400590) # Slaka
sm.sendSay("#face0#Don't jinx it! Oh, man! It's really over!")
sm.sendDelay(500)
sm.flipNpcByTemplateId(9400590, True)
sm.sendDelay(250)
sm.moveNpcByTemplateId(9400590, True, 500, 200)
sm.sendDelay(1000)
sm.sendNext("#face0#We have to spread the good news, ha ha ha!")
sm.sendDelay(5000)
sm.showEffect("Effect/OnUserEff.img/emotionBalloon/exclamation", 2000, 0, 0, 0, 35473677, 0, 0)
sm.sendDelay(3000)
sm.setParam(56)
sm.sendNext("#b...?")
sm.moveNpcByTemplateId(9400684, False, 300, 100)
sm.sendDelay(2000)
sm.sendDelay(2000)
sm.flipNpcByTemplateId(9400587, False)
sm.forcedFlip(True)
sm.startQuest(64168)
sm.showNpcSpecialActionByTemplateId(9400684, "special2", 0)
sm.sendDelay(1000)
sm.resetNpcSpecialActionByTemplateId(9400684)
sm.sendDelay(500)
sm.setParam(37)
sm.setInnerOverrideSpeakerTemplateID(9400602) # Einar
sm.sendNext("#face0#Th-this...?")
sm.moveNpcByTemplateId(9400684, False, 30, 70)
sm.sendDelay(1000)
sm.moveNpcByTemplateId(9400684, False, 20, 70)
sm.sendDelay(1000)
sm.sendNext("#face0#This... this...")
sm.moveNpcByTemplateId(9400684, False, 50, 70)
sm.sendDelay(2000)
sm.setInnerOverrideSpeakerTemplateID(9400581) # Butler
sm.sendNext("#face0#What's... inside this thing?")
sm.sendSay("#face0#...A girl?!")
sm.moveNpcByTemplateId(9400585, False, 400, 100)
sm.moveNpcByTemplateId(9400603, False, 390, 100)
sm.forcedMove(False, 50)
sm.sendDelay(250)
sm.moveNpcByTemplateId(9400581, False, 200, 90)
sm.sendDelay(500)
sm.moveNpcByTemplateId(9400684, False, 20, 70)
sm.sendDelay(250)
sm.setInnerOverrideSpeakerTemplateID(9400602) # Einar
sm.sendNext("#face0#...Ju-Julieta?")
sm.sendSay("#face0#Wha... wha...")
sm.sendDelay(1000)
sm.sendNext("#face0#What... are you doing here?")
sm.sendSay("#face1#Huh?! Julieta! Say something!")
sm.sendDelay(250)
sm.flipNpcByTemplateId(9400684, True)
sm.sendDelay(250)
sm.sendNext("#face1##h0#... this... this...?")
sm.sendSay("#face1#This is... my sister...")
sm.sendDelay(250)
sm.flipNpcByTemplateId(9400684, False)
sm.sendDelay(250)
sm.sendNext("#face1#This is my sister!! Why is she here?!")
sm.showNpcSpecialActionByTemplateId(9400684, "special3", -1)
sm.sendDelay(1000)
sm.spawnNpc(9400580, -450, 400)
sm.showNpcSpecialActionByTemplateId(9400580, "summon", 0)
sm.flipNpcByTemplateId(9400580, False)
sm.spawnNpc(9400582, -510, 400)
sm.showNpcSpecialActionByTemplateId(9400582, "summon", 0)
sm.flipNpcByTemplateId(9400582, False)
sm.spawnNpc(9400599, -580, 400)
sm.showNpcSpecialActionByTemplateId(9400599, "summon", 0)
sm.flipNpcByTemplateId(9400599, False)
sm.spawnNpc(9400604, -650, 400)
sm.showNpcSpecialActionByTemplateId(9400604, "summon", 0)
sm.flipNpcByTemplateId(9400604, False)
sm.moveNpcByTemplateId(9400580, False, 330, 100)
sm.moveNpcByTemplateId(9400582, False, 330, 100)
sm.moveNpcByTemplateId(9400599, False, 350, 100)
sm.moveNpcByTemplateId(9400604, False, 350, 100)
sm.sendDelay(1000)
sm.setInnerOverrideSpeakerTemplateID(9400580) # Alika
sm.sendNext("#face1##h0#! The monster is finally...")
sm.sendDelay(1000)
sm.speechBalloon(False, 0, 0, "#fs15##eBa ha ha! Finally!", 2000, 0, 0, 0, 0, 4, 9400604, 4878499)
sm.setParam(56)
sm.sendNext("#b...")
sm.speechBalloon(False, 0, 0, "#fs15##eGood job!", 2000, 0, 0, 0, 0, 4, 9400599, 4878499)
sm.sendDelay(1500)
sm.sendDelay(500)
sm.speechBalloon(False, 0, 0, "#fs15##e!!!", 2000, 0, 0, 0, 0, 4, 9400580, 4878499)
sm.setParam(37)
sm.sendNext("#face4#T-that child...?")
sm.resetNpcSpecialActionByTemplateId(9400681)
sm.showNpcSpecialActionByTemplateId(9400681, "special3", 0)
sm.sendDelay(3000)
sm.resetNpcSpecialActionByTemplateId(9400684)
sm.moveNpcByTemplateId(9400684, False, 100, 200)
sm.sendDelay(3000)
sm.showNpcSpecialActionByTemplateId(9400684, "special4", 0)
sm.sendDelay(500)
sm.setInnerOverrideSpeakerTemplateID(9400602) # Einar
sm.sendNext("#face1#Ju... Julieta!")
sm.sendSay("#face1#Please... open your eyes... please... just...")
sm.sendSay("#face1#I'm sorry... I should have listened to you... I'm sorry...")
sm.sendSay("#face1#I promise I'll be better, Julieta... please, don't leave me...")
sm.resetNpcSpecialActionByTemplateId(9400684)
sm.showNpcSpecialActionByTemplateId(9400684, "special5", 0)
sm.sendSay("#face1#No! NO!!")
sm.sendSay("#face1#Please! No no no NO!!")
sm.sendSay("#face1##h0#, please! Can you stop this?! Alika, please! Get Janyt! SOMEBODY!!")
sm.sendSay("#face1#No! NO!!")
sm.sendDelay(500)
sm.resetNpcSpecialActionByTemplateId(9400684)
sm.showNpcSpecialActionByTemplateId(9400684, "special3", -1)
sm.sendDelay(1000)
sm.setParam(56)
sm.sendNext("#b(What is going on?)")
sm.sendSay("#b(I thought this monster was some great, evil beast...)")
sm.sendSay("#b(But it was really a defenseless little girl?)")
sm.setParam(37)
sm.sendSay("#face1#Julieta... Sob... Sob... It's my fault... I... I...")
sm.moveNpcByTemplateId(9400582, False, 100, 50)
sm.sendDelay(300)
sm.flipNpcByTemplateId(9400582, True)
sm.sendDelay(5000)
sm.speechBalloon(True, 0, 0, "Just... Let him mourn.", 2000, 0, 0, 0, 0, 4, 9400580, 4878499)
sm.flipNpcByTemplateId(9400582, False)
sm.moveNpcByTemplateId(9400582, False, 300, 50)
sm.setInnerOverrideSpeakerTemplateID(9400582) # Cayne
sm.sendNext("#face2#Einar...")
sm.setInnerOverrideSpeakerTemplateID(9400602) # Einar
sm.sendSay("#face1#...")
sm.sendSay("#face1#...What have I done?")
sm.setInnerOverrideSpeakerTemplateID(9400582) # Cayne
sm.sendSay("#face2#Einar...")
sm.setInnerOverrideSpeakerTemplateID(9400602) # Einar
sm.sendSay("#face3#Julieta... She must have suffered so much...")
sm.sendSay("#face3#She must have been waiting for me to save her...")
sm.sendSay("#face3#How much pain must she have been in...")
sm.setParam(56)
sm.sendSay("#b...")
sm.setParam(37)
sm.sendSay("#face3#Why didn't I... do anything until now...")
sm.sendSay("#face3#No... if I had just...")
sm.sendSay("#face3#If only... ")
sm.moveNpcByTemplateId(9400582, False, 100, 50)
sm.setInnerOverrideSpeakerTemplateID(9400582) # Cayne
sm.sendSay("#face2#Einar! Look at me!")
sm.sendSay("#face2#You didn't do anything wrong! ")
sm.sendSay("#face2#Your sister's disappearance, what happened today... none of it is your fault.")
sm.setInnerOverrideSpeakerTemplateID(9400602) # Einar
sm.sendSay("#face1#Julieta... Julieta...")
sm.setInnerOverrideSpeakerTemplateID(9400581) # Butler
sm.sendSay("#face2#Take Einar back to town. I'll finish up here and get the wounded taken care of.")
sm.setParam(56)
sm.sendSay("#bGot it.")
sm.setParam(37)
sm.setInnerOverrideSpeakerTemplateID(9400580) # Alika
sm.sendSay("#face5#Julieta...")
sm.completeQuestNoCheck(64142)
sm.lockInGameUI(False, True)
sm.warp(867202315)
