Code:
#include(pwlib/pwlib.hlsl)
[pw_usepwlogo]
[game]
jumptoscript("setup");
[setup]
definekey("key_lclick",<null()>);
runscript("pw_initpwlib");
runscript("pw_initpwbgs");
runscript("charcreation");
runscript("load");
runscript("evidenceprofilecreation");
setvar([pw_titlescript],"titlepage");
setvar([pw_episodepath],"episode/");
setvar([pw_episodes],1);
runscript([pw_titlescript]);
[titlepage]
changetitle("PWLib: Case Selection");
setbg(70010);
runscript("pw_showmain");
waitresponse();
runscript("pw_hidemain");
setbgsize(0,0);
jumptoscript("casemenu");
[casemenu]
runscript("pw_caseselect");
waitresponse();
[begin_case1]
runscript("casestart");
[load]
loadtexture(80900,"PW/evidence/gun.png");
loadtexture(80901,"PW/evidence/lawyer badge.png");
loadtexture(80902,"PW/evidence/photo.png");
loadtexture(90900,"PW/profile/ema.png");
loadtexture(90901,"PW/profile/minuki.png");
loadtexture(70000,"PW/ElisePhoto.png");
loadtexture(70010,"PW/misc/pwdefaulttitle.png");
loadtexture(91000,"choices/choiceblank.png");
loadtexture(91010,"choices/choiceblank.png");
loadtexture(91020,"choices/choicewright.png");
loadtexture(91030,"choices/choiceblank.png");
[charcreation]
runscript("pw_createema");
runscript("pw_createtrucy");
[evidenceprofilecreation]
setvar([evidencenumber],900);
setvar([evidencegfs],80901);
setvar([evidencegfl],80901);
setvar([evidencesup],0);
setvar([evidencename],"Attorney's Badge");
setvar([evidencesdesc],"Type: Other\n One of my possessions.");
setvar([evidenceldesc],"It's my all important badge.\nIt shows that I'm a defense attorney.");
runscript("createevidence");
setvar([evidencenumber],901);
setvar([evidencegfs],80900);
setvar([evidencegfl],80900);
setvar([evidencesup],0);
setvar([evidencename],"Gun");
setvar([evidencesdesc],"Type: Weapons\n Submitted as evidence\n by Prosecutor Von Karma.");
setvar([evidenceldesc],"The murder weapon.\nIt was shot once.");
runscript("createevidence");
setvar([evidencenumber],902);
setvar([evidencegfs],80902);
setvar([evidencegfl],80902);
setvar([evidencesup],1);
setvar([evidencename],"Trucy GS4 Promo");
setvar([evidencesdesc],"Type: Photo\nReceived from Trucy \nWright.");
setvar([evidenceldesc],"A promo photo of Gyakuten Saiban \n4.");
runscript("createevidence");
setvar([evidencestex],70000);
runscript("setevidencepagesimple");
setvar([profilenumber],800);
setvar([profilegfs],90900);
setvar([profilegfl],90900);
setvar([profilename],"Ema Skye");
setvar([profilesdesc],"Age: 19\nGender: Female");
setvar([profileldesc],"An energetic girl that wants to be a \nforensic detective.");
runscript("createprofile");
setvar([profilenumber],801);
setvar([profilegfs],90901);
setvar([profilegfl],90901);
setvar([profilename],"Trucy Wright");
setvar([profilesdesc],"Age: 15\nGender: Female");
setvar([profileldesc],"A cheerful magician girl.");
runscript("createprofile");
[casestart]
setvar([evidencenumber],900);
runscript("addevidence");
setvar([evidencenumber],901);
runscript("addevidence");
setvar([profilenumber],800);
runscript("addprofile");
setvar([profilenumber],801);
runscript("addprofile");
jumptoscript("enterscene1");
[enterscene1]
runscript("pw_enablequicksaveload");
runscript("pw_usepwbgcourthall");
runscript("pw_showadvarrowmenu");
loadandplaymp3("music/03 Phoenix Wright JFA - Courtroom Lounge ~ Another Overture.mp3",0,"N");
jumptoscript("scene1");
[scene1]
runscript("setlipsynctochar");
runscript("showpwchar");
runscript("pw_showmessagebox");
runscript("pw_enableemanormal");
runscript("pw_setnameboxtoema");
messageauto("Oh,");
wait(10);
messageappend(" Hello.");
message("My name is Ema Skye!");
runscript("pw_setnameboxtotrucy");
runscript("pw_enabletrucynormal");
message("My name is Trucy.");
message("I'm a magician.");
setvar([pw_evidtoshowinbox],80902);
runscript("pw_showflyingevidboxright");
message("This photo proves it.");
runscript("pw_hideflyingevidboxright");
setvar([evidencenumber],902);
runscript("addevidence");
setvar([evidencenumber],902);
setvar([pw_headeviaddmsg],"");
setvar([pw_taileviaddmsg]," was added\nto the Court Record.");
runscript("pw_startevidenceadd");
runscript("setlipsynctochar");
runscript("pw_setnameboxtoema");
runscript("pw_enableemahappy");
messageauto("That's cool,");
wait(25);
runscript("pw_enableemaexcited");
messageappend(" but scientifically \nspeaking...");
message("Magic doesn't exist.");
runscript("pw_setnameboxtotrucy");
runscript("pw_enabletrucythinking");
messageauto("Scientifically speaking...?");
wait(10);
messageappend("\nHmmm...");
message("But does magic need to be \nproven?");
runscript("setlipsynctonoone");
runscript("pw_setnameboxtophoenix");
runscript("pw_bluemessagebox");
message("(I better not try to argue \nin this one.)");
runscript("setlipsynctochar");
runscript("pw_enableemaunsure");
runscript("pw_setnameboxtoema");
runscript("pw_whitemessagebox");
message("What do you think, Mr. Wright?");
runscript("setlipsynctonoone");
runscript("pw_setnameboxtophoenix");
message("Ah?");
message("Well...");
message("Ah...");
jumptoscript("presenttrucyevidence");
[presenttrucyevidence]
definevar([signal],"int");
runscript("pw_setnameboxtonoone");
runscript("pw_greenmessagebox");
messageauto("(Show what proves that Trucy is \na magician!)");
runscript("pw_showselectananswer");
runscript("pw_forcepresent");
waitsignal("advance",[signal]);
runscript("pw_hidemessagebox");
runscript("pw_hideselectananswer");
loadandplaysfx("01_Phoenix - takethat.wav",0);
runscript("pw_raisetakethat"); wait(6);
if(<compare([currentitemcode],"equal",902)>,<jumptoscript("presenttrucyevidencecorrect")>,<jumptoscript("presenttrucyevidencewrong")>);
[presenttrucyevidencecorrect]
runscript("pw_showmessagebox");
runscript("pw_setnameboxtophoenix");
runscript("pw_whitemessagebox");
message("What about this?");
runscript("setlipsynctochar");
runscript("pw_setnameboxtoema");
runscript("pw_enableemanormal");
message("You may be right...");
message("But who gave you this?");
jumptoscript("presenttrucyprofile");
[presenttrucyevidencewrong]
runscript("pw_showmessagebox");
runscript("pw_setnameboxtophoenix");
runscript("pw_whitemessagebox");
message("What about this?");
runscript("setlipsynctochar");
runscript("pw_setnameboxtoema");
runscript("pw_enableemanormal");
message("What is this supposed to mean \nanyway?");
jumptoscript("scene1");
[presenttrucyprofile]
definevar([signal],"int");
runscript("pw_setnameboxtonoone");
runscript("setlipsynctonoone");
runscript("pw_greenmessagebox");
messageauto("(Show who gave you this \nphoto!)");
runscript("pw_showselectananswer");
setvar([pwonetypepresent],2);
runscript("pw_forcepresent");
waitsignal("advance",[signal]);
runscript("pw_hidemessagebox");
runscript("pw_hideselectananswer");
loadandplaysfx("01_Phoenix - takethat.wav",0);
runscript("pw_raisetakethat");
wait(6);
if(<compare([currentitemcode],"equal",801)>,<jumptoscript("presenttrucyprofilecorrect")>,<jumptoscript("presenttrucyprofilewrong")>);
[presenttrucyprofilecorrect]
runscript("pw_showmessagebox");
runscript("pw_setnameboxtophoenix");
runscript("pw_whitemessagebox");
message("What about this?");
runscript("setlipsynctochar");
runscript("pw_setnameboxtoema");
runscript("pw_enableemanormal");
runscript("setlipsynctochar");
messageauto("Hmmm,");
messageappend(" that is interesting...");
jumptoscript("simpleexamine");
[presenttrucyprofilewrong]
runscript("pw_showmessagebox");
runscript("pw_setnameboxtophoenix");
runscript("pw_whitemessagebox");
message("What about this?");
runscript("setlipsynctochar");
runscript("pw_setnameboxtoema");
runscript("pw_enableemanormal");
runscript("setlipsynctochar");
message("I'm not sure about this, you \nknow...!");
jumptoscript("scene1");
[simpleexamine]
runscript("pw_showmessagebox");
setbuttonarea("pw_examinearea1",178,212,57,42);
setvar([pw_examinemaxplaces],1);
runscript("pw_showtouchananswer");
messageauto("So,");
wait(10);
messageappendauto(" what is wrong in this place?");
runscript("hidepwmenu");
runscript("pw_showspecialexamine");
runscript("pw_waitexaminetouch");
runscript("hidepwmenu");
runscript("pw_showadvarrowmenu");
runscript("pw_hidetouchananswer");
if(<compare([pw_examinearea],"equal",1)>,<jumptoscript("simpleexaminecorrect")>,<jumptoscript("simpleexaminewrong")>);
[simpleexaminecorrect]
runscript("pw_showmessagebox");
runscript("setlipsynctonoone");
runscript("pw_setnameboxtophoenix");
message("Here!");
runscript("setlipsynctochar");
runscript("pw_setnameboxtoema");
runscript("pw_enableemanormal");
runscript("setlipsynctochar");
message("Hmm, yeah, it looks \ninteresting...!");
jumptoscript("questionexample");
[simpleexaminewrong]
runscript("pw_showmessagebox");
runscript("setlipsynctonoone");
runscript("pw_setnameboxtophoenix");
messageauto("This is what proves...");
messageappend(" er...");
runscript("setlipsynctochar");
runscript("pw_setnameboxtoema");
runscript("pw_enableemanormal");
runscript("setlipsynctochar");
message("I'm not sure about this, you \nknow...!");
jumptoscript("scene1");
[questionexample]
definevar([qreplysignal],"int");
messageauto("But,");
wait(10);
messageappendauto(" what was Trucy's \nlast name again?");
setvar([pw_maxquestions],4);
setvar([pw_q1gfx],91000);
setvar([pw_q2gfx],91010);
setvar([pw_q3gfx],91020);
setvar([pw_q4gfx],91030);
runscript("hidepwmenu");
runscript("pw_setupquestions");
runscript("pw_showquestion");
waitsignal("qreply",[qreplysignal]);
runscript("hidepwmenu");
runscript("pw_showadvarrowmenu");
if(<compare([qreplysignal],"equal",3)>,<jumptoscript("questionexamplecorrect")>,<jumptoscript("questionexamplewrong")>);
[questionexamplecorrect]
message("You're correct!");
jumptoscript("scene1");
[questionexamplewrong]
message("That doesn't seem right...");
jumptoscript("scene1");