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
Cozzie
Spam Generator
Spam Generator
Posts: 499
Joined: 04 Apr 2008, 09:30
Noob?: No
Location: Melbourne, City of beer and awful sushis

Re: Tele-search v2

#11 Post by Cozzie »

owh whoops I forgot to reload/restart the bot =x my bad sorry. Was sleepy last night.
Make Openkore Awesome. Join the team.

dgzo
Noob
Noob
Posts: 8
Joined: 26 May 2008, 11:01
Noob?: No

Re: Tele-search v2

#12 Post by dgzo »

May I know whats the difference between the function of this plugin and the built in openkore tele search?

Cozzie
Spam Generator
Spam Generator
Posts: 499
Joined: 04 Apr 2008, 09:30
Noob?: No
Location: Melbourne, City of beer and awful sushis

Re: Tele-search v2

#13 Post by Cozzie »

default plugin will only check if there is a monster and if there isnt, it will tele.

This plugin however will tele, walk for 5 seconds and then tele again. Much more sp efficient(on eA), less bot like, and overall just produces better performance.
Make Openkore Awesome. Join the team.

Bose
Noob
Noob
Posts: 3
Joined: 30 Jun 2008, 21:07
Noob?: Yes

Re: Tele-search v2

#14 Post by Bose »

I am using the latest SVN version of OK. The tele-search does not get initiated. I have routerandom_walk =1 so the char just walks around forever. I used plugin command to make sure the plugin is loaded. My config file contains:

teleport_search 1
teleport_search_minSp 10

teleportAuto_hp 10
teleportAuto_sp 0
teleportAuto_idle 0
teleportAuto_portal 0
teleportAuto_search 0
teleportAuto_minAggressives 0
teleportAuto_minAggressivesInLock 0
teleportAuto_onlyWhenSafe 0
teleportAuto_maxDmg 500
teleportAuto_maxDmgInLock 0
teleportAuto_deadly 1
teleportAuto_useSkill 1
teleportAuto_useChatCommand
teleportAuto_allPlayers 0
teleportAuto_atkCount 0
teleportAuto_atkMiss 10
teleportAuto_unstuck 0
teleportAuto_dropTarget 0
teleportAuto_dropTargetKS 0
teleportAuto_attackedWhenSitting 0
teleportAuto_totalDmg 0
teleportAuto_totalDmgInLock 0
teleportAuto_equip_leftAccessory
teleportAuto_equip_rightAccessory
teleportAuto_lostHomunculus
teleportAuto_useItemForRespawn

Timeout contains:

ai_teleport_search 5
ai_teleport 1
ai_teleport_away 3
ai_teleport_idle 4
ai_teleport_portal 2
ai_teleport_hp 3
ai_teleport_safe_force 120


Is anyone else having compatibility issues or am I missing something?

Bibian
Perl Monk
Perl Monk
Posts: 416
Joined: 04 Apr 2008, 03:08

Re: Tele-search v2

#15 Post by Bibian »

make sure you're able to teleport in the area and if you yourself can teleport

Bose
Noob
Noob
Posts: 3
Joined: 30 Jun 2008, 21:07
Noob?: Yes

Re: Tele-search v2

#16 Post by Bose »

yes i can teleport... i ve tried with tele command

Bibian
Perl Monk
Perl Monk
Posts: 416
Joined: 04 Apr 2008, 03:08

Re: Tele-search v2

#17 Post by Bibian »

then i dont know, it works just fine on my own chars

Bose
Noob
Noob
Posts: 3
Joined: 30 Jun 2008, 21:07
Noob?: Yes

Re: Tele-search v2

#18 Post by Bose »

which version of OK are you using? can u possibly upload ur config and timeout files? I want to make sure its not some external conflicts. Thanks.

fco2783
Plain Yogurt
Plain Yogurt
Posts: 95
Joined: 05 Apr 2008, 05:15
Noob?: Yes
Location: in place where you cant go
Contact:

Re: Tele-search v2

#19 Post by fco2783 »

im using t his old version of telesearch

Code: Select all

 #########################################################################
#  OpenKore - Telesearch Plugin v2
#  Copyright (c) 2006 ViVi
#
# This plugin is licensed under Creative Commons "Attribution-NonCommercial-ShareAlike 2.5"
#
# You are free:
#    * to copy, distribute, display, and perform the work
#    * to make derivative works
# 
# Under the following conditions:
#    * by Attribution: You must attribute the work in the manner specified by the author or licensor.
#    * Noncommercial: You may not use this work for commercial purposes.
#    * Share Alike: If you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one.
#
#    * For any reuse or distribution, you must make clear to others the license terms of this work.
#    * Any of these conditions can be waived if you get permission from the copyright holder.
#
# Your fair use and other rights are in no way affected by the above.
#
# This is a human-readable summary of the Legal Code ( Full License: http://creativecommons.org/licenses/by-nc-sa/2.5/legalcode ). 
# Disclaimer: http://creativecommons.org/licenses/disclaimer-popup?lang=en
# 
#########################################################################
package telesearchV2;

use strict;
use Plugins;
use Settings;
use Log qw(message error);
use Utils;
use AI;
use Globals;

Plugins::register('Tele-Search v2', 'Alternative tele-search v2.', \&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);
	message("Unloaded Teleport search v2.\n","info");
}
	   
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")) {
		return 1;
	} else {
		return 0;
	}
}

sub checkSp {
	if ($config{'teleportAuto_useSkill'} == 1) {
		if ($config{'teleport_search_minSp'} && $config{'teleport_search_minSp'} <= $char->{sp}) {
			return 1;
		} elsif (!$config{'teleport_search_minSp'} && $char->{sp} >= 10) {
			error ("teleport_search_minSp is missing ! Using default value (10 sp)!\n");
			$config{'teleport_search_minSp'} = 10;
			return 1;
		} else {
			return 0;
		}
	} elsif ($config{'teleportAuto_useSkill'} > 1) {
		return 1;
	}
}
sub search {
	if ($config{'teleport_search'} && Misc::inLockMap() && $timeout{'ai_teleport_search'}{'timeout'}) {
		message("TS Debug: Config set, we're in lockMap and timeout is set.\n") if $config{'teleport_search_debug'};
		if ($maploaded && !$allow_tele)  {
			message("TS Debug: Map is loaded but we're not allowed to teleport.\n") if $config{'teleport_search_debug'};
			$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() && checkSp()) {
			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 ("Fatal error, we dont have the skill nor items to teleport! - Unloading plugin.\n");
				unload();
				return;
			} 

		# We're doing something else besides looking for monsters, reset the timeout.
		} elsif (!checkIdle()) {
			message("TS Debug: We're doing something else besides looking for a target now.\n") if $config{'teleport_search_debug'};
			$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 now!\n");
			$timeout{'ai_teleport_search'}{'timeout'} = 5;
			return;
        }
}

return 1;
im just wondering if you guys could add teleportAuto_equip_leftAccessory Clip and teleportAuto_equip_rightAccessory commands...

because im using a clip changing when im botting...

Cozzie
Spam Generator
Spam Generator
Posts: 499
Joined: 04 Apr 2008, 09:30
Noob?: No
Location: Melbourne, City of beer and awful sushis

Re: Tele-search v2

#20 Post by Cozzie »

cant you do this in the teleportAuto block part of the config?
Make Openkore Awesome. Join the team.

Post Reply