Tele-search v2

Other plugins for extending OpenKore's functionality. This forum is only for posting new plugins and commenting on existing plugins. For support, use the Support forum.

Moderator: Moderators

Message
Author
Vercix
Noob
Noob
Posts: 5
Joined: 01 Aug 2009, 23:46
Noob?: No

Re: Tele-search v2

#41 Post by Vercix »

This plugin seems great, but (not sure if it's just me), but for the latest svn of openkore, it won't function. It worked for me in the previous version, but it's a different story here.

Have the latest version of tele-search v2 (obtained from svn site)

Config:

teleport_search 1
teleport_search_minSp < 10

Timeouts:

ai_teleport_search 5

The plugin shows up in when I type plugin within the console, so I'm at a loss.

Vercix
Noob
Noob
Posts: 5
Joined: 01 Aug 2009, 23:46
Noob?: No

Re: Tele-search v2

#42 Post by Vercix »

Well it sorta works now, but like others, it just teles all over the place, w/o killing, I even set the timeouts way high, and it still goes everywhere

Mushroom
Perl Monk
Perl Monk
Posts: 427
Joined: 04 Apr 2008, 14:04
Noob?: No
Location: Brazil

Re: Tele-search v2

#43 Post by Mushroom »

Did you set attackAuto, mon_control.txt...?
Quit.

Vercix
Noob
Noob
Posts: 5
Joined: 01 Aug 2009, 23:46
Noob?: No

Re: Tele-search v2

#44 Post by Vercix »

yup attack auto 2
and
Monster_name 1 0 1

My bot just warps in an infinite loop until it runs out of sp and goes to heal

*edit*

The plugin works, it's a problem with openkore and how my server treats the teleport skill (no window of confirmation)

Oni
Noob
Noob
Posts: 4
Joined: 22 Sep 2009, 09:33
Noob?: Yes

Re: Tele-search v2

#45 Post by Oni »

Hi there.
Got a problem ^^
everything seem to be good in config,timeouts and mon_control, I verified this several times.
I don' get it. I'm using the last version of openkore in one folder and the svn version in another one (why try only with one version when I can duplicate folders ^^)

When loading in my lockmap, the behaviour of my bot is the following :
First it moves in search of the monsters in mon_control and kill them if found.
But when no monsters found (when having moved ai_teleport_search seconds), it teleports and the problem happens at this first teleportation.
After that teleportation, the bot spam tp and does nothing else.

I'm playing on a private serv that don't requires confirmation (no window) when you use tp lvl 1 (so when my rogue bot use his tp clip), it maybe this (according to the post above mine). Is there a way to have the plugin work in that case ? (and I hope so because this plugin seems to be quite useful for what i've in mind).

I'm also playing with xkore on, but it don't think it's the reason since in the previous thread about this plugin, it's said that it works with xkore.

ynamino
Noob
Noob
Posts: 1
Joined: 12 Dec 2009, 23:37
Noob?: Yes

Re: Tele-search v2

#46 Post by ynamino »

uhh...the download link is broken... can anyone post a mirror link??

thx

keicee
Noob
Noob
Posts: 9
Joined: 24 Apr 2008, 05:51

Re: Tele-search v2

#47 Post by keicee »

Is this plugin can still run on new versions of openkore? and the download link seems to be broken :roll:

Scarya
Moderators
Moderators
Posts: 136
Joined: 26 May 2008, 12:25
Noob?: No

Re: Tele-search v2

#48 Post by Scarya »

Just copy the plugin from 2nd post.

Topic locked due no further improvement (and to lock down noobs).
PM me for reopening.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots.
So far, the universe is winning.

Richard Cook

Wiki

User avatar
4epT
Developers
Developers
Posts: 617
Joined: 30 Apr 2008, 14:17
Noob?: No
Location: Moskow (Russia)
Contact:

Re: Tele-search v2

#49 Post by 4epT »

last version:

Code: Select all

# =======================
# Tele-Search v2.1
# =======================
# This plugin is licensed under the GNU GPL
# Copyright (c) 2006 by ViVi [mod by ya4ept]
#
# http://forums.openkore.com/viewtopic.php?f=34&t=134
# http://sourceforge.net/p/openkore/code/HEAD/tree/plugins/tele-search%20v2/trunk/
#
# Example (put in config.txt):
#	route_randomWalk 1
#	teleport_search 1
#	teleport_search_minSp 10
#
# Put in timeouts.txt:
#	ai_teleport_search 5

package telesearchV2;

use strict;
use Plugins;
use Globals qw($char %config $net %timeout);
use Log qw(message error);
use Utils qw(timeOut);


Plugins::register('Tele-Search v2', 'Alternative tele-search v2.', \&unload, \&unload);

my $hooks = Plugins::addHooks(
	['AI_pre',\&search, undef],
	['map_loaded', \&MapLoaded, undef],
	['packet/sendMapLoaded', \&MapLoaded, undef],
);

my ($maploaded,$allow_tele);

# Set $maploaded to 1, this incase we reload the plugin for whatever reason...
if ($net && $net->getState() == Network::IN_GAME) {
	$maploaded = 1;
}

sub unload {
	Plugins::delHooks($hooks);
	undef $maploaded;
	undef $allow_tele;
	message "Tele-Search v2 plugin unloading or reloading\n", 'success';
}

sub MapLoaded {
	$maploaded = 1;
}

sub checkIdle {
	if (AI::action eq "move" && AI::action(1) eq "route" || AI::action eq "route" && !AI::inQueue("attack","skill_use", "buyAuto", "sellAuto", "storageAuto")) {
		return 1;
	} else {
		return 0;
	}
}

sub search {
	if ($config{'teleport_search'} && Misc::inLockMap() && $timeout{'ai_teleport_search'}{'timeout'}) {

		if ($maploaded && !$allow_tele) {
			$timeout{'ai_teleport_search'}{'time'} = time;
			$allow_tele = 1;

		# Check if we're allowed to teleport, if map is loaded, timeout has passed and we're just looking for targets.
		} elsif ($maploaded && $allow_tele && timeOut($timeout{'ai_teleport_search'}) && checkIdle()) {
			message ("Attemping to tele-search.\n","info");
			$allow_tele = 0;
			$maploaded = 0;
			# Attempt to teleport, give error and unload plugin if we cant.
			if (!Misc::useTeleport(1)) {
				error ("Unable to tele-search cause we can't teleport!\n");
				return;
			} 

		# We're doing something else besides looking for monsters, reset the timeout.
		} elsif (!checkIdle()) {
			$timeout{'ai_teleport_search'}{'time'} = time;
		}

		# Oops! timeouts.txt is missing a crucial value, lets use the default value ;)
		} elsif (!$timeout{'ai_teleport_search'}{'timeout'}) {
			error ("timeouts.txt missing setting! Using default timeout of 5 seconds.\n");
			$timeout{'ai_teleport_search'}{'timeout'} = 5;
			return;
		}
}

1;
All my posts are made by machine translator!
¤ Manual ¤ Anti BotKiller ¤ Packet Extractor v3 ¤
Image
Image

xylu
Noob
Noob
Posts: 2
Joined: 06 Nov 2010, 01:26
Noob?: No

Re: Tele-search v2

#50 Post by xylu »

well it doesn't seem to tele every 5 seconds.

Post Reply