Bot Openkore Mungut Sampah/Drop Item Tanpa Basa Basi !!!

Sama seperti judulnya, tanpa basa basi.. buka file CoreLogic.pm, cari baris:

##### ITEMS AUTO-GATHER #####
sub processItemsAutoGather {
	if ( (AI::isIdle || AI::action eq "follow"
		|| ( AI::is("route", "mapRoute") && (!AI::args->{ID} || $config{'itemsGatherAuto'} >= 2)  && !$config{itemsTakeAuto_new}))
	  && $config{'itemsGatherAuto'}
	  && !$ai_v{sitAuto_forcedBySitCommand}
	  && ($config{'itemsGatherAuto'} >= 2 || !ai_getAggressives())
	  && percent_weight($char) < $config{'itemsMaxWeight'}
	  && timeOut($timeout{ai_items_gather_auto}) ) {

		foreach my $item (@itemsID) {
			next if ($item eq ""
				|| !timeOut($items{$item}{appear_time}, $timeout{ai_items_gather_start}{timeout})
				|| $items{$item}{take_failed} >= 1
				|| pickupitems(lc($items{$item}{name})) eq "0"
				|| pickupitems(lc($items{$item}{name})) == -1 );
			if (!positionNearPlayer($items{$item}{pos}, 12) &&
			    !positionNearPortal($items{$item}{pos}, 10)) {
				message TF("Gathering: %s (%s)n", $items{$item}{name}, $items{$item}{binID});
				gather($item);
				last;
			}
		}
		$timeout{ai_items_gather_auto}{time} = time;
	}
}

##### ITEMS GATHER #####
sub processItemsGather {
	if (AI::action eq "items_gather" && AI::args->{suspended}) {
		AI::args->{ai_items_gather_giveup}{time} += time - AI::args->{suspended};
		delete AI::args->{suspended};
	}
	if (AI::action eq "items_gather" && !($items{AI::args->{ID}} && %{$items{AI::args->{ID}}})) {
		my $ID = AI::args->{ID};
		message TF("Failed to gather %s (%s) : Lost targetn", $items_old{$ID}{name}, $items_old{$ID}{binID}), "drop";
		AI::dequeue;

	} elsif (AI::action eq "items_gather") {
		my $ID = AI::args->{ID};
		my ($dist, $myPos);

		if (positionNearPlayer($items{$ID}{pos}, 12)) {
			message TF("Failed to gather %s (%s) : No looting!n", $items{$ID}{name}, $items{$ID}{binID}), undef, 1;
			AI::dequeue;

		} elsif (timeOut(AI::args->{ai_items_gather_giveup})) {
			message TF("Failed to gather %s (%s) : Timeoutn", $items{$ID}{name}, $items{$ID}{binID}), undef, 1;
			$items{$ID}{take_failed}++;
			AI::dequeue;

		} elsif ($char->{sitting}) {
			AI::suspend();
			stand();

		} elsif (( $dist = distance($items{$ID}{pos}, ( $myPos = calcPosition($char) )) > 2 )) {
			if (!$config{itemsTakeAuto_new}) {
				my (%vec, %pos);
				getVector(%vec, $items{$ID}{pos}, $myPos);
				moveAlongVector(%pos, $myPos, %vec, $dist - 1);
				move($pos{x}, $pos{y});
			} else {
				my $item = $items{$ID};
				my $pos = $item->{pos};
				message TF("Routing to (%s, %s) to take %s (%s), distance %sn", $pos->{x}, $pos->{y}, $item->{name}, $item->{binID}, $dist);
				ai_route($field->baseName, $pos->{x}, $pos->{y}, maxRouteDistance => $config{'attackMaxRouteDistance'});
			}		} else {
			AI::dequeue;
			take($ID);
		}
	}
}

======================== GANTI MENJADI ======================

