Postado Outubro 25, 2022 2 anos alguem poderia me ajudar com esse script de effect pf ? tenho esse script no meu servidor Mostrar conteúdo oculto local config = { pos = {x=215, y=436, z=4}, -- posição da aegis dimension tempo = 5, -- tempo pra voltar effect1 = 66, -- efeito ao morrer effect2 = 17, -- efeito ao retornar a vida storage = 19332 } function onStatsChange(cid, attacker, type, combat, value) if type == STATSCHANGE_HEALTHLOSS and value >= getCreatureHealth(cid) then if getPlayerStorageValue(cid, config.storage) > 0 then doPlayerSetStorageValue(cid, config.storage, (getPlayerStorageValue(cid, config.storage)-1)) addEvent(doTeleportThing, 1000*config.tempo, cid, getThingPos(cid), true) addEvent(doSendMagicEffect, 1000*config.tempo, getThingPos(cid), config.effect2) doSendMagicEffect(getThingPos(cid), config.effect1) doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid)) doTeleportThing(cid, config.pos) if isCreature(attacker) then doPlayerSendTextMessage(cid, 27, "You were killed by ".. getCreatureName(attacker) ..". Now it's time to get your REVENGE!") end if isPlayer(attacker) and isCreature(cid) then doPlayerSendTextMessage(attacker, 27, "You killed ".. getCreatureName(cid) .."!") end for i = 1,config.tempo do addEvent(function() if isCreature(cid) then doPlayerSendTextMessage(cid,25,"You'll be back in " .. config.tempo -i +1 .. " second(s)") end end, 1000*i) end return false end end return true end e queria que quando o cara tivesse essa storage saisse um efeito nele mas ja tentei de varias formas e com esse criatureevent tb, mas nao tem jeito de ele reconhecer essa storage OBS: o script acima funfa normal Mostrar conteúdo oculto function sendVipEffect(cid) if not isCreature(cid) or getPlayerStorageValue(cid, 19332) - os.time() <= 0 then return LUA_ERROR end doSendMagicEffect(getThingPos(cid), 66) addEvent(sendVipEffect, 200, cid) end function onLogin(cid) sendVipEffect(cid) return true end
Postado Outubro 25, 2022 2 anos Solução Em 25/10/2022 em 15:42, mullino disse: Aparte do efeito é em globalvents o efeito tem que ser colocado em creatureScripts creaturescripts = coisas que acontecem nos players globalEvents = coisas que acontecem no OT em GERAL então: data > creaturescripts > scripts > effectStorage.lua function sendVipEffect(cid) if not isCreature(cid) then return true end if getPlayerStorageValue(cid, 19332) > 0 then doSendMagicEffect(getThingPos(cid), 66) addEvent(sendVipEffect, 200, cid) end end function onLogin(cid) sendVipEffect(cid) return true end
Postado Outubro 25, 2022 2 anos Autor Em 25/10/2022 em 16:07, FeeTads disse: o efeito tem que ser colocado em creatureScripts creaturescripts = coisas que acontecem nos players globalEvents = coisas que acontecem no OT em GERAL então: data > creaturescripts > scripts > effectStorage.lua function sendVipEffect(cid) if not isCreature(cid) then return true end if getPlayerStorageValue(cid, 19332) > 0 then doSendMagicEffect(getThingPos(cid), 66) addEvent(sendVipEffect, 200, cid) end end function onLogin(cid) sendVipEffect(cid) return true end VOCE É FODA MANO!! OBRIGADO
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.