Postado Novembro 22, 2024 1 ano function onStatsChange(cid, attacker, type, combat, value) -- This should block all damage monster cause on eachother expect player summons if isMonster(cid) and isMonster(attacker) then local master = getCreatureMaster(cid) if not master or not isPlayer(master) then return false end end return true end
Postado Novembro 22, 2024 1 ano function onStatsChange(cid, attacker, type, combat, value) if isMonster(cid) and isMonster(attacker) then local master = getCreatureMaster(cid) if not master or not isPlayer(master) then return false end end return true end <event type="statschange" name="BlockMonsterDamage" script="seu_script.lua"/> registerCreatureEvent(cid, "BlockMonsterDamage") 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
Postado Novembro 22, 2024 1 ano Autor 31 minutos atrás, L3K0T disse: function onStatsChange(cid, attacker, type, combat, value) if isMonster(cid) and isMonster(attacker) then local master = getCreatureMaster(cid) if not master or not isPlayer(master) then return false end end return true end <event type="statschange" name="BlockMonsterDamage" script="seu_script.lua"/> registerCreatureEvent(cid, "BlockMonsterDamage") funcionou mas as criaturas continuam se atacando, se você tivesse um script que os monstros não se ataquem pra usar , pq ja coloquei algum e não funcionaram.
Postado Novembro 22, 2024 1 ano function onStatsChange(cid, attacker, type, combat, value) if isMonster(cid) and isMonster(attacker) then local master = getCreatureMaster(attacker) if not master or not isPlayer(master) then return false -- Bloqueia o dano end end return true end on combat function onCombat(cid, target) if isMonster(cid) and isMonster(target) then local master = getCreatureMaster(cid) if not master or not isPlayer(master) then return false -- Bloqueia o ataque end end return true end <event type="combat" name="BlockMonsterCombat" script="block_monster_combat.lua"/> 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
Postado Novembro 23, 2024 1 ano Autor 2 horas atrás, L3K0T disse: function onStatsChange(cid, attacker, type, combat, value) if isMonster(cid) and isMonster(attacker) then local master = getCreatureMaster(attacker) if not master or not isPlayer(master) then return false -- Bloqueia o dano end end return true end on combat function onCombat(cid, target) if isMonster(cid) and isMonster(target) then local master = getCreatureMaster(cid) if not master or not isPlayer(master) then return false -- Bloqueia o ataque end end return true end <event type="combat" name="BlockMonsterCombat" script="block_monster_combat.lua"/> fiz tudo certo e não funcionou , não deu nenhum erro no distrito https://freeimage.host/i/2YBff1t . achei esse aqui https://otland.net/threads/monsters-attack-each-other.246769/post-2446563 ta pra outro tfs. não funcionou no meu
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.