CZEboy 29 Posted June 27, 2016 Share Posted June 27, 2016 Hello friends, I would need to use a loop which will check skills level and do something, e.g. if skill level > M1. I would like to auto increase skill level in the exact levelup. For instace, when player gets level 30 all his skills which are M1 will auto increase to G1. Can you help me with the loop please ? Kind regards. Link to comment Share on other sites More sharing options...
CZEboy 29 Posted July 2, 2016 Author Share Posted July 2, 2016 PUSH Still seeking for solution Link to comment Share on other sites More sharing options...
Premium Galet 510 Posted July 2, 2016 Premium Share Posted July 2, 2016 Hi, This is really simple (untested tho) : if 20 == pc.get_skill_level(skill_vnum) then say("blabla") end I suppose M1 = 20 because 30 = G and 40 = P PS : You have to set skill_vnum Link to comment Share on other sites More sharing options...
CZEboy 29 Posted July 2, 2016 Author Share Posted July 2, 2016 5 minutes ago, galet said: Hi, This is really simple (untested tho) : if 20 == pc.get_skill_level(skill_vnum) then say("blabla") end I suppose M1 = 20 because 30 = G and 40 = P PS : You have to set skill_vnum Hi thanks for your reply, anyway, I need it in C++ and i need some cycle such as FOR or WHILE which will check all skills, don't I ? Link to comment Share on other sites More sharing options...
Premium Galet 510 Posted July 2, 2016 Premium Share Posted July 2, 2016 Why do such a thing in C++ if everything could be created by quest ? I mean, yes it could be stupid to hear my sentence, but in this case, everything is already done in C++ (a function to see the skill's level and a function to increase it) so you just have to create a simple loop in .lua ^^ Link to comment Share on other sites More sharing options...
CZEboy 29 Posted July 2, 2016 Author Share Posted July 2, 2016 6 minutes ago, galet said: Why do such a thing in C++ if everything could be created by quest ? I mean, yes it could be stupid to hear my sentence, but in this case, everything is already done in C++ (a function to see the skill's level and a function to increase it) so you just have to create a simple loop in .lua ^^ Yea you're maybe right, however, isn't C++ always better sollution I mean when i use lua it still will call some C++ method so it will be slower than it could be ? I was quite stupid when i was asking this, because there is almost everthing in char_skill.cpp, i will just make a new method here and call it from char "PointChange" from right case and some if statement. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now