arrowCraft.pl 2.0.5.+

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
fco2783
Plain Yogurt
Plain Yogurt
Posts: 95
Joined: 05 Apr 2008, 05:15
Noob?: Yes
Location: in place where you cant go
Contact:

arrowCraft.pl 2.0.5.+

#1 Post by fco2783 »

Code: Select all

package arrowCraft;
 
#
# This plugin is licensed under the GNU GPL
# Copyright 2005 by kaliwanagan
# Fixed for OpenKore 2.0.5+
# --------------------------------------------------
#
# How to install this thing..:
#
# in control\config.txt add:
# 
#arrowCraft Zargon {
#       delay 3 # specify number of seconds to wait before crafting another arrow; defaults to 1
#       inInventory Silver Arrow <10
#       onAction attack
#}
 
use strict;
use Plugins;
use Globals;
use Log qw(message warning error debug);
use AI;
use Misc;
use Network;
use Network::Send;
 
Plugins::register('arrowCraft', 'use arrow craft without SP', \&Unload);
my $hook = Plugins::addHook('AI_pre', \&cast);
 
sub Unload {
        Plugins::delHook('AI_pre', $hook);
}
 
my %delay;
 
sub cast {
	my $prefix = "arrowCraft_";
	my $i = 0;
       
	while (exists $config{$prefix.$i}) {
		my $item = $char->inventory->getByName($config{$prefix.$i});
		
		$delay{'timeout'} = $config{$prefix.$i."_delay"} || 1;
		if ((@{$char->{inventory}->getItems()}) &&
			(main::timeOut(\%delay)) &&
			($item->{'amount'} > 0) &&
			(main::checkSelfCondition($prefix.$i))) 
		{
				#Remove the comment bellow if you play on eathena server
				#Commands::run('arrowcraft use');
			sendArrowCraft($messageSender,$item->{'nameID'});
			message ("You use Arrow Craft on item: " . $item->{'name'} . "\n", "selfSkill");
			$delay{'time'} = time;
		}
		$i++;
        }
}
 
return 1;
Usage:
arrowCraft Zargon {
delay 3
inInventory Silver Arrow <10
onAction attack
}

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

Re: arrowCraft.pl 2.0.5.+

#2 Post by fco2783 »

i hope someone could post here arrowCraft for openkore 2.0.0 :)

sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: arrowCraft.pl 2.0.5.+

#3 Post by sli »

There's always the built in functionality in the SVN version...
cs : ee : realist

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

Re: arrowCraft.pl 2.0.5.+

#4 Post by fco2783 »

sli wrote:There's always the built in functionality in the SVN version...
yah i know but they did not preform what i wanted...

at config.txt

Code: Select all

autoMakeArrows 1
at arrowcraft.txt

Code: Select all

Red Blood 1
Live Coal 1
Burning Hair 1
Buning Heart 1
this configuration only just work when kore log-in... but while on the actual botting in the mid attack on the monster or in the route AI... kore just ignored this configuration...

i want something like arrowCraft.pl

Code: Select all

arrowCraft Zargon {
delay 3
inInventory Silver Arrow <10
onAction attack
}
i could not use macro on this...

User avatar
help_us
Testers Team
Testers Team
Posts: 106
Joined: 04 Apr 2008, 21:53
Noob?: No
Location: Asia
Contact:

Re: arrowCraft.pl 2.0.5.+

#5 Post by help_us »

Code: Select all

automacro arrowCraft {
	eval AI::action eq "attack" # when ai seq is attack
	inventory "Silver Arrow" < 10 # when silver arrow less than 10
	delay 3 # delay before call
	call {
		do ss 147 1 # here your skill Arrow Crafting
	}
}
still can use in macros :lol:
Image
Image

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

Re: arrowCraft.pl 2.0.5.+

#6 Post by fco2783 »

@help_us
you been very helpful to me... but that wont work... it only trigger the Arrow Crafting skills.

in which you got to type on the console "arrowcraft 0"
in which 0 might be Zargon, Elunium, Burning Heart, Flame Heart, Crystal Blue and etc...

User avatar
help_us
Testers Team
Testers Team
Posts: 106
Joined: 04 Apr 2008, 21:53
Noob?: No
Location: Asia
Contact:

Re: arrowCraft.pl 2.0.5.+

#7 Post by help_us »

oh sorry i`m forget part convert item.

Code: Select all

automacro arrowCraft {
	eval AI::action eq "attack"
	inventory "Silver Arrow" < 10
	delay 3
	call crafting
}

macro crafting {
	do ss 147
	pause 1
	$ID = 912
	# 912 = Zargon

	do eval $::messageSender->sendArrowCraft($ID);
}
for OK 2.0.0 mayb u need change eval. not so sure but sure you can test it,

Code: Select all

do eval sendArrowCraft(\$remote_socket,$ID);
Last edited by help_us on 21 Aug 2008, 09:36, edited 1 time in total.
Image
Image

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

Re: arrowCraft.pl 2.0.5.+

#8 Post by iamanoob »

help_us wrote:

Code: Select all

do eval sendForgeItem(\$remote_socket,$ID);
is this for whitesmith refine skill?
or for arrowcraft ONLY or TOO?
Image
DARKest Ninja

User avatar
help_us
Testers Team
Testers Team
Posts: 106
Joined: 04 Apr 2008, 21:53
Noob?: No
Location: Asia
Contact:

Re: arrowCraft.pl 2.0.5.+

#9 Post by help_us »

i`m not sure about it for refine.

p/s : sorry my bad, wrong eval. edit*
Image
Image

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

Re: arrowCraft.pl 2.0.5.+

#10 Post by fco2783 »

thanks a lot help_us

will this be ok putting some "route" instead of "attack"

Code: Select all

automacro arrowCraft {
	eval AI::action eq "route"
	inventory "Fire Arrow" < 50
	inventory "Fire Arrow" > 10
	delay 3

	call {
		do ss 147
		pause 1
		$ID = 7097
		# 912 = Zargon

		do eval $::messageSender->sendArrowCraft($ID);
	}
}

Post Reply