Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Tower Teleporter - up
  2. // Written by PanteraPolnocy Resident
  3.  
  4. integer isOnline=1;
  5. teleFunc() {
  6.     llSetSitText(llGetObjectName());
  7.     vector destPos=llGetPos()+<0.0,0.0,5.35>;
  8.     vector destination=(destPos-llGetPos())*(ZERO_ROTATION/llGetRot());
  9.     llSitTarget(destination,ZERO_ROTATION);
  10.     llSleep(0.5);
  11. }
  12. default {
  13.     state_entry() {
  14.         if(isOnline==1) {teleFunc();}
  15.         llListen((integer)("0x"+llGetSubString(llMD5String((string)llGetOwner(),1),0,6))-30,"",NULL_KEY,"");
  16.         llOwnerSay("Diagnostics OK, teleporter <UP> online.");
  17.     }
  18.     on_rez(integer px) {
  19.         if(isOnline==1) {teleFunc();}
  20.         llResetScript();
  21.     }
  22.     listen(integer channel,string name,key id,string msg) {
  23.         if(msg=="TeleOn") {
  24.             isOnline=1;
  25.             teleFunc();
  26.         }
  27.         if(msg=="TeleOff") {
  28.             isOnline=0;
  29.             llSitTarget(<0,0,0>,ZERO_ROTATION);
  30.         }
  31.     }
  32.     changed(integer py) {
  33.         if(isOnline==1) {
  34.             teleFunc();
  35.             llUnSit(llAvatarOnSitTarget());
  36.         }
  37.     }
  38.     touch(integer xx) {
  39.         if(isOnline==0) {
  40.             llSay(0,"Teleporter has been disabled by the administrator.");
  41.         }
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement