Guest User

Untitled

a guest
Jun 18th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.70 KB | None | 0 0
  1. local MIN = 2000
  2. local MAX = 3000
  3. local MIN1 = 2500
  4. local MAX1 = 3100
  5. local MIN2 = 2500
  6. local MAX2 = 3200
  7. local MIN3 = 2500
  8. local MAX3 = 3300
  9. local MIN4 = 2500
  10. local MAX4 = 3400
  11. local MIN5 = 2500
  12. local MAX5 = 3500
  13. local MIN6 = 2500
  14. local MAX6 = 3600
  15. local MIN7 = 2500
  16. local MAX7 = 3700
  17. local MIN8 = 2500
  18. local MAX8 = 3800
  19. local MIN9 = 2500
  20. local MAX9 = 3900
  21. local MIN10 = 2000
  22. local MAX10 = 3500
  23. local MIN11 = 2500
  24. local MAX11 = 4500
  25. local MIN12 = 2400
  26. local MAX12 = 4800
  27. local EMPTY_POTION = 7634
  28.  
  29. local exhaust = createConditionObject(CONDITION_EXHAUST)
  30. setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))
  31.  
  32. function onUse(cid, item, fromPosition, itemEx, toPosition)
  33. if isPlayer(itemEx.uid) == FALSE then
  34. return FALSE
  35. end
  36.  
  37. if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then
  38. doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
  39. return TRUE
  40. end
  41.  
  42. if((not(isSorcerer(itemEx.uid) or isDruid(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 80) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then
  43. doCreatureSay(itemEx.uid, "Only sorcerers and druids of level 80 or above may drink this fluid.", TALKTYPE_ORANGE_1)
  44. return TRUE
  45. end
  46.  
  47. if (getPlayerLevel(itemEx.uid) <= 100) then --- level maximo
  48. doPlayerAddMana(itemEx.uid, math.random(MIN, MAX))
  49. doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
  50. doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
  51. doRemoveItem(item.uid, 1)
  52. return FALSE
  53. end
  54. if (getPlayerLevel(itemEx.uid) <= 200) then --- level maximo
  55. doPlayerAddMana(itemEx.uid, math.random(MIN, MAX))
  56. doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
  57. doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
  58. doRemoveItem(item.uid, 1)
  59. return FALSE
  60. end
  61.  
  62. if (getPlayerLevel(itemEx.uid) <= 300) then --- level maximo
  63. doPlayerAddMana(itemEx.uid, math.random(MIN, MAX))
  64. doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
  65. doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
  66. doRemoveItem(item.uid, 1)
  67. return FALSE
  68. end
  69.  
  70. if (getPlayerLevel(itemEx.uid) <= 400) then --- level maximo
  71. doPlayerAddMana(itemEx.uid, math.random(MIN, MAX))
  72. doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
  73. doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
  74. doRemoveItem(item.uid, 1)
  75. return FALSE
  76. end
  77.  
  78. if (getPlayerLevel(itemEx.uid) <= 500) then --- level maximo
  79. doPlayerAddMana(itemEx.uid, math.random(MIN, MAX))
  80. doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
  81. doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
  82. doRemoveItem(item.uid, 1)
  83. return FALSE
  84. end
  85.  
  86.  
  87. if (getPlayerLevel(itemEx.uid) <= 600) then --- level maximo
  88. doPlayerAddMana(itemEx.uid, math.random(MIN, MAX1))
  89. doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
  90. doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
  91. doRemoveItem(item.uid, 1)
  92. return FALSE
  93. end
  94.  
  95. if (getPlayerLevel(itemEx.uid) <= 700) then --- level maximo
  96. doPlayerAddMana(itemEx.uid, math.random(MIN1, MAX1))
  97. doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
  98. doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
  99. doRemoveItem(item.uid, 1)
  100. return FALSE
  101. end
  102.  
  103. if (getPlayerLevel(itemEx.uid) <= 800) then --- level maximo
  104. doPlayerAddMana(itemEx.uid, math.random(MIN2, MAX2))
  105. doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
  106. doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
  107. doRemoveItem(item.uid, 1)
  108. return FALSE
  109. end
  110.  
  111. if (getPlayerLevel(itemEx.uid) <= 900) then --- level maximo
  112. doPlayerAddMana(itemEx.uid, math.random(MIN3, MAX3))
  113. doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
  114. doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
  115. doRemoveItem(item.uid, 1)
  116. return FALSE
  117. end
  118.  
  119. if (getPlayerLevel(itemEx.uid) <= 1000) then --- level maximo
  120. doPlayerAddMana(itemEx.uid, math.random(MIN4, MAX4))
  121. doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
  122. doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
  123. doRemoveItem(item.uid, 1)
  124. return FALSE
  125. end
  126. if (getPlayerLevel(itemEx.uid) <= 1100) then --- level maximo
  127. doPlayerAddMana(itemEx.uid, math.random(MIN5, MAX5))
  128. doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
  129. doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
  130. doRemoveItem(item.uid, 1)
  131. return FALSE
  132. end
  133. if (getPlayerLevel(itemEx.uid) <= 1200) then --- level maximo
  134. doPlayerAddMana(itemEx.uid, math.random(MIN6, MAX6))
  135. doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
  136. doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
  137. doRemoveItem(item.uid, 1)
  138. return FALSE
  139. end
  140. if (getPlayerLevel(itemEx.uid) <= 1300) then --- level maximo
  141. doPlayerAddMana(itemEx.uid, math.random(MIN7, MAX7))
  142. doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
  143. doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
  144. doRemoveItem(item.uid, 1)
  145. return FALSE
  146. end
  147. if (getPlayerLevel(itemEx.uid) <= 1400) then --- level maximo
  148. doPlayerAddMana(itemEx.uid, math.random(MIN8, MAX8))
  149. doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
  150. doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
  151. doRemoveItem(item.uid, 1)
  152. return FALSE
  153. end
  154. if (getPlayerLevel(itemEx.uid) <= 1500) then --- level maximo
  155. doPlayerAddMana(itemEx.uid, math.random(MIN9, MAX9))
  156. doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
  157. doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
  158. doRemoveItem(item.uid, 1)
  159. return FALSE
  160. end
  161. if (getPlayerLevel(itemEx.uid) <= 1600) then --- level maximo
  162. doPlayerAddMana(itemEx.uid, math.random(MIN10, MAX10))
  163. doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
  164. doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
  165. doRemoveItem(item.uid, 1)
  166. return FALSE
  167. end
  168. if (getPlayerLevel(itemEx.uid) <= 1700) then --- level maximo
  169. doPlayerAddMana(itemEx.uid, math.random(MIN11, MAX11))
  170. doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
  171. doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
  172. doRemoveItem(item.uid, 1)
  173. return FALSE
  174. end
  175. if (getPlayerLevel(itemEx.uid) <= 1800) then --- level maximo
  176. doPlayerAddMana(itemEx.uid, math.random(MIN12, MAX12))
  177. doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
  178. doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
  179. doRemoveItem(item.uid, 1)
  180. return FALSE
  181. end
  182.  
  183. doAddCondition(cid, exhaust)
  184. doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
  185. doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
  186. doRemoveItem(item.uid, 1)
  187. return TRUE
  188. end
Add Comment
Please, Sign In to add comment