Search:


Follow Us On:

Anthro Eastern-Applier Script

See also:

Applier Script for the Smolbeast Anthro Eastern Avatar

Instructions in the comments for the script itself.

 //////////////////////////////////////////////////////////
 // Smolbeast Anthro Eastern Custom Texture Applier Script
 //
 // It is recommended that you copy/paste this into a new
 // script so people know who to ask for support from.
 //
 // It is essential that you set this script to copy-only.
 //
 // To set up this script, simply paste the texture UUID
 //  into the appropriate bodypart variable.
 // Leave an entry as-is to have it be ignored.
 // Seriously. Leave the speculars alone if you don't want
 //  to edit them. It's not hard. Just don't touch them.
 // No, don't delete it. That breaks things. Don't touch.
 // 
 // To use this script, put it in a box and click the box.
 //  Note that clicking the box will DELETE it afterwards.
 //  So take a copy before testing.
 //
 // WARNING: The default avatar doesn't have specular maps.
 //  If you include them, please include a warning about
 //  making a backup as the default colorations won't work
 //  properly anymore.
 //
 // Diffuse is what people call "texture." Technically
 //  incorrect, but common.
 //
 // 09 JAN 2019 - Stickman Ingmann

 // The message shown when the applier has finished.
 // Update it to thank them for being awesome.
 string MSG_FINISHED = "The texture applier is finished. Thank you for buying Smolbeast! We appreciate your business!";

 key gkBodyDiffuse = "";
 key gkBodyNormal = "";
 key gkBodySpecular = "";
 vector gvBodySpecularColor = <-1.0, -1.0, -1.0>;
 integer giBodySpecularGlossiness = -1;
 integer giBodySpecularEnvironment = -1;

 key gkHornWesternDiffuse = "";
 key gkHornWesternNormal = "";
 key gkHornWesternSpecular = "";
 vector gvHornWesternSpecularColor = <-1.0, -1.0, -1.0>;
 integer giHornWesternSpecularGlossiness = -1;
 integer giHornWesternSpecularEnvironment = -1;

 key gkHornEasternDiffuse = "";
 key gkHornEasternNormal = "";
 key gkHornEasternSpecular = "";
 vector gvHornEasternSpecularColor = <-1.0, -1.0, -1.0>;
 integer giHornEasternSpecularGlossiness = -1;
 integer giHornEasternSpecularEnvironment = -1;

 key gkHairDiffuse = "";
 key gkHairNormal = "";
 key gkHairSpecular = "";
 vector gvHairSpecularColor = <-1.0, -1.0, -1.0>;
 integer giHairSpecularGlossiness = -1;
 integer giHairSpecularEnvironment = -1;

 key gkDorsalDiffuse = "";
 key gkDorsalNormal = "";
 key gkDorsalSpecular = "";
 vector gvDorsalSpecularColor = <-1.0, -1.0, -1.0>;
 integer giDorsalSpecularGlossiness = -1;
 integer giDorsalSpecularEnvironment = -1;

 key gkMouthDiffuse = "";
 key gkMouthNormal = "";
 key gkMouthSpecular = "";
 vector gvMouthSpecularColor = <-1.0, -1.0, -1.0>;
 integer giMouthSpecularGlossiness = -1;
 integer giMouthSpecularEnvironment = -1;

 // Eye components follow
 key gkIrisDiffuse = "";
 key gkIrisNormal = "";
 key gkIrisSpecular = "";
 vector gvIrisSpecularColor = <-1.0, -1.0, -1.0>;
 integer giIrisSpecularGlossiness = -1;
 integer giIrisSpecularEnvironment = -1;

 key gkPupilDiffuse = "";
 key gkPupilNormal = "";
 key gkPupilSpecular = "";
 vector gvPupilSpecularColor = <-1.0, -1.0, -1.0>;
 integer giPupilSpecularGlossiness = -1;
 integer giPupilSpecularEnvironment = -1;

 key gkShineDiffuse = "";
 key gkShineNormal = "";
 key gkShineSpecular = "";
 vector gvShineSpecularColor = <-1.0, -1.0, -1.0>;
 integer giShineSpecularGlossiness = -1;
 integer giShineSpecularEnvironment = -1;



 ///////////////////////////////////////////////////////
 // You don't need to edit below this.
 string SEP = ";";
 string TSEP = ":";
 integer COMM_CHANNEL = 66353;
 string MSG_LIVERY = "rbanthrolivery";
 string STR_NORMAL = "normal";
 string STR_SPECULAR = "specular";

 applyTexture(string sPart, key kDiffuse, key kNormal, key kSpecular, vector vSpecular, integer iSpecularGloss, integer iSpecularEnv) {
   llRegionSayTo(llGetOwner(), COMM_CHANNEL, MSG_LIVERY+SEP+sPart+SEP+(string)kDiffuse);
   if (kNormal) {
     llRegionSayTo(llGetOwner(), COMM_CHANNEL, MSG_LIVERY+SEP+sPart+TSEP+STR_NORMAL+SEP+(string)kNormal);
   }
   if (kSpecular) {
     llRegionSayTo(llGetOwner(), COMM_CHANNEL, MSG_LIVERY+SEP+sPart+TSEP+STR_SPECULAR+SEP+(string)kSpecular+SEP+(string)vSpecular+SEP+(string)iSpecularGloss+SEP+(string)iSpecularEnv);
   }
 }

 default {
   state_entry() {
     llSetText("Click to apply the texture\nto your Smolbeast Anthro Eastern!", <1.0, 1.0, 1.0>, 1.0);
   }

   touch_start(integer num) {
     if (llDetectedKey(0) == llGetOwner()) {

       if (gkBodyDiffuse) {
         applyTexture("body", gkBodyDiffuse, gkBodyNormal, gkBodySpecular, gvBodySpecularColor, giBodySpecularGlossiness, giBodySpecularEnvironment);
       }
       if (gkHornWesternDiffuse) {
         applyTexture("hornwestern", gkHornWesternDiffuse, gkHornWesternNormal, gkHornWesternSpecular, gvHornWesternSpecularColor, giHornWesternSpecularGlossiness, giHornWesternSpecularEnvironment);
       }
       if (gkHornEasternDiffuse) {
         applyTexture("horneastern", gkHornEasternDiffuse, gkHornEasternNormal, gkHornEasternSpecular, gvHornEasternSpecularColor, giHornEasternSpecularGlossiness, giHornEasternSpecularEnvironment);
       }
       if (gkHairDiffuse) {
         applyTexture("hair", gkHairDiffuse, gkHairNormal, gkHairSpecular, gvHairSpecularColor, giHairSpecularGlossiness, giHairSpecularEnvironment);
       }
       if (gkDorsalDiffuse) {
         applyTexture("dorsal", gkDorsalDiffuse, gkDorsalNormal, gkDorsalSpecular, gvDorsalSpecularColor, giDorsalSpecularGlossiness, giDorsalSpecularEnvironment);
       }
       if (gkMouthDiffuse) {
         applyTexture("mouth", gkMouthDiffuse, gkMouthNormal, gkMouthSpecular, gvMouthSpecularColor, giMouthSpecularGlossiness, giMouthSpecularEnvironment);
       }
       if (gkIrisDiffuse) {
         applyTexture("iris", gkIrisDiffuse, gkIrisNormal, gkIrisSpecular, gvIrisSpecularColor, giIrisSpecularGlossiness, giIrisSpecularEnvironment);
       }
       if (gkPupilDiffuse) {
         applyTexture("pupil", gkPupilDiffuse, gkPupilNormal, gkPupilSpecular, gvPupilSpecularColor, giPupilSpecularGlossiness, giPupilSpecularEnvironment);
       }
       if (gkShineDiffuse) {
         applyTexture("shine", gkShineDiffuse, gkShineNormal, gkShineSpecular, gvShineSpecularColor, giShineSpecularGlossiness, giShineSpecularEnvironment);
       }

       // Give it a second to process the textures.
       // Can look weird to go, "WE'RE DONE" and it hasn't started changing.
       llSleep(1.0);
       llOwnerSay(MSG_FINISHED);
       // Reports say deleting it too fast delete the pending message queue.
       llSleep(10.0);
       llDie();
     }
   }
 }
Edit - Upload - Edit Sidebar
Page last modified on January 11, 2019, at 06:02 PM