Jump to content

Recommended Posts

Hey everyone!

To make it short:

quest chests begin
	state start begin
		when login begin
			set_state(chest0)
		end
	end
	state chest0 begin
		when letter begin
			send_letter("Welcome!")
		end
		when button or info begin
			say_title("Heyyo")
			say("Here item.")
			pc.give_item2( 310 , 1 )
			set_state(chest1)
		end
	end
	state chest1 begin
		when 310.use begin
			if pc.get_job() == 0 then
				pc.remove_item(310,1)
				pc.give_item2( 311 , 1)
				pc.give_item2( 39037 , 1)
				pc.give_item2( 39040 , 1)
				pc.give_item2( 300 , 1)
				pc.give_item2( 12 , 1)
				pc.give_item2( 16001 , 1)
				pc.give_item2( 15002 , 1)
				set_state(chest2)
			end
		end
	end
	state chest2 begin
		when 311.use begin
			pc.give_item2( 12 , 1 )
		end
	end
end

State chest0 --> gives 1 yang to inventory (as item).

If i add myself a 310 or 311 item as admin and use it, then everything works flawlessly.

What do I mess up here? (problem stands with pc.give_item and with pc.give_item2 too)

Thanks in advance!

Link to comment
https://metin2.dev/topic/33290-pc_give_item-problem/
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Active+ Member

the problem stands for the function. yea. that quest function gives only items. U can't set the gold amount of a player with that command. For yang, try to use "pc.change_gold" or something similar (look in your quest_functions cause i can t remember the function rn)

 

Link to comment
https://metin2.dev/topic/33290-pc_give_item-problem/#findComment-168576
Share on other sites

Thank you for your reply, but seems like you do not understand what I wanted to say.

I did not want to set gold, I wanted to give items. Instead of the items, "Yang" item was added to my inventory.

(You know, the one you can throw on ground and when you pick it up, it's normal yang.")

so pc.give_item2(10,1) ----> gives "Yang", not Sword+0 😐

spacer.png

 

Edited by Metin2 Dev International
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/33290-pc_give_item-problem/#findComment-168577
Share on other sites

  • Active Member

As far as I understand, his problem is that when he use:

pc.give_item2( 310 , 1 )

he gets 1 Yang into inventory instead of 310 vnum item.

 

When you use this in state chest1 you also gets 1 Yang?

Link to comment
https://metin2.dev/topic/33290-pc_give_item-problem/#findComment-168578
Share on other sites

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.