Postado Março 25, 2023 2 anos fala ae galera, bom dia boa tarde e boa noite ! estou utilizando uma base cyan e estou com o seguinte problema . com o tempo eu descobri , q n é um erro no move1.lua . se trata de um erro quando vc finaliza um monstro selvagem com alguma skill que de um disable EX : thunder ( causa paralisia ) toda vez que vc finaliza um Pokémon da natureza com qualquer skill que de status, surge esse erro na distro, porque quando o pokemon morre, o código tenta lançar o status no pokemon mas ele ta morto entao surge o erro ! segue meu Status System Citar function doStun2(cid, cd, eff, check, spell) local stg = conds["Stun"] local pokemons = {"Mew", "Mewtwo", "Raikou", "Entei", "Suicune", "Sparker", "Drummy", "Bone Kabutops", "Big Porygon", "Moltres", "Articuno", "Zapdos", "Cloned Charizard", "Cloned Blastoise", "Cloned Venusaur", "Clone Blastoise", "Clone Charizard", "Clone Venusaur", "Mini Zapdos", "Mini Moltres", "Mini Articuno", "Demon", "Fire Devil", "Meta Mewtwo", "Lugia", "Giant Tentacruel", "Celebi", "Ho-Oh", "Tico Mia", "Dark Gengar",} if isInArray(pokemons, getCreatureName(cid)) then return true end if not isCreature(cid) then return true end --is creature? if not canDoMiss(cid, spell) then return true end if getPlayerStorageValue(cid, stg) >= 1 and cd ~= -1 then setPlayerStorageValue(cid, stg, cd) --allterado v1.8 return true end if not check and getPlayerStorageValue(cid, stg) >= 1 then setPlayerStorageValue(cid, stg, getPlayerStorageValue(cid, stg) + cd - 1) else setPlayerStorageValue(cid, stg, getPlayerStorageValue(cid, stg) + cd) end local a = getPlayerStorageValue(cid, stg) if isSummon(cid) and getPlayerStorageValue(cid, 212123) <= 0 then local item = getPlayerSlotItem(getCreatureMaster(cid), 😎 doItemSetAttribute(item.uid, "stun", a) doItemSetAttribute(item.uid, "stunEff", eff) doItemSetAttribute(item.uid, "stunSpell", spell) end if a <= -1 then doRemoveCondition(cid, CONDITION_PARALYZE) if not isSleeping(cid) and not isParalyze(cid) and not isFrozen(cid) then addEvent(doRegainSpeed, 50, cid) --alterado end setPlayerStorageValue(cid, stg, -1) return true end if getCreatureCondition(cid, CONDITION_PARALYZE) == false then doAddCondition(cid, paralizeArea2) end doSendMagicEffect(getThingPos(cid), eff) addEvent(doStun2, 1000, cid, -1, eff, a, spell) end já tentei de varias formar para fazer com q o " addEvent(doStun2, 1000, cid, -1, eff, a, spell) " cheque se o monstro esta vivo antes de lançar , porem falhei em todas kkk n consigo se alguém puder me ajudar a resolver esse erro chato eu vou ficar mt grato!!
Postado Abril 13, 2023 2 anos Diretor function doStun2(cid, cd, eff, check, spell) if not isCreature(cid) or isDead(cid) then return true end local stg = conds["Stun"] local pokemons = {"Mew", "Mewtwo", "Raikou", "Entei", "Suicune", "Sparker", "Drummy", "Bone Kabutops", "Big Porygon", "Moltres", "Articuno", "Zapdos", "Cloned Charizard", "Cloned Blastoise", "Cloned Venusaur", "Clone Blastoise", "Clone Charizard", "Clone Venusaur", "Mini Zapdos", "Mini Moltres", "Mini Articuno", "Demon", "Fire Devil", "Meta Mewtwo", "Lugia", "Giant Tentacruel", "Celebi", "Ho-Oh", "Tico Mia", "Dark Gengar"} if isInArray(pokemons, getCreatureName(cid)) then return true end if not canDoMiss(cid, spell) then return true end if getPlayerStorageValue(cid, stg) >= 1 and cd ~= -1 then setPlayerStorageValue(cid, stg, cd) return true end if not check and getPlayerStorageValue(cid, stg) >= 1 then setPlayerStorageValue(cid, stg, getPlayerStorageValue(cid, stg) + cd - 1) else setPlayerStorageValue(cid, stg, getPlayerStorageValue(cid, stg) + cd) end local a = getPlayerStorageValue(cid, stg) if isSummon(cid) and getPlayerStorageValue(cid, 212123) <= 0 then local item = getPlayerSlotItem(getCreatureMaster(cid), 😎 doItemSetAttribute(item.uid, "stun", a) doItemSetAttribute(item.uid, "stunEff", eff) doItemSetAttribute(item.uid, "stunSpell", spell) end if a <= -1 then doRemoveCondition(cid, CONDITION_PARALYZE) if not isSleeping(cid) and not isParalyze(cid) and not isFrozen(cid) then addEvent(doRegainSpeed, 50, cid) end setPlayerStorageValue(cid, stg, -1) return true end if getCreatureCondition(cid, CONDITION_PARALYZE) == false then doAddCondition(cid, paralizeArea2) end doSendMagicEffect(getThingPos(cid), eff) addEvent(doStun2, 1000, cid, -1, eff, a, spell) end Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código. #OpenSource #Programação #Contribuição
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.