Jump to content

problem with opening box


Recommended Posts

Use a quest for it, and the type of the box should be 18 if i remember corectly.

quest levelup_boxes begin
	state start begin
		when login begin
			pc.give_item2(50187)
			set_state(run)
		end
	end
	
	state run begin
		when 50187.use or 50188.use or 50189.use or 50190.use or 50191.use or 50192.use or 50193.use or 50194.use or 50195.use or 50196.use or 50212.use or 50213.use begin
			local weapon = 10
			if pc.job == 3 then
				weapon = 7000
			elseif pc.job == 1 then
				weapon = 1000
			end
			local box_num = item.vnum-50186
			local rewards = {
				{1,6,50188,1,weapon,1,76004,1,76021,1,76012,20,76018,20},
				{10,5,50189,1,76007,5,76011,1,76003,10,76006,1},
				{20,5,50190,1,76005,1,76022,1,76000,200,76008,10},
				{30,5,50191,1,76013,200,76014,200,76015,1,71107,1},
				{40,5,50192,1,72724,1,72728,1,76020,20,71081,5},
				{50,5,50193,1,71020,10,27987,10,72725,1,72729,1},
				{60,5,50194,1,50513,30,27992,1,27993,1,27994,1},
				{70,5,50195,1,72726,1,72730,1,71161,1,50135,1},
				{80,5,50196,1,71043,1,71082,10,71017,1,30319,5},
				{90,4,50212,1,70004,1,38050,1,76000,200},
				{100,4,50213,1,71153,1,38055,1,70056,200},
				{105,3,71148,1,71149,1,70056,200},
				}
				
			if rewards[box_num][1] == nil then
				syschat("The seal on this chest is too strong. No matter what you do, it won't budge.")
			elseif pc.get_level() < rewards[box_num][1] then
				syschat("Your Level does not suffice to open this box.")
			elseif pc.get_empty_inventory_count() < rewards[box_num][2] then
				syschat("You do not have enough free inventory space to open this box.")
			else
				for i = 1,rewards[box_num][2],1 do
					pc.give_item2(rewards[box_num][3+2*(i-1)],rewards[box_num][4+2*(i-1)])
				end
				item.remove()
			end
		end
	end
end

 

  • Love 1
Link to comment
Share on other sites

  • Premium

i need from quest give item

 

and again 

 

you recived noting

 

if i edit special_item_group.txt    i got but 1 item  no mores  i need few items

Create a quest...

 

"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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 0

      Target Information System

    2. 1

      Feeding game source to LLM

    3. 2

      anti exp explanation pls

    4. 1

      Feeding game source to LLM

    5. 2

      anti exp explanation pls

    6. 0

      [GR2] Positioning an object added with "Attach"

    7. 1417

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.