Postado Agosto 17, 2016 8 anos precisava de ajuda com essa spell, ela esta atravessando paredes precisava q n atravessa nada local function isWalkable(pos, creatures) local tile = Tile(pos) if (creatures and tile:getCreatureCount() > 0) or tile:hasFlag(TILESTATE_BLOCKSOLID) then return false end return true end function onCastSpell(creature, var) local steps, pos = 4, creature:getPosition() pos:sendMagicEffect(CONST_ME_POFF) for x = 1, steps do position = creature:getPosition() position:getNextPosition(creature:getDirection(), x) position = creature:getClosestFreePosition(position, false) if position.x == 0 or not isWalkable(position, x == steps and true or false) then creature:sendCancelMessage("You failed to jump, there is something blocking.") return false end end creature:teleportTo(position) pos:sendMagicEffect(CONST_ME_THUNDER) position:sendMagicEffect(CONST_ME_THUNDER) return true end
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.