bdhtrn

deployboy>bigpy

Sep 12th, 2011
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. list pieces=[];
  2. list places=[];
  3. list ranchans=[];
  4. integer ncline;
  5. key ncQryKey;
  6.  
  7. deployall(){
  8.     integer i;
  9.     string name;
  10.     integer listlen = llGetListLength(pieces);
  11.     vector pos;    rotation rot;
  12.     for(i=0;i<listlen;i++){
  13.         name=llList2String(pieces,i);
  14.         rot=ZERO_ROTATION;
  15.         if(name=="bpy.holodoor")
  16.             rot=llEuler2Rot(<0,-50,90>*DEG_TO_RAD);
  17.         llRezObject(name,llGetPos(),ZERO_VECTOR,rot,llList2Integer(ranchans,i));
  18.     }
  19.     for(i=0;i<listlen;i++){
  20.         pos=llGetPos()+(vector)llList2String(places,i);
  21.         llSay(llList2Integer(ranchans,i),(string)pos);
  22.     }
  23.     llSleep(0.5);
  24.     llShout(4321,"go");
  25.     llSleep(0.85);
  26.     llShout(-33314444,"o");
  27.     llSleep(0.5);
  28.     llShout(-1555,"go");
  29. }
  30.  
  31. default{
  32.     on_rez(integer p){
  33.         if(p==0)
  34.             llSetPos(llGetPos()-<0,0,0.1>);
  35.     }
  36.     state_entry(){
  37.         llListen(0,"",llGetOwner(),"");
  38.         ncline=0;
  39.         ncQryKey=llGetNotecardLine("deploydata",ncline);
  40.     }
  41.     touch_start(integer num){
  42.         if(llDetectedKey(0)==llGetOwner()){
  43.             llRegionSay(-998889,"x");
  44.             llSetAlpha(0,-1);
  45.             deployall();
  46.         }
  47.     }
  48.     listen(integer chan,string who,key id,string msg){
  49.         if(msg=="packup"){
  50.             llRegionSay(-998889,"x");
  51.             llSetAlpha(1,-1);
  52.         }
  53.     }
  54.     dataserver(key qry_id, string in){
  55.         list cmdpair=[];
  56.         if(ncQryKey == qry_id){
  57.             if(in!=EOF){
  58.                 cmdpair=llParseString2List(in,["#"],[]);
  59.                 pieces+=llList2String(cmdpair,0);
  60.                 places+=llList2String(cmdpair,1);
  61.                 ranchans+=(integer)llFrand(-40000)-40000;
  62.                 ncline++;
  63.                 ncQryKey=llGetNotecardLine("deploydata",ncline);
  64.             }
  65.         }
  66.     }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment