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

Posts: 37
Joined: Mar 2012
Reputation: 16
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 Offline
Amber Basilisk
*

Posts: 37
Joined: Mar 2012
Reputation: 16
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 enchantedLevel = 0;
 local skillLevel = skill.skillLvl;
 if (skillLevel > 900) then
 enchantedLevel = skillLevel - 900;
 elseif (skillLevel > 800) then
 enchantedLevel = skillLevel - 800;
 elseif (skillLevel > 700) then
 enchantedLevel = skillLevel - 700;
 elseif (skillLevel > 600) then
 enchantedLevel = skillLevel - 600;
 elseif (skillLevel > 500) then
 enchantedLevel = skillLevel - 500;
 elseif (skillLevel > 400) then
 enchantedLevel = skillLevel - 400;
 elseif (skillLevel > 300) then
 enchantedLevel = skillLevel - 300;
 elseif (skillLevel > 200) then
 enchantedLevel = skillLevel - 200;
 elseif (skillLevel > 100) then
 enchantedLevel = skillLevel - 100;
 end;
 
 ShowToClient("Skills:", skill.name .. "(+ " .. tostring(enchantedLevel) .. ")");
end;

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 2,233 03-03-2017 20:07 PM
Last Post: deivuzas1
  Help, with "Auto" De-level script JavaFan 3 893 11-12-2015 17:18 PM
Last Post: JavaFan
  l2tower using skill's bogdanel 2 1,531 11-10-2015 18:17 PM
Last Post: cvetangor
  Nuke/skill delay lordbauer 6 1,843 04-15-2015 02:44 AM
Last Post: plixplox
Smile Elemental Summoner (Merrow the Unicorn) Skill Script feoh_wizard 0 1,456 02-14-2015 09:19 AM
Last Post: feoh_wizard
  Auto Enchant Script sone78 3 3,791 11-26-2014 17:20 PM
Last Post: sone78
WTS WTS Acc on Naia Level 99 Psyduck 0 590 11-25-2014 01:14 AM
Last Post: Psyduck
Big Grin dash skill(TH) aisvariukas 8 1,442 11-13-2014 18:50 PM
Last Post: aisvariukas
  Tower not automatic hits after level 85 !!!!! italovelozo 3 1,292 10-17-2014 19:41 PM
Last Post: fikusas
  Problema con IDs Skill ronycontreras 4 1,228 09-30-2014 23:18 PM
Last Post: ronycontreras



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