Moderator: Moderators
sofax222
Developers
Posts: 214 Joined: 24 Nov 2010, 03:08
Noob?: Yes
#1
Post
by sofax222 » 28 Mar 2013, 20:47
Any one could tell me !
What mean is these code lines in "sub checkSelfCondition" of Misc.pm
Code: Select all
........
my $skill = Skill->new(auto => $config{$prefix});
return 0 unless ($char->getSkillLevel($skill)
|| $config{$prefix."_equip_leftAccessory"}
|| $config{$prefix."_equip_rightAccessory"}
|| $config{$prefix."_equip_leftHand"}
|| $config{$prefix."_equip_rightHand"}
|| $config{$prefix."_equip_robe"}
);
......
Kaspy
Halfway to Eternity
Posts: 398 Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil
#2
Post
by Kaspy » 28 Mar 2013, 22:09
Been implemented in r2940
Code: Select all
Revision: 2940
Author: damokles
Date: domingo, 17 de julho de 2005 11:25:58
Message:
Added Skill check, If you want to use the old equipAuto simply add
'equip_leftAccessory X' to your config
----
Modified : /trunk/openkore/src/Misc.pm
Before:
if ($prefix =~ /skill/i) {
return 0 unless ($char->{sp} >= $skillsSP_lut{$skills_rlut{lc($config{$prefix})}}{$config{$prefix . "_lvl"}})
}
After
if ($prefix =~ /skill/i) {
my $skill_handle = $skills_rlut{lc($config{$prefix})};
return 0 unless (($char->{skills}{$skill_handle} && $char->{skills}{$skill_handle}{lv} >= 1)
|| ($char->{permitSkill} && $char->{permitSkill}->name eq $config{$prefix})
|| $config{$prefix."_equip_leftAccessory"}
|| $config{$prefix."_equip_rightAccessory"}
|| $config{$prefix."_equip_leftHand"}
|| $config{$prefix."_equip_rightHand"}
|| $config{$prefix."_equip_robe"}
);
return 0 unless ($char->{sp} >= $skillsSP_lut{$skill_handle}{$config{$prefix . "_lvl"}});
}
sofax222
Developers
Posts: 214 Joined: 24 Nov 2010, 03:08
Noob?: Yes
#3
Post
by sofax222 » 29 Mar 2013, 03:19
What mean is the "old equipAuto " ?
I think these code lines seems not needs ?
Kaspy
Halfway to Eternity
Posts: 398 Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil
#4
Post
by Kaspy » 29 Mar 2013, 13:22
I believe we can delete without causing problems
sofax222
Developers
Posts: 214 Joined: 24 Nov 2010, 03:08
Noob?: Yes
#5
Post
by sofax222 » 30 Mar 2013, 08:28
Could I modify them to keep the "equip_?????"'s config paramemters.
Let them seem like the "whenEquipped" config paramemters.
Such as:
Code: Select all
for my $slot (@Actor::Item::slots) {
if ($config{$prefix."_equip_".$slot}) {
my $item = Actor::Item::get($config{$prefix."_equip_".$slot});
return 0 unless $item && $item->{equipped};
}
}
EternalHarvest
Developers
Posts: 1798 Joined: 05 Dec 2008, 05:42
Noob?: Yes
#6
Post
by EternalHarvest » 07 May 2013, 10:09
That's a check if you have specified skill at all (it allows to ignore blocks with skills you don't currently have). Some skills are available via equipping something, so if a block has instructions to equip something in order to cast a skill, this check would be skipped. (
http://forums.openkore.com/viewtopic.ph ... 51#p100051 )
c4c1n6kr3m1
The Way Of Human
Posts: 150 Joined: 24 Mar 2012, 04:13
Noob?: Yes
#7
Post
by c4c1n6kr3m1 » 04 Jun 2013, 01:09
once, i need to use Increase Agility from Shoes Of Valor.
and fail because of this?