Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. function makestats()
  2. createMiniConsole("AffectsWindow",700,0,420,300)
  3. setMiniConsoleFontSize("AffectsWindow", 9)
  4. setBackgroundColor("AffectsWindow",20,0,0,255)
  5. end
  6.  
  7. function makechat()
  8. WindowWidth = 0;
  9. WindowHeight = 0;
  10. WindowWidth, WindowHeight = getMainWindowSize();
  11.  
  12. createMiniConsole("Chats", 0,0,0,0)
  13. moveWindow("Chats", WindowWidth-650,0)
  14. resizeWindow("Chats", 650,300)
  15. setBackgroundColor("Chats",0,0,0,0)
  16. setMiniConsoleFontSize("Chats", 8)
  17. -- wrap lines in window "Chats" at 40 characters per line
  18. setWindowWrap("Chats", 80)
  19. setMiniConsoleFontSize("Chats", 10)
  20.  
  21. -- set default font colors and font style for window "Chats"
  22. setTextFormat("Chats",0,0,0,255,255,255,0,0,0)
  23. end
  24.  
  25. function resizeextra()
  26. makechat()
  27. makestats()
  28. end
  29.  
  30. function keepStaticSize()
  31. setMainWindowSize(1280,720)
  32. end -- keepStaticSize
  33.  
  34. registerAnonymousEventHandler("sysWindowResizeEvent", "resizeextra")
  35. function UpdateSStats()
  36. clearWindow("AffectsWindow")
  37. echo("AffectsWindow","\nAffects\n--------\n")
  38.  
  39. for k,v in pairs(msdp.AFFECTS) do
  40. if (k ~= "item-generated") then
  41. if k ~= "class" then
  42.  
  43. echo("AffectsWindow",string.format("%-20s",string.upper(k))..string.format("%5s",os.date("*t",v).min..":"..os.date("%S",v)).."\n")
  44.  
  45. end
  46. end
  47. end
  48. echo("AffectsWindow","----------------\n")
  49. echo("AffectsWindow","Health: "..msdp.HEALTH.."\n")
  50. echo("AffectsWindow","Mana: "..msdp.MANA.."\n")
  51. echo("AffectsWindow","Movement: "..msdp.MOVEMENT.."\n")
  52. echo("AffectsWindow",msdp.AREA_NAME..": "..msdp.ROOM_NAME.." ["..msdp.ROOM_VNUM.."]\n")
  53. if myop ~= false then
  54. echo("AffectsWindow","Opponent: "..msdp.OPPONENT_NAME.."\n")
  55. end
  56.  
  57. end
  58. function makestats()
  59. createMiniConsole("AffectsWindow",700,0,420,300)
  60. setMiniConsoleFontSize("AffectsWindow", 9)
  61. setBackgroundColor("AffectsWindow",20,0,0,255)
  62. end
  63.  
  64. function makechat()
  65. WindowWidth = 0;
  66. WindowHeight = 0;
  67. WindowWidth, WindowHeight = getMainWindowSize();
  68.  
  69. createMiniConsole("Chats", 0,0,0,0)
  70. moveWindow("Chats", WindowWidth-650,0)
  71. resizeWindow("Chats", 650,300)
  72. setBackgroundColor("Chats",0,0,0,0)
  73. setMiniConsoleFontSize("Chats", 8)
  74. -- wrap lines in window "Chats" at 40 characters per line
  75. setWindowWrap("Chats", 80)
  76. setMiniConsoleFontSize("Chats", 10)
  77.  
  78. -- set default font colors and font style for window "Chats"
  79. setTextFormat("Chats",0,0,0,255,255,255,0,0,0)
  80. end
  81.  
  82. function resizeextra()
  83. makechat()
  84. makestats()
  85. end
  86.  
  87.  
  88. registerAnonymousEventHandler("sysWindowResizeEvent", "resizeextra")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement