Weaponfired is kinda passive.

I’m having a problem with a script I’m making. It seems all I have to do is fire this script once and then for some reason, talking triggers the script again.

For example:

I enter the level.
I can talk fine without triggering the NPC.
I fire the NPC.
It works fine, except now talking triggers the NPC too.

if (weaponfired&&strequals(#L,sleepymines.nw)) {
  freezeplayer 0.6;
  setani zolderon_pickaxe,;
  i = random(1,100);
}
if (i=>97&&i<100) {
  setplayerprop #c, You found Silver!;
  this.silver++;
}
if (i=>90&&i<97){
  setplayerprop #c, You found Tin!;
  this.tin++;
}
if (i=>80&&i<90) {
  setplayerprop #c, You found Copper!;
  this.copper++;
}
if (i=>1&&i<80) {
  setplayerprop #c, You found nothing.;
}

Any suggestions?

Include the flags within the trigger to have them activated by the trigger itself, instead of when a trigger (like ‘playerchats’) just causes the code to be re-read.

[code]
if (weaponfired&&strequals(#L,sleepymines.nw)) {
freezeplayer 0.6;
setani zolderon_pickaxe,;
i = random(1,100);

if (i=>97&&i<100) {
setplayerprop #c, You found Silver!;
this.silver++;
}
if (i=>90&&i<97){
setplayerprop #c, You found Tin!;
this.tin++;
}
if (i=>80&&i<90) {
setplayerprop #c, You found Copper!;
this.copper++;
}
if (i=>1&&i<80) {
setplayerprop #c, You found nothing.;
}
}[/code]

Thanks for the help, guys. Working perfectly now.

zolderon_pickaxe.png -.-

Anyone know where Zolderon comes from?