L2Tower Discord
Let's keep the community alive with discord.
Discussions about plugins and scripts
L2Tower Discord
Thread Rating:
- 0 Vote(s) - 0 Average
- 1
- 2
- 3
- 4
- 5
IsSkillAvailable() and CanBeUsed() question
|
Author |
Message |
rORUMI
Expired VIP Member
 
Posts: 278
Joined: May 2014
Reputation: 50
Version:
1.4.2.142
|
IsSkillAvailable() and CanBeUsed() question
I need help with these features:
I understand that CanBeUsed() I check if I can use the skill on the target me, or monster
I understand that IsSkillAvailable() verify that "this" skill is available within my skills
Now my question is whether CanBeUsed() includes internally verify if the skill is available or necessary to use both functions to be sure?
What would be the best verification? or when required to do these checks?
CASE:1
Code:
if (Skill:IsSkillAvailable()) and (Skill:CanBeUsed()) then
UseSkillRaw(id,false,false)
CASE:2
Code:
if (Skill:CanBeUsed()) then
UseSkillRaw(id,false,false)
|
|
08-17-2014 03:20 AM |
|
benbt91
VIP Member
  
Posts: 694
Joined: Mar 2012
Reputation: 47
Version:
1.4.3.143
|
RE: IsSkillAvailable() and CanBeUsed() question
(08-17-2014 03:20 AM)rORUMI Wrote: I need help with these features:
I understand that CanBeUsed() I check if I can use the skill on the target me, or monster
I understand that IsSkillAvailable() verify that "this" skill is available within my skills
Now my question is whether CanBeUsed() includes internally verify if the skill is available or necessary to use both functions to be sure?
What would be the best verification? or when required to do these checks?
CASE:1
Code:
if (Skill:IsSkillAvailable()) and (Skill:CanBeUsed()) then
UseSkillRaw(id,false,false)
CASE:2
Code:
if (Skill:CanBeUsed()) then
UseSkillRaw(id,false,false)
if that will easy get erro ! Try this and change id + name
LUA Programming
ShowToClient("Won","Skill ON");
----------------------------------------------------------------------------------CONFIG
SkillNameId = 1234 -- skill id set here
SkillName = GetSkills():FindById(SkillNameId); -- Find Skill By ID
----------------------------------------------------------------------------------
repeat
if (GetTarget() ~= nil) then
if (GetTarget():IsMonster() == true) and (GetTarget():IsAlikeDeath() == false)
and (GetMe():IsAlikeDeath() == false) then
-------------------------------------------------------------------------Skills
if (SkillName ~= nil) and (SkillName:CanBeUsed()) then
Sleep(800);
UseSkillRaw(SkillNameId,false,false);
-- don't set id here look upside
Sleep(1200);
end;
end;
end;
Sleep(1000);
until false;
+2 if helpful and next time use search frist
(This post was last modified: 08-17-2014 05:15 AM by benbt91.)
|
|
08-17-2014 05:14 AM |
|
rORUMI
Expired VIP Member
 
Posts: 278
Joined: May 2014
Reputation: 50
Version:
1.4.2.142
|
RE: IsSkillAvailable() and CanBeUsed() question
(08-17-2014 05:16 AM)13dk13 Wrote: avaiable is when skill is rdy to go no delay.
canbeuse is if something like debuff prevent you to cast.
so better use both, btw now 131 is out suggest to get it
Thanks
I will check now the new version.131
|
|
08-17-2014 06:30 AM |
|
rORUMI
Expired VIP Member
 
Posts: 278
Joined: May 2014
Reputation: 50
Version:
1.4.2.142
|
RE: IsSkillAvailable() and CanBeUsed() question
(08-17-2014 09:30 AM)ClockMan Wrote: CanBeUsed checks also IsSkillAvailable.
Also it checks for stuns, mp, hp, ...
Ty ClockMan!
|
|
08-17-2014 22:23 PM |
|
Possibly Related Threads... |
Thread: |
Author |
Replies: |
Views: |
Last Post |
|
L2 Dragon question about bot, working or not |
kaan22747 |
0 |
2,926 |
02-15-2017 21:10 PM
Last Post: kaan22747
|
|
Question about bot |
kiciulica66 |
0 |
2,067 |
12-03-2016 01:00 AM
Last Post: kiciulica66
|
 |
Sources question |
teris19942 |
1 |
2,938 |
06-04-2016 02:41 AM
Last Post: gamias1
|
|
Multi-Box software question.. |
plixplox |
3 |
3,648 |
11-19-2015 23:17 PM
Last Post: valakas123
|
 |
Question (??) |
budarox |
0 |
2,174 |
07-04-2015 07:49 AM
Last Post: budarox
|
|
newbie question |
vipernestas |
2 |
3,423 |
04-29-2015 16:35 PM
Last Post: tsounakas
|
|
hi all 1 question |
botosu86 |
0 |
1,833 |
02-24-2015 20:09 PM
Last Post: botosu86
|
|
Question about L2Tower |
akoaymaylobo |
1 |
2,462 |
02-04-2015 03:17 AM
Last Post: Fox
|
|
a weird pick up question.... |
soul2eat |
3 |
3,404 |
01-07-2015 13:48 PM
Last Post: knutoz
|
|
AIR RUSH question |
capucine |
26 |
16,327 |
01-04-2015 10:32 AM
Last Post: tuansydney
|
User(s) browsing this thread: