sub RollerTarget {
my %args =(
TARGET=>0,
@_,
);
my $ret_val = $TARGET;
return $ret_val;
}
sub RollerTarget {
my %args =(
TARGET=>0,
@_,
);
my $ret_val = $args{TARGET};
return $ret_val;
}
sub RollerTarget {
# set $target to the passed argument, or 0 if none passed.
$target = shift or 0;
}
RollerTarget(123);
$target = $args{TARGET};
package FL_roller;
#: Version: 1.0.0
#: Description: Rolling Plugin for FL
#: Author: Chase Baggett
#
void $world->makepermanent($target);
sub target {
$target = $_;
}
@array = (30..$target);
foreach (@array) {
$::world->trigger('$_', 'roll', { name => 'sample:misc' });
}
Trying to write a rolling plugin that execuites the "roll" command when it sees something below the $target variable.
written this so far by modifying the sample plugin
If I manually set $target to a number, it rolls perfectly until it has a number above that one.
I am toying with how to add a command to set $target, yet no matter what I do it doesn't seem to be work.
Looking at sample plugins I thought it would be something like:
But that doesn't work.
Anyone know anything about writing plugins for Kildclient?
I have zero perl knowledge, basically just stabbing in the dark hoping it works.