[Help Thread] Please post your questions here.

03/02/2017 14:09 aKa.SeNSeR#6211
Wie erstelle ich einen Random Skill für Pets ?



How do I create a Random Skill for Pets?


THX for Help
03/02/2017 17:23 dimonius92#6212
Quote:
Originally Posted by thndr View Post
Try adding the new functions to the npc_event module after the module name instead of before the module name.
does not work
there is another script?

Quote:
Originally Posted by aKa.SeNSeR View Post
Wie erstelle ich einen Random Skill für Pets ?



How do I create a Random Skill for Pets?


THX for Help
USE Arcadia
GO
INSERT INTO [dbo].[SkillTreeResource] ([job_id] ,[skill_id] ,[min_skill_lv] ,[max_skill_lv] ,[lv] ,[job_lv] ,[jp_ratio] ,[need_skill_id_1] ,[need_skill_lv_1] ,[need_skill_id_2] ,[need_skill_lv_2] ,[need_skill_id_3] ,[need_skill_lv_3], [cenhance_min], [cenhance_max]) VALUES ( 4401 , 31411 , 1 , 5 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0, 5)
03/02/2017 17:53 ThunderNikk#6213
@[Only registered and activated users can see links. Click Here To Register...]

Here is the full script I have. I would assume that you would need to edit the dates to be close to the current up coming weekly dates for the event to go live.


Code:
function for_event_by_liveteam()

	play_time_event() --Ç÷¹ÀÌ Å¸ÀÓ À̺¥Æ®
    --party_exp_rate_event() --ÆÄƼ °æÇèÄ¡ À̺¥Æ®
end


function play_time_event()

	local state_code = get_local_info() 	

	if state_code == 1 then -- Çѱ¹
		-- local current_time = get_os_date( "%Y-%m-%d %H:%M:%S" )
		-- local event_begin_time = '2013-07-11 10:00:00'
		-- local event_end_time = '2013-08-08 10:00:00'		
		-- if	event_begin_time <= current_time and
			-- current_time <= event_end_time then			
			-- set_env( "game.use_time_based_event_script", 1 )
			-- set_env( "game.term_for_time_based_event_script", 120 )
		-- end
		--2013³â Çѱ¹ Ãß¼® Ç÷¹ÀÌ Å¸ÀÓ À̺¥Æ® ÁÖÂ÷º° ¼¼ºÎ Á¶°Ç üũ ¾øÀ½ ½ÃÀÛ, Á¾·á ÆÄÀÏ ¾÷µ¥ÀÌÆ® Çü½ÄÀ¸·Î ÁøÇà
		set_env( "game.use_time_based_event_script",1 )
		set_env( "game.term_for_time_based_event_script",5 )
	
	elseif  state_code == 4 --¹Ì±¹
		or state_code == 8192  -- 秵	    or state_code == 8 --µ¶ÀÏ 
		or state_code == 128  -- ÇÁ¶û½º
		or state_code ==16384 -- ÅÍŰ 
		or state_code ==32768 -- Æú¶õµå 
		or state_code ==65536 -- ÀÌÅ»¸®¾Æ 
		or state_code == 256 -- ·¯½Ã¾Æ
		or state_code == 512 -- µ¿³²¾Æ
		then 	
			
		set_env( "game.use_time_based_event_script",1 )
		set_env( "game.term_for_time_based_event_script",5 )
		
	elseif  state_code == 16 then -- ÀϺ»
			
		set_env( "game.use_time_based_event_script",1 )
		set_env( "game.term_for_time_based_event_script",5 )
	
	end

end

function on_time_based_event_reward() 

local state_code = get_local_info()  -- ±¹°¡ÄÚµå
local pcbang_grade = get_value("pcbang_user")	-- ÇÁ¸®¹Ì¾öPC¹æ ÆÇ´Üº¯¼ö	
local t_flag = get_flag( "reward_time_event" ) -- ij¸¯ÅÍ º° Ç÷¡±× °ª
local account_t_flag = get_account_flag( "reward_time_event" ) -- °èÁ¤ º° Ç÷¡±× °ª
local current_time = get_os_date( "%Y-%m-%d %H:%M:%S" )
local flag_current_time = get_os_date( "%Y-%m-%d" )
local event_current_week = 0	
local lv = get_value( "level" )

	-- 2014 Çѱ¹ PC¹æ À̺¥Æ® ±â°£À̰í Çѱ¹À̸é
	if '2014-04-24' <= current_time and current_time < '2014-05-22' and state_code == 1 then 
		if pcbang_grade == 2 then --Çѱ¹ ÇǾ¾¹æ À̺¥Æ®
			insert_item(2012866,1)
			private_notice("@90605876")
			return
		end
	end
	
	if '2014-04-22' <= current_time and current_time < '2014-05-13' and state_code == 16 then --ÀϺ»
			insert_item(2012866,1)
			private_notice("@90606226")
			return
	end
	
	if '2014-05-13' <= current_time and current_time < '2014-06-01' and state_code == 4 or state_code == 8 or state_code == 128 or state_code == 16384 or state_code == 32768 or state_code == 65536 then --¹Ì±¹, À¯·´
			insert_item(2012866,1)
			private_notice("@90606226")
			return
	end
	
	if '2014-05-12' <= current_time and current_time < '2014-06-03' and state_code == 256 then --·¯½Ã¾Æ
			insert_item(2012866,1)
			private_notice("@90606226")
			return
	end
	
	-- 0. º¸»ó Á¶°Ç üũ (±âº»ÀûÀ¸·Î Çѹø º¸»óÀ» ¹Þ¾ÒÀ¸¸é ¾È ÁØ´Ù.)
	if t_flag == flag_current_time or account_t_flag == flag_current_time or t_flag == current_time or account_t_flag == current_time then
		return
	end
	
	-- 1. À̺¥Æ® ±â°£ÀÎÁö üũ: ¿À´Ã ³¯Â¥°¡ ¸î ÁÖÂ÷¿¡ ÇØ´çÇÏ´ÂÁö ±¸ÇÑ´Ù. ( event_current_week °ª ¼³Á¤ )
	
	-- Çѱ¹
	if state_code == 1 then
		if '2014-06-26 10:00:00' <= current_time and current_time < '2014-07-03 10:00:00' then 
			event_current_week = 1
		elseif '2014-07-03 10:00:00' <= current_time and current_time < '2014-07-10 10:00:00' then
			event_current_week = 2
		elseif '2014-07-10 10:00:00' <= current_time and current_time < '2014-07-17 10:00:00' then
			event_current_week = 3
		elseif '2014-07-17 10:00:00' <= current_time and current_time < '2014-07-24 10:00:00' then
			event_current_week = 4
		end
	end
	
	--秵	if state_code == 8192 then
		if '2014-02-24' <= current_time and current_time < '2014-03-03' then 
			event_current_week = 1
		elseif '2014-03-03' <= current_time and current_time < '2014-03-10' then
			event_current_week = 2
		elseif '2014-03-10' <= current_time and current_time < '2014-03-17' then
			event_current_week = 3
		elseif '2014-03-17' <= current_time and current_time < '2014-03-24' then
			event_current_week = 4	
		end
	end
	
	-- ÀϺ»
	if state_code == 16 then
		if '2014-08-12 11:00:00' <= current_time and current_time < '2014-08-19 11:00:00' then 
			event_current_week = 1
		elseif '2014-08-19 11:00:00' <= current_time and current_time < '2014-08-26 11:00:00' then
			event_current_week = 2
		elseif '2014-08-26 11:00:00' <= current_time and current_time < '2014-09-02 11:00:00' then
			event_current_week = 3
		elseif '2014-09-02 11:00:00' <= current_time and current_time < '2014-09-09 11:00:00' then
			event_current_week = 4
		end
	end
	
	-- ¹Ì±¹, ÅÍŰ, ÀÌÅ»¸®¾Æ
	if  state_code == 4 or state_code == 16384 or state_code == 65536 then 
		if '2014-02-27' <= current_time and current_time < '2014-03-06' then 
			event_current_week = 1
		elseif '2014-03-06' <= current_time and current_time < '2014-03-13' then
			event_current_week = 2
		elseif '2014-03-13' <= current_time and current_time < '2014-03-20' then
			event_current_week = 3
		elseif '2014-03-20' <= current_time and current_time < '2014-03-27' then
			event_current_week = 4	
		end
	end
	
	-- µ¶ÀÏ, ÇÁ¶û½º, Æú¶õµå
	if  state_code == 8 or state_code == 128 or state_code == 32768 then 
		if '2014-02-25' <= current_time and current_time < '2014-03-04' then 
			event_current_week = 1
		elseif '2014-03-04' <= current_time and current_time < '2014-03-11' then
			event_current_week = 2
		elseif '2014-03-11' <= current_time and current_time < '2014-03-18' then
			event_current_week = 3
		elseif '2014-03-18' <= current_time and current_time < '2014-03-25' then
			event_current_week = 4	
		end
	end
	
	 -- ·¯½Ã¾Æ
	if 	state_code == 256 then
		if '2014-02-10' <= current_time and current_time < '2014-02-15' then 
			event_current_week = 1
		elseif '2014-02-15' <= current_time and current_time < '2014-02-17' then
			event_current_week = 2 --1ÁÖ
		elseif '2014-02-17' <= current_time and current_time < '2014-02-22' then
			event_current_week = 3
		elseif '2014-02-22' <= current_time and current_time < '2014-02-24' then
			event_current_week = 4 --2ÁÖ
		elseif '2014-02-24' <= current_time and current_time < '2014-02-27' then
			event_current_week = 5
		elseif '2014-02-27' <= current_time and current_time < '2014-03-03' then
			event_current_week = 6 --3ÁÖ
		elseif '2014-03-03' <= current_time and current_time < '2014-03-10' then
			event_current_week = 7 --4ÁÖ
		end
	end

	-- µ¿³²¾Æ
	if	state_code == 512 then 
		if '2014-02-14' <= current_time and current_time < '2014-02-19' then 
			event_current_week = 1 --1ÁÖ
		elseif '2014-02-19' <= current_time and current_time < '2014-02-21' then
			event_current_week = 2 --1ÁÖ
		elseif '2014-02-21' <= current_time and current_time < '2014-02-27' then
			event_current_week = 3 --2ÁÖ
		elseif '2014-02-27' <= current_time and current_time < '2014-02-28' then
			event_current_week = 4 --2ÁÖ
		elseif '2014-02-28' <= current_time and current_time < '2014-03-03' then
			event_current_week = 5 --3ÁÖ
		elseif '2014-03-03' <= current_time and current_time < '2014-03-07' then
			event_current_week = 6 --3ÁÖ
		elseif '2014-03-07' <= current_time and current_time < '2014-03-14' then
			event_current_week = 7 --4ÁÖ
		end
	end
	
	-- 2. ³¯Â¥ °è»êÀÌ ³¡³µÀ¸´Ï º¸»ó Áö±Þ: º¸»ó Á¶°ÇÀº event_current_week°¡ 0º¸´Ù Ŭ ¶§ (À̺¥Æ® ±â°£ÀÌ ¾Æ´Ï¸é 0À¸·Î ³ª¿È.)
	if event_current_week > 0 then
		--  Áö±Þ
		if state_code == 512 then 
			
			if event_current_week == 1 then
				insert_item ( 2013064, 1 )
			
			elseif event_current_week == 2 then
				insert_item ( 2013063, 1 )
				insert_item ( 2013064, 1 )
			
			elseif event_current_week == 3 then
				insert_item ( 2013063, 1 )
				insert_item ( 2013064, 1 )
				insert_item ( 2902162, 3 )
				insert_item ( 900010, 3 )
			-- 1ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 4 then
				insert_item ( 2013062, 1 )
				insert_item ( 2013063, 1 )
				insert_item ( 2013064, 1 )
				insert_item ( 2902162, 3 )
				insert_item ( 900010, 3 )
			-- 1ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 5 then
				insert_item ( 2902162, 3 )
				insert_item ( 900010, 3 )
			-- 1ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 6 then
				insert_item ( 2012787, 10 )
				insert_item ( 2012788, 10 )
			-- 2ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 7 then
				insert_item ( 2013058, 1 )
				insert_item ( 2013058, 1 )
				insert_item ( 930077, 1 )
				insert_item ( 930077, 1 )
				insert_item ( 930077, 1 )
				insert_item ( 930077, 1 )
			-- 3ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 8 then
				insert_item ( 601100308, 2 )
			-- 4ÁÖÂ÷ º¸»ó.	
			end
			-- º¸»ó Áö±ÞÀÌ ³¡³µÀ¸´Ï ¾ÆÀÌÅÛâ È®ÀÎÇØº¸¶ó´Â °øÁö¸Þ½ÃÁö Ãâ·Â.
			private_notice( sconv( "@90605850" , "#@player_name@#", get_value("name") ) )
		
		-- Çѱ¹, ÀϺ»
		elseif state_code == 1 or state_code == 16 then 
			
			if event_current_week == 1 then
				insert_item ( 2012787, 10 )
				insert_item ( 2012788, 10 )
				insert_item ( 601100285, 2 )
				insert_item ( 2012834, 2 )
				insert_item ( 2902163, 3 )
				insert_item ( 2012825, 3 )
			-- 1ÁÖÂ÷ º¸»ó.
			elseif event_current_week == 2 then
				insert_item ( 801321, 1 )
				insert_item ( 801322, 1 )
				insert_item ( 801323, 1 )
				insert_item ( 801324, 1 )
				insert_item ( 2011150, 4 )
				insert_item ( 2902164, 3 )
				insert_item ( 3800282, 3 )
				insert_item ( 930037, 1 )
				insert_item ( 950081, 5 )
			-- 2ÁÖÂ÷ º¸»ó.
			elseif event_current_week == 3 then
				insert_item ( 601100308, 3 )
				insert_item ( 710004, 3 )
				insert_item ( 2013058, 1 )
				insert_item ( 2013058, 1 )
				insert_item ( 2013058, 1 )
			-- 3ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 4 then
				insert_item ( 540200, 3 )
				insert_item ( 540201, 3 )
				insert_item ( 540202, 3 )
				insert_item ( 2012223, 1 )
				insert_item ( 2013426, 5 )
			-- 4ÁÖÂ÷ º¸»ó.	
			end
			-- º¸»ó Áö±ÞÀÌ ³¡³µÀ¸´Ï ¾ÆÀÌÅÛâ È®ÀÎÇØº¸¶ó´Â °øÁö¸Þ½ÃÁö Ãâ·Â.
			private_notice( sconv( "@90605850" , "#@player_name@#", get_value("name") ) )
			
		-- ·¯½Ã¾Æ, º¸»ó Áö±Þ
		elseif state_code == 256 then 
			
			if event_current_week == 1 then
				insert_item ( 2013064, 1 )
				insert_item ( 2902162, 3 )
				insert_item ( 900010, 3 )
			-- 1ÁÖÂ÷ º¸»ó.
			elseif event_current_week == 2 then
				insert_item ( 2013063, 1 )
				insert_item ( 2013064, 1 )
				insert_item ( 2902162, 3 )
				insert_item ( 900010, 3 )
			-- 1ÁÖÂ÷ º¸»ó.
			elseif event_current_week == 3 then
				insert_item ( 2013063, 1 )
				insert_item ( 2013064, 1 )
				insert_item ( 2012787, 10 )
				insert_item ( 2012788, 10 )
			-- 2ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 4 then
				insert_item ( 2013062, 1 )
				insert_item ( 2013063, 1 )
				insert_item ( 2013064, 1 )
				insert_item ( 2012787, 10 )
				insert_item ( 2012788, 10 )
			-- 2ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 5 then
				insert_item ( 2013062, 1 )
				insert_item ( 2013063, 1 )
				insert_item ( 2013064, 1 )
				insert_item ( 2013058, 1 )
				insert_item ( 2013058, 1 )
				insert_item ( 930077, 1 )
				insert_item ( 930077, 1 )
				insert_item ( 930077, 1 )
				insert_item ( 930077, 1 )
			-- 3ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 6 then
				insert_item ( 2013058, 1 )
				insert_item ( 2013058, 1 )
				insert_item ( 930077, 1 )
				insert_item ( 930077, 1 )
				insert_item ( 930077, 1 )
				insert_item ( 930077, 1 )
			-- 3ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 7 then
				insert_item ( 601100308, 2 )
			-- 4ÁÖÂ÷ º¸»ó.	
			end
			-- º¸»ó Áö±ÞÀÌ ³¡³µÀ¸´Ï ¾ÆÀÌÅÛâ È®ÀÎÇØº¸¶ó´Â °øÁö¸Þ½ÃÁö Ãâ·Â.
			private_notice( sconv( "@90605850" , "#@player_name@#", get_value("name") ) )
			
		else
			if event_current_week == 1 then
				insert_item ( 2013064, 1 )
			-- 1ÁÖÂ÷ º¸»ó.
			elseif event_current_week == 2 then
				insert_item ( 2013063, 1 )
				insert_item ( 2013064, 1 )
			-- 2ÁÖÂ÷ º¸»ó.
			elseif event_current_week == 3 then
				insert_item ( 2013062, 1 )
				insert_item ( 2013063, 1 )
				insert_item ( 2013064, 1 )
			-- 3ÁÖÂ÷ º¸»ó.	
			end
		
			-- º¸»ó Áö±ÞÀÌ ³¡³µÀ¸´Ï ¾ÆÀÌÅÛâ È®ÀÎÇØº¸¶ó´Â °øÁö¸Þ½ÃÁö Ãâ·Â.
			private_notice( sconv( "@90605850" , "#@player_name@#", get_value("name") ) )
		end
						
		--set_flag("reward_time_event",flag_current_time) -- ij¸¯Åͺ° Ç÷¡±× ¼³Á¤
		set_account_flag("reward_time_event",flag_current_time) --°èÁ¤º° Ç÷¡±× ¼³Á¤
	end

end
Mine has been edited to give gifts every 5 minutes so if you set it live you may want to edit that. I was just doing it for testing purposes.
03/03/2017 16:58 dimonius92#6214
Quote:
Originally Posted by thndr View Post
@[Only registered and activated users can see links. Click Here To Register...]

Here is the full script I have. I would assume that you would need to edit the dates to be close to the current up coming weekly dates for the event to go live.


Code:
function for_event_by_liveteam()

	play_time_event() --Ç÷¹ÀÌ Å¸ÀÓ À̺¥Æ®
    --party_exp_rate_event() --ÆÄƼ °æÇèÄ¡ À̺¥Æ®
end


function play_time_event()

	local state_code = get_local_info() 	

	if state_code == 1 then -- Çѱ¹
		-- local current_time = get_os_date( "%Y-%m-%d %H:%M:%S" )
		-- local event_begin_time = '2013-07-11 10:00:00'
		-- local event_end_time = '2013-08-08 10:00:00'		
		-- if	event_begin_time <= current_time and
			-- current_time <= event_end_time then			
			-- set_env( "game.use_time_based_event_script", 1 )
			-- set_env( "game.term_for_time_based_event_script", 120 )
		-- end
		--2013³â Çѱ¹ Ãß¼® Ç÷¹ÀÌ Å¸ÀÓ À̺¥Æ® ÁÖÂ÷º° ¼¼ºÎ Á¶°Ç üũ ¾øÀ½ ½ÃÀÛ, Á¾·á ÆÄÀÏ ¾÷µ¥ÀÌÆ® Çü½ÄÀ¸·Î ÁøÇà
		set_env( "game.use_time_based_event_script",1 )
		set_env( "game.term_for_time_based_event_script",5 )
	
	elseif  state_code == 4 --¹Ì±¹
		or state_code == 8192  -- 秵	    or state_code == 8 --µ¶ÀÏ 
		or state_code == 128  -- ÇÁ¶û½º
		or state_code ==16384 -- ÅÍŰ 
		or state_code ==32768 -- Æú¶õµå 
		or state_code ==65536 -- ÀÌÅ»¸®¾Æ 
		or state_code == 256 -- ·¯½Ã¾Æ
		or state_code == 512 -- µ¿³²¾Æ
		then 	
			
		set_env( "game.use_time_based_event_script",1 )
		set_env( "game.term_for_time_based_event_script",5 )
		
	elseif  state_code == 16 then -- ÀϺ»
			
		set_env( "game.use_time_based_event_script",1 )
		set_env( "game.term_for_time_based_event_script",5 )
	
	end

end

function on_time_based_event_reward() 

local state_code = get_local_info()  -- ±¹°¡ÄÚµå
local pcbang_grade = get_value("pcbang_user")	-- ÇÁ¸®¹Ì¾öPC¹æ ÆÇ´Üº¯¼ö	
local t_flag = get_flag( "reward_time_event" ) -- ij¸¯ÅÍ º° Ç÷¡±× °ª
local account_t_flag = get_account_flag( "reward_time_event" ) -- °èÁ¤ º° Ç÷¡±× °ª
local current_time = get_os_date( "%Y-%m-%d %H:%M:%S" )
local flag_current_time = get_os_date( "%Y-%m-%d" )
local event_current_week = 0	
local lv = get_value( "level" )

	-- 2014 Çѱ¹ PC¹æ À̺¥Æ® ±â°£À̰í Çѱ¹À̸é
	if '2014-04-24' <= current_time and current_time < '2014-05-22' and state_code == 1 then 
		if pcbang_grade == 2 then --Çѱ¹ ÇǾ¾¹æ À̺¥Æ®
			insert_item(2012866,1)
			private_notice("@90605876")
			return
		end
	end
	
	if '2014-04-22' <= current_time and current_time < '2014-05-13' and state_code == 16 then --ÀϺ»
			insert_item(2012866,1)
			private_notice("@90606226")
			return
	end
	
	if '2014-05-13' <= current_time and current_time < '2014-06-01' and state_code == 4 or state_code == 8 or state_code == 128 or state_code == 16384 or state_code == 32768 or state_code == 65536 then --¹Ì±¹, À¯·´
			insert_item(2012866,1)
			private_notice("@90606226")
			return
	end
	
	if '2014-05-12' <= current_time and current_time < '2014-06-03' and state_code == 256 then --·¯½Ã¾Æ
			insert_item(2012866,1)
			private_notice("@90606226")
			return
	end
	
	-- 0. º¸»ó Á¶°Ç üũ (±âº»ÀûÀ¸·Î Çѹø º¸»óÀ» ¹Þ¾ÒÀ¸¸é ¾È ÁØ´Ù.)
	if t_flag == flag_current_time or account_t_flag == flag_current_time or t_flag == current_time or account_t_flag == current_time then
		return
	end
	
	-- 1. À̺¥Æ® ±â°£ÀÎÁö üũ: ¿À´Ã ³¯Â¥°¡ ¸î ÁÖÂ÷¿¡ ÇØ´çÇÏ´ÂÁö ±¸ÇÑ´Ù. ( event_current_week °ª ¼³Á¤ )
	
	-- Çѱ¹
	if state_code == 1 then
		if '2014-06-26 10:00:00' <= current_time and current_time < '2014-07-03 10:00:00' then 
			event_current_week = 1
		elseif '2014-07-03 10:00:00' <= current_time and current_time < '2014-07-10 10:00:00' then
			event_current_week = 2
		elseif '2014-07-10 10:00:00' <= current_time and current_time < '2014-07-17 10:00:00' then
			event_current_week = 3
		elseif '2014-07-17 10:00:00' <= current_time and current_time < '2014-07-24 10:00:00' then
			event_current_week = 4
		end
	end
	
	--秵	if state_code == 8192 then
		if '2014-02-24' <= current_time and current_time < '2014-03-03' then 
			event_current_week = 1
		elseif '2014-03-03' <= current_time and current_time < '2014-03-10' then
			event_current_week = 2
		elseif '2014-03-10' <= current_time and current_time < '2014-03-17' then
			event_current_week = 3
		elseif '2014-03-17' <= current_time and current_time < '2014-03-24' then
			event_current_week = 4	
		end
	end
	
	-- ÀϺ»
	if state_code == 16 then
		if '2014-08-12 11:00:00' <= current_time and current_time < '2014-08-19 11:00:00' then 
			event_current_week = 1
		elseif '2014-08-19 11:00:00' <= current_time and current_time < '2014-08-26 11:00:00' then
			event_current_week = 2
		elseif '2014-08-26 11:00:00' <= current_time and current_time < '2014-09-02 11:00:00' then
			event_current_week = 3
		elseif '2014-09-02 11:00:00' <= current_time and current_time < '2014-09-09 11:00:00' then
			event_current_week = 4
		end
	end
	
	-- ¹Ì±¹, ÅÍŰ, ÀÌÅ»¸®¾Æ
	if  state_code == 4 or state_code == 16384 or state_code == 65536 then 
		if '2014-02-27' <= current_time and current_time < '2014-03-06' then 
			event_current_week = 1
		elseif '2014-03-06' <= current_time and current_time < '2014-03-13' then
			event_current_week = 2
		elseif '2014-03-13' <= current_time and current_time < '2014-03-20' then
			event_current_week = 3
		elseif '2014-03-20' <= current_time and current_time < '2014-03-27' then
			event_current_week = 4	
		end
	end
	
	-- µ¶ÀÏ, ÇÁ¶û½º, Æú¶õµå
	if  state_code == 8 or state_code == 128 or state_code == 32768 then 
		if '2014-02-25' <= current_time and current_time < '2014-03-04' then 
			event_current_week = 1
		elseif '2014-03-04' <= current_time and current_time < '2014-03-11' then
			event_current_week = 2
		elseif '2014-03-11' <= current_time and current_time < '2014-03-18' then
			event_current_week = 3
		elseif '2014-03-18' <= current_time and current_time < '2014-03-25' then
			event_current_week = 4	
		end
	end
	
	 -- ·¯½Ã¾Æ
	if 	state_code == 256 then
		if '2014-02-10' <= current_time and current_time < '2014-02-15' then 
			event_current_week = 1
		elseif '2014-02-15' <= current_time and current_time < '2014-02-17' then
			event_current_week = 2 --1ÁÖ
		elseif '2014-02-17' <= current_time and current_time < '2014-02-22' then
			event_current_week = 3
		elseif '2014-02-22' <= current_time and current_time < '2014-02-24' then
			event_current_week = 4 --2ÁÖ
		elseif '2014-02-24' <= current_time and current_time < '2014-02-27' then
			event_current_week = 5
		elseif '2014-02-27' <= current_time and current_time < '2014-03-03' then
			event_current_week = 6 --3ÁÖ
		elseif '2014-03-03' <= current_time and current_time < '2014-03-10' then
			event_current_week = 7 --4ÁÖ
		end
	end

	-- µ¿³²¾Æ
	if	state_code == 512 then 
		if '2014-02-14' <= current_time and current_time < '2014-02-19' then 
			event_current_week = 1 --1ÁÖ
		elseif '2014-02-19' <= current_time and current_time < '2014-02-21' then
			event_current_week = 2 --1ÁÖ
		elseif '2014-02-21' <= current_time and current_time < '2014-02-27' then
			event_current_week = 3 --2ÁÖ
		elseif '2014-02-27' <= current_time and current_time < '2014-02-28' then
			event_current_week = 4 --2ÁÖ
		elseif '2014-02-28' <= current_time and current_time < '2014-03-03' then
			event_current_week = 5 --3ÁÖ
		elseif '2014-03-03' <= current_time and current_time < '2014-03-07' then
			event_current_week = 6 --3ÁÖ
		elseif '2014-03-07' <= current_time and current_time < '2014-03-14' then
			event_current_week = 7 --4ÁÖ
		end
	end
	
	-- 2. ³¯Â¥ °è»êÀÌ ³¡³µÀ¸´Ï º¸»ó Áö±Þ: º¸»ó Á¶°ÇÀº event_current_week°¡ 0º¸´Ù Ŭ ¶§ (À̺¥Æ® ±â°£ÀÌ ¾Æ´Ï¸é 0À¸·Î ³ª¿È.)
	if event_current_week > 0 then
		--  Áö±Þ
		if state_code == 512 then 
			
			if event_current_week == 1 then
				insert_item ( 2013064, 1 )
			
			elseif event_current_week == 2 then
				insert_item ( 2013063, 1 )
				insert_item ( 2013064, 1 )
			
			elseif event_current_week == 3 then
				insert_item ( 2013063, 1 )
				insert_item ( 2013064, 1 )
				insert_item ( 2902162, 3 )
				insert_item ( 900010, 3 )
			-- 1ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 4 then
				insert_item ( 2013062, 1 )
				insert_item ( 2013063, 1 )
				insert_item ( 2013064, 1 )
				insert_item ( 2902162, 3 )
				insert_item ( 900010, 3 )
			-- 1ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 5 then
				insert_item ( 2902162, 3 )
				insert_item ( 900010, 3 )
			-- 1ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 6 then
				insert_item ( 2012787, 10 )
				insert_item ( 2012788, 10 )
			-- 2ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 7 then
				insert_item ( 2013058, 1 )
				insert_item ( 2013058, 1 )
				insert_item ( 930077, 1 )
				insert_item ( 930077, 1 )
				insert_item ( 930077, 1 )
				insert_item ( 930077, 1 )
			-- 3ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 8 then
				insert_item ( 601100308, 2 )
			-- 4ÁÖÂ÷ º¸»ó.	
			end
			-- º¸»ó Áö±ÞÀÌ ³¡³µÀ¸´Ï ¾ÆÀÌÅÛâ È®ÀÎÇØº¸¶ó´Â °øÁö¸Þ½ÃÁö Ãâ·Â.
			private_notice( sconv( "@90605850" , "#@player_name@#", get_value("name") ) )
		
		-- Çѱ¹, ÀϺ»
		elseif state_code == 1 or state_code == 16 then 
			
			if event_current_week == 1 then
				insert_item ( 2012787, 10 )
				insert_item ( 2012788, 10 )
				insert_item ( 601100285, 2 )
				insert_item ( 2012834, 2 )
				insert_item ( 2902163, 3 )
				insert_item ( 2012825, 3 )
			-- 1ÁÖÂ÷ º¸»ó.
			elseif event_current_week == 2 then
				insert_item ( 801321, 1 )
				insert_item ( 801322, 1 )
				insert_item ( 801323, 1 )
				insert_item ( 801324, 1 )
				insert_item ( 2011150, 4 )
				insert_item ( 2902164, 3 )
				insert_item ( 3800282, 3 )
				insert_item ( 930037, 1 )
				insert_item ( 950081, 5 )
			-- 2ÁÖÂ÷ º¸»ó.
			elseif event_current_week == 3 then
				insert_item ( 601100308, 3 )
				insert_item ( 710004, 3 )
				insert_item ( 2013058, 1 )
				insert_item ( 2013058, 1 )
				insert_item ( 2013058, 1 )
			-- 3ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 4 then
				insert_item ( 540200, 3 )
				insert_item ( 540201, 3 )
				insert_item ( 540202, 3 )
				insert_item ( 2012223, 1 )
				insert_item ( 2013426, 5 )
			-- 4ÁÖÂ÷ º¸»ó.	
			end
			-- º¸»ó Áö±ÞÀÌ ³¡³µÀ¸´Ï ¾ÆÀÌÅÛâ È®ÀÎÇØº¸¶ó´Â °øÁö¸Þ½ÃÁö Ãâ·Â.
			private_notice( sconv( "@90605850" , "#@player_name@#", get_value("name") ) )
			
		-- ·¯½Ã¾Æ, º¸»ó Áö±Þ
		elseif state_code == 256 then 
			
			if event_current_week == 1 then
				insert_item ( 2013064, 1 )
				insert_item ( 2902162, 3 )
				insert_item ( 900010, 3 )
			-- 1ÁÖÂ÷ º¸»ó.
			elseif event_current_week == 2 then
				insert_item ( 2013063, 1 )
				insert_item ( 2013064, 1 )
				insert_item ( 2902162, 3 )
				insert_item ( 900010, 3 )
			-- 1ÁÖÂ÷ º¸»ó.
			elseif event_current_week == 3 then
				insert_item ( 2013063, 1 )
				insert_item ( 2013064, 1 )
				insert_item ( 2012787, 10 )
				insert_item ( 2012788, 10 )
			-- 2ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 4 then
				insert_item ( 2013062, 1 )
				insert_item ( 2013063, 1 )
				insert_item ( 2013064, 1 )
				insert_item ( 2012787, 10 )
				insert_item ( 2012788, 10 )
			-- 2ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 5 then
				insert_item ( 2013062, 1 )
				insert_item ( 2013063, 1 )
				insert_item ( 2013064, 1 )
				insert_item ( 2013058, 1 )
				insert_item ( 2013058, 1 )
				insert_item ( 930077, 1 )
				insert_item ( 930077, 1 )
				insert_item ( 930077, 1 )
				insert_item ( 930077, 1 )
			-- 3ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 6 then
				insert_item ( 2013058, 1 )
				insert_item ( 2013058, 1 )
				insert_item ( 930077, 1 )
				insert_item ( 930077, 1 )
				insert_item ( 930077, 1 )
				insert_item ( 930077, 1 )
			-- 3ÁÖÂ÷ º¸»ó.	
			elseif event_current_week == 7 then
				insert_item ( 601100308, 2 )
			-- 4ÁÖÂ÷ º¸»ó.	
			end
			-- º¸»ó Áö±ÞÀÌ ³¡³µÀ¸´Ï ¾ÆÀÌÅÛâ È®ÀÎÇØº¸¶ó´Â °øÁö¸Þ½ÃÁö Ãâ·Â.
			private_notice( sconv( "@90605850" , "#@player_name@#", get_value("name") ) )
			
		else
			if event_current_week == 1 then
				insert_item ( 2013064, 1 )
			-- 1ÁÖÂ÷ º¸»ó.
			elseif event_current_week == 2 then
				insert_item ( 2013063, 1 )
				insert_item ( 2013064, 1 )
			-- 2ÁÖÂ÷ º¸»ó.
			elseif event_current_week == 3 then
				insert_item ( 2013062, 1 )
				insert_item ( 2013063, 1 )
				insert_item ( 2013064, 1 )
			-- 3ÁÖÂ÷ º¸»ó.	
			end
		
			-- º¸»ó Áö±ÞÀÌ ³¡³µÀ¸´Ï ¾ÆÀÌÅÛâ È®ÀÎÇØº¸¶ó´Â °øÁö¸Þ½ÃÁö Ãâ·Â.
			private_notice( sconv( "@90605850" , "#@player_name@#", get_value("name") ) )
		end
						
		--set_flag("reward_time_event",flag_current_time) -- ij¸¯Åͺ° Ç÷¡±× ¼³Á¤
		set_account_flag("reward_time_event",flag_current_time) --°èÁ¤º° Ç÷¡±× ¼³Á¤
	end

end
Mine has been edited to give gifts every 5 minutes so if you set it live you may want to edit that. I was just doing it for testing purposes.
does not work, complain to the line
local account_t_flag = get_account_flag( "reward_time_event" ) — °eA¤ ?° CA·?±? °?
03/05/2017 03:42 Sherock#6215
i have a problem,
i have deleted all the quests and i always got invalid quest code! code[XXXX] in CaptainHerlockServer.exe
03/05/2017 12:43 アルカード#6216
Is there a command in GS to get all skill list what are in db?
03/08/2017 00:39 アルカード#6217
I have issue with itembox and hidden village buff.i can't open item box and my HV buff disappear after i relog.i used SMP querys from ismoke 9.1 guide
03/09/2017 13:41 _-Seizure-_#6218
Quote:
Originally Posted by Älucard View Post
I have issue with itembox and hidden village buff.i can't open item box and my HV buff disappear after i relog.i used SMP querys from ismoke 9.1 guide
Add this to your Sframe start Arguments:

/cash /commercial_shop
03/09/2017 14:03 アルカード#6219
Quote:
Originally Posted by _-Seizure-_ View Post
Add this to your Sframe start Arguments:

/cash /commercial_shop

i don't think it is issue it my bat launcher
03/12/2017 09:44 berkmen1#6220
which vps i need for open public server? at here [Only registered and activated users can see links. Click Here To Register...]
03/12/2017 17:11 アルカード#6221
I fixed issue with my itembox,Now i got left issue with HV Pass Buff.When i give myself a item i don't get buff.If i buff myself with HV Pass Buff,if i relog it will go away.Could this be smp or lua issue here?
03/15/2017 20:37 smoegsmoeg#6222
ok - I think I have to ask a stupid question:
on my old server I found a bit of code to run buffs every 1 minute and with that to also buff any summoned pet (I changed some event to run till 2025 or smth similar and added my buffs) but for the life of me I can not find it again (and no I do not have a backup)
can some of you wizards point me to where I can find it? or give me a script for the server lua to buff pets as well? so far only chars are buffed and the add_cstates are getting ignored.

help / hints are much appreciated

cheers
sm
03/16/2017 05:38 sapir619#6223
Quote:
Originally Posted by smoegsmoeg View Post
ok - I think I have to ask a stupid question:
on my old server I found a bit of code to run buffs every 1 minute and with that to also buff any summoned pet (I changed some event to run till 2025 or smth similar and added my buffs) but for the life of me I can not find it again (and no I do not have a backup)
can some of you wizards point me to where I can find it? or give me a script for the server lua to buff pets as well? so far only chars are buffed and the add_cstates are getting ignored.

help / hints are much appreciated

cheers
sm
You can try "cast_world_state", not sure it will help you tho..
03/16/2017 09:37 Azreil#6224
I see many servers sprouting up with 9.4 elements and one server with actual 9.4 files...
I have tried many different searches using different search engines on converting the files of 9.1..
All I have found was a mention of the process ...but I could not find any actual link.
Please, if this possible , may I humbly request a point in the right direction on how to convert 9.1 to 9.4 or how to add 9.4 elements to 9.1 files?

As always, thank you for any consideration,
Azreil
03/16/2017 18:39 smoegsmoeg#6225
Quote:
Originally Posted by sapir619 View Post
You can try "cast_world_state", not sure it will help you tho..
Thanks, but does not work.

atm I run everything in server_init
add_event_state(9004,1) <- HV <- Works
cast_world_state(2506,31) <- First buff <- no effect
add_event_state(2506,31) <- works only on character
add_event_cstate(2506,31) <- no effect
cast_world_cstate(2506,31) <- no effect

I'd be more than ok with a script that buffed every 1minute (that way I have the HV return pass as well (yeah i know you have it 60 times in inv. but idc about that))

any suggestions?

thanks in advance