Advertisement
Guest User

Untitled

a guest
May 24th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. --By Sellandir
  2. --dedicated for him his party temmates
  3. -- version 1.0
  4.  
  5. init start
  6. ypos = 20;
  7. xpos = 00;
  8. width = 20;
  9. height = 200;
  10. xvalue = 120
  11. data = {}
  12. known_players = {"Elos Tanabinon", "Sir Kaseku", "Sellandir", "Wiktor Wektor Trzy"}
  13. init end
  14.  
  15. function inTable(tbl, item)
  16. for key, value in pairs(tbl) do
  17. if value == item then return key end
  18. end
  19. return false
  20. end
  21.  
  22. function scan(info)
  23. if inTable(data, info.id) == false and inTable(known_players, info.name) ~= false then
  24. table.insert(data, info.id)
  25. end
  26. end
  27.  
  28. function disp_name(arg)
  29. if arg == "Elos Tanabinon" then
  30. return "Tanabi"
  31. end
  32. if arg == "Sir Kaseku" then
  33. return "Ardjan"
  34. end
  35. if arg == "Sellandir" then
  36. return "Rosa"
  37. end
  38. if arg == "Wiktor Wektor Trzy" then
  39. return "Mientos"
  40. end
  41. end
  42.  
  43. scan($target)
  44. for k, v in pairs(data) do
  45.  
  46. scan = getcreaturebyid(v)
  47. scannedhp = scan.hppc
  48.  
  49. if scannedhp > 0 then
  50. --nameBar
  51. setfillstyle('gradient', 'linear', 2, 0, 0, 0, width+2)
  52. addgradcolors(0, 0x666666, 1.0, 0xCCCCCC)
  53. drawroundrect(xpos, ypos + width*k, 70, width, 2, 2)
  54. drawtext(disp_name(scan.name), xpos + 8, ypos + 2+ width*k)
  55. --redHpBar
  56. setfillstyle('gradient', 'linear', 2, 0, 0, 0, width+2)
  57. addgradcolors(0, 0xAA6666, 1.0, 0xCCCCCC)
  58. --greenHpBar
  59. drawroundrect(xpos+70, ypos + width*k, height, width, 2, 2)
  60. addgradcolors(0, 0x66AA66, 1.0, 0xCCCCCC)
  61. drawroundrect(xpos+70, ypos + width*k, height*scannedhp/100, width, 2, 2)
  62. drawtext(" Hp: "..scan.hppc.."%", xpos + 8 + xvalue, ypos + 2 + width*k)
  63. end
  64.  
  65. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement