Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.60 KB | None | 0 0
  1. init start
  2. if not loottotal then loottotal = 0 end
  3. if not droptotal then droptotal = 0 end
  4. local lootcheck = {
  5. {name = 'zaoan armor', price = 14000, counter = 0, drops = false},
  6. {name = 'zaoan legs', price = 14000, counter = 0, drops = false},
  7. {name = 'zaoan shoes', price = 5000, counter = 0, drops = false},
  8. {name = 'tower shield', price = 8000, counter = 0, drops = false},
  9. {name = 'yellow gem', price = 1000, counter = 0, drops = false},
  10. {name = 'small emerald', price = 250, counter = 0, drops = false},
  11. {name = 'small amethyst', price = 250, counter = 0, drops = false},
  12. {name = 'high guard flag', price = 500, counter = 0, drops = false},
  13. {name = 'legionnaire flags', price = 500, counter = 0, drops = false},
  14. {name = 'terra rod', price = 2000, counter = 0, drops = false},
  15. {name = 'wand of inferno', price = 3000, counter = 0, drops = false},
  16. {name = 'zaoan robe', price = 12000, counter = 0, drops = false},
  17. {name = 'drakinata', price = 10000, counter = 0, drops = false},
  18. {name = 'platinum coin', price = 100, counter = 0, drops = false},
  19. {name = 'spiked iron ball', price = 100, counter = 0, drops = true},
  20. {name = 'high guard shoulderplates', price = 100, counter = 0, drops = true},
  21. {name = 'broken halberd', price = 100, counter = 0, drops = true},
  22. {name = 'gold coin', price = 1, counter = 0, drops = false},
  23. {name = 'dragon shield', price = 4000, counter = 0, drops = false},
  24. {name = 'dragonbone staff', price = 3000, counter = 0, drops = false},
  25. {name = 'serpent sword', price = 900, counter = 0, drops = false},
  26. {name = 'dragon scale mail', price = 40000, counter = 0, drops = false},
  27. {name = 'fire sword', price = 4000, counter = 0, drops = false},
  28. {name = 'royal helmet', price = 30000, counter = 0, drops = false},
  29. {name = 'dragons tail', price = 100, counter = 0, drops = false},
  30. {name = 'green dragon leather', price = 100, counter = 0, drops = false},
  31. {name = 'red dragon leather', price = 100, counter = 0, drops = false},
  32. {name = 'red dragon scale', price = 100, counter = 0, drops = false},
  33. {name = 'green dragon scale', price = 100, counter = 0, drops = false},
  34. {name = 'dragon hammer', price = 2000, counter = 0, drops = false},
  35. {name = 'tower shield', price = 8000, counter = 0, drops = false},
  36. {name = 'dragon slayer', price = 15000, counter = 0, drops = false},
  37. {name = 'dragon lord trophy', price = 10000, counter = 0, drops = false},
  38. {name = 'small sapphire', price = 200, counter = 0, drops = false},
  39.  
  40. }
  41. init end
  42.  
  43. auto(200)
  44. foreach newmessage m do
  45. if m.type == 19 and m.content:sub(1,8) == 'Loot of ' then
  46. local content = m.content:sub(m.content:find(':')+2)
  47. content = content:token(nil,', ')
  48. for i,j in ipairs(content) do
  49. local a = 1
  50. while a <= #lootcheck and not j:find(lootcheck[a].name) do a = a+1 end
  51. if a <= #lootcheck then
  52. local amount = tonumber(j:token(1))
  53. if not amount then amount = 1 end
  54. lootcheck[a].counter = lootcheck[a].counter + amount
  55. loottotal = loottotal + amount*lootcheck[a].price
  56. if lootcheck[a].drops then droptotal = droptotal + amount*lootcheck[a].price end
  57. end
  58. end
  59. end
  60. end
  61. if droptotal > 0 then
  62. listas('Loot Counter: '.. num(loottotal).. ' GPs (' ..num(math.floor((loottotal*60*60*1000)/$exptime+1))..' GPs/h) ... GPs/SCP: ' ..num(droptotal))
  63. else
  64. listas('Loot Counter: '.. num(loottotal).. ' GPs (' ..num(math.floor((loottotal*60*60*1000)/$exptime+1))..' GPs/h)')
  65. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement