Pagina 1 din 1

[Quest] - Automatic events at a time.

Scris: 04 Iun 2020, 17:24
de Dreamer.
Aici aveti un quest care activeaza automat evenimentul programat in ziua respectiva si la ora pe care o vreti voi.

Cod: Selectaţi tot

Quest auto_event begin
	State start begin


-------------- GM PANEL SECTION BEGINNING ------------------
		When letter with pc.is_gm () begin
			Send_letter ("Automatic Event")
		end
		When info or button with pc.is_gm () begin
			Say_title ("Automatic Event Panel;")
			Say_reward ("Do you want to activate the automatic event system?")
			Local option = select ("Yes", "No")
			If option == 1 then
				clear_server_tim's ( "auto_event")
				server_loop_tim is ( "auto_event", 1)
				Chat ("Events will start when the time comes.")
			Elseif option == 2 then
				clear_server_tim's ( "auto_event")
				Chat ("Automatic event system turned off.")
			end
		End - when


		When auto_event.server_timer begin
			Local time = os.date ("% X") - This is the hour section, you should definitely not play. -
			Local day = os.date ("% A") - This is the daypart, you should definitely not play. -


- Monday: Monday
- Tuesday: Tuesday
- Wednesday: Wednesday
- Thursday: Thursday
- Friday: Friday
- Saturday: Saturday
- market: Sunday
- Different events can be added by copying and pasting from the if code to the end code.
			If day == "Monday" then - Monday
				If time == "20:00:00" then - start time
						Game.set_event_flag ("ayisigi", 1) - The event to be added to the event type ("ayisigi", 1).
						Notice_all ("Moonlight event started!") - General information announcement for the game after the event has started.
						Notice_all ("You can get it from all the monsters you know you are in.") - General information announcement for the game after the event has started.
						Notice_all ("Event Time: 2 Hours") - General information announcement for the game after the event has started.
				Elseif time == "20:00:00" then - End time
						Game.set_event_flag ("ayisigi", 0) - Bitecek eventin code end must be 0.
						Notice_all ("Moonlight event has ended") - General information announcement for the game after the event is over.
				end
			end




		End - when


		When login begin
			If game.get_event_flag ("ayisigi") == 1 then - Event code 
				Syschat ("Monthly Event Activation.")
				SysChat ("You can get from all the monsters you cut according to your level.")
			end
		End - when
	End - state
End - quest
1. Salvaţi conţinutul quest-ului într-un fişier text numit de exemplu nume_quest.quest .
2. Vă conectaţi la filezilla / winscp şi întrati în /usr/home/game/share/locale/germany/quest (depinde ce server aveţi).
3. Îl puneţi acolo (să fie .quest) şi da-ţi permisiuni 777.
4. Te loghezi în FreeBSD / putty şi scrii în felul următor: cd /usr/home/game/share/locale/germany/quest apoi ./qc nume_quest.quest
5. Intraţi pe server şi scrieţi /reload q .
6. Testaţi quest-ul .