Guest User

exp

a guest
Aug 28th, 2014
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.09 KB | None | 0 0
  1. local expcond = createConditionObject(CONDITION_INFIGHT)
  2. setConditionParam(expcond, CONDITION_PARAM_TICKS, 4500)
  3.  
  4. function onStatsChange(cid, attacker, enps, combatee, value)
  5. if isSummon(cid) and enps == STATSCHANGE_HEALTHLOSS then
  6. -------------------------------- Passivas -----------------------------------
  7. --------- Eletric charges ---------
  8. local charge = {"Pikachu", "Raichu", "Shiny Raichu", "Electabuzz",}
  9. if isInArray(charge, getCreatureName(cid)) and math.random(1, 100) <= 15 then
  10. if getPlayerStorageValue(cid, 62530) >= 1 then return false end
  11. setPlayerStorageValue(cid, 62530, 5)
  12. doSendMagicEffectInSenconds(cid, 207, ELECTRICDAMAGE)
  13. end
  14. --------- Eletric charges ---------
  15. -------------------------------------------Counter Helix------------------------------------
  16. local helix = {"Alakazam", "Gengar", "Tentacruel", "Shiny Tentacruel","Haunter", "Scyther", "Scizor", "Shiny Scyther", "Hitmontop", "Shiny Hitmontop", "Pineco", "Forretress"}
  17. if isInArray(helix, getCreatureName(cid)) and math.random(1, 100) <= 15 then
  18. doCounterHelix(cid)
  19. end
  20. -------------------------------------------Counter Helix------------------------------------
  21. ---------------------------------------Stunning Confusion-----------------------------------------
  22. local ducks = {"Golduck", "Psyduck", "Wobbuffet"}
  23.  
  24. if isInArray(ducks, getCreatureName(cid)) and math.random(1, 100) <= 20 then
  25. doStingConfusion(cid)
  26. end
  27. ---------------------------------------Stunning Confusion-----------------------------------------
  28. local hits = {"Hitmonlee", "Shiny Hitmonlee", "Hitmonchan", "Shiny Hitmonchan"}
  29.  
  30. if isInArray(hits, getCreatureName(cid)) and math.random(1, 100) <= 20 then
  31. doHitmonAttacks(cid)
  32. end
  33. -------------------------------- Passivas -----------------------------------
  34. end
  35. ------------------- Evento sudenAttacke --------------------------
  36. if isZumbie(cid) and enps == STATSCHANGE_HEALTHLOSS or isHuman(cid) and enps == STATSCHANGE_HEALTHLOSS then
  37. if value >= getCreatureHealth(cid) and isZumbie(cid) then
  38. doTeleportThing(cid, {x = 1030, y =1040, z = 7}, false)
  39. doSendMagicEffect(getThingPos(cid), 21)
  40. doPlayerSendTextMessage(cid, 20, "Sorry, you loosed the event.")
  41. doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) setPlayerStorageValue(cid, 300, 0)
  42. if getGlobalStorageValue(3602) == 1 then
  43. setGlobalStorageValue(3602, getGlobalStorageValue(3602) +9) -- Aumenta o dano dos vampiros em 10% a mais.
  44. elseif getGlobalStorageValue(3602) >= 10 and getGlobalStorageValue(3602) <= 50 then
  45. setGlobalStorageValue(3602, getGlobalStorageValue(3602) +10) -- Aumenta o dano dos vampiros em 10% a mais.
  46. end
  47. doSendStatusDanger()
  48. doRemoveCondition(cid, CONDITION_OUTFIT)
  49. elseif value >= getCreatureHealth(cid) and isHuman(cid) then
  50. doPlayerSetVocation(cid, 1)
  51. doTeleportThing(cid, {x = 1030, y =1040, z = 7}, false)
  52. doSendMagicEffect(getThingPos(cid), 21)
  53. doPlayerSendTextMessage(cid, 20, "Sorry, you loosed the event.")
  54. doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) setPlayerStorageValue(cid, 301, 0)
  55. if getGlobalStorageValue(3602) > 1 then
  56. setGlobalStorageValue(3602, 1)
  57. end
  58. doSendStatusDanger()
  59. doRemoveCondition(cid, CONDITION_OUTFIT)
  60. end
  61. end
  62. if isZumbie(cid) and isZumbie(attacker) or isHuman(cid) and isHuman(attacker) then
  63. return false -- Pra não atacar um player da mesma raça.
  64. end
  65. if isZumbie(cid) and isHuman(attacker) then -- Pra tirar life
  66. doCreatureAddHealth(cid, -(math.floor(value*EventPlayerReduction*getGlobalStorageValue(3602))))
  67. doSendAnimatedText(getThingPos(cid), (math.floor(value*EventPlayerReduction*getGlobalStorageValue(3602))), 180)
  68. doSendMagicEffect(getThingPos(cid), 9)
  69. elseif isZumbie(attacker) and isHuman(cid) then
  70. doCreatureAddHealth(cid, -(math.floor(value*EventPlayerReduction)))
  71. doSendAnimatedText(getThingPos(cid), math.floor(value*EventPlayerReduction), 180)
  72. doSendMagicEffect(getThingPos(cid), 209)
  73. end
  74. ------------------- Evento sudenAttacke --------------------------
  75. ------------------- Para pokemon selvagem não atackar o outro --------------------------
  76. if ehMonstro(cid) and ehMonstro(attacker) then
  77. return false
  78. end
  79. ------------------- Para pokemon selvagem não atackar o outro --------------------------
  80.  
  81. ------------------- Sleep Powder --------------------------
  82. if isMonster(attacker) and isSleeping(attacker) then
  83. doSendMagicEffect(getThingPos(attacker), 32)
  84. return false
  85. elseif not isSleeping(cid) and getCreatureSpeed(cid) <= 0 then
  86. doChangeSpeed(cid, getCreatureBaseSpeed(cid))
  87. setPlayerStorageValue(cid, 898, 0)
  88. end
  89. ------------------- Sleep Powder --------------------------
  90. if getPlayerStorageValue(cid, 33) >= 1 then
  91. if isCreature(attacker) then
  92. return false
  93. end
  94. return true
  95. end
  96. if getPlayerStorageValue(cid, 34) >= 1 then
  97. if combatee ~= COMBAT_PHYSICALDAMAGE then
  98. if isCreature(attacker) then
  99. doSendMagicEffect(getThingPos(cid), 135)
  100. doSendMagicEffect(getThingPos(attacker), 3)
  101. doSendAnimatedText(getThingPos(cid), "REFLECT", 215)
  102. doCreatureAddHealth(attacker, -value)
  103. setPlayerStorageValue(cid, 34, 0)
  104. doSendAnimatedText(getThingPos(attacker), -value, 191)
  105.  
  106. return false
  107. end
  108. end
  109. end
  110. if getPlayerStorageValue(cid, 35) >= 1 then
  111. if isCreature(attacker) or isSummon(attacker) then
  112. doSendAnimatedText(getThingPos(cid), "MISS", 215)
  113. setPlayerStorageValue(cid, 35, 0)
  114. return false
  115. end
  116. end
  117. if not isCreature(attacker) then
  118. return true
  119. end
  120. if isPlayer(attacker) and ehMonstro(cid) then
  121. return true
  122. end
  123. if enps == STATSCHANGE_HEALTHGAIN then
  124. return true
  125. end
  126. if enps == STATSCHANGE_HEALTHLOSS then
  127. if getCreatureHealth(cid) <= value then
  128. if isPlayer(cid) then
  129. if #getCreatureSummons(cid) == 0 then
  130. return true
  131. end
  132. return false
  133. end
  134. if isPlayer(getCreatureMaster(attacker)) then
  135. doTargetCombatHealth(getCreatureMaster(attacker), cid, combatee, -(getCreatureHealth(cid)), -(getCreatureHealth(cid)), 3)
  136. return false
  137. end
  138. return true
  139. end
  140. if isPlayer(getCreatureMaster(cid)) then
  141. doAddCondition(getCreatureMaster(cid), expcond)
  142. end
  143. if not isPlayer(cid) then
  144. if combatee == ELECTRICDAMAGE then
  145. if isInArray(electric2, getCreatureName(cid)) then
  146. if getPlayerStorageValue(cid, 4) >= 1 then
  147. x = 1
  148. else
  149. x = 2
  150. end
  151. elseif isInArray(electric1, getCreatureName(cid)) then
  152. if getPlayerStorageValue(cid, 4) >= 1 then
  153. x = 0.20
  154. else
  155. x = 0.50
  156. end
  157. elseif isInArray(electric0, getCreatureName(cid)) then
  158. x = 0
  159. else
  160. x = 1
  161. end
  162. elseif combatee == WATERDAMAGE then
  163. if isInArray(water2, getCreatureName(cid)) then
  164. if getPlayerStorageValue(cid, 4) >= 1 then
  165. x = 1
  166. else
  167. x = 2
  168. end
  169. elseif isInArray(water1, getCreatureName(cid)) then
  170. if getPlayerStorageValue(cid, 4) >= 1 then
  171. x = 0.20
  172. else
  173. x = 0.50
  174. end
  175. elseif isInArray(water0, getCreatureName(cid)) then
  176. x = 0
  177. else
  178. x = 1
  179. end
  180. elseif combatee == GRASSDAMAGE then
  181. if isInArray(grass2, getCreatureName(cid)) then
  182. if getPlayerStorageValue(cid, 4) >= 1 then
  183. x = 1
  184. else
  185. x = 0.50
  186. end
  187. elseif isInArray(grass1, getCreatureName(cid)) then
  188. if getPlayerStorageValue(cid, 4) >= 1 then
  189. x = 0.20
  190. else
  191. x = 0.50
  192. end
  193. elseif isInArray(grass0, getCreatureName(cid)) then
  194. x = 0
  195. else
  196. x = 1
  197. end
  198. elseif combatee == FLYDAMAGE then
  199. if isInArray(flying2, getCreatureName(cid)) then
  200. if getPlayerStorageValue(cid, 4) >= 1 then
  201. x = 1
  202. else
  203. x = 2
  204. end
  205. elseif isInArray(flying1, getCreatureName(cid)) then
  206. if getPlayerStorageValue(cid, 4) >= 1 then
  207. x = 0.20
  208. else
  209. x = 0.50
  210. end
  211. elseif isInArray(flying0, getCreatureName(cid)) then
  212. x = 0
  213. else
  214. x = 1
  215. end
  216. elseif combatee == FIREDAMAGE then
  217. if isInArray(fire2, getCreatureName(cid)) then
  218. if getPlayerStorageValue(cid, 4) >= 1 then
  219. x = 1
  220. else
  221. x = 2
  222. end
  223. elseif isInArray(fire1, getCreatureName(cid)) then
  224. if getPlayerStorageValue(cid, 4) >= 1 then
  225. x = 0.20
  226. else
  227. x = 0.50
  228. end
  229. elseif isInArray(fire0, getCreatureName(cid)) then
  230. x = 0
  231. else
  232. x = 1
  233. end
  234. elseif combatee == ROCKDAMAGE then
  235. if isInArray(rock2, getCreatureName(cid)) then
  236. if getPlayerStorageValue(cid, 4) >= 1 then
  237. x = 1
  238. else
  239. x = 2
  240. end
  241. elseif isInArray(rock1, getCreatureName(cid)) then
  242. if getPlayerStorageValue(cid, 4) >= 1 then
  243. x = 0.20
  244. else
  245. x = 0.50
  246. end
  247. elseif isInArray(rock0, getCreatureName(cid)) then
  248. x = 0
  249. else
  250. x = 1
  251. end
  252. elseif combatee == GROUNDDAMAGE then
  253. if isInArray(ground2, getCreatureName(cid)) then
  254. if getPlayerStorageValue(cid, 4) >= 1 then
  255. x = 1
  256. else
  257. x = 2
  258. end
  259. elseif isInArray(ground1, getCreatureName(cid)) then
  260. if getPlayerStorageValue(cid, 4) >= 1 then
  261. x = 0.20
  262. else
  263. x = 0.50
  264. end
  265. elseif isInArray(ground0, getCreatureName(cid)) then
  266. x = 0
  267. else
  268. x = 1
  269. end
  270. elseif combatee == GHOSTDAMAGE then
  271. if isInArray(ghost2, getCreatureName(cid)) then
  272. if getPlayerStorageValue(cid, 4) >= 1 then
  273. x = 1
  274. else
  275. x = 2
  276. end
  277. elseif isInArray(ghost1, getCreatureName(cid)) then
  278. if getPlayerStorageValue(cid, 4) >= 1 then
  279. x = 0.20
  280. else
  281. x = 0.50
  282. end
  283. elseif isInArray(ghost0, getCreatureName(cid)) then
  284. x = 0
  285. else
  286. x = 1
  287. end
  288. elseif combatee == BUGDAMAGE then
  289. if isInArray(bug2, getCreatureName(cid)) then
  290. if getPlayerStorageValue(cid, 4) >= 1 then
  291. x = 1
  292. else
  293. x = 2
  294. end
  295. elseif isInArray(bug1, getCreatureName(cid)) then
  296. if getPlayerStorageValue(cid, 4) >= 1 then
  297. x = 0.20
  298. else
  299. x = 0.50
  300. end
  301. elseif isInArray(bug0, getCreatureName(cid)) then
  302. x = 0
  303. else
  304. x = 1
  305. end
  306. elseif combatee == NORMALDAMAGE then
  307. if isInArray(normal2, getCreatureName(cid)) then
  308. if getPlayerStorageValue(cid, 4) >= 1 then
  309. x = 1
  310. else
  311. x = 2
  312. end
  313. elseif isInArray(normal1, getCreatureName(cid)) then
  314. if getPlayerStorageValue(cid, 4) >= 1 then
  315. x = 0.20
  316. else
  317. x = 0.50
  318. end
  319. elseif isInArray(normal0, getCreatureName(cid)) then
  320. x = 0
  321. else
  322. x = 1
  323. end
  324. elseif combatee == FIGHTDAMAGE then
  325. if isInArray(fighting2, getCreatureName(cid)) then
  326. if getPlayerStorageValue(cid, 4) >= 1 then
  327. x = 1
  328. else
  329. x = 2
  330. end
  331. elseif isInArray(fighting1, getCreatureName(cid)) then
  332. if getPlayerStorageValue(cid, 4) >= 1 then
  333. x = 0.20
  334. else
  335. x = 0.50
  336. end
  337. elseif isInArray(fighting0, getCreatureName(cid)) then
  338. x = 0
  339. else
  340. x = 1
  341. end
  342. elseif combatee == POISONDAMAGE then
  343. if isInArray(poison2, getCreatureName(cid)) then
  344. if getPlayerStorageValue(cid, 4) >= 1 then
  345. x =1
  346. else
  347. x = 2
  348. end
  349. elseif isInArray(poison1, getCreatureName(cid)) then
  350. if getPlayerStorageValue(cid, 4) >= 1 then
  351. x = 0.20
  352. else
  353. x = 0.50
  354. end
  355. elseif isInArray(poison0, getCreatureName(cid)) then
  356. x = 0
  357. else
  358. x = 1
  359. end
  360. elseif combatee == PSYCHICDAMAGE then
  361. if isInArray(psychic2, getCreatureName(cid)) then
  362. if getPlayerStorageValue(cid, 4) >= 1 then
  363. x = 1
  364. else
  365. x = 2
  366. end
  367. elseif isInArray(psychic1, getCreatureName(cid)) then
  368. if getPlayerStorageValue(cid, 4) >= 1 then
  369. x = 0.20
  370. else
  371. x = 0.50
  372. end
  373. elseif isInArray(psychic0, getCreatureName(cid)) then
  374. x = 0
  375. else
  376. x = 1
  377. end
  378. elseif combatee == ICEDAMAGE then
  379. if isInArray(ice2, getCreatureName(cid)) then
  380. if getPlayerStorageValue(cid, 4) >= 1 then
  381. x = 1
  382. else
  383. x = 2
  384. end
  385. elseif isInArray(ice1, getCreatureName(cid)) then
  386. if getPlayerStorageValue(cid, 4) >= 1 then
  387. x = 0.20
  388. else
  389. x = 0.50
  390. end
  391. elseif isInArray(ice0, getCreatureName(cid)) then
  392. x = 0
  393. else
  394. x = 1
  395. end
  396. elseif combatee == DRAGONDAMAGE then
  397. if isInArray(dragon2, getCreatureName(cid)) then
  398. if getPlayerStorageValue(cid, 4) >= 1 then
  399. x = 1
  400. else
  401. x = 2
  402. end
  403. elseif isInArray(dragon1, getCreatureName(cid)) then
  404. if getPlayerStorageValue(cid, 4) >= 1 then
  405. x = 0.20
  406. else
  407. x = 0.50
  408. end
  409. elseif isInArray(dragon0, getCreatureName(cid)) then
  410. x = 0
  411. else
  412. x = 1
  413. end
  414. else
  415. x = 1
  416. end
  417. else
  418. x = 1
  419. end
  420. local xx = x
  421. if isSummon(cid) and getPokemonFeed(getCreatureMaster(cid)) <= configsFoodSystem.muitaFome.id then
  422. xx = math.floor(xx * 2.5) - getPokemonDefBoost(getPlayerSlotItem(getCreatureMaster(cid),8).uid)
  423. elseif isSummon(cid) and getPokemonFeed(getCreatureMaster(cid)) > configsFoodSystem.muitaFome.id and getPokemonFeed(getCreatureMaster(cid)) <= configsFoodSystem.comfome.id then
  424. xx = math.floor(xx * 2.2) - getPokemonDefBoost(getPlayerSlotItem(getCreatureMaster(cid),8).uid)
  425. elseif isSummon(cid) and getPokemonFeed(getCreatureMaster(cid)) > configsFoodSystem.comfome.id and getPokemonFeed(getCreatureMaster(cid)) <= configsFoodSystem.normal.id then
  426. xx = math.floor(xx * 2.0) - getPokemonDefBoost(getPlayerSlotItem(getCreatureMaster(cid),8).uid)
  427. elseif isSummon(cid) and getPokemonFeed(getCreatureMaster(cid)) > configsFoodSystem.normal.id and getPokemonFeed(getCreatureMaster(cid)) <= configsFoodSystem.semfome.id then
  428. xx = math.floor(xx * 1.2) - getPokemonDefBoost(getPlayerSlotItem(getCreatureMaster(cid),8).uid)
  429. elseif isSummon(cid) and getPokemonFeed(getCreatureMaster(cid)) > configsFoodSystem.semfome.id and getPokemonFeed(getCreatureMaster(cid)) <= configsFoodSystem.feliz.id then
  430. xx = math.floor(xx * 1) - getPokemonDefBoost(getPlayerSlotItem(getCreatureMaster(cid),8).uid)
  431. elseif isSummon(cid) and getPokemonFeed(getCreatureMaster(cid)) > configsFoodSystem.feliz.id and getPokemonFeed(getCreatureMaster(cid)) <= configsFoodSystem.superfeliz.id then
  432. xx = xx
  433. else
  434. xx = xx
  435. end
  436. if isSummon(cid) and getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid),8).uid, "boost") >= 1 then
  437. xx = math.floor(getPokemonBoostHit(getPlayerSlotItem(getCreatureMaster(cid),8).uid)/10) - xx
  438. end
  439. if combatee == PSYCHICDAMAGE then
  440. cor = COLOR_PSYCHIC
  441. elseif combatee == GRASSDAMAGE then
  442. cor = COLOR_GRASS
  443. elseif combatee == FIREDAMAGE then
  444. cor = COLOR_FIRE2
  445. elseif combatee == WATERDAMAGE then
  446. cor = COLOR_WATER
  447. elseif combatee == ICEDAMAGE then
  448. cor = COLOR_ICE
  449. elseif combatee == NORMALDAMAGE then
  450. cor = COLOR_NORMAL
  451. elseif combatee == FLYDAMAGE then
  452. cor = COLOR_FLYING
  453. elseif combatee == GHOSTDAMAGE then
  454. cor = COLOR_GHOST
  455. elseif combatee == GROUNDDAMAGE then
  456. cor = COLOR_GROUND
  457. elseif combatee == ELECTRICDAMAGE then
  458. cor = COLOR_ELECTRIC
  459. elseif combatee == ROCKDAMAGE then
  460. cor = COLOR_ROCK
  461. elseif combatee == BUGDAMAGE then
  462. cor = COLOR_BUG
  463. elseif combatee == FIGHTDAMAGE then
  464. cor = COLOR_FIGHTING
  465. elseif combatee == DRAGONDAMAGE then
  466. cor = COLOR_DRAGON
  467. elseif combatee == POISONDAMAGE then
  468. cor = COLOR_POISON
  469. elseif getCreatureName(cid) == "Kakuna" or getCreatureName(cid) == "Metapod" then
  470. cor = COLOR_BUG
  471. elseif getCreatureName(cid) == "Golem" or getCreatureName(cid) == "Graveler" or getCreatureName(cid) == "Geodude" then
  472. cor = COLOR_ROCK
  473. else
  474. cor = NONE
  475. end
  476. local cores = cor
  477. if not isSummon(attacker) then
  478. if not isPlayer(cid) and not isPlayer(getCreatureMaster(cid)) then
  479. return false
  480. end
  481. if isSummon(cid) and getCreatureHealth(cid) <= (getCreatureMaxHealth(cid)*0.15) and not exhaustion.get(getCreatureMaster(cid), 88726) then
  482. exhaustion.set(getCreatureMaster(cid), 88726, 6)
  483. doSendMagicEffect(getThingPos(cid), 178)
  484. end
  485. if isPlayer(cid) then
  486. if #getCreatureSummons(cid) >= 1 then
  487. return false
  488. end
  489. doCreatureAddHealth(cid, -(math.floor(value*PlayerReduction))) -- Aqui é o valor que o playerleva
  490. doSendAnimatedText(getThingPos(cid), (math.floor(value*PlayerReduction)), 180)
  491. --doPlayerSendTextMessage(getCreatureMaster(cid), 27, "".. factor .."")
  492. doSendMagicEffect(getThingPos(cid), 3)
  493. return false
  494. end
  495. if getPlayerStorageValue(cid, 4) >= 1 then
  496. if getPlayerStorageValue(attacker, 898) >= 1 then
  497. return false
  498. end
  499. local damage = value
  500. --doSendMagicEffect(getThingPos(cid), 2)
  501. --doCreatureAddHealth(cid, -((math.floor(damage/2))*xx))
  502. --doSendAnimatedText(getThingPos(cid), (math.floor((damage)/2)*xx), cores)
  503. else
  504. local damage = value
  505. if cor == NONE then
  506. return true
  507. end
  508. -------------------------------------------------------------------
  509. if isSummon(cid) then -- Sumoner atacado
  510. if getPlayerStorageValue(attacker, 202) >= 1 then
  511. doCreatureAddHealth(cid, -(math.floor(xx+damage-getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid),8).uid, "boost")+ginasios[getPlayerStorageValue(attacker, 201)].healths))) --- MOnster atacado
  512. doSendAnimatedText(getThingPos(cid), (math.floor(xx+damage-getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid),8).uid, "boost")+ginasios[getPlayerStorageValue(attacker, 201)].healths)), cores)
  513. else
  514. doCreatureAddHealth(cid, -(math.floor(xx+damage-getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid),8).uid, "boost")))) --- MOnster atacado
  515. doSendAnimatedText(getThingPos(cid), (math.floor(xx+damage-getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid),8).uid, "boost"))), cores)
  516. end
  517. doSendMagicEffect(getThingPos(cid), 3)
  518. elseif ehMonstro(cid) then --- Monster atacado
  519. doCreatureAddHealth(cid, -(math.floor(xx+damage*getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid),8).uid, "boost")*MonsterReduction)))
  520. doSendAnimatedText(getThingPos(cid), (math.floor(xx+damage+getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid),8).uid, "boost"))), cores)
  521. doSendMagicEffect(getThingPos(cid), 3)
  522. end
  523. -------------------------------------------------------------------
  524. return false
  525. end
  526. return false
  527. end
  528. if isSummon(attacker) then --pokemon do player
  529. if isSummon(cid) then
  530. return false
  531. end
  532. combatx = combatee
  533. local factor = value
  534. ------------------------------------------------------------------------------------------------------------------------
  535. if isSummon(attacker) and ehMonstro(cid) and getPokemonFeed(getCreatureMaster(attacker)) <= configsFoodSystem.muitaFome.id then
  536. factor = factor * 0.4 + getPokemonBoostHit(getPlayerSlotItem(getCreatureMaster(attacker),8).uid)*MonsterReduction
  537. elseif isSummon(attacker) and ehMonstro(cid) and getPokemonFeed(getCreatureMaster(attacker)) > configsFoodSystem.muitaFome.id and getPokemonFeed(getCreatureMaster(attacker)) <= configsFoodSystem.comfome.id then
  538. factor = factor * 0.10 + getPokemonBoostHit(getPlayerSlotItem(getCreatureMaster(attacker),8).uid)*MonsterReduction
  539. elseif isSummon(attacker) and ehMonstro(cid) and getPokemonFeed(getCreatureMaster(attacker)) > configsFoodSystem.comfome.id and getPokemonFeed(getCreatureMaster(attacker)) <= configsFoodSystem.normal.id then
  540. factor = factor * 0.25 + getPokemonBoostHit(getPlayerSlotItem(getCreatureMaster(attacker),8).uid)*MonsterReduction
  541. elseif isSummon(attacker) and ehMonstro(cid) and getPokemonFeed(getCreatureMaster(attacker)) > configsFoodSystem.normal.id and getPokemonFeed(getCreatureMaster(attacker)) <= configsFoodSystem.semfome.id then
  542. factor = factor * 0.50 + getPokemonBoostHit(getPlayerSlotItem(getCreatureMaster(attacker),8).uid)*MonsterReduction
  543. elseif isSummon(attacker) and ehMonstro(cid) and getPokemonFeed(getCreatureMaster(attacker)) > configsFoodSystem.semfome.id and getPokemonFeed(getCreatureMaster(attacker)) <= configsFoodSystem.feliz.id then
  544. factor = factor * 0.60 + getPokemonBoostHit(getPlayerSlotItem(getCreatureMaster(attacker),8).uid)*MonsterReduction
  545. elseif isSummon(attacker) and ehMonstro(cid) and getPokemonFeed(getCreatureMaster(attacker)) > configsFoodSystem.feliz.id and getPokemonFeed(getCreatureMaster(attacker)) <= configsFoodSystem.superfeliz.id then
  546. factor = factor * 0.85 + getPokemonBoostHit(getPlayerSlotItem(getCreatureMaster(attacker),8).uid)*MonsterReduction
  547. else
  548. factor = factor + getPokemonBoostHit(getPlayerSlotItem(getCreatureMaster(attacker),8).uid)*MonsterReduction
  549. end
  550. if getPlayerStorageValue(cid, 202) >= 1 then
  551. factor = factor * 0.50 -- Para os pokemons de duel apanharem.
  552. end
  553. ------------------------------------------------------------------------------------------------------------------------
  554. if getPlayerStorageValue(cid, 4) >= 1 then
  555. doTargetCombatHealth(getCreatureMaster(attacker), cid, combatx, -((factor / 2)*x), -(((factor / 2)+10)*x), 255)
  556. if not isPlayer(cid) then
  557. doSendAnimatedText(getThingPos(cid), math.floor(((factor / 2)*x), -(((factor / 2)+10)*x)), cores)
  558. end
  559. else
  560. doTargetCombatHealth(getCreatureMaster(attacker), cid, combatx, -((factor)*x), -((factor+10)*x), 255)
  561. if not isPlayer(cid) then
  562. doSendAnimatedText(getThingPos(cid), math.floor(((factor)*x), -((factor+10)*x)), cores)
  563. end
  564. end
  565. end
  566. end
  567. end
Advertisement
Add Comment
Please, Sign In to add comment