Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- key Owner;
- key av;
- integer chan;
- integer listen_handle;
- Say(key av, string msg)
- {
- llRegionSayTo(av,0,msg);
- }
- default
- {
- state_entry()
- {
- Owner = llGetOwner();
- chan = -(integer)("0x"+llGetSubString((string)llGetKey(),-8,-1)) -38628;
- }
- on_rez(integer start_param)
- {
- llResetScript();
- }
- touch_end(integer num)
- {
- av = llDetectedKey(0);
- Say(av,"You touched me!");
- llSetTimerEvent(120.0);
- listen_handle = llListen(chan,"",av,"");
- llTextBox(av, "\nTell me something good:", chan);
- }
- collision_start(integer num)
- {
- av = llDetectedKey(0);
- //Call your function below this comment:
- Say(av,"Ouch! You hit me!");
- }
- listen(integer channel, string name, key id, string msg)
- {
- if(channel == chan)
- {
- llListenRemove(listen_handle);
- av = id;
- //Call your function below this comment:
- Say(av,msg);
- }
- }
- timer()
- {
- llSetTimerEvent(0.0);
- llListenRemove(listen_handle);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement