Jump to content

Help with Dialog


Shymus Roffo
 Share

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

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

Recommended Posts

i have been trying to find a way to keep track of objects handed out by a locker and i have'nt been able to do that....

 

I already have the locker so its handing out stuff i am just working on the database script wich keeps all i am hoping to use link message and keep it in a differant script so i can turn off the database when needed

Link to comment
Share on other sites

ok - in the touch event, after the llGiveInventory you use llMessageLinked(-4, 0, "", llDetectedKey(0)); - this sends a message with the key to scripts in the same prim. In the other script you use the link_message event:

link_message(integer sender_num, integer num, string msg, key id)     {        if (sender_num == 0) {           key receiver = id;           //save id in some way        }    }

 

Link to comment
Share on other sites

ok - if you have like 3 items, just keep 3 counters like item1, item2 and item3 as global variables. use the string variable to send which items has been taken and increment the according counter:

link_message(integer sender_num, integer num, string msg, key id)     {        if (sender_num == 0) {           if(msg == "item1) {              ++item1            } else if (msg == "item2) {              ++item2;           }           ...        }    }

 there are more elegant ways, but that would do.

Link to comment
Share on other sites

If I were writing this script, I wouldn't write a separate script to keep track of something simple like that.  It just adds to the sim's server load unnecessarily.  All you're talking about is counting, so take Darkie's example and bury it in your main script.  When you give away something, increment its counter.  You can ask the script to dump the saved values of the counters to you, the owner, when you send it an appropriate trigger mssage. 

 

if ((id == llGetOwner()) && (msg == "report")){    llRegionSayTo(llGetOwner(),0,"Item 1 = " + (strng)val1 + " \nItem 2 = " + (string)val2 + " \nItem 3 = " + (string)val3); //And so forth}

 

 

Link to comment
Share on other sites

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...