Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Código:
- function onCastSpell(cid, var)
- 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}
- 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}
- local playerpos = getPlayerPosition(cid)
- local MaximoSummon = 1
- local summons = getCreatureSummons(cid) --- provavelmente terá que tirar essa funçao
- if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) then
- doPlayerSendCancel(cid, "You cant summon here!") return true
- end
- if getTilePzInfo(getCreaturePosition(cid)) ~= false then
- doPlayerSendCancel(cid, "You can't summon puppets in Protection Zones!")
- return false
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 10 and getPlayerLevel(cid) >= 10 and getPlayerLevel(cid) <= 24 then
- doTeleportThing(creature, getThingPos(cid), false)
- doCreatureAddMana(cid, -10)
- doSummonMonster(cid, "karasu[1]")
- registerCreatureEvent(creature, "SummonNoKillPlayer")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 25 and getPlayerLevel(cid) >= 25 and getPlayerLevel(cid) <= 49 then
- doCreatureAddMana(cid, -25)
- doSummonMonster(cid, "karasu[2]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 50 and getPlayerLevel(cid) >= 50 and getPlayerLevel(cid) <= 74 then
- doCreatureAddMana(cid, -50)
- doSummonMonster(cid, "karasu[3]")
- doSummonMonster(cid, "Kuroari[1]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 75 and getPlayerLevel(cid) >= 75 and getPlayerLevel(cid) <= 99 then
- doCreatureAddMana(cid, -75)
- doSummonMonster(cid, "karasu[4]")
- doSummonMonster(cid, "Kuroari[2]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 100 and getPlayerLevel(cid) >= 100 and getPlayerLevel(cid) <= 124 then
- doCreatureAddMana(cid, -100)
- doSummonMonster(cid, "karasu[5]")
- doSummonMonster(cid, "Kuroari[3]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 125 and getPlayerLevel(cid) >= 125 and getPlayerLevel(cid) <= 149 then
- doCreatureAddMana(cid, -125)
- doSummonMonster(cid, "karasu[6]")
- doSummonMonster(cid, "Kuroari[4]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 150 and getPlayerLevel(cid) >= 150 and getPlayerLevel(cid) <= 174 then
- doCreatureAddMana(cid, -150)
- doSummonMonster(cid, "karasu[7]")
- doSummonMonster(cid, "Kuroari[5]")
- doSummonMonster(cid, "Sanshouuo[1]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 175 and getPlayerLevel(cid) >= 175 and getPlayerLevel(cid) <= 199 then
- doCreatureAddMana(cid, -175)
- doSummonMonster(cid, "karasu[8]")
- doSummonMonster(cid, "Kuroari[6]")
- doSummonMonster(cid, "Sanshouuo[2]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 200 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 224 then
- doCreatureAddMana(cid, -200)
- doSummonMonster(cid, "karasu[9]")
- doSummonMonster(cid, "Kuroari[7]")
- doSummonMonster(cid, "Sanshouuo[3]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 225 and getPlayerLevel(cid) >= 225 and getPlayerLevel(cid) <= 249 then
- doCreatureAddMana(cid, -225)
- doSummonMonster(cid, "karasu[9]")
- doSummonMonster(cid, "Kuroari[7]")
- doSummonMonster(cid, "Sanshouuo[3]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 250 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 274 then
- doCreatureAddMana(cid, -250)
- doSummonMonster(cid, "karasu[9]")
- doSummonMonster(cid, "Kuroari[7]")
- doSummonMonster(cid, "Sanshouuo[3]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 275 and getPlayerLevel(cid) >= 275 and getPlayerLevel(cid) <= 299 then
- doCreatureAddMana(cid, -275)
- doSummonMonster(cid, "karasu[9]")
- doSummonMonster(cid, "Kuroari[7]")
- doSummonMonster(cid, "Sanshouuo[3]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 300 and getPlayerLevel(cid) >= 300 and getPlayerLevel(cid) <= 999 then
- doCreatureAddMana(cid, -300)
- doSummonMonster(cid, "karasu[9]")
- doSummonMonster(cid, "Kuroari[7]")
- doSummonMonster(cid, "Sanshouuo[3]")
- return TRUE
- end
- end
- Ver perfil de usuario
- Historial de mensajes privados
- Summon lvl (SOLUCIONADO) SCRIPT FUNCIONAL - Vie Jun 29, 2018 3:37 am
- bitupx00
- Código:
- function onCastSpell(cid, var)
- 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}
- 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}
- local playerpos = getPlayerPosition(cid)
- local MaximoSummon = 1
- local summons = getCreatureSummons(cid) --- provavelmente terá que tirar essa funçao
- if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) then
- doPlayerSendCancel(cid, "You cant summon here!") return true
- end
- if getTilePzInfo(getCreaturePosition(cid)) ~= false then
- doPlayerSendCancel(cid, "You can't summon puppets in Protection Zones!")
- return false
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 10 and getPlayerLevel(cid) >= 10 and getPlayerLevel(cid) <= 24 then
- doTeleportThing(creature, getThingPos(cid), false)
- doCreatureAddMana(cid, -10)
- doSummonMonster(cid, "karasu[1]")
- registerCreatureEvent(creature, "SummonNoKillPlayer")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 25 and getPlayerLevel(cid) >= 25 and getPlayerLevel(cid) <= 49 then
- doCreatureAddMana(cid, -25)
- doSummonMonster(cid, "karasu[2]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 50 and getPlayerLevel(cid) >= 50 and getPlayerLevel(cid) <= 74 then
- doCreatureAddMana(cid, -50)
- doSummonMonster(cid, "karasu[3]")
- doSummonMonster(cid, "Kuroari[1]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 75 and getPlayerLevel(cid) >= 75 and getPlayerLevel(cid) <= 99 then
- doCreatureAddMana(cid, -75)
- doSummonMonster(cid, "karasu[4]")
- doSummonMonster(cid, "Kuroari[2]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 100 and getPlayerLevel(cid) >= 100 and getPlayerLevel(cid) <= 124 then
- doCreatureAddMana(cid, -100)
- doSummonMonster(cid, "karasu[5]")
- doSummonMonster(cid, "Kuroari[3]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 125 and getPlayerLevel(cid) >= 125 and getPlayerLevel(cid) <= 149 then
- doCreatureAddMana(cid, -125)
- doSummonMonster(cid, "karasu[6]")
- doSummonMonster(cid, "Kuroari[4]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 150 and getPlayerLevel(cid) >= 150 and getPlayerLevel(cid) <= 174 then
- doCreatureAddMana(cid, -150)
- doSummonMonster(cid, "karasu[7]")
- doSummonMonster(cid, "Kuroari[5]")
- doSummonMonster(cid, "Sanshouuo[1]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 175 and getPlayerLevel(cid) >= 175 and getPlayerLevel(cid) <= 199 then
- doCreatureAddMana(cid, -175)
- doSummonMonster(cid, "karasu[8]")
- doSummonMonster(cid, "Kuroari[6]")
- doSummonMonster(cid, "Sanshouuo[2]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 200 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 224 then
- doCreatureAddMana(cid, -200)
- doSummonMonster(cid, "karasu[9]")
- doSummonMonster(cid, "Kuroari[7]")
- doSummonMonster(cid, "Sanshouuo[3]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 225 and getPlayerLevel(cid) >= 225 and getPlayerLevel(cid) <= 249 then
- doCreatureAddMana(cid, -225)
- doSummonMonster(cid, "karasu[9]")
- doSummonMonster(cid, "Kuroari[7]")
- doSummonMonster(cid, "Sanshouuo[3]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 250 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 274 then
- doCreatureAddMana(cid, -250)
- doSummonMonster(cid, "karasu[9]")
- doSummonMonster(cid, "Kuroari[7]")
- doSummonMonster(cid, "Sanshouuo[3]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 275 and getPlayerLevel(cid) >= 275 and getPlayerLevel(cid) <= 299 then
- doCreatureAddMana(cid, -275)
- doSummonMonster(cid, "karasu[9]")
- doSummonMonster(cid, "Kuroari[7]")
- doSummonMonster(cid, "Sanshouuo[3]")
- end
- if (table.maxn(summons) < MaximoSummon) and getCreatureMana(cid) >= 300 and getPlayerLevel(cid) >= 300 and getPlayerLevel(cid) <= 999 then
- doCreatureAddMana(cid, -300)
- doSummonMonster(cid, "karasu[9]")
- doSummonMonster(cid, "Kuroari[7]")
- doSummonMonster(cid, "Sanshouuo[3]")
- return TRUE
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement