Advertisement
hadar

Untitled

Aug 5th, 2014
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. local colorone = "@C" --color for first letter
  2. local colortwo = "@c" --color for rest of word
  3. local colorthree = "@R" --color if stat unmaxed
  4. local colorfour = "@G" --color if stat maxed
  5. local colorterm = "@w" --color to terminate the string
  6. local mathone
  7. local statmath
  8. local maxxed_stats
  9. local unmaxxed_stats
  10. local test=string.explode(all_stats_DB["AllStatsList"],"|")
  11. for _,v in ipairs(test) do
  12. if 26>all_stats_DB["characterlevel"] then
  13. mathone = 25
  14. elseif all_stats_DB==201 then
  15. mathone = 200
  16. else
  17. mathone = all_stats_DB["characterlevel"]
  18. end
  19. statmath=stats_specific_db["class_"..v]+mathone
  20. stat_check_DB["stat_max_check_"..v] = statmath
  21. end
  22.  
  23. for k,v in pairs(test) do
  24. if stat_check_db["stat_max_check_"..v]>stats_specific_db["total_bonus_"..v] then
  25. if unmaxxed_stats==nil then
  26. unmaxxed_stats=v:gsub("%a",string.upper,1).."(-"..stat_check_db["stat_max_check_"..v]-stats_specific_db["total_bonus_"..v]..")"
  27. else
  28. unmaxxed_stats=unmaxxed_stats..","..v:gsub("%a",string.upper,1).."(-"..stat_check_db["stat_max_check_"..v]-stats_specific_db["total_bonus_"..v]..")"
  29. end
  30. else
  31. if maxxed_stats==nil then
  32. maxxed_stats=v:gsub("%a",string.upper,1).."(+"..stats_specific_db["total_bonus_"..v]-stat_check_db["stat_max_check_"..v]..")"
  33. else
  34. maxxed_stats=maxxed_stats..","..v:gsub("%a",string.upper,1).."(+"..stats_specific_db["total_bonus_"..v]-stat_check_db["stat_max_check_"..v]..")"
  35. end
  36. end
  37. end
  38. if unmaxxed_stats==nil then
  39. unmaxxed_stats="None"
  40. end
  41. if maxxed_stats==nil then
  42. maxxed_stats="None"
  43. end
  44. send(stat_check_db["statchecko"].." "..colorone.."S"..colortwo.."tats "..colorone.."U"..colortwo.."nmaxxed: "..colorthree..unmaxxed_stats..colorone.." | S"..colortwo.."tats "..colorone.."M"..colortwo.."axxed: "..colorfour..maxxed_stats..colorterm)
  45. stat_check_db["statchecko"]="echo"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement