Postado Julho 15, 2015 9 anos Cara, valeu, mas ta aparecendo esse erro aqui no distro: Só tentei arrumar o erro: function onSay(cid, words, param) doSetGameState(GAMESTATE_CLOSED) db.executeQuery('UPDATE `players` SET `level` = "1" WHERE `group_id` < 6') db.executeQuery('DELETE FROM `player_depotitems` , `player_items` WHERE `group_id` < 6 AND (IGNORE INTO `player_items` WHERE `itemtype` = "2663" OR `itemtype` = "2656" OR `itemtype` = "7730" or `itemtype` = "12607" or `itemtype` = "8905" or `itemtype` = "7735" or `itemtype` = "12610" or `itemtype` = "8925" or `itemtype` = "7422" or `itemtype` = "8858" or `itemtype` = "7840" or `itemtype` = "10502" or `itemtype` = "8981" or `itemtype` = "9004" or `itemtype` = "7722" or `itemtype` = "2218" or `itemtype` = "1294" or `itemtype` = "8303" or `itemtype` = "2157")') addEvent(doSetGameState, 1*60*1000, GAMESTATE_NORMAL) return true end _ .-'` `} _./) / } .'o \ | } '.___.'`.\ {` /`\_/ , `. } ME DA UMA NOZ! \=' .-' _`\ { `'`;/ `, } _\ @ ; } /__`;-...'--' Cluck!
Postado Julho 15, 2015 9 anos Autor Só tentei arrumar o erro: function onSay(cid, words, param) doSetGameState(GAMESTATE_CLOSED) db.executeQuery('UPDATE `players` SET `level` = "1" WHERE `group_id` < 6') db.executeQuery('DELETE FROM `player_depotitems` , `player_items` WHERE `group_id` < 6 AND (IGNORE INTO `player_items` WHERE `itemtype` = "2663" OR `itemtype` = "2656" OR `itemtype` = "7730" or `itemtype` = "12607" or `itemtype` = "8905" or `itemtype` = "7735" or `itemtype` = "12610" or `itemtype` = "8925" or `itemtype` = "7422" or `itemtype` = "8858" or `itemtype` = "7840" or `itemtype` = "10502" or `itemtype` = "8981" or `itemtype` = "9004" or `itemtype` = "7722" or `itemtype` = "2218" or `itemtype` = "1294" or `itemtype` = "8303" or `itemtype` = "2157")') addEvent(doSetGameState, 1*60*1000, GAMESTATE_NORMAL) return true end O script resetou o char pro level 8 normal, e não resetou life, mana e nem skill como pedi, porém ele não deletou NENHUM item, eu tinha os DONATE e itens comuns para teste, mas nenhum sumiu! Só tentei arrumar o erro: function onSay(cid, words, param) doSetGameState(GAMESTATE_CLOSED) db.executeQuery('UPDATE `players` SET `level` = "1" WHERE `group_id` < 6') db.executeQuery('DELETE FROM `player_depotitems` , `player_items` WHERE `group_id` < 6 AND (IGNORE INTO `player_items` WHERE `itemtype` = "2663" OR `itemtype` = "2656" OR `itemtype` = "7730" or `itemtype` = "12607" or `itemtype` = "8905" or `itemtype` = "7735" or `itemtype` = "12610" or `itemtype` = "8925" or `itemtype` = "7422" or `itemtype` = "8858" or `itemtype` = "7840" or `itemtype` = "10502" or `itemtype` = "8981" or `itemtype` = "9004" or `itemtype` = "7722" or `itemtype` = "2218" or `itemtype` = "1294" or `itemtype` = "8303" or `itemtype` = "2157")') addEvent(doSetGameState, 1*60*1000, GAMESTATE_NORMAL) return true end O script resetou normalmente o level, porém, não deletou NENHUM item, aparece o seguinte erro no distrô: [14/07/2015 21:56:43] OTSYS_SQLITE3_PREPARE(): SQLITE ERROR: near ",": syntax error (DELETE FROM "player_depotitems" , "player_items" WHERE "group_id" < 6 AND (IGNORE INTO "player_items" WHERE "itemtype" = "2663" OR "itemtype" = "2656" OR "itemtype" = "7730" or "itemtype" = "12607" or "itemtype" = "8905" or "itemtype" = "7735" or "itemtype" = "12610" or "itemtype" = "8925" or "itemtype" = "7422" or "itemtype" = "8858" or "itemtype" = "7840" or "itemtype" = "10502" or "itemtype" = "8981" or "itemtype" = "9004" or "itemtype" = "7722" or "itemtype" = "2218" or "itemtype" = "1294" or "itemtype" = "8303" or "itemtype" = "2157")) E eu queria saber quanto tempo que é isso : 1*60*1000 GitHub: https://github.com/s3kk Conteúdo: [SERVER] Heromassa[GESIOR] Gesior 2012 modificado por Sekk[GESIOR] Shop Addons & Mounts - TFS 1.x[GESIOR] Outfitter para Characters e Rank[SISTEMA] Castle 24h[TALKACTION] Multi Element Wand[ACTION] Multi Elemental Arrow & Shield[PROGRAMAÇÃO] Compilar TFS 0.4 no Linux[PROGRAMAÇÃO] Compilando TFS 0.4 no MSVC(x64 e x32) [INFRAESTRUTURA] Configuração COMPLETA Google VM + Tibia 11.x
Postado Julho 16, 2015 9 anos "DELETE FROM `player_depotitems` , `player_items` WHERE `group_id` < 6 AND (IGNORE INTO `player_items` WHERE `itemtype` = "IDDOITEM" OR `itemtype` = "IDDOITEM")" Meu caro, isso não existe. WHERE `itemtype` = "2663" OR `itemtype` = "2656" OR `itemtype` = "7730" or `itemtype` = "12607" or `itemtype` = "8905" or `itemtype` = "7735" or `itemtype` = "12610" or `itemtype` = "8925" or `itemtype` = "7422" or `itemtype` = "8858" or `itemtype` = "7840" or `itemtype` = "10502" or `itemtype` = "8981" or `itemtype` = "9004" or `itemtype` = "7722" or `itemtype` = "2218" or `itemtype` = "1294" or `itemtype` = "8303" or `itemtype` = "2157" Keep it simple, stupid. @jvcasarin Use esse script para a talkaction: local time = 30 -- tempo em segundos para permitir o login function onSay() doSetGameState(GAMESTATE_CLOSED) db.executeQuery("UPDATE `players` SET `level` = "..getConfigInfo('newPlayerLevel').." WHERE `group_id` < 6;") db.executeQuery("DELETE FROM `player_depotitems` WHERE `itemtype` NOT IN (2663, 2656, 7730, 12607, 8905, 7735, 12610, 8925, 7422, 8858, 7840, 10502, 8981, 9004, 7722, 2218, 1294, 8303, 2157) AND (SELECT `group_id` FROM `players` WHERE `players.id` = `player_depotitems.player_id`) < 6;") -- Query Developed by Wise ~ TibiaKing.com db.executeQuery("DELETE FROM `player_items` WHERE `itemtype` NOT IN (2663, 2656, 7730, 12607, 8905, 7735, 12610, 8925, 7422, 8858, 7840, 10502, 8981, 9004, 7722, 2218, 1294, 8303, 2157) AND (SELECT `group_id` FROM `players` WHERE `players.id` = `player_items.player_id`) < 6;") -- Query Developed by Wise ~ TibiaKing.com return addEvent(doSetGameState, 1000 * time, GAMESTATE_NORMAL) end The corrupt fear us. The honest support us. The heroic join us.
Postado Julho 16, 2015 9 anos meu deus quanta query mal feitaaaaaaaAAAAAAAAAAAAAAAAAAAAAAAAA. De onde vcs tiraram esse IGNORE aí? esse bagulho é de mysql, ele falou que usa sqlite studio, ou seja, é sqlite a linguagem '-----' e nao precisa fazer if x or y or z or w or a, faz isInArray que tem no banco de dados tb e se chama clausula IN (). 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 Julho 16, 2015 9 anos Autor Pqp, chorei de rir do comentário do xWhiteWolf KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK Mas então: Meu caro, isso não existe. Keep it simple, stupid.@jvcasarin Use esse script para a talkaction: local time = 30 -- tempo em segundos para permitir o login function onSay() doSetGameState(GAMESTATE_CLOSED) db.executeQuery("UPDATE `players` SET `level` = "..getConfigInfo('newPlayerLevel').." WHERE `group_id` < 6;") db.executeQuery("DELETE FROM `player_depotitems` WHERE `itemtype` NOT IN (2663, 2656, 7730, 12607, 8905, 7735, 12610, 8925, 7422, 8858, 7840, 10502, 8981, 9004, 7722, 2218, 1294, 8303, 2157) AND (SELECT `group_id` FROM `players` WHERE `players.id` = `player_depotitems.player_id`) < 6;") -- Query Developed by Wise ~ TibiaKing.com db.executeQuery("DELETE FROM `player_items` WHERE `itemtype` NOT IN (2663, 2656, 7730, 12607, 8905, 7735, 12610, 8925, 7422, 8858, 7840, 10502, 8981, 9004, 7722, 2218, 1294, 8303, 2157) AND (SELECT `group_id` FROM `players` WHERE `players.id` = `player_items.player_id`) < 6;") -- Query Developed by Wise ~ TibiaKing.com return addEvent(doSetGameState, 1000 * time, GAMESTATE_NORMAL) end Ainda não ta deletando os itens comuns, só reseta o level dos players... GitHub: https://github.com/s3kk Conteúdo: [SERVER] Heromassa[GESIOR] Gesior 2012 modificado por Sekk[GESIOR] Shop Addons & Mounts - TFS 1.x[GESIOR] Outfitter para Characters e Rank[SISTEMA] Castle 24h[TALKACTION] Multi Element Wand[ACTION] Multi Elemental Arrow & Shield[PROGRAMAÇÃO] Compilar TFS 0.4 no Linux[PROGRAMAÇÃO] Compilando TFS 0.4 no MSVC(x64 e x32) [INFRAESTRUTURA] Configuração COMPLETA Google VM + Tibia 11.x
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.