Explicare Quest dragon_soul (Alchimie)

Ghiduri şi tutoriale despre cum să vă îmbunătăţiţi serverul/clientul dv. de metin2.
Avatar utilizator
Kvothe31
Nou Venit

Nou Venit
Mesaje: 10
Membru din: 22 Iul 2020, 21:37
Server: Alaska
Regat: Jinno
Aprecieri: 29  
Mulţumiri: 2  
Discord: Copiază ID
Medalii

Salutare draga comunitate! Am observat ca exista multe postari legate de dropul cioburilor de dragon, sau cereri pentru questul obtinerii Cor Draconis.

Multa lume utilizeaza questul urmator: (si se intreaba cum pot schimba rata dropului la cioburi)
O sa va explic acum de ce pica cioburi la fiecare kill.

Cod: Selectaţi tot

quest dragon_soul begin
	state start begin
		when levelup or letter with pc.level >= 30 begin
			send_letter(gameforge.dragon_soul._1010_sendLetter)
			local v = find_npc_by_vnum(20001)
			
			if 0 != v then
				target.vid("__TARGET__", v, mob_name(20001))
			end
		end
		when info or button begin
			say(gameforge.dragon_soul._1020_say)
		end

		when 20001.chat.gameforge.dragon_soul._1030_npcChat with pc.level >= 30 begin
			target.delete("__TARGET__")

			say_title(mob_name(20001))
			say(gameforge.dragon_soul._1040_say)
			set_state(state_learning)
		end
	end
	state state_learning begin
		when letter begin
			send_letter(gameforge.dragon_soul._1050_sendLetter)
		end
		when info or button begin
			say(gameforge.dragon_soul._1060_say)
		end
		when kill begin
			if npc.is_pc() then
				return
			end
			
			if pc.count_item(30270) < 10 then
				if drop_gamble_with_flag("ds_drop") then
					game.drop_item_with_ownership(30270, 1, 300)
				end
			end
		end
		when 20001.chat.gameforge.dragon_soul._1050_sendLetter begin
			say_title(mob_name(20001))
			if pc.count_item(30270) >= 10 then
				say(gameforge.dragon_soul._1070_say)
				pc.remove_item(30270, 10)
				ds.give_qualification()
				char_log(pc.get_player_id(), 'DS_QUALIFICATION', 'SUCCESS')
				pc.give_item2(50255)
				local today = math.floor(get_global_time() / 86400)
				pc.setf("dragon_soul", "eye_timestamp", today)
				pc.setf("dragon_soul", "eye_left", 9)
				set_state(state_farming)
			else
				say(gameforge.dragon_soul._1080_say)
			end
		end
	end
	state state_farming begin
		when letter begin
			send_letter(gameforge.dragon_soul._1090_sendLetter)
		end
		when info or button begin
			say(string.format(gameforge.dragon_soul._1100_say, pc.getf("dragon_soul", "eye_left")))
		end
		when kill begin
			if npc.is_pc() then
				return
			end
			
			if drop_gamble_with_flag("ds_drop") then
				local eye_left = pc.getf("dragon_soul", "eye_left")
				local haved_gemstone_number = pc.count_item(30270)
				
				if eye_left > haved_gemstone_number / 10 then
					game.drop_item_with_ownership(30270, 1, 300)
				end
			end
		end
		when 30270.pick begin
			local eye_left = pc.getf("dragon_soul", "eye_left")
			if eye_left <= 0 then
				return
			end

			if pc.count_item(30270) >= 10 then
				pc.setf("dragon_soul", "eye_left", eye_left - 1)
				pc.remove_item(30270, 10)
				pc.give_item2(50255)
				if 1 == eye_left then
					notice_multiline(gameforge.dragon_soul._1110_notice, notice)
					set_state(state_closed_season)
				end
			end
		end
		when 20001.chat.gameforge.dragon_soul._1120_npcChat begin
			say_title(mob_name(20001))
			local today = math.floor(get_global_time() / 86400)
			if today == pc.getf("dragon_soul", "eye_timestamp") then
				say(gameforge.dragon_soul._1130_say)
			else
				say(gameforge.dragon_soul._1140_say)
				pc.setf("dragon_soul", "eye_timestamp", today)
				pc.setf("dragon_soul", "eye_left", 10)
			end	
		end
	end
	state state_closed_season begin
		when letter begin
			send_letter(gameforge.dragon_soul._1150_sendLetter)
		end
		when info or button begin
			say(gameforge.dragon_soul._1160_say)
			local today = math.floor(get_global_time() / 86400)
			if today == pc.getf("dragon_soul", "eye_timestamp") then
				say(gameforge.dragon_soul._1170_say)
			else
				say(gameforge.dragon_soul._1180_say)
			end
		end
		
		when 20001.chat.gameforge.dragon_soul._1090_sendLetter begin
			say_title(mob_name(20001))
			local today = math.floor(get_global_time() / 86400)
			if today == pc.getf("dragon_soul", "eye_timestamp") then
				say(gameforge.dragon_soul._1130_say)
			else
				say(gameforge.dragon_soul._1140_say)
				pc.setf("dragon_soul", "eye_timestamp", today)
				pc.setf("dragon_soul", "eye_left", 10)
				set_state(state_farming)
			end
		end
	end
	-- deprecated states. so, jump to new state.
	state state_1 begin
		when login begin
			set_state(state_learning)
		end
	end
	state state_2 begin
		when login begin
			set_state(state_learning)
		end
	end
	state state_3 begin
		when login begin
			set_state(state_closed_season)
		end
	end
end
In sectiunea de cod

Cod: Selectaţi tot

when kill begin
	if npc.is_pc() then
		return
	end
			
	if pc.count_item(30270) < 10 then
		if drop_gamble_with_flag("ds_drop") then
			game.drop_item_with_ownership(30270, 1, 300)
		end
	end
end
acel when kill = pentru orice fiinta omorata in joc (inclusiv jucatori, de aceea avem conditia la inceput if npc.is_pc() sa opreasca executia codului. Datorita acestui fapt, pentru orice kill game.drop_item_with_ownership(30270, 1, 300) vom avea drop cioburi.
Ca sa nu ne mai complicam, se poate face o smecherie acestui quest, si anume:

In loc de:

Cod: Selectaţi tot

game.drop_item_with_ownership(30270, 1, 300)
Schimbam cu:

Cod: Selectaţi tot

-- pentru primul "when kill"
local rnd1 = number(1, 10)
if  rnd1 == 1 then
	game.drop_item_with_ownership(30270, 1, 300)
end

-- si pentru al 2-lea "when kill"
local rnd2 = number(1, 10)
if  rnd2 == 1 then
	game.drop_item_with_ownership(30270, 1, 300)
end
in number(x, y) putem seta rata dropului = x/y (in cazul de fata 1/10).
Pentru acest mesaj, Kvothe31 a primit 2 (de) mulţumiri
mido55485 • FlorinDorinStoian
Răspunde
Răspunsuri
1
Vizualizări
140
Răspunsuri
1
Vizualizări
490
Răspunsuri
1
Vizualizări
355
Răspunsuri
10
Vizualizări
4200

Înapoi la “Ghiduri şi Tutoriale”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 7 vizitatori