Zloba wrote:Mercenary's skill configured:
After that, character's skills configured.Code: Select all
attackSkillSlot ... { lvl ... mercenary_sp >= ... monsters ... target ... maxUses X timeout Y }
When attacking a monster:
aivai printCode: Select all
ai_seq (auto) = skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use skill_use move attack Active tasks: - Inactive tasks: -
This + teleportAuto = 99% disconnect.Code: Select all
2: skill_use {skillHandle=>'MA_DOUBLE',giveup=>{timeout=>'1',time=>'1263962710.12292'},ret=>'',skill_used=>'1',waitBeforeUse=>{timeout=>'',time=>'1263962710'},lv=>'7',y=>'',target=>'?o..',maxCastTime= >{timeout=>'',time=>'1263962710.12294'},skill_use_last=>'1263962708.7456',minCastTime=>{timeout=>'',time=>'1263962710'},tag=>'',skillID=>'8207',prefix=>'attackSkillSlot_1'} 3: skill_use {skillHandle=>'MA_DOUBLE',giveup=>{timeout=>'1',time=>'1263962710.10966'},ret=>'',skill_used=>'1',waitBeforeUse=>{timeout=>'',time=>'1263962710'},lv=>'7',y=>'',target=>'?o..',maxCastTime= >{timeout=>'',time=>'1263962710.10968'},skill_use_last=>'1263962708.7456',minCastTime=>{timeout=>'',time=>'1263962710'},tag=>'',skillID=>'8207',prefix=>'attackSkillSlot_1'} 4: skill_use {skillHandle=>'MA_DOUBLE',giveup=>{timeout=>'1',time=>'1263962710.09559'},ret=>'',skill_used=>'1',waitBeforeUse=>{timeout=>'',time=>'1263962710'},lv=>'7',y=>'',target=>'?o..',maxCastTime= >{timeout=>'',time=>'1263962710.09561'},skill_use_last=>'1263962708.7456',minCastTime=>{timeout=>'',time=>'1263962710'},tag=>'',skillID=>'8207',prefix=>'attackSkillSlot_1'} 5: skill_use {skillHandle=>'MA_DOUBLE',giveup=>{timeout=>'1',time=>'1263962710.08196'},ret=>'',skill_used=>'1',waitBeforeUse=>{timeout=>'',time=>'1263962710'},lv=>'7',y=>'',target=>'?o..',maxCastTime= >{timeout=>'',time=>'1263962710.08199'},skill_use_last=>'1263962708.7456',minCastTime=>{timeout=>'',time=>'1263962710'},tag=>'',skillID=>'8207',prefix=>'attackSkillSlot_1'} 6: skill_use {skillHandle=>'MA_DOUBLE',giveup=>{timeout=>'1',time=>'1263962710.0692'},ret=>'',skill_used=>'1',waitBeforeUse=>{timeout=>'',time=>'1263962710'},lv=>'7',y=>'',target=>'?o..',maxCastTime=> {timeout=>'',time=>'1263962710.06922'},skill_use_last=>'1263962708.7456',minCastTime=>{timeout=>'',time=>'1263962710'},tag=>'',skillID=>'8207',prefix=>'attackSkillSlot_1'} 7: skill_use {skillHandle=>'MA_DOUBLE',giveup=>{timeout=>'1',time=>'1263962710.05648'},ret=>'',skill_used=>'1',waitBeforeUse=>{timeout=>'',time=>'1263962710'},lv=>'7',y=>'',target=>'?o..',maxCastTime= >{timeout=>'',time=>'1263962710.0565'},skill_use_last=>'1263962708.7456',minCastTime=>{timeout=>'',time=>'1263962710'},tag=>'',skillID=>'8207',prefix=>'attackSkillSlot_1'} 8: skill_use {skillHandle=>'MA_DOUBLE',giveup=>{timeout=>'1',time=>'1263962710.04381'},ret=>'',skill_used=>'1',waitBeforeUse=>{timeout=>'',time=>'1263962710'},lv=>'7',y=>'',target=>'?o..',maxCastTime= >{timeout=>'',time=>'1263962710.04383'},skill_use_last=>'1263962708.7456',minCastTime=>{timeout=>'',time=>'1263962710'},tag=>'',skillID=>'8207',prefix=>'attackSkillSlot_1'}
timeout, maxCastTime, minCastTime don't help.
Interesting behaviour of maxUses X: mercenary will use the skill X..2X times randomly.
Homunculus skills are processed by char's AI
Moderators: Moderators, Developers
-
- Developers
- Posts: 1798
- Joined: 05 Dec 2008, 05:42
- Noob?: Yes
Homunculus skills are processed by char's AI
http://rofan.ru/viewtopic.php?t=8818
-
- Super Moderators
- Posts: 801
- Joined: 06 May 2008, 12:47
- Noob?: No
Re: [rofan] Mercenary skill spam
wait, this must be fixed.
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...
Mount Doom awaits us, fellowship of OpenKore!
One ST_kRO to bring them all and in the darkness bind them...
Mount Doom awaits us, fellowship of OpenKore!
Re: [rofan] Mercenary skill spam
OK. Then we need Conditions to reproduce and fix it.Technology wrote:wait, this must be fixed.
Re: [rofan] Mercenary skill spam
I had this problem,but. with just the game client itself. I don't remember which RO but the mercenary kept spamming skills till SP runs out and still kept spamming skills (blows up SP the moment regened to minimum req.).
I think the game server is responsible for this ?
I think the game server is responsible for this ?
Re: [rofan] Mercenary skill spam
May-be because OpenKore do not support(or broken decode) some packets about skill cast and such things.Lotus wrote:I had this problem,but. with just the game client itself. I don't remember which RO but the mercenary kept spamming skills till SP runs out and still kept spamming skills (blows up SP the moment regened to minimum req.).
I think the game server is responsible for this ?
So it keep spamming Task::Skill until the memory get full.
Re: [rofan] Mercenary skill spam
i encounter this with ONE of my 20 sniper bots
with a correct servertype
it just spams Wind walk
though it never did
sometimes it fills up the AI queue
The bot is able to use that skill on the client but not on kore
idk why...
with a correct servertype
it just spams Wind walk
though it never did
sometimes it fills up the AI queue
The bot is able to use that skill on the client but not on kore
idk why...
DARKest Ninja
Re: [rofan] Mercenary skill spam
May-be Try this little patch?
But I suggest, to implement own Skill_use code, so AI::Slave not depends on AI::queue.
Code: Select all
Index: Slave.pm
===================================================================
--- Slave.pm (revision 7495)
+++ Slave.pm (working copy)
@@ -450,23 +450,25 @@
$args->{attackMethod}{type} = "weapon";
### attackSkillSlot begin
- for (my ($i, $prefix) = (0, 'attackSkillSlot_0'); $prefix = "attackSkillSlot_$i" and exists $config{$prefix}; $i++) {
- next unless $config{$prefix};
- if (checkSelfCondition($prefix) && checkMonsterCondition("${prefix}_target", $target)) {
- my $skill = new Skill(auto => $config{$prefix});
- next unless $slave->checkSkillOwnership ($skill);
+ if (! AI::is(qw(skill_use))) { # This one could be our, so wait till the skill is casted (not wery optimal).
+ for (my ($i, $prefix) = (0, 'attackSkillSlot_0'); $prefix = "attackSkillSlot_$i" and exists $config{$prefix}; $i++) {
+ next unless $config{$prefix};
+ if (checkSelfCondition($prefix) && checkMonsterCondition("${prefix}_target", $target)) {
+ my $skill = new Skill(auto => $config{$prefix});
+ next unless $slave->checkSkillOwnership ($skill);
- next if $config{"${prefix}_maxUses"} && $target->{skillUses}{$skill->getHandle()} >= $config{"${prefix}_maxUses"};
- next if $config{"${prefix}_target"} && !existsInList($config{"${prefix}_target"}, $target->{name});
+ next if $config{"${prefix}_maxUses"} && $target->{skillUses}{$skill->getHandle()} >= $config{"${prefix}_maxUses"};
+ next if $config{"${prefix}_target"} && !existsInList($config{"${prefix}_target"}, $target->{name});
- my $lvl = $config{"${prefix}_lvl"};
- my $maxCastTime = $config{"${prefix}_maxCastTime"};
- my $minCastTime = $config{"${prefix}_minCastTime"};
- debug "Slave attackSkillSlot on $target->{name} ($target->{binID}): ".$skill->getName()." (lvl $lvl)\n", "monsterSkill";
- my $skillTarget = $config{"${prefix}_isSelfSkill"} ? $slave : $target;
- AI::ai_skillUse2($skill, $lvl, $maxCastTime, $minCastTime, $skillTarget, $prefix);
- $ai_v{$prefix . "_time"}{$ID} = time;
- last;
+ my $lvl = $config{"${prefix}_lvl"};
+ my $maxCastTime = $config{"${prefix}_maxCastTime"};
+ my $minCastTime = $config{"${prefix}_minCastTime"};
+ debug "Slave attackSkillSlot on $target->{name} ($target->{binID}): ".$skill->getName()." (lvl $lvl)\n", "monsterSkill";
+ my $skillTarget = $config{"${prefix}_isSelfSkill"} ? $slave : $target;
+ AI::ai_skillUse2($skill, $lvl, $maxCastTime, $minCastTime, $skillTarget, $prefix);
+ $ai_v{$prefix . "_time"}{$ID} = time;
+ last;
+ }
}
}
### attackSkillSlot end
Re: homunculus attack problem
r7499 pRO ...
problem persist when i set
and set it to
homunculus doesn't attack players on pvp, even monsters
problem persist when i set
Code: Select all
attackSkillSlot Caprice {
lvl 5
homunculus_sp >= 30
}
Code: Select all
attackAuto 0
attackAuto_party 0
homunculus_attackAuto 2
homunculus_attackAuto_party 2
-
- Developers
- Posts: 1798
- Joined: 05 Dec 2008, 05:42
- Noob?: Yes
Re: [rofan] Mercenary skill spam
It should just use slave AI queue for skills, and have attackSkillSlot etc handlers in Actor where they will trigger only on current Actor's skills.