Quote:
Originally Posted by Crow
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!";
}