ID:156489
 
mob
var
statpoints = 0//just so you can test this if you want.
Topic(href,href_list[])//This is the topic for when src presses the + sign
switch(href_list["action"])
if("Stamina")
if(src.statpoints > 0)//if src has battlepoints
src.statpoints -- // take away 1 battlepoint
src.mhealth += 14
src.Stats()//calls proc again so the window doesn't close
if("Reiatsu")
if(src.statpoints > 0)//if src has battlepoints
src.statpoints -- // take away 1 battlepoint
src.mrei += 8
src.Stats()//calls proc again so the window doesn't close
if("Strength")
if(src.statpoints > 0)//if src has battlepoints
if(src.mattack < 40000)
src.statpoints -- // take away 1 battlepoint
src.attack += 3// add 1 health
src.mattack += 3
src.Stats()//calls proc again so the window doesn't close
else
src << output("You've reached your Strength Cap!","default.battle")
if("Defence")
if(src.statpoints > 0)//if src has battlepoints
if(src.mdefence < 40000)
src.statpoints -- // take away 1 battlepoint
src.defence += 3
src.mdefence += 3
src.Stats()//calls proc again so the window doesn't close
else
src << output("You've reached your Defense Cap!","default.battle")
if("Reiryoku")
if(src.statpoints > 0)//if src has battlepoints
if(src.mreiatsu < 40000)
src.statpoints -- // take away 1 battlepoint
src.reiatsu += 3// add 1 health
src.mreiatsu += 3
src.Stats()//calls proc again so the window doesn't close
else
src << output("You've reached your Reiryoku Cap!","default.battle")
return
proc
Stats()//Heres your stat sheet proc
src<<browse_rsc('Banner.PNG',"Banner.PNG")
var/stats={"\
<head>
<title>Stats.</title>
<style>
body{
background: black;
color: white;
}
</style>
<body>
<img src="Banner.PNG"><b>
[src]'s Stats.
<center>
<b>
Statpoints:
[statpoints]
<br>
Health\[
[mhealth]]-\[<a href=?src=\ref[src];action=Stamina>+</a>]
Reiatsu\[
[mrei]]-\[<a href=?src=\ref[src];action=Reiatsu>+</a>]
Strength\[
[mattack]]-\[<a href=?src=\ref[src];action=Strength>+</a>]
Defence\[
[mdefence]]-\[<a href=?src=\ref[src];action=Defence>+</a>]
Reiryoku\[
[mreiatsu]]-\[<a href=?src=\ref[src];action=Reiryoku>+</a>]
</b>
</center>
</body>
"}

src<<browse(stats,"window=StatSheet;size=180x250;can_resize=1")
verb//the verb for the usr
Stat_Sheet()
set hidden = 1
usr.Stats()// call the Stats proc


Now, when you normally click it, it'll add one statpoint to a stat, but I want to make a pop up box appear saying how much you want to put in. Any suggestions?
input() as num, min(), max()