Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //goes in hair 2
- integer ActiveHair;
- integer HAIRTYPE_HAIR = 1;
- integer HAIRTYPE_PONYTAIL = 2;
- integer HAIRTYPE_UNKNOWN = 3;
- showHair()
- {
- float i;
- for (i = 0; i<1.1; i += 0.1){
- llSetLinkAlpha(LINK_SET, i, ALL_SIDES);
- llSleep(0.02222);
- }
- }
- hideHair()
- {
- float i;
- for (i = 1; i>0; i-= 0.1){
- llSetLinkAlpha(LINK_SET, i, ALL_SIDES);
- llSleep(0.02222);
- }
- }
- default
- {
- state_entry()
- {
- ActiveHair = HAIRTYPE_HAIR;
- llListen(0, "", llGetOwner(), "");
- }
- listen(integer Channel, string Name, key ID, string Text)
- {
- if (~llSubStringIndex(Text, "hair")){
- if (~llListFindList(llParseString2List(Text, [" ", ",", ".", "-", "!", "?", ":"], []), ["hair"]))
- {
- if (ActiveHair == HAIRTYPE_PONYTAIL){
- ActiveHair = HAIRTYPE_HAIR;
- hideHair();
- }else if(ActiveHair == HAIRTYPE_HAIR){
- ActiveHair = HAIRTYPE_PONYTAIL;
- showHair();
- }
- }
- }else if (~llSubStringIndex(Text, "ponytail")){
- if (~llListFindList(llParseString2List(Text, [" ", ",", ".", "-", "!", "?", ":"], []), ["ponytail"]))
- {
- if (ActiveHair != HAIRTYPE_UNKNOWN){
- ActiveHair = HAIRTYPE_UNKNOWN;
- hideHair();
- }else if(ActiveHair == HAIRTYPE_UNKNOWN){
- ActiveHair = HAIRTYPE_HAIR;
- llSetLinkAlpha(LINK_SET, 0, ALL_SIDES);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement