View Single Post
  #1  
Old 12-02-2005, 01:38 PM
steve2 steve2 is offline
Steve (Scripter)
Join Date: Jul 2005
Location: Canada
Posts: 32
steve2 is on a distinguished road
Send a message via AIM to steve2 Send a message via MSN to steve2
Talking A simple script for you !! (WARNING: has errors)

Hello Guys!

Hmm this isnt that hard script its very simple but i still like this light effect....
I will give u this for free use and to learn of it, i think it can be helpfull if u new to gscript....just copy this script into a npc in ur leveleditor and touch it and u will have this weapon and can try it (use addweapon for online use and if u got NC in RC u could add it there )
Feel free to edit it

Keep trying and scripting and if u got any Questions about any scripts or such just feel free to post them here

Greetings

Steve -NAT-

PHP Code:
//#CLIENTSIDE
//NPC made by steve
// Light effect

if(created){
  
setimg block.png;
  
color = {0,0,0,0};
  
timeout 0.05;
}
if (
playertouchsme){
  
toweapons Light Mouse;
}
if(
timeout){
  for(
010++){
    
this.= (this.10) ? (this.0.5) : this.0;
    
showimg this.i,light2s.png,mousex,mousey;
    
changeimgcolors this.i,color[0],color[1],color[2],color[3];
    
changeimgzoom this.i,random(0.1,0.9);
    
changeimgvis this.i,1;
  }
  
timeout 0.05;
}
if(
playerchats){
  if(
strequals(#c,/red)) color = {0.5,0,0,0.5};
  
elseif(strequals(#c,/green)) color = {0,0.5,0,0.5};
  
elseif(strequals(#c,/yellow)) color = {0.5,0.5,0,0.5};
  
elseif(strequals(#c,/blue)) color = {0,0,0.5,0.5};
  
elseif(strequals(#c,/white)) color = {0.5,0.5,0.5,0.5};
  
elseif(strequals(#c,/end)) color = {0,0,0,0};
}
if (
weaponfired) {
  
say2
  Light Mouse made by Steve2
#b //Dont change this Line please :P
  
/"colour" to change the colour.#b
  
Colours are redbluewhite,#b
  
yellow,green!#b
  
type "/end" to turn it off,#b
  
to turn it on just set a Colour.#b


Last edited by steve2; 12-02-2005 at 05:50 PM..
Reply With Quote