Thread: Money for all!
View Single Post
  #6  
Old 07-28-2007, 09:59 PM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
Quote:
Originally Posted by Crow View Post
Exactly what Wan said. To explain that a bit: an npc needs a shape (setshape or setshape2) so it can be triggered.
ok, i have done all of this and i put it in a class, but it still gives money to other players...

here is my script:
PHP Code:
//NPC Made By *theHAWKER
function onCreated(){
  
setshape(1,32,48);
  
setimg("gl_target.png");
  
this.chat "Shoot Me!";
  
setTimer(.1);
}
function 
onActionAdd(){
  
with(findplayer(params[0])){
    
player.rupees += int(random(0,20));
  }
}
function 
onTimeout(){
hide();
sleep(random(1,3));
show();
sleep(random(1,3));
  
setTimer(.3);
}
//#CLIENTSIDE
function onWasShot(){
  
this.chat "Hit!";
  
triggeraction(x,y,"add",player.account);
  
sleep(.5);
  
this.chat "Shoot Me!";

__________________
**FLIP OUT**
Reply With Quote