Im using this server engine.
Looking this line, everything seems correct...
the problem that is not occurring the change in the database, Lastloginsave and Lastlogout stay with number 1.
Can someone tell me what could be wrong?
Here is my script.
thanks in advance.
Nostalrius/src/player.cpp at master · Ezzz-dev/Nostalrius
Nostalrius is a 7.7 Tibia Clone Project based on The Forgotten Server 1.2 and CipSoft files. - Ezzz-dev/Nostalrius
github.com
Looking this line, everything seems correct...
the problem that is not occurring the change in the database, Lastloginsave and Lastlogout stay with number 1.
Can someone tell me what could be wrong?
Here is my script.
Lua:
function onLogin(player)
if player:getLastLoginSaved() <= 0 then
-- Items
if player:getSex() == PLAYERSEX_FEMALE then
player:addItem(3562, 1, true, -1, CONST_SLOT_ARMOR)
else
player:addItem(3561, 1, true, -1, CONST_SLOT_ARMOR)
end
player:addItem(2920, 1, true, -1, CONST_SLOT_LEFT)
player:addItem(3270, 1, true, -1, CONST_SLOT_RIGHT)
local container = Game.createItem(2853, 1)
container:addItem(3585, 1)
player:addItemEx(container, true, CONST_SLOT_BACKPACK)
-- Load Default Outfit.
if player:getSex() == PLAYERSEX_FEMALE then
player:setOutfit({lookType = 136, lookHead = 78, lookBody = 68, lookLegs = 58, lookFeet = 95})
else
player:setOutfit({lookType = 128, lookHead = 78, lookBody = 68, lookLegs = 58, lookFeet = 95})
end
local town = Town("Rookgaard")
player:teleportTo(town:getTemplePosition())
player:setTown(town)
player:setDirection(DIRECTION_SOUTH)
end
return true
end
thanks in advance.