Posts Tagged ‘ Ragnarok ’

Openkore Kill Steal – Optimisasi Lanjutan


Ternyata tulisan tentang cara setting bot openkore Kill Steal sangat di minati oleh para googler..sungguh suatu hal yang luar biasa.

Ironisnya, para developer openkore sengaja menambahkan fungsi no kill steal agar para pemain RO manual bisa lebih nyaman ‘berburu’ berdampingan dengan para botter.

Padahal masi banyak hal yang bisa di lakukan selain menghilangkan fungsi no kill steal di openkore. Kerennya, Banyak jalan menuju optimisasi..hehe

Berikut 2 cara yang mungkin bisa anda pakai :

Temukan artikel ini di blog kami yang baru:

Openkore Kill Steal – Optimisasi Lanjutan

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

Cara Modif Bot Openkore Kill Steal


Tulisan ini sudah saya pindahkan ke blog saya yang lain, silahkan klik link berikut Cara Modif Bot Openkore Kill Steal