Openkore.com

OpenKore Forums
It is currently 14 Nov 2018, 04:37

All times are UTC - 5 hours [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 34 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: Stuck after teleport
PostPosted: 25 Oct 2010, 04:43 
Offline
Noob
Noob

Joined: 05 Oct 2010, 22:34
Posts: 5
in Openkore 2.0.7 all version SVN r7541
server twRO
my knight、Priest

This issue when I was attacked from the blood to a low when I use Teleport to escape,
ai will get stuck , I try to use ai print command to record the situation and attack are mostly stuck in skill_use

Image

when i use "tele" , Will return to normal


Top
 Profile  
 
 Post subject: Re: AI get stuck in twRO renewal
PostPosted: 09 Nov 2010, 09:01 
Offline
Noob
Noob

Joined: 05 Oct 2010, 22:34
Posts: 5
http://www.badongo.com/pic/10996098
http://www.badongo.com/pic/10996108
http://www.badongo.com/pic/10996114

update new pic ...


Top
 Profile  
 
 Post subject: Re: AI get stuck in twRO renewal
PostPosted: 20 Nov 2010, 02:06 
Offline
Developers
Developers

Joined: 06 Oct 2010, 09:22
Posts: 79
i cant sure, but i know what is your problem..
tele is not functioning in twRO.
i tested on free server, the command is no more working.


Top
 Profile  
 
 Post subject: Re: AI get stuck in twRO renewal
PostPosted: 04 Dec 2010, 03:12 
Offline
Noob
Noob

Joined: 05 Oct 2010, 22:34
Posts: 5
this problem is teleport after , when confirmation window jump out , my char if try to teleport will be stuck

how to cancel the teleport confirmation window?


Top
 Profile  
 
 Post subject: Re: AI get stuck in twRO renewal
PostPosted: 07 Dec 2010, 23:49 
Offline
Developers
Developers

Joined: 05 Dec 2008, 05:42
Posts: 1811
zideaddin wrote:
teleport after , when confirmation window jump out , my char if try to teleport will be stuck

That happens in original client too?


Top
 Profile  
 
 Post subject: Re: AI get stuck in twRO renewal
PostPosted: 12 Dec 2010, 01:58 
Offline
Developers
Developers

Joined: 06 Oct 2010, 09:22
Posts: 79
i don get stuck after teleporting....
but messy ai queue is appeared.


Top
 Profile  
 
 Post subject: Re: AI get stuck in twRO renewal
PostPosted: 20 Dec 2010, 00:27 
Offline
Noob
Noob

Joined: 05 Oct 2010, 22:34
Posts: 5
EternalHarvest wrote:
zideaddin wrote:
teleport after , when confirmation window jump out , my char if try to teleport will be stuck

That happens in original client too?


Yes , i use Xkore can seen

This problem how to happend ?

1. BOT working
2. BOT need use teleport (etc . hp too low 30% )
3. BOT use Teleport skills , jump out confirmation window
4. BOT happens too many aggressives need teleport
5. confirmation windows need Kore to send packet "Enter" confirmation , but previous confirmation windows need to confirmation already
6. BOT teleport , screen stuck in "confirmation windows" , You must type "tele" to solve or wait other Monster attack you to hp 30%↓ ~


Top
 Profile  
 
 Post subject: Re: AI get stuck in twRO renewal (teleport)
PostPosted: 14 Jun 2011, 08:42 
Offline
Noob
Noob

Joined: 18 May 2011, 21:12
Posts: 13
I'm getting this error aswell on iRO.

It only happens when you use the teleport skill. I checked with Xkore 2 what was happening, and it seems it double casts teleport so you appear in the new place with a dialog box still open. Openkore then tries to continue on but is unable to cast any skills because of the box.

Console output looks like:
Code:
You are casting Teleport on yourself (Delay: 0ms)
----------------- Warp Portal --------------------
#  Place                           Map
--------------------------------------------------
You use Teleport on yourself (Lv: 1)
Monster X (2) hit You when your HP is under 25. Teleporting...
[ 17/ 46] Monster X (2) attacks you (Dmg: 187) (Delay: 576ms)
Monster X (3) uses Blooddrain on Player Y (0) (Dmg: 149) (Delay: 576ms)
Teleporting due to insufficient HP/SP or too many aggressives
Map Change: map.gat (264, 51)
----------------- Warp Portal --------------------
#  Place                           Map
--------------------------------------------------
You use Teleport on yourself (Lv: 1)

And the AI gets stuck on skill_use.

To me it seems its being called twice by two different pieces of code.

Once in Corelogic.pm line 2870:
Code:
      message T("Teleporting due to insufficient HP/SP or too many aggressives\n"), "teleport";
      $ai_v{temp}{clear_aiQueue} = 1 if (useTeleport(1));
      $timeout{ai_teleport_hp}{time} = time;

And is overlapping with line 2706 in Misc.pm:
Code:
         } elsif ($config{$player->{configPrefix}.'teleportAuto_hp'} && percent_hp($player) <= $config{$player->{configPrefix}.'teleportAuto_hp'}) {
               message TF("%s hit %s when %s HP is under %d. Teleporting...\n",
                  $monster, $player, $player->verb(T('your'), T('its')), $config{$player->{configPrefix}.'teleportAuto_hp'}), "teleport";
               $teleport = 1;
...
useTeleport(1, undef, 1) if ($teleport);


Then to useTeleport() again in Misc.pm line 2894:
Code:
      if ($use_lvl == 1) {
         Plugins::callHook('teleport_sent', \%args);
         $messageSender->sendWarpTele(26, "Random");
         return 1;

Then to ServerType0.pm line 1456:
Code:
sub sendWarpTele { # type: 26=tele, 27=warp
   my ($self, $skillID, $map) = @_;
   my $msg = pack('v2 Z16', 0x011B, $skillID, stringToBytes($map));
   $self->sendToServer($msg);
   debug "Sent ". ($skillID == 26 ? "Teleport" : "Open Warp") . "\n", "sendPacket", 2
}



With a lot of testing I found if i set ai_teleport_hp to a high number like 5, it pretty much eliminates the problem. So I think the offending code is Corelogic.pm line 2870. Although I'm not sure of how to change the code to solve the error from happening without a high timeout.


Top
 Profile  
 
 Post subject: Re: AI get stuck in twRO renewal (teleport)
PostPosted: 14 Jun 2011, 11:02 
Offline
Administrator
Administrator
User avatar

Joined: 24 Apr 2008, 12:02
Posts: 1301
Hmm. Seems to be the race condition.

_________________
Join our Team. Click here.
Image


Image


Top
 Profile  
 
 Post subject: Re: AI get stuck in twRO renewal (teleport)
PostPosted: 14 Jun 2011, 12:10 
Offline
Noob
Noob

Joined: 18 May 2011, 21:12
Posts: 13
Did some more testing with eharvest's help. Tried to add timeouts to the low HP teleport call in Misc.pm but it didn't help. I think that part of the code wasn't the problem since I can reproduce the error without calling that part. I think the problem code is in CoreLogic.pm:
Code:
message T("Teleporting due to insufficient HP/SP or too many aggressives\n"), "teleport";
      $ai_v{temp}{clear_aiQueue} = 1 if (useTeleport(1));
      $timeout{ai_teleport_hp}{time} = time;

which ends up calling in Misc.pm:
Code:
         if (!$emergency && $use_lvl == 1) {
            Plugins::callHook('teleport_sent', \%args);
            $timeout{ai_teleport_retry}{time} = time;
            AI::queue('teleport');
            return 1;
         }

I can easily reproduce the problem, set a low ai_teleport_hp (0.1->1) and set a low teleportAuto_minAggressives to get it to trigger easily using teleportAuto_useSkill 1. Nine times out of 10 the problem will happen for me. Not sure if its due to latency or postdelays. It seems easy to fix conceptually, just check to make sure the dialog box is closed after a certain short delay, hitting 'Cancel' on the box. Sadly I'm not sure how to do that, theres a bunch of other similar calls in CoreLogic.pm but they all use other timeouts that are uses less frequently and/or have a higher default timeout.

If I set a high ai_teleport_retry and a low ai_teleport_hp teleport seems to not work in time (at least with my small hp pool) and I die most of the time, but if I do the reverse (high HP, low retry) it seems to work well and I haven't seen it bug so far.

Edit: After testing over night, it still does bug with a high ai_teleport_hp, but much less frequently just due to it not spamming teleport as much. It helps the problem but won't solve it. I tried a bunch of things to try and fix it but I'm not familiar enough with the code to make it happen. It seems to me we need to confirm skill use (You use Teleport on yourself (Lv: 1)) and wait for mapChanged in the AI (map_change Recieve/ServerType0.pm) before casting again. It needs to spam like it does now however because of lag and postdelay, but not actually send the skill twice.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 34 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


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