Advertisement
Guest User

Untitled

a guest
Apr 1st, 2020
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.08 KB | None | 0 0
  1. local function Novamente(cid)
  2. local player = Player(cid)
  3. if player then
  4. if math.random(1,2) == 1 then
  5. checkBot(player:getId(), false)
  6. end
  7. addEvent(Novamente, 600000, cid) --- 600000 10min
  8. end
  9. end
  10.  
  11. local function Daponto(position, cid, stamina)
  12. local player = Player(cid)
  13. if player then
  14. if getPlayerStorageValue(cid,3567)+2 > os.time() or position ~= getCreaturePosition(cid) or getPlayerGroupId(cid) >= 2 then
  15. return true
  16. end
  17. setPlayerStorageValue(cid,3567,os.time())
  18.  
  19. local voc = getPlayerVocation(cid)
  20. if isSorcerer(voc, 0) or isDruid(voc, 0) or isKnocker(voc, 0) then
  21. if isSorcerer(voc, 1) or isDruid(voc, 1) or isKnocker(voc, 1) then
  22. --Promotion 1:
  23. vida = 10
  24. mana = 35
  25. if isSorcerer(voc, 2) or isDruid(voc, 2) or isKnocker(voc, 2) then
  26. --Promotion 2:
  27. vida = 15
  28. mana = 40
  29. end
  30. else
  31. --Sem promotion:
  32. vida = 10
  33. mana = 30
  34. end
  35. elseif isPaladin(voc, 0) or isDrunou(voc, 0) then
  36. if isPaladin(voc, 1) or isDrunou(voc, 1) then
  37. --Promotion 1:
  38. vida = 20
  39. mana = 18
  40. if isPaladin(voc, 2) or isDrunou(voc, 2) then
  41. --Promotion 2:
  42. vida = 21
  43. mana = 25
  44. end
  45. else
  46. --Sem promotion:
  47. vida = 15
  48. mana = 15
  49. end
  50. elseif isKnight(voc, 0) then
  51. if isKnight(voc, 1) then
  52. --Promotion 1:
  53. vida = 100
  54. mana = 18
  55. if isKnight(voc, 2) then
  56. --Promotion 2:
  57. vida = 110
  58. mana = 21
  59. end
  60. else
  61. --Sem promotion:
  62. vida = 80
  63. mana = 15
  64. end
  65. elseif isInfernalist(voc, 0) then
  66. if isInfernalist(voc, 1) then
  67. --Promotion 1:
  68. vida = 10
  69. mana = 70
  70. if isInfernalist(voc, 2) then
  71. --Promotion 2:
  72. vida = 15
  73. mana = 75
  74. end
  75. else
  76. --Sem promotion:
  77. vida = 10
  78. mana = 60
  79. end
  80. end
  81.  
  82. doPlayerAddMana(cid, mana)
  83. doCreatureAddHealth(cid, vida)
  84. if stamina == 30 then
  85. local staminaatual = getPlayerStamina(cid)
  86. if staminaatual < 2400 then
  87. stamina = 0
  88. doPlayerSetStamina(cid, staminaatual+1)
  89. end
  90. end
  91. stamina = stamina+1
  92. doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MAGIC_BLUE)
  93.  
  94. addpoinTs = addEvent(Daponto, 2000, position, cid, stamina)
  95. end
  96. return true
  97. end
  98.  
  99. function onStepIn(cid, item, position, fromPosition)
  100. addpoinTs = addEvent(Daponto, 2000, position, cid, 0)
  101. if SERVIDOR == 5 then
  102. checkBot(player:getId(), false)
  103. addEvent(Novamente, 600000, cid) --- 600000 10min
  104. end
  105. --Funções dos pisos:
  106. if getPlayerGroupId(cid) < 2 then
  107. if item.itemid == 426 then
  108. doTransformItem(item.uid, 425)
  109. elseif item.itemid == 416 then
  110. doTransformItem(item.uid, 417)
  111. elseif item.itemid == 446 then
  112. doTransformItem(item.uid, 447)
  113. elseif item.itemid == 3216 then
  114. doTransformItem(item.uid, 3217)
  115. end
  116. end
  117. return true
  118. end
  119.  
  120. function onStepOut(cid, item, position, fromPosition)
  121. if getPlayerGroupId(cid) < 2 then
  122. if item.itemid == 425 then
  123. doTransformItem(item.uid, 426)
  124. elseif item.itemid == 417 then
  125. doTransformItem(item.uid, 416)
  126. end
  127. end
  128. --stopEvent(addpoinTs)
  129. return true
  130. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement