Jump to content
Maintenance ×
×
×
  • Create New...
  • 0

Check if item is in inventory (quest)


HisaoShou

Question

  • Answers 22
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

22 answers to this question

Recommended Posts

  • 0
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" ? 

Link to comment
Share on other sites

  • 0
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

Link to comment
Share on other sites

  • 0
  • Premium

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

Link to comment
Share on other sites

  • 0
  • Premium
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

Link to comment
Share on other sites

  • 0
  • Premium

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

Link to comment
Share on other sites

  • 0
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

Link to comment
Share on other sites

  • 0
  • Premium

/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

Link to comment
Share on other sites

  • 0
Acum 18 minute, Syreldar a spus:

/reload lul

I reloaded. Still nothing. 

When I try to use the item, nothing happens. No quest appears or something

(I need to know if is my serverfile to fault or my quest) 

1498049228298.jpg.de8ea7e4b8c9cf09967e20ba537ad704.jpg

Link to comment
Share on other sites

  • 0
  • Premium
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

Link to comment
Share on other sites

  • 0
  • Premium
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

Link to comment
Share on other sites

  • 0
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.

Link to comment
Share on other sites

  • 0
  • 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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.


  • Activity

    1. 1

      Metin2 TitleBar Move Frezze

    2. 1

      Metin2 TitleBar Move Frezze

    3. 0

      Navicat "Trial" Reset

    4. 13

      Item ToolTip Width Fix

    5. 0

      Guild icon wrong position

    6. 3

      Monster health

    7. 4

      Luffy Pet

    8. 38

      Core X → Top Metin2 & Metin2 Download → Changelogs

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.