Ir para conteúdo
  • 0
Kodyac

Scripting LIBERAÇÃO de quests para players em OTSERVER.

Pergunta

Kodyac    0
Kodyac

 

Base:

Nome do servidor : Osiris / Nome do cliente : TFS 1.3 / Nome do Website : ainda não tem. 

Qual é a sua pergunta?

Como liberar acesso a quests para os players.

EX : Postman Missions ( poder entrar no jogo já com a missão completa, já podendo utilizar qualquer correio da postman mission.)

EX : BigFootBurden ( poder ter acesso a todas as áreas de caça as quais dão acesso aos bosses que dropam os item gnome. )

Dois exemplos são o suficiente para entender o que quero fazer no servidor.

já li vários tópicos deste site e muitos me fizeram a chegar em pontos ótimos mas o problema que estou tendo no momento é que, após adicionar as linhas de código propostas em outros posts daqui deste site eu obtive resultados visuais e não físico podendo assim dizer.

ou seja : no meu questlog aparecem as missões como já feitas (COMPLETED), porém elas não tem função dentro do jogo, quando vou testar se os acessos estão liberados é como se eu nem tivesse as quests ali no questlog como completas, não consigo usar os correios da postman, não consigo acessar as áreas de caça dos gnome e etc.

já cheguei a testar quase todas as quests presentes no meu questlog escritas como completed ou mesmo até a parte que elas estejam.

enfim vou postar o que fiz no meu login.lua e o resultado que isso causou no meu tibia versão 12.

Vou anexar o meu login.lua por completo aqui para entenderem melhor oque eu fiz, creio que quem é expert na área vai saber aonde coloquei as coisas e vai poder me auxiliar sobre o certo e o errado para correção desse problema

grato!

Gilberto.

 

Você tem o código disponível? Se tiver poste-o na caixa de código que está dentro do spoiler abaixo:

Spoiler
function Player.sendTibiaTime(selfhoursminutes)
    local msg = NetworkMessage()
    msg:addByte(0xEF)
    msg:addByte(hours)
    msg:addByte(minutes)
    msg:sendToPlayer(self)
    msg:delete()
    return true
end
 
local function onMovementRemoveProtection(cidoldPositiontime)
    local player = Player(cid)
    if not player then
        return true
    end
 
    local playerPosition = player:getPosition()
    if (playerPosition.x ~= oldPosition.x or playerPosition.y ~= oldPosition.y or playerPosition.z ~= oldPosition.z) or player:getTarget() then
        player:setStorageValue(Storage.combatProtectionStorage0)
        return true
    end
 
    addEvent(onMovementRemoveProtection, 1000, cid, oldPosition, time - 1)
end
 
function onLogin(player)
    local loginStr = 'Welcome to ' .. configManager.getString(configKeys.SERVER_NAME) .. '!'
    if player:getLastLoginSaved() <= 0 then
        loginStr = loginStr .. ' Please choose your outfit.'
        player:sendOutfitWindow()
        player:setBankBalance(0)
    else
        if loginStr ~= "" then  
            player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
        end
 
        loginStr = string.format('Your last visit was on %s.'os.date('%a %b %d %X %Y', player:getLastLoginSaved()))
    end
    
--Quests Liberadas
    --In Service of Yalahar 
    player:setStorageValue(Storage.InServiceofYalahar.Questline5)
    player:setStorageValue(Storage.InServiceofYalahar.Mission016)
    player:setStorageValue(Storage.InServiceofYalahar.Mission028)
    player:setStorageValue(Storage.InServiceofYalahar.Mission036)
    player:setStorageValue(Storage.InServiceofYalahar.Mission046)
    player:setStorageValue(Storage.InServiceofYalahar.Mission058)
    player:setStorageValue(Storage.InServiceofYalahar.Mission065)
    player:setStorageValue(Storage.InServiceofYalahar.Mission075)
    player:setStorageValue(Storage.InServiceofYalahar.Mission084)
    player:setStorageValue(Storage.InServiceofYalahar.Mission092)
    player:setStorageValue(Storage.InServiceofYalahar.Mission101)
--WOTE
    player:setStorageValue(Storage.WrathoftheEmperor.Questline1)
    player:setStorageValue(Storage.WrathoftheEmperor.Mission013)
    player:setStorageValue(Storage.WrathoftheEmperor.Mission023)
    player:setStorageValue(Storage.WrathoftheEmperor.Mission033)
    player:setStorageValue(Storage.WrathoftheEmperor.Mission043)
    player:setStorageValue(Storage.WrathoftheEmperor.Mission053)
    player:setStorageValue(Storage.WrathoftheEmperor.Mission064)
    player:setStorageValue(Storage.WrathoftheEmperor.Mission076)
    player:setStorageValue(Storage.WrathoftheEmperor.Mission082)
    player:setStorageValue(Storage.WrathoftheEmperor.Mission092)
    player:setStorageValue(Storage.WrathoftheEmperor.Mission101)
    --Imbuiment
    player:setStorageValue(Storage.ForgottenKnowledge.Tomes1)
    player:setStorageValue(Storage.ForgottenKnowledge.LastLoreKilled1)    
    player:setStorageValue(Storage.ForgottenKnowledge.TimeGuardianKilled1)
    player:setStorageValue(Storage.ForgottenKnowledge.HorrorKilled1)
    player:setStorageValue(Storage.ForgottenKnowledge.DragonkingKilled1)
    player:setStorageValue(Storage.ForgottenKnowledge.ThornKnightKilled1)
    player:setStorageValue(Storage.ForgottenKnowledge.LloydKilled1)
    player:setStorageValue(Storage.ForgottenKnowledge.LadyTenebrisKilled1)
    player:setStorageValue(Storage.ForgottenKnowledge.AccessMachine1)
    --SearoutsYalahar
    player:setStorageValue(Storage.SearoutesAroundYalahar.Darashia1)
    player:setStorageValue(Storage.SearoutesAroundYalahar.AbDendriel1)
    player:setStorageValue(Storage.SearoutesAroundYalahar.Venore1)
    player:setStorageValue(Storage.SearoutesAroundYalahar.Ankrahmun1)
    player:setStorageValue(Storage.SearoutesAroundYalahar.PortHope1)
    player:setStorageValue(Storage.SearoutesAroundYalahar.Thais1)
    player:setStorageValue(Storage.SearoutesAroundYalahar.LibertyBay1)
    player:setStorageValue(Storage.SearoutesAroundYalahar.Carlin1)
 
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
 
    local playerId = player:getId()
 
    DailyReward.init(playerId)
 
    player:loadSpecialStorage()
 
    --[[-- Maintenance mode
    if (player:getGroup():getId() < 2) then
        return false
    else
 
    end--]]
 
    if (player:getGroup():getId() >= 4then
        player:setGhostMode(true)
    end
 
    -- Stamina
    nextUseStaminaTime[playerId] = 1
 
    -- EXP Stamina
    nextUseXpStamina[playerId] = 1
 
    -- 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({"Rookgaard""Dawnport"}, player:getTown():getName())then
        player:openChannel(3-- world chat
        player:openChannel(6-- advertsing rook main
    else
        player:openChannel(3-- world chat
        player:openChannel(5-- advertsing main
    end
    -- Rewards
    local rewards = #player:getRewardList()
    if(rewards > 0then
        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.combatProtectionStorage1)
        onMovementRemoveProtection(playerId, player:getPosition(), 10)
        
    local quests = {"What a Foolish""War Against The Hive""Unnatural Selection""Tibia Tales""The White Raven Monastery""The Thieves Guild""The Rookie Guard""The Repenters""The Queen of the Banshees""The Ice Islands""The Gravedigger of Drefia""The Desert Dungeon""The Beginning""The Ancient Tombs""Spike Tasks""Secret Service""Sea of Light""Hot Cuisine""Friends and Traders""Elemental Spheres""Adventurers Guild""A Father's Burden""The Shattered Isles""The Postman Missions""Bigfoot's Burden""The Hidden City Of Beregar""The Ape City""Children Of The Revolution""The New Frontier""The Explorer Society""Spirithunters Quest, "-- coloca os nomes das quests aqui
 
    for i, questname in pairs(quests) do
        local quest = Game.getQuest(Game.getQuestIdByName(questname))
        if quest and player:getStorageValue(quest.startstorageid) == -1 then
            player:setStorageValue(quest.startstorageid, quest.startstoragevalue)
            for m, missionvalue in pairs(quest.missionsdo
                local mission =  Game.getMission(Game.getQuestIdByName(questname), m)
                if mission and player:getStorageValue(mission.storageid) < mission.endvalue then
                    player:setStorageValue(mission.storageid, mission.endvalue)
                end
            end
        end
    end
    end
 
    -- Set Client XP Gain Rate
    if Game.getStorageValue(GlobalStorage.XpDisplayMode) > 0 then
        displayRate = Game.getExperienceStage(player:getLevel())
        else
        displayRate = 1
    end
    local staminaMinutes = player:getStamina()
    local storeBoost = player:getExpBoostStamina()
    player:setStoreXpBoost(storeBoost > 0 and 50 or 0)
    if staminaMinutes > 2400 and player:isPremium() and storeBoost > 0 then
        player:setBaseXpGain(displayRate*2*100-- Premium + Stamina boost + Store boost
        player:setStaminaXpBoost(150)
    elseif staminaMinutes > 2400 and player:isPremium() and storeBoost <= 0 then
        player:setBaseXpGain(displayRate*1.5*100-- Premium + Stamina boost
        player:setStaminaXpBoost(150)
    elseif staminaMinutes <= 2400 and staminaMinutes > 840 and player:isPremium() and storeBoost > 0 then
        player:setBaseXpGain(displayRate*1.5*100-- Premium + Store boost
        player:setStaminaXpBoost(100)
    elseif staminaMinutes > 840 and storeBoost > 0 then
        player:setBaseXpGain(displayRate*1.5*100-- FACC + Store boost
        player:setStaminaXpBoost(100)
    elseif staminaMinutes <= 840 and storeBoost > 0 then
        player:setBaseXpGain(displayRate*1*100-- ALL players low stamina + Store boost
        player:setStaminaXpBoost(50)
    elseif staminaMinutes <= 840 then
        player:setBaseXpGain(displayRate*0.5*100-- ALL players low stamina
        player:setStaminaXpBoost(50)
    end
 
    if player:getClient().version > 1110 then
        local worldTime = getWorldTime()
        local hours = math.floor(worldTime / 60)
        local minutes = worldTime % 60
        player:sendTibiaTime(hours, minutes)
    end
    
    if player:getStorageValue(Storage.isTraining) == 1 then -- redefinir storage de exercise weapon
        player:setStorageValue(Storage.isTraining,0)
    end
    return true
end

 

Você tem alguma imagem que possa auxiliar no problema? Se sim, anexe-a dentro do spoiler abaixo:

Spoiler

image.thumb.png.a51ba58f0529c34f3dde328952c657bb.pngimage.thumb.png.8162921589fd96a4a6b5059e245d55c6.pngimage.thumb.png.a51ba58f0529c34f3dde328952c657bb.png

 

Compartilhar este post


Link para o post
Compartilhar em outros sites

1 resposta a esta questão

Recommended Posts

  • 0
Majesty    1755
Majesty

Você não pode adicionar outros códigos no arquivo sem saber o que os códigos existentes fazem, antes tem que entender como funciona para adicionar corretamente. A adição do segundo código quebrou a função de um 'if'.

Segue o login.lua com os códigos para liberação de quests:

Spoiler

function Player.sendTibiaTime(self, hours, minutes)
	local msg = NetworkMessage()
	msg:addByte(0xEF)
	msg:addByte(hours)
	msg:addByte(minutes)
	msg:sendToPlayer(self)
	msg:delete()
	return true
end

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

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

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

function onLogin(player)
	local loginStr = 'Welcome to ' .. configManager.getString(configKeys.SERVER_NAME) .. '!'
	if player:getLastLoginSaved() <= 0 then
		loginStr = loginStr .. ' Please choose your outfit.'
		player:sendOutfitWindow()
	else
		if loginStr ~= "" then
			player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
		end

		loginStr = string.format('Your last visit was on %s.', os.date('%a %b %d %X %Y', player:getLastLoginSaved()))
	end 
  
  --Quests Liberadas
    --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)
    --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, 1)
        --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) 

    player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)

    local playerId = player:getId()

	DailyReward.init(playerId)

    player:loadSpecialStorage()

    --[[-- Maintenance mode
    if (player:getGroup():getId() < 2) then
        return false
    else

    end--]]

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

    -- Stamina
    nextUseStaminaTime[playerId] = 1

    -- EXP Stamina
    nextUseXpStamina[playerId] = 1

	-- Prey Small Window
	if player:getClient().version > 1110 then
		for slot = CONST_PREY_SLOT_FIRST, CONST_PREY_SLOT_THIRD do
			player:sendPreyData(slot)
		end
	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({"Rookgaard", "Dawnport"}, player:getTown():getName())then
		player:openChannel(3) -- world chat
		player:openChannel(6) -- advertsing rook main
	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
  
  	local quests = {"What a Foolish", "War Against The Hive", "Unnatural Selection", "Tibia Tales", "The White Raven Monastery", "The Thieves Guild", "The Rookie Guard", "The Repenters", "The Queen of the Banshees", "The Ice Islands", "The Gravedigger of Drefia", "The Desert Dungeon", "The Beginning", "The Ancient Tombs", "Spike Tasks", "Secret Service", "Sea of Light", "Hot Cuisine", "Friends and Traders", "Elemental Spheres", "Adventurers Guild", "A Father's Burden", "The Shattered Isles", "The Postman Missions", "Bigfoot's Burden", "The Hidden City Of Beregar", "The Ape City", "Children Of The Revolution", "The New Frontier", "The Explorer Society", "Spirithunters Quest",} -- coloca os nomes das quests aqui
        for i, questname in pairs(quests) do
            local quest = Game.getQuest(Game.getQuestIdByName(questname))
            if quest and player:getStorageValue(quest.startstorageid) == -1 then
                player:setStorageValue(quest.startstorageid, quest.startstoragevalue)
                for m, missionvalue in pairs(quest.missions) do
                    local mission =  Game.getMission(Game.getQuestIdByName(questname), m)
                    if mission and player:getStorageValue(mission.storageid) < mission.endvalue then
                        player:setStorageValue(mission.storageid, mission.endvalue)
                    end
                end
            end
        end
  
	-- Set Client XP Gain Rate
	if Game.getStorageValue(GlobalStorage.XpDisplayMode) > 0 then
		displayRate = Game.getExperienceStage(player:getLevel())
		else
		displayRate = 1
	end
	local staminaMinutes = player:getStamina()
	local storeBoost = player:getExpBoostStamina()
	player:setStoreXpBoost(storeBoost > 0 and 50 or 0)
	if staminaMinutes > 2400 and player:isPremium() and storeBoost > 0 then
		player:setBaseXpGain(displayRate*2*100) -- Premium + Stamina boost + Store boost
		player:setStaminaXpBoost(150)
	elseif staminaMinutes > 2400 and player:isPremium() and storeBoost <= 0 then
		player:setBaseXpGain(displayRate*1.5*100) -- Premium + Stamina boost
		player:setStaminaXpBoost(150)
	elseif staminaMinutes <= 2400 and staminaMinutes > 840 and player:isPremium() and storeBoost > 0 then
		player:setBaseXpGain(displayRate*1.5*100) -- Premium + Store boost
		player:setStaminaXpBoost(100)
	elseif staminaMinutes > 840 and storeBoost > 0 then
		player:setBaseXpGain(displayRate*1.5*100) -- FACC + Store boost
		player:setStaminaXpBoost(100)
	elseif staminaMinutes <= 840 and storeBoost > 0 then
		player:setBaseXpGain(displayRate*1*100) -- ALL players low stamina + Store boost
		player:setStaminaXpBoost(50)
	elseif staminaMinutes <= 840 then
		player:setBaseXpGain(displayRate*0.5*100) -- ALL players low stamina
		player:setStaminaXpBoost(50)
	end

	if player:getClient().version > 1110 then
		local worldTime = getWorldTime()
		local hours = math.floor(worldTime / 60)
		local minutes = worldTime % 60
		player:sendTibiaTime(hours, minutes)
	end
	
	if player:getStorageValue(Storage.isTraining) == 1 then -- redefinir storage de exercise weapon
		player:setStorageValue(Storage.isTraining,0)
	end
    return true
end

 

Obs 1: de um servidor para outro, os códigos (linhas) do arquivo podem ser diferentes.

Obs 2: Havia um pequeno erro que corrigi no segundo código do tópico: https://forums.otserv.com.br/index.php?/forums/topic/168834-liberando-acesso-a-quests-e-cidades-atualizado/

Nome de quest sem fechamento de " (aspas). Ele funciona, o que acontece no jogo é que não entrega todos os storages, o quests.lua precisa ser revisado: https://github.com/opentibiabr/otservbr-global/blob/develop/data/lib/core/quests.lua

No quests.lua (The Postman Missions) até fiz um exemplo e adicionei a missão 12 para ele entregar a storage da porta e assim poder usar o mailbox:

[12] = {
	name = "Postman Door", storageid = Storage.postman.Door, startvalue = 1, endvalue = 5,
	states = {
		[1] = "STATE 1",
		[2] = "STATE 2",
		[3] = "STATE 3",
		[4] = "STATE 4",
		[5] = "STATE 5",
	},

},

Também pode ser feito assim no login.lua (junto do primeiro código):

player:setStorageValue(Storage.postman.Door, 1) 

O storage da porta (12461) é encontrado aqui:

https://github.com/opentibiabr/otservbr-global/blob/develop/data/lib/tables/storages.lua#L988

Então, todas as quests precisam ser revisadas, se tiver todas as missões com os storages o segundo código funcionará corretamente.

Compartilhar este post


Link para o post
Compartilhar em outros sites
Visitante
Este tópico está impedido de receber novos posts.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×