Ir para conteúdo

kirabig

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    kirabig deu reputação a xWhiteWolf em Voodoo   
    Aeeeeeee carai, hoje vim trazer pra vocês meu mais novo sistema *-*. É uma fodenda spell que você seleciona alguém pra ser seu voodoo e a partir disso durante um tempo X ela vai receber todos os hit's que você deveria receber... INCRÍVEL, NÃO?
    Agora se nesse meio tempo ela deslogar ou entrar em pz você vai tomar o dano normal, mas se ainda tiver nesse tempo X e ela sair ela vai receber o dano instantaneamente (É BOM DEMAIS PRA SER VERDADE).

    Agora você deve estar imaginando, e se eu usar a magia pra transferir o dano pra um amigo e ele fizer a mesma coisa em mim, pra onde vai o dano?
    PRA LUGAR NENHUM!!!! Até porque eu já me previni contra esse bug fazendo com que não seja possível fazer alguém de voodoo se ele já tiver alguém de voodoo.
    Testado em versão 8.54 TFS Crying Damnson mas deve funcionar em todas as versões que tenham a função onStatsChange no creaturescripts.
    Bom, o script tá 100% funcional e livre de bugs (se vc achar algum eu te dou 3 REP).

    Agora vamos à mágica:
     
    Crie um arquivo em mods com extensão .xml e adiciona isso daqui nele
    <?xml version="1.0" encoding="UTF-8"?> <mod name="Voodoo System" version="1.0" author="Night Wolf" contact="none" enabled="yes"> ------------------------------------------------------------------------------------ <config name="feitisso"><![CDATA[ configuration = { storage = 24567,  tempo = 20, cooldown = 45, effect1 = 13, effect2 = 65 } storagecool = 24568 ]]></config> ---------------------------------------------------------------------------------- <event type="login" name="registerVoodoo" event="script"><![CDATA[ function onLogin(cid) domodlib('feitisso') if getPlayerStorageValue(cid, configuration.storage) > 0 then doPlayerSendTextMessage(cid, 22, "Your victim is not receiving your hits anymore.") doPlayerSetStorageValue(cid, configuration.storage, 0) end registerCreatureEvent(cid,"voodoo") return true end ]]></event> ------------------------------------------------------------------------------------ <instant name="Feitiço" words="voodoo" lvl="50" mana="10" prem="1" range="3" needtarget="1" blockwalls="1" exhaustion="1000" needlearn="0" event="script"> <vocation id="5"/> <vocation id="6"/> <vocation id="7"/> <vocation id="8"/> <![CDATA[ function onCastSpell(cid, var) domodlib('feitisso') if not (isPlayer(variantToNumber(var))) then doPlayerSendCancel(cid, "You can only use this spell in players.") return false end if getPlayerStorageValue(variantToNumber(var), configuration.storage) > 0 then doPlayerSendCancel(cid, "You can't make a voodoo of someone who already has a voodoo.") return false end if (os.time() - getPlayerStorageValue(cid, storagecool)) >= configuration.cooldown then if getPlayerStorageValue(cid, configuration.storage) <= 0 then timeleft = (os.time() + configuration.cooldown) doPlayerSetStorageValue(cid, storagecool, timeleft) local target = getPlayerGUID(variantToNumber(var)) doPlayerSetStorageValue(cid, configuration.storage, target) doSendMagicEffect(getPlayerPosition(cid), configuration.effect1) doSendMagicEffect(getThingPos(variantToNumber(var)), configuration.effect1) addEvent(function()   if isCreature(cid) then doSendMagicEffect(getPlayerPosition(cid), configuration.effect2) doPlayerSendTextMessage(cid, 22, "Your victim is not receiving your hits anymore.") doPlayerSetStorageValue(cid, configuration.storage, 0) end  end, 100+1000*configuration.tempo) elseif getPlayerStorageValue (cid, configuration.storage) > 0 then doPlayerSendCancel(cid, "You've already set a target.") end else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(configuration.cooldown - (os.time() - getPlayerStorageValue(cid, storagecool))).." seconds.") end return true end ]]></instant> ------------------------------------------------------------------------------------ <event type="statschange" name="voodoo" event="script"><![CDATA[ function onStatsChange(cid, attacker, type, combat, value) domodlib('feitisso') if isPlayer(cid) and (not (attacker == cid)) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) and getPlayerStorageValue(cid, configuration.storage) >= 1 then local name = getPlayerNameByGUID(getPlayerStorageValue(cid, configuration.storage)) local victim = getCreatureByName(name) if isCreature(victim) and not (getTilePzInfo(getPlayerPosition(victim)))  then dano = math.ceil(value) doSendMagicEffect(getPlayerPosition(cid), configuration.effect2) if attacker == victim then doTargetCombatHealth(cid, victim, combat, -dano, -dano, configuration.effect2) else doTargetCombatHealth(attacker, victim, combat, -dano, -dano, configuration.effect2) end return false end end return true end ]]></event> ------------------------------------------------------------------------------------ </mod> aqui você edita os storages da magia e do cooldown, além do tempo que ela dura, o tempo de cooldown (um uso e outro) e os efeitos que vão sair.
    -------------------------------------------------------------------------------------------------------------
     
    aqui você edita o nome da spell, as palavras pra ela sair, level, custo de mana, se é preciso ser premium pra usar, o range dela, e as vocações que podem usá-la.

    OBS: se vc quiser que essa spell seja ganha em uma quest (por se tratar de algo bastante apelativo), é só colocar needlearn = "1" e fazer uma quest pra ganhar a spell (tem no meu Darkness Pact Quest uma quest de ganhar Spell, é só ir lá no meu perfil e procurar o tópico).

    Essa spell não serve somente pra ATS, use a criatividade pra criar uma história e fazer ela se encaixar... foque nos elementos de RPG e tcharam, está feito!.

    Façam bom uso e espero que não saiam postando em outros lugares sem os devidos créditos. Abraços do lobinho pra vcs

    PS: a foto ficou meio bosta mas vou postar mesmo assim 

     
    Eu (sorc) ataquei a zuera e tomei o dano de volta e ainda saiu esse efeitinho bonito. 

    Espero que tenham gostado e usem essa spell como base pra fazer outras coisas maravilhosas pra esse fórum   
    E não esqueça de clicar em "gostei" caso tenha curtido a idéia.

    Ahhh, e antes que eu me esqueça dos agradecimentos:
    @ViitinG por me ajudar a testar
    @CreatServer por me dar a idéia
    @MaXwEllDeN por me orientar a trocar a table pelo storage possibilitando que o script fosse possível.
  2. Gostei
    kirabig deu reputação a xWhiteWolf em (Resolvido)Spell de revidar ataque   
    spells/scripts/especiais/uchihagaeshi.lua
     
    local config = {  storage = 3482101, cooldown = 20, effect1 = 29 --- efeito que sai qnd usa a spell }  function onCastSpell(cid, var)    if getPlayerStorageValue(cid, config.storage) == 1 then doPlayerSendCancel(cid, "Your skill is already active.") return false end      if os.time() - getPlayerStorageValue(cid, 55694) >= config.cooldown then setPlayerStorageValue(cid, 55694, os.time()) doSendMagicEffect(getCreaturePosition(cid), config.effect1) setPlayerStorageValue(cid, config.storage, 1) doPlayerSendTextMessage(cid, 27, "You activated your skill, the next damage will be reflected.") else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, 55694))).." seconds.") return false end        return true end spells.xml
    <instant name="testeTK" words="naruto3" lvl="16" mana="500" prem="1" aggressive="0" exhaustion="1000" needlearn="0" event="script" value="especiais/uchihagaeshi.lua"> </instant>
    creaturescripts.xml:
    <event type="statschange" name="uchihagaeshi" event="script" value="uchihagaeshi.lua"/> creaturescripts\scripts\uchihagaeshi.lua:

     
    local config = { storage = 3482101, effect1 = 17, --- efeito que sai ao dar reflect effect2 = 29 -- efeito que aparece na pessoa que levou reflect } function onStatsChange(cid, attacker, type, combat, value) if value >= 1 and (type == STATSCHANGE_HEALTHLOSS or (getCreatureCondition(cid, CONDITION_MANASHIELD) and type == STATSCHANGE_MANALOSS)) then if getPlayerStorageValue(cid,config.storage) == 1 and isCreature(attacker) then doSendAnimatedText(getCreaturePosition(attacker),"-"..value, 215) doCreatureAddHealth(attacker, -value, true) doCreatureSay(cid,"Uchihagaeshi!", 19) doSendMagicEffect(getCreaturePosition(cid), config.effect1) doSendMagicEffect(getCreaturePosition(attacker), config.effect2) setPlayerStorageValue(cid,config.storage, 0) return false end end return true end creaturescripts\scripts\login.lua:
     
    ---------- UCHIHAGAESHI ---------------- registerCreatureEvent(cid, "uchihagaeshi") if getPlayerStorageValue(cid, 3482101) ~= 0 then         setPlayerStorageValue(cid, 3482101, 0)  end
    Se for editar storage tem que editar em todos os scripts
  3. Gostei
    kirabig deu reputação a Fir3element em CLONAR ITENS. SERVIDOR 8.6   
    Adiciona isso no login.lua (creaturescripts).

    if getCreatureName(cid) == "Account Manager" then     return false end

Informação Importante

Confirmação de Termo