Ir para conteúdo

Lyon

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    Lyon recebeu reputação de marcosb em (Resolvido)War System (Do Matheus) - Erro Distro 0.4   
    Tente trocar por este:
    function onSay(cid, words, param, channel) local guild = getPlayerGuildId(cid) if(not guild or getPlayerGuildLevel(cid) < GUILDLEVEL_LEADER) then doPlayerSendChannelMessage(cid, "", "You cannot execute this talkaction.", TALKTYPE_CHANNEL_W, 0) return true end local t = string.explode(param, ",") if(not t[2]) then doPlayerSendChannelMessage(cid, "", "Not enough param(s).", TALKTYPE_CHANNEL_W, 0) return true end local enemy = getGuildId(t[2]) if(not enemy) then doPlayerSendChannelMessage(cid, "", "Guild \"" .. t[2] .. "\" does not exists.", TALKTYPE_CHANNEL_W, 0) return true end if(enemy == guild) then doPlayerSendChannelMessage(cid, "", "You cannot perform war action on your own guild.", TALKTYPE_CHANNEL_W, 0) return true end local enemyName, tmp = "", db.getResult("SELECT `name` FROM `guilds` WHERE `id` = " .. enemy) if(tmp:getID() ~= -1) then enemyName = tmp:getDataString("name") tmp:free() end if(isInArray({"accept", "reject", "cancel"}, t[1])) then local query = "`guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild if(t[1] == "cancel") then query = "`guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy end tmp = db.getResult("SELECT `id`, `begin`, `end`, `payment` FROM `guild_wars` WHERE " .. query .. " AND `status` = 0") if(tmp:getID() == -1) then doPlayerSendChannelMessage(cid, "", "Currently there's no pending invitation for a war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end if(t[1] == "accept") then local _tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = _tmp:getID() < 0 or _tmp:getDataInt("balance") < tmp:getDataInt("payment") _tmp:free() if(state) then doPlayerSendChannelMessage(cid, "", "Your guild balance is too low to accept this invitation.", TALKTYPE_CHANNEL_W, 0) return true end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. tmp:getDataInt("payment") .. " WHERE `id` = " .. guild) end query = "UPDATE `guild_wars` SET " local msg = "accepted " .. enemyName .. " invitation to war." if(t[1] == "reject") then query = query .. "`end` = " .. os.time() .. ", `status` = 2" msg = "rejected " .. enemyName .. " invitation to war." elseif(t[1] == "cancel") then query = query .. "`end` = " .. os.time() .. ", `status` = 3" msg = "canceled invitation to a war with " .. enemyName .. "." else query = query .. "`begin` = " .. os.time() .. ", `end` = " .. (tmp:getDataInt("end") > 0 and (os.time() + ((tmp:getDataInt("begin") - tmp:getDataInt("end")) / 86400)) or 0) .. ", `status` = 1" end query = query .. " WHERE `id` = " .. tmp:getDataInt("id") if(t[1] == "accept") then doGuildAddEnemy(guild, enemy, tmp:getDataInt("id"), WAR_GUILD) doGuildAddEnemy(enemy, guild, tmp:getDataInt("id"), WAR_ENEMY) end tmp:free() db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. msg, MESSAGE_EVENT_ADVANCE) return true end if(t[1] == "invite") then local str = "" tmp = db.getResult("SELECT `guild_id`, `status` FROM `guild_wars` WHERE `guild_id` IN (" .. guild .. "," .. enemy .. ") AND `enemy_id` IN (" .. enemy .. "," .. guild .. ") AND `status` IN (0, 1)") if(tmp:getID() ~= -1) then if(tmp:getDataInt("status") == 0) then if(tmp:getDataInt("guild_id") == guild) then str = "You have already invited " .. enemyName .. " to war." else str = enemyName .. " have already invited you to war." end else str = "You are already on a war with " .. enemyName .. "." end tmp:free() end if(str ~= "") then doPlayerSendChannelMessage(cid, "", str, TALKTYPE_CHANNEL_W, 0) return true end local frags = tonumber(t[3]) if(frags ~= nil) then frags = math.max(10, math.min(1000, frags)) else frags = 100 end local payment = tonumber(t[4]) if(payment ~= nil) then payment = math.max(100000, math.min(1000000000, payment)) tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = tmp:getID() < 0 or tmp:getDataInt("balance") < payment tmp:free() if(state) then doPlayerSendChannelMessage(cid, "", "Your guild balance is too low for such payment.", TALKTYPE_CHANNEL_W, 0) return true end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. payment .. " WHERE `id` = " .. guild) else payment = 0 end local begining, ending = os.time(), tonumber(t[5]) if(ending ~= nil and ending ~= 0) then ending = begining + (ending * 86400) else ending = 0 end db.query("INSERT INTO `guild_wars` (`guild_id`, `enemy_id`, `begin`, `end`, `frags`, `payment`) VALUES (" .. guild .. ", " .. enemy .. ", " .. begining .. ", " .. ending .. ", " .. frags .. ", " .. payment .. ");") doBroadcastMessage(getPlayerGuildName(cid) .. " has invited " .. enemyName .. " to war till " .. frags .. " frags.", MESSAGE_EVENT_ADVANCE) return true end if(not isInArray({"end", "finish"}, t[1])) then return false end local status = (t[1] == "end" and 1 or 4) tmp = db.getResult("SELECT `id` FROM `guild_wars` WHERE `guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy .. " AND `status` = " .. status) if(tmp:getID() ~= -1) then local query = "UPDATE `guild_wars` SET `end` = " .. os.time() .. ", `status` = 5 WHERE `id` = " .. tmp:getDataInt("id") tmp:free() doGuildRemoveEnemy(guild, enemy) doGuildRemoveEnemy(enemy, guild) db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. (status == 4 and "mend fences" or "ended up a war") .. " with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return true end if(status == 4) then doPlayerSendChannelMessage(cid, "", "Currently there's no pending war truce from " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end tmp = db.getResult("SELECT `id`, `end` FROM `guild_wars` WHERE `guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild .. " AND `status` = 1") if(tmp:getID() ~= -1) then if(tmp:getDataInt("end") > 0) then tmp:free() doPlayerSendChannelMessage(cid, "", "You cannot request ending for war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end local query = "UPDATE `guild_wars` SET `status` = 4, `end` = " .. os.time() .. " WHERE `id` = " .. tmp:getDataInt("id") tmp:free() db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has signed an armstice declaration on a war with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return true end doPlayerSendChannelMessage(cid, "", "Currently there's no active war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end
  2. Gostei
    Lyon recebeu reputação de Leandro6434 em (Resolvido)War System (Do Matheus) - Erro Distro 0.4   
    Apenas passei a minha talk,não sei oque tem de errado ,tbm,kkk
     
    Fico feliz que tenha lhe ajudado,marque o tópico como resolvido,abraços e sucesso!
  3. Gostei
    Lyon recebeu reputação de Leandro6434 em (Resolvido)War System (Do Matheus) - Erro Distro 0.4   
    Tente trocar por este:
    function onSay(cid, words, param, channel) local guild = getPlayerGuildId(cid) if(not guild or getPlayerGuildLevel(cid) < GUILDLEVEL_LEADER) then doPlayerSendChannelMessage(cid, "", "You cannot execute this talkaction.", TALKTYPE_CHANNEL_W, 0) return true end local t = string.explode(param, ",") if(not t[2]) then doPlayerSendChannelMessage(cid, "", "Not enough param(s).", TALKTYPE_CHANNEL_W, 0) return true end local enemy = getGuildId(t[2]) if(not enemy) then doPlayerSendChannelMessage(cid, "", "Guild \"" .. t[2] .. "\" does not exists.", TALKTYPE_CHANNEL_W, 0) return true end if(enemy == guild) then doPlayerSendChannelMessage(cid, "", "You cannot perform war action on your own guild.", TALKTYPE_CHANNEL_W, 0) return true end local enemyName, tmp = "", db.getResult("SELECT `name` FROM `guilds` WHERE `id` = " .. enemy) if(tmp:getID() ~= -1) then enemyName = tmp:getDataString("name") tmp:free() end if(isInArray({"accept", "reject", "cancel"}, t[1])) then local query = "`guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild if(t[1] == "cancel") then query = "`guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy end tmp = db.getResult("SELECT `id`, `begin`, `end`, `payment` FROM `guild_wars` WHERE " .. query .. " AND `status` = 0") if(tmp:getID() == -1) then doPlayerSendChannelMessage(cid, "", "Currently there's no pending invitation for a war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end if(t[1] == "accept") then local _tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = _tmp:getID() < 0 or _tmp:getDataInt("balance") < tmp:getDataInt("payment") _tmp:free() if(state) then doPlayerSendChannelMessage(cid, "", "Your guild balance is too low to accept this invitation.", TALKTYPE_CHANNEL_W, 0) return true end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. tmp:getDataInt("payment") .. " WHERE `id` = " .. guild) end query = "UPDATE `guild_wars` SET " local msg = "accepted " .. enemyName .. " invitation to war." if(t[1] == "reject") then query = query .. "`end` = " .. os.time() .. ", `status` = 2" msg = "rejected " .. enemyName .. " invitation to war." elseif(t[1] == "cancel") then query = query .. "`end` = " .. os.time() .. ", `status` = 3" msg = "canceled invitation to a war with " .. enemyName .. "." else query = query .. "`begin` = " .. os.time() .. ", `end` = " .. (tmp:getDataInt("end") > 0 and (os.time() + ((tmp:getDataInt("begin") - tmp:getDataInt("end")) / 86400)) or 0) .. ", `status` = 1" end query = query .. " WHERE `id` = " .. tmp:getDataInt("id") if(t[1] == "accept") then doGuildAddEnemy(guild, enemy, tmp:getDataInt("id"), WAR_GUILD) doGuildAddEnemy(enemy, guild, tmp:getDataInt("id"), WAR_ENEMY) end tmp:free() db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. msg, MESSAGE_EVENT_ADVANCE) return true end if(t[1] == "invite") then local str = "" tmp = db.getResult("SELECT `guild_id`, `status` FROM `guild_wars` WHERE `guild_id` IN (" .. guild .. "," .. enemy .. ") AND `enemy_id` IN (" .. enemy .. "," .. guild .. ") AND `status` IN (0, 1)") if(tmp:getID() ~= -1) then if(tmp:getDataInt("status") == 0) then if(tmp:getDataInt("guild_id") == guild) then str = "You have already invited " .. enemyName .. " to war." else str = enemyName .. " have already invited you to war." end else str = "You are already on a war with " .. enemyName .. "." end tmp:free() end if(str ~= "") then doPlayerSendChannelMessage(cid, "", str, TALKTYPE_CHANNEL_W, 0) return true end local frags = tonumber(t[3]) if(frags ~= nil) then frags = math.max(10, math.min(1000, frags)) else frags = 100 end local payment = tonumber(t[4]) if(payment ~= nil) then payment = math.max(100000, math.min(1000000000, payment)) tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = tmp:getID() < 0 or tmp:getDataInt("balance") < payment tmp:free() if(state) then doPlayerSendChannelMessage(cid, "", "Your guild balance is too low for such payment.", TALKTYPE_CHANNEL_W, 0) return true end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. payment .. " WHERE `id` = " .. guild) else payment = 0 end local begining, ending = os.time(), tonumber(t[5]) if(ending ~= nil and ending ~= 0) then ending = begining + (ending * 86400) else ending = 0 end db.query("INSERT INTO `guild_wars` (`guild_id`, `enemy_id`, `begin`, `end`, `frags`, `payment`) VALUES (" .. guild .. ", " .. enemy .. ", " .. begining .. ", " .. ending .. ", " .. frags .. ", " .. payment .. ");") doBroadcastMessage(getPlayerGuildName(cid) .. " has invited " .. enemyName .. " to war till " .. frags .. " frags.", MESSAGE_EVENT_ADVANCE) return true end if(not isInArray({"end", "finish"}, t[1])) then return false end local status = (t[1] == "end" and 1 or 4) tmp = db.getResult("SELECT `id` FROM `guild_wars` WHERE `guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy .. " AND `status` = " .. status) if(tmp:getID() ~= -1) then local query = "UPDATE `guild_wars` SET `end` = " .. os.time() .. ", `status` = 5 WHERE `id` = " .. tmp:getDataInt("id") tmp:free() doGuildRemoveEnemy(guild, enemy) doGuildRemoveEnemy(enemy, guild) db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. (status == 4 and "mend fences" or "ended up a war") .. " with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return true end if(status == 4) then doPlayerSendChannelMessage(cid, "", "Currently there's no pending war truce from " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end tmp = db.getResult("SELECT `id`, `end` FROM `guild_wars` WHERE `guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild .. " AND `status` = 1") if(tmp:getID() ~= -1) then if(tmp:getDataInt("end") > 0) then tmp:free() doPlayerSendChannelMessage(cid, "", "You cannot request ending for war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end local query = "UPDATE `guild_wars` SET `status` = 4, `end` = " .. os.time() .. " WHERE `id` = " .. tmp:getDataInt("id") tmp:free() db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has signed an armstice declaration on a war with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return true end doPlayerSendChannelMessage(cid, "", "Currently there's no active war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end
  4. Gostei
    Lyon recebeu reputação de Rafals em (Resolvido)War System (Do Matheus) - Erro Distro 0.4   
    Tente trocar por este:
    function onSay(cid, words, param, channel) local guild = getPlayerGuildId(cid) if(not guild or getPlayerGuildLevel(cid) < GUILDLEVEL_LEADER) then doPlayerSendChannelMessage(cid, "", "You cannot execute this talkaction.", TALKTYPE_CHANNEL_W, 0) return true end local t = string.explode(param, ",") if(not t[2]) then doPlayerSendChannelMessage(cid, "", "Not enough param(s).", TALKTYPE_CHANNEL_W, 0) return true end local enemy = getGuildId(t[2]) if(not enemy) then doPlayerSendChannelMessage(cid, "", "Guild \"" .. t[2] .. "\" does not exists.", TALKTYPE_CHANNEL_W, 0) return true end if(enemy == guild) then doPlayerSendChannelMessage(cid, "", "You cannot perform war action on your own guild.", TALKTYPE_CHANNEL_W, 0) return true end local enemyName, tmp = "", db.getResult("SELECT `name` FROM `guilds` WHERE `id` = " .. enemy) if(tmp:getID() ~= -1) then enemyName = tmp:getDataString("name") tmp:free() end if(isInArray({"accept", "reject", "cancel"}, t[1])) then local query = "`guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild if(t[1] == "cancel") then query = "`guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy end tmp = db.getResult("SELECT `id`, `begin`, `end`, `payment` FROM `guild_wars` WHERE " .. query .. " AND `status` = 0") if(tmp:getID() == -1) then doPlayerSendChannelMessage(cid, "", "Currently there's no pending invitation for a war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end if(t[1] == "accept") then local _tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = _tmp:getID() < 0 or _tmp:getDataInt("balance") < tmp:getDataInt("payment") _tmp:free() if(state) then doPlayerSendChannelMessage(cid, "", "Your guild balance is too low to accept this invitation.", TALKTYPE_CHANNEL_W, 0) return true end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. tmp:getDataInt("payment") .. " WHERE `id` = " .. guild) end query = "UPDATE `guild_wars` SET " local msg = "accepted " .. enemyName .. " invitation to war." if(t[1] == "reject") then query = query .. "`end` = " .. os.time() .. ", `status` = 2" msg = "rejected " .. enemyName .. " invitation to war." elseif(t[1] == "cancel") then query = query .. "`end` = " .. os.time() .. ", `status` = 3" msg = "canceled invitation to a war with " .. enemyName .. "." else query = query .. "`begin` = " .. os.time() .. ", `end` = " .. (tmp:getDataInt("end") > 0 and (os.time() + ((tmp:getDataInt("begin") - tmp:getDataInt("end")) / 86400)) or 0) .. ", `status` = 1" end query = query .. " WHERE `id` = " .. tmp:getDataInt("id") if(t[1] == "accept") then doGuildAddEnemy(guild, enemy, tmp:getDataInt("id"), WAR_GUILD) doGuildAddEnemy(enemy, guild, tmp:getDataInt("id"), WAR_ENEMY) end tmp:free() db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. msg, MESSAGE_EVENT_ADVANCE) return true end if(t[1] == "invite") then local str = "" tmp = db.getResult("SELECT `guild_id`, `status` FROM `guild_wars` WHERE `guild_id` IN (" .. guild .. "," .. enemy .. ") AND `enemy_id` IN (" .. enemy .. "," .. guild .. ") AND `status` IN (0, 1)") if(tmp:getID() ~= -1) then if(tmp:getDataInt("status") == 0) then if(tmp:getDataInt("guild_id") == guild) then str = "You have already invited " .. enemyName .. " to war." else str = enemyName .. " have already invited you to war." end else str = "You are already on a war with " .. enemyName .. "." end tmp:free() end if(str ~= "") then doPlayerSendChannelMessage(cid, "", str, TALKTYPE_CHANNEL_W, 0) return true end local frags = tonumber(t[3]) if(frags ~= nil) then frags = math.max(10, math.min(1000, frags)) else frags = 100 end local payment = tonumber(t[4]) if(payment ~= nil) then payment = math.max(100000, math.min(1000000000, payment)) tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = tmp:getID() < 0 or tmp:getDataInt("balance") < payment tmp:free() if(state) then doPlayerSendChannelMessage(cid, "", "Your guild balance is too low for such payment.", TALKTYPE_CHANNEL_W, 0) return true end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. payment .. " WHERE `id` = " .. guild) else payment = 0 end local begining, ending = os.time(), tonumber(t[5]) if(ending ~= nil and ending ~= 0) then ending = begining + (ending * 86400) else ending = 0 end db.query("INSERT INTO `guild_wars` (`guild_id`, `enemy_id`, `begin`, `end`, `frags`, `payment`) VALUES (" .. guild .. ", " .. enemy .. ", " .. begining .. ", " .. ending .. ", " .. frags .. ", " .. payment .. ");") doBroadcastMessage(getPlayerGuildName(cid) .. " has invited " .. enemyName .. " to war till " .. frags .. " frags.", MESSAGE_EVENT_ADVANCE) return true end if(not isInArray({"end", "finish"}, t[1])) then return false end local status = (t[1] == "end" and 1 or 4) tmp = db.getResult("SELECT `id` FROM `guild_wars` WHERE `guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy .. " AND `status` = " .. status) if(tmp:getID() ~= -1) then local query = "UPDATE `guild_wars` SET `end` = " .. os.time() .. ", `status` = 5 WHERE `id` = " .. tmp:getDataInt("id") tmp:free() doGuildRemoveEnemy(guild, enemy) doGuildRemoveEnemy(enemy, guild) db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. (status == 4 and "mend fences" or "ended up a war") .. " with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return true end if(status == 4) then doPlayerSendChannelMessage(cid, "", "Currently there's no pending war truce from " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end tmp = db.getResult("SELECT `id`, `end` FROM `guild_wars` WHERE `guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild .. " AND `status` = 1") if(tmp:getID() ~= -1) then if(tmp:getDataInt("end") > 0) then tmp:free() doPlayerSendChannelMessage(cid, "", "You cannot request ending for war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end local query = "UPDATE `guild_wars` SET `status` = 4, `end` = " .. os.time() .. " WHERE `id` = " .. tmp:getDataInt("id") tmp:free() db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has signed an armstice declaration on a war with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return true end doPlayerSendChannelMessage(cid, "", "Currently there's no active war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end
  5. Gostei
    Lyon recebeu reputação de Digoshow em (8.6x) TFS 0.4_DEV rev3884   
    Sou o author do upload original do arquivo,upei tanto a sources como o EXE no media fire a pedidos do pessoal.
    alguém atualize!
     
    Sources:
    http://www.mediafire.com/download/9eda9web874tx5q/trunk.r3884.rar
     
     
    EXE:
    http://www.mediafire.com/download/930bqvw3a4ryq54/TFS_3884_compilado.rar
     
    Não postei scan,do jeito que era o antigo download eu postei ele novamente,pelo motivo do outro link ser de minha autoria,fiquem a vontade para baixarem.
     
    Em questão de compilar para linux não sei dizer,eu utilizo o DEV-CPP  para compilar essa REV sem problemas no Windons.
    Quem utiliza Linux recomendo baixar a 3777 que é a mais estavel para o linux!
  6. Gostei
    Lyon recebeu reputação de Requiao em (Resolvido)War System (Do Matheus) - Erro Distro 0.4   
    Tente trocar por este:
    function onSay(cid, words, param, channel) local guild = getPlayerGuildId(cid) if(not guild or getPlayerGuildLevel(cid) < GUILDLEVEL_LEADER) then doPlayerSendChannelMessage(cid, "", "You cannot execute this talkaction.", TALKTYPE_CHANNEL_W, 0) return true end local t = string.explode(param, ",") if(not t[2]) then doPlayerSendChannelMessage(cid, "", "Not enough param(s).", TALKTYPE_CHANNEL_W, 0) return true end local enemy = getGuildId(t[2]) if(not enemy) then doPlayerSendChannelMessage(cid, "", "Guild \"" .. t[2] .. "\" does not exists.", TALKTYPE_CHANNEL_W, 0) return true end if(enemy == guild) then doPlayerSendChannelMessage(cid, "", "You cannot perform war action on your own guild.", TALKTYPE_CHANNEL_W, 0) return true end local enemyName, tmp = "", db.getResult("SELECT `name` FROM `guilds` WHERE `id` = " .. enemy) if(tmp:getID() ~= -1) then enemyName = tmp:getDataString("name") tmp:free() end if(isInArray({"accept", "reject", "cancel"}, t[1])) then local query = "`guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild if(t[1] == "cancel") then query = "`guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy end tmp = db.getResult("SELECT `id`, `begin`, `end`, `payment` FROM `guild_wars` WHERE " .. query .. " AND `status` = 0") if(tmp:getID() == -1) then doPlayerSendChannelMessage(cid, "", "Currently there's no pending invitation for a war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end if(t[1] == "accept") then local _tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = _tmp:getID() < 0 or _tmp:getDataInt("balance") < tmp:getDataInt("payment") _tmp:free() if(state) then doPlayerSendChannelMessage(cid, "", "Your guild balance is too low to accept this invitation.", TALKTYPE_CHANNEL_W, 0) return true end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. tmp:getDataInt("payment") .. " WHERE `id` = " .. guild) end query = "UPDATE `guild_wars` SET " local msg = "accepted " .. enemyName .. " invitation to war." if(t[1] == "reject") then query = query .. "`end` = " .. os.time() .. ", `status` = 2" msg = "rejected " .. enemyName .. " invitation to war." elseif(t[1] == "cancel") then query = query .. "`end` = " .. os.time() .. ", `status` = 3" msg = "canceled invitation to a war with " .. enemyName .. "." else query = query .. "`begin` = " .. os.time() .. ", `end` = " .. (tmp:getDataInt("end") > 0 and (os.time() + ((tmp:getDataInt("begin") - tmp:getDataInt("end")) / 86400)) or 0) .. ", `status` = 1" end query = query .. " WHERE `id` = " .. tmp:getDataInt("id") if(t[1] == "accept") then doGuildAddEnemy(guild, enemy, tmp:getDataInt("id"), WAR_GUILD) doGuildAddEnemy(enemy, guild, tmp:getDataInt("id"), WAR_ENEMY) end tmp:free() db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. msg, MESSAGE_EVENT_ADVANCE) return true end if(t[1] == "invite") then local str = "" tmp = db.getResult("SELECT `guild_id`, `status` FROM `guild_wars` WHERE `guild_id` IN (" .. guild .. "," .. enemy .. ") AND `enemy_id` IN (" .. enemy .. "," .. guild .. ") AND `status` IN (0, 1)") if(tmp:getID() ~= -1) then if(tmp:getDataInt("status") == 0) then if(tmp:getDataInt("guild_id") == guild) then str = "You have already invited " .. enemyName .. " to war." else str = enemyName .. " have already invited you to war." end else str = "You are already on a war with " .. enemyName .. "." end tmp:free() end if(str ~= "") then doPlayerSendChannelMessage(cid, "", str, TALKTYPE_CHANNEL_W, 0) return true end local frags = tonumber(t[3]) if(frags ~= nil) then frags = math.max(10, math.min(1000, frags)) else frags = 100 end local payment = tonumber(t[4]) if(payment ~= nil) then payment = math.max(100000, math.min(1000000000, payment)) tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = tmp:getID() < 0 or tmp:getDataInt("balance") < payment tmp:free() if(state) then doPlayerSendChannelMessage(cid, "", "Your guild balance is too low for such payment.", TALKTYPE_CHANNEL_W, 0) return true end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. payment .. " WHERE `id` = " .. guild) else payment = 0 end local begining, ending = os.time(), tonumber(t[5]) if(ending ~= nil and ending ~= 0) then ending = begining + (ending * 86400) else ending = 0 end db.query("INSERT INTO `guild_wars` (`guild_id`, `enemy_id`, `begin`, `end`, `frags`, `payment`) VALUES (" .. guild .. ", " .. enemy .. ", " .. begining .. ", " .. ending .. ", " .. frags .. ", " .. payment .. ");") doBroadcastMessage(getPlayerGuildName(cid) .. " has invited " .. enemyName .. " to war till " .. frags .. " frags.", MESSAGE_EVENT_ADVANCE) return true end if(not isInArray({"end", "finish"}, t[1])) then return false end local status = (t[1] == "end" and 1 or 4) tmp = db.getResult("SELECT `id` FROM `guild_wars` WHERE `guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy .. " AND `status` = " .. status) if(tmp:getID() ~= -1) then local query = "UPDATE `guild_wars` SET `end` = " .. os.time() .. ", `status` = 5 WHERE `id` = " .. tmp:getDataInt("id") tmp:free() doGuildRemoveEnemy(guild, enemy) doGuildRemoveEnemy(enemy, guild) db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. (status == 4 and "mend fences" or "ended up a war") .. " with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return true end if(status == 4) then doPlayerSendChannelMessage(cid, "", "Currently there's no pending war truce from " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end tmp = db.getResult("SELECT `id`, `end` FROM `guild_wars` WHERE `guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild .. " AND `status` = 1") if(tmp:getID() ~= -1) then if(tmp:getDataInt("end") > 0) then tmp:free() doPlayerSendChannelMessage(cid, "", "You cannot request ending for war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end local query = "UPDATE `guild_wars` SET `status` = 4, `end` = " .. os.time() .. " WHERE `id` = " .. tmp:getDataInt("id") tmp:free() db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has signed an armstice declaration on a war with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return true end doPlayerSendChannelMessage(cid, "", "Currently there's no active war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end
  7. Gostei
    Lyon recebeu reputação de dezon em Shop Admin Gesior 2012 (TFS 0.3.6 ~ 0.4, 1.0)   
    Muito bom,parabéns cara,ajuda bastante!
  8. Gostei
    Lyon recebeu reputação de Kelyx em Sera que BBOT é mesmo seguro?   
    Uso bbot desde 2011,meu kina ta vivo até hoje.
  9. Gostei
    Lyon recebeu reputação de BielZet em (Resolvido)[Ajudem] Sistema de Vocation Supreme   
    Mas para trocar as vocaçoes nao seria apenas editar aqui:
    function exc(cid, sorteio) local pos = getThingPos(cid) local cores = { [5] = 35, [6] = 66, [7] = 210, [8] = 180, [x] = x, [x] = x, [x] = x, [x] = x, } Nos x entre os colchetes coloca as ID das voc e no X antes da virgula coloca os numeros referente a cor da tabela que o lobo passou.
  10. Gostei
    Lyon recebeu reputação de Danihcv em [TUTORIAL] Resolvendo qualquer erro na data base   
    tenta isso:
    ALTER TABLE `players` ADD `castViewers` INT( 11 ) NOT NULL DEFAULT '0';
  11. Gostei
    Lyon deu reputação a lucasvv em Otclient não salva mapa e hotkeys   
    vai em executar digita %userprofile% e da enter ... vai ter uma pasta com o nome otclient, apaga ela com o cliente fechado e depois abre ele e ve se deu certo
  12. Gostei
    Lyon deu reputação a Caronte em (Resolvido)Spell com Item   
    local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local condition = createConditionObject(CONDITION_HASTE) setConditionParam(condition, CONDITION_PARAM_TICKS, 22000) setConditionFormula(condition, 0.7, -56, 0.7, -56) setCombatCondition(combat, condition) function onCastSpell(cid, var) local itemid = 2160 local itemcount = 1 if getPlayerItemCount(cid, itemid) < itemcount then doPlayerSendCancel(cid, "You need ".. itemcount .." " .. getItemNameById(itemid) .." to use this spell.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) else return doCombat(cid, combat, var) end return true end Esse irá funcionar caso ele tenha mais ou uma crystal coin (2160), altere para o item de sua preferência...

    essa spell é utani gran hur..., caso queira isso em outra spell, copie isso:
    function onCastSpell(cid, var) local itemid = 2160 local itemcount = 1 if getPlayerItemCount(cid, itemid) < itemcount then doPlayerSendCancel(cid, "You need ".. itemcount .." " .. getItemNameById(itemid) .." to use this spell.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) else return doCombat(cid, combat, var) end return true end E cole em cima de:
    function onCastSpell(cid, var) return doCombat(cid, combat, var) end nas spells...
  13. Gostei
    Lyon deu reputação a nociam em (Resolvido)Como compilar OTclient com suporte do DX9?   
    na parte do cmake aonde tem a opçao   DOPENGLES    on ou off nao lembro se coloca la 2.0 so isso seja feliz so isso a imagem e so uma fotinha aonde se tem que mudar nao copia o que esta marcado so muda aquela opçao

  14. Gostei
    Double loot você pode fazer em lua por gambiarra ou com algumas modificações nas sources (C++). Talvez mais tarde eu atualize o código com isso.
    data/creaturescripts/scripts:
    local config = {     count = 100,          --Número mínimo de jogadores online para ter double experience.     rate = 2.0,           --Rate de EXP.      storage = 4091, } function onLogin(cid)     if getGlobalStorageValue(config.storage) < 1 then         if #getPlayersOnline() >= config.count then             broadcastMessage(config.count.." jogadores online! Double experience ativada!")             setGlobalStorageValue(config.storage, 1)             for _, pid in pairs(getPlayersOnline()) do                 doPlayerSetExperienceRate(pid, config.rate)             end         end     else         doPlayerSetExperienceRate(cid, config.rate)     end     return true end function onLogout(cid)     if getGlobalStorageValue(config.storage) > -1 then         if #getPlayersOnline() - 1 < config.count then             broadcastMessage("A double experience foi desativada. :/")             setGlobalStorageValue(config.storage, -1)             for _, pid in pairs(getPlayersOnline()) do                 doPlayerSetExperienceRate(pid, 1.0)             end         end     end     return true end Tags: <event type="login" name="ExpLogin" event="script" value="nome_do_arquivo.lua"/> <event type="logout" name="ExpLogout" event="script" value="nome_do_arquivo.lua"/>        
  15. Gostei
    Lyon deu reputação a Caronte em (Resolvido)Invasao diferente   
    Não sou da equipe rsrs...
    só faço isso para praticar e ajudar mesmo...
  16. Gostei
    & Novas areas em Oramond em breve.
  17. Gostei
    Global 11/12x [v32]
     

     
     
    - New Falcons
    - New Asuras
    - Warzone 4,5,6
    - Exercise Training
    - Raids 100%
    - Monstros 100%
    - Trainer Offline 100%
    - Trainer Online 100%
    - Taming system funcionando 100%;
    - Database completa
    - War System 100%
    - Global MAP Full
    - Store 100%
    - Imbuement
    - Prey System
    - Entre outros sistemas.
     
    Projeto no: GITHUB

    Scan Vírus Total
     
    IMAGES
     
    Créditos:
     
     











  18. Gostei
    Lyon deu reputação a Heyron em (Resolvido){Dúvida}Como fazer TFS aceitar acentuação   
    @Summ:
    Só acho que não fica legal você ensinar pela metade, se não o "trabalho" de desvendar o que você quis dizer fica ao critério da pessoa "traduzir".
     

     
    @NathanAmaro:
    Caso você queira inserir acentos em palavras nas sources, siga esse tutorial.
     
    Ou resumindo..
    Na pasta onde se encontra as sources no seu OT, copie qualquer arquivo.h e renomeie ele para locale.h, e em seguida adicione os seguintes códigos abaixo:
    #include <locale.h> int main(void) { setlocale(LC_ALL, "Portuguese"); printf("Alô mundo! \n\n"); system("PAUSE"); return 0; } Agora salve o arquivo normalmente..
    Abra o Dev C++ e adicione esse novo arquivo que está nas sources do seu servidor no projeto e compile a distro.
  19. Gostei
    Lyon deu reputação a Heyron em (Resolvido){Dúvida}Como fazer TFS aceitar acentuação   
    For pra postar isso nem comenta cara, se essa sua má vontade lhe impede de fazer isso não era nem pra você ter entrado no tópico.
  20. Gostei
    Lyon deu reputação a Summ em (Resolvido){Dúvida}Como fazer TFS aceitar acentuação   
    Pra adicionar, nas sources basta inserir a biblioteca :
     
    #include <locale.h>
      e dps usar:   setlocale(LC_ALL, "Portuguese");
     
     
    que vai aceitar os caracteres com acentos...
     
     
     
    Ps: Não vou ensinar editar, jogue no google e aprende por conta própria.
     
  21. Gostei
    Lyon deu reputação a Lyu em [Dodge System] Versão com Amuleto & Elementos de Defesa.   
    'Dodge System 2015' versão com AMULETO & ELEMENTOS DE DEFESA.                                    Testado em OTX Server 8.60 & TFS 0.4 dev 3884.                                                                           Antes de começar, quero avisar às pessoas que estão sem tempo ou com preguiça de ler o tópico inteiro, que eu upei um zip do sistema inteiro. então é só baixar e instalar ai.   Download SCAN   Continuando Tópico..   Cada ponto de Dodge equivale a x% de chance de desviar de um ataque, e ao mesmo tempo, enviar um elemento compatível com o nível de dodge do jogador. Sobre o desvio, quase todo mundo já conhece, mas e esse tal elemento?   Ao desviar do ataque, automaticamente o amuleto contra-ataca com um ataque de distância; sua fonte de energia é o fist fighting, quanto mais alto for o skill, mais alto será o dano; Cada amuleto possui seu próprio elemento e ele será a chave para o funcionamento do dodge, ou seja, sem AMULET, sem Dodge.   1º - Procure a pasta Lib na sua datapack, crie um arquivo 151-dodgesystem.lua e dentro adicione isso :
      2º- abra o arquivo actions.xml e adicione isso : <action itemid="12411" event="script" value="dodge.lua"/> 3º- entre na pasta scripts em actions, crie um arquivo .lua chamado dodge e adicione isso :


      4º- abra o arquivo creaturescripts.xml e adicione isso : <event type="statschange" name="DodgeSystem" event="script" value="dodge.lua"/> 5º- entre na pasta scripts em creaturescripts, crie um arquivo .lua chamado dodge e adicione isso :



      6º- ainda em creaturescripts, abra o arquivo login.lua e adicione isso la no final antes do return true : registerCreatureEvent(cid, "DodgeSystem")   7º- abra o arquivo movements.xml, substitua isso : OTX :


      TFS :
      por isso :
      8º - entre na pasta scripts em movements, crie um arquivo .lua chamado dodgeamulet e adicione isso :
        9º- abra o arquivo talkactions.xml e adicione isso : <talkaction log="yes" words="!dodge;/dodge" event="script" value="dodge.lua"/> 10º- entre na pasta scripts em talkactions, crie um arquivo .lua chamado dodge e adicione isso :
        no arquivo lib.. DODGE_PERCENT é os porcentos que o jogador ganhará por cada ponto adquirido; DODGE_MAX é o máximo de dodge; DODGE_PRICE é o preço de cada pedra; DODGE_ITEMID é o ID da pedra de dodge; DODGE_COMMAND_REMOVE é um comando para remover 1 ponto de dodge e receber 75% do dinheiro que você pagou pela pedra. true = comando disponível, false = comando inexistente; DODGE_ONLY_PREMIUM é para jogadores com premium, true = o dodge só funcionará com premium, false = qualquer um poderá usar; DODGE_TEXT é o texto que aparecerá quando o player desviar de um ataque; DODGE_TEXTCOLOR é a cor do texto;   DODGE_FISTMULTIPLIER é para multiplicar o fist fighting do jogador pelo multiplier configurado. true = multiplica, false = os multipliers serão sempre os mesmos valores;   type é o tipo de elemento; min é o hit mínimo; max é o hit máximo; mana é a quantidade de mana que precisa para contra-atacar com o elemento. se não tiver mana, só vai desviar; shoot é o efeito de distância.   ID dos amulets :  terra amulet      : 7887 glacier amulet    : 7888 lightning pendant : 7889 magma amulet      : 7890   comandos : !dodge; !dodge buy; !dodge remove.   caso você queira que o amulet mude de elemento ao dar use(estilo exp alta), abra o items.xml e substitua isso :
      por isso :
      um exemplo do DODGE_FISTMULTIPLIER : se estiver true, o jogador estiver com o 'magma amulet' e tiver 100 fist fighting, ele terá a chance de acertar um hit entre 400-1000 de dano; se estiver false, ele só vai hitar entre 4-9 de dano, ai você vai ter que editar pra deixar mais alto, só que será o padrão;    algumas imagens : 
      Então pessoal, espero que tenham gostado da minha versão. Eu fiz ela do zero, peguei só a ideia do Dodge System que vi em alguns Ots e mandei bala acrescentando esses elementos com amuleto.   créditos : Halls Santos & o criador do Dodge System, infelizmente não sei o nome dele. comentem ai que eu edito depois.
  22. Gostei
    Lyon recebeu reputação de yeager em (Resolvido)[DÚVIDA] - Alerta de vírus no .exe do servidor. [Dragon Souls]   
    Passe no virus total,veja se quantas detecção vai ter,ou se é apenas frescura do avira.
     
    https://www.virustotal.com/
     
    nao precisa mandar o servidor todo,apenas o exe.
     
    Boa sorte.
  23. Gostei
    Lyon deu reputação a Victor Fasano Raful em Entrega de Pontos Automatico - Tomen Cuidado !   
    Sim @luanluciano93, mas concorda que os valores podem se elevar de 1 a 9999. Creio que o código seria meio extenso, é legal e prático e oferecer uma lista de variações de pontos e de acordo com os valores dos itens, sempre combinando do básico a uma compra mais complexa de x pontos... Também pode ser possivel a opção de promoções, doações X depositados valores Y...
     
    Pode ser que eu disponibilize tal sistema, pois vi em alguns topicos o sistema contendo diversas páginas, tenho em apenas algumas simples linhas as funções necessárias e encurtadas com PHP OOP.
  24. Gostei
    Lyon deu reputação a Adriano SwaTT em (Resolvido)[Quest] Estátuas Vivas   
    Que bom que funcionou, fiz com bastante dedicação...
    Só que fiz para 10 monsters, porque vi aqueles que estão atrás do GOD também, você removeu do script?
     
    Enfim...
    Faça bom aproveito.
  25. Gostei
    Lyon recebeu reputação de otteN em Site usando VPS   
    http://www.tibiaking.com/forum/topic/27731-como-conectar-em-um-vps-windows/

Informação Importante

Confirmação de Termo