Jump to content

Check if item is in inventory (quest)


Go to solution Solved by PACI,

Recommended Posts

  • Replies 22
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Acum 27 minute, Tasho a spus:

if pc.count_item(50602) then -- Check if exist a item in inventory (MIN 1)
if pc.count_item(50602) >= value then -- Check if exist a item in inventory (MIN 1 | MAX: value)

 

Can't you make it like "when pc.count_item(50602) begin" ? 

Chiar acum, Tasho a spus:

when 20092.chat."Test" with pc.count_item(50602) begin

You can.

Won't that happen only when I talk with a npc? 

I need it without talking with npc or something, the item to activate the quest

  • Honorable Member

A trigger for that doesn't exist, you need at least to login.

 

when login with pc.count_item(50602) begin

 

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

  • Honorable Member
Just now, HisaoShou said:

What kind of item type do I need for the "when ITEM.use begin" to work?  

18

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

  • Honorable Member

yes

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Acum 2 minute, Syreldar a spus:

yes

It doesn't work.

Here is my quest:

quest Quester begin
	state start begin
		when 30089.use begin
			set_state(information)
		end
	end

	state information begin
		when letter begin
			send_letter("Quest de test")
		end

		when info or button begin
			say("Quest de test")
			say("lalalal it is only a text")
			say("lalalalalala")
			say(""")
			say_reward("hahahahahhaaah")
	        pc.setqf("state", 22)
	        q.set_counter("Lupusor", 22)
		end

		when 102.kill begin
			local count = pc.getqf("state") - 1
			if count <= 22 then
				pc.setqf("state", count)
	            q.set_counter("Lupusor", count)
			end
			if count == 0 then
			    say_title("Quest de test")
			    say("Ai finalizat cu succes misiunea!")
				say("Recompensa:")
			    say_reward("Rahatt")
				say_reward("Alte informatii:")
			    say_reward("")
				say_reward("Alte informatii:")
			    say_reward("Ai primit  Yang")
			    say_reward("Ai primit experienta")
				pc.change_money()
				pc.give_exp2()
				pc.give_item2(1, Rahatt)
				horse.set_level("")
				clear_letter()
				set_state(__COMPLETE__)

			end
		end
	end

	state __COMPLETE__ begin
	end
end

Here is my item:

1498048986789.jpg.92cfe963f3d232c8732bbc3f2368c581.jpg

  • Honorable Member

/reload lul

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

  • Honorable Member
7 minutes ago, HisaoShou said:

Reloaded.

Still nothing.

1498055146348.jpg.b4e82dbbd7ffb093df183c6283223ac4.jpg

Means the quest is not properly compiled.

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

  • Honorable Member
Just now, HisaoShou said:

Right now I compiled it again, and still nothing.

1498056091905.jpg.cfd4cc7dffa263b7acf89e06ce8cf30d.jpg

And yes, after this I reloaded them again

1498055995051.jpg.ba6fdb425cd55eee76f13e3187496b91.jpg

not properly compiled, doesn't reach the kill trigger, there are errors.

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Acum 17 minute, Syreldar a spus:

not properly compiled, doesn't reach the kill trigger, there are errors.

What errors? 

How should I compile it?

 

Edit: I have NO IDEA why it is not working. The quest seems fine to me.

  • Premium

If you have accents just before the end of a say line then it wont compile.

Example :

say("àéèôîêâäëïöù") <- Not working

say("àéèôîêâäëïöù ") <- Working (notice the space)

 

I prefer to notice it to you because if an accent is before the closure then the compilation will fail. But there's a lot of other things that can happen so it's probably not the main reason

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

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.