Wie erstelle ich einen Random Skill für Pets ?
How do I create a Random Skill for Pets?
THX for Help
How do I create a Random Skill for Pets?
THX for Help
does not workQuote:
Try adding the new functions to the npc_event module after the module name instead of before the module name.
USE ArcadiaQuote:
Wie erstelle ich einen Random Skill für Pets ?
How do I create a Random Skill for Pets?
THX for Help
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
does not work, complain to the lineQuote:
@[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.
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.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
Quote:
Add this to your Sframe start Arguments:
/cash /commercial_shop
You can try "cast_world_state", not sure it will help you tho..Quote:
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
Thanks, but does not work.Quote:
You can try "cast_world_state", not sure it will help you tho..