View Single Post
  #1  
Old 09-08-2011, 06:23 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
A Small Staff Tool

It will allow you to refill arrows, bombs, health and money.
It will also allow you to nuke a level.
NOTE: if your on a gmap it will nuke all surrounding levels that are one level from the level you are on. @cbk1994 thanks for the correction

PHP Code:
function onActionServerSide() {
  if (
params[0] == "Arrows") {
    
//Fills your arrows.
    
player.darts 99;
    
player.chat "Arrows Refilled!";
  }
  if (
params[0] == "Bombs") {
    
//Fills your bombs.
    
player.bombs 99;
    
player.chat "Bombs Refilled!";
  }
  if (
params[0] == "Health") {
    
//Fills your health.
    
player.hearts player.maxhp;
    
player.chat "Health Refilled!";
  }
  if (
params[0] == "Money") {
    
//Gives you 100000 Rupees.
    
player.rupees "100000";
    
player.chat "Money Refilled!";
  }
  if (
params[0] == "Nuke") {
    for (
temp.plplayers) {
      
//Nukes everyone but you.
      
if (temp.pl.account != player.account) {
        
temp.pl.hearts 0;
        
temp.pl.chat "Nuked!";
        
player.chat "Nuked Everyone!";
      }
    }
  }
}

//#CLIENTSIDE
function onCreated() {
  
//Creates the gui's to display.
  
new GuiScrollCtrl("Tools_Scroll") {
    
profile GuiBlueScrollProfile;
    
screenwidth 55;
    
0;
    
width 55;
    
height 89;
    
hScrollBar "dynamic";
    
vScrollBar "dynamic";
    new 
GuiTextListCtrl("Tools_List") {
      
profile GuiBlueTextListProfile;
      
0;
      
width 140;
      
clearrows();
      
addrow(0"Arrows");
      
addrow(1"Bombs");
      
addrow(2"Health");
      
addrow(3"Money");
      
addrow(4"Nuke");
    }
  }
  new 
GuiButtonCtrl("Give_Button") {
    
profile GuiBlueButtonProfile;
    
text "Select";
    
width 55;
    
height 20;
    
screenwidth 55;
    
88;
  }
  
settimer(0.05);
}

function 
Give_Button.onAction() {
  
//Checks which text is selected and does the defined action.
  
temp.item Tools_List.getSelectedText();
  
GraalControl.makeFirstResponder(true);
  if (
temp.item == "Arrows") {
    
triggerserver("weapon"this.name"Arrows");
  }
  if (
temp.item == "Bombs") {
    
triggerserver("weapon"this.name"Bombs");
  }
  if (
temp.item == "Health") {
    
triggerserver("weapon"this.name"Health");
  }
  if (
temp.item == "Money") {
    
triggerserver("weapon"this.name"Money");
  }
  if (
temp.item == "Nuke") {
    
triggerserver("weapon"this.name"Nuke");
  }
}

function 
onTimeout() {
  
//Makes sure all the gui parts are in the right spots constantly.
  
Tools_Scroll.screenwidth 55;
  
Tools_Scroll.0;
  
Give_Button.screenwidth 55;
  
Give_Button.88;
  
settimer(0.05);

Yes i know this is a fairly basic script, but im sure someone out there wouldn't mind this, or even find some joy using it. *Cough* Nuke *Cough*
Attached Images
 
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion

Last edited by Gunderak; 09-09-2011 at 04:57 AM..
Reply With Quote