##### ITEMS AUTO-GATHER #####
sub processItemsAutoGather {
	if ( (AI::isIdle || AI::action eq "follow"
		|| ( AI::is("route", "mapRoute") && (!AI::args->{ID} || $config{'itemsGatherAuto'} >= 2)  && !$config{itemsTakeAuto_new}))
	  && $config{'itemsGatherAuto'}
	  && !$ai_v{sitAuto_forcedBySitCommand}
	  && ($config{'itemsGatherAuto'} >= 2 || !ai_getAggressives())
	  && percent_weight($char) < $config{'itemsMaxWeight'}
	  && timeOut($timeout{ai_items_gather_auto}) ) {

		foreach my $item (@itemsID) {
			next if ($item eq ""
				|| !timeOut($items{$item}{appear_time}, $timeout{ai_items_gather_start}{timeout})
				|| $items{$item}{take_failed} >= 1
				|| pickupitems(lc($items{$item}{name})) eq "0"
				|| pickupitems(lc($items{$item}{name})) == -1 );
			if (!positionNearPortal($items{$item}{pos}, 10)) {
				message TF("Gathering: %s (%s)n", $items{$item}{name}, $items{$item}{binID});
				gather($item);
				last;
			}
		}
		$timeout{ai_items_gather_auto}{time} = time;
	}
}

##### ITEMS GATHER #####
sub processItemsGather {
	if (AI::action eq "items_gather" && AI::args->{suspended}) {
		AI::args->{ai_items_gather_giveup}{time} += time - AI::args->{suspended};
		delete AI::args->{suspended};
	}
	if (AI::action eq "items_gather" && !($items{AI::args->{ID}} && %{$items{AI::args->{ID}}})) {
		my $ID = AI::args->{ID};
		message TF("Failed to gather %s (%s) : Lost targetn", $items_old{$ID}{name}, $items_old{$ID}{binID}), "drop";
		AI::dequeue;

	} elsif (AI::action eq "items_gather") {
		my $ID = AI::args->{ID};
		my ($dist, $myPos);

		if (timeOut(AI::args->{ai_items_gather_giveup})) {
			message TF("Failed to gather %s (%s) : Timeoutn", $items{$ID}{name}, $items{$ID}{binID}), undef, 1;
			$items{$ID}{take_failed}++;
			AI::dequeue;

		} elsif ($char->{sitting}) {
			AI::suspend();
			stand();

		} elsif (( $dist = distance($items{$ID}{pos}, ( $myPos = calcPosition($char) )) > 2 )) {
			if (!$config{itemsTakeAuto_new}) {
				my (%vec, %pos);
				getVector(%vec, $items{$ID}{pos}, $myPos);
				moveAlongVector(%pos, $myPos, %vec, $dist - 1);
				move($pos{x}, $pos{y});
			} else {
				my $item = $items{$ID};
				my $pos = $item->{pos};
				message TF("Routing to (%s, %s) to take %s (%s), distance %sn", $pos->{x}, $pos->{y}, $item->{name}, $item->{binID}, $dist);
				ai_route($field->baseName, $pos->{x}, $pos->{y}, maxRouteDistance => $config{'attackMaxRouteDistance'});
			}		} else {
			AI::dequeue;
			take($ID);
		}
	}
}

===================================================

saya hanya melakukan penghapusan pada baris :

!positionNearPlayer($items{$item}{pos}, 12) &&

dan baris :

if (positionNearPlayer($items{$ID}{pos}, 12)) { message TF(“Failed to gather %s (%s) : No looting!n”, $items{$ID}{name}, $items{$ID}{binID}), undef, 1; AI::dequeue;

Terkadang dalam crowded map.. bot kita emoh mungut2 sampah/drop.. ini mungkin salah satu solusinya..

Semoga Membantu

ebo

Iklan
  • Trackback are closed
  • Komentar (6)
    • Tom
    • Maret 7th, 2011

    mantap
    bole saya minta macro , misalnya ada maho ato sejenisnya mendekat…
    bot langsung DC
    tq

      • ebo
      • Maret 7th, 2011

      oow keqnya dcOnCommand move to hell {
      whenStatusActive Lonceng Berbunyi
      }

      • kk saya minta bot buang stone dan ambil stone dunk..tujuannya buat ngumpulin monster pada 1 titik..gmn yah kk..

        • ebo
        • Agustus 5th, 2011

        itu kan pake skill, jadi satu slave khusus menggunakan skill ambil stone, trus di pickupitems txt nya di set stone -1

        jadi otomatis di drop stone nya.

    • Simon
    • Agustus 30th, 2011

    kk minta tolong donk gimana yah biar bot bisa aggresive.jadi bot saya sering kehilangan monster krn dia seperti nya menditeksi monster nya dahulu sebelum di pukul..mgkn kan timeout nya di ubah atau attack nya yg di ubah??
    thanks

      • ebo
      • September 21st, 2011

      coba otak atik di file timeout.txt nya. semoga berhasil ^^

Komentar ditutup.
Iklan
%d blogger menyukai ini: