vector red=<1.0,0.0,0.0>;
vector green=<0.0,1.0,0.0>;
vector blue=<0.0,0.0,1.0>;
vector yellow=<1.0,1.0,0.0>;
vector purple=<1.0,0.0,1.0>;
vector orange=<1.0,0.5,0.0>;
vector pink=<1.0,0.75294,0.79608>;
vector black=<0.0,0.0,0.0>;
vector white=<1.0,1.0,1.0>;
integer channel=360;
list menuItems=["Reset","Look","Effectz"];
list lookItems=["< Back","StrapTex","Colorz"];
list colorItems=["< Back","Body","Buttons","Strap","Texture"];
list itemColorsMenu=["< Back","Red","Green","Blue","Yellow","Purple","Orange","Pink","Black","White"];
list strapTexture=["< Back","SL","More >","Tux","Script","Notepad","Firefox","Heart","Scully","Pedestrian","Star","Smiley"];
list moreStrapTexture=["< Back","Apple","Vista"];
list effectzItems=["< Back","STOP","Particlez","Breadcrumb","Sparkler"];
// ,"Fire"
list effectzTextures=["< Back","STOP","More >","Firefox","Tux","Script","Notepad","Apple","Heart","Scully","Pedestrian","Kid"];
list moreEffectzTextures=["< Back","STOP","SL","Smiley","Star","Vista"];
list breadTextures=["< Back","STOP","More >","Firefox","Tux","Script","Notepad","Apple","Heart","Scully","Pedestrian","Kid"];
list mBreadTextures=["< Back","STOP","SL","Smiley","Star","Vista"];
string optionz="Spin ya optionz:";
string lookz="Change ya lookz:";
string colorz="What ya wanna Color?";
string zapBody="Zap ya Body Colorz:";
string zapButtons="Zap ya Buttonz Colorz:";
string zapStrap="Zap ya Strap Colorz:";
string zapTexture="Zap ya Texture Colorz:";
string setTexture="Pick ya texture for the Strap:";
string zapEffectz="Effectz Stuff";
string ZapEffectzTexture="Spin ya Textures:";
key apple="b08cf7d5-a1d1-1598-79ac-65026522782a";
key firefox="27a39dd4-093d-82e3-7f41-a9ce4c10ddf5";
key heart="38adf8a6-b7f2-d427-74ff-c52c2cd7fac6";
key LSL="6543a818-dfe7-056c-8121-4041f7078ea7";
key notepad="27194cfa-11a7-6f7f-4ac9-43577d123fcd";
key scully="3c2c489a-1a87-2b38-9c6c-2c1023450644";
key SL="f337230a-c8ef-3d1a-b068-3a6f7e411fbb";
key tux="4b49be95-f9a5-6fdf-de67-74cb3a0321e8";
key pedestrian="943c2d33-70dc-0a28-9e63-5cdb212d0d1f";
key heyKid="dddc0ad9-d87e-71d8-3a42-5d29c18f7209";
key countdown="dd443d49-8c49-7892-52f0-d2784159c8ee";
key smiley="e18fc4a7-08be-9b1d-f0e3-88a7e4c1de7a";
key star="d56422da-0251-3a86-de1c-cc4af745869d";
key vista="d1651b28-cj78-aedf-05cc-b48f64bd338d";
watchBodyColor(vector setColor){
llSetLinkColor(2,setColor,ALL_SIDES);
llSetLinkColor(6,setColor,ALL_SIDES);
llSetLinkColor(7,setColor,ALL_SIDES);
llSetLinkColor(8,setColor,ALL_SIDES);
llSetLinkColor(11,setColor,ALL_SIDES);
llSetLinkColor(13,setColor,ALL_SIDES);
llSetLinkColor(15,setColor,ALL_SIDES);
llSetLinkColor(17,setColor,ALL_SIDES);
return;
}
buttonsColor(vector setColor){
llSetLinkColor(10,setColor,ALL_SIDES);
llSetLinkColor(12,setColor,ALL_SIDES);
llSetLinkColor(14,setColor,ALL_SIDES);
llSetLinkColor(16,setColor,ALL_SIDES);
llSetLinkColor(18,setColor,ALL_SIDES);
return;
}
strapColor(vector setColor){
llSetLinkColor(5,setColor,ALL_SIDES);
return;
}
strapColor2(vector setColor){
llSetLinkColor(3,setColor,1);
llSetLinkColor(3,setColor,3);
return;
}
strapColorTexture(vector setColor){
llSetLinkColor(3,setColor,0);
return;
}
goEffectz(integer linkNumber,string effectzTexture){llMessageLinked(LINK_THIS,linkNumber,effectzTexture,NULL_KEY);return;}
goDialog(string dialogText,list dialogList){llListen(channel,"",llGetOwner(),""
;llDialog(llGetOwner(),dialogText,dialogList,channel);return;}default{
changed(integer change){if(change &CHANGED_OWNER)llResetScript();}
state_entry(){
goEffectz(3,NULL_KEY);
llSetStatus(STATUS_PHANTOM,TRUE);
llSetTexture(countdown,ALL_SIDES);
llSetTextureAnim (ANIM_ON|LOOP,ALL_SIDES,10,1,0,0,1);
llOwnerSay("\nFunky Chunky Digi-Watch\nClick on your JShock to get the dialog"
;llSetLinkTexture(3,scully,0);watchBodyColor(orange);buttonsColor(red);strapColor(red);strapColor2(red);strapColorTexture(yellow);
}
touch_start(integer total_number){if(llDetectedKey(0)==llGetOwner()){state firstDialog;}else{string sName=llKey2Name(llDetectedKey(0));llOwnerSay(sName+" clicked your J-Shock."
;}}}
state firstDialog{
state_entry(){goDialog(optionz,menuItems);}
listen(integer channel,string name,key id,string message){
if(message=="Reset"
{state default;}else if(message=="Look"
{state lookItemsState;}else if(message=="Effectz"
{state effectzItemsState;}}
touch_start(integer total_number){if(llDetectedKey(0)==llGetOwner()){goDialog(optionz,menuItems);}else{string sName=llKey2Name(llDetectedKey(0));llOwnerSay(sName+" clicked your J-Shock."
;}}}
state lookItemsState{
state_entry(){goDialog(lookz,lookItems);}
listen(integer channel,string name,key id,string message){
if(message=="StrapTex"
{state strapTextureState;}else if(message=="Colorz"
{state colorItemsState;}else if(message=="< Back"
{state firstDialog;}}
touch_start(integer total_number){if(llDetectedKey(0)==llGetOwner()){state firstDialog;}else{string sName=llKey2Name(llDetectedKey(0));llOwnerSay(sName+" clicked your J-Shock."
;}}}
state colorItemsState{
state_entry(){goDialog(colorz,colorItems);}
listen(integer channel,string name,key id,string message){
if(message=="Body"
{state bodyColorsState;}else if(message=="Buttons"
{state buttonColorsState;}else if(message=="Strap"
{state strapColorsState;}else if(message=="Texture"
{state strapTextureColorsState;}else if(message=="< Back"
{state lookItemsState;}}
touch_start(integer total_number){if(llDetectedKey(0)==llGetOwner()){state firstDialog;}else{string sName=llKey2Name(llDetectedKey(0));llOwnerSay(sName+" clicked your J-Shock."
;}}}
state strapTextureState{
state_entry(){goDialog(setTexture,strapTexture);}
listen(integer channel,string name,key id,string message){
if(message=="SL"
{llSetLinkTexture(3,SL,0);goDialog(setTexture,strapTexture);goEffectz(2,SL);}else if(message=="Firefox"
{llSetLinkTexture(3,firefox,0);goDialog(setTexture,strapTexture);goEffectz(2,firefox);}else if(message=="Tux"
{llSetLinkTexture(3,tux,0);goDialog(setTexture,strapTexture);goEffectz(2,tux);}else if(message=="Script"
{llSetLinkTexture(3,LSL,0);goDialog(setTexture,strapTexture);goEffectz(2,LSL);}else if(message=="Notepad"
{llSetLinkTexture(3,notepad,0);goDialog(setTexture,strapTexture);goEffectz(2,notepad);}else if(message=="Heart"
{llSetLinkTexture(3,heart,0);goDialog(setTexture,strapTexture);goEffectz(2,heart);}else if(message=="Scully"
{llSetLinkTexture(3,scully,0);goDialog(setTexture,strapTexture);goEffectz(2,scully);}else if(message=="Pedestrian"
{llSetLinkTexture(3,pedestrian,0);goDialog(setTexture,strapTexture);goEffectz(2,pedestrian);}else if(message=="Star"
{llSetLinkTexture(3,star,0);goDialog(setTexture,strapTexture);goEffectz(2,star);}else if(message=="Smiley"
{llSetLinkTexture(3,smiley,0);goDialog(setTexture,strapTexture);goEffectz(2,smiley);}else if(message=="More >"
{state mStrapText;}else if(message=="< Back"
{state lookItemsState;}}
touch_start(integer total_number){if(llDetectedKey(0)==llGetOwner()){state firstDialog;}else{string sName=llKey2Name(llDetectedKey(0));llOwnerSay(sName+" clicked your J-Shock."
;}}}
state mStrapText{
state_entry(){goDialog(setTexture,moreStrapTexture);}
listen(integer channel,string name,key id,string message){
if(message=="Apple"
{llSetLinkTexture(3,apple,0);goDialog(setTexture,moreStrapTexture);goEffectz(2,apple);}else if(message=="Vista"
{llSetLinkTexture(3,vista,0);goDialog(setTexture,moreStrapTexture);goEffectz(2,vista);}else if(message=="< Back"
{state strapTextureState;}}
touch_start(integer total_number){if(llDetectedKey(0)==llGetOwner()){state firstDialog;}else{string sName=llKey2Name(llDetectedKey(0));llOwnerSay(sName+" clicked your J-Shock."
;}}}
state effectzItemsState{
state_entry(){goDialog(zapEffectz,effectzItems);}
listen(integer channel,string name,key id,string message){
if(message=="STOP"
{goEffectz(3,NULL_KEY);goDialog(zapEffectz,effectzItems);}else if(message=="Particlez"
{state effectzTexturesState;}else if(message=="Breadcrumb"
{goEffectz(4,smiley);goDialog(zapEffectz,effectzItems);}else if(message=="Sparkler"
{goEffectz(5,NULL_KEY);goDialog(zapEffectz,effectzItems);}// else if(message=="Fire"
{fireEffectz();goDialog(zapEffectz,effectzItems);}else if(message=="< Back"
{state firstDialog;}}
touch_start(integer total_number){if(llDetectedKey(0)==llGetOwner()){state firstDialog;}else{string sName=llKey2Name(llDetectedKey(0));llOwnerSay(sName+" clicked your J-Shock."
;}}}
state effectzTexturesState{
state_entry(){goDialog(ZapEffectzTexture,effectzTextures);}
listen(integer channel,string name,key id,string message){
if(message=="More >"
{state moreEffectzTexturesState;}else if(message=="Firefox"
{goDialog(ZapEffectzTexture,effectzTextures);goEffectz(1,firefox);}else if(message=="Apple"
{goDialog(ZapEffectzTexture,effectzTextures);goEffectz(1,apple);}else if(message=="Script"
{goDialog(ZapEffectzTexture,effectzTextures);goEffectz(1,LSL);}else if(message=="Heart"
{goDialog(ZapEffectzTexture,effectzTextures);goEffectz(1,heart);}else if(message=="Notepad"
{goDialog(ZapEffectzTexture,effectzTextures);goEffectz(1,notepad);}else if(message=="Scully"
{goDialog(ZapEffectzTexture,effectzTextures);goEffectz(1,scully);}else if(message=="Tux"
{goDialog(ZapEffectzTexture,effectzTextures);goEffectz(1,tux);}else if(message=="Pedestrian"
{goDialog(ZapEffectzTexture,effectzTextures);goEffectz(1,pedestrian);}else if(message=="Kid"
{goDialog(ZapEffectzTexture,effectzTextures);goEffectz(1,heyKid);}else if(message=="STOP"
{goEffectz(3,NULL_KEY);goDialog(ZapEffectzTexture,effectzTextures);}else if(message=="< Back"
{state effectzItemsState;}}
touch_start(integer total_number){if(llDetectedKey(0)==llGetOwner()){state firstDialog;}else{string sName=llKey2Name(llDetectedKey(0));llOwnerSay(sName+" clicked your J-Shock."
;}}}
state moreEffectzTexturesState{
state_entry(){goDialog(ZapEffectzTexture,moreEffectzTextures);}
listen(integer channel,string name,key id,string message){
if(message=="SL"
{goDialog(ZapEffectzTexture,moreEffectzTextures);goEffectz(1,SL);}else if(message=="Smiley"
{goDialog(ZapEffectzTexture,moreEffectzTextures);goEffectz(1,smiley);}else if(message=="Star"
{goDialog(ZapEffectzTexture,moreEffectzTextures);goEffectz(1,star);}else if(message=="Vista"
{goDialog(ZapEffectzTexture,moreEffectzTextures);goEffectz(1,vista);}else if(message=="STOP"
{goEffectz(3,NULL_KEY);goDialog(ZapEffectzTexture,moreEffectzTextures);}else if(message=="< Back"
{state effectzTexturesState;}}
touch_start(integer total_number){if(llDetectedKey(0)==llGetOwner()){state firstDialog;}else{string sName=llKey2Name(llDetectedKey(0));llOwnerSay(sName+" clicked your J-Shock."
;}}}
state breadEffectz{
state_entry(){goDialog(ZapEffectzTexture,effectzTextures);}
listen(integer channel,string name,key id,string message){
if(message=="More >"
{state mbreadEffectz;}else if(message=="Firefox"
{goDialog(ZapEffectzTexture,breadTextures);goEffectz(4,firefox);}else if(message=="Apple"
{goDialog(ZapEffectzTexture,breadTextures);goEffectz(4,apple);}else if(message=="Script"
{goDialog(ZapEffectzTexture,breadTextures);goEffectz(4,LSL);}else if(message=="Heart"
{goDialog(ZapEffectzTexture,breadTextures);goEffectz(4,heart);}else if(message=="Notepad"
{goDialog(ZapEffectzTexture,breadTextures);goEffectz(4,notepad);}else if(message=="Scully"
{goDialog(ZapEffectzTexture,breadTextures);goEffectz(4,scully);}else if(message=="Tux"
{goDialog(ZapEffectzTexture,breadTextures);goEffectz(4,tux);}else if(message=="Pedestrian"
{goDialog(ZapEffectzTexture,breadTextures);goEffectz(4,pedestrian);}else if(message=="Kid"
{goDialog(ZapEffectzTexture,breadTextures);goEffectz(4,heyKid);}else if(message=="STOP"
{goEffectz(3,NULL_KEY);goDialog(ZapEffectzTexture,breadTextures);}else if(message=="< Back"
{state effectzItemsState;}}
touch_start(integer total_number){if(llDetectedKey(0)==llGetOwner()){state firstDialog;}else{string sName=llKey2Name(llDetectedKey(0));llOwnerSay(sName+" clicked your J-Shock."
;}}}
state mbreadEffectz{
state_entry(){goDialog(ZapEffectzTexture,moreEffectzTextures);}
listen(integer channel,string name,key id,string message){
if(message=="SL"
{goDialog(ZapEffectzTexture,mBreadTextures);goEffectz(4,SL);}else if(message=="Smiley"
{goDialog(ZapEffectzTexture,mBreadTextures);goEffectz(4,smiley);}else if(message=="Star"
{goDialog(ZapEffectzTexture,mBreadTextures);goEffectz(4,star);}else if(message=="Vista"
{goDialog(ZapEffectzTexture,mBreadTextures);goEffectz(4,vista);}else if(message=="STOP"
{goEffectz(3,NULL_KEY);goDialog(ZapEffectzTexture,mBreadTextures);}else if(message=="< Back"
{state breadEffectz;}}
touch_start(integer total_number){if(llDetectedKey(0)==llGetOwner()){state firstDialog;}else{string sName=llKey2Name(llDetectedKey(0));llOwnerSay(sName+" clicked your J-Shock."
;}}}
state strapColorsState{
state_entry(){goDialog(zapStrap,itemColorsMenu);}
listen(integer channel,string name,key id,string message){
if(message=="Red"
{strapColor(red);strapColor2(red);goDialog(zapStrap,itemColorsMenu);}else if(message=="Green"
{strapColor(green);strapColor2(green);goDialog(zapStrap,itemColorsMenu);}else if(message=="Blue"
{strapColor(blue);strapColor2(blue);goDialog(zapStrap,itemColorsMenu);}else if(message=="Yellow"
{strapColor(yellow);strapColor2(yellow);goDialog(zapStrap,itemColorsMenu);}else if(message=="Purple"
{strapColor(purple);strapColor2(purple);goDialog(zapStrap,itemColorsMenu);}else if(message=="Orange"
{strapColor(orange);strapColor2(orange);goDialog(zapStrap,itemColorsMenu);}else if(message=="Pink"
{strapColor(pink);strapColor2(pink);goDialog(zapStrap,itemColorsMenu);}else if(message=="Black"
{strapColor(black);strapColor2(black);goDialog(zapStrap,itemColorsMenu);}else if(message=="White"
{strapColor(white);strapColor2(white);goDialog(zapStrap,itemColorsMenu);}else if(message=="< Back"
{state colorItemsState;}}
touch_start(integer total_number){if(llDetectedKey(0)==llGetOwner()){state firstDialog;}else{string sName=llKey2Name(llDetectedKey(0));llOwnerSay(sName+" clicked your J-Shock."
;}}}
state strapTextureColorsState{
state_entry(){goDialog(zapTexture,itemColorsMenu);}
listen(integer channel,string name,key id,string message){
if(message=="Red"
{strapColorTexture(red);goDialog(zapTexture,itemColorsMenu);}else if(message=="Green"
{strapColorTexture(green);goDialog(zapTexture,itemColorsMenu);}else if(message=="Blue"
{strapColorTexture(blue);goDialog(zapTexture,itemColorsMenu);}else if(message=="Yellow"
{strapColorTexture(yellow);goDialog(zapTexture,itemColorsMenu);}else if(message=="Purple"
{strapColorTexture(purple);goDialog(zapTexture,itemColorsMenu);}else if(message=="Orange"
{strapColorTexture(orange);goDialog(zapTexture,itemColorsMenu);}else if(message=="Pink"
{strapColorTexture(pink);goDialog(zapTexture,itemColorsMenu);}else if(message=="Black"
{strapColorTexture(black);goDialog(zapTexture,itemColorsMenu);}else if(message=="White"
{strapColorTexture(white);goDialog(zapTexture,itemColorsMenu);}else if(message=="< Back"
{state colorItemsState;}}
touch_start(integer total_number){if(llDetectedKey(0)==llGetOwner()){state firstDialog;}else{string sName=llKey2Name(llDetectedKey(0));llOwnerSay(sName+" clicked your J-Shock."
;}}}
state buttonColorsState{
state_entry(){goDialog(zapButtons,itemColorsMenu);}
listen(integer channel,string name,key id,string message){
if(message=="Red"
{buttonsColor(red);goDialog(zapButtons,itemColorsMenu);}else if(message=="Green"
{buttonsColor(green);goDialog(zapButtons,itemColorsMenu);}else if(message=="Blue"
{buttonsColor(blue);goDialog(zapButtons,itemColorsMenu);}else if(message=="Yellow"
{buttonsColor(yellow);goDialog(zapButtons,itemColorsMenu);}else if(message=="Purple"
{buttonsColor(purple);goDialog(zapButtons,itemColorsMenu);}else if(message=="Orange"
{buttonsColor(orange);goDialog(zapButtons,itemColorsMenu);}else if(message=="Pink"
{buttonsColor(pink);goDialog(zapButtons,itemColorsMenu);}else if(message=="Black"
{buttonsColor(black);goDialog(zapButtons,itemColorsMenu);}else if(message=="White"
{buttonsColor(white);goDialog(zapButtons,itemColorsMenu);}else if(message=="< Back"
{state colorItemsState;}}
touch_start(integer total_number){if(llDetectedKey(0)==llGetOwner()){state firstDialog;}else{string sName=llKey2Name(llDetectedKey(0));llOwnerSay(sName+" clicked your J-Shock."
;}}}
state bodyColorsState{
state_entry(){goDialog(zapBody,itemColorsMenu);}
listen(integer channel,string name,key id,string message){
if(message=="Red"
{watchBodyColor(red);goDialog(zapBody,itemColorsMenu);}else if(message=="Green"
{watchBodyColor(green);goDialog(zapBody,itemColorsMenu);}else if(message=="Blue"
{watchBodyColor(blue);goDialog(zapBody,itemColorsMenu);}else if(message=="Yellow"
{watchBodyColor(yellow);goDialog(zapBody,itemColorsMenu);}else if(message=="Purple"
{watchBodyColor(purple);goDialog(zapBody,itemColorsMenu);}else if(message=="Orange"
{watchBodyColor(orange);goDialog(zapBody,itemColorsMenu);}else if(message=="Pink"
{watchBodyColor(pink);goDialog(zapBody,itemColorsMenu);}else if(message=="Black"
{watchBodyColor(black);goDialog(zapBody,itemColorsMenu);}else if(message=="White"
{watchBodyColor(white);goDialog(zapBody,itemColorsMenu);}else if(message=="< Back"
{state colorItemsState;}}
touch_start(integer total_number){if(llDetectedKey(0)==llGetOwner()){state firstDialog;}else{string sName=llKey2Name(llDetectedKey(0));llOwnerSay(sName+" clicked your J-Shock."
;}}}
state buy{
state_entry(){
string sName=llKey2Name(llDetectedKey(0));
llOwnerSay(sName+" is buying a J-Shock"
;}
}