Metin2 Hungarian Forum

Metin2 => Szerver készítés => Privát szerverek => Segítség => A témát indította: aferii Dátum 2017-07-13, 10:51:55

Cím: Quest
Írta: aferii Dátum 2017-07-13, 10:51:55
Azt a gond hogy a 71131-es id -ha nincs akkor is cserél tárgyat azt szeretném hogy mind kettőt ellenőrizze hogy meg e van....

Előre is köszönöm ha valaki segít!


quest pacika begin
state start begin
when 20041.chat."Paci fejlesztés!" begin
say_title(mob_name(20041)..":")
say("")
say("Szeretnéd fejleszteni a lovadat?")
say("Szükséged lesz 5 db Smaragdra.")
say_reward("Meg van az 5 db Smaragd?")
local paci=select("Igen","Nem")
if paci==1 then
local paciKey = 19890, 71131
if pc.countitem(paciKey)>5 then
say_title(mob_name(20041)..":")
say("")
say("Rendben már is fejlesztem!")
wait()
pc.removeitem(19890, 5)
pc.removeitem(71131, 1)
pc.give_item2(71132, 1)
else
say_title(mob_name(20041)..":")
say("Nincs nálad az 5 db Smaragd!")
say_item("Smaragd ",paciKey,"")
end
elseif paci==2 then
return
end
end
end
end
Cím: Re:Quest
Írta: Dani31 Dátum 2017-07-13, 11:23:47
quest pacika begin
state start begin
when 20041.chat."Paci fejlesztés!" begin
say_title(mob_name(20041)..":")
say("")
say("Szeretnéd fejleszteni a lovadat?")
say("Szükséged lesz 5 db Smaragdra,")
say("Illetve 1db 71131-re.")
say_reward("Meg van az 5 db Smaragd?")
local paci=select("Igen","Nem")
if paci==1 then
local paciKey = 19890
local paciKey2 = 71131
if pc.countitem(paciKey)>= 5 and pc.countitem(paciKey2)>= 1 then
say_title(mob_name(20041)..":")
say("")
say("Rendben már is fejlesztem!")
wait()
pc.removeitem(19890, 5)
pc.removeitem(71131, 1)
pc.give_item2(71132, 1)
else
say_title(mob_name(20041)..":")
say("Nincs nálad az 5 db Smaragd,")
say("Vagy a 71131 tárgy!")
say_item("Smaragd ",paciKey,"")
end
elseif paci==2 then
return
end
end
end
end


Annyit még szerkesztettem hogy nagyobb vagy egyenlő, mert ha 5 volt nála akkor nem fogadta el ha csak nagyobbra van állítva.
Cím: Re:Quest
Írta: aferii Dátum 2017-07-13, 11:47:20
Köszönöm!
EhPortal 1.39 © 2025, WebDev