Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --By Sellandir
- --dedicated for him his party temmates
- -- version 1.0
- init start
- ypos = 20;
- xpos = 00;
- width = 20;
- height = 200;
- xvalue = 120
- data = {}
- known_players = {"Elos Tanabinon", "Sir Kaseku", "Sellandir", "Wiktor Wektor Trzy"}
- init end
- function inTable(tbl, item)
- for key, value in pairs(tbl) do
- if value == item then return key end
- end
- return false
- end
- function scan(info)
- if inTable(data, info.id) == false and inTable(known_players, info.name) ~= false then
- table.insert(data, info.id)
- end
- end
- function disp_name(arg)
- if arg == "Elos Tanabinon" then
- return "Tanabi"
- end
- if arg == "Sir Kaseku" then
- return "Ardjan"
- end
- if arg == "Sellandir" then
- return "Rosa"
- end
- if arg == "Wiktor Wektor Trzy" then
- return "Mientos"
- end
- end
- scan($target)
- for k, v in pairs(data) do
- scan = getcreaturebyid(v)
- scannedhp = scan.hppc
- if scannedhp > 0 then
- --nameBar
- setfillstyle('gradient', 'linear', 2, 0, 0, 0, width+2)
- addgradcolors(0, 0x666666, 1.0, 0xCCCCCC)
- drawroundrect(xpos, ypos + width*k, 70, width, 2, 2)
- drawtext(disp_name(scan.name), xpos + 8, ypos + 2+ width*k)
- --redHpBar
- setfillstyle('gradient', 'linear', 2, 0, 0, 0, width+2)
- addgradcolors(0, 0xAA6666, 1.0, 0xCCCCCC)
- --greenHpBar
- drawroundrect(xpos+70, ypos + width*k, height, width, 2, 2)
- addgradcolors(0, 0x66AA66, 1.0, 0xCCCCCC)
- drawroundrect(xpos+70, ypos + width*k, height*scannedhp/100, width, 2, 2)
- drawtext(" Hp: "..scan.hppc.."%", xpos + 8 + xvalue, ypos + 2 + width*k)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement