Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[Poprawa] problem z questem


Rekomendowane odpowiedzi

Opublikowano

Mam pewien problem, kiedys zbugowaly mi sie 2 questy oto temat:

http://www.mpcforum.pl/topic/923312-poprawa-buguja-sie-2-questy/

Postanowilem usunac misje w ktorej musimy co 5lvl bic metiny.

Usunalem caly folder object, dodalem/usunalem quest z locale_list

Zrobilem sh make, ale nadal nie chca dropic punkty z metkow, punkty mozna zamienic na staty. Nie wiem co jest zle...

oto quest dropu i zamiany:

quest SystemPunktow begin
	state start begin
		when login or levelup with pc.get_level() >= 1 begin
			setstate(odbierz_misje)
		end
	end
	
	state odbierz_misje begin
		when letter begin
			send_letter(" Zdobywaj punkty ")
			local v = find_npc_by_vnum(20011)
				if v != 0 then
					target.vid("__TARGET__", v,"Uriel")
				end
		end
		
		when button or info begin
			say_title(" Punkty za bicie metinów. ")
			say(" Zdobywaj punkty za bicie metinów. Udaj się do Uriela. ")
		end
		
		when __TARGET__.target.click begin
			target.delete("__TARGET__")
			say_title("Uriel:")
			say(" Witaj "..pc.get_name().." mam do Ciebie ")
			say(" dobrą wiadomość. ")
			say(" Za bicie metinów będziesz otrzymywał punkty. ")
			say(" Punktów  otrzymasz tyle o jakim lvl rozbiłeś metina. ")
			say(" Punkty możesz wymieniać na + do statystyk, hp, int, atak, zręczność. ")
			clear_letter()
			setstate(drop)
		end
	end
	
	state drop begin
		when kill with npc.get_race() >= 8001 and npc.get_race() <= 8014 or npc.get_race() >= 8024 and npc.get_race() <= 8027 begin 
			local nagrody = {
			[8001] = "5",
			[8002] = "10",
			[8003] = "15",
			[8004] = "20",
			[8005] = "25",
			[8006] = "30",
			[8007] = "35",
			[8008] = "40",
			[8009] = "45",
			[8010] = "50",
			[8011] = "55",
			[8012] = "60",
			[8013] = "65",
			[8014] = "70",
			[8024] = "75",
			[8025] = "80",
			[8026] = "85",
			[8027] = "90"
			}
			pc.give_item2(9994, nagrody[npc.get_race()][1])
		end
		
		when 20011.chat."Wymień punkty za metiny" begin
			say_title(" Wymień punkty na statystyki. ")
			say(" Czy chcesz wymienić punkty statystyk? ")
			say(" 20pkt red/blue potki 200 ")
			say(" 50pkt fiol/ziel potki 200 ")
			say(" 150pkt 1Def/1int/2atk/1zre ")
			say(" 250pkt 2Def/2int/3atk/2zre ")
			say(" 500pkt 3Def/5int/7atk/5zre ")
			say(" 750pkt 5Def/8int/12atk/8zre ")
			say(" 1000pkt 7Def/10int/15atk/10zre ")
			say(" 1250pkt 10Def/12int/18atk/12zre ")
			say(" 1500pkt 20Def/15int/20atk/15zre ")
			local s = select("Wymieniam","Nie wymieniam")
				if s == 1 then
					if pc.count_item(9994) >= 1500 then
						local rand = math.random(4)
							if rand == 1 then
								affect.add_collect(apply.CON, 20, 60*60*24*365*60)
							elseif rand == 2 then
								affect.add_collect(apply.INT, 15, 60*60*24*365*60)
							elseif rand == 3 then
								affect.add_collect(apply.STR, 20, 60*60*24*365*60)
							elseif rand == 4 then
								affect.add_collect(apply.DEX, 15, 60*60*24*365*60)
							end
							pc.remove_item(9994, 1500)
					elseif pc.count_item(9994) >= 1250 then
						local rand = math.random(4)
							if rand == 1 then
								affect.add_collect(apply.CON, 10, 60*60*24*365*60)
							elseif rand == 2 then
								affect.add_collect(apply.INT, 12, 60*60*24*365*60)
							elseif rand == 3 then
								affect.add_collect(apply.STR, 18, 60*60*24*365*60)
							elseif rand == 4 then
								affect.add_collect(apply.DEX, 12, 60*60*24*365*60)
							end
							pc.remove_item(9994, 1250)
					elseif pc.count_item(9994) >= 1000 then
						local rand = math.random(4)
							if rand == 1 then
								affect.add_collect(apply.CON, 7, 60*60*24*365*60)
							elseif rand == 2 then
								affect.add_collect(apply.INT, 10, 60*60*24*365*60)
							elseif rand == 3 then
								affect.add_collect(apply.STR, 15, 60*60*24*365*60)
							elseif rand == 4 then
								affect.add_collect(apply.DEX, 10, 60*60*24*365*60)
							end
							pc.remove_item(9994, 1000)
					elseif pc.count_item(9994) >= 750 then
						local rand = math.random(4)
							if rand == 1 then
								affect.add_collect(apply.CON, 5, 60*60*24*365*60)
							elseif rand == 2 then
								affect.add_collect(apply.INT, 8, 60*60*24*365*60)
							elseif rand == 3 then
								affect.add_collect(apply.STR, 12, 60*60*24*365*60)
							elseif rand == 4 then
								affect.add_collect(apply.DEX, 8, 60*60*24*365*60)
							end
							pc.remove_item(9994, 750)
					elseif pc.count_item(9994) >= 500 then
						local rand = math.random(4)
							if rand == 1 then
								affect.add_collect(apply.CON, 3, 60*60*24*365*60)
							elseif rand == 2 then
								affect.add_collect(apply.INT, 5, 60*60*24*365*60)
							elseif rand == 3 then
								affect.add_collect(apply.STR, 7, 60*60*24*365*60)
							elseif rand == 4 then
								affect.add_collect(apply.DEX, 5, 60*60*24*365*60)
							end
							pc.remove_item(9994, 500)
					elseif pc.count_item(9994) >= 250 then
						local rand = math.random(4)
							if rand == 1 then
								affect.add_collect(apply.CON, 2, 60*60*24*365*60)
							elseif rand == 2 then
								affect.add_collect(apply.INT, 2, 60*60*24*365*60)
							elseif rand == 3 then
								affect.add_collect(apply.STR, 3, 60*60*24*365*60)
							elseif rand == 4 then
								affect.add_collect(apply.DEX, 2, 60*60*24*365*60)
							end
							pc.remove_item(9994, 250)
					elseif pc.count_item(9994) >= 150 then
						local rand = math.random(4)
							if rand == 1 then
								affect.add_collect(apply.CON, 1, 60*60*24*365*60)
							elseif rand == 2 then
								affect.add_collect(apply.INT, 1, 60*60*24*365*60)
							elseif rand == 3 then
								affect.add_collect(apply.STR, 2, 60*60*24*365*60)
							elseif rand == 4 then
								affect.add_collect(apply.DEX, 1, 60*60*24*365*60)
							end
							pc.remove_item(9994, 150)
					elseif pc.count_item(9994) >= 50 then
						local rand = math.random(2)
							if rand == 1 then
								pc.give_item2(27105, 200)
							else
								pc.give_item2(27102, 200)
							end
							pc.remove_item(9994, 50)
					elseif pc.count_item(9994) >= 20 then
						local rand = math.random(2)
							if rand == 1 then
								pc.give_item2(27003, 200)
							else
								pc.give_item2(27006, 200)
							end
							pc.remove_item(9994, 20)
					end
				end
		end
	end
end

@edit

w object/notarget/kill/SystemPunktow.drop mam takie cos:

if npc . get_race ( ) >= 8001 and npc . get_race ( ) <= 8014 or npc . get_race ( ) >= 8024 and npc . get_race ( ) <= 8027 then local nagrody = { 
[ 8001 ] = "5" , 
[ 8002 ] = "10" , 
[ 8003 ] = "15" , 
[ 8004 ] = "20" , 
[ 8005 ] = "25" , 
[ 8006 ] = "30" , 
[ 8007 ] = "35" , 
[ 8008 ] = "40" , 
[ 8009 ] = "45" , 
[ 8010 ] = "50" , 
[ 8011 ] = "55" , 
[ 8012 ] = "60" , 
[ 8013 ] = "65" , 
[ 8014 ] = "70" , 
[ 8024 ] = "75" , 
[ 8025 ] = "80" , 
[ 8026 ] = "85" , 
[ 8027 ] = "90" 
} 
pc . give_item2 ( 9994 , nagrody [ npc . get_race ( ) ] [ 1 ] ) 
 return end 

wydaje mi sie ze wszystko jest ok.

 

Kiedy do folderu object dodam foldery np 8001/kill z poprawnym plikiem w srodku to serwer nie odpala, tzn nie mozna sie zalogowac, blad polaczenia

Opublikowano

to

 

pc.give_item2(9994, nagrody[npc.get_race()][1]) 
 

 

na

 

pc.give_item2(9994, nagrody[npc.get_race()])
 

 

i zadziała.

nexi.png

 

CYTOWAĆ MOJE POSTY, JEŚLI LICZYCIE NA POMOC !!

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...