ID:161685
 
What im looking to do is make a stat panel appear after using a command. I have done something simular by making a variable for the user, then making it check for that and show the stat panel if it finds it...

            if(usr.vgrave==1)
statpanel("Graveyard")
stat("Cards in Graveyard (Ascending Order):",usr.DuelGraveyard.len)
stat(usr.DuelGraveyard)


... but there must be a better way.

At the moment i want to get an object in the users inventory to show a stat panel. But im not sure how to go about it....


obj
items
verb
Show_Stat_Panel()
???


Yeah this is where i get kinda stuck.

Stat()
statpanel("Stats")
stat("Name", src.key)
stat ("gold", gold)
..()
thats how i made a stat panel with gold and your usr name in it hope it helped u ^^ if not oh well
mob/var/Stat_Panel=0

mob/proc/Stats()
if(Stat_Panel)
statpanel("Graveyard")
stat("Cards in Graveyard (Ascending Order):",usr.DuelGraveyard.len)
stat(usr.DuelGraveyard)

obj/items/verb/Show_Stat_Panel()
Stat_Panel=1


How's that? Hope I helped.