Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer visible = TRUE;
- vector defaultsize;
- //Random number variable
- float FloatValue;
- integer IntValue;
- string StringValue;
- //key id;
- show()
- {
- llSetAlpha(1,ALL_SIDES);
- visible = TRUE;
- return;
- }
- hide()
- {
- llSetAlpha(0,ALL_SIDES);
- visible = FALSE;
- return;
- }
- Ssize()
- {
- llSetScale(<0.3, 0.3, 0.3>);
- }
- Msize()
- {
- llSetScale(<0.6, 0.6, 0.6>);
- }
- Bsize()
- {
- llSetScale(<0.9, 0.9, 0.9>);
- }
- default
- {
- state_entry()
- {
- llListen(-11223,"Fish Pond",NULL_KEY,"");
- llSetAlpha(1,ALL_SIDES);
- defaultsize = llGetScale();
- }
- listen(integer channel, string what, key who, string msg)
- {
- if(llGetOwnerKey(who) == llGetOwner())
- {
- if(msg == "on")
- {
- hide();
- llSetScale(defaultsize);
- }
- else if(msg == "off")
- {
- //llSleep(8.0);
- show();
- //random number generator
- FloatValue = llFrand(3);
- IntValue = llRound(FloatValue);
- StringValue = (string)IntValue;
- llSay(-11223, "StringValue" +StringValue);
- //llMessageLinked(LINK_SET, 1, "String ", id);
- if(IntValue == 1)
- {
- Ssize();
- //llMessageLinked(LINK_SET, 1, "Small Fish", NULL_KEY);
- }
- else if(IntValue == 2)
- {
- Msize();
- //llMessageLinked(LINK_SET, 2, "Medium Fish",NULL_KEY);
- }
- else if(IntValue == 3)
- {
- Bsize();
- //llMessageLinked(LINK_SET, 3, "Big Fish", NULL_KEY);
- }
- }
- }
- }
- // touch_start(integer total_number)
- // {
- // if(visible == TRUE)
- // {
- // hide();
- // }
- // else if(visible == FALSE)
- // {
- // show();
- // }
- // }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement