Jump to content
La fin ?! Elle est là ! ×
×
×
  • Create New...
  • 0

Amélioration de quête svp


VorGam
 Share

Question

Bonjour à tous,

 

J'aimerais ajouter une fonction a ma quête pve mais je ne sais pas trop quoi mettre j'aimerais ajouter un compteur de kill de mob par exemple tuer 10 monstre et l'item en question tombe pour pouvoir up un certains level's (version de mes files 2014)

 

Si quelqu'un pourrait m'aider au plus vite sa serais super merci d'avance a celui ou celle qui m'aideras ! :)

 

quest bourse begin

    state start begin

        when kill with pc.get_map_index()==140 begin -- à changer par ton index de map

            if pc.get_level() <= 155 then -- possibilité de drop du lv 1 à 155 

                local s = number(1, 100)-- 

                if s <= 10 then -- pourcentage de drops ( il me semble ) 

                    pc.give_item2(30096, 1) 

                end

            end

        end

        when 30096.use begin

            pc.set_level(250)

            item.remove()

        end

    end

end

Link to comment
Share on other sites

  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

3 answers to this question

Recommended Posts

  • 0

Pour que ça soit plus compréhensible pour toi, tu peux modifier les valeurs au début

 

quest bourse begin
   state start begin
	function settings()
		local setting = {}
		setting.index_de_la_map = 140
		setting.level_max_pour_drop = 155
		setting.chance_de_drop = 10
		setting.item_a_droper = 30096
		setting.nbre_de_mobs_a_tuer = 10
		if pc.get_map_index() == setting.index_de_la_map and pc.get_level() <= setting.level_max_pour_drop then
			return true
		end
		return setting
	end
       when kill with not npc.is_pc() and bourse.settings() == true begin
		local setting = bourse.settings()
		pc.setqf("mobs_avt_drop", pc.getqf("mobs_avt_drop")+1)
		if pc.getqf("mobs_avt_drop") == setting.nbre_de_mobs_a_tuer then
			pc.setqf("mobs_avt_drop", 0)
               local s = number(1, 100)
               if s <= setting.chance_de_drop then
                   pc.give_item2(setting.item_a_droper, 1) 
               end
           end
       end
       when 30096.use begin
           pc.set_level(250)
           item.remove()
       end
   end
end

Link to comment
Share on other sites

  • 0

Salut, pour avoir un compteur de kill tu peut utiliser cette fonction

 

when 2105.party_kill or
	2107.party_kill begin

	pc.setqf("kill_count", pc.getqf("kill_count")+1)
	q.set_counter("Nombre d'archer restant à tuer : ", 100-pc.getqf("kill_count"))

	if get_time()>=pc.getqf("limit_time") then
		clear_letter()
		setstate(failure)
	end		
end

 

2105 = Archer scorpion

2107 = Archer serpent

C'est un exemple, je serais très certainement corriger si je dis des conneries mais j'utilise cette fonction pour mes quetes dada, et ca fonctionnes.

Essais, ce sera au petit bonheur la chance ^^

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share



Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.