Jump to content

Scripting Ajuda com para Liberar Acessos Script Login.lua Help


Recommended Posts

.Qual servidor ou website você utiliza como base? 

 

Qual o motivo deste tópico? 

 

Está surgindo algum erro? Se sim coloque-o aqui. 

Citar

Acessis no Script Login.

 

Você tem o código disponível? Se tiver publique-o aqui: 

function Player.sendTibiaTime(self, hours, minutes)
    -- TODO: Migrate to protocolgame.cpp
    local msg = NetworkMessage()
    msg:addByte(0xEF)
    msg:addByte(hours)
    msg:addByte(minutes)
    msg:sendToPlayer(self)
    msg:delete()
    return true
end

local function onMovementRemoveProtection(cid, oldPos, time)
    local player = Player(cid)
    if not player then
        return true
    end

    local playerPos = player:getPosition()
    if (playerPos.x ~= oldPos.x or playerPos.y ~= oldPos.y or playerPos.z ~= oldPos.z) or player:getTarget() then
        player:setStorageValue(Storage.combatProtectionStorage, 0)
        return true
    end

    addEvent(onMovementRemoveProtection, 1000, cid, oldPos, time - 1)
end

function onLogin(player)
    local items = {
        {2120, 1},
        {2148, 3}
    }
    if player:getLastLoginSaved() == 0 then
        local backpack = player:addItem(1988)
        if backpack then
            for i = 1, #items do
                backpack:addItem(items[i][1], items[i][2])
            end
        end
        player:addItem(2050, 1, true, 1, CONST_SLOT_AMMO)
    else
        player:sendTextMessage(MESSAGE_STATUS_DEFAULT, string.format("Your last visit in ".. SERVER_NAME ..": %s.", os.date("%d. %b %Y %X", player:getLastLoginSaved())))
    end

    local playerId = player:getId()
    DailyReward.init(playerId)

    player:loadSpecialStorage()

    if player:getGroup():getId() >= 4 then
        player:setGhostMode(true)
    end

    -- Stamina
    nextUseStaminaTime[playerId] = 1

    -- EXP Stamina
    nextUseXpStamina[playerId] = 1

    -- Prey Small Window
    for slot = CONST_PREY_SLOT_FIRST, CONST_PREY_SLOT_THIRD do
        player:sendPreyData(slot)
    end

    -- New prey
    nextPreyTime[playerId] = {
        [CONST_PREY_SLOT_FIRST] = 1,
        [CONST_PREY_SLOT_SECOND] = 1,
        [CONST_PREY_SLOT_THIRD] = 1
    }

    if (player:getAccountType() == ACCOUNT_TYPE_TUTOR) then
    local msg = [[:: Tutor Rules
        1 *> 3 Warnings you lose the job.
        2 *> Without parallel conversations with players in Help, if the player starts offending, you simply mute it.
        3 *> Be educated with the players in Help and especially in the Private, try to help as much as possible.
        4 *> Always be on time, if you do not have a justification you will be removed from the staff.
        5 *> Help is only allowed to ask questions related to tibia.
        6 *> It is not allowed to divulge time up or to help in quest.
        7 *> You are not allowed to sell items in the Help.
        8 *> If the player encounters a bug, ask to go to the website to send a ticket and explain in detail.
        9 *> Always keep the Tutors Chat open. (required).
        10 *> You have finished your schedule, you have no tutor online, you communicate with some CM in-game
        or ts and stay in the help until someone logs in, if you can.
        11 *> Always keep a good Portuguese in the Help, we want tutors who support, not that they speak a satanic ritual.
        12 *> If you see a tutor doing something that violates the rules, take a print and send it to your superiors. "
        - Commands -
        Mute Player: /mute nick, 90 (90 seconds)
        Unmute Player: /unmute nick.
        - Commands -]]
        player:popupFYI(msg)
    end

    -- Open channels
    if table.contains({TOWNS_LIST.DAWNPORT, TOWNS_LIST.DAWNPORT_TUTORIAL}, player:getTown():getId())then
        player:openChannel(3) -- World chat
    else
        player:openChannel(3) -- World chat
        player:openChannel(5) -- Advertsing main
    end

    -- Rewards
    local rewards = #player:getRewardList()
    if(rewards > 0) then
        player:sendTextMessage(MESSAGE_INFO_DESCR, string.format("You have %d %s in your reward chest.",
        rewards, rewards > 1 and "rewards" or "reward"))
    end

    -- Update player id
    local stats = player:inBossFight()
    if stats then
        stats.playerId = player:getId()
    end
    
    -- Free Storage
    player:setStorageValue(Storage.SearoutesAroundYalahar.TownsCounter, 5)
    player:setStorageValue(Storage.SearoutesAroundYalahar.AbDendriel, 1)
    player:setStorageValue(Storage.SearoutesAroundYalahar.Carlin, 1)
    player:setStorageValue(Storage.SearoutesAroundYalahar.Thais, 1)
    player:setStorageValue(Storage.SearoutesAroundYalahar.Darashia, 1)
    player:setStorageValue(Storage.SearoutesAroundYalahar.Venore, 1)
    player:setStorageValue(Storage.SearoutesAroundYalahar.Ankrahmun, 1)
    player:setStorageValue(Storage.SearoutesAroundYalahar.LibertyBay, 1)
    -- yalahar
    player:setStorageValue(Storage.InServiceofYalahar.Questline, 17)
    player:setStorageValue(Storage.InServiceofYalahar.Questline, 18)
    player:setStorageValue(Storage.InServiceofYalahar.Mission03, 3)
    player:setStorageValue(Storage.InServiceofYalahar.NotesAzerus, 0)
    player:setStorageValue(Storage.InServiceofYalahar.Questline, 19)
    player:setStorageValue(Storage.InServiceofYalahar.Questline, 20)
    player:setStorageValue(Storage.InServiceofYalahar.Mission03, 4)
    player:setStorageValue(Storage.InServiceofYalahar.Questline, 23)
    player:setStorageValue(Storage.InServiceofYalahar.Questline, 22)
    player:setStorageValue(Storage.InServiceofYalahar.Mission04, 1)
    player:setStorageValue(Storage.InServiceofYalahar.Questline, 27)
    player:setStorageValue(Storage.InServiceofYalahar.Mission04, 6)
    player:setStorageValue(Storage.InServiceofYalahar.Questline, 27)
    player:setStorageValue(Storage.InServiceofYalahar.Questline, 28)
    player:setStorageValue(Storage.InServiceofYalahar.Mission05, 1)
    player:setStorageValue(Storage.InServiceofYalahar.Questline, 34)
    player:setStorageValue(Storage.InServiceofYalahar.Questline, 35)
    player:setStorageValue(Storage.InServiceofYalahar.Mission06, 1)
    player:setStorageValue(Storage.InServiceofYalahar.Questline, 39)
    player:setStorageValue(Storage.InServiceofYalahar.Mission06, 5)
    player:setStorageValue(Storage.InServiceofYalahar.Questline, 39)
    player:setStorageValue(Storage.InServiceofYalahar.Mission06, 5) -- StorageValue for Questlog "Mission 06: Frightening Fuel"
    player:setStorageValue(Storage.InServiceofYalahar.QuaraState, 2)
    player:setStorageValue(Storage.InServiceofYalahar.Questline, 40)
    player:setStorageValue(Storage.InServiceofYalahar.Mission07, 1)
    player:setStorageValue(Storage.InServiceofYalahar.Questline, 43)
    player:setStorageValue(Storage.InServiceofYalahar.Mission07, 5)
    player:setStorageValue(Storage.InServiceofYalahar.Questline, 48)
    player:setStorageValue(Storage.InServiceofYalahar.Mission09, 1)
    player:setStorageValue(Storage.InServiceofYalahar.Questline, 47)
    player:setStorageValue(Storage.InServiceofYalahar.Mission08, 4)
    --goroma
    player:setStorageValue(Storage.TheShatteredIsles.DefaultStart, 1)
    player:setStorageValue(Storage.TheShatteredIsles.Shipwrecked, 1)
    player:setStorageValue(Storage.TheShatteredIsles.Shipwrecked, 2)
    player:setStorageValue(Storage.TheShatteredIsles.AccessToGoroma, 1)

            


    if player:getStorageValue(Storage.combatProtectionStorage) < 1 then
        player:setStorageValue(Storage.combatProtectionStorage, 1)
        onMovementRemoveProtection(playerId, player:getPosition(), 10)
    end
    -- Set Client XP Gain Rate
    local baseExp = 100
    if Game.getStorageValue(GlobalStorage.XpDisplayMode) > 0 then
        baseExp = getRateFromTable(experienceStages, player:getLevel(), configManager.getNumber(configKeys.RATE_EXP))
    end

    local staminaMinutes = player:getStamina()
    local doubleExp = false --Can change to true if you have double exp on the server
    local staminaBonus = (staminaMinutes > 2400) and 150 or ((staminaMinutes < 840) and 50 or 100)
    if doubleExp then
        baseExp = baseExp * 2
    end
    player:setStaminaXpBoost(staminaBonus)
    player:setBaseXpGain(baseExp)

    local worldTime = getWorldTime()
    local hours = math.floor(worldTime / 60)
    local minutes = worldTime % 60
    player:sendTibiaTime(hours, minutes)

    if player:getStorageValue(Storage.isTraining) == 1 then --Reset exercise weapon storage
        player:setStorageValue(Storage.isTraining,0)
    end
    return true
end

 

Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. 

Queria que alguem me ajudasse liberar os seguintes acessos minha base é 12.4 globalotbr fts 1.3 

Acessos seguinte queria liberar:

Barbarian Test Quest (completa)
Bigfoot's Burden (completa) - Essa é da warzone
Cults of Tibia
Dangerous Depths
Forgotten Knowledge
In Service of Yalahar (até a missão 9 completa, a 10 é a luta contra o boss)
Killing in the name of...
The Ape City (completa)
The Dream Courts
The Explorer Society (completa)
The First Dragon
The Ice Islands Quest (completa)
The inquisition
The New Frontier
The Secret Library
The Shattered Isles (completa)
Wrath of the Emperor

 

Alguem me ajuda Por favor.

Link to post
Share on other sites

aqui tem meu login.lua da mesma base que a sua, aqui no meu ta funcionando, não estão todas as quests ai mas da pra vc ter uma noção

function Player.sendTibiaTime(self, hours, minutes)
	-- TODO: Migrate to protocolgame.cpp
	local msg = NetworkMessage()
	msg:addByte(0xEF)
	msg:addByte(hours)
	msg:addByte(minutes)
	msg:sendToPlayer(self)
	msg:delete()
	return true
end

local function onMovementRemoveProtection(cid, oldPos, time)
	local player = Player(cid)
	if not player then
		return true
	end

	local playerPos = player:getPosition()
	if (playerPos.x ~= oldPos.x or playerPos.y ~= oldPos.y or playerPos.z ~= oldPos.z) or player:getTarget() then
		player:setStorageValue(Storage.combatProtectionStorage, 0)
		return true
	end

	addEvent(onMovementRemoveProtection, 1000, cid, oldPos, time - 1)
end

local playerLogin = CreatureEvent("PlayerLogin")
function playerLogin.onLogin(player)
	local items = {
		{2120, 1},
		{2148, 3}
	}
	if player:getLastLoginSaved() == 0 then
		local backpack = player:addItem(1988)
		if backpack then
			for i = 1, #items do
				backpack:addItem(items[i][1], items[i][2])
			end
		end
		player:addItem(2050, 1, true, 1, CONST_SLOT_AMMO)
	else
		player:sendTextMessage(MESSAGE_STATUS_DEFAULT, string.format("Your last visit in ".. SERVER_NAME ..": %s.", os.date("%d. %b %Y %X", player:getLastLoginSaved())))
		
--In Service of Yalahar 
        player:setStorageValue(Storage.InServiceofYalahar.Questline, 5)
        player:setStorageValue(Storage.InServiceofYalahar.Mission01, 6)
        player:setStorageValue(Storage.InServiceofYalahar.Mission02, 8)
        player:setStorageValue(Storage.InServiceofYalahar.Mission03, 6)
        player:setStorageValue(Storage.InServiceofYalahar.Mission04, 6)
        player:setStorageValue(Storage.InServiceofYalahar.Mission05, 8)
        player:setStorageValue(Storage.InServiceofYalahar.Mission06, 5)
        player:setStorageValue(Storage.InServiceofYalahar.Mission07, 5)
        player:setStorageValue(Storage.InServiceofYalahar.Mission08, 4)
        player:setStorageValue(Storage.InServiceofYalahar.Mission09, 2)
        player:setStorageValue(Storage.InServiceofYalahar.Mission10, 1)
	--ape
	player:setStorageValue(Storage.TheApeCity,1)
      --zao
       player:setStorageValue(Storage.TheNewFrontier.Questline, 1)
       player:setStorageValue(Storage.TheNewFrontier.Mission01, 3)
       player:setStorageValue(Storage.TheNewFrontier.Mission02, 6)
       player:setStorageValue(Storage.TheNewFrontier.Mission03, 3)
       player:setStorageValue(Storage.TheNewFrontier.Mission04, 2)
       player:setStorageValue(Storage.TheNewFrontier.Mission05, 7)
       player:setStorageValue(Storage.TheNewFrontier.Mission06, 3)
       player:setStorageValue(Storage.TheNewFrontier.Mission07, 3)
       player:setStorageValue(Storage.TheNewFrontier.Mission08, 2)
       player:setStorageValue(Storage.TheNewFrontier.Mission09, 3)
       player:setStorageValue(Storage.TheNewFrontier.Mission10, 1)
       player:setStorageValue(Storage.TheNewFrontier.TomeofKnowledge, 12)

--Feryst
player:setStorageValue(Storage.ThreatenedDreams.Start, 1)
player:setStorageValue(Storage.ThreatenedDreams.TroubledMission01, 17)
player:setStorageValue(Storage.ThreatenedDreams.TroubledMission02, 1)

--Rashid
player:setStorageValue(Storage.TravellingTrader.Mission01, 1)
player:setStorageValue(Storage.TravellingTrader.Mission01, 2)
player:setStorageValue(Storage.TravellingTrader.Mission02, 5)
player:setStorageValue(Storage.TravellingTrader.Mission03, 3)
player:setStorageValue(Storage.TravellingTrader.Mission04, 3)
player:setStorageValue(Storage.TravellingTrader.Mission05, 3)
player:setStorageValue(Storage.TravellingTrader.Mission06, 2)
player:setStorageValue(Storage.TravellingTrader.Mission07, 1)

--Iquin 
player:setStorageValue(Storage.TheInquisition.Questline, 2)
player:setStorageValue(Storage.TheInquisition.Mission01, 7)
player:setStorageValue(Storage.TheInquisition.Mission02, 3)
player:setStorageValue(Storage.TheInquisition.Mission03, 6)
player:setStorageValue(Storage.TheInquisition.Mission04, 3)
player:setStorageValue(Storage.TheInquisition.Mission05, 3)
player:setStorageValue(Storage.TheInquisition.Mission06, 3)
player:setStorageValue(Storage.TheInquisition.Mission07, 1)

--WOTE
        player:setStorageValue(Storage.WrathoftheEmperor.Questline, 1)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission01, 3)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission02, 3)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission03, 3)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission04, 3)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission05, 3)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission06, 4)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission07, 6)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission08, 2)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission09, 2)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission10, 6)
        --Imbuiment
        player:setStorageValue(Storage.ForgottenKnowledge.Tomes, 1)
        player:setStorageValue(Storage.ForgottenKnowledge.LastLoreKilled, 1)    
        player:setStorageValue(Storage.ForgottenKnowledge.TimeGuardianKilled, 1)
        player:setStorageValue(Storage.ForgottenKnowledge.HorrorKilled, 1)
        player:setStorageValue(Storage.ForgottenKnowledge.DragonkingKilled, 1)
        player:setStorageValue(Storage.ForgottenKnowledge.ThornKnightKilled, 1)
        player:setStorageValue(Storage.ForgottenKnowledge.LloydKilled, 1)
        player:setStorageValue(Storage.ForgottenKnowledge.LadyTenebrisKilled, 1)
        player:setStorageValue(Storage.ForgottenKnowledge.AccessMachine, 1)
        --SearoutsYalahar
        player:setStorageValue(Storage.SearoutesAroundYalahar.Darashia, 1)
        player:setStorageValue(Storage.SearoutesAroundYalahar.AbDendriel, 1)
        player:setStorageValue(Storage.SearoutesAroundYalahar.Venore, 1)
        player:setStorageValue(Storage.SearoutesAroundYalahar.Ankrahmun, 1)
        player:setStorageValue(Storage.SearoutesAroundYalahar.PortHope, 1)
        player:setStorageValue(Storage.SearoutesAroundYalahar.Thais, 1)
        player:setStorageValue(Storage.SearoutesAroundYalahar.LibertyBay, 1)
        player:setStorageValue(Storage.SearoutesAroundYalahar.Carlin, 1)
	end

	local playerId = player:getId()
	DailyReward.init(playerId)

	player:loadSpecialStorage()

	if player:getGroup():getId() >= 4 then
		player:setGhostMode(true)
	end
	-- Boosted creature
	player:sendTextMessage(MESSAGE_LOOT, "Today's boosted creature: " .. BoostedCreature.name .. " \
	Boosted creatures yield more experience points, carry more loot than usual and respawn at a faster rate.")
	
	-- Bestiary tracker
	player:refreshBestiaryTracker()
		
	-- Stamina
	nextUseStaminaTime[playerId] = 1

	-- EXP Stamina
	nextUseXpStamina[playerId] = 1

	-- Prey Small Window
	for slot = CONST_PREY_SLOT_FIRST, CONST_PREY_SLOT_THIRD do
		player:sendPreyData(slot)
	end

	-- New prey
	nextPreyTime[playerId] = {
		[CONST_PREY_SLOT_FIRST] = 1,
		[CONST_PREY_SLOT_SECOND] = 1,
		[CONST_PREY_SLOT_THIRD] = 1
	}

	if (player:getAccountType() == ACCOUNT_TYPE_TUTOR) then
	local msg = [[:: Tutor Rules
		1 *> 3 Warnings you lose the job.
		2 *> Without parallel conversations with players in Help, if the player starts offending, you simply mute it.
		3 *> Be educated with the players in Help and especially in the Private, try to help as much as possible.
		4 *> Always be on time, if you do not have a justification you will be removed from the staff.
		5 *> Help is only allowed to ask questions related to tibia.
		6 *> It is not allowed to divulge time up or to help in quest.
		7 *> You are not allowed to sell items in the Help.
		8 *> If the player encounters a bug, ask to go to the website to send a ticket and explain in detail.
		9 *> Always keep the Tutors Chat open. (required).
		10 *> You have finished your schedule, you have no tutor online, you communicate with some CM in-game
		or ts and stay in the help until someone logs in, if you can.
		11 *> Always keep a good Portuguese in the Help, we want tutors who support, not that they speak a satanic ritual.
		12 *> If you see a tutor doing something that violates the rules, take a print and send it to your superiors. "
		- Commands -
		Mute Player: /mute nick, 90 (90 seconds)
		Unmute Player: /unmute nick.
		- Commands -]]
		player:popupFYI(msg)
	end

	-- Open channels
	if table.contains({TOWNS_LIST.DAWNPORT, TOWNS_LIST.DAWNPORT_TUTORIAL}, player:getTown():getId())then
		player:openChannel(3) -- World chat
	else
		player:openChannel(3) -- World chat
		player:openChannel(5) -- Advertsing main
	end

	-- Rewards
	local rewards = #player:getRewardList()
	if(rewards > 0) then
		player:sendTextMessage(MESSAGE_INFO_DESCR, string.format("You have %d %s in your reward chest.",
		rewards, rewards > 1 and "rewards" or "reward"))
	end

	-- Update player id
	local stats = player:inBossFight()
	if stats then
		stats.playerId = player:getId()
	end

	if player:getStorageValue(Storage.combatProtectionStorage) < 1 then
		player:setStorageValue(Storage.combatProtectionStorage, 1)
		onMovementRemoveProtection(playerId, player:getPosition(), 10)
	end
	-- Set Client XP Gain Rate
	local baseExp = 100
	if Game.getStorageValue(GlobalStorage.XpDisplayMode) > 0 then
		baseExp = getRateFromTable(experienceStages, player:getLevel(), configManager.getNumber(configKeys.RATE_EXP))
	end

	local staminaMinutes = player:getStamina()
	local doubleExp = false --Can change to true if you have double exp on the server
	local staminaBonus = (staminaMinutes > 2400) and 150 or ((staminaMinutes < 840) and 50 or 100)
	if doubleExp then
		baseExp = baseExp * 2
	end
	player:setStaminaXpBoost(staminaBonus)
	player:setBaseXpGain(baseExp)

	local worldTime = getWorldTime()
	local hours = math.floor(worldTime / 60)
	local minutes = worldTime % 60
	player:sendTibiaTime(hours, minutes)

	if player:getStorageValue(Storage.isTraining) == 1 then --Reset exercise weapon storage
		player:setStorageValue(Storage.isTraining,0)
	end
	return true
end
playerLogin:register()

 

Link to post
Share on other sites

Posted (edited)
21 horas atrás, jotape1322 disse:

aqui tem meu login.lua da mesma base que a sua, aqui no meu ta funcionando, não estão todas as quests ai mas da pra vc ter uma noção



function Player.sendTibiaTime(self, hours, minutes)
	-- TODO: Migrate to protocolgame.cpp
	local msg = NetworkMessage()
	msg:addByte(0xEF)
	msg:addByte(hours)
	msg:addByte(minutes)
	msg:sendToPlayer(self)
	msg:delete()
	return true
end

local function onMovementRemoveProtection(cid, oldPos, time)
	local player = Player(cid)
	if not player then
		return true
	end

	local playerPos = player:getPosition()
	if (playerPos.x ~= oldPos.x or playerPos.y ~= oldPos.y or playerPos.z ~= oldPos.z) or player:getTarget() then
		player:setStorageValue(Storage.combatProtectionStorage, 0)
		return true
	end

	addEvent(onMovementRemoveProtection, 1000, cid, oldPos, time - 1)
end

local playerLogin = CreatureEvent("PlayerLogin")
function playerLogin.onLogin(player)
	local items = {
		{2120, 1},
		{2148, 3}
	}
	if player:getLastLoginSaved() == 0 then
		local backpack = player:addItem(1988)
		if backpack then
			for i = 1, #items do
				backpack:addItem(items[i][1], items[i][2])
			end
		end
		player:addItem(2050, 1, true, 1, CONST_SLOT_AMMO)
	else
		player:sendTextMessage(MESSAGE_STATUS_DEFAULT, string.format("Your last visit in ".. SERVER_NAME ..": %s.", os.date("%d. %b %Y %X", player:getLastLoginSaved())))
		
--In Service of Yalahar 
        player:setStorageValue(Storage.InServiceofYalahar.Questline, 5)
        player:setStorageValue(Storage.InServiceofYalahar.Mission01, 6)
        player:setStorageValue(Storage.InServiceofYalahar.Mission02, 8)
        player:setStorageValue(Storage.InServiceofYalahar.Mission03, 6)
        player:setStorageValue(Storage.InServiceofYalahar.Mission04, 6)
        player:setStorageValue(Storage.InServiceofYalahar.Mission05, 8)
        player:setStorageValue(Storage.InServiceofYalahar.Mission06, 5)
        player:setStorageValue(Storage.InServiceofYalahar.Mission07, 5)
        player:setStorageValue(Storage.InServiceofYalahar.Mission08, 4)
        player:setStorageValue(Storage.InServiceofYalahar.Mission09, 2)
        player:setStorageValue(Storage.InServiceofYalahar.Mission10, 1)
	--ape
	player:setStorageValue(Storage.TheApeCity,1)
      --zao
       player:setStorageValue(Storage.TheNewFrontier.Questline, 1)
       player:setStorageValue(Storage.TheNewFrontier.Mission01, 3)
       player:setStorageValue(Storage.TheNewFrontier.Mission02, 6)
       player:setStorageValue(Storage.TheNewFrontier.Mission03, 3)
       player:setStorageValue(Storage.TheNewFrontier.Mission04, 2)
       player:setStorageValue(Storage.TheNewFrontier.Mission05, 7)
       player:setStorageValue(Storage.TheNewFrontier.Mission06, 3)
       player:setStorageValue(Storage.TheNewFrontier.Mission07, 3)
       player:setStorageValue(Storage.TheNewFrontier.Mission08, 2)
       player:setStorageValue(Storage.TheNewFrontier.Mission09, 3)
       player:setStorageValue(Storage.TheNewFrontier.Mission10, 1)
       player:setStorageValue(Storage.TheNewFrontier.TomeofKnowledge, 12)

--Feryst
player:setStorageValue(Storage.ThreatenedDreams.Start, 1)
player:setStorageValue(Storage.ThreatenedDreams.TroubledMission01, 17)
player:setStorageValue(Storage.ThreatenedDreams.TroubledMission02, 1)

--Rashid
player:setStorageValue(Storage.TravellingTrader.Mission01, 1)
player:setStorageValue(Storage.TravellingTrader.Mission01, 2)
player:setStorageValue(Storage.TravellingTrader.Mission02, 5)
player:setStorageValue(Storage.TravellingTrader.Mission03, 3)
player:setStorageValue(Storage.TravellingTrader.Mission04, 3)
player:setStorageValue(Storage.TravellingTrader.Mission05, 3)
player:setStorageValue(Storage.TravellingTrader.Mission06, 2)
player:setStorageValue(Storage.TravellingTrader.Mission07, 1)

--Iquin 
player:setStorageValue(Storage.TheInquisition.Questline, 2)
player:setStorageValue(Storage.TheInquisition.Mission01, 7)
player:setStorageValue(Storage.TheInquisition.Mission02, 3)
player:setStorageValue(Storage.TheInquisition.Mission03, 6)
player:setStorageValue(Storage.TheInquisition.Mission04, 3)
player:setStorageValue(Storage.TheInquisition.Mission05, 3)
player:setStorageValue(Storage.TheInquisition.Mission06, 3)
player:setStorageValue(Storage.TheInquisition.Mission07, 1)

--WOTE
        player:setStorageValue(Storage.WrathoftheEmperor.Questline, 1)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission01, 3)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission02, 3)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission03, 3)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission04, 3)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission05, 3)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission06, 4)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission07, 6)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission08, 2)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission09, 2)
        player:setStorageValue(Storage.WrathoftheEmperor.Mission10, 6)
        --Imbuiment
        player:setStorageValue(Storage.ForgottenKnowledge.Tomes, 1)
        player:setStorageValue(Storage.ForgottenKnowledge.LastLoreKilled, 1)    
        player:setStorageValue(Storage.ForgottenKnowledge.TimeGuardianKilled, 1)
        player:setStorageValue(Storage.ForgottenKnowledge.HorrorKilled, 1)
        player:setStorageValue(Storage.ForgottenKnowledge.DragonkingKilled, 1)
        player:setStorageValue(Storage.ForgottenKnowledge.ThornKnightKilled, 1)
        player:setStorageValue(Storage.ForgottenKnowledge.LloydKilled, 1)
        player:setStorageValue(Storage.ForgottenKnowledge.LadyTenebrisKilled, 1)
        player:setStorageValue(Storage.ForgottenKnowledge.AccessMachine, 1)
        --SearoutsYalahar
        player:setStorageValue(Storage.SearoutesAroundYalahar.Darashia, 1)
        player:setStorageValue(Storage.SearoutesAroundYalahar.AbDendriel, 1)
        player:setStorageValue(Storage.SearoutesAroundYalahar.Venore, 1)
        player:setStorageValue(Storage.SearoutesAroundYalahar.Ankrahmun, 1)
        player:setStorageValue(Storage.SearoutesAroundYalahar.PortHope, 1)
        player:setStorageValue(Storage.SearoutesAroundYalahar.Thais, 1)
        player:setStorageValue(Storage.SearoutesAroundYalahar.LibertyBay, 1)
        player:setStorageValue(Storage.SearoutesAroundYalahar.Carlin, 1)
	end

	local playerId = player:getId()
	DailyReward.init(playerId)

	player:loadSpecialStorage()

	if player:getGroup():getId() >= 4 then
		player:setGhostMode(true)
	end
	-- Boosted creature
	player:sendTextMessage(MESSAGE_LOOT, "Today's boosted creature: " .. BoostedCreature.name .. " \
	Boosted creatures yield more experience points, carry more loot than usual and respawn at a faster rate.")
	
	-- Bestiary tracker
	player:refreshBestiaryTracker()
		
	-- Stamina
	nextUseStaminaTime[playerId] = 1

	-- EXP Stamina
	nextUseXpStamina[playerId] = 1

	-- Prey Small Window
	for slot = CONST_PREY_SLOT_FIRST, CONST_PREY_SLOT_THIRD do
		player:sendPreyData(slot)
	end

	-- New prey
	nextPreyTime[playerId] = {
		[CONST_PREY_SLOT_FIRST] = 1,
		[CONST_PREY_SLOT_SECOND] = 1,
		[CONST_PREY_SLOT_THIRD] = 1
	}

	if (player:getAccountType() == ACCOUNT_TYPE_TUTOR) then
	local msg = [[:: Tutor Rules
		1 *> 3 Warnings you lose the job.
		2 *> Without parallel conversations with players in Help, if the player starts offending, you simply mute it.
		3 *> Be educated with the players in Help and especially in the Private, try to help as much as possible.
		4 *> Always be on time, if you do not have a justification you will be removed from the staff.
		5 *> Help is only allowed to ask questions related to tibia.
		6 *> It is not allowed to divulge time up or to help in quest.
		7 *> You are not allowed to sell items in the Help.
		8 *> If the player encounters a bug, ask to go to the website to send a ticket and explain in detail.
		9 *> Always keep the Tutors Chat open. (required).
		10 *> You have finished your schedule, you have no tutor online, you communicate with some CM in-game
		or ts and stay in the help until someone logs in, if you can.
		11 *> Always keep a good Portuguese in the Help, we want tutors who support, not that they speak a satanic ritual.
		12 *> If you see a tutor doing something that violates the rules, take a print and send it to your superiors. "
		- Commands -
		Mute Player: /mute nick, 90 (90 seconds)
		Unmute Player: /unmute nick.
		- Commands -]]
		player:popupFYI(msg)
	end

	-- Open channels
	if table.contains({TOWNS_LIST.DAWNPORT, TOWNS_LIST.DAWNPORT_TUTORIAL}, player:getTown():getId())then
		player:openChannel(3) -- World chat
	else
		player:openChannel(3) -- World chat
		player:openChannel(5) -- Advertsing main
	end

	-- Rewards
	local rewards = #player:getRewardList()
	if(rewards > 0) then
		player:sendTextMessage(MESSAGE_INFO_DESCR, string.format("You have %d %s in your reward chest.",
		rewards, rewards > 1 and "rewards" or "reward"))
	end

	-- Update player id
	local stats = player:inBossFight()
	if stats then
		stats.playerId = player:getId()
	end

	if player:getStorageValue(Storage.combatProtectionStorage) < 1 then
		player:setStorageValue(Storage.combatProtectionStorage, 1)
		onMovementRemoveProtection(playerId, player:getPosition(), 10)
	end
	-- Set Client XP Gain Rate
	local baseExp = 100
	if Game.getStorageValue(GlobalStorage.XpDisplayMode) > 0 then
		baseExp = getRateFromTable(experienceStages, player:getLevel(), configManager.getNumber(configKeys.RATE_EXP))
	end

	local staminaMinutes = player:getStamina()
	local doubleExp = false --Can change to true if you have double exp on the server
	local staminaBonus = (staminaMinutes > 2400) and 150 or ((staminaMinutes < 840) and 50 or 100)
	if doubleExp then
		baseExp = baseExp * 2
	end
	player:setStaminaXpBoost(staminaBonus)
	player:setBaseXpGain(baseExp)

	local worldTime = getWorldTime()
	local hours = math.floor(worldTime / 60)
	local minutes = worldTime % 60
	player:sendTibiaTime(hours, minutes)

	if player:getStorageValue(Storage.isTraining) == 1 then --Reset exercise weapon storage
		player:setStorageValue(Storage.isTraining,0)
	end
	return true
end
playerLogin:register()

 

carai muito obrigado irmao 

Edited by Kralifezik1 (see edit history)
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By Nother
      Olá, gostaria de um sistema de baú donate, onde a pessoa faz o donate, e eu como adm entro no game e coloco os pontos(itens) nesse baú, e somente essa pessoa que eu determinei que vai poder retirar esses itens.
      Esse baú vai funcionar para todos os player mas somente os que eu determinar os itens que poderão retirar. Desde já agradeço
      Meu tfs é 0.4
      Ate disponibilizaria algum código para facilitar mas não faço a menor ideia qual codigo se aproxima mais disso
      Ja vi esse sistema funcionando no Wodbo Wars
       
       

    • By Crema
      .Qual servidor ou website você utiliza como base? 
      Otserv Global 12.6
      Qual o motivo deste tópico? 
      Fala pessoal, criei 4 novas promotions no meu Ot server, porém quando o player entra nessas novas promotions simplesmente ele não consegue mais usar as armas anteriores.
      Eu dei uma boa pesquisada na internet, não sei se estou procurando da forma correta, fiz a alteração no script (/home/otbr/data/scripts/unscripted_weapons.lua) adicionando as novas promotions porém mesmo assim não consigo acessa-las através das novas promotions.
      Eu acho estranho, provavelmente estou mexendo no lugar errado, se não eu teria que alterar TODOS os itens do jogo incluindo uma a uma as novas promotions. Mas confesso que já revirei todas as pastas aqui e não localizo onde pode ser.
       
      Alguem para me dar uma luz?
      Está surgindo algum erro? Se sim coloque-o aqui. 
       
      Você tem o código disponível? Se tiver publique-o aqui: 
        { itemId = 2187, type = WEAPON_WAND, wandType = "fire", level = 33, mana = 8, damage = {56, 74}, vocation = { {"Sorcerer", true}, {"Master Sorcerer"} {"Epic Master Sorcerer"} } }, -- wand of inferno  
      Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. 
       
    • By Helviiozin
      .Qual servidor ou website você utiliza como base? 
      OTX2 / TFS 0.4 
       
      Qual o motivo deste tópico? 
       
      Está surgindo algum erro? Se sim coloque-o aqui. 
       
      Você tem o código disponível? Se tiver publique-o aqui: 
       
       
      Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. 
       
      Salve ! Gostaria de pedir ajuda  com uma coisa ... eu não estou conseguindo dar um clear na area do boss ... "EXEMPLO"  se eu entro  e não consigo matar o boss ... ao entrar de novo terá 2 boss ... Outro problema é fazer uma checagem ... se existir algum player fazendo a boss room  o outro player que puxar a alavanca consegue descer gostaria de bloquear isso com uma mensagem que esta ocupado ... e o ultimo problema é adicionar um tempo para que o player ou os players que fizerem esta boss room só possam fazer novamente após 12 horas ...  e também adicionar um tempo X para que o player ou os players possam fazer o boss se não conseguirem serão kickados para fora da sala   estou  a dias procurando uma solução e enchendo o saco de muita gente pra fazer isso dar certo ...
       
       
       
       

    • By Gran
      Boa noite pessoal! Preciso de uma espécie de arena ativada a partir de um NPC que teletransporta o player para o local! O NPC já tenho e está funcionando perfeitamente:
      Precisaria realmente da parte relacionada a arena em si e queria ela da seguinte forma se possível:
      Assim que o player paga o npc ele é teletransportado e a arena inicia, um monstro por vez que spawna o proximo quando é morto. A cada monstro que é morto o player recebe uma recompensa em dinheiro que vai dobrando, assim como uma quantidade X de xp. Já encontrei alguns scripts de arena, mas nao consegui adaptar para o que quero pois sou iniciante. Ficarei muito grato com qualquer ajuda! Muito obrigado.
    • By gmxunior
      Olá galera boa tarde!
      tudo bem com vocês?
      estou com problema no mod desert war!
       
      ele está funcionando perfeitamente, unico problema é que quem perde é quem ganha os premios.
       
      será que alguem pode me ajuda?
       
      meu script é esse:
       
  • Recently Browsing   0 members

    No registered users viewing this page.


×
×
  • Create New...

Important Information

Confirmação de Termo