[BUG + Resolution] OpenKore not teleport w/ creamy card

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

Post Reply
Message
Author
nizdi
Human
Human
Posts: 26
Joined: 19 Oct 2012, 23:31
Noob?: No

[BUG + Resolution] OpenKore not teleport w/ creamy card

#1 Post by nizdi »

I saw the resolution from another forum, so everything im pasting here is from the other forum:

Problem:
The problem is when openkore trying to teleport using an accessory with creamy card.
Hypothetical situation: the bot is working normally, he walks, attacks, and when need to teleport for the first time he equip the acessory as in the line "teleportAuto_equip_rightAccessory Clip [Creamy Card] [1]", and when back to attack the monsters (after teleport) him removes creamy and equip the usual accessory, so far so normal. The problem occurs when the teleporter is required again, it just hangs there and does not teleport, and will not appear on the error console. That happens because he doesn't equip Clip again.
I made many tests, he did not need to attack to present the problem if you give the command to teleport and then unequip the tab and send teleport again it crashes.

Solution:

Problem solved, after much rummaging through the code, I found where the problem was and corrected.
What was happening was that after equip creamy Kore understood that he had the ability to "teleport" as fixed, he made no assumption that he could lose this activity when changing accessories.

In src/Misc.pm we have the useTeleport function:

Code: Select all

if ($char->{skills}{AL_TELEPORT}) {
	$sk_lvl = $char->{skills}{AL_TELEPORT}{lv};
}
I put it just to see if it needs to equip the clip or not to enable the Teleport skill, then just add a conditional and the code looks like this:

Code: Select all

if ($char->{skills}{AL_TELEPORT} && !Actor::Item::scanConfigAndCheck('teleportAuto_equip')) {
	$sk_lvl = $char->{skills}{AL_TELEPORT}{lv};
}
This does not make any problems even if you have a acolyt class which has teleport skill.


I want to thanks for Alzerbaijao for finding and fixing this bug, everything i wrote up here was quotes from his question/solution. He also said that this was a bug added by a weekly maintenance, which is very strange.

Please add this to the source.

SkylorD
Moderators
Moderators
Posts: 1163
Joined: 16 Dec 2011, 02:53
Noob?: Yes
Location: Brazil

Re: [BUG + Resolution] OpenKore not teleport w/ creamy card

#2 Post by SkylorD »

Thanks for that. Someone will check this.

Ressurecting this for MASTERS
Learn rules

Post Reply