Postado Outubro 30, 2017 7 anos data/spells/scripts/support/ Levitate.lua local function levitate(creature, parameter) local fromPosition = creature:getPosition() if parameter == "up" and fromPosition.z ~= 8 or parameter == "down" and fromPosition.z ~= 7 then local toPosition = creature:getPosition() toPosition:getNextPosition(creature:getDirection()) local tile = Tile(parameter == "up" and Position(fromPosition.x, fromPosition.y, fromPosition.z - 1) or toPosition) if not tile or not tile:getGround() and not tile:hasFlag(parameter == "up" and TILESTATE_IMMOVABLEBLOCKSOLID or TILESTATE_BLOCKSOLID) then tile = Tile(toPosition.x, toPosition.y, toPosition.z + (parameter == "up" and -1 or 1)) if tile and tile:getGround() and not tile:hasFlag(bit.bor(TILESTATE_IMMOVABLEBLOCKSOLID, TILESTATE_FLOORCHANGE)) then return creature:move(tile, bit.bor(FLAG_IGNOREBLOCKITEM, FLAG_IGNOREBLOCKCREATURE)) end end end return RETURNVALUE_NOTPOSSIBLE end function onCastSpell(creature, variant) local returnValue = levitate(creature, variant:getString()) if returnValue ~= RETURNVALUE_NOERROR then creature:sendCancelMessage(returnValue) creature:getPosition():sendMagicEffect(CONST_ME_POFF) return false end creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) return true end
Postado Outubro 30, 2017 7 anos Autor xml ? me passa a parte que vai no spells.xml Se tiver alguma magia que faz a mesma função me avise!
Postado Outubro 31, 2017 7 anos Autor Alguém pode me ajudar a fazer alguma magia que substitua o exani hur"up / exani hur"down ?
Postado Outubro 31, 2017 7 anos Dependendo da sua distro a magia Levitate está como uma function, tenta só colocar isto no xml. em Spells.xml <instant name="Levitate" words="exani hur" lvl="12" mana="50" prem="0" aggressive="0" exhaustion="1000" params="1" needlearn="0" event="function" value="Levitate"> <vocation id="1"/> <vocation id="2"/> <vocation id="3"/> <vocation id="4"/> <vocation id="5"/> <vocation id="6"/> <vocation id="7"/> <vocation id="8"/> </instant> Agora coloque esse novo Levitate.lua
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.