Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Ragnarok Online
You last visited: Today at 17:02

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Some Macro beginner problems

Discussion on Some Macro beginner problems within the Ragnarok Online forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2010
Posts: 2
Received Thanks: 0
Some Macro beginner problems

I created some functions which should allow to open a file with character names inside to use a whitelist. Within this functions i get some very strange error messages and the bot doesn't do anything.

As you read this seem to be beginner problems. I hope somebody of you is able to help or give a hint

Yellow marked notifications:
Code:
control\macros.txt: ignoring line 'sub getPlayers {' (munch, munch, strange block)
control\macros.txt: ignoring '}' (munch, munch, strange food)
control\macros.txt: ignoring '}' (munch, munch, strange food)
[macro] registering sub addPlayer ...
[macro] registering sub existsInList ...
control\macros.txt: ignoring '$list = getPlayers()' (munch, munch, unknown automacro keyword)
control\macros.txt: ignoring 'if(existsInList("$list",$.lastpm))' (munch, munch, not a pair)
control\macros.txt: ignoring '{' (munch, munch, not a pair)
control\macros.txt: ignoring '}' (munch, munch, strange food)
macros.txt
Code:
sub getPlayers {
	my $player = "";
	my $first = TRUE;
	if(open(FILE, "<:utf8", Settings::getControlFilename("whitelist.txt")))
	{
		while (<FILE>)
		        if (/^\n/) {
				if($first != TRUE) {$player += ", ";}
				$player += $_;
				$first = FALSE;
#				next
			}
		close FILE;
	}
	return $player;
}

sub addPlayer {
	my @lines = ();
	if(open(FILE, "<:utf8", Settings::getControlFilename("whitelist.txt")))
	{
		while (<FILE>)
		{
			s/\x{FEFF}//g; chomp;
		        if (/^\n/) {push @lines,$_;next;}
		}
		close FILE;
	}
	open(FILE, ">:utf8", Settings::getControlFilename("whitelist.txt"));
	print FILE join "\n", @lines;
	close FILE;
}

sub existsInList {
	my ($list, $val) = @_;
	return 0 if ($val eq "");
	my @array = split / *, */, $list;
	$val = lc($val);
	foreach (@array) {
		s/^\s+//;
		s/\s+$//;
		s/\s+/ /g;
		next if $_ eq "";
		return 1 if lc eq $val;
	}
	return 0;
}
ShadowmanZ is offline  
Reply


Similar Threads Similar Threads
[Release]Macro Files for Macro Manager (AKA BOT)
02/16/2010 - Grand Chase Hacks, Bots, Cheats & Exploits - 16 Replies
@all FYI its not a cheat its just a macro file that enables you to run dungeon so you can do other choirs like mussicca said...!! Contents Mana Valley Dungeon Macro File Xenia Frontier Dungeon UP and LEFT (Remap Dungeon)Macro File Ignis Mountain Dungeon Macro File Orc Temple Dungeon Macro File
Beginner Guide in Macro/Bot Coding [just a preview]
12/04/2008 - GW Bots - 18 Replies
Hallo allezusammen. Ich schreibe jetzt schon seit einiger Zeit an einem Guide, welcher euch einen kleinen Einblick in das Thema "Macro/Bot coding" bringen soll. Er ist noch nicht fertig weil ich den dazugehörigen Bot noch nicht fertiggestellt habe (@gispy: Den, den ich dir geschickt habe). Also wird bis zum fertigen release noch ein bisschen Zeit vergehen. Aber, ich denke mir mal, vielleicht können ein paar Leute schon etwas damit anfangen. Um die Fragen zu beantworten, die mir...
beginner problems !!
09/27/2008 - EO PServer Hosting - 9 Replies
Hello everyone, Gostária of whether you have the database, Knights of the Round Table, the new eudemons, the castle and the legion of war, the legion some restart when the serves. I found some tried but gave no right or not I right, if possible someone could teach and correct problems with the setup in the game. Thank you all for your attention! Ass: Fabian (I am Brazilian and use the translator google)



All times are GMT +1. The time now is 17:03.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.