Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function doRemoveCreatureWithTime(creatures,time) -- dev by Crypter 24/06/18
- if #creatures <= 0 then
- return false
- end
- addEvent(function()
- for i, v in pairs(creatures) do
- if isCreature(v) then
- doRemoveCreature(cid,v)
- end
- end
- end, time*1000)
- return true
- end
- function doCreateMonsters(cid,monsters_name,convince) -- dev by Crypter 24/06/18
- if not monsters_name and #monsters_name <= 0 then
- return false
- end
- local monster_table = {}
- for i, v in pairs(monsters_name) do
- local monster = doCreateMonster(v, getPlayerPosition(cid))
- if convince then
- doConvinceCreature(cid, besta)
- end
- monster_table[i] = monster
- end
- return monster_table -- return id of all monsters
- end
- function onCastSpell(cid, var)
- local exhaustion_values = {
- storage=290000,
- time = 60,
- }
- local time_toRemoveBestas = 10 -- em segundos
- local from,to = {x=962, y=885, z=7},{x=973, y=892, z=7} -- começo e final do mapa ??
- local from2,to2 = {x=979, y=901, z=7},{x=991, y=905, z=7} -- começo e final do mapa ??
- if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) then
- doPlayerSendCancel(cid, "Você não pode usar Summons Aqui!")
- return false
- elseif exhaustion.check(cid, exhaustion_values.storage) then
- doPlayerSendCancel(cid, "Aguarde "..exhaustion.get(cid, exhaustion_values.storage).." segundos para usar novamente.")
- return false
- end
- local bestas = {"Gobi","Hachibi","Isobu","Kurama","Matatabi","Nanabi","Rokubi","Shukaku","Shukaku","Son Goku"}
- local minhas_bestas = doCreateMonsters(cid,bestas,true)
- if doRemoveCreatureWithTime(minhas_bestas,time_toRemoveBestas) then
- addEvent(doPlayerSendTextMessage,time_toRemoveBestas*1000,cid,27,'Suas bestas foram removidas!')
- end
- local position_1 = {x=getPlayerPosition(cid).x+1, y=getPlayerPosition(cid).y+1, z=getPlayerPosition(cid).z}
- local position_2 = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z}
- doSendMagicEffect(position_1, 238)
- doSendMagicEffect(position_2, 278)
- doPlayerSendTextMessage(cid,27,'BIJU SOSHINGEKI!')
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement