OpenMap Plugin by SulphurEagle

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
b0xx0r
Noob
Noob
Posts: 3
Joined: 10 Oct 2008, 02:34
Noob?: No

Re: OpenMap Plugin by SulphurEagle

#21 Post by b0xx0r »

aapikz wrote:oh i got a problem in openmap plugin
when i put the plugin in plugins folder it have a syntax error on my bot..
Did you not read the thread?
kenkor wrote:I know that double-posting is not allowed but to make it more clear.

#For SVN Version
What I did was:

1.- Download the XML-Simple-2.18.tar.gz
2.- Extract the files somewhere.
3.- Move the /lib/xml (THE FOLDER XML from the tar.gz) and move it to: (your bot folder) \src\deps
4.- Execute your bot.
5.- Execute your openmap and follow the instruction in the first post.
6.- Enjoy it.

This work for me, and if doesn't work it notify me please.

(Sorry my english)
I had the same problem, took the 2.5 minutes it took to read this post I just quoted and do what it said, and it works perfectly. Please take some time in the future to read, before asking ridiculous questions.

(I know I'm new here, but being a developer for 5+ years, this really irks me...)

aapikz
Human
Human
Posts: 44
Joined: 18 Sep 2008, 11:31
Noob?: Yes

Re: OpenMap Plugin by SulphurEagle

#22 Post by aapikz »

oh thnx.. sorry..

my wrong is i move the whole /lib/ file not the xml ..

so it now works for me ^^ thnx a lot^^

i thought my bot will walk when i click the map^^
so is it not click move hehe...

im not too satisfy^^
is it there a program or plugins that can make my bot move when i click it in the map^^

btw..

thnx a lot..it is cool!!!!!!!

boyhehe
Noob
Noob
Posts: 1
Joined: 09 Jun 2009, 23:56
Noob?: No

Re: OpenMap Plugin by SulphurEagle

#23 Post by boyhehe »

Can i ask where to get maps since Ragnarok has been updated now some maps aren't included in the plugin

iamanoob
Plain Yogurt
Plain Yogurt
Posts: 82
Joined: 04 Apr 2008, 09:49

Re: OpenMap Plugin by SulphurEagle

#24 Post by iamanoob »

aapikz wrote:oh thnx.. sorry..

my wrong is i move the whole /lib/ file not the xml ..

so it now works for me ^^ thnx a lot^^

i thought my bot will walk when i click the map^^
so is it not click move hehe...

im not too satisfy^^
is it there a program or plugins that can make my bot move when i click it in the map^^

btw..

thnx a lot..it is cool!!!!!!!
there's WX for that click move

btw, it is java (hogs resources)
edit it if you want, ive edited mine xD
of course, still credits to Sulphur Eagle
Image
DARKest Ninja

flowerboy
Noob
Noob
Posts: 3
Joined: 05 Apr 2010, 20:32
Noob?: Yes

Re: OpenMap Plugin by SulphurEagle

#25 Post by flowerboy »

:) :) wow...its working fine for me...im using openkore 2.0.7...im boting 3 chars..weeeeee..thnks for sharing this....nice job...more power to openkore...!!! :) :)

chanpepsi
Noob
Noob
Posts: 1
Joined: 09 Jun 2010, 10:43
Noob?: Yes

Re: OpenMap Plugin by SulphurEagle

#26 Post by chanpepsi »

cool

tooter666
Noob
Noob
Posts: 3
Joined: 23 May 2011, 23:18
Noob?: Yes

Re: OpenMap Plugin by SulphurEagle

#27 Post by tooter666 »

is this still working with the latest version of openkore i cant make it work.

Code: Select all

*** OpenKore what-will-become-2.1 ( r7734 ) - Custom Ragnarok Online client ***
***   http://www.openkore.com/   ***

Loading all plugins...
Loading plugin plugins/breakTime.pl...
Loading plugin plugins/macro.pl...
Loading plugin plugins/openmap.pl...
Variable "%field" is not imported at C:/Users/a/Music/Openkore/plugins/open
e 31.
Variable "%field" is not imported at C:/Users/a/Music/Openkore/plugins/open
e 36.
Variable "%field" is not imported at C:/Users/a/Music/Openkore/plugins/open
e 37.
This plugin cannot be loaded because of a problem in the plugin. Please notify
the plugin's author about this problem, or remove the plugin so OpenKore can
start.

The error message is:
Plugin contains syntax errors:
Global symbol "%field" requires explicit package name at
C:/Users/Solamo/Music/Openkore/plugins/openmap.pl line 31.
Global symbol "%field" requires explicit package name at
C:/Users/Solamo/Music/Openkore/plugins/openmap.pl line 36.
Global symbol "%field" requires explicit package name at
C:/Users/Solamo/Music/Openkore/plugins/openmap.pl line 37.

Press ENTER to exit this program.

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

Re: OpenMap Plugin by SulphurEagle

#28 Post by Mushroom »

Try

Code: Select all

package OpenMap;

use strict;
use Utils;
use Plugins;
use XML::Simple;
use Globals;

Plugins::register("openmap", "OpenMap Plugin", \&on_unload, \&on_reload);
my $aiHooks = Plugins::addHooks(	["AI_pre", \&on_AI],
									["AI_pre/manual", \&on_AI]);

sub on_unload
{
	Plugins::delHooks($aiHooks);
}

sub on_reload
{
	&on_unload;
}

sub on_AI
{
	if (timeOut($AI::Timeouts::stateUpdate, 0.5))
	{
		my %state;
		my $f;
		$AI::Timeouts::stateUpdate = time;

		if ($field->{name} && $net->getState() == Network::IN_GAME)
		{
			my $pos = calcPosition($char);
			%state = (
				connectionState => 'in game',
				fieldName => $field->{name},
				fieldBaseName => $field->{baseName},
				charName => $char->{name},
				x => $pos->{x},
				y => $pos->{y}
			);
			$state{actors} = {};
			foreach my $actor (@{$npcsList->getItems()}, @{$playersList->getItems()}, @{$monstersList->getItems()})
			{
				my $actorType = $actor->{actorType};
				$state{actors}{$actorType} ||= [];
				push @{$state{actors}{$actorType}},a
				{
					x => $actor->{pos_to}{x},
					y => $actor->{pos_to}{y}
				};
			}
		}
		else
		{
			%state = (
				connectionState => 'not logged in'
			);
		}
		if ($bus && $bus->getState() == Bus::Client::CONNECTED())
		{
			$state{bus}{host} = $bus->serverHost();
			$state{bus}{port} = $bus->serverPort();
			$state{bus}{clientID} = $bus->ID();
		}

		# Update state.xml
		my $simple = new XML::Simple();
		if (open($f, ">:utf8", "$Settings::logs_folder/state_".$config{'username'}.".xml"))
		{
			my %tst = ("openKore" => \%state);
			printf $f $simple->XMLout(\%tst, KeepRoot => 1, XMLDecl => "<?xml version='1.0'?>");
			close $f;
		}
	}
}

1;

Quit.

Post Reply