HisaoShou 3 Posted July 23, 2017 Share Posted July 23, 2017 Hello everyone. I'd like to know how to decrease player's level with a quest. I have tried something like "pc.give_exp2(-9999999999)" but it didn't work Can someone help me please? (I had another idea to use "command" function but it works only for GM. If it had worked with players too but only via quest that would've be awesome for my problem) Link to comment Share on other sites More sharing options...
Solution M.Sorin 282 Posted July 23, 2017 Solution Share Posted July 23, 2017 You can use pc.set_level(number). 1 Link to comment Share on other sites More sharing options...
HisaoShou 3 Posted July 23, 2017 Author Share Posted July 23, 2017 1 oră în urmă, M.Sorin a spus: You can use pc.set_level(number). Thank you, it worked. Though I had to add pc.set_level in quest functions Link to comment Share on other sites More sharing options...
Riner 0 Posted July 23, 2017 Share Posted July 23, 2017 I crate this for you quest anything begin state start begin when 20092.chat."hello" begin -- if you need it login "when login with pc.is_gm ( ) begin" say(" hello every body ") say(" you want to level up:) ") local snow = select("yes", "no") if snow == 1 then local a = pc.get_level() local b = a - 1 say(" hello its mee ") pc.set_level(b) elseif snow == 2 then say(" we are soooorry ") end end end end Link to comment Share on other sites More sharing options...
Silver Sonitex 1438 Posted July 23, 2017 Silver Share Posted July 23, 2017 Just so you know, this system will bug the account because of the exp overflow, becareful how you use it. Link to comment Share on other sites More sharing options...
Premium Speachless 759 Posted July 24, 2017 Premium Share Posted July 24, 2017 You should add this to your function to avoid exp overflow local ep = pc . get_exp ( ) pc . give_exp2 ( - ep ) 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