PDA

Ir para Versão Original : Plantar cogumelos Ragnamania


larethyan
15/09/2008, 16:53:14
Bom o servidor ragnamania houve um atualizacao que nao permite mais se plantar cogumelos um em cima do outro.
estive procurando no config.txt uma forma de mantar ele plantar em determinadas celulas mas nao encontrei. A versao do open que uso e a 2.0.4
gostaria de saber como resolver isso . li os outros topicos sobre o config e nao consegui resolver o problema.

meu config ta assim

useSelf_skill Cultivation{
lvl 1
maxCastTime 10
minCastTime 10
hp
sp >= 22
homunculus_hp
homunculus_sp
homunculus_dead
onAction
whenStatusActive
whenStatusInactive
whenFollowing
spirit
aggressives
monsters
notMonsters
stopWhenHit 0
inLockOnly 1
notWhileSitting 0
notInTown 0
timeout 0
disabled 0
inInventory
manualAI 0
}


olhando os topicos verifiquei que posue um macro de plantar eu tentei fazer urilizando ele e nao consegui ai segue ele

#########Macro Cultivation##########
automacro Cultivation {
delay 2
sp <= 22%
run-once 1
call {
do ai manual
do sm 153 2
do ai on
release Cultivation
}
}
automacro CultivationItens {
inventory "Mushroom Spore" = 0
delay 2
exclusive 1
orphan reregister
run-once 1
call {
$i = 0
do ai manual
while ($i <= 19) as loop
do sm 153 1
do ai on
pause 1
$i++
end loop
release CultivationItens
}
}
a estrutura de minha pasta esta assim

http://img244.imageshack.us/img244/4553/estruturavk7.th.gif (http://imageshack.us)

bom nao sei muito mas vo procurar o maximo sobre
agradeco a ajuda desde ja

larethyan
18/09/2008, 15:01:50
bom fui tentando e consegui fazer plantar em um lugar especifico usando um plugin chamado locationSkill.pl e mudando a versao do kore para 1.94 . O problema agora e fazer o kore usar a skill em outras celulas.

ai vai minha configuracao

lockMap lou_in01
lockMap_x 85
lockMap_y 126
lockMap_randX
lockMap_randY

locationSkill Cultivation {
coords 84, 126, lou_in01
lvl 1
sp > 50
inInventory Mushroom Spore
disable 0
}

O plugin que estou usando e esse :

package locationSkill;

#
# Based on the suggestions by pmak
# This plugin is licensed under the GNU GPL
# Copyright 2005 by kaliwanagan
# --------------------------------------------------
#
# How to install this thing..:
#
# in control\config.txt add:
#
#locationSkill skillname { # name of the area skill to use
# coords [x, y[, map] ] # if x and y are omitted, cast the skill at char's current location
# whenAtCoords [x, y[, range]] # only cast when at specified coordinates, or is within range
# lvl [x] # defaults to 10 if unspecified
# coords_whenGround # similar to whenGround and whenNotGround - only cast the spell if the ...
# coords_whenNotGround # target coordinate has/doesn't have the specified ground effect
# skillDelay # cast skill only after n seconds have passed, counted from the last time the same skill was cast
# blockDelayBeforeUse # cast skill only after n seconds have passed, counted *before* the last time skill block was used
# blockDelayAfterUse # same as blockDelayBeforeUse, but count seconds *after* the skill block was used
# hp
# sp
# onAction
# whenStatusActive
# whenStatusInactive
# whenFollowing
# spirit
# aggressives
# monsters
# notMonsters
# stopWhenHit 0
# notWhileSitting 0
# notInTown 0
# disabled 0
# inInventory
#}

use strict;
use Plugins;
use Globals;
use Log qw(message warning error);
use AI;
use Skill;

Plugins::register('locationSkill', 'cast skill at a certain location', \&Unload);
my $hook1 = Plugins::addHook('AI_post', \&call);
my $hook2 = Plugins::addHook('packet_skilluse', \&packet_skilluse);

sub Unload {
Plugins::delHook('packet_skilluse', $hook2);
Plugins::delHook('AI_post', $hook1);
}

my %skillUse;
my %delay;

sub packet_skilluse {
my (undef, $args) = @_;
my $skillID = $args->{'skillID'};
my $sourceID = $args->{'sourceID'};
my $x = $args->{'x'};
my $y = $args->{'y'};

if ($sourceID eq $accountID) {
$skillUse{$skillID} = 1;
}
}

sub call {
if (AI::action eq 'locationSkill') {
my $args = AI::args;
if ($args->{'stage'} eq 'end') {
AI::dequeue;
} elsif ($args->{'stage'} eq 'skillUse') {
main::ai_skillUse(
$args->{'handle'},
$args->{'lvl'},
$args->{'maxCastTime'},
$args->{'minCastTime'},
$args->{'x'}, $args->{'y'}
);
$args->{'stage'} = 'end';
}
}
locationSkill() if (AI::isIdle);
}

sub locationSkill {
my $prefix = "locationSkill_";
my $i = 0;
while (exists $config{$prefix.$i}) {
if ((main::checkSelfCondition($prefix.$i)) &&
main::timeOut($delay{$prefix.$i."_blockDelayBeforeUse"}) &&
main::timeOut($delay{$prefix.$i."_blockDelayAfterUse"})
) {
my $skillObj = Skill->new(name => $config{$prefix.$i});
unless ($skillObj->getHandle) {
my $msg = "Unknown skill name ".$config{$prefix.$i}." in $prefix.$i\n";
error $msg;
configModify($prefix.$i."_disabled", 1);
next;
}

my %skill;
($skill{'x'}, $skill{'y'}, my $map) = split / *, */, $config{$prefix.$i."_coords"};
my $pos = main::calcPosition($char);
$skill{'x'} = $skill{'x'} || $pos->{'x'};
$skill{'y'} = $skill{'y'} || $pos->{'y'};

$delay{$prefix.$i."_blockDelayBeforeUse"}{'timeout'} = $config{$prefix.$i."_blockDelayBeforeUse"};
if (!$delay{$prefix.$i."_blockDelayBeforeUse"}{'set'}) {
$delay{$prefix.$i."_blockDelayBeforeUse"}{'time'} = time;
$delay{$prefix.$i."_blockDelayBeforeUse"}{'set'} = 1;
}

$delay{$prefix.$skillObj->getHandle."_skillDelay"}{'timeout'} = $config{$prefix.$i."_skillDelay"};
if ($skillUse{$skillObj->getIDN}) { # set the delays only when the skill gets successfully cast
$delay{$prefix.$skillObj->getHandle."_skillDelay"}{'time'} = time;
$skillUse{$skillObj->getIDN} = 0;
}

my %range;
($range{'x'}, $range{'y'}, $range{'range'}) = split / *, */, $config{$prefix.$i."_whenAtCoords"};

my $inRange;
$inRange = (($pos->{'x'} <= ($range{'x'} + $range{'range'})) &&
($pos->{'x'} >= ($range{'x'} - $range{'range'})) &&
($pos->{'y'} <= ($range{'y'} + $range{'range'})) &&
($pos->{'y'} >= ($range{'y'} - $range{'range'})));
undef %range;

if ((checkCoordsCondition($prefix.$i."_coords",\%skill)) &&
main::timeOut($delay{$prefix.$skillObj->getHandle."_skillDelay"}) &&
(($inRange || (!$config{$prefix.$i."_whenAtCoords"}))) &&
(($map eq $field{'name'}) || !$map)
) {
$skill{'handle'} = $skillObj->getHandle;
$skill{'lvl'} = ($config{$prefix.$i."_lvl"}) || 10;
$skill{'maxCastTime'} = $config{$prefix.$i."_maxCastTime"};
$skill{'minCastTime'} = $config{$prefix.$i."_minCastTime"};
$skill{'stage'} = 'skillUse';
AI::queue('locationSkill', \%skill);
$delay{$prefix.$i."_blockDelayAfterUse"}{'timeout'} = $config{$prefix.$i."_blockDelayAfterUse"};
$delay{$prefix.$i."_blockDelayAfterUse"}{'time'} = time;
$delay{$prefix.$i."_blockDelayBeforeUse"}{'set'} = 0;
last;
}
}
$i++;
}
}

sub checkCoordsCondition {
my $prefix = shift;
my $coord = shift;

if ($config{$prefix."_whenGround"}) {
return 0 unless main::whenGroundStatus($coord, $config{$prefix."_whenGround"});
}
if ($config{$prefix."_whenNotGround"}) {
return 0 if main::whenGroundStatus($coord, $config{$prefix."_whenNotGround"});
}

return 1;
}

return 1;

Pelo que eu entendi esse plugin segue o mesmo tipow que o config .txt entao tudo que vc usar nele tbem pode ser aplicado a linda de comando do locationSkill no config.txt, sonao sei como fazer para ele plantar de farios lugares diferentes.
Estou tentando de varias formas se posivel gostaria de uma ajuda obrigado desde ja.:icon14: