Gender: Male
Location: Mandaue City, Cebu, Philippines
Rank: Desk Jockey
Joined: Sun Sep 20, 2009 1:51 pm
Posts: 117
Attorneyatlawl wrote:
KSA_Tech wrote:
Big news:
- (AIGE) Fixed major bug with Custom Command Linker (partially remade it).
- (AIGE) Added an Optimizer to AHLSL Integrated Compiler for certain commands.
- (PWLib) Added Testimony commands to Shinku (now making a witness testimony is a lot easier)
- (PWLib) Added Cross Examination Versus command to Shinku (only 1 command needed to show the versus!)
- (PWLib) Added General Cross Examination commands to Shinku (no more that feast of ifs and waitsignal, making Cross Exams a lot simpler to develop).
- (PWLib) Added Support Cross Examination commands to Shinku (thus simplifying ever more the cross examination creation).
SO close yet so far

Woohoo! The Cross-Examination and Witness Testimony has become a lot easier!
Can somebody check this code for me:
Code:
#include(pwlib/pwlib.hlsl)
[game]
jumptoscript("setup");
[setup]
definekey("key_lclick",<null()>);
runscript("pw_initpwlib");
runscript("pw_initpwbgs");
runscript("charcreation");
runscript("load");
runscript("evidenceprofilecreation");
setvar([pw_titlescript],"run");
setvar([pw_episodepath],"episode/");
setvar([pw_episodes],1);
runscript([pw_titlescript]);
jumptoscript("run");
[load]
loadtexture(1000,"PW/CRO/CROPhoenixMaya.png");
loadtexture(1001,"PW/CRO/CROJudge.png");
loadtexture(1002,"PW/CRO/CROPayne.png");
loadtexture(1003,"PW/CRO/CROWtYoungEma.png");
loadtexture(110001,"buttons/0001.png");
loadtexture(110002,"buttons/0002.png");
loadtexture(110003,"buttons/0003.png");
loadtexture(110004,"buttons/0004.png");
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/trucy.png");
loadtexture(7000,"PW/ElisePhoto.png");
loadtexture(70010,"PW/misc/pwdefaulttitle.png");
[charcreation]
runscript("pw_createema");
runscript("pw_createtrucy");
runscript("pw_createphoenix");
runscript("pw_createpayne");
runscript("pw_createjudge");
[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 show 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 by\nManfred Von Karma.");
setvar([evidenceldesc],"The murder weapon.\nIt was shot once.");
runscript("createevidence");
setvar([evidencenumber],902);
setvar([evidencegfs],80902);
setvar([evidencegfl],80902);
setvar([evidencesup],0);
setvar([evidencename],"Trucy GS4 Promo");
setvar([evidencesdesc],"Type: Photo\nRecieved from Trucy Wright.");
setvar([evidenceldesc],"A promo photo of Gyakuten Saiban \n4.");
runscript("createevidence");
setvar([evidencestex],7000);
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([profile number],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");
[run]
setbg(70010);
changetitle("PWLib Tutorial Game");
runscript("pw_showmain");
waitresponse();
runscript("pw_hidemain");
setbgsize(0,0);
jumptoscript("casemenu");
[casemenu]
runscript("pw_caseselect");
waitresponse();
jumptoscript("begin_case1");
[begin_case1]
jumptoscript("casestart");
waitresponse();
[casestart]
registercolor("red",255,255,0,0);
setvar([pw_lifemax],100.0);
setvar([pw_lifecurrent],100.0);
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_usepwbgcourthall");
runscript("pw_showadvarrowmenu");
loadandplaymp3("music/pretrial.mp3",0,"N");
jumptoscript("scene1");
[scene1]
runscript("setlipsynctochar");
runscript("showpwchar");
runscript("pw_showmessagebox");
runscript("pw_enableemanormal");
runscript("pw_setnameboxtoema");
message("Oh, hello.");
message("My name is Ema Skye.");
runscript("pw_setnameboxtotrucy");
runscript("pw_enabletrucynormal");
messagedrop("Oh, hello. My name is Trucy.");
message("I'm a $c{red}magician$c{colorpwwhite}.");
messageauto("This");
setvar([pw_evidtoshowinbox],80902);
runscript("pw_showflyingevidboxright");
messageappend("$c{red} photo$c{colorpwwhitestuff} proves it.");
wait(34);
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("pw_setnameboxtotrucy");
runscript("setlipsynctochar");
message("And you will know see the \n\"$c{red}murder weapon$c{colorpwwhite}\", gun, get updated in \nthe Court Record.");
setvar([evidencenumber],901);
runscript("setlipsynctonoone");
setvar([evidencenumber],901);
setvar([evidencegfs],80900);
setvar([evidencegfl],80900);
setvar([evidencesup],0);
setvar([evidencename],"Gun");
setvar([evidencesdesc],"Type: Weapons \n Submitted as evidence by\nManfred Von Karma.");
setvar([evidenceldesc],"The murder weapon.\nIt was shot twice.");
runscript("createevidence");
setvar([pw_headeviaddmsg],"");
setvar([pw_taileviaddmsg]," updated\nto the Court Record.");
runscript("pw_startevidenceadd");
runscript("setlipsynctochar");
runscript("pw_setnameboxtoema");
runscript("pw_enableemanormal");
message("That's cool! But scientifically \nspeaking...");
message("$c{red}Magic $c{colorpwwhite}doesn't exist.");
runscript("setlipsynctochar");
runscript("pw_setnameboxtotrucy");
runscript("pw_enabletrucynormal");
messagedrop("Scientifically speaking...? \nHmmm...");
message("But does magic need to be \nproven?");
runscript("setlipsynctonoone");
runscript("pw_setnameboxtophoenix");
setmsgboxtextcolor(255,107,198,247);
message("(I better not try to argue \nin this one.)");
runscript("setlipsynctochar");
setmsgboxtextcolor(255,240,240,240);
runscript("pw_enableemanormal");
runscript("pw_setnameboxtoema");
message("What do you think, Mr. \nWright?");
runscript("setlipsynctonoone");
runscript("pw_setnameboxtophoenix");
message("Ah?");
message("Well...Ah...");
jumptoscript("presenttrucyevidence");
[presenttrucyevidence]
definevar([signal],"int");
runscript("pw_setnameboxtonoone");
runscript("setlipsynctonoone");
setmsgboxtextcolor(255,107,198,247);
messageauto("(Show what proves that Trucy is\na magician!)");
runscript("pw_forcepresent");
waitsignal("advance",[signal]);
runscript("pw_hidemessagebox");
loadandplaysfx("01_Phoenix - takethat.wav",0);
runscript("pw_raisetakethat");
wait(6);
if(<compare([currentitemcode],"equal",902)>,<jumptoscript("presenttrucyevidencecorrect")>,<jumptoscript("presenttrucyevidencewrong")>);
[presenttrucyevidencecorrect]
setmsgboxtextcolor(255,240,240,240);
runscript("pw_showmessagebox");
runscript("pw_setnameboxtophoenix");
runscript("setlipsynctonoone");
message("What about $c{red}this$c{colorpwwhite}?");
runscript("setlipsynctochar");
runscript("pw_setnameboxtoema");
runscript("pw_enableemanormal");
message("You may be right...");
message("But who gave you this?");
jumptoscript("presenttrucyprofile");
[presenttrucyevidencewrong]
setmsgboxtextcolor(255,240,240,240);
runscript("pw_showmessagebox");
runscript("pw_setnameboxtophoenix");
runscript("setlipsynctonoone");
message("What about $c{red}this$c{colorpwwhite}?");
runscript("setlipsynctochar");
runscript("pw_setnameboxtoema");
runscript("pw_enableemanormal");
message("What is this supposed to mean \nanyway?");
message("Do you really have proof that \nmagic exists?");
jumptoscript("presenttrucyevidence");
[presenttrucyprofile]
definevar([signal],"int");
runscript("pw_setnameboxtonoone");
runscript("setlipsynctonoone");
setmsgboxtextcolor(255,107,198,247);
messageauto("(Show you gave you this \nphoto!)");
setvar([pwonetypepresent],2);
runscript("pw_forcepresent");
waitsignal("advance",[signal]);
runscript("pw_hidemessagebox");
loadandplaysfx("01_Phoenix - takethat.wav",0);
runscript("pw_raisetakethat");
wait(6);
if(<compare([currentitemcode],"equal",801)>,<jumptoscript("presenttrucyprofilecorrect")>,<jumptoscript("presenttrucyprofilewrong")>);
[presenttrucyprofilecorrect]
setmsgboxtextcolor(255,240,240,240);
runscript("pw_showmessagebox");
runscript("pw_setnameboxtophoenix");
runscript("setlipsynctonoone");
message("What about $c{red}this$c{colorpwwhite}?");
runscript("setlipsynctochar");
runscript("pw_setnameboxtoema");
runscript("pw_enableemanormal");
runscript("setlipsynctochar");
message("Hmmm, that is interesting...");
message("Ok...");
jumptoscript("simpleexamine");
[presenttrucyprofilewrong]
setmsgboxtextcolor(255,240,240,240);
runscript("pw_showmessagebox");
runscript("pw_setnameboxtophoenix");
runscript("setlipsynctonoone");
message("What about $c{red}this$c{colorpwwhite}?");
runscript("setlipsynctochar");
runscript("pw_setnameboxtoema");
runscript("pw_enableemanormal");
runscript("setlipsynctochar");
message("I'm not sure about this, you \nknow...");
message("Who really gave you this?");
jumptoscript("presenttrucyprofile");
[simpleexamine]
runscript("pw_showmessagebox");
setbuttonarea("pw_examinearea1",157,302,81,23);
setvar([pw_examinemaxplaces],1);
runscript("pw_showtouchananswer");
setmsgboxtextcolor(255,0,247,0);
messageauto("So, what is $c{red}wrong$c{colorpwgreen}");
messageappend(" 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]
setmsgboxtextcolor(255,240,240,240);
runscript("pw_showmessagebox");
runscript("pw_setnameboxtophoenix");
runscript("setlipsynctonoone");
message("$c{red}Here!$c{colorpwwhite}");
runscript("setlipsynctochar");
runscript("pw_setnameboxtoema");
runscript("pw_enableemanormal");
message("Hmm, yeah, it looks \ninteresting...!");
message("That's right, but...");
jumptoscript("questionexample");
[simpleexaminewrong]
setmsgboxtextcolor(255,240,240,240);
runscript("pw_showmessagebox");
runscript("pw_setnameboxtophoenix");
message("This is what $c{red}proves$c{colorpwwhite}...er...");
runscript("setlipsynctochar");
runscript("pw_setnameboxtoema");
runscript("pw_enableemanormal");
message("I'm not sure you know about this, you \nknow...!");
message("Can you please tell me what is really\n$c{red}wrong$c{colorpwwhite} with this place?");
jumptoscript("simpleexamine");
[questionexample]
definevar([qreplysignal],"int");
setmsgboxtextcolor(255,0,247,0);
messageauto("But, what was $c{red}Trucy's \nlast name$c{colorpwgreen}");
messageappend(" ?");
runscript("pw_showselectananswer");
setvar([pw_maxquestions],4);
setvar([pw_q1gfx],110001);
setvar([pw_q2gfx],110002);
setvar([pw_q3gfx],110003);
setvar([pw_q4gfx],110004);
runscript("hidepwmenu");
runscript("pw_setupquestions");
runscript("pw_showquestion");
waitsignal("qreply",[qreplysignal]);
runscript("pw_hideselectananswer");
runscript("hidepwmenu");
runscript("pw_showadvarrowmenu");
if(<compare([qreplysignal],"equal",3)>,<jumptoscript("questionexamplecorrect")>,<jumptoscript("questionexamplewrong")>);
[questionexamplecorrect]
setmsgboxtextcolor(255,240,240,240);
message("You're $c{red}correct$c{colorpwwhite}.");
messageauto("Now...");
stopmp3(0);
wait(26);
messageappend(" to court!");
wait(35);
stopmp3(0);
placefade("pw_char","char",40,"O");
placefade("pw_bg","bg",120,"O");
wait(120);
jumptoscript("entercourt");
[questionexamplewrong]
setmsgboxtextcolor(255,240,240,240);
message("That doesn't seem right...");
message("You may know what's wrong with \nthis place...");
jumptoscript("questionexample");
[entercourt]
runscript("pw_hidecourtbench");
runscript("pw_usepwbgblack");
wait(67);
runscript("pw_showcourtbench");
placefade("pw_char","char",10,"I");
placefade("pw_bg","bg",20,"I");
runscript("hidepwchar");
runscript("pw_showadvarrowmenu");
jumptoscript("court1");
[court1]
runscript("pw_hidemessagebox");
wait(54);
setgenobjgraphic("pw_croattorney",1000);
setgenobjgraphic("pw_crojudge",1001);
setgenobjgraphic("pw_croprosecutor",1002);
setgenobjgraphic("pw_crowitness",1003);
runscript("pw_showcourtroomoverview");
loadandplaysfx("sfx-gallery.wav",0);
wait(144);
runscript("pw_hidecourtroomoverview");
runscript("pw_showgavelhit");
loadandplaymp3("music/trial.mp3",0,"N");
runscript("showpwchar");
runscript("setlipsynctochar");
runscript("pw_showmessagebox");
runscript("pw_showwitnessstand");
runscript("pw_setnameboxtoema");
runscript("pw_enableemasurprised");
message("I can't believe that I'm in the \nwitness stand!");
wait(34);
runscript("pw_showattorneystand");
runscript("pw_enablephoenixnormal");
wait(34);
runscript("pw_setnameboxtophoenix");
message("What?");
setvar([sld_targetcharanim],"pw_enableemanormal");
runscript("pw_slideattoneytowitness");
setvar([sld_targetcharanim],"pw_enableematakingnotes");
runscript("pw_setnameboxtoema");
message("What?");
runscript("pw_showwitnessstand");
runscript("pw_enableemaunsure");
message("Done.");
setvar([sld_targetcharanim],"pw_enablepayneexplain");
runscript("pw_slidewitnesstoprosecutor");
runscript("pw_setnameboxtopayne");
message("Done here.");
setvar([sld_targetcharanim],"pw_enablephoenixdrink");
runscript("pw_slideprosecutortoattoney");
runscript("pw_showattorneystand");
runscript("pw_setnameboxtophoenix");
message("Done here, too.");
setvar([sld_targetcharanim],"pw_enableemadown");
runscript("pw_slideattoneytowitness");
runscript("pw_setnameboxtoema");
message("And the last one is done!");
runscript("pw_showjudgetable");
runscript("pw_enablejudgenormal");
runscript("pw_setnameboxtojudge");
messagedrop("Now, witness, let us hear your \ntestimony.");
jumptoscript("witnesstestimonytest1");
[witnesstestimonytest1]
stopmp3(0);
runscript("showpwchar");
runscript("pw_showwitnessstand");
runscript("pw_showmessagebox");
runscript("pw_setnameboxtonoone");
runscript("setlipsynctonoone");
runscript("pw_enableemadown");
setvar([pw_crossmessage],"\n $c{red}--TheMurder--$c{colorpwwhite}");
stopmp3(0);
runscript("pw_showwitnesstestimony");
runscript("pw_showtestimony");
runscript("pw_setnameboxtoema");
runscript("setlipsynctochar");
runscript("pw_enableemanormal");
loadandplaymp3("music/exam1.mp3",0,"N");
runscript("pw_showmessagebox");
setmsgboxtextcolor(255,240,240,240);
message("This Case Maker is just a test.");
message("It is being tested by Vance Ulric.");
message("And now I will end my testimony.");
stopmp3(0);
wait(10);
jumptoscript("talk1");
[talk1]
runscript("pw_hidetestimony");
setmsgboxtextcolor(255,240,240,240);
runscript("pw_showjudgetable");
runscript("pw_enablejudgenormal");
runscript("pw_setnameboxtojudge");
message("Mr. Wright, you may now begin your \ncross-examination.");
jumptoscript("crossstart");
[crossstart]
runscript("pw_showwitnessstand");
runscript("pw_setnameboxtonoone");
runscript("pw_enableemanormal");
setvar([pw_crossexamattorneycode],36);
setvar([pw_crossexamprosecutorcode],35);
runscript("hidepwmenu");
runscript("pw_showmessagebox");
runscript("setlipsynctonoone");
setvar([pw_crossmessage],"\n $c{red}--TheMurder--$c{colorpwwhite}");
runscript("pw_showcrossexaminationvs");
loadandplaymp3("music/exam2.mp3",0,"N");
runscript("setlipsynctochar");
runscript("pw_showpwmenubasicrec");
waitresponse();
jumptoscript("crossbegin");
[crossbegin]
runscript("hidepwmenu");
runscript("begincrossexamination");
setvar([pwcrossexamstages],3);
jumptoscript("cross1-1");
[cross1-1]
definevar([signal],"int");
setmsgboxtextcolor(255,0,247,0);
runscript("pw_showmessagebox");
runscript("pw_setnameboxtoema");
runscript("pw_enableemanormal");
message("This Case Maker is just a test");
waitsignal("advance",[signal]);
if(<compare([signal],"equal 1)>,<jumptoscript("cross1-1present")>,<null()>);
if(<compare([signal],"equal 2)>,<jumptoscript("cross1-1press")>,<null()>);
if(<compare([signal],"equal 4)>,<jumptoscript("cross1-2")>,<null()>);
[wrongevidence]
setmsgboxtextcolor(255,240,240,240);
runscript("setlipsynctochar");
runscript("pw_showattorneystand");
runscript("pw_enablephoenixdeskslam_only");
runscript("pw_setnameboxtophoenix");
message("Your Honor, I find that \nstatement faulty.");
runscript("pw_showjudgetable");
runscript("pw_enablejudgenegate");
runscript("pw_setnameboxtojudge");
runscript("pw_showlifebar");
setvar([pw_lifelash],10.0);
message("Sorry, Wright. Try again.");
loadandplaysfx("sfx-damage2.wav",0);
modifyvar([pw_lifecurrent],"subtract",20.0);
setvar([pw_lifelash],0.0);
runscript("setlipsynctonoone");
runscript("pw_hidelifebar");
runscript("pw_setnameboxtophoenix");
message("(Oops. Wrong evidence.)");
runscript("resumepwcrossexamsimple");
[cross1-1press]
runscript("pw_hidemessagebox");
setmsgboxtextcolor(255,240,240,240);
loadandplaysfx("01_Phoenix - holdit.wav",0);
runscript("pw_raiseholdit");
runscript("pw_showmessagebox");
runscript("pw_showattorneystand");
runscript("pw_enablephoenixnormal");
runscript("pw_setnameboxtophoenix");
message("Are you sure?");
setvar([sld_targetcharanim],"pw_enableemanormal");
runscript("pw_slideattoneytowitness");
runscript("pw_setnameboxtoema");
runscript("pw_enableemaexcited");
message("Of course I am.");
runscript("nextpwcrossexamsimple");
jumptoscript("cross1-2");
[cross1-1present]
loadandplaysfx("01_Phoenix - objection.wav",0);
runscript("pw_raiseobjection");
jumptoscript("wrongevidence");
[cross1-2]
definevar([signal],"int");
setmsgboxtextcolor(255,0,247,0);
runscript("pw_setnameboxtoema");
runscript("pw_enableemanormal");
message("It is being tested by Vance Ulric.");
waitsignal("advance",[signal]);
if(<compare([signal],"equal 1)>,<jumptoscript("cross1-2present")>,<null()>);
if(<compare([signal],"equal 2)>,<jumptoscript("cross1-2press")>,<null()>);
if(<compare([signal],"equal 3)>,<jumptoscript("cross1-1")>,<null()>);
if(<compare([signal],"equal 4)>,<jumptoscript("cross1-3")>,<null()>);
[cross1-2press]
runscript("pw_hidemessagebox");
setmsgboxtextcolor(255,240,240,240);
loadandplaysfx("01_Phoenix - holdit.wav",0);
runscript("pw_raiseholdit");
runscript("pw_showmessagebox");
runscript("pw_showattorneystand");
runscript("pw_enablephoenixnormal");
runscript("pw_setnameboxtophoenix");
message("Are you sure?");
setvar([sld_targetcharanim],"pw_enableemanormal");
runscript("pw_slideattoneytowitness");
runscript("pw_setnameboxtoema");
runscript("pw_enableemaexcited");
message("Of course I am.");
runscript("nextpwcrossexamsimple");
jumptoscript("cross1-3");
[cross1-2present]
loadandplaysfx("01_Phoenix - objection.wav",0);
runscript("pw_raiseobjection");
jumptoscript("wrongevidence");
[cross1-3]
definevar([signal],"int");
setmsgboxtextcolor(255,0,247,0);
runscript("pw_setnameboxtoema");
runscript("pw_enableemanormal");
message("It is being tested by Vance Ulric.");
waitsignal("advance",[signal]);
if(<compare([signal],"equal 1)>,<jumptoscript("cross1-3present")>,<null()>);
if(<compare([signal],"equal 2)>,<jumptoscript("cross1-3press")>,<null()>);
if(<compare([signal],"equal 3)>,<jumptoscript("cross1-2")>,<null()>);
if(<compare([signal],"equal 4)>,<jumptoscript("crossend")>,<null()>);
[cross1-3press]
runscript("pw_hidemessagebox");
setmsgboxtextcolor(255,240,240,240);
loadandplaysfx("01_Phoenix - holdit.wav",0);
runscript("pw_raiseholdit");
runscript("pw_showmessagebox");
runscript("pw_showattorneystand");
runscript("pw_enablephoenixnormal");
runscript("pw_setnameboxtophoenix");
message("Why now?");
setvar([sld_targetcharanim],"pw_enableemanormal");
runscript("pw_slideattoneytowitness");
runscript("pw_setnameboxtoema");
runscript("pw_enableemanormal");
message("It's just a test.");
runscript("nextpwcrossexamsimple");
jumptoscript("crossend");
[cross1-3present]
loadandplaysfx("01_Phoenix - objection.wav",0);
runscript("pw_raiseobjection");
jumptoscript("wrongevidence");
[crossend]
runscript("pw_showattorneystand");
runscript("pw_enablephoenixnormal");
runscript("pw_setnameboxtophoenix");
message("Thnik, Phoenix. Think!");
runscript("resumepwcrossexamsimple");
jumptoscript("cross1-1");
It says there is an error but not with the script, but with AIGE. It would say: