Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local events = {
- "fasttravel_modal",
- "PlayerDeath",
- "blessingnoob",
- "DropLoot",
- "Tasks",
- "FishingTasks",
- "ExpertTasks",
- "RiftTasks",
- "MasterTasks",
- "Horse",
- "firstloginmessage",
- "pvparena",
- "vipexp",
- "skillpotion",
- "BossKill",
- "Fishingtasks",
- "SpellUp",
- "Resist",
- "tokensforall",
- "medalbonusdemonlord",
- "medalbonushaunter",
- "medalbonusoldwidow",
- }
- function onLogin(player)
- local loginStr = "Welcome to ArchLight, If you have any questions feel free to ask a tutor in the help channel!" .. configManager.getString(configKeys.SERVER_NAME) .. "!"
- activatFireWalk(player)
- if player:getLastLoginSaved() <= 0 then
- player:sendFLoginWindow()
- loginStr = loginStr .. " Please choose your outfit :)."
- player:sendOutfitWindow()
- else
- if loginStr ~= "" then
- player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
- end
- player:sendALoginWindow()
- loginStr = string.format("Your last visit was on %s.", os.date("%a %b %d %X %Y", player:getLastLoginSaved()))
- end
- player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
- -- Stamina
- nextUseStaminaTime[player.uid] = 0
- -- Promotion
- local vocation = player:getVocation()
- local promotion = vocation:getPromotion()
- local demotion = vocation:getDemotion()
- local value = player:getStorageValue(STORAGEVALUE_PROMOTION)
- if player:getStorageValue(STORAGEVALUE_PROMOTION) == 1 then
- if demotion == vocation then
- player:setVocation(promotion)
- end
- elseif player:getStorageValue(STORAGEVALUE_PROMOTION) == 2 then
- if demotion == vocation then
- player:setVocation(promotion:getPromotion())
- end
- end
- if not promotion and value ~= 3 then
- player:setStorageValue(STORAGEVALUE_PROMOTION, 2)
- player:setVocation(vocation:getDemotion())
- end
- if player:getStorageValue(15) == 1 then
- player:sendTextMessage(MESSAGE_INFO_DESCR, "You Have Free Blessings Until Level 80!")
- player:setStorageValue(15, 0)
- end
- if player:getLevel() < 80 then
- for i = 1, 5 do
- if not player:hasBlessing(i) then
- player:addBlessing(i)
- end
- end
- end
- -- Events
- for _, eventName in ipairs(events) do
- player:registerEvent(eventName)
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment