Cerere modificare quest

Închis
Avatar utilizator
Metrix008
Nivel 1

Nivel 1
Mesaje: 146
Membru din: 16 Noi 2016, 18:10
Regat: Jinno
Aprecieri: 191  
Mulţumiri: 4  
 Contact:
Medalii

Salut, am si eu un quest pentru drop la cioburi dragon care functioneaza bine, singura problema este ca dropeaza cioburi la orice nivel, de exemplu eu sunt level 100 si bat caini de lvl 1 si imi pica cioburi, cum pot sa pun o limita de level la drop sa pice doar la mobi apropiati de nivelul meu?

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
					local rnd1 = number(1, 100)
					if  rnd1 == 1 then
				game.drop_item_with_ownership(30270, 1, 300)
					end
				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", 4)
				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 / 5 then
					local rnd2 = number(1, 50)
					if  rnd2 == 1 then
					game.drop_item_with_ownership(30270, 1, 300)
					
					end
				end
			end
		end
		when 30270.pick or kill or login or logout or levelup 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", 5)
			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", 5)
				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

Multumesc anticipat
Avatar utilizator
Metrix008
Nivel 1

Nivel 1
Mesaje: 146
Membru din: 16 Noi 2016, 18:10
Regat: Jinno
Aprecieri: 191  
Mulţumiri: 4  
 Contact:
Medalii

up
Avatar utilizator
Metrix008
Nivel 1

Nivel 1
Mesaje: 146
Membru din: 16 Noi 2016, 18:10
Regat: Jinno
Aprecieri: 191  
Mulţumiri: 4  
 Contact:
Medalii

up
Avatar utilizator
Metrix008
Nivel 1

Nivel 1
Mesaje: 146
Membru din: 16 Noi 2016, 18:10
Regat: Jinno
Aprecieri: 191  
Mulţumiri: 4  
 Contact:
Medalii

up
Avatar utilizator
Daishinkan
Nivel 1

Nivel 1
Mesaje: 120
Membru din: 14 Ian 2018, 13:30
Aprecieri: 56  
Mulţumiri: 156  
Medalii

E greu sa dai un search ... e mai usor sa scrii "up" in fine. daca cautai putin rezolvai de mult

Uite un quest aici o sa te ajute mai mult decat ce ai tu si e totul explicat cap coada acolo
Nu este Quest creat/postat de mine. este quest postat/creat de @[RaffaeL]
quest dropdiavol begin
state start begin
when 2401.kill or 2402.kill or 2403.kill or 2404.kill with game.get_event_flag("drop_special") == 1 begin
local r=number(1, 4) --(numarul "4" reprezinta drop aleatoriu si creste proportional cu numarul de iteme din lista)
local lista_drop ={
{vnum_item, 1}, -- ("1" = cantitate si se poate modifica)
{vnum_item, 1}, -- (vnum_item se inlocuie cu vnum-ul itemului dorit la drop)
{vnum_item, 1},
{vnum_item, 1}, -- se pot adauga oricate iteme se doreste
}
if pc.get_level() >= 85 and pc.get_level() <= 99 then -- poti scoate conditia de level
game.drop_item_with_ownership(lista_drop[r][1],lista_drop[r][2]) -- itemele dropeaza "pe jos", nu in inventar
end
end
end
end

-- /e drop_special 1 (seteaza drop-ul ca fiind on(game_flag))
-- /e drop_special 0 (seteaza drop-ul ca fiind off(game_flag))
Imagine

 ! Mesaj de la: Daishinkan
#DaiShinKanWork
Afișează semnătura
Avatar utilizator
Metrix008
Nivel 1

Nivel 1
Mesaje: 146
Membru din: 16 Noi 2016, 18:10
Regat: Jinno
Aprecieri: 191  
Mulţumiri: 4  
 Contact:
Medalii

Daishinkan scrie: ↑19 Sep 2022, 20:55 E greu sa dai un search ... e mai usor sa scrii "up" in fine. daca cautai putin rezolvai de mult

Uite un quest aici o sa te ajute mai mult decat ce ai tu si e totul explicat cap coada acolo
Nu este Quest creat/postat de mine. este quest postat/creat de @[RaffaeL]
quest dropdiavol begin
state start begin
when 2401.kill or 2402.kill or 2403.kill or 2404.kill with game.get_event_flag("drop_special") == 1 begin
local r=number(1, 4) --(numarul "4" reprezinta drop aleatoriu si creste proportional cu numarul de iteme din lista)
local lista_drop ={
{vnum_item, 1}, -- ("1" = cantitate si se poate modifica)
{vnum_item, 1}, -- (vnum_item se inlocuie cu vnum-ul itemului dorit la drop)
{vnum_item, 1},
{vnum_item, 1}, -- se pot adauga oricate iteme se doreste
}
if pc.get_level() >= 85 and pc.get_level() <= 99 then -- poti scoate conditia de level
game.drop_item_with_ownership(lista_drop[r][1],lista_drop[r][2]) -- itemele dropeaza "pe jos", nu in inventar
end
end
end
end

-- /e drop_special 1 (seteaza drop-ul ca fiind on(game_flag))
-- /e drop_special 0 (seteaza drop-ul ca fiind off(game_flag))
Ok, mersi de raspuns, dar cu ce ma ajuta ce ai dat tu? :D eu am nevoie ca, questul de alchimist sa dropeze sharduri doar la levelul apropiat mie.

Anyway, am gasit aceasta functie si as fii recunoscator daca ma ajuta cineva sa o incorporez in questul meu:

Cod: Selectaţi tot

			                    local level = pc.get_level()

			                    local limit = npc.get_level0()

			                    if level < limit+5 then

Am incercat asa dar nu vrea nici sa moara:

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
					local rnd1 = number(1, 100)
					local level = pc.get_level()
					local limit = npc.get_level0()
					if  rnd1 == 1 and level < limit+5 then
				game.drop_item_with_ownership(30270, 1, 300)
					end
				end
			end
		end
Avatar utilizator
Metrix008
Nivel 1

Nivel 1
Mesaje: 146
Membru din: 16 Noi 2016, 18:10
Regat: Jinno
Aprecieri: 191  
Mulţumiri: 4  
 Contact:
Medalii

t/c am rezolvat
Închis
Răspunsuri
6
Vizualizări
407
Răspunsuri
14
Vizualizări
1208
Răspunsuri
1
Vizualizări
78

Înapoi la “Cereri Rezolvate”

  • Informaţie
  • Cine este conectat

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