Ir para conteúdo
  • Cadastre-se

Scripting [login.lua] Adicionar quests ao player


Posts Recomendados

Distro: OTX Malucoo | TFS 1.3;

 

Boa noite, pessoal.

 

Estou com uma distro que preciso completar todas as missions para ter acesso, por exemplo: Acesso Yalahar
 

Porém mesmo assim não aparece no questlog, tentei criar um novo char e mesmo assim, não funcionou.

 

Este é meu login.lua;

Linha 187:         player:setStorageValue(Storage.WrathoftheEmperor.Mission01, 3) --> Mesmo assim não funciona.

Estou fazendo algo errado?

local events = {
	'ElementalSpheresOverlords',
	'BigfootBurdenVersperoth',
	'Razzagorn',
	'Shatterer',
	'Zamulosh', 
	'The Hunger',
	'The Rage',
	'Eradicator',
	'Eradicator1',
	'Rupture',
	'World Devourer',   
	'Tarbaz',
	'Shulgrax',
	'Ragiaz',
	'Plagirath',
	'Mazoran',
	'Destabilized',
	'BigfootBurdenWiggler',
	'SvargrondArenaKill',
	'NewFrontierShardOfCorruption',
	'NewFrontierTirecz',
	'ServiceOfYalaharDiseasedTrio',
	'ServiceOfYalaharAzerus',
	'ServiceOfYalaharQuaraLeaders',
	'InquisitionBosses',
	'InquisitionUngreez',
	'KillingInTheNameOfKills',
	'KillingInTheNameOfKillss',
	'KillingInTheNameOfKillsss',
	'MastersVoiceServants',
	'SecretServiceBlackKnight',
	'ThievesGuildNomad',
	'WotELizardMagistratus',
	'WotELizardNoble',
	'WotEKeeper',
	'Maxxed',
	'WotEBosses',
	'WotEZalamon',
	'WarzoneThree',
	'PlayerDeath',
	'AdvanceSave',
	'bossesWarzone',
	'AdvanceRookgaard',
	'PythiusTheRotten',
	'DropLoot',
	'Yielothax',
	'BossParticipation',
	'Energized Raging Mage',
	'Raging Mage', 
	'modalMD1',
	'VibrantEgg',
	'DeathCounter',
	'KillCounter',
	'bless1',
	'lowerRoshamuul',
	'SpikeTaskQuestCrystal',
	'SpikeTaskQuestDrillworm',
	'petlogin',
	'Idle',
	'petthink',
	'UpperSpikeKill',
	'MiddleSpikeKill',
	'LowerSpikeKill'
}
 
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:setBankBalance(0)
		player:setOutfit({lookType = (player:getSex() == 1 and 128 or 136), lookHead = 78, lookBody = 106, lookLegs = 58, lookFeet = 76})     
		player:sendTutorial(1)
	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
 
	player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
   
	local playerId = player:getId()
    
	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 Stamina
	for i = 1, 3 do
		nextUseStaminaPrey[playerId + i] = {Time = 1}
	end

	-- Prey Data
	if (player:getVocation():getId() ~= 0) then
		local columnUnlocked = getUnlockedColumn(player)
		if (not columnUnlocked) then
			columnUnlocked = 0
		end

		for i = 0, columnUnlocked do
			sendPreyData(player, i)
		end
	end

	if (player:getAccountType() == ACCOUNT_TYPE_TUTOR) then
		local msg = [[:: Regras Tutor ::
			1*>3 Advertências você perde o cargo.
			2*>Sem conversas paralelas com jogadores no Help, se o player começar a ofender, você simplesmente o mute.
			3*>Seja educado com os player no Help e principalmente no Privado, tenta ajudar o máximo possível.
			4*>Sempre logue no seu horário, caso não tiver uma justificativa você será removido da staff.
			5*>Help é somente permitido realizar dúvidas relacionadas ao tibia.
			6*>Não é Permitido divulgar time pra upar ou para ajudar em quest.
			7*>Não é permitido venda de itens no Help.
			8*>Caso o player encontre um bug, peça para ir ao site mandar um ticket e explicar em detalhes.
			9*>Mantenha sempre o Chat dos Tutores aberto. (obrigatório).
			10*>Você terminou de cumprir seu horário, viu que não tem nenhum tutor Online, você comunica com algum CM in-game ou ts e fica no help até alguém logar, se der.
			11*>Mantenha sempre um ótimo português no Help, queremos tutores que dêem suporte, não que fiquem falando um ritual satânico.
			12*>Se ver um tutor fazendo algo que infrinja as regras, tire uma print e envie aos superiores."
			-- Comandos --
			Mutar Player: /mute nick,90. (90 segundos)
			Desmutar Player: /unmute nick.
			-- Comandos --]]
		player:popupFYI(msg)
	end
   
	-- OPEN CHANNERLS (ABRIR CHANNELS)
	if table.contains({"Rookgaard", "Dawnport"}, player:getTown():getName())then
		player:openChannel(6) -- advertsing rook main
	else
		player:openChannel(5) -- advertsing main
	end
	player:openChannel(3) -- world chat
	--player:openChannel(7) -- help channel

	-- Rewards
	local rewards = #player:getRewardList()
	if(rewards > 0) then
		player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 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
 
	-- Events
	for i = 1, #events do
		player:registerEvent(events[i])
	end
 
	if player:getStorageValue(Storage.combatProtectionStorage) < 1 then
		player:setStorageValue(Storage.combatProtectionStorage, 1)
		onMovementRemoveProtection(playerId, player:getPosition(), 10)
		player:setStorageValue(Storage.WrathoftheEmperor.Mission01, 3)
	end

	-- Exp stats
	local staminaMinutes = player:getStamina()
	local Boost = player:getExpBoostStamina()
	if staminaMinutes > 2400 and player:isPremium() then
		player:setStaminaXpBoost(150) -- 200 = 1.0x, 200 = 2.0x, ... premium account
	elseif staminaMinutes <= 840 then
		player:setStaminaXpBoost(50) -- 50 = 0.5x   all players
	else
		player:setStaminaXpBoost(100)
	end

	player:setStoreXpBoost(Boost > 0 and 50 or 0)
	return true
end 

 

questlog.png

Editado por Talis T. Foesten
Atualização (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

@Talis T. Foesten 
Você adicionou certinho em data/xml/quests.xml ?
Pois para parecer ai no quest log você deve fazer isso:

	<quest name="NAME QUEST" startstorageid="STORAGE PRINCIPAL" startstoragevalue="0" endvalue="1">
		<mission name="NAME MISSIONS" storageid="STORAGE MISSIONS" startvalue="0" endvalue="1">
			<missionstate id="1" description="Mensagem de dentro da mission..."/>
		</mission>
	</quest>

 

--
Fora que tbm Storage.WrathoftheEmperor.Mission01
Esta sendo setado em alguma LIB ?

Só pegar o storage e ir jogando la no quests.xml

 

Link para o post
Compartilhar em outros sites

@tataboy67

Creio não ser isso, pois estou utilizando os proprios IDs que estão no 051-storages.lua e em quests.xml

 

 Login.lua

	-- Events
	for i = 1, #events do
		player:registerEvent(events[i])
	end
 
	if player:getStorageValue(Storage.combatProtectionStorage) < 1 then
		player:setStorageValue(Storage.combatProtectionStorage, 1)
		onMovementRemoveProtection(playerId, player:getPosition(), 10)	
		--Quests Liberadas
			--InServiceofYalahar
				player:setStorageValue(Storage.InServiceofYalahar.Questline, 5)
				player:setStorageValue(Storage.InServiceofYalahar.Mission01, 6)
				player:setStorageValue(TheWayToYalahar.QuestLine, 30)
	end

 

 

 

051-storages.lua

    TheWayToYalahar = {
        QuestLine = 30
    },
    InServiceofYalahar = {
        Questline = 12240, -- Storage through the Quest
        Mission01 = 12241,
        Mission02 = 12242,
        Mission03 = 12243,
        Mission04 = 12244,
        Mission05 = 12245,
        Mission06 = 12246,
        Mission07 = 12247,
        Mission08 = 12248,
        Mission09 = 12249,
        Mission10 = 12250,
        SewerPipe01 = 12251,
        SewerPipe02 = 12252,
        SewerPipe03 = 12253,
        SewerPipe04 = 12254,
        DiseasedDan = 12255,
        DiseasedBill = 12256,
        DiseasedFred = 12257,
        AlchemistFormula = 12258,
        BadSide = 12259,
        GoodSide = 12260,
        MrWestDoor = 12261,
        MrWestStatus = 12262,
        TamerinStatus = 12263,
        MorikSummon = 12264,
        QuaraState = 12265,
        QuaraSplasher = 12266,
        QuaraSharptooth = 12267,
        QuaraInky = 12268,
        MatrixState = 12269,
        SideDecision = 12270,
        MatrixReward = 12271,
        NotesPalimuth = 12272,
        NotesAzerus = 12273,
        DoorToAzerus = 12274,
        DoorToBog = 12275,
        DoorToLastFight = 12276,
        DoorToMatrix = 12277,
        DoorToQuara = 12278,
        DoorToReward = 12279
    },

 

Quests.xml

<quest name="In Service of Yalahar" startstorageid="12240" startstoragevalue="5">
        <mission name="Mission 01: Something Rotten" storageid="12241" startvalue="1" endvalue="6">
            <missionstate id="1" description="Palimuth asked you to help with some sewer malfunctions. You will need a Crowbar, there are 4 places where you need to go marked with an X on your map." />
            <missionstate id="2" description="You cleaned 1 pipe of 4 from the garbage." />
            <missionstate id="3" description="You cleaned 2 pipes of 4 from the garbage." />
            <missionstate id="4" description="You cleaned 3 pipes of 4 from the garbage." />
            <missionstate id="5" description="You cleaned 4 pipes of 4 from the garbage. Go back to Palimuth and report your mission" />
            <missionstate id="6" description="You cleaned all pipes from the garbage! Go back to Palimuth and ask for mission." />
        </mission>
        <mission name="Mission 02: Watching the Watchmen" storageid="12242" startvalue="1" endvalue="8">
            <missionstate id="1" description="You have to find all 7 guards and give a report to them." />
            <missionstate id="2" description="You reported to 1 of 7 guards" />
            <missionstate id="3" description="You reported to 2 of 7 guards" />
            <missionstate id="4" description="You reported to 3 of 7 guards" />
            <missionstate id="5" description="You reported to 4 of 7 guards" />
            <missionstate id="6" description="You reported to 5 of 7 guards" />
            <missionstate id="7" description="You reported to 6 of 7 guards" />
            <missionstate id="8" description="You reported to 7 of 7 guards! Go back to Palimuth and ask for mission." />
        </mission>
        <mission name="Mission 03: Death to the Deathbringer" storageid="12243" startvalue="1" endvalue="6">
            <missionstate id="1" description="Get the notes in Palimuths room and read them. Talk to Palimuth again when you've read the notes." />
            <missionstate id="2" description="Talk to Azerus the Yalahari in the city centre to get your next mission." />
            <missionstate id="3" description="Get the notes behind the Yalahari and read them. Talk to Azerus again and ask him for mission when you've read the notes." />
            <missionstate id="4" description="Ask Palimuth for mission." />
            <missionstate id="5" description="First you will need to kill the three plague bearers and then get The Alchemists' Formulas. When this have been done head back to either Palimuth (good side) or Yalahari (Azerus) (bad side)." />
            <missionstate id="6" description="Ask Azerus the Yalahari for a mission." />
        </mission>
        <mission name="Mission 04: Good to be Kingpin" storageid="12244" startvalue="1" endvalue="6">
            <missionstate id="1" description="Ask Palimuth for mission." />
            <missionstate id="2" description="For this mission you are asked to go to the Trade Quarter and negotiate or threaten Mr. West. Once again you will gain access to the mechanism although if you choose to help Palimuth you should go through the sewers." />
            <missionstate id="3" description="You decided to help Palimuth, report him your mission." />
            <missionstate id="4" description="You decided to help Azerus, report him your mission. " />
            <missionstate id="5" description="Get back to Azerus and report him your mission." />
            <missionstate id="6" description="Ask Azerus for a mission." />
        </mission>
        <mission name="Mission 05: Food or Fight" storageid="12245" startvalue="1" endvalue="8">
            <missionstate id="1" description="Ask Palimuth for mission." />
            <missionstate id="2" description="On this mission you are asked to find a druid by the name of Tamerin, on the Arena Quarter. You now have permission to use the gates mechanism." />
            <missionstate id="3" description="The first is to bring Tamerin a flask of Animal Cure, you can buy this from Siflind on Nibelor (northeast of Svargrond)." />
            <missionstate id="4" description="now you have to kill Morik the Gladiator and bring his helmet to Tamerin as proof." />
            <missionstate id="5" description="Report back to Tamerin as he will listen to your request and you can now make your choice: Cattle for Palimuth (good side), Warbeasts for Yalahari (Azerus) (bad side). Then report the one you decided your mission." />
            <missionstate id="6" description="You decided to help Palimuth, report him your mission." />
            <missionstate id="7" description="You decided to help Azerus, report him your mission." />
            <missionstate id="8" description="Ask Azerus for a mission." />
        </mission>
        <mission name="Mission 06: Frightening Fuel" storageid="12246" startvalue="1" endvalue="5">
            <missionstate id="1" description="Ask Palimuth for mission." />
            <missionstate id="2" description="Yalahari (Azerus) orders you to travel to the Cemetery Quarter and find the Strange Carving. He gives you a Ghost Charm and tells you to charge it with the tormented souls of the ghosts there to be used as an energy source. Palimuth wants the Charged Ghost Charm in order to free those souls. You can new use the Cemetery Quarter mechanism now. Go to the big building in the Cemetery Quarter and use the Ghost Charm on the Strange Carving at the back of the room." />
            <missionstate id="3" description="Good side: Go to Palimuth, ask him about your mission, and hand in the charm. Bad side: Ask about your mission to Yalahari (Azerus) and give it back." />
            <missionstate id="4" description="Get back to Azerus and report him your mission." />
            <missionstate id="5" description="Ask Azerus for a mission." />
        </mission>
        <mission name="Mission 07: A Fishy Mission" storageid="12247" startvalue="1" endvalue="5">
            <missionstate id="1" description="Ask Palimuth for mission." />
            <missionstate id="2" description="Bad side: Yalahari (Azerus) will send you for a new mission to go to the Sunken Quarter and kill the Quara Leaders, Inky, Splasher and Sharptooth. Good side: Rather than fighting any Quara leaders Palimuth will instead send you to find the cause for the Quaras aggressive behavior. Find Maritima and talk to her about the Quara and she will explain what their problem is." />
            <missionstate id="3" description="Get back to Palimuth and report him your mission." />
            <missionstate id="4" description="You killed the Quarabosses. Ask Azerus for a mission." />
            <missionstate id="5" description="Ask Azerus for a mission." />
        </mission>
        <mission name="Mission 08: Dangerous Machinations" storageid="12248" startvalue="1" endvalue="4">
            <missionstate id="1" description="Ask Palimuth for mission." />
            <missionstate id="2" description="Bad side: For this mission the Yalahari requests you go to the Factory Quarter and find a pattern crystal, which will be used to supply weapons to help take control of the city. Good side: Palimuth will send you there to use the crystal to supply food for the city." />
            <missionstate id="3" description="Get back to Azerus and report him your mission." />
            <missionstate id="4" description="Ask Azerus for a mission." />
        </mission>
        <mission name="Mission 09: Decision" storageid="12249" startvalue="1" endvalue="2">
            <missionstate id="1" description="You now need to decide between supporting Palimuth or the Yalahari's goal. To choose Palimuth's good side go to him, and simply ask him for a mission mission. Likewise, to join the Yalahari (Azerus) (bad side) go to him and say the same." />
            <missionstate id="2" description="you already decided!" />
        </mission>
        <mission name="Mission 10: The Final Battle" storageid="12250" startvalue="1" endvalue="5">
            <missionstate id="1" description="Palimuth told you that a circle of Yalahari is planning some kind of ritual. They plan to create a portal for some powerful demons and to unleash them in the city to 'purge' it once and for all." />
            <missionstate id="2" description="The entrance to their inner sanctum has been opened for you. Be prepared for a HARD battle! Better gather some friends to assist you." />
            <missionstate id="3" description="Report back to whichever principal you have chosen to help and you will receive Yalaharian Outfits." />
            <missionstate id="4" description="You got the access to the reward room. Choose carefully which reward you pick as you can only take one item." />
            <missionstate id="5" description="You have completed the Quest!" />
        </mission>
    </quest>

Tentei com Get e com Set, porém nenhum surtiu efeito.

Link para o post
Compartilhar em outros sites

Podem encerrar o tópico, já consegui.

--Para quem quiser, solução;
--Procurar no login.lua: 	
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)

--Adicionar abaixo, exemplo yalahar quest:
	--Quests Liberadas;
	--In Service of Yalahar 
	-->player:setStorageValue(Storage.NOME_QUEST_NO_ARQUIVO_051-storages.lua.ID OU NOME REFERENTE AO START DA QUEST EM QUESTS.XML, ID REFERENTE AO START OU O END DA QUEST)
		player:setStorageValue(Storage.InServiceofYalahar.Questline, 5) --> START
		player:setStorageValue(Storage.InServiceofYalahar.Mission01, 6) --> END MISSION
		player:setStorageValue(Storage.InServiceofYalahar.Mission02, 8) --> END MISSION
		player:setStorageValue(Storage.InServiceofYalahar.Mission03, 6) --> END MISSION
		player:setStorageValue(Storage.InServiceofYalahar.Mission04, 6) --> END MISSION
		player:setStorageValue(Storage.InServiceofYalahar.Mission05, 8) --> END MISSION
		player:setStorageValue(Storage.InServiceofYalahar.Mission06, 5) --> END MISSION
		player:setStorageValue(Storage.InServiceofYalahar.Mission07, 5) --> END MISSION
		player:setStorageValue(Storage.InServiceofYalahar.Mission08, 4) --> END MISSION
		player:setStorageValue(Storage.InServiceofYalahar.Mission09, 2) --> END MISSION
		player:setStorageValue(Storage.InServiceofYalahar.Mission10, 1) --> OPEN MISSION

 

Link para o post
Compartilhar em outros sites

Eu fiz uma publicação de um pequeno código que é melhor estruturado, caso prefira. Tenha cuidado na organização de seus códigos, porque no futuro para uma manutenção se torna complicado.

discord.pngDiscord: vankk #7765

Precisando de ajuda? Entre em contato comigo via Discord.

 

Muitos vêm seus muitos dias de glória, mas poucos vêm seus muitos dias de luta.

Link para o post
Compartilhar em outros sites
  • 9 months later...
Em 25/12/2018 em 20:15, Talis T. Foesten disse:

Podem encerrar o tópico, já consegui.


--Para quem quiser, solução;
--Procurar no login.lua: 	
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)

--Adicionar abaixo, exemplo yalahar quest:
	--Quests Liberadas;
	--In Service of Yalahar 
	-->player:setStorageValue(Storage.NOME_QUEST_NO_ARQUIVO_051-storages.lua.ID OU NOME REFERENTE AO START DA QUEST EM QUESTS.XML, ID REFERENTE AO START OU O END DA QUEST)
		player:setStorageValue(Storage.InServiceofYalahar.Questline, 5) --> START
		player:setStorageValue(Storage.InServiceofYalahar.Mission01, 6) --> END MISSION
		player:setStorageValue(Storage.InServiceofYalahar.Mission02, 8) --> END MISSION
		player:setStorageValue(Storage.InServiceofYalahar.Mission03, 6) --> END MISSION
		player:setStorageValue(Storage.InServiceofYalahar.Mission04, 6) --> END MISSION
		player:setStorageValue(Storage.InServiceofYalahar.Mission05, 8) --> END MISSION
		player:setStorageValue(Storage.InServiceofYalahar.Mission06, 5) --> END MISSION
		player:setStorageValue(Storage.InServiceofYalahar.Mission07, 5) --> END MISSION
		player:setStorageValue(Storage.InServiceofYalahar.Mission08, 4) --> END MISSION
		player:setStorageValue(Storage.InServiceofYalahar.Mission09, 2) --> END MISSION
		player:setStorageValue(Storage.InServiceofYalahar.Mission10, 1) --> OPEN MISSION

 

 

Olá, eu preciso de ajuda.

 

Eu ja tenho todos os setstoragevalue das quests que eu gostaria de permitir acesso no meu servidor, enfim, eu entro no servidor e no meu questlog aparecem as quests lá como completas, exatamente como eu quero, porém nenhum delas tem efeito no servidor, por exemplo, acesso a yalahar.

eu tenho a setstorage inteira dela e ela também aparece no meu questlog, mas nem se quer eu consigo acessar yalahar, quando falo hi, sail , yalahar, o capitão do návio não permite que eu vá para o local, e sim eu ja tentei em outros e nada está dando certo para nenhuma das quests as quais eu permiti acesso, por exemplo acesso a gnomebase, ou a quest wrath of the emperor, bom eu já não sei mais o que fazer , o problema é que elas aparecem no questlog como feitas mas não tem efeito dentro do servidor.

e sim eu tentei adicionar o que você falou ai sobre player:sendtextmessage e também não adiantou nada.

Link para o post
Compartilhar em outros sites
  • 11 months later...

Talvez seja melhor adicionar todas as chaves referentes a uma especifica quest, certo?

Exemplo da ExplorerSociety quest, que comeca em 50530 e termina em 50558.

Algo utilizando um range de valores (inicio e fim).

            $storageKeys = [
                [ 'start' => 50470'end' => 50508 ], // ForgottenKnowledge
                [ 'start' => 504'end' => 505 ], // oo
            ];
            foreach ($storageKeys as $pair) {
                for ($i=$pair['start']; $i<=$pair['end']; $i++) {
                    $this->setStorage($i1); // set player storage
                }
            }
Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por cloudrun2023
      CloudRun - Sua Melhor Escolha para Hospedagem de OTServer!
      Você está procurando a solução definitiva para hospedar seu OTServer com desempenho imbatível e segurança inigualável? Não procure mais! Apresentamos a CloudRun, sua parceira confiável em serviços de hospedagem na nuvem.
       
      Recursos Exclusivos - Proteção DDoS Avançada:
      Mantenha seu OTServer online e seguro com nossa robusta proteção DDoS, garantindo uma experiência de jogo ininterrupta para seus jogadores.
       
      Servidores Ryzen 7 Poderosos: Desfrute do poder de processamento superior dos servidores Ryzen 7 para garantir um desempenho excepcional do seu OTServer. Velocidade e estabilidade garantidas!
       
      Armazenamento NVMe de Alta Velocidade:
      Reduza o tempo de carregamento do jogo com nosso armazenamento NVMe ultrarrápido. Seus jogadores vão adorar a rapidez com que podem explorar o mundo do seu OTServer.
       
      Uplink de até 1GB:
      Oferecemos uma conexão de alta velocidade com até 1GB de largura de banda, garantindo uma experiência de jogo suave e livre de lag para todos os seus jogadores, mesmo nos momentos de pico.
       
      Suporte 24 Horas:
      Estamos sempre aqui para você! Nossa equipe de suporte está disponível 24 horas por dia, 7 dias por semana, para resolver qualquer problema ou responder a qualquer pergunta que você possa ter. Sua satisfação é a nossa prioridade.
       
      Fácil e Rápido de Começar:
      Configurar seu OTServer na CloudRun é simples e rápido. Concentre-se no desenvolvimento do seu jogo enquanto cuidamos da hospedagem.
       
      Entre em Contato Agora!
      Website: https://central.cloudrun.com.br/index.php?rp=/store/cloud-ryzen-brasil
      Email: [email protected]
      Telefone: (47) 99902-5147

      Não comprometa a qualidade da hospedagem do seu OTServer. Escolha a CloudRun e ofereça aos seus jogadores a melhor experiência de jogo possível. Visite nosso site hoje mesmo para conhecer nossos planos e começar!
       
      https://central.cloudrun.com.br/index.php?rp=/store/cloud-ryzen-brasil
       
      CloudRun - Onde a Velocidade Encontra a Confiabilidade!
       

    • Por FeeTads
      SALVE rapaziada do TK, esses dias vim pensando em novos scripts pro meu OT, e em um deles eu precisava que determinada area não contasse frag pro player que matasse outros, PORÉM eu precisava que os players que morressem nessa area ainda assim tivessem as penalidades da sua morte, procurei por ai, achei alguns scripts que apenas tiravam o SKULL e não realmente o FRAG do player.

      **script atualizado 22/10/2023** - melhorado e otimizado, levei o script pra puxar as infos por .lua / creatureScripts

      vou disponibilizar o code aqui, e o que fazer pra determinada area não contar frag.

      SOURCE OTX 2 / TFS 0.x, Funciona em TFS 1.x mudando as tags e ajeitando as sintaxes.

      vá em creatureevent.cpp

      procure por:
      else if(type == "preparedeath") _type = CREATURE_EVENT_PREPAREDEATH;
      Adiciona abaixo:
      else if(type == "nocountfrag") _type = CREATURE_EVENT_NOCOUNTFRAG;

      procure por:
      case CREATURE_EVENT_PREPAREDEATH: return "onPrepareDeath";  
      Adicione abaixo: 
      case CREATURE_EVENT_NOCOUNTFRAG: return "noCountFragArea";

      procure por:
      case CREATURE_EVENT_PREPAREDEATH: return "cid, deathList";
      Adicione abaixo:
      case CREATURE_EVENT_NOCOUNTFRAG: return "cid, target";

      agora no mesmo arquivo, vá até o final do arquivo e adicione essa função:
      uint32_t CreatureEvent::executeNoCountFragArea(Creature* creature, Creature* target) { //noCountFragArea(cid, target) if(m_interface->reserveEnv()) { ScriptEnviroment* env = m_interface->getEnv(); if(m_scripted == EVENT_SCRIPT_BUFFER) { env->setRealPos(creature->getPosition()); std::ostringstream scriptstream; scriptstream << "local cid = " << env->addThing(creature) << std::endl; scriptstream << "local target = " << env->addThing(target) << std::endl; if(m_scriptData) scriptstream << *m_scriptData; bool result = true; if(m_interface->loadBuffer(scriptstream.str())) { lua_State* L = m_interface->getState(); result = m_interface->getGlobalBool(L, "_result", true); } m_interface->releaseEnv(); return result; } else { #ifdef __DEBUG_LUASCRIPTS__ std::ostringstream desc; desc << creature->getName(); env->setEvent(desc.str()); #endif env->setScriptId(m_scriptId, m_interface); env->setRealPos(creature->getPosition()); lua_State* L = m_interface->getState(); m_interface->pushFunction(m_scriptId); lua_pushnumber(L, env->addThing(creature)); lua_pushnumber(L, env->addThing(target)); bool result = m_interface->callFunction(2); m_interface->releaseEnv(); return result; } } else { std::clog << "[Error - CreatureEvent::noCountFragArea] Call stack overflow." << std::endl; return 0; } }

      agora vá em creatureevent.h

      procure por:
      CREATURE_EVENT_PREPAREDEATH
      adicione abaixo:
      CREATURE_EVENT_NOCOUNTFRAG

      procure por:
      uint32_t executePrepareDeath(Creature* creature, DeathList deathList);
      Adicione abaixo:
      uint32_t executeNoCountFragArea(Creature* creature, Creature* target);

      agora vá em player.cpp

      procure por:
      bool Player::onKilledCreature(Creature* target, DeathEntry& entry)
      abaixo de:
      War_t enemy; if(targetPlayer->getEnemy(this, enemy)) { if(entry.isLast()) IOGuild::getInstance()->updateWar(enemy); entry.setWar(enemy); }
      Adicione o seguinte código:
      if (targetPlayer){ CreatureEventList killEvents = getCreatureEvents(CREATURE_EVENT_NOCOUNTFRAG); for (const auto &event : killEvents) { if (!event->executeNoCountFragArea(this, target)) { return true; } } }

      //

      Feito isso, tudo completo na sua source, agora é necessário adicionar o creaturescript dentro do servidor

      vá até creaturescripts/scripts
      crie um arquivo chamado, "noCountFragInArea.lua"
      e dentro dele cole o código:
       
      --[[ script feito por feetads / TibiaKing ]]-- --[[ discord: feetads / FeeTads#0246 ]]-- -- Add positions here for which you do not want to count frags local areas = { [1] = {from = {x = 91, y = 122, z = 7}, to = {x = 98, y = 127, z = 7}}, -- from = area superior esquerda / to = area inferior direita (formando um quadrado) } local onlyKillerInArea = false -- only killer need to be in area? function noCountFragArea(cid, target) if not isCreature(cid) or not isCreature(target) then return true end local posKiller = getPlayerPosition(cid) local posTarget = getPlayerPosition(target) for i = 1, #areas do local area = areas[i] if isInArea(posKiller, area.from, area.to) then if onlyKillerInArea then return false elseif isInArea(posTarget, area.from, area.to) then return false end end end return true end
      agora em creaturescripts.xml
      <event type="nocountfrag" name="fragarea" event="script" value="noCountFragInArea.lua"/>
      agora em creaturescripts/scripts/login.lua
       procure por OU semelhante a esse:
      registerCreatureEvent(cid, "AdvanceSave")
      e abaixo adicione:
      registerCreatureEvent(cid, "fragarea")

      //


      Agora tudo certo, quando quiser adiciona uma area que não pega frag, vá até o script e apenas coloque a area, igual o demonstrado no script

      Exemplo:
      local areas = { [1] = {from = {x = 91, y = 122, z = 7}, to = {x = 98, y = 127, z = 7}}, [2] = {from = {x = 1000, y = 1000, z = 7}, to = {x = 1100, y = 1100, z = 7}}, }
      assim somente colocando a area no script e abrindo o server ou dando /reload, já funcionará a area como não pegar frag.
      Esse sistema pode ser bom pra areas de pvp ativo, onde você ainda quer que o player que morrer perca os atributos, como se fosse uma morte normal, porém não conta frag pra quem matar.
      Bom pra sistemas tipo castle 48h (guild war), onde há diversas mortes e risco de pegar red, atrapalhando a war.

      Façam bom proveito dos scripts, e deixem os créditos no script rsrs

      **Eu fiz as alterações e o simples código por isso vim disponibilizar, créditos meus**
    • Por Muvuka
      Abri canal a força creaturescript acho que funcione no creaturescript cria script creaturescript
       
      <channel id="9" name="HELP" logged="yes"/>
      <channel id="12" name="Report Bugs" logged="yes"/>
      <channel id="13" name="Loot" logged="yes"/>
      <channel id="14" name="Report Character Rules Tibia Rules" logged="yes"/>
      <channel id="15" name="Death Channel"/>
      <channel id="6548" name="DexSoft" level="1"/>
      <channel id="7" name="Reports" logged="yes"/>
       
      antes de 
              if(lastLogin > 0) then adicione isso:
                      doPlayerOpenChannel(cid, CHANNEL_HELP) doPlayerOpenChannel(cid, 1,  2, 3) = 1,2 ,3 Channels, entendeu? NÃO FUNCIONA EU QUERO UM MEIO DE ABRI SEM USA A SOURCE
       
      EU NÃO CONSEGUI ABRI EU NÃO TENHO SOURCE
       
       
    • Por bolachapancao
      Rapaziada seguinte preciso de um script que ao utilizar uma alavanca para até 4 jogadores.
      Os jogadores serão teleportados para hunt durante uma hora e depois de uma hora os jogadores serão teleportados de volta para o templo.
       
      Observação: caso o jogador morra ou saia da hunt o evento hunt é cancelado.

      Estou a base canary
      GitHub - opentibiabr/canary: Canary Server 13.x for OpenTibia community.
       
    • Por RAJADAO
      .Qual servidor ou website você utiliza como base? 
      Sabrehaven 8.0
      Qual o motivo deste tópico? 
      Ajuda com novos efeitos
       
      Olá amigos, gostaria de ajuda para introduzir os seguintes efeitos no meu servidor (usando o Sabrehaven 8.0 como base), adicionei algumas runas novas (avalanche, icicle, míssil sagrado, stoneshower & Thunderstorm) e alguns novos feitiços (exevo mas san, exori san, exori tera, exori frigo, exevo gran mas frigo, exevo gran mas tera, exevo tera hur, exevo frigo hur) mas nenhum dos efeitos dessas magias parece existir no servidor, alguém tem um link para um tutorial ou algo assim para que eu possa fazer isso funcionar?
      Desculpe pelo mau inglês, sou brasileiro.

      Obrigado!


      AVALANCHE RUNE id:3161 \/
      (COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)

      STONESHOWER RUNE id:3175 \/
      (COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_STONES)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH)

      THUNDERSTORM RUNE id:3202 \/
      (COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_E NERGYHIT)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)

      ICICLE RUNE id:3158 \/
      COMBAT_ICEDAMAGE
      CONST_ME_ICEAREA
      CONST_ANI_ICE

      SANTO MÍSSIL RUNA id:3182 \/
      (COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)

      CONST_ME_PLANTATTACK (exevo gran mas tera)
      CONST_ME_ICETORNADO (exevo gran mas frigo)
      CONST_ME_SMALLPLANTS (exevo tera hur)
      CONST_ME_ICEAREA (exevo frigo hur)
      CONST_ME_ICEATTACK (exori frigo)
      CONST_ME_CARNIPHILA (exori tera)

      EXORI SAN \/
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
      CONST_ME_HOLYDAM IDADE

      EXEVO MAS SAN \/
      CONST_ME_HOLYAREA
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo