Advertisement
Bitupx

Summon

Nov 2nd, 2022
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.79 KB | None | 0 0
  1. Código:
  2. function onCastSpell(cid, var)
  3. local from,to = {x=500, y=513, z=6},{x=514, y=513, z=6} -- começo e final do mapa {x=671, y=867, z=6},{x=684, y=867, z=6}
  4. local from2,to2 = {x=501, y=523, z=6},{x=515, y=523, z=6} -- começo e final do mapa {x=672, y=877, z=6},{x=685, y=877, z=6}
  5. local playerpos = getPlayerPosition(cid)
  6. local MaximoSummon = 1
  7.  
  8. local summons = getCreatureSummons(cid) --- provavelmente terá que tirar essa funçao
  9. if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) then
  10. doPlayerSendCancel(cid, "You cant summon here!") return true
  11. end
  12.  
  13. if getTilePzInfo(getCreaturePosition(cid)) ~= false then
  14. doPlayerSendCancel(cid, "You can't summon puppets in Protection Zones!")
  15. return false
  16. end
  17.  
  18. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 10 and getPlayerLevel(cid) >= 10 and getPlayerLevel(cid) <= 24 then
  19. doTeleportThing(creature, getThingPos(cid), false)
  20. doCreatureAddMana(cid, -10)
  21. doSummonMonster(cid, "karasu[1]")
  22. registerCreatureEvent(creature, "SummonNoKillPlayer")
  23. end
  24.  
  25. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 25 and getPlayerLevel(cid) >= 25 and getPlayerLevel(cid) <= 49 then
  26.  
  27. doCreatureAddMana(cid, -25)
  28. doSummonMonster(cid, "karasu[2]")
  29.  
  30. end
  31.  
  32. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 50 and getPlayerLevel(cid) >= 50 and getPlayerLevel(cid) <= 74 then
  33.  
  34.  
  35. doCreatureAddMana(cid, -50)
  36.  
  37. doSummonMonster(cid, "karasu[3]")
  38. doSummonMonster(cid, "Kuroari[1]")
  39.  
  40. end
  41.  
  42. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 75 and getPlayerLevel(cid) >= 75 and getPlayerLevel(cid) <= 99 then
  43.  
  44.  
  45. doCreatureAddMana(cid, -75)
  46.  
  47. doSummonMonster(cid, "karasu[4]")
  48. doSummonMonster(cid, "Kuroari[2]")
  49.  
  50. end
  51.  
  52. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 100 and getPlayerLevel(cid) >= 100 and getPlayerLevel(cid) <= 124 then
  53.  
  54.  
  55. doCreatureAddMana(cid, -100)
  56.  
  57. doSummonMonster(cid, "karasu[5]")
  58. doSummonMonster(cid, "Kuroari[3]")
  59.  
  60. end
  61.  
  62. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 125 and getPlayerLevel(cid) >= 125 and getPlayerLevel(cid) <= 149 then
  63.  
  64.  
  65. doCreatureAddMana(cid, -125)
  66.  
  67. doSummonMonster(cid, "karasu[6]")
  68. doSummonMonster(cid, "Kuroari[4]")
  69.  
  70. end
  71.  
  72. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 150 and getPlayerLevel(cid) >= 150 and getPlayerLevel(cid) <= 174 then
  73.  
  74.  
  75. doCreatureAddMana(cid, -150)
  76.  
  77. doSummonMonster(cid, "karasu[7]")
  78. doSummonMonster(cid, "Kuroari[5]")
  79. doSummonMonster(cid, "Sanshouuo[1]")
  80.  
  81. end
  82.  
  83. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 175 and getPlayerLevel(cid) >= 175 and getPlayerLevel(cid) <= 199 then
  84.  
  85.  
  86. doCreatureAddMana(cid, -175)
  87. doSummonMonster(cid, "karasu[8]")
  88. doSummonMonster(cid, "Kuroari[6]")
  89. doSummonMonster(cid, "Sanshouuo[2]")
  90.  
  91. end
  92.  
  93. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 200 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 224 then
  94.  
  95.  
  96. doCreatureAddMana(cid, -200)
  97. doSummonMonster(cid, "karasu[9]")
  98. doSummonMonster(cid, "Kuroari[7]")
  99. doSummonMonster(cid, "Sanshouuo[3]")
  100.  
  101. end
  102.  
  103. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 225 and getPlayerLevel(cid) >= 225 and getPlayerLevel(cid) <= 249 then
  104.  
  105.  
  106. doCreatureAddMana(cid, -225)
  107. doSummonMonster(cid, "karasu[9]")
  108. doSummonMonster(cid, "Kuroari[7]")
  109. doSummonMonster(cid, "Sanshouuo[3]")
  110.  
  111. end
  112. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 250 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 274 then
  113.  
  114.  
  115. doCreatureAddMana(cid, -250)
  116. doSummonMonster(cid, "karasu[9]")
  117. doSummonMonster(cid, "Kuroari[7]")
  118. doSummonMonster(cid, "Sanshouuo[3]")
  119.  
  120. end
  121.  
  122. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 275 and getPlayerLevel(cid) >= 275 and getPlayerLevel(cid) <= 299 then
  123.  
  124.  
  125. doCreatureAddMana(cid, -275)
  126. doSummonMonster(cid, "karasu[9]")
  127. doSummonMonster(cid, "Kuroari[7]")
  128. doSummonMonster(cid, "Sanshouuo[3]")
  129.  
  130. end
  131.  
  132. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 300 and getPlayerLevel(cid) >= 300 and getPlayerLevel(cid) <= 999 then
  133.  
  134.  
  135. doCreatureAddMana(cid, -300)
  136. doSummonMonster(cid, "karasu[9]")
  137. doSummonMonster(cid, "Kuroari[7]")
  138. doSummonMonster(cid, "Sanshouuo[3]")
  139.  
  140. return TRUE
  141. end
  142. end
  143. Ver perfil de usuario
  144.  
  145. Historial de mensajes privados
  146. Summon lvl (SOLUCIONADO) SCRIPT FUNCIONAL - Vie Jun 29, 2018 3:37 am
  147. bitupx00
  148. Código:
  149. function onCastSpell(cid, var)
  150. local from,to = {x=500, y=513, z=6},{x=514, y=513, z=6} -- começo e final do mapa {x=671, y=867, z=6},{x=684, y=867, z=6}
  151. local from2,to2 = {x=501, y=523, z=6},{x=515, y=523, z=6} -- começo e final do mapa {x=672, y=877, z=6},{x=685, y=877, z=6}
  152. local playerpos = getPlayerPosition(cid)
  153. local MaximoSummon = 1
  154.  
  155. local summons = getCreatureSummons(cid) --- provavelmente terá que tirar essa funçao
  156. if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) then
  157. doPlayerSendCancel(cid, "You cant summon here!") return true
  158. end
  159.  
  160. if getTilePzInfo(getCreaturePosition(cid)) ~= false then
  161. doPlayerSendCancel(cid, "You can't summon puppets in Protection Zones!")
  162. return false
  163. end
  164.  
  165. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 10 and getPlayerLevel(cid) >= 10 and getPlayerLevel(cid) <= 24 then
  166. doTeleportThing(creature, getThingPos(cid), false)
  167. doCreatureAddMana(cid, -10)
  168. doSummonMonster(cid, "karasu[1]")
  169. registerCreatureEvent(creature, "SummonNoKillPlayer")
  170. end
  171.  
  172. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 25 and getPlayerLevel(cid) >= 25 and getPlayerLevel(cid) <= 49 then
  173.  
  174. doCreatureAddMana(cid, -25)
  175. doSummonMonster(cid, "karasu[2]")
  176.  
  177. end
  178.  
  179. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 50 and getPlayerLevel(cid) >= 50 and getPlayerLevel(cid) <= 74 then
  180.  
  181.  
  182. doCreatureAddMana(cid, -50)
  183.  
  184. doSummonMonster(cid, "karasu[3]")
  185. doSummonMonster(cid, "Kuroari[1]")
  186.  
  187. end
  188.  
  189. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 75 and getPlayerLevel(cid) >= 75 and getPlayerLevel(cid) <= 99 then
  190.  
  191.  
  192. doCreatureAddMana(cid, -75)
  193.  
  194. doSummonMonster(cid, "karasu[4]")
  195. doSummonMonster(cid, "Kuroari[2]")
  196.  
  197. end
  198.  
  199. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 100 and getPlayerLevel(cid) >= 100 and getPlayerLevel(cid) <= 124 then
  200.  
  201.  
  202. doCreatureAddMana(cid, -100)
  203.  
  204. doSummonMonster(cid, "karasu[5]")
  205. doSummonMonster(cid, "Kuroari[3]")
  206.  
  207. end
  208.  
  209. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 125 and getPlayerLevel(cid) >= 125 and getPlayerLevel(cid) <= 149 then
  210.  
  211.  
  212. doCreatureAddMana(cid, -125)
  213.  
  214. doSummonMonster(cid, "karasu[6]")
  215. doSummonMonster(cid, "Kuroari[4]")
  216.  
  217. end
  218.  
  219. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 150 and getPlayerLevel(cid) >= 150 and getPlayerLevel(cid) <= 174 then
  220.  
  221.  
  222. doCreatureAddMana(cid, -150)
  223.  
  224. doSummonMonster(cid, "karasu[7]")
  225. doSummonMonster(cid, "Kuroari[5]")
  226. doSummonMonster(cid, "Sanshouuo[1]")
  227.  
  228. end
  229.  
  230. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 175 and getPlayerLevel(cid) >= 175 and getPlayerLevel(cid) <= 199 then
  231.  
  232.  
  233. doCreatureAddMana(cid, -175)
  234. doSummonMonster(cid, "karasu[8]")
  235. doSummonMonster(cid, "Kuroari[6]")
  236. doSummonMonster(cid, "Sanshouuo[2]")
  237.  
  238. end
  239.  
  240. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 200 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 224 then
  241.  
  242.  
  243. doCreatureAddMana(cid, -200)
  244. doSummonMonster(cid, "karasu[9]")
  245. doSummonMonster(cid, "Kuroari[7]")
  246. doSummonMonster(cid, "Sanshouuo[3]")
  247.  
  248. end
  249.  
  250. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 225 and getPlayerLevel(cid) >= 225 and getPlayerLevel(cid) <= 249 then
  251.  
  252.  
  253. doCreatureAddMana(cid, -225)
  254. doSummonMonster(cid, "karasu[9]")
  255. doSummonMonster(cid, "Kuroari[7]")
  256. doSummonMonster(cid, "Sanshouuo[3]")
  257.  
  258. end
  259. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 250 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 274 then
  260.  
  261.  
  262. doCreatureAddMana(cid, -250)
  263. doSummonMonster(cid, "karasu[9]")
  264. doSummonMonster(cid, "Kuroari[7]")
  265. doSummonMonster(cid, "Sanshouuo[3]")
  266.  
  267. end
  268.  
  269. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 275 and getPlayerLevel(cid) >= 275 and getPlayerLevel(cid) <= 299 then
  270.  
  271.  
  272. doCreatureAddMana(cid, -275)
  273. doSummonMonster(cid, "karasu[9]")
  274. doSummonMonster(cid, "Kuroari[7]")
  275. doSummonMonster(cid, "Sanshouuo[3]")
  276.  
  277. end
  278.  
  279. if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 300 and getPlayerLevel(cid) >= 300 and getPlayerLevel(cid) <= 999 then
  280.  
  281.  
  282. doCreatureAddMana(cid, -300)
  283. doSummonMonster(cid, "karasu[9]")
  284. doSummonMonster(cid, "Kuroari[7]")
  285. doSummonMonster(cid, "Sanshouuo[3]")
  286.  
  287. return TRUE
  288. end
  289. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement