character creation/deletion

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

lenaius
Noob
Noob
Posts: 2
Joined: 24 Aug 2013, 23:22
Noob?: Yes

character creation/deletion

#1 Post by lenaius »

can anyone help me do a macro for creating and deleting a character..?


i need help on creating a character with a random name then let it in to the game and have it delete itself.. thanks..

any help would really help..

http://forums.openkore.com/viewtopic.php?f=32&t=29159

automacro delete {
hook charSelectScreen
exclusive 1
run-once 1
call deleting
}
macro deleting {
pause 3
$email = XXXXXX
$login = 4
do eval $::messageSender->sendCharDelete($::chars[4]{charID}, '$email');$::AI::temp::delIndex = 4;$::timeout{'charlogin'}{'time'} = time;
pause 3
do eval $::timeout{'charlogin'}{'time'} = time;
pause 3
call create
}

this code is not working for me.. the bot only continues to log in to the game and do nothing but sit.
Nervus
Noob
Noob
Posts: 2
Joined: 17 Feb 2013, 13:40
Noob?: Yes

Re: character creation/deletion

#2 Post by Nervus »

Ok after 6 Hour of research i find solution!

put autoremake.pl in your plugins folder
code here:

Code: Select all

package autoremake;

use strict;
use Plugins;
use Globals;
use Network::Send;
use Misc;
use AI;
use Utils;
use Log qw(message debug);
use Commands;

Plugins::register('autoremake', 'Auto delete and Create Character', \&onUnload);
my $hooks = Plugins::addHooks(['charSelectScreen', \&delete, undef]);

sub onUnload {
	Plugins::delHooks($hooks);
}

sub delete {
	if ($config{"autodelete"} == 1) {
		message("Character Deleted: Yes\n”,”info”");
		my (undef, $args) = @_;
		Plugins::delHooks($hooks);
		$hooks = Plugins::addHooks(['charSelectScreen', \&create, undef]);
		$messageSender->sendCharDelete($chars[0]{charID}, $config{Email});
		$AI::temp::delIndex = 0;
		$timeout{'charlogin'}{'time'} = time;
		$args->{return} = 2;
	} elsif ($config{"autodelete"} != 1) {
		message("Character Deleted: NO\n”,”info");
	
		return 0;
	}
}

sub create {
	my (undef, $args) = @_;
	Plugins::delHooks($hooks);
	$hooks = Plugins::addHooks(['charSelectScreen', \&login, undef]);
	$messageSender->sendCharCreate(0, $config{Name}, 9, 9, 1, 1, 9, 1, 2, 3);
	$timeout{'charlogin'}{'time'} = time;
	$args->{return} = 2;
}

then edit config.txt add 3 row:

autodelete 1
Name namechar
Email 1

i have much problem with email for example if it's "abcdefgh1" (whitout quote) only through console can delete char... dont ask me why :lol:
i try to set account mail to 1 and magical works!

I hope this works for you also!!!