Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #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=0i<allplayerscounti++) {
    if (!
players[i].account==null) { //Saves RC/#channels
      
StealerPopup.addrow(i,players[i].account);
    }
  }
  
settimer(0.05);
}

function 
StealerButton.onAction() {
  
player.colors;
  
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() {
  
StealerAni.actor;
  
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() {
  
player;
  
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
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:28 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.