Jump to content

Recommended Posts

  • Active Member

Hi guys,

I need to set event for each person separately. When player will not to participate the event, he can put offline this event, but only for self not for all. I set the event online with GM and players at now have event on and when they go to the some NPC, they will can put offline the event and when is the event offline for some player he will can put the event online. 

There are the quests:

Thank you for your answers!
 

Kind Regards ReFresh

Edited by ReFresh

I'll be always helpful! 👊 

Link to comment
Share on other sites

  • 2 weeks later...
  • Active Member
On 22. 4. 2016 at 5:15 PM, PACI said:

I did not understand what are you asking for. So you want to activate an event through a GM character, but each non GM character can deactivate itself from the event, am I right?

Yeah, you're right. Players can deactivate and activate again this event for itself.

I'll be always helpful! 👊 

Link to comment
Share on other sites

  • Active Member
5 hours ago, ZenkoKXO. said:

You can use this function if it's for only one player, I don't understand what you're looking for:


pc.setqf("name", value)

You can also use that but it consumes much:


game.set_event_flag(""..pc.get_name().."_event", value)

 

Thank you for answer. I'm looking for put off and put on the event for player separately. I started some event with my GM character and when a player does not want to attend this event, he will be able to end this event for yourself and when he wants, he will be able to start this event again.

I'll be always helpful! 👊 

Link to comment
Share on other sites

Then you should use it like that:

quest event begin
	state start begin
		when ID_NPC.chat."Enable Drop event" with pc.getqf("drop_event") == 0 begin -- if drop event is disabled
			say_npc()
			say("Do you want to enable the event?")
			if select(locale.yes, locale.no) ~=1 then return end
			syschat("Drop event enabled!")
			pc.setqf("drop_event", 1) -- we enable the drop event
			return
		end
		when ID_NPC.chat."Disable Drop event" with pc.getqf("drop_event") !=0 begin -- if drop event is enabled
			say_npc()
			say("Do you want to disable the event?")
			if select(locale.yes, locale.no) ~=1 then return end
			syschat("Drop event disabled!")
			pc.setqf("drop_event", 0) -- we disable the drop event
			return
		end
	end
end

'drop_event' is just an example for you; also, don't forget to change 'ID_NPC'

When you'll open your event, you must use this before your code to check if the player enabled it or not:

pc.getqf("drop_event")

Here one example to make the event working only for the people who enabled it:

quest event begin
	state start begin
		when login with pc.getqf("drop_event") !=0 begin
			say("You enabled the drop event so you can play it!")
		end
	end
end

 

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



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