Hey guys.. there was this one guy that said you cannot make a hud that shows your current stamina with mins.. I am about to prove him wrong
Old Code:
Better Code:
Old Code:
Code:
12000 {Hud} levelpercent:=self.Level%() level:=Self.Level() cap:=Self.Capacity() stamina:=Self.StaminaMins() staminamins:=Self.StaminaMins() staminaminsleft:=Self.StaminaMins() cc:=Misc.ItemCountEx(3043) plat:=Misc.ItemCountEx(3035) gold:=Misc.ItemCountEx(3031) VarDiv(gold, 100) VarAdd(plat, !gold!) VarDiv(stamina, 60) VarDiv(staminamins, 60) VarMult(staminamins, 60) VarSub(staminaminsleft, !staminamins!) HUD.Print(3, 3, 255, 128, 0, 13500, Advanced Statistics:) HUD.Print(3, 3, 255, 255, 255, 13500, Current Level: !level! with !levelpercent!%) HUD.Print(3, 3, 255, 255, 255, 13500, Current Stamina: !stamina! hours and !staminaminsleft! minutes) HUD.Print(3, 3, 255, 255, 255, 13500, Current Cap: !cap!) HUD.Print(3, 3, 255, 255, 255, 13500, Current Gold: !cc!.!plat!cc) Exit()
Better Code:
Code:
12000 {Hud} levelpercent:=self.Level%() level:=Self.Level() cap:=Self.Capacity() stamina:=Self.StaminaMins() staminamins:=Self.StaminaMins() staminaminsleft:=Self.StaminaMins() cc:=Misc.ItemCountEx(3043) plat:=Misc.ItemCountEx(3035) gold:=Misc.ItemCountEx(3031) VarDiv(stamina, 60) VarDiv(staminamins, 60) VarMult(staminamins, 60) VarSub(staminaminsleft, !staminamins!) HUD.Print(3, 3, 255, 128, 0, 13250, Advanced Statistics:) VarSub(stamina, 14) HUD.Print(3, 3, 204, 255, 204, 13250, Stamina Runs out in: !stamina! hours and !staminaminsleft! minutes) VarAdd(stamina, 14) HUD.Print(3, 3, 0, 255, 0, 13250, Current Stamina: !stamina! hours and !staminaminsleft! minutes) HUD.Print(3, 3, 102, 255, 255, 13250, Current Cash: !cc!cc !plat! platinum and !gold! gold) HUD.Print(3, 3, 222, 255, 0, 13250, Current Level: !level! with !levelpercent!%) HUD.Print(3, 3, 174, 175, 170, 13250, Current Cap: !cap!) Exit()