Advertisement
hadar

Untitled

Aug 26th, 2013
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.33 KB | None | 0 0
  1. function mylevelconvert()
  2. --
  3.         levelinfo.oldtimestamp   = levelinfo.newtimestamp
  4. --
  5. end
  6.  
  7. function mylevelepoch()
  8. --
  9.         levelinfo.newtimestamp = os.time()
  10. --
  11. end
  12.  
  13. function statadd(hp,mana,moves,prac,train)
  14. --
  15.         levelinfo.hp         = hp
  16.         levelinfo.mana       = mana
  17.         levelinfo.moves      = moves
  18.         levelinfo.prac       = prac
  19.         levelinfo.train      = train
  20.         levelinfo.bonusstat  = nil
  21.         levelinfo.bonustrain = 0
  22. --
  23. end
  24.  
  25. function trainadd(mybonustrain)
  26. --
  27.         levelinfo.bonustrain = levelinfo.bonustrain+mybonustrain
  28. --
  29. end
  30.  
  31. function bonusstatadd(stat)
  32. --
  33.     if levelinfo.bonusstat ~= nil then
  34.         levelinfo.bonusstat = levelinfo.bonusstat..","..stat
  35.     else
  36.         levelinfo.bonusstat = stat
  37.     end
  38. --
  39. end
  40.  
  41. function levelreport(level,channel)
  42. --
  43. -----------------------------------------------------------------------------
  44. -- please only edit the following variables to change the look
  45. -- of the level report
  46. -----------------------------------------------------------------------------
  47.     local color1    = "@G" -- this is the first letter of the word
  48.     local color2    = "@g" -- this is the rest of the word after color1
  49.     local brac      = "@R" -- this is the color of all the parenthesis
  50.     local colornum  = "@w" -- this is all the numbers except time
  51.     local colortim  = "@W" -- this is the color for time
  52.     local brac2     = "@w" -- color for the [] around the time
  53.     local colorplus = "@W" -- color of the + sign on bonus trains
  54.     local colorstat = "@w" -- what color you want stats to be
  55. -----------------------------------------------------------------------------
  56. -- This is the end of variable editing
  57. -----------------------------------------------------------------------------
  58.     local endcolor  = "@w"
  59.  
  60.     if channel == nil then
  61.     mylevelreport.channel = "gt"
  62.     else
  63.     mylevelreport.channel = channel
  64.     end
  65.  
  66.     if levelinfo.year > 0 then -- this if deals with spent over 1 year leveling colors the number red
  67.         mylevelreport.time = color1.."Y:@R"..levelinfo.year..","
  68.     else
  69.         mylevelreport.time = ""
  70.     end
  71.  
  72.     if levelinfo.month > 0 then -- this if deals with spent over 1 month leveling colors the number red
  73.         mylevelreport.time = mylevelreport.time .. color1 .."M:@R"..levelinfo.month.." "
  74.     else
  75.         mylevelreport.time = ""
  76.     end
  77.  
  78.     if levelinfo.day > 0 then -- this if deals with spent over 1 day leveling colors the number red
  79.         mylevelreport.time = mylevelreport.time .. color1 .. "D:@R" .. levelinfo.day .. " "
  80.     else
  81.         mylevelreport.time = ""
  82.     end
  83.  
  84.         mylevelreport.time = mylevelreport.time .. color1 .. "H:".. colortim .. levelinfo.hour .. " "
  85.         mylevelreport.time = mylevelreport.time .. color1 .. "M:".. colortim .. levelinfo.min .. " "
  86.         mylevelreport.time = mylevelreport.time .. color1 .. "S:".. colortim .. levelinfo.sec
  87.  
  88.         mylevelreport.gains = color1 .. "H" .. color2 .. "P" .. brac .. "(" .. colornum .. levelinfo.hp .. brac .. ")"
  89.         mylevelreport.gains = mylevelreport.gains .. color1 .."M" .. color2 .. "n" .. brac .. "(" ..colornum ..levelinfo.mana .. brac .. ")"
  90.         mylevelreport.gains = mylevelreport.gains .. color1 .."M" .. color2 .. "v" .. brac .. "(" ..colornum ..levelinfo.moves .. brac .. ")"
  91.  
  92.     if levelinfo.prac > 0 then
  93.         mylevelreport.gains = mylevelreport.gains .. color1 .. "P" .. color2 .. "r" .. brac .. "(" .. colornum .. levelinfo.prac .. brac .. ")"
  94.     end
  95.  
  96.     if levelinfo.train > 0 then
  97.         if levelinfo.bonustrain > 0 then
  98.             mylevelreport.gains = mylevelreport.gains .. color1 .. "T" .. color2 .. "r" .. brac .. "(" .. colornum .. levelinfo.train .. colorplus .. "+" .. colornum .. levelinfo.bonustrain .. brac ..")"
  99.         else
  100.             mylevelreport.gains = mylevelreport.gains .. color1 .. "T" .. color2 .. "r" .. brac .. "(" .. colornum .. levelinfo.train .. brac .. ")"
  101.         end
  102.  
  103.     end
  104.  
  105.     if levelinfo.bonusstat ~= nil then
  106.         mylevelreport.message = color1 .. "L" .. color2 .. "evel" .. brac .. "(" .. colornum .. level .. brac .. ") " .. color1 .. "T" .. color2 .. "ook:" .. brac2 .. "[" .. mylevelreport.time .. brac2 .. "] " .. mylevelreport.gains .. color1 .. " +" .. color2 .. "Stats:" .. colorstat .. levelinfo.bonusstat .. endcolor
  107.     else
  108.         mylevelreport.message = color1 .. "L" .. color2 .. "evel" .. brac .. "(" .. colornum .. level .. brac .. ") " .. color1 .. "T" .. color2 .. "ook:" .. brac2 .. "[" .. mylevelreport.time .. brac2 .. "] " .. mylevelreport.gains .. endcolor
  109.     end
  110. return mylevelreport.channel .. " " .. mylevelreport.message
  111. --
  112. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement