Postado Agosto 9, 2017 7 anos Boa tarde galera, fiz uma spell que empurra o monstro para trás, porém só funciona quando o monstro está no target, alguém pode me ajudar a colocar ela para nã utilizar o target e empurrar todos os montros que forem acertados pelo area combat? Segue o script: local combat0_Push = createCombatObject() setCombatParam(combat0_Push, COMBAT_PARAM_EFFECT, CONST_ME_POFF) setCombatParam(combat0_Push, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) setCombatParam(combat0_Push, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat0_Push,createCombatArea({{0, 0, 0, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 2, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 0, 0, 0}})) local dfcombat0_Push = {CONST_ANI_ARROW,0,1,0,2,0,3,0,-1,0,-2,0,-3,-1,-2,-2,-1,-3,0,-2,1,-1,2,1,2,2,1,3,0,2,-1,1,-2,1,-1,1,0,1,1,2,0,-1,0,-1,1,-2,0,-1,-1} local function RunPart(c,cid,var,dirList,dirEmitPos) local player = Player(cid) local target = getCreatureTarget(cid) local position = getCreaturePosition(cid) local fromPosition = getCreaturePosition(target) local x = ((fromPosition.x - position.x) < 0 and -1 or ((fromPosition.x - position.x) == 0 and 0 or 1)) local y = ((fromPosition.y - position.y) < 0 and -1 or ((fromPosition.y - position.y) == 0 and 0 or 1)) local toPosition = {x = fromPosition.x + x, y = fromPosition.y + y, z = fromPosition.z} if (isCreature(cid)) then doCombat(cid, c, var) if (dirList ~= nil) then local i = 2; while (i < #dirList) do doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1]) i = i + 2 local query = Tile(toPosition):queryAdd(target) if query == RETURNVALUE_NOERROR then doTeleportThing(target, toPosition, true) end end end end end function onCastSpell(cid, var) local startPos = getCreaturePosition(cid) RunPart(combat0_Push,cid,var,dfcombat0_Push,startPos) return true end Editado Agosto 10, 2017 7 anos por lorenzo2014 (veja o histórico de edições) Danera Global Server Versão: 10.77 - 10.79 Sem Items VIP Venha se divertir
Postado Agosto 12, 2017 7 anos Autor Alguém? Danera Global Server Versão: 10.77 - 10.79 Sem Items VIP Venha se divertir
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.