Postado Maio 15, 2014 11 anos Salve galera, Eu tenho um sistema de skull pro ot de war, que dá 1 skull pros players de acordo com os frags. Só que ele tem alguns probleminhas, que são: black skull não ataca, e black skull leva mais dano (eu quero tirar isso, pra black ser = outra skull qualquer). E as skulls (branca, verde e amarela) saem depois de alguns minutos (eu quero que elas fiquem eternamente no player, baseado em seus frags).Preciso implementar o script no OT da seguinte forma: 1. O player que pegar black skull poder atacar qualquer 1 e não levar mais dano por estar black; 2. Começar com skull white, depois yellow, depois green, depois red e depois black; 3. As skulls não sairem depois de alguns minutos. Aqui está o MOD .xml : <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Skull System" version="1.0" author="Skyforever" contact="tibiaking.com" enabled="yes"> <config name="SkullC_func"><![CDATA[ function setSkullColor(cid) local t = { [{5,25}] = 1, [{26,50}] = 2, [{51,75}] = 3, [{76,9999}] = 4, [{10000,math.huge}] = 5 } for var, ret in pairs(t) do if getPlayerFrags(cid) >= var[1] and getPlayerFrags(cid) <= var[2] then doCreatureSetSkullType(cid, ret) end end end function getPlayerFrags(cid) local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = {date = result:getDataInt("date")} if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = {day = table.maxn(contents.day),week = table.maxn(contents.week),month = table.maxn(contents.month)} return size.day + size.week + size.month end ]]></config> <event type="login" name="SkullLogin" event="script"><![CDATA[ domodlib('SkullC_func') function onLogin(cid) registerCreatureEvent(cid, "ColorKill") setSkullColor(cid) return true end]]></event> <event type="kill" name="ColorKill" event="script"><![CDATA[ domodlib('SkullC_func') function onKill(cid, target) if isPlayer(cid) and isPlayer(target) then doCreatureSetSkullType(target, 0) addEvent(setSkullColor, 1, cid) end return true end]]></event> </mod> REP+++ Desde já agradeço amigos. Editado Maio 15, 2014 11 anos por yagoskor (veja o histórico de edições)
Postado Maio 15, 2014 11 anos as restrições de red e black são pela source se não me engano, não adianta mudar esse mod aí. 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 Maio 15, 2014 11 anos Autor Lol mas tem ot de war que usa esse sistema... Mais alguém please??
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.