Jump to content
  • 0

need function


Mr.Blue

Question

Hi guys

I was try to creat something with random rewand so if it was like this

quest 111 begin
    state start begin
        when 20060.chat."Set succesrate" begin
		say_title (" want gift ")
		say_rewand ("its random so u cant know what its")
		local s = select ("NO","Yes")
		if s == 1 then
		pc.give_item2("19",1)  --- i want many but many items for random here
		say(" u have take it ")
		return
	end
		elseif s == 2 then
		return
		end
	end	
end

any help with this function

Link to comment
  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

3 answers to this question

Recommended Posts

  • 0
local giftList = {11299,11499,11699,11899}
pc.give_item2(giftList[number(1,table.getn(giftList))])

Best Regards

Ellie

Do not be sorry, be better.

Link to comment
  • 0
  • Former Staff

if the any player press "yes" no-one will get any present XD

 

change this

local s = select ("NO","Yes")

to this :)

local s = select ("Yes", "No")
Link to comment

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


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