Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Outfit Stealer (https://forums.graalonline.com/forums/showthread.php?t=67383)

Twinny 07-16-2006 03:41 AM

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


All times are GMT +2. The time now is 12:08 PM.

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