Openkore.com

OpenKore Forums
It is currently 18 Nov 2018, 14:22

All times are UTC - 5 hours [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: What mean is these code lines in "sub checkSelfCondition"
PostPosted: 28 Mar 2013, 20:47 
Offline
Developers
Developers

Joined: 24 Nov 2010, 03:08
Posts: 214
Any one could tell me !
What mean is these code lines in "sub checkSelfCondition" of Misc.pm
Code:
........
      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"}
                  );
......


Top
 Profile  
 
 Post subject: Re: What mean is these code lines in "sub checkSelfCondition"
PostPosted: 28 Mar 2013, 22:09 
Offline
OpenKore Monk
OpenKore Monk

Joined: 08 Jun 2012, 15:42
Posts: 401
Location: Brazil
Been implemented in r2940
Code:
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:
Quote:
if ($prefix =~ /skill/i) {
return 0 unless ($char->{sp} >= $skillsSP_lut{$skills_rlut{lc($config{$prefix})}}{$config{$prefix . "_lvl"}})
}


After
Quote:
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"}});

}

_________________
Image


Top
 Profile  
 
 Post subject: Re: What mean is these code lines in "sub checkSelfCondition"
PostPosted: 29 Mar 2013, 03:19 
Offline
Developers
Developers

Joined: 24 Nov 2010, 03:08
Posts: 214
What mean is the "old equipAuto" ?

I think these code lines seems not needs ?


Top
 Profile  
 
 Post subject: Re: What mean is these code lines in "sub checkSelfCondition"
PostPosted: 29 Mar 2013, 13:22 
Offline
OpenKore Monk
OpenKore Monk

Joined: 08 Jun 2012, 15:42
Posts: 401
Location: Brazil
I believe we can delete without causing problems

_________________
Image


Top
 Profile  
 
 Post subject: Re: What mean is these code lines in "sub checkSelfCondition"
PostPosted: 30 Mar 2013, 08:28 
Offline
Developers
Developers

Joined: 24 Nov 2010, 03:08
Posts: 214
Could I modify them to keep the "equip_?????"'s config paramemters.
Let them seem like the "whenEquipped" config paramemters.
Such as:
Code:
   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};
      }
   }


Top
 Profile  
 
 Post subject: Re: What mean is these code lines in "sub checkSelfCondition"
PostPosted: 07 May 2013, 10:09 
Offline
Developers
Developers

Joined: 05 Dec 2008, 05:42
Posts: 1811
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. (viewtopic.php?p=100051#p100051)


Top
 Profile  
 
 Post subject: Re: What mean is these code lines in "sub checkSelfCondition"
PostPosted: 04 Jun 2013, 01:09 
Offline
Been there done that!
Been there done that!

Joined: 24 Mar 2012, 04:13
Posts: 124
once, i need to use Increase Agility from Shoes Of Valor.
and fail because of this?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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