Postado Agosto 26, 2015 9 anos Gostaria de saber se tem como editar, quantos danos ele poderá refletir? TEM COMO AJUDAR?
Postado Agosto 11, 2016 8 anos Em 03/08/2014 ás 18: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 Na disto não dá nenhum erro, uso a magia e não repele nada, hit, poder. Uso tfs 1.1 8.54, preciso muito desse script EDIT-- Funcionando perfeito @xWhiteWolf, mais como aumento a quantidade de hits refletidos? Editado Janeiro 26, 2017 8 anos por diarmaint (veja o histórico de edições)
Postado Agosto 11, 2016 8 anos troca o storage, está storage = 3482101, deixa 34821 (na spell e no creaturescript)
Postado Agosto 31, 2018 6 anos Em 03/08/2014 em 18: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 Como sempre ótimo script
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.