Openkore.com

OpenKore Forums
It is currently 23 Oct 2014, 10:36

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: arrowCraft.pl 2.0.5.+
PostPosted: 19 Aug 2008, 03:37 
Offline
Plain Yogurt
Plain Yogurt
User avatar

Joined: 05 Apr 2008, 05:15
Posts: 95
Location: in place where you cant go
Code:
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:
Quote:
arrowCraft Zargon {
delay 3
inInventory Silver Arrow <10
onAction attack
}


Top
 Profile  
 
 Post subject: Re: arrowCraft.pl 2.0.5.+
PostPosted: 19 Aug 2008, 04:26 
Offline
Plain Yogurt
Plain Yogurt
User avatar

Joined: 05 Apr 2008, 05:15
Posts: 95
Location: in place where you cant go
i hope someone could post here arrowCraft for openkore 2.0.0 :)


Top
 Profile  
 
 Post subject: Re: arrowCraft.pl 2.0.5.+
PostPosted: 19 Aug 2008, 09:18 
Offline
Perl Monk
Perl Monk

Joined: 04 Apr 2008, 17:26
Posts: 797
There's always the built in functionality in the SVN version...

_________________
dual 4/3 triple twisted kanthal @ .24Ω, 73.5W


Top
 Profile  
 
 Post subject: Re: arrowCraft.pl 2.0.5.+
PostPosted: 19 Aug 2008, 23:24 
Offline
Plain Yogurt
Plain Yogurt
User avatar

Joined: 05 Apr 2008, 05:15
Posts: 95
Location: in place where you cant go
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:
autoMakeArrows 1


at arrowcraft.txt
Code:
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:
arrowCraft Zargon {
delay 3
inInventory Silver Arrow <10
onAction attack
}


i could not use macro on this...


Top
 Profile  
 
 Post subject: Re: arrowCraft.pl 2.0.5.+
PostPosted: 19 Aug 2008, 23:59 
Offline
Testers Team
Testers Team

Joined: 04 Apr 2008, 21:53
Posts: 105
Location: Asia
Code:
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


Top
 Profile  
 
 Post subject: Re: arrowCraft.pl 2.0.5.+
PostPosted: 20 Aug 2008, 04:50 
Offline
Plain Yogurt
Plain Yogurt
User avatar

Joined: 05 Apr 2008, 05:15
Posts: 95
Location: in place where you cant go
@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...


Top
 Profile  
 
 Post subject: Re: arrowCraft.pl 2.0.5.+
PostPosted: 21 Aug 2008, 07:35 
Offline
Testers Team
Testers Team

Joined: 04 Apr 2008, 21:53
Posts: 105
Location: Asia
oh sorry i`m forget part convert item.

Code:
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:
do eval sendArrowCraft(\$remote_socket,$ID);

_________________
Image
Image


Last edited by help_us on 21 Aug 2008, 09:36, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: arrowCraft.pl 2.0.5.+
PostPosted: 21 Aug 2008, 08:00 
Offline
Plain Yogurt
Plain Yogurt
User avatar

Joined: 04 Apr 2008, 09:49
Posts: 82
help_us wrote:
Code:
do eval sendForgeItem(\$remote_socket,$ID);

is this for whitesmith refine skill?
or for arrowcraft ONLY or TOO?

_________________
Image
DARKest Ninja


Top
 Profile  
 
 Post subject: Re: arrowCraft.pl 2.0.5.+
PostPosted: 21 Aug 2008, 09:36 
Offline
Testers Team
Testers Team

Joined: 04 Apr 2008, 21:53
Posts: 105
Location: Asia
i`m not sure about it for refine.

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

_________________
Image
Image


Top
 Profile  
 
 Post subject: Re: arrowCraft.pl 2.0.5.+
PostPosted: 24 Aug 2008, 03:27 
Offline
Plain Yogurt
Plain Yogurt
User avatar

Joined: 05 Apr 2008, 05:15
Posts: 95
Location: in place where you cant go
thanks a lot help_us

will this be ok putting some "route" instead of "attack"
Code:
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);
   }
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
[ Time : 0.047s | 14 Queries | GZIP : On ]