How to: spend Multiple stat points? in Developer Help
|
|
mob var statpoints = 0 Topic(href,href_list[]) switch(href_list["action"]) if("Stamina") if(src.statpoints > 0) src.statpoints -- src.mhealth += 14 src.Stats() if("Reiatsu") if(src.statpoints > 0) src.statpoints -- src.mrei += 8 src.Stats() if("Strength") if(src.statpoints > 0) if(src.mattack < 40000) src.statpoints -- src.attack += 3 src.mattack += 3 src.Stats() else src << output("You've reached your Strength Cap!","default.battle") if("Defence") if(src.statpoints > 0) if(src.mdefence < 40000) src.statpoints -- src.defence += 3 src.mdefence += 3 src.Stats() else src << output("You've reached your Defense Cap!","default.battle") if("Reiryoku") if(src.statpoints > 0) if(src.mreiatsu < 40000) src.statpoints -- src.reiatsu += 3 src.mreiatsu += 3 src.Stats() else src << output("You've reached your Reiryoku Cap!","default.battle") return proc Stats() 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 Stat_Sheet() set hidden = 1 usr.Stats()
|
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?
|