Mail.lua 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. Mail = {}
  2. local this = {}
  3. function Mail.playerDie(actor, dieInfo, killInfo)
  4. local mapCfgId = dieInfo.mapCfgId
  5. local mapName = ConfigDataManager.getTableValue("cfg_map_info","mapname","id",mapCfgId)
  6. sendconfigmailbyrid(actor, actor:toString(), 100000, nil, mapName .. "#" .. killInfo.name)
  7. end
  8. function Mail.levelUp(actor,level)
  9. if level >= 40 then
  10. local roleWorld = getplaydef(actor,"T$_levelUp_40")
  11. if roleWorld then
  12. return
  13. end
  14. sendconfigmailbyrid(actor,actor:toString(),999999,{ [10020001] = 50000,[30030306] = 1,[40010701] = 1,[50010003] = 3,[50010005] = 3,[10040001] = 100})
  15. setplaydef(actor,"T$_levelUp_40",1)
  16. end
  17. if level >= 5 then
  18. local roleWorld = getplaydef(actor,"T$_levelUp_5")
  19. if roleWorld then
  20. return
  21. end
  22. local career = tonumber(getbaseinfo(actor, "getbasecareer"))
  23. if career == 1 then
  24. sendconfigmailbyrid(actor,actor:toString(),888888,{ [88888801] = 2,[88888802] = 1,[88888803] = 1,[88888804] = 1,[88888805] = 1,
  25. [88888806] = 1,[60030062] = 1,[60030060] = 1,[60030063] = 1
  26. })
  27. elseif career == 2 then
  28. sendconfigmailbyrid(actor,actor:toString(),888888,{ [66666601] = 1,[66666602] = 1,[66666603] = 1,[66666604] = 1,[66666605] = 1,
  29. [66666606] = 1,[66666607] = 1,[60030004] = 1,[60030011] = 1,[60030002] = 1
  30. })
  31. elseif career == 3 then
  32. sendconfigmailbyrid(actor,actor:toString(),888888,{ [77777701] = 1,[77777702] = 1,[77777703] = 1,[77777704] = 1,[77777705] = 1,
  33. [77777706] = 1,[77777707] = 1,[60030030] = 1,[60030032] = 1,[60030033] = 1
  34. })
  35. end
  36. setplaydef(actor,"T$_levelUp_5",1)
  37. end
  38. end
  39. function Mail.taskComplete(actor,taskId)
  40. --local career = tonumber(getbaseinfo(actor, "getbasecareer"))
  41. --if career == 1 then
  42. -- if taskId ~= 10029 then
  43. -- return
  44. -- end
  45. --
  46. --elseif career == 2 then
  47. -- if taskId ~= 20029 then
  48. -- return
  49. -- end
  50. --elseif career == 3 then
  51. -- if taskId ~= 30029 then
  52. -- return
  53. -- end
  54. --elseif career > 3 then
  55. -- return
  56. --end
  57. --sendconfigmailbyrid(actor,actor:toString(),999999,{ [10020001] = 50000,[30030306] = 1,[40010701] = 1,[50010003] = 3,[50010005] = 3,[10040001] = 100})
  58. end