Xaii 177 Postado 3 de Agosto 2023 Compartilhar Postado 3 de Agosto 2023 (editado) Where can I do organization of saving backpacks after logging out and logging in? When I open my backpack and log out and then log back in, my backpack disappears, cannot be saved. Does anyone know why or know how to do this? I use OTCv8 and TFS 1.2 PokeDash by Pota. Editado 3 de Agosto 2023 por Xaii Citar Link para o comentário Compartilhar em outros sites Mais opções de compartilhamento...
Administrador gutinha 1.286 Postado 3 de Agosto 2023 Administrador Compartilhar Postado 3 de Agosto 2023 Hi, have you seen this? This is the hidden content, please Entre ou Cadastre-se 9 1 1 1 Citar Link para o comentário Compartilhar em outros sites Mais opções de compartilhamento...
Xaii 177 Postado 4 de Agosto 2023 Autor Compartilhar Postado 4 de Agosto 2023 9 horas atrás, gutinha disse: Hi, have you seen this? This is the hidden content, please Entre ou Cadastre-se Yep, i have this in my soruce. Still doesn't work. Maybe problem is this because i don't have normal Inventory i have only backpack. if not inventoryWindow.forceOpen then inventoryButton = modules.client_topmenu.addRightGameToggleButton('inventoryButton', tr('Open backpack') .. ' (Ctrl+I)', '/images/topbuttons/inventory', toggle) inventoryButton:setOn(true) end function toggle() local backpack = g_game.getLocalPlayer():getInventoryItem(InventorySlotBack) if backpack then g_game.use(backpack) end end 4 Citar Link para o comentário Compartilhar em outros sites Mais opções de compartilhamento...
DarkWore 27 Postado 17 de Agosto 2023 Compartilhar Postado 17 de Agosto 2023 In fact, this is not a bug, there is a column in the database called "save" this column by default is set to 0, it is responsible for identifying whether to save the character's containers or not, just change the value of this column to 1 and it will work. Citar Link para o comentário Compartilhar em outros sites Mais opções de compartilhamento...
Xaii 177 Postado 17 de Agosto 2023 Autor Compartilhar Postado 17 de Agosto 2023 @ darkwore I think there is problem with Attributes, when i add attribute to save backpacks, my pokeballs are removed. In this code "local pokeName = ball:getSpecialAttribute("pokeName")" It looks like these attributes are overwritten. function Player:refreshPokemonBar(add, remove) local pokeballs = self:getPokeballs() local pokemonsTable = {} for i = 1, #pokeballs do local ball = pokeballs[i] local pokeName = ball:getSpecialAttribute("pokeName") if not pokeName then -- fix ball bug ball:remove() print("WARNING! Player " .. self:getName() .. " had one ball removed!") else if not isInArray(remove, pokeName) then table.insert(pokemonsTable, "," .. pokeName) end end end for i = 1, #add do table.insert(pokemonsTable, "," .. add[i]) end table.insert(pokemonsTable, ",") self:sendExtendedOpcode(53, table.concat(pokemonsTable)) -- self:setSpecialStorage("pokes", pokeballs) return true end 2 Citar Link para o comentário Compartilhar em outros sites Mais opções de compartilhamento...
DarkWore 27 Postado 17 de Agosto 2023 Compartilhar Postado 17 de Agosto 2023 I don't think it's a problem with attributes, this solution with the save column in the database has worked for several people I've shared it with, so I think your problem is something else. 9 horas atrás, Xaii disse: @ darkwore I think there is problem with Attributes, when i add attribute to save backpacks, my pokeballs are removed. In this code "local pokeName = ball:getSpecialAttribute("pokeName")" It looks like these attributes are overwritten. function Player:refreshPokemonBar(add, remove) local pokeballs = self:getPokeballs() local pokemonsTable = {} for i = 1, #pokeballs do local ball = pokeballs[i] local pokeName = ball:getSpecialAttribute("pokeName") if not pokeName then -- fix ball bug ball:remove() print("WARNING! Player " .. self:getName() .. " had one ball removed!") else if not isInArray(remove, pokeName) then table.insert(pokemonsTable, "," .. pokeName) end end end for i = 1, #add do table.insert(pokemonsTable, "," .. add[i]) end table.insert(pokemonsTable, ",") self:sendExtendedOpcode(53, table.concat(pokemonsTable)) -- self:setSpecialStorage("pokes", pokeballs) return true end Citar Link para o comentário Compartilhar em outros sites Mais opções de compartilhamento...
Xaii 177 Postado 20 de Agosto 2023 Autor Compartilhar Postado 20 de Agosto 2023 Em 18/08/2023 em 00:08, DarkWore disse: I don't think it's a problem with attributes, this solution with the save column in the database has worked for several people I've shared it with, so I think your problem is something else. Yep, that was a problem with attributes. I repaired this. "Save" In database is for save player, not backpacks. There was a problem with Strings and Int, they were messing with each other. Citar Link para o comentário Compartilhar em outros sites Mais opções de compartilhamento...
Posts Recomendados
Participe da Conversa
Você pode postar agora e se cadastrar mais tarde. Cadastre-se Agora para publicar com Sua Conta.