cristianso
Member
- Joined
- Jan 27, 2019
- Messages
- 47
- Reaction score
- 16
Why is this script not working? I want a simple script that set the player town to 2 when he login for the first time.
I am making sure to create a new char to make the LastLoginSaved = 0, still doesn't work.
creaturescripts.xml
changetown.lua
I am making sure to create a new char to make the LastLoginSaved = 0, still doesn't work.
creaturescripts.xml
Lua:
<event type="login" name="changetown" script="others/changetown.lua" />
changetown.lua
Lua:
function onLogin(player)
if player:getLastLoginSaved() ~= 0 then
return true
end
player:setTown(2)
return true
end