Skip to content

Commit

Permalink
fix loggin
Browse files Browse the repository at this point in the history
  • Loading branch information
mattyx14 committed Dec 20, 2020
1 parent 3c817a4 commit ebead86
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions data/scripts/creaturescripts/others/login.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,31 +61,6 @@ function playerLogin.onLogin(player)
if isPremium(player) then
player:setStorageValue(Storage.PremiumAccount, 1)
end
-- Premium Ends Teleport to Temple, change addon (citizen) houseless
local defaultTown = "Thais" -- default town where player is teleported if his home town is in premium area
local freeTowns = {"Ab'Dendriel", "Carlin", "Kazordoon", "Thais", "Venore", "Rookgaard", "Dawnport", "Dawnport Tutorial", "Island of Destiny"} -- towns in free account area

if isPremium(player) == false and isInArray(freeTowns, player:getTown():getName()) == false then
local town = player:getTown()
local sex = player:getSex()
local home = getHouseByPlayerGUID(getPlayerGUID(player))
town = isInArray(freeTowns, town:getName()) and town or Town(defaultTown)
player:teleportTo(town:getTemplePosition())
player:setTown(town)
player:sendTextMessage(MESSAGE_STATUS_WARNING, "Your premium time has expired.")
player:setStorageValue(Storage.PremiumAccount, 0)
if sex == 1 then
player:setOutfit({lookType = 128, lookFeet = 114, lookLegs = 134, lookHead = 114,lookAddons = 0})
elseif sex == 0 then
player:setOutfit({lookType = 136, lookFeet = 114, lookLegs = 134, lookHead = 114, lookAddons = 0})
end
if home ~= nil and not isPremium(player) then
setHouseOwner(home, 0)
player:sendTextMessage(MESSAGE_STATUS_WARNING, 'You\'ve lost your house because you are not premium anymore.')
player:sendTextMessage(MESSAGE_STATUS_WARNING, 'Your items from house are send to your inbox.')
end
end
-- End 'Premium Ends Teleport to Temple'

-- Recruiter system
local resultId = db.storeQuery('SELECT `recruiter` from `accounts` where `id`='..getAccountNumberByPlayerName(getPlayerName(player)))
Expand Down

0 comments on commit ebead86

Please sign in to comment.