L2Tower Discord Let's keep the community alive with discord. Discussions about plugins and scripts L2Tower Discord

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get skill enchant level
Author Message
raid1141 Online
Amber Basilisk
*

Posts: 37
Joined: Mar 2012
Reputation: 18
Version: 1.4.2.142
Post: #1
Get skill enchant level

Hi,
Something I am struggling with - I cannot obtain properly a skill enchant level.

Here is a simple skill-list script I was using to debug:

Code:
skills = GetSkills();
for skill in skills.list do
    ShowToClient("Skills:", skill.name .. " - " .. tostring(skill.skillId) .. "(Lvl." .. tostring(skill.skillLvl) .. ")");
end;

, but it seems "skillLvl" value is *a strangle mix* between the actual skill level + the enchant level. Example, I have a skill default level 41, the same one is enchanted to +15, and the final value I receive from "skillLvl" is 115 lol (the leading "4" is missing, and the enchant level is joined at the end)

Could you please let me know (if anyone knows) how to extract the skill enchant level.

+Suggestion - The Skill class should have another property maybe - not only skillLvl, but also skillEnchantLvl.
10-10-2015 14:22 PM
Find all posts by this user Quote this message in a reply
raid1141 Online
Amber Basilisk
*

Posts: 37
Joined: Mar 2012
Reputation: 18
Version: 1.4.2.142
Post: #2
RE: Get skill enchant level

Well, I haven't tested it, but I believe the answer is:

    LUA Programming
skills = GetSkills();
for skill in skills.list do
 local skillEnchantLvl = skill.skillLvl > 100 and skill.skillLvl % 100 or 0;
 ShowToClient("Skills:", skill.name .. "(+ " .. tostring(skillEnchantLvl) .. ")");
end;

(This post was last modified: 10-30-2018 21:45 PM by raid1141.)
10-15-2015 14:57 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Need Help] Enchant Script nvnhathuy 1 5,279 03-03-2017 20:07 PM
Last Post: deivuzas1
  Help, with "Auto" De-level script JavaFan 3 3,115 11-12-2015 17:18 PM
Last Post: JavaFan
  l2tower using skill's bogdanel 2 3,753 11-10-2015 18:17 PM
Last Post: cvetangor
  Nuke/skill delay lordbauer 6 5,308 04-15-2015 02:44 AM
Last Post: plixplox
Smile Elemental Summoner (Merrow the Unicorn) Skill Script feoh_wizard 0 3,212 02-14-2015 09:19 AM
Last Post: feoh_wizard
  Auto Enchant Script sone78 3 7,937 11-26-2014 17:20 PM
Last Post: sone78
WTS WTS Acc on Naia Level 99 Psyduck 0 1,630 11-25-2014 01:14 AM
Last Post: Psyduck
Big Grin dash skill(TH) aisvariukas 8 4,767 11-13-2014 18:50 PM
Last Post: aisvariukas
  Tower not automatic hits after level 85 !!!!! italovelozo 3 3,222 10-17-2014 19:41 PM
Last Post: fikusas
  Problema con IDs Skill ronycontreras 4 3,755 09-30-2014 23:18 PM
Last Post: ronycontreras



User(s) browsing this thread: 1 Guest(s)