Jump to content

Landmark/Notecard giver and Group inviter


Jaylin Whitfield
 Share

You are about to reply to a thread that has been inactive for 4097 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello, I am trying to script an object that when you walk over a prim, it will give you a dialog box, and give you the option of getting an LM, a notecard about the store, and an invite to the update group, but I cannot figure what is wrong, no matter what what option I choose in the dialog, it gives me everything and an error "Invalid Key passed to instant message"  here is my code, hopefully you can  help me with it, I am still a novice at scripting.

----------------------------------

string group_id = "4c96dfe4-a4d9-2c27-79e6-0de371a90c4b";
string message = "Click here to join our update group:";
integer channel = 13563;
key gAV;

 

default
{
    state_entry()
{
    llListen(channel,"","","");
}
    collision_start(integer num_detected)
    {
        gAV = llDetectedKey(0);
        llDialog(gAV, "Welcome to DarkWatch Customs Bikes!! Please select from the following:", ["Get LM", "Join Group", "Store Info", "Get All"], channel);
}
listen(integer chan, string name, key id, string mes)
    {
    if(message = "Get LM")
    {
        llGiveInventory(gAV, "DarkWatch Customs Choppers");
    }
    if(message = "Join Group")
    {
        llInstantMessage(llDetectedKey(0), message + " secondlife:///app/group/" + group_id + "/about");
    }
    if(message = "Store Info")
    {
        llGiveInventory(gAV, "DarkWatch Ad");
    }
    if(message = "Give All")
    {
        llInstantMessage(gAV, message + " secondlife:///app/group/" + group_id + "/about");
        llGiveInventory(gAV, "DarkWatch Ad");
        llGiveInventory(gAV, "DarkWatch Customs Choppers");
    }
}
}

Link to comment
Share on other sites

string group_id = "4c96dfe4-a4d9-2c27-79e6-0de371a90c4b";string message = "Click here to join our update group:";integer channel = 13563;key gAV; default{    state_entry(){    llListen(channel,"","","");}    collision_start(integer num_detected)    {        gAV = llDetectedKey(0);        llDialog(gAV, "Welcome to DarkWatch Customs Bikes!! Please select from the following:", ["Get LM", "Join Group", "Store Info", "Get All"], channel);}listen(integer chan, string name, key id, string mes)    {    if(mes == "Get LM")    {        llGiveInventory(gAV, "DarkWatch Customs Choppers");    } else if(mes == "Join Group")    {        llInstantMessage(gAV, message + " secondlife:///app/group/" + group_id + "/about");    } else if(mes == "Store Info")    {        llGiveInventory(gAV, "DarkWatch Ad");    } else if(mes == "Give All")    {        llInstantMessage(gAV, message + " secondlife:///app/group/" + group_id + "/about");        llGiveInventory(gAV, "DarkWatch Ad");        llGiveInventory(gAV, "DarkWatch Customs Choppers");    }}}

 that should work

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4097 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...