Postado Agosto 2, 2015 9 anos Solução Tags: <event type="logout" name="skullLogin" event="script" value="nome_do_arquivo.lua"/> <event type="statschange" name="skullStatsChange" event="script" value="nome_do_arquivo.lua"/> <event type="target" name="skullTarget" event="script" value="nome_do_arquivo.lua"/> Código (data/creaturescripts/scripts): local monsterName = "nome_do_monstro" function onStatsChange(cid, attacker, type, combat, value) if isPlayer(attacker) and getCreatureSkullType(attacker) ~= SKULL_WHITE and isMonster(cid) and getCreatureName(cid) == monsterName and type == STATSCHANGE_HEALTHLOSS then doCreatureSetSkullType(attacker, SKULL_WHITE) end return true end function onTarget(cid, target) if isPlayer(cid) and getCreatureSkullType(cid) ~= SKULL_WHITE and isMonster(target) and getCreatureName(target) == monsterName then doCreatureSetSkullType(cid, SKULL_WHITE) end return true end function onLogin(cid) registerCreatureEvent(cid, "skullStatsChange") registerCreatureEvent(cid, "skullTarget") return true end Editado Agosto 2, 2015 9 anos por zipter98 (veja o histórico de edições) não respondo pms solicitando suporte em programação/scripting
Postado Agosto 3, 2015 9 anos Autor Tags: <event type="logout" name="skullLogin" event="script" value="nome_do_arquivo.lua"/> <event type="statschange" name="skullStatsChange" event="script" value="nome_do_arquivo.lua"/> <event type="target" name="skullTarget" event="script" value="nome_do_arquivo.lua"/> Código (data/creaturescripts/scripts): local monsterName = "nome_do_monstro" function onStatsChange(cid, attacker, type, combat, value) if isPlayer(attacker) and getCreatureSkullType(attacker) ~= SKULL_WHITE and isMonster(cid) and getCreatureName(cid) == monsterName and type == STATSCHANGE_HEALTHLOSS then doCreatureSetSkullType(attacker, SKULL_WHITE) end return true end function onTarget(cid, target) if isPlayer(cid) and getCreatureSkullType(cid) ~= SKULL_WHITE and isMonster(target) and getCreatureName(target) == monsterName then doCreatureSetSkullType(cid, SKULL_WHITE) end return true end function onLogin(cid) registerCreatureEvent(cid, "skullStatsChange") registerCreatureEvent(cid, "skullTarget") return true end mt 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.