ID:159539
 
What do i do to make usr.powerlevel = basepowerlevel.Every Time i click my power up verb it only power ups half and stop when i want it to power up to the usr. basepowerlevel.

That's extremely vague. For me or anyone else to give you a proper answer, you'll need to first elaborate on what you're trying to do and second show the snippet.

But from my guess is that it looks something like...
usr.powerlevel = usr.basepowerlevel*1.5


In which case you'll want...
usr.powerlevel = usr.basepowerlevel //...to return the powerlevel var back to normal
DBZ game, right? So if my guess is right then what you want is for your powerlevel to increase until it hits the basepowerlevel but then stop there? Sort of like healing yourself and your energy in one, regeneration style. Ok if I'm correct, this is exactly what you need.

var
charging = 0

verb
Power_Up()
if(usr.charging == 1)
usr<<"Your already powering up!"
return
usr.charging = 1// This is to prevent you from stacking power ups, making it power up faster(exploit)
usr.Charge()

proc
Charge()
while(usr.powerlevel<usr.basepowerlevel)
usr.powerlevel+= 5//change this number depending on how much is restored in each interval
//usr.powerlevel += usr.basepowerlevel/20 if you want your PL to increase by 5% of your basePL each interval then use this instead of the above line
if(usr.powerlevel>=usr.basepowerlevel)//This is how we make sure your powerlevel doesnt go over your basePL
usr.powerlevel = usr.basepowerlevel//If it does go over, its just lowered back to your basePL
usr.charging = 0//This is so you can use the Power_Up() verb again
sleep(5)//change this number depending on how fast you want your PL to increase

Hope this helps you out, as the spunky girl said though, you could have been more specific but I remember when I first started and I didnt know how to ask, so I had to learn on my own, I am just glad your trying.
In response to LevelUp
More bad code. Don't post if you don't know what you're doing.
In response to LevelUp
Warning. Using usr in procs is a bad practice. I'd prefer src.

You could use the <dm> and </dm> tags to enclose the code like this:
"Hello"



In response to Popisfizzy
Okay from now on I wont post but if you know how to do it then why dont you help, instead of just saying that working code is bad. And thanks Jemai, I will use src in future.