Thread: Outfit Stealer
View Single Post
  #1  
Old 07-16-2006, 03:41 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Outfit Stealer

PHP Code:
//Made by Twinny
//#CLIENTSIDE
function onCreated() {
  
drawGui();
}

function 
drawGui() {
  
StealerWindow = new GuiWindowCtrl(StealerWindow);
  
  
with (StealerWindow) {
    
useownprofile = true;
    
profile        = "GuiBlueWindowProfile";
    
position      = "10 10";
    
extent        = "200 180";
    
canmove     = true;
    
canResize    = false;
    
canMaximize = false;
    
canClose      = false;
    
visible          = true;
    
text =  "Twinny's Outfit Stealer";
  
    new 
GuiPopUpMenuCtrl(StealerPopup) {
      
position  = "25 30";
      
extent    = "150 20";
      
profile    = "GuiBluePopUpMenuProfile";
      
rows      = "";
      
awake    = true;
      
clearrows();
      
thiso.catchevent(name, "onSelected", "ontst");
    }  
  
    new 
GuiScrollCtrl(StealerScroll) {
         
position   = "70 50";
         
profile    = "GuiBlueScrollProfile";
         
extent     = "55 55";
         
hscrollbar = "dynamic";
         
vscrollbar = "dynamic";
         
visible    = true;
         
canmove    = true;
        
         new 
GuiShowImgCtrl(StealerAni) {
           
position = "1 1";
           
ani      = "idle";
           
height   = "50";
           
width    = "50";
           
visible = true;
        }              
      }
      
    new 
GuiButtonCtrl(StealerButton) {
        
profile  = "GuiBlueButtonProfile";
        
position = "20 120";
        
extent   = "150 30";
        
text     = "Steal Outfit";
    }
  
  
  }
settimer(0.05);
GraalControl.addControl(StealerWindow);
}

function 
onTimeout() {
  
StealerPopup.clearrows();
  for (
i=0; i<allplayerscount; i++) {
    if (!
players[i].account==null) { //Saves RC/#channels
      
StealerPopup.addrow(i,players[i].account);
    }
  }
  
settimer(0.05);
}

function 
StealerButton.onAction() {
  
a = player.colors;
  
b = StealerAni.actor.colors;
  for (
i=0;i<5;i++) a[i] = b[i];
  
player.body      = StealerAni.actor.body;
  
player.head      = StealerAni.actor.head;
  
player.shield    = StealerAni.actor.shield;
}

function 
StealerPopup.onSelect() {
  
a = StealerAni.actor;
  
b = findplayer(StealerPopup.text);
  for (
i=0;i<5;i++) a.colors[i] = b.colors[i];
  
a.head = b.head;
  
a.shield = b.shield;
  
a.body = b.body;
}

function 
StealerButton.onAction() {
  
a = player;
  
b = StealerAni.actor;
  for (
i=0;i<5;i++) a.colors[i] = b.colors[i];
  
a.head = b.head;
  
a.shield = b.shield;
  
a.body = b.body;
  
player.chat = "Stealing" SPC StealerPopup.text @ "'s Outfit";
} 
Random thing i made to test something. Thought it was cool and cood be useful =)

[Edit]: Doesn't steal hats but i'm sure you could manage to add it if needed
Reply With Quote