Postado Janeiro 7, 2015 10 anos Eu gostaria de basicamente duas coisas: Monstros não atacar Jogadores que tenham X Storage (Isso vale para magias de área dadas pelos monstros). Players não atacar outros Players que tenha a mesma Storage. (Isso vale para magias de área).
Postado Janeiro 7, 2015 10 anos function onCombat(cid, target) local stor = {76543, 2} -- {storage, value} if isPlayer(target) and getPlayerStorageValue(target, stor[1]) == stor[2] then return false end return true end Registre o creature event tanto em login.lua, quanto no arquivo XML do monstro. The corrupt fear us. The honest support us. The heroic join us.
Postado Janeiro 7, 2015 10 anos Solução Não testei. o Statschange voce registra no login.lua, e o target voce registra no xml do monstro. function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(cid, 12345) >= 1 then return false end end return true end function onTarget(cid, target) if isPlayer(target) and getPlayerStorageValue(target, 12345) >= 1 then return false end return true end Tony Araújo
Postado Janeiro 7, 2015 10 anos só precisa da statschange que nem o orochi disse. Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá! "Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda (obg ao @Beeny por fazer essa linda sign <3)
Postado Janeiro 7, 2015 10 anos Verdade, não entendi por que ele criou um script que evite dar target e outro que evite levar dano... Edit : mas esse statschange não vai se aplicar a todos os monstros não ? já que é pra registrar no login... Está certo ? : function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and type == STATSCHANGE_HEALTHLOSS and getMonsterInfo(name) == BLABLABLA then if getPlayerStorageValue(cid, 12345) >= 1 then return false end end return true end Editado Janeiro 8, 2015 10 anos por Caronte (veja o histórico de edições) Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado). Tópicos: [FAQ] BBCODE [LIB] Constant [RME] Administrando bordas. [TALK] Broadcast Editável. [TALK] Sugest. [TALK] Checkpoint. [MOVE] Pântano pegajoso. [ACTION] Piggy Bank. (Cassino). [GLOBAL] Uptime Ad. [C0DE] Consertando 'Invalid Password' [PROGRAM] Quest Maker
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.