Postado Setembro 1, 2022 2 anos .Qual servidor ou website você utiliza como base? OTX Qual o motivo deste tópico? Ajuda Está surgindo algum erro? Se sim coloque-o aqui. Citar Estou com esse script de kuchyose, porém quando crio os 4, após morrer 1 e ficar com 3, consigo criar novamente os 4, ficando com 7...queria barrar isso, que desse pra recriar apenas quando morressem todos, ou tivesse usado o kai. Você tem o código disponível? Se tiver publique-o aqui: function onCastSpell(cid, var) 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 local playerpos = getPlayerPosition(cid) local position1 = {x=getPlayerPosition(cid).x+1, y=getPlayerPosition(cid).y+1, z=getPlayerPosition(cid).z} local position2 = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} local MaximoSummon = 4 --- Maximo de Monstros Sumonados!! local summons = getCreatureSummons(cid) if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) then doPlayerSendCancel(cid, "Você não pode usar Summons Aqui!") return true end if(table.maxn(summons) < MaximoSummon) then -- no summons local clone = doCreateMonster("Suiton Hearth", playerpos) local clone1 = doCreateMonster("Fuuton Hearth", playerpos) local clone2 = doCreateMonster("Raiton Hearth", playerpos) local clone3 = doCreateMonster("Katon Hearth", playerpos) doConvinceCreature(cid, clone) doConvinceCreature(cid, clone1) doConvinceCreature(cid, clone2) doConvinceCreature(cid, clone3) doSendMagicEffect(position1, 111) doSendMagicEffect(position2, 111) doSendMagicEffect(position3, 111) doSendMagicEffect(position4, 111) return TRUE end end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
Postado Setembro 1, 2022 2 anos Diretor Solução Em 01/09/2022 em 01:42, Lenilson disse: .Qual servidor ou website você utiliza como base? OTX Qual o motivo deste tópico? Ajuda Está surgindo algum erro? Se sim coloque-o aqui. Você tem o código disponível? Se tiver publique-o aqui: function onCastSpell(cid, var) 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 local playerpos = getPlayerPosition(cid) local position1 = {x=getPlayerPosition(cid).x+1, y=getPlayerPosition(cid).y+1, z=getPlayerPosition(cid).z} local position2 = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} local MaximoSummon = 4 --- Maximo de Monstros Sumonados!! local summons = getCreatureSummons(cid) if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) then doPlayerSendCancel(cid, "Você não pode usar Summons Aqui!") return true end if(table.maxn(summons) < MaximoSummon) then -- no summons local clone = doCreateMonster("Suiton Hearth", playerpos) local clone1 = doCreateMonster("Fuuton Hearth", playerpos) local clone2 = doCreateMonster("Raiton Hearth", playerpos) local clone3 = doCreateMonster("Katon Hearth", playerpos) doConvinceCreature(cid, clone) doConvinceCreature(cid, clone1) doConvinceCreature(cid, clone2) doConvinceCreature(cid, clone3) doSendMagicEffect(position1, 111) doSendMagicEffect(position2, 111) doSendMagicEffect(position3, 111) doSendMagicEffect(position4, 111) return TRUE end end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. function onCastSpell(cid, var) local from,to = {x=962, y=885, z=7},{x=973, y=892, z=7} local from2,to2 = {x=979, y=901, z=7},{x=991, y=905, z=7} local dir = getPlayerLookDir(cid) local ppos = getPlayerPosition(cid) if(dir==1)then ppos.x = ppos.x + 1 elseif(dir==2)then ppos.y = ppos.y + 1 elseif(dir==3)then ppos.x = ppos.x - 1 elseif(dir==0)then ppos.y = ppos.y - 1 end local summon = getCreatureSummons(cid) local MaximoSummon = 0 if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) then doPlayerSendCancel(cid, "Você não pode usar Summons Aqui!") return false end if (table.maxn(summon) > MaximoSummon) then doPlayerSendTextMessage(cid, 22, "Voce ainda tem summons em batalha!") return false end local clone1 = doConvinceCreature(cid, doCreateMonster("Suiton Hearth", ppos)) local clone2 = doConvinceCreature(cid, doCreateMonster("Fuuton Hearth", ppos)) local clone3 = doConvinceCreature(cid, doCreateMonster("Raiton Hearth", ppos)) local clone4 = doConvinceCreature(cid, doCreateMonster("Katon Hearth", ppos)) doPlayerSendTextMessage(cid, 22, "Voce summonou quatro criaturas!") end FIZ ISSO PRA VOCÊ, NÁO SEI SE VAI TE AJUDAR, MAIS SÓ PODE SUMONAR MAIS QUANDO NÃO TER MAIS SUMONS EM BATALHA SE TE AJUDEI NÃO ESQUEÇA DE REP+ Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código. #OpenSource #Programação #Contribuição
Postado Setembro 1, 2022 2 anos Autor Em 01/09/2022 em 02:46, L3K0T disse: function onCastSpell(cid, var) local from,to = {x=962, y=885, z=7},{x=973, y=892, z=7} local from2,to2 = {x=979, y=901, z=7},{x=991, y=905, z=7} local dir = getPlayerLookDir(cid) local ppos = getPlayerPosition(cid) if(dir==1)then ppos.x = ppos.x + 1 elseif(dir==2)then ppos.y = ppos.y + 1 elseif(dir==3)then ppos.x = ppos.x - 1 elseif(dir==0)then ppos.y = ppos.y - 1 end local summon = getCreatureSummons(cid) local MaximoSummon = 0 if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) then doPlayerSendCancel(cid, "Você não pode usar Summons Aqui!") return false end if (table.maxn(summon) > MaximoSummon) then doPlayerSendTextMessage(cid, 22, "Voce ainda tem summons em batalha!") return false end local clone1 = doConvinceCreature(cid, doCreateMonster("Suiton Hearth", ppos)) local clone2 = doConvinceCreature(cid, doCreateMonster("Fuuton Hearth", ppos)) local clone3 = doConvinceCreature(cid, doCreateMonster("Raiton Hearth", ppos)) local clone4 = doConvinceCreature(cid, doCreateMonster("Katon Hearth", ppos)) doPlayerSendTextMessage(cid, 22, "Voce summonou quatro criaturas!") end FIZ ISSO PRA VOCÊ, NÁO SEI SE VAI TE AJUDAR, MAIS SÓ PODE SUMONAR MAIS QUANDO NÃO TER MAIS SUMONS EM BATALHA SE TE AJUDEI NÃO ESQUEÇA DE REP+ opa meu amigo, deu muito certo, muito obrigado mesmo !
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.