Ir para conteúdo

Luquinha

Membro
  • Registro em

  • Última visita

Tudo que Luquinha postou

  1. Área de Lazer abandonada
  2. Luquinha postou uma resposta no tópico em Suporte Tibia OTServer
    Troca a porra desse site e para de @up sem ser em 24 horas !
  3. Vá no arquivo var.woe e procure Dia --days woe_config.dias = {"tuesday", "thursday", "saturday"} OBS : os dias são em inglês ! Por os dias sempre dentro das aspas exemplo se qiser adicionar mais dias faz assim {"tuesday", "thursday", "saturday" ,"sunday"} Horario --time to start woe_config.horaPartida = 11 11 é o horario ,mude ali
  4. Área Errada Amigo, Mais Atenção !
  5. Luquinha postou uma resposta no tópico em Playground (Off-topic)
    essa é veia em
  6. Luquinha postou uma resposta no tópico em Suporte Tibia OTServer
    data/creaturescripts/firstitems.lua
  7. Luquinha postou uma resposta no tópico em Playground (Off-topic)
    qual o topico que tem mais rep ? seila curiosidade
  8. Luquinha postou uma resposta no tópico em Suporte Tibia OTServer
    weblara
  9. Cara tu ta usando dev c++ 64bits?
  10. Ótimo, vou testar mais pra frente ! REP +
  11. Luquinha postou uma resposta no tópico em Suporte Tibia OTServer
    Tá falando que você não selecionou o towind, por acaso na hora de cria char marca alguma coisa de world?
  12. Luquinha postou uma resposta no tópico em Suporte Tibia OTServer
    posta seu shop admin
  13. Luquinha postou uma resposta no tópico em Suporte Tibia OTServer
    Primeiro vá em data/lib/functions.lua e coloque antes ou depois da ultima function: function generateSerial() local strings = "AaBbCcDdEeFfGgHhIiJjKkLlMmOoPpQqRrSsTtUuVvWwXxYyZz" local newSerialStr, newSerialInt = "", 0 local newSerial = "" local query, query2, query3 repeat for k = 1, math.random(1, 10) do local l = math.random(1, string.len(strings)) newSerialStr = newSerialStr .. string.sub(strings, l, l) end newSerialInt = math.random(999999) newSerial = newSerialStr .. "-" .. newSerialInt query = db.getResult("select * from player_items where substring(convert(attributes using latin1) from 18) = " .. db.escapeString(newSerial)) query2 = db.getResult("select * from player_depotitems where substring(convert(attributes using latin1) from 18) = " .. db.escapeString(newSerial)) query3 = db.getResult("select * from tile_items where substring(convert(attributes using latin1) from 18) = " .. db.escapeString(newSerial)) until query:getID() == -1 and query2:getID() == -1 and query3:getID() == -1 return "!" .. newSerial end Agora em Globalevents/Scripts crie um arquivo track.lua e coloque dentro: tablesToCheck = {"player_items", "player_depotitems", "tile_items", {"player_items", {"player_depotitems", "tile_items"}}, {"player_depotitems", "tile_items"}} function onstartup() local text, final = "", "" local filex = "data/logs/duplicated.txt" local f = io.open(filex, "a+") local count = 0 for i = 1, table.maxn(tablesToCheck) do if type(tablesToCheck[i]) == "string" then local query = db.getResult("SELECT *, SUBSTRING(CONVERT(attributes USING latin1) FROM 18) AS 'track' FROM " .. tablesToCheck[i] .. " WHERE SUBSTRING(CONVERT(attributes USING latin1) FROM 18) IN (SELECT SUBSTRING(CONVERT(attributes USING latin1) FROM 18) FROM " .. tablesToCheck[i] .. " WHERE CONVERT(attributes USING latin1) LIKE '%serial%' GROUP BY SUBSTRING(CONVERT(attributes USING latin1) FROM 18) HAVING COUNT(*) > 1)") if query:getID() ~= -1 then while(true) do local delete = db.executeQuery("delete from " .. tablesToCheck[i] .. " where SUBSTRING(CONVERT(attributes USING latin1) FROM 18) = " .. db.escapeString(query:getDataString("track")) .. " and player_id = " .. query:getDataInt("player_id") .. ";") text = "[!] -> Deleting items with duplicated serial from '" .. tablesToCheck[i] .. "': [Player: " .. getPlayerNameByGUID(query:getDataInt("player_id")) .. ", Item: " .. query:getDataInt("itemtype") .. ", Count: " .. query:getDataInt("count") .. ", Serial: " .. query:getDataString("track") .."]... " .. (delete and "Success!" or "Failed!") count = (delete and count + 1 or count) final = final .. (final ~= "" and "\n" or "") .. text print(text) if not query:next() then break end end end else if type(tablesToCheck[i][2]) == "string" then local query = db.getResult("SELECT *, SUBSTRING(CONVERT(attributes USING latin1) FROM 18) AS 'track' FROM " .. tablesToCheck[i][1] .. " WHERE SUBSTRING(CONVERT(attributes USING latin1) FROM 18) IN (SELECT SUBSTRING(CONVERT(attributes USING latin1) FROM 18) FROM " .. tablesToCheck[i][2] .. " WHERE CONVERT(attributes USING latin1) LIKE '%serial%' GROUP BY SUBSTRING(CONVERT(attributes USING latin1) FROM 18) HAVING COUNT(*) > 0)") if query:getID() ~= -1 then while(true) do local query_ = db.getResult("SELECT *, SUBSTRING(CONVERT(attributes USING latin1) FROM 18) AS 'track' FROM " .. tablesToCheck[i][2] .. " WHERE SUBSTRING(CONVERT(attributes USING latin1) FROM 18) IN (SELECT SUBSTRING(CONVERT(attributes USING latin1) FROM 18) FROM " .. tablesToCheck[i][1] .. " WHERE CONVERT(attributes USING latin1) LIKE '%serial%' GROUP BY SUBSTRING(CONVERT(attributes USING latin1) FROM 18) HAVING COUNT(*) > 0)") local delete = db.executeQuery("delete from " .. tablesToCheck[i][1] .. " where SUBSTRING(CONVERT(attributes USING latin1) FROM 18) = " .. db.escapeString(query:getDataString("track")) .. ";") count = (delete and count + 1 or count) local delete2 = db.executeQuery("delete from " .. tablesToCheck[i][2] .. " where SUBSTRING(CONVERT(attributes USING latin1) FROM 18) = " .. db.escapeString(query:getDataString("track")) .. ";") count = (delete2 and count + 1 or count) text = "[!] -> Deleting item with duplicated serial from '" .. tablesToCheck[i][1] .. "' [Player: " .. getPlayerNameByGUID(query:getDataInt("player_id")) .. ", Item: " .. query:getDataInt("itemtype") .. ", Count: " .. query:getDataInt("count") .. ", Serial: " .. query:getDataString("track") .."]... " .. (delete and "Success!" or "Failed!") .. "\n[!] -> Deleting item with duplicated serial from '" .. tablesToCheck[i][2] .. "' [Player: " .. getPlayerNameByGUID(query_:getDataInt("player_id")) .. ", Item: " .. query_:getDataInt("itemtype") .. ", Count: " .. query_:getDataInt("count") .. ", Serial: " .. query_:getDataString("track") .."]... " .. (delete and "Success!" or "Failed!") final = final .. (final ~= "" and "\n" or "") .. text print(text) if not query:next() then break end end end else for j = 1, #tablesToCheck[i][2] do local query = db.getResult("SELECT *, SUBSTRING(CONVERT(attributes USING latin1) FROM 18) AS 'track' FROM " .. tablesToCheck[i][1] .. " WHERE SUBSTRING(CONVERT(attributes USING latin1) FROM 18) IN (SELECT SUBSTRING(CONVERT(attributes USING latin1) FROM 18) FROM " .. tablesToCheck[i][2][j] .. " WHERE CONVERT(attributes USING latin1) LIKE '%serial%' GROUP BY SUBSTRING(CONVERT(attributes USING latin1) FROM 18) HAVING COUNT(*) > 0)") if query:getID() ~= -1 then while(true) do local query_ = db.getResult("SELECT *, SUBSTRING(CONVERT(attributes USING latin1) FROM 18) AS 'track' FROM " .. tablesToCheck[i][2][j] .. " WHERE SUBSTRING(CONVERT(attributes USING latin1) FROM 18) IN (SELECT SUBSTRING(CONVERT(attributes USING latin1) FROM 18) FROM " .. tablesToCheck[i][1] .. " WHERE CONVERT(attributes USING latin1) LIKE '%serial%' GROUP BY SUBSTRING(CONVERT(attributes USING latin1) FROM 18) HAVING COUNT(*) > 0)") local delete = db.executeQuery("delete from " .. tablesToCheck[i][1] .. " where SUBSTRING(CONVERT(attributes USING latin1) FROM 18) = " .. db.escapeString(query:getDataString("track")) .. ";") count = (delete and count + 1 or count) local delete2 = db.executeQuery("delete from " .. tablesToCheck[i][2][j] .. " where SUBSTRING(CONVERT(attributes USING latin1) FROM 18) = " .. db.escapeString(query:getDataString("track")) .. ";") count = (delete2 and count + 1 or count) text = "[!] -> Deleting item with duplicated serial from '" .. tablesToCheck[i][1] .. "' [Player: " .. getPlayerNameByGUID(query:getDataInt("player_id")) .. ", Item: " .. query:getDataInt("itemtype") .. ", Count: " .. query:getDataInt("count") .. ", Serial: " .. query:getDataString("track") .."]... " .. (delete and "Success!" or "Failed!") .. "\n[!] -> Deleting item with duplicated serial from '" .. tablesToCheck[i][2][j] .. "' [Player: " .. getPlayerNameByGUID(query_:getDataInt("player_id")) .. ", Item: " .. query_:getDataInt("itemtype") .. ", Count: " .. query_:getDataInt("count") .. ", Serial: " .. query_:getDataString("track") .."]... " .. (delete and "Success!" or "Failed!") final = final .. (final ~= "" and "\n" or "") .. text print(text) if not query:next() then break end end end end end end end if f ~= nil then f:write("[" .. os.date("%d %B %Y %X ", os.time()) .. "] >> [Anti-Dupe] " .. count .. " duplicated items have been deleted from the database.\n" .. (final == "" and "[!] -> No duplicated item was found in the database" or final) .. "\n\n") f:close() else print("[!] -> [Anti-Dupe] Cannot save info to file!") end return true end e em Globalvents.xml <globalevent name="trackitems" type="start" event="script" value="trackitems.lua"/> Para "adicionar" a table Serial na Database execute essa query: SELECT * , SUBSTRING( CONVERT( attributes USING latin1 ) FROM 18 ) AS 'serial' FROM player_items WHERE CONVERT( attributes Para verificar os items duplicados execute essa query: --Use this command to see duplicated items on players inventory SELECT * , SUBSTRING( CONVERT( attributes USING latin1 ) FROM 18 ) AS 'duplicated serials' FROM player_items WHERE SUBSTRING( CONVERT( attributes USING latin1 ) FROM 18 ) IN ( SELECT SUBSTRING( CONVERT( attributes USING latin1 ) FROM 18 ) FROM player_items WHERE CONVERT( attributes USING latin1 ) LIKE '%serial%' GROUP BY SUBSTRING( CONVERT( attributes USING latin1 ) FROM 18 ) HAVING COUNT( * ) >1 ) --Use this command to see duplicated items on players inventory or depot items SELECT * , SUBSTRING( CONVERT( attributes USING latin1 ) FROM 18 ) AS 'duplicated serials' FROM player_items WHERE SUBSTRING( CONVERT( attributes USING latin1 ) FROM 18 ) IN ( SELECT SUBSTRING( CONVERT( attributes USING latin1 ) FROM 18 ) FROM player_depotitems WHERE CONVERT( attributes USING latin1 ) LIKE '%serial%' GROUP BY SUBSTRING( CONVERT( attributes USING latin1 ) FROM 18 ) HAVING COUNT( * ) >1 ) --Use this command to see duplicated items on players depots SELECT * , SUBSTRING( CONVERT( attributes USING latin1 ) FROM 18 ) AS 'duplicated serials' FROM player_depotitems WHERE SUBSTRING( CONVERT( attributes USING latin1 ) FROM 18 ) IN ( SELECT SUBSTRING( CONVERT( attributes USING latin1 ) FROM 18 ) FROM player_depotitems WHERE CONVERT( attributes USING latin1 ) LIKE '%serial%' GROUP BY SUBSTRING( CONVERT( attributes USING latin1 ) FROM 18 ) HAVING COUNT( * ) >1 ) --Use this command to see duplicated items on player_items and player_depotitems (Example of usage) --Use this command to see duplicated items on players depots SELECT * , SUBSTRING( CONVERT( attributes USING latin1 ) FROM 18 ) AS 'duplicated serials' FROM player_items WHERE SUBSTRING( CONVERT( attributes USING latin1 ) FROM 18 ) IN ( SELECT SUBSTRING( CONVERT( attributes USING latin1 ) FROM 18 ) FROM player_depotitems WHERE CONVERT( attributes USING latin1 ) LIKE '%serial%' GROUP BY SUBSTRING( CONVERT( attributes USING latin1 ) FROM 18 ) HAVING COUNT( * ) >0
  14. Famoso task, sem NPC ! Valeu ,mais tarde eu testo ! boa sorte
  15. Ai, t mandei via PM, duvida sanada !
  16. Cara que custa, você por o script sem ser para eu abaixar... Não vou abaixar nada!
  17. Luquinha postou uma resposta no tópico em Suporte Tibia OTServer
    Cria umas caves e poem aceso dentro do castelo, ai só a guild vencedora ira entrar. ou poem a expwoe que tenho aqui,se quiser me fala q posto
  18. tenta mysql -u root -p (enter) Entao ele vai pedir a senha do usuario root do mysql.
  19. Cara se você não entendeu, ele não achou o arquivo que tem esse assunto. Guizin, posta teu globalevents,xml por favor em code
  20. Luquinha postou uma resposta no tópico em Playground (Off-topic)
    poem alguns emoticons sobre tibia
  21. Luquinha postou uma resposta no tópico em Playground (Off-topic)
    olha os map dele
  22. Luquinha postou uma resposta no tópico em Playground (Off-topic)
    se foda vc n me ajuda msm
  23. Luquinha postou uma resposta no tópico em Suporte Tibia OTServer
    Clique AQUI e siga o tutorial sem pressa ,que você conseguira!

Informação Importante

Confirmação de Termo