Jump to content

Zane Veliz

Resident
  • Posts

    4
  • Joined

  • Last visited

Posts posted by Zane Veliz

  1. Please help me, I have a scavenger hunt event this weekend and this script is not giving the prize for answering the correct answer. I have zero scripting skills so please make it scripting for DUMMIES if you can help. Can someone please help?

     

     

     

    list buttons = ["Humans", "Assamite", "Governor", "Zane"];
    string dialogInfo = "\nWho are the judges of Caine's children of Abel?";

    key ToucherID;
    integer dialogChannel;
    integer listenHandle;

    // copy and paste for the resuls section for wrong answers
    // llWhisper(0, "The RiddleBunny smashes your easteregg overtop your head and tells you to try again.");
    //for correct answer:
    // llGiveInventory(llDetectedKey(0), OBJECTNAME);




    default
    {
    state_entry()
    {
    dialogChannel = -1 - (integer)("0x" + llGetSubString( (string)llGetKey(), -7, -1) );
    }

    touch_start(integer num_detected)
    {
    ToucherID = llDetectedKey(0);
    llListenRemove(listenHandle);
    listenHandle = llListen(dialogChannel, "", ToucherID, "");
    llDialog(ToucherID, dialogInfo, buttons, dialogChannel);
    llSetTimerEvent(60.0); // Here we set a time limit for responses
    }

    listen(integer channel, string name, key id, string message)
    {
    if (message == "-")
    {
    llDialog(ToucherID, dialogInfo, buttons, dialogChannel);
    return;
    }
    llListenRemove(listenHandle);
    // stop timer since the menu was clicked
    llSetTimerEvent(0);
    if (message == "Humans")
    {
    llWhisper(0, "The RiddleBunny smashes your easteregg overtop your head and tells you to try again.");
    return;
    }
    if (message == "Assamite")
    {
    llGiveInventory(llDetectedKey(0), "zv egg");
    }
    else if (message == "Governor")
    {
    llWhisper(0, "The RiddleBunny smashes your easteregg overtop your head and tells you to try again.");
    }
    else
    {
    llWhisper(0, "The RiddleBunny smashes your easteregg overtop your head and tells you to try again.");
    }
    }

    timer()
    {
    // stop timer
    llSetTimerEvent(0);

    llListenRemove(listenHandle);
    llWhisper(0, "Sorry. You snooze; you lose.");
    }
    }

×
×
  • Create New...