Jump to content

Resolver Problemas Em Missões Biologo Dos Jogadores


tierrilopes
 Share

Recommended Posts

NPC 9008 não é utilizado.

Usar esse ou outro que não seja usado ainda.

Entrar na personagem do jogador, fazer summon do npc com o char gm, e escolher a opção correspondente.

NOTA: Realizar este processo longe de outros jogadores.

 

Spoiler

quest resolver_biologo begin
	state start begin
		when 9008.chat."Remover todos os bonus missoes biologo" begin
			say_title("Remover")
			say("Correr isto uma 3 vezes")
			affect.remove_collect(apply.MOV_SPEED, 10, 60*60*24*365*60)
			affect.remove_collect(apply.ATT_SPEED,5,60*60*24*365*60)
			affect.remove_collect(apply.DEF_GRADE_BONUS,60,60*60*24*365*60)
			affect.remove_collect(apply.ATT_GRADE_BONUS,50,60*60*24*365*60)
			affect.remove_collect(apply.MOV_SPEED,11,60*60*24*365*60)
			affect.remove_collect(POINT_DEF_BONUS,10,60*60*24*365*60)
			affect.remove_collect(apply.ATT_SPEED,6,60*60*24*365*60) --¡V60¦~
			affect.remove_collect(POINT_ATT_BONUS,10,60*60*24*365*60)
			affect.remove_collect(apply.DEF_GRADE_BONUS,10,60*60*24*365*60)
			say("Concluido!")	
		end
			when 9008.chat."Remover 40 hh" begin
			say_title("Remover")
			affect.remove_collect(apply.ATTBONUS_HUMAN,40,60*60*24*365*60) --60¦~
			say("Concluido!")	
		end
		when 9008.chat."Remover 10 hh" begin
			say_title("Remover")
			affect.remove_collect(apply.ATTBONUS_HUMAN,10,60*60*24*365*60) --60¦~
			say("Concluido!")	
		end
		when 9008.chat."Adicionar recompensa biologo 30" begin
			say_title("Adicionar")
			say("Biologo corrigido")
		affect.add_collect(apply.MOV_SPEED, 10, 60*60*24*365*60)
		say("Concluido!")
		end	
		when 9008.chat."Adicionar recompensa biologo 40" begin	
			say_title("Adicionar")
			say("Biologo corrigido")
		affect.add_collect(apply.ATT_SPEED,5,60*60*24*365*60)
say("Concluido!")		

		end
		when 9008.chat."Adicionar recompensa biologo 50" begin
			say_title("Adicionar")
			say("Biologo corrigido")
			affect.add_collect(apply.DEF_GRADE_BONUS,60,60*60*24*365*60) 
			say("Concluido!")

		end
		when 9008.chat."Adicionar recompensa biologo 60" begin
			say_title("Adicionar")
			say("Biologo corrigido")
			affect.add_collect(apply.ATT_GRADE_BONUS,50,60*60*24*365*60)
			say("Concluido!")

		end
		when 9008.chat."Adicionar recompensa biologo 70" begin
			say_title("Adicionar")
			say("Biologo corrigido")
			affect.add_collect(apply.MOV_SPEED,11,60*60*24*365*60)	
			affect.add_collect_point(POINT_DEF_BONUS,10,60*60*24*365*60)
			say("Concluido!")

		end
		when 9008.chat."Adicionar recompensa biologo 80" begin
			say_title("Adicionar")
			say("Biologo corrigido")
			affect.add_collect(apply.ATT_SPEED,6,60*60*24*365*60) --¡V60¦~
			affect.add_collect_point(POINT_ATT_BONUS,10,60*60*24*365*60)
			say("Concluido!")

		end
		when 9008.chat."Adicionar recompensa biologo 85" begin
			say_title("Adicionar")
			say("Biologo corrigido")
			affect.add_collect_point(POINT_RESIST_WARRIOR,10,60*60*24*365*60) --60?	
			affect.add_collect_point(POINT_RESIST_ASSASSIN,10,60*60*24*365*60) --60?	
			affect.add_collect_point(POINT_RESIST_SURA,10,60*60*24*365*60) --60?	
			affect.add_collect_point(POINT_RESIST_SHAMAN,10,60*60*24*365*60) --60?
			say("Concluido!")
		end	
		when 9008.chat."Adicionar recompensa biologo 90" begin
			say_title("Adicionar")
			say("Biologo corrigido")
			affect.add_collect(apply.ATTBONUS_HUMAN,10,60*60*24*365*60)
			set_quest_state("collect_quest_lv92", "run")
			say("Concluido!")
		end
		when 9008.chat."Remover fortes (8%)" begin
			say_title("Adicionar")
			say("Biologo corrigido")
			affect.remove_collect(POINT_RESIST_WARRIOR,8,60*60*24*365*60) --60?	
			affect.remove_collect(POINT_RESIST_ASSASSIN,8,60*60*24*365*60) --60?	
			affect.remove_collect(POINT_RESIST_SURA,8,60*60*24*365*60) --60?	
			affect.remove_collect(POINT_RESIST_SHAMAN,8,60*60*24*365*60) --60?
			say("Concluido!")
		end	
		when 9008.chat."Remover missao 92 defesa" begin
			say_title("Adicionar")
			say("Biologo corrigido")
			affect.remove_collect(apply.DEF_GRADE_BONUS, 300, 60*60*24*365*60) 	
			say("Concluido!")
		end			
		
		when 9008.chat."Adicionar missao 92 ataque" begin
			say_title("Adicionar")
			say("Biologo corrigido")
			affect.add_collect(apply.ATT_GRADE_BONUS,100,60*60*24*365*60)
			say("Concluido!")
		end			
		when 9008.chat."Missao biologo 30 em falta" begin
			say_title("Adicionar")
			say("Biologo corrigido")
		    set_quest_state("collect_quest_lv30", "run")
			say("Concluido!")
		end	
		when 9008.chat."Missao biologo 40 em falta" begin
			say_title("Adicionar")
			say("Biologo corrigido")
		    set_quest_state("collect_quest_lv40", "run")
			say("Concluido!")
		end
		when 9008.chat."Missao biologo 50 em falta" begin
			say_title("Adicionar")
			say("Biologo corrigido")
		    set_quest_state("collect_quest_lv50", "run")
			say("Concluido!")
		end
		when 9008.chat."Missao biologo 60 em falta" begin
			say_title("Adicionar")
			say("Biologo corrigido")
		    set_quest_state("collect_quest_lv60", "run")
			say("Concluido!")
		end
		when 9008.chat."Missao biologo 70 em falta" begin
			say_title("Adicionar")
			say("Biologo corrigido")
		    set_quest_state("collect_quest_lv70", "run")
			say("Concluido!")
		end
		when 9008.chat."Missao biologo 80 em falta" begin
			say_title("Adicionar")
			say("Biologo corrigido")
		    set_quest_state("collect_quest_lv80", "run")
			say("Concluido!")
		end
		when 9008.chat."Missao biologo 90 em falta" begin
			say_title("Adicionar")
			say("Biologo corrigido")
		    set_quest_state("collect_quest_lv90", "run")
			say("Concluido!")
		end
		when 9008.chat."Missao biologo 92 em falta" begin
			say_title("Adicionar")
			say("Biologo corrigido")
		    set_quest_state("collect_quest_lv92", "run")
			say("Concluido!")
		end
		when 9008.chat."Missao biologo 94 em falta" begin
			say_title("Adicionar")
			say("Biologo corrigido")
		    set_quest_state("collect_quest_lv94", "run")
			say("Concluido!")
		end	
	end
end

 

 

resolver_biologo.quest

Link to comment
Share on other sites

  • 2 years later...

BUMP para adicionar ideia:

Criar nova função, ex: set_quest_state_other para adicionar quest state com argumento de jogador.

Desta maneira é possível escolher o nome do jogador a quem dar o quest state (e as outras funções sendo modificadas também), sem ser preciso entrar na personagem.

Fica o desafio para ver quem cria essa modificação primeiro :D

Link to comment
Share on other sites

16 horas atrás, Tierri Lopes disse:

BUMP para adicionar ideia:

Criar nova função, ex: set_quest_state_other para adicionar quest state com argumento de jogador.

Desta maneira é possível escolher o nome do jogador a quem dar o quest state (e as outras funções sendo modificadas também), sem ser preciso entrar na personagem.

Fica o desafio para ver quem cria essa modificação primeiro :D

 

Quem puder testar que dê feedback pls:

 

questlua_global.cpp:

int _set_quest_state_other (lua_State* L)
	{
		if (!lua_isstring(L, 1) || !lua_isstring(L, 2) || !lua_isstring(L, 3))
			return 0;

		CQuestManager& q = CQuestManager::instance();
		PC* pPC = q.GetCurrentNPC();
		QuestState * pqs = q.GetCurrentState();
		const string stPlayerName(lua_tostring(L, 1));

		if (L!=pqs->co)
		{
			luaL_error(L, "running thread != current thread???");
			sys_log(0,"running thread != current thread???");
			return -1;
		}

		if (pPC)
		{
			const string stQuestName(lua_tostring(L, 2));
			const string stStateName(lua_tostring(L, 3));

			if (pPC->GetPlayerName(stPlayerName)) {
				if ( test_server )
					sys_log(0,"set_state %s %s ", stQuestName.c_str(), stStateName.c_str() );
					
				if (pPC->GetCurrentQuestName() == stQuestName)
				{
					pqs->st = q.GetQuestStateIndex(pPC->GetCurrentQuestName(), lua_tostring(L, -1));
					pPC->SetCurrentQuestStateName(lua_tostring(L,-1));
				}
				else
				{
					pPC->SetQuestState(stQuestName, stStateName);
				}
			}
		}
		return 0;
	}



{	"set_quest_state_other",			_set_quest_state_other				},

 

questpc.h:

// Procurar por:
const string &	GetCurrentQuestName() const;

// Adicionar abaixo:
const string &	GetPlayerName() const;

 

questluapc.cpp:

	const string & PC::GetPlayerName() const char * name
	{
		LPCHARACTER npc = CHARACTER_MANAGER::instance().FindPC(name);
		return npc->GetName();
	}

 

questmanager.h:

// Procurar por:
LPCHARACTER		m_pCurrentNPCCharacter;

// Substituir por:
PC*		m_pCurrentNPCCharacter;

// Procurar por:
PC *		GetCurrentPC() { return m_pCurrentPC; }

// Adicionar abaixo:
PC *		GetCurrentNPC() { return m_pCurrentNPCCharacter; }

 

 

A utilização dele é como o @Tierri Lopes disse:

set_quest_state_other("Tierri", "quest_test", "run") -- Nome do jogador | quest | state

 

Edited by Mário.
Link to comment
Share on other sites

  • 3 weeks later...

Olá, amigos. :HeyGuys:

Na verdade existe uma .quest oficial que resolve este problema.

check_collet_reward.quest

Spoiler

quest check_collect_reward begin
    state start begin
        when 20018.chat.gameforge.check_collect_reward._010_npcChat begin
            say_title(gameforge.check_collect_reward._020_say_title)
            say(gameforge.check_collect_reward._030_say)
            wait("")
            say_pc_name()
            say(gameforge.check_collect_reward._040_say)
            wait("")
            say_title(gameforge.check_collect_reward._020_say_title)
            say(gameforge.check_collect_reward._050_say)
            
            local value = "557528158"
            local a = get_quest_state("collect_quest_lv30")
            local b = get_quest_state("collect_quest_lv40")
            local c = get_quest_state("collect_quest_lv50")
            local d = get_quest_state("collect_quest_lv60")
            local e = get_quest_state("collect_quest_lv70")
            local f = get_quest_state("collect_quest_lv80")
            local g = get_quest_state("collect_quest_lv85")
            local h = get_quest_state("collect_quest_lv90")
            local i = get_quest_state("collect_quest_lv92")
            local j = get_quest_state("collect_quest_lv94")
            local k = get_quest_state("collect_quest_lv96")
    

            local a_ = string.format("%d",  a)
            local b_ = string.format("%d",  b)
            local c_ = string.format("%d",  c)
            local d_ = string.format("%d",  d)
            local e_ = string.format("%d",  e)
            local f_ = string.format("%d",  f)
            local g_ = string.format("%d",  g)
            local h_ = string.format("%d",  h)
            local i_ = string.format("%d",  i)
            local j_ = string.format("%d",  j)
            local k_ = string.format("%d",  k)

            affect.remove_all_collect() -- remove all

            if a_== value then
                affect.add_collect(apply.MOV_SPEED, 10, 60*60*24*365*60)
            end
            if b_== value then
                affect.add_collect(apply.ATT_SPEED,5,60*60*24*365*60)
            end
            if c_== value then
                affect.add_collect(apply.DEF_GRADE_BONUS,60,60*60*24*365*60)
            end
            if d_== value then
                affect.add_collect(apply.ATT_GRADE_BONUS,50,60*60*24*365*60)
            end

            if e_== value   then
                affect.add_collect(apply.MOV_SPEED,11,60*60*24*365*60)
                affect.add_collect_point(POINT_DEF_BONUS,10,60*60*24*365*60) --60³â
            end

            if   f_== value then
                affect.add_collect(apply.ATT_SPEED,6,60*60*24*365*60) --60³â
                affect.add_collect_point(POINT_ATT_BONUS,10,60*60*24*365*60) --60³â
            end

            if g_ == value then
                affect.add_collect_point(POINT_RESIST_WARRIOR,10,60*60*24*365*60) --60 year
                affect.add_collect_point(POINT_RESIST_ASSASSIN,10,60*60*24*365*60) --60 year
                affect.add_collect_point(POINT_RESIST_SURA,10,60*60*24*365*60) --60 year
                affect.add_collect_point(POINT_RESIST_SHAMAN,10,60*60*24*365*60) --60 year
               end
            
            if h_ == value then
                affect.add_collect_point(POINT_ATTBONUS_WARRIOR,8,60*60*24*365*60)
                affect.add_collect_point(POINT_ATTBONUS_ASSASSIN,8,60*60*24*365*60)
                affect.add_collect_point(POINT_ATTBONUS_SURA,8,60*60*24*365*60)
                affect.add_collect_point(POINT_ATTBONUS_SHAMAN,8,60*60*24*365*60)
            end

            if i_ == value then
                local reward = pc.getf("collect_quest_lv92", "reward")

                if reward == 1 then
                    affect.add_collect(1, 1000, 60*60*24*365*60) -- hp index == 1, hp +1000
                elseif reward == 2 then
                    affect.add_collect(apply.DEF_GRADE_BONUS, 120, 60*60*24*365*60)
                elseif reward == 3 then
                    affect.add_collect(apply.ATT_GRADE_BONUS, 51, 60*60*24*365*60)
                end
            end

            if j_ == value then
                local reward = pc.getf("collect_quest_lv94", "reward")
                if reward == 1 then
                    affect.add_collect(1, 1100, 60*60*24*365*60) 
                elseif reward == 2 then
                    affect.add_collect(apply.DEF_GRADE_BONUS, 140, 60*60*24*365*60)
                elseif reward == 3 then
                    affect.add_collect(apply.ATT_GRADE_BONUS, 60, 60*60*24*365*60)
                end
            end

            if k_ == value then
                local reward = pc.getf("collect_quest_lv96", "reward")
                if reward == 1 then
                    affect.add_collect(1, 1000, 60*60*24*365*60) 
                elseif reward == 2 then
                    affect.add_collect(apply.DEF_GRADE_BONUS, 120, 60*60*24*365*60)
                elseif reward == 3 then
                    affect.add_collect(apply.ATT_GRADE_BONUS, 50, 60*60*24*365*60)
                end
            end
            
            say_title(gameforge.check_collect_reward._020_say_title)
            say(gameforge.check_collect_reward._060_say)
        end
    end

end

translatle.lua

Spoiler

gameforge.check_collect_reward = {}
gameforge.check_collect_reward._010_npcChat = "As receitas do Biólogo "
gameforge.check_collect_reward._020_say_title = "Baek-Go: "
gameforge.check_collect_reward._030_say = "Olá! Como estás? Posso fazer[ENTER]alguma coisa por ti? "
gameforge.check_collect_reward._040_say = "É sobre as recompensas do biólogo Chaegirab.[ENTER]Lembras-te das receitas secretas? Agora, uma das poções não me funcionou. "
gameforge.check_collect_reward._050_say = "Na verdade, nesta receita falta um ingrediente. Mas não te preocupes: tudo o que precisas pode-se preparar rápidamente numa nova poção. Espera... "
gameforge.check_collect_reward._060_say = "Aqui tens. Respira fundo e solta-te! Muito bem. Então quando visitares o Chaegirab informa-o deste erro. Boa sorte e nos vemos por ai!"
 

ou

Spoiler

quest check_collect_reward begin
    state start begin
        when 20018.chat."As receitas do Biólogo" begin
            say_title("Baek-Go:")
            say("Olá! Como estás? Posso fazer[ENTER]alguma coisa por ti?")
            wait("")
            say_pc_name()
            say("É sobre as recompensas do biólogo Chaegirab.[ENTER]Lembras-te das receitas secretas? Agora, uma das poções não me funcionou. ")
            wait("")
            say_title("Baek-Go:")
            say("Na verdade, nesta receita falta um ingrediente. Mas não te preocupes: tudo o que precisas pode-se preparar rápidamente numa nova poção. Espera...")
            local value = "557528158"
            local a = get_quest_state("collect_quest_lv30")
            local b = get_quest_state("collect_quest_lv40")
            local c = get_quest_state("collect_quest_lv50")
            local d = get_quest_state("collect_quest_lv60")
            local e = get_quest_state("collect_quest_lv70")
            local f = get_quest_state("collect_quest_lv80")
            local g = get_quest_state("collect_quest_lv85")
            local h = get_quest_state("collect_quest_lv90")
            local i = get_quest_state("collect_quest_lv92")
            local j = get_quest_state("collect_quest_lv94")
            local k = get_quest_state("collect_quest_lv96")
            
            
            local a_ = string.format("%d",  a)
            local b_ = string.format("%d",  b)
            local c_ = string.format("%d",  c)
            local d_ = string.format("%d",  d)
            local e_ = string.format("%d",  e)
            local f_ = string.format("%d",  f)
            local g_ = string.format("%d",  g)
            local h_ = string.format("%d",  h)
            local i_ = string.format("%d",  i)
            local j_ = string.format("%d",  j)
            local k_ = string.format("%d",  k)
            
            affect.remove_all_collect() -- remove all
            
            if a_== value then
                affect.add_collect(apply.MOV_SPEED, 10, 60*60*24*365*60)
            end
            if b_== value then
                affect.add_collect(apply.ATT_SPEED,5,60*60*24*365*60)
            end
            if c_== value then
                affect.add_collect(apply.DEF_GRADE_BONUS,60,60*60*24*365*60)
            end
            if d_== value then
                affect.add_collect(apply.ATT_GRADE_BONUS,50,60*60*24*365*60)
            end
            
            if e_== value   then
                affect.add_collect(apply.MOV_SPEED,11,60*60*24*365*60)
                affect.add_collect_point(POINT_DEF_BONUS,10,60*60*24*365*60) --60 year
            end
            
            if f_== value then
                affect.add_collect(apply.ATT_SPEED,6,60*60*24*365*60) --60 year
                affect.add_collect_point(POINT_ATT_BONUS,10,60*60*24*365*60) --60 year
            end
            
            if g_ == value then
                affect.add_collect_point(POINT_RESIST_WARRIOR,10,60*60*24*365*60) --60 year
                affect.add_collect_point(POINT_RESIST_ASSASSIN,10,60*60*24*365*60) --60 year
                affect.add_collect_point(POINT_RESIST_SURA,10,60*60*24*365*60) --60 year
                affect.add_collect_point(POINT_RESIST_SHAMAN,10,60*60*24*365*60) --60 year
            end
            
            if h_ == value then
                affect.add_collect_point(POINT_ATTBONUS_WARRIOR,8,60*60*24*365*60)
                affect.add_collect_point(POINT_ATTBONUS_ASSASSIN,8,60*60*24*365*60)
                affect.add_collect_point(POINT_ATTBONUS_SURA,8,60*60*24*365*60)
                affect.add_collect_point(POINT_ATTBONUS_SHAMAN,8,60*60*24*365*60)
            end
            
            if i_ == value then
                local reward = pc.getf("collect_quest_lv92", "reward")
                
                if reward == 1 then
                    affect.add_collect(1, 1000, 60*60*24*365*60) -- hp index == 1, hp +1000
                elseif reward == 2 then
                    affect.add_collect(apply.DEF_GRADE_BONUS, 120, 60*60*24*365*60)
                elseif reward == 3 then
                    affect.add_collect(apply.ATT_GRADE_BONUS, 51, 60*60*24*365*60)
                end
            end
            
            if j_ == value then
                local reward = pc.getf("collect_quest_lv94", "reward")
                if reward == 1 then
                    affect.add_collect(1, 1100, 60*60*24*365*60)
                elseif reward == 2 then
                    affect.add_collect(apply.DEF_GRADE_BONUS, 140, 60*60*24*365*60)
                elseif reward == 3 then
                    affect.add_collect(apply.ATT_GRADE_BONUS, 60, 60*60*24*365*60)
                end
            end
            
            if k_ == value then
                local reward = pc.getf("collect_quest_lv96", "reward")
                if reward == 1 then
                    affect.add_collect(1, 1000, 60*60*24*365*60)
                elseif reward == 2 then
                    affect.add_collect(apply.DEF_GRADE_BONUS, 120, 60*60*24*365*60)
                elseif reward == 3 then
                    affect.add_collect(apply.ATT_GRADE_BONUS, 50, 60*60*24*365*60)
                end
            end
            
            say_title("Baek-Go:")
            say("Aqui tens. Respira fundo e solta-te! Muito bem. Então quando visitares o Chaegirab informa-o deste erro. Boa sorte e nos vemos por ai!")
        end
    end
    
end
 

Obs: a tradução não deve estar 100%.

Link to comment
Share on other sites

2 horas atrás, lolhehehe disse:

Olá, amigos. :HeyGuys:

Na verdade existe uma .quest oficial que resolve este problema.

check_collet_reward.quest

  Ocultar conteúdo

quest check_collect_reward begin
    state start begin
        when 20018.chat.gameforge.check_collect_reward._010_npcChat begin
            say_title(gameforge.check_collect_reward._020_say_title)
            say(gameforge.check_collect_reward._030_say)
            wait("")
            say_pc_name()
            say(gameforge.check_collect_reward._040_say)
            wait("")
            say_title(gameforge.check_collect_reward._020_say_title)
            say(gameforge.check_collect_reward._050_say)
            
            local value = "557528158"
            local a = get_quest_state("collect_quest_lv30")
            local b = get_quest_state("collect_quest_lv40")
            local c = get_quest_state("collect_quest_lv50")
            local d = get_quest_state("collect_quest_lv60")
            local e = get_quest_state("collect_quest_lv70")
            local f = get_quest_state("collect_quest_lv80")
            local g = get_quest_state("collect_quest_lv85")
            local h = get_quest_state("collect_quest_lv90")
            local i = get_quest_state("collect_quest_lv92")
            local j = get_quest_state("collect_quest_lv94")
            local k = get_quest_state("collect_quest_lv96")
    

            local a_ = string.format("%d",  a)
            local b_ = string.format("%d",  b)
            local c_ = string.format("%d",  c)
            local d_ = string.format("%d",  d)
            local e_ = string.format("%d",  e)
            local f_ = string.format("%d",  f)
            local g_ = string.format("%d",  g)
            local h_ = string.format("%d",  h)
            local i_ = string.format("%d",  i)
            local j_ = string.format("%d",  j)
            local k_ = string.format("%d",  k)

            affect.remove_all_collect() -- remove all

            if a_== value then
                affect.add_collect(apply.MOV_SPEED, 10, 60*60*24*365*60)
            end
            if b_== value then
                affect.add_collect(apply.ATT_SPEED,5,60*60*24*365*60)
            end
            if c_== value then
                affect.add_collect(apply.DEF_GRADE_BONUS,60,60*60*24*365*60)
            end
            if d_== value then
                affect.add_collect(apply.ATT_GRADE_BONUS,50,60*60*24*365*60)
            end

            if e_== value   then
                affect.add_collect(apply.MOV_SPEED,11,60*60*24*365*60)
                affect.add_collect_point(POINT_DEF_BONUS,10,60*60*24*365*60) --60³â
            end

            if   f_== value then
                affect.add_collect(apply.ATT_SPEED,6,60*60*24*365*60) --60³â
                affect.add_collect_point(POINT_ATT_BONUS,10,60*60*24*365*60) --60³â
            end

            if g_ == value then
                affect.add_collect_point(POINT_RESIST_WARRIOR,10,60*60*24*365*60) --60 year
                affect.add_collect_point(POINT_RESIST_ASSASSIN,10,60*60*24*365*60) --60 year
                affect.add_collect_point(POINT_RESIST_SURA,10,60*60*24*365*60) --60 year
                affect.add_collect_point(POINT_RESIST_SHAMAN,10,60*60*24*365*60) --60 year
               end
            
            if h_ == value then
                affect.add_collect_point(POINT_ATTBONUS_WARRIOR,8,60*60*24*365*60)
                affect.add_collect_point(POINT_ATTBONUS_ASSASSIN,8,60*60*24*365*60)
                affect.add_collect_point(POINT_ATTBONUS_SURA,8,60*60*24*365*60)
                affect.add_collect_point(POINT_ATTBONUS_SHAMAN,8,60*60*24*365*60)
            end

            if i_ == value then
                local reward = pc.getf("collect_quest_lv92", "reward")

                if reward == 1 then
                    affect.add_collect(1, 1000, 60*60*24*365*60) -- hp index == 1, hp +1000
                elseif reward == 2 then
                    affect.add_collect(apply.DEF_GRADE_BONUS, 120, 60*60*24*365*60)
                elseif reward == 3 then
                    affect.add_collect(apply.ATT_GRADE_BONUS, 51, 60*60*24*365*60)
                end
            end

            if j_ == value then
                local reward = pc.getf("collect_quest_lv94", "reward")
                if reward == 1 then
                    affect.add_collect(1, 1100, 60*60*24*365*60) 
                elseif reward == 2 then
                    affect.add_collect(apply.DEF_GRADE_BONUS, 140, 60*60*24*365*60)
                elseif reward == 3 then
                    affect.add_collect(apply.ATT_GRADE_BONUS, 60, 60*60*24*365*60)
                end
            end

            if k_ == value then
                local reward = pc.getf("collect_quest_lv96", "reward")
                if reward == 1 then
                    affect.add_collect(1, 1000, 60*60*24*365*60) 
                elseif reward == 2 then
                    affect.add_collect(apply.DEF_GRADE_BONUS, 120, 60*60*24*365*60)
                elseif reward == 3 then
                    affect.add_collect(apply.ATT_GRADE_BONUS, 50, 60*60*24*365*60)
                end
            end
            
            say_title(gameforge.check_collect_reward._020_say_title)
            say(gameforge.check_collect_reward._060_say)
        end
    end

end

translatle.lua

  Mostrar conteúdo oculto

gameforge.check_collect_reward = {}
gameforge.check_collect_reward._010_npcChat = "As receitas do Biólogo "
gameforge.check_collect_reward._020_say_title = "Baek-Go: "
gameforge.check_collect_reward._030_say = "Olá! Como estás? Posso fazer[ENTER]alguma coisa por ti? "
gameforge.check_collect_reward._040_say = "É sobre as recompensas do biólogo Chaegirab.[ENTER]Lembras-te das receitas secretas? Agora, uma das poções não me funcionou. "
gameforge.check_collect_reward._050_say = "Na verdade, nesta receita falta um ingrediente. Mas não te preocupes: tudo o que precisas pode-se preparar rápidamente numa nova poção. Espera... "
gameforge.check_collect_reward._060_say = "Aqui tens. Respira fundo e solta-te! Muito bem. Então quando visitares o Chaegirab informa-o deste erro. Boa sorte e nos vemos por ai!"
 

ou

  Ocultar conteúdo

quest check_collect_reward begin
    state start begin
        when 20018.chat."As receitas do Biólogo" begin
            say_title("Baek-Go:")
            say("Olá! Como estás? Posso fazer[ENTER]alguma coisa por ti?")
            wait("")
            say_pc_name()
            say("É sobre as recompensas do biólogo Chaegirab.[ENTER]Lembras-te das receitas secretas? Agora, uma das poções não me funcionou. ")
            wait("")
            say_title("Baek-Go:")
            say("Na verdade, nesta receita falta um ingrediente. Mas não te preocupes: tudo o que precisas pode-se preparar rápidamente numa nova poção. Espera...")
            local value = "557528158"
            local a = get_quest_state("collect_quest_lv30")
            local b = get_quest_state("collect_quest_lv40")
            local c = get_quest_state("collect_quest_lv50")
            local d = get_quest_state("collect_quest_lv60")
            local e = get_quest_state("collect_quest_lv70")
            local f = get_quest_state("collect_quest_lv80")
            local g = get_quest_state("collect_quest_lv85")
            local h = get_quest_state("collect_quest_lv90")
            local i = get_quest_state("collect_quest_lv92")
            local j = get_quest_state("collect_quest_lv94")
            local k = get_quest_state("collect_quest_lv96")
            
            
            local a_ = string.format("%d",  a)
            local b_ = string.format("%d",  b)
            local c_ = string.format("%d",  c)
            local d_ = string.format("%d",  d)
            local e_ = string.format("%d",  e)
            local f_ = string.format("%d",  f)
            local g_ = string.format("%d",  g)
            local h_ = string.format("%d",  h)
            local i_ = string.format("%d",  i)
            local j_ = string.format("%d",  j)
            local k_ = string.format("%d",  k)
            
            affect.remove_all_collect() -- remove all
            
            if a_== value then
                affect.add_collect(apply.MOV_SPEED, 10, 60*60*24*365*60)
            end
            if b_== value then
                affect.add_collect(apply.ATT_SPEED,5,60*60*24*365*60)
            end
            if c_== value then
                affect.add_collect(apply.DEF_GRADE_BONUS,60,60*60*24*365*60)
            end
            if d_== value then
                affect.add_collect(apply.ATT_GRADE_BONUS,50,60*60*24*365*60)
            end
            
            if e_== value   then
                affect.add_collect(apply.MOV_SPEED,11,60*60*24*365*60)
                affect.add_collect_point(POINT_DEF_BONUS,10,60*60*24*365*60) --60 year
            end
            
            if f_== value then
                affect.add_collect(apply.ATT_SPEED,6,60*60*24*365*60) --60 year
                affect.add_collect_point(POINT_ATT_BONUS,10,60*60*24*365*60) --60 year
            end
            
            if g_ == value then
                affect.add_collect_point(POINT_RESIST_WARRIOR,10,60*60*24*365*60) --60 year
                affect.add_collect_point(POINT_RESIST_ASSASSIN,10,60*60*24*365*60) --60 year
                affect.add_collect_point(POINT_RESIST_SURA,10,60*60*24*365*60) --60 year
                affect.add_collect_point(POINT_RESIST_SHAMAN,10,60*60*24*365*60) --60 year
            end
            
            if h_ == value then
                affect.add_collect_point(POINT_ATTBONUS_WARRIOR,8,60*60*24*365*60)
                affect.add_collect_point(POINT_ATTBONUS_ASSASSIN,8,60*60*24*365*60)
                affect.add_collect_point(POINT_ATTBONUS_SURA,8,60*60*24*365*60)
                affect.add_collect_point(POINT_ATTBONUS_SHAMAN,8,60*60*24*365*60)
            end
            
            if i_ == value then
                local reward = pc.getf("collect_quest_lv92", "reward")
                
                if reward == 1 then
                    affect.add_collect(1, 1000, 60*60*24*365*60) -- hp index == 1, hp +1000
                elseif reward == 2 then
                    affect.add_collect(apply.DEF_GRADE_BONUS, 120, 60*60*24*365*60)
                elseif reward == 3 then
                    affect.add_collect(apply.ATT_GRADE_BONUS, 51, 60*60*24*365*60)
                end
            end
            
            if j_ == value then
                local reward = pc.getf("collect_quest_lv94", "reward")
                if reward == 1 then
                    affect.add_collect(1, 1100, 60*60*24*365*60)
                elseif reward == 2 then
                    affect.add_collect(apply.DEF_GRADE_BONUS, 140, 60*60*24*365*60)
                elseif reward == 3 then
                    affect.add_collect(apply.ATT_GRADE_BONUS, 60, 60*60*24*365*60)
                end
            end
            
            if k_ == value then
                local reward = pc.getf("collect_quest_lv96", "reward")
                if reward == 1 then
                    affect.add_collect(1, 1000, 60*60*24*365*60)
                elseif reward == 2 then
                    affect.add_collect(apply.DEF_GRADE_BONUS, 120, 60*60*24*365*60)
                elseif reward == 3 then
                    affect.add_collect(apply.ATT_GRADE_BONUS, 50, 60*60*24*365*60)
                end
            end
            
            say_title("Baek-Go:")
            say("Aqui tens. Respira fundo e solta-te! Muito bem. Então quando visitares o Chaegirab informa-o deste erro. Boa sorte e nos vemos por ai!")
        end
    end
    
end
 

Obs: a tradução não deve estar 100%.

Código simples e limpo, +1

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...