E
Evil Puncker
Guest
have you applied these changes to your db?Houses stacked items stop work after server save
have you applied these changes to your db?Houses stacked items stop work after server save
The items containing the special bonushave you applied these changes to your db?
the workaround that you can do right now until(if) @Delusion confirm this and fix it, is to edit the onMove on player.lua and not allow players to put these special items in houseThe items containing the special bonus
if left in the house like this the normal save / load bonus
View attachment 39073
but if we leave it that way
the bonus that exists in the item above the other
start working on the bottom item
View attachment 39074
tile_store
(house_id
, data
, abilities
) VALUES (2107,'/\0\0\0%\0',NULL),(2107,'-\0\0\0$\0',NULL),(2107,'.\0\0\0┌\0',NULL),(2107,'/\0\0\0█\0',NULL),(2107,'-\0\0\0$\0',NULL),(2107,'-\0\0\0$\0',NULL),(210tile_store
(house_id
, data
, abilities
) VALUES (2107,'/\0\0\0%\0',NULL),(2107,'-\0\0\0$\0',NULL),(2107,'.\0\0\0┌\0',NULL),(2107,'/\0\0\0█\0',NULL),(2107,'-\0\0\0$\0',NULL),(2107,'-\0\0\0$\0',NULL),(210tile_store
(house_id
, data
, abilities
) VALUES (2107,'/\0\0\0%\0',NULL),(2107,'-\0\0\0$\0',NULL),(2107,'.\0\0\0┌\0',NULL),(2107,'/\0\0\0█\0',NULL),(2107,'-\0\0\0$\0',NULL),(2107,'-\0\0\0$\0',NULL),(210I even deleted that house and it looks for items on others houses, and same if I delete them as well (they have no item whatsoever), my tile_store is empty, my server is for test only, no house was ever boughtIt's obviously finding some item to serialize in house ID 2107. Without more information, I have no idea.
I'm receiving the following error when shutting down the server by ctrl+c:
SIGINT received, shutting game server down...
Saving server...
[Error - mysql_real_query] Query: INSERT INTOtile_store
(house_id
,data
,abilities
) VALUES (2107,'/\0\0\0%\0',NULL),(2107,'-\0\0\0$\0',NULL),(2107,'.\0\0\0┌\0',NULL),(2107,'/\0\0\0█\0',NULL),(2107,'-\0\0\0$\0',NULL),(2107,'-\0\0\0$\0',NULL),(210
Message: Column 'abilities' cannot be null
[Error - mysql_real_query] Query: INSERT INTOtile_store
(house_id
,data
,abilities
) VALUES (2107,'/\0\0\0%\0',NULL),(2107,'-\0\0\0$\0',NULL),(2107,'.\0\0\0┌\0',NULL),(2107,'/\0\0\0█\0',NULL),(2107,'-\0\0\0$\0',NULL),(2107,'-\0\0\0$\0',NULL),(210
Message: Column 'abilities' cannot be null
[Error - mysql_real_query] Query: INSERT INTOtile_store
(house_id
,data
,abilities
) VALUES (2107,'/\0\0\0%\0',NULL),(2107,'-\0\0\0$\0',NULL),(2107,'.\0\0\0┌\0',NULL),(2107,'/\0\0\0█\0',NULL),(2107,'-\0\0\0$\0',NULL),(2107,'-\0\0\0$\0',NULL),(210
Message: Column 'abilities' cannot be null
Shutting down... done!
my tile_store table:
View attachment 39903
is it normal? (No items are in the houses, they are empty)
ALTER TABLE `tile_store`
CHANGE `abilities` `abilities` blob NULL;
worked, thanks a lot!try
SQL:ALTER TABLE `tile_store` CHANGE `abilities` `abilities` blob NULL;
function register_item(id)
local equipAbility = MoveEvent("equipAbility")
equipAbility:type("equip")
equipAbility:id(id)
equipAbility:register()
local deEquipAbility = MoveEvent("deEquipAbility")
deEquipAbility:type("deequip")
deEquipAbility:id(id)
deEquipAbility:register()
end
function imbue_item(player, item, ability, value, additive)
additive = additive or false
local doEquipSlot = nil
for i = CONST_SLOT_HEAD, CONST_SLOT_AMMO do
local equip = player:getSlotItem(i)
if equip ~= nil then
if equip:getUniqueId() == item:getUniqueId() then
item:moveTo(Tile(player:getPosition()))
doEquipSlot = i
break
end
end
end
register_item(item:getId())
if additive then
item:setAbility(ability, (item:getAbility(ability) or 0) + value)
else
item:setAbility(ability, value)
end
if doEquipSlot ~= nil then
item:moveTo(player)
end
end
function remove_imbue(item, ability)
item:removeAbility(ability)
end
Were you ever able to fix the holy/ice/undead xml stats missing? I've got the same problem and mana drain/health drain have dissapeared as well. Did you use Nekiro's downgrade?Is it possible to upgrade to the latest version of tfs?
I was able to get the 'normal' resistances back by changingNope, im implement my own custom item system using customattribute, healchange/manachange creaturescript, onMovedItem event, and onlook event to get description, it's like 250 line of code (i own attack attribute, all ress type, percent skill/mlvl/hp/mp condition)
size_t combatTypeToIndex(CombatType_t combatType)
{
switch (combatType) {
case COMBAT_PHYSICALDAMAGE:
return 0;
case COMBAT_ENERGYDAMAGE:
return 1;
case COMBAT_EARTHDAMAGE:
return 2;
case COMBAT_FIREDAMAGE:
return 3;
case COMBAT_UNDEFINEDDAMAGE:
return 8;
case COMBAT_LIFEDRAIN:
return 9;
case COMBAT_MANADRAIN:
return 10;
case COMBAT_HEALING:
return 11;
case COMBAT_DROWNDAMAGE:
return 4;
case COMBAT_ICEDAMAGE:
return 5;
case COMBAT_HOLYDAMAGE:
return 6;
case COMBAT_DEATHDAMAGE:
return 7;
default:
return 0;
}
}
Done.@Infernum Can you update the compare link please? It stopped working since you changed your nick
I do not work on anything Tibia related at the moment, let alone this outdated piece of poop.@Infernum i can confirm the problems with the houses. It appears that since you're saving the attribute in the tile, every item that is in the tile gets it when loading the tile.
Same happens if you have multiple itens with attributes stacked, the last one on the stack inherits all previous attributes in itemload
you definetely should reconsider, been using your system for months and lately been working to improve it. Already managed to make it work with every item (not only the registered in movements) but there are still missing some things to be fixed for me to make a pr out of it. It seems that the problem is the missing ofI do not work on anything Tibia related at the moment, let alone this outdated piece of poop.
If I were to ever work on this again, it'd be a complete rewrite to revscripts utilizing CustomAttributes to avoid writing direct serialization and open up infinite possibilities for abilities to be added instead of being limited to 64 bit flags.you definetely should reconsider, been using your system for months and lately been working to improve it. Already managed to make it work with every item (not only the registered in movements) but there are still missing some things to be fixed for me to make a pr out of it. It seems that the problem is the missing of
abilStream.write<uint8_t>(0x00); // abilities end when saving item