Monday, September 16, 2019

Magic 8 ball tutorial and script



default
{
    touch_start(integer num_detected)
    {
       float a= llFrand (1.0)*26;
       integer b = llRound (a);
       if (b == 0) llSay(0,"As I see it, yes");
       if (b == 1) llSay(0,"It is certain");
       if (b == 2) llSay(0,"It is decidedly so");
       if (b == 3) llSay(0,"Most likely");
       if (b == 4) llSay(0,"Without a doubt");
       if (b == 5) llSay(0,"Outlook good");
       if (b == 6) llSay(0,"Signs point to yes");
       if (b == 7) llSay(0,"Cat");
       if (b == 8) llSay(0,"Definitely");
       if (b == 9) llSay(0,"You do realize I am inanimate?");
       if (b == 10) llSay(0,"Reply hazy, try again");
       if (b == 11) llSay(0,"Ask after tea time");
       if (b == 12) llSay(0,"Better not tell you now");
       if (b == 13) llSay(0,"I cannot predict");
       if (b == 14) llSay(0,"Concentrate and ask again");
       if (b == 15) llSay(0,"Don't count on it");
       if (b == 16) llSay(0,"My reply is no");
       if (b == 17) llSay(0,"My sources say no");
       if (b == 18) llSay(0,"Outlook not so good");
       if (b == 19) llSay(0,"Very doubtful");
       if (b == 20) llSay(0,"So now you need my help?");
       if (b == 21) llSay(0,"Better you shouldn't ask");
       if (b == 22) llSay(0,"You call that a question?");
       if (b == 23) llSay(0,"Why not?");
       if (b == 24) llSay(0,"If that's what you want");
       if (b == 25) llSay(0,"You tell me");
       if (b == 26) llSay(0,"You even need to ask?");
    }
}

No comments:

Post a Comment