Postado Abril 17, 2020 5 anos REVIVENDO EM 2020! Testei no meu 8.6, nao da erro porem nao refleti nada, pode ajudar? Desculpe reviver mais tenho um Server que estou mexendo a varios meses, testei este script e nao deu erro em nada porem tambem nao refletiu nada, pode ajudar ?
Postado Setembro 4, 2020 4 anos Em 03/08/2014 em 21:28, xWhiteWolf disse: 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 Perfeito Wolf! Tem como fazer o icone de buff aparecer? Só para o player saber se aind ata com buff ou nao
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.