Jump to content

Recommended Posts

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

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.