Ir para conteúdo

caahruano

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Curtir
    caahruano deu reputação a EddyHavoc em [TFS 1.3] Block Wall Spell   
    Nome: Ice Wall
    Tipo: Spell
    Autor: Eddy Havoc
     
     
     
    Essa é a versão final da spell Ice Wall ou Block Wall criada por mim.
     
    Exibição in-game:
     
     
     
     
    Crie um arquivo chamado ice_wall.lua na pasta data/spells/scripts/conjuring e copie o conteúdo abaixo:
    --[[ Created by: Eddy Havoc name: Victor Amaral contact: [email protected] É proibido a venda ou a cópia sem os devidos créditos desse script. ]]-- local north = 0 local south = 2 local east = 1 local west = 3 local delay = 1 -- Tempo em segundos local itemh = 6728 local itemv = 6729 combat = createCombatObject() combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE) function onCastSpell(creature, variant) local cDir = creature:getDirection() local cPos = creature:getPosition () local pos = (Position(0,0,0)) if cDir == north then if not getTileInfo(cPos).house and not getTilePzInfo(cPos) then setCombatParam(combat, COMBAT_PARAM_CREATEITEM, itemv) pos = Position(cPos + Position(0, -1)) meffect = pos:sendMagicEffect(44) end elseif cDir == east then if not getTileInfo(cPos).house and not getTilePzInfo(cPos) then setCombatParam(combat, COMBAT_PARAM_CREATEITEM, itemh) pos = Position(cPos + Position(1, 0)) meffect = pos:sendMagicEffect(44) end elseif cDir == south then if not getTileInfo(cPos).house and not getTilePzInfo(cPos) then setCombatParam(combat, COMBAT_PARAM_CREATEITEM, itemv) pos = Position(cPos + Position(0, 1)) meffect = pos:sendMagicEffect(44) end elseif cDir == west then if not getTileInfo(cPos).house and not getTilePzInfo(cPos) then setCombatParam(combat, COMBAT_PARAM_CREATEITEM, itemh) pos = Position(cPos + Position(-1, 0)) meffect = pos:sendMagicEffect(44) end end addEvent(function() local wall = {itemh, itemv} for i = 1, 2 do if getTileItemById(pos, wall[i]).uid > 0 then doRemoveItem(getTileItemById(pos, wall[i]).uid) return TRUE end end end,delay*1000) return doCombat(creature, combat, variant) end Adicione a seguinte tag no arquivo spells.xml localizadon a pasta data/spells:
     
    <instant group="support" spellid="94" name="Protection" words="Ice Wall" level="1" mana="1" casterTargetOrDirection="1" blocktype="all" prem="0" cooldown="1000" groupcooldown="500" needlearn="0" script="conjuring/ice_wall.lua"> <vocation name="Elder Druid"/> </instant>  
     
     
    Para configurar qual item a spell irá conjurar edite itemh/itemv. Itemh: item que irá aparecer horizontalmente (norte e sul). Itemv: item que irá aparecer verticalmente (leste e oeste).  
     
    Qualquer dúvida estou a disposição,
    Atenciosamente, Eddy Havoc.
     
     
     
  2. Gostei
    caahruano deu reputação a Bodak Reborn em Sempre q moreer nascer com 30% de life [RESOLVIDO]   
    function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller) if isPlayer(cid) then setPlayerStorageValue(cid, 329406, 1) end return true end function doPlayerRemoveHealthPercent(cid, percent) local health = getCreatureMaxHealth(cid) doPlayerRemoveHealth(cid, (health / 100) * percent) return TRUE end function onLogin(cid) registerCreatureEvent(cid, "PorcentDeath") if getPlayerStorageValue(cid, 329406) == 1 then doPlayerRemoveHealthPercent(cid,70) setPlayerStorageValue(cid, 329406, 0) end return true end  
    Eu não sabia da existência dessa função doPlayerRemoveHealth, no meu servidor não tem. Caso no seu não tenha também, tente assim:
    function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller) if isPlayer(cid) then setPlayerStorageValue(cid, 329406, 1) end return true end function doPlayerRemoveHealthPercent(cid, percent) local health = getCreatureMaxHealth(cid) local life = health/100 local all = life * percent doCreatureAddHealth(cid, -all) return TRUE end function onLogin(cid) registerCreatureEvent(cid, "PorcentDeath") if getPlayerStorageValue(cid, 329406) == 1 then doPlayerRemoveHealthPercent(cid,70) setPlayerStorageValue(cid, 329406, 0) end return true end  
  3. Gostei
    setPlayerStorageValue(cid, storage, getPlayerStorageValue(cid, storage) + 1)

Informação Importante

Confirmação de Termo