score.txt 1.91 KB
def score(id, players, mud):
    from math import floor
    
    mud.send_message(id, "  %green+----------------------------=Score=---------------------------+", nowrap=True)
    hp = str("%d/%d" % (floor(players[id]['hp']), floor(players[id]['maxhp']))).center(12, ' ')
    mp = str("%d/%d" % (floor(players[id]['mp']), floor(players[id]['maxmp']))).center(12, ' ')
    sta = str("%d/%d" % (floor(players[id]['sta']), floor(players[id]['maxsta']))).center(12, ' ')

    mud.send_message(id, "  %%green|%%reset%%bold%%white%s%%reset%%green|" % (players[id]["name"].center(62),), nowrap=True)
    mud.send_message(id, "  %green+--------------------------------------------------------------+", nowrap=True)
    mud.send_message(id, "  %%green|%%reset %%cyanHP:%%reset %%white[%s]%%reset %%green|%%reset %%cyanMP:%%reset %%white[%s]%%reset %%green|%%reset %%cyanST:%%reset %%white[%s]%%reset %%green|%%reset" % (hp, mp, sta), nowrap=True)
    

  #   output = """
  # --------------------------------------------
  # HP:  {hp}    Max HP:  {maxhp}
  # MP:  {mp}    Max MP:  {maxmp}
  # Sta: {sta}   Max Sta: {maxsta}
  # Experience: {exp}
  # Skills:""".format(hp=floor(players[id]['hp']),
  #          mp=floor(players[id]['mp']),
  #          maxhp=floor(players[id]['maxhp']),
  #          maxmp=floor(players[id]['maxmp']),
  #          sta=floor(players[id]['sta']),
  #          maxsta=floor(players[id]['maxsta']),
  #          exp=0)
    # mud.send_message(id, output)

    mud.send_message(id, "  %green+---------------------------=Skills=---------------------------+", nowrap=True)
    skills = ["skillasdfasdfasdfasdf", "skill 2 sdfg sdfg", "Skill 3 asdf ewrewwr"]
    for skill in skills:
        mud.send_message(id, "  %%green|%%reset %s%%green|%%reset" % (skill.ljust(61),), nowrap=True)

    mud.send_message(id, "  %green+--------------------------------------------------------------+", nowrap=True)



score(id, players, mud)
del score