Ir para conteúdo

(Resolvido)[PEDIDO] Sistema de reset diferenciado(Hero)

Featured Replies

Postado

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!

  • Respostas 19
  • Visualizações 1.4k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • 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()     do

  • 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 na

  • Seguinte não tenho experiência nenhuma com código sql... function onSay(cid, words, param) doSetGameState(GAMESTATE_CLOSED) db.executeQuery("UPDATE `players` SET `level` = "1" WHERE `group_id` <

Posted Images

Postado
  • 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

Postado

"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

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

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Postado
  • 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...

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo