@Qpalzm dan bandjoel
Saya rasa itu begini :
[codebox]
sub autorefine {
# Initiate autorefine, AI must be idle
if ($config{'refineAuto'} && AI::isIdle) {
AI::queue('refineAuto');
Log::message "
refineAuto initiated\n";
}
elsif (AI::is('refineAuto')) {
my $args = AI::args;
if (!$args->{npc}) {
$args->{npc} = {};
main::getNPCInfo($config{refineAuto_npc},
$args->{npc});
}
# Move to NPC if needed
elsif (($field{name} ne $args->{npc}{map})
|| ((Utils::distance($args->{npc}{pos}, $char->{pos_to})
> $config{refineAuto_distance}))) {
Log::message "Calculating refineAuto route to: " .
"$maps_lut{$args->{npc}{map}.'.rsw'}" .
"($args->{npc}{map}): " .
"$args->{npc}{pos}{x}, " .
"$args->{npc}{pos}{y}\n", "route";
main::ai_route($args->{npc}{map}, $args->{npc}{pos}{x},
$args->{npc}{pos}{y},
distFromGoal =>
$config{refineAuto_distance});
} else {
# We arrived at refiner
# Check arguments for incremental refining
# If refineAuto_incremental is invalid or not specified
# Set refineAuto_incremental to maxRefine
if (!($config{refineAuto_incremental} > 0
&& $config{refineAuto_incremental}
< $config{refineAuto_maxRefine})) {
$config{refineAuto_incremental} =
$config{refineAuto_maxRefine};
}
# Equipped and ready to refine
if ($args->{equip}) {
refine_item($args);
}
# Check if we have all the requirements
elsif (check_requirements($args)) {
equip_item($args);
}
}
}
}
[/codebox]
Jadi.. si plugins nya memeriksa dlu.. apakah lagi
idle dan di config
refineAuto =
1 ato tidak..
jika iya.. maka melakukan ini :
artinya memasukan
refineAuto ke daftar antrian
AI
lalu :
Code:
elsif (AI::is('refineAuto'))
------------------------------------------------------------------
Jadi pada intinya..
Jangan lupa set di
config.txt :
Code:
refineAuto 1
attackAuto 0
lockMap (kosongkan)
saveMap (kosongkan)
item_takeAuto 0
item_gatherAuto 0
storageAuto 0
sitAuto_idle 0