hungvoi94
29-04-17, 08:24 AM
Ai giúp mình sửa cái này cho nó không còn hạn chế Trung Sinh với. Hiện tại nó chỉ cho Trùng Sinh 5 là dừng lại.
+ translife.lua
IncludeLib("SETTING")
IncludeLib("PARTNER")
Include("\\script\\task\\metempsychosis\\task_func.lua")
--·çÔÆÁîÅÆ- µ÷Õû¶ÔТÊÖÖØÉúµÄʱ¼ä- Modified By DinhHQ - 20110926
Include("\\script\\activitysys\\config\\1005\\check_func.lu a")
function main()
local n_level = GetLevel();
local n_setlevel = n_level;
local n_curexp = GetExp();
local n_resistid = GetTaskTemp(TSKM_ZHUANSHENG_RESISTID);
local n_transcount = ST_GetTransLifeCount();
local nmgpoint, nprop, nresist, naddskill = TB_LEVEL_REMAIN_PROP[n_level][n_transcount+1][1],
TB_LEVEL_REMAIN_PROP[n_level][n_transcount+1][2],
TB_LEVEL_REMAIN_PROP[n_level][n_transcount+1][3],
TB_LEVEL_REMAIN_PROP[n_level][n_transcount+1][4];
if (n_level == 199 and n_transcount == 0 and n_curexp >= ZHUANSHENG_XIANDAN_MINEXP) then
nmgpoint, nprop, nresist, naddskill = TB_LEVEL_REMAIN_PROP[200][n_transcount+1][1],
TB_LEVEL_REMAIN_PROP[200][n_transcount+1][2],
TB_LEVEL_REMAIN_PROP[200][n_transcount+1][3],
TB_LEVEL_REMAIN_PROP[200][n_transcount+1][4];
n_setlevel = 200;
end
WriteLog(format("[DoTransLife]\t%s\tName:%s\tAccount:%s\tDoTransLife,LEVEL:%d,Se tLevel:%d,FACTION:%d,TRANSCOUNT:%d,RESIST:%d,AddMa gicPoint:%d,AddProp:%d,AddResist:%d",
GetLocalDate("%Y-%m-%d %X"),GetName(), GetAccount(),
GetLevel(), n_setlevel, GetLastFactionNumber(), n_transcount, n_resistid,
nmgpoint, nprop, nresist));
zhuansheng_set_gre(n_transcount+1, n_setlevel, n_resistid);
-- 4ת´¦Àí
if n_transcount == 3 then
Pay(ZHUANSHENG_TUITION_4)
SetTask(TSK_TRANSLIFE_4, 0) -- 4תÈÎÎñÉèÖÃΪδ½ÓÊÕ£¬É±¹Ö� �±²»»áµÃµ½Åùö¨µ¯
SetTask(TSK_LEAVE_SKILL_POINT_4, 0) -- Çå¿ÕÊ£Óµ¼¼Äܵã
SetTask(TSK_USED_SKILL_POINT_4, 0) -- Çå¿ÕÒѾʹÓõļ¼Äܵã
SetTask(TSK_LAST_UP_LEVEL_4, 0) -- ÉèÖÃ×îºóÉý¼¶µÈ¼¶Îª0
for i=1,getn(TBITEMNEED_4) do
local tbProb = TBITEMNEED_4[i].tbProb
ConsumeItem(3,TBITEMNEED_4[i].nCount, tbProb[1], tbProb[2], tbProb[3], -1)
end
--Kh«ng add skill TS4 khi TS - Modified by DinhHQ - 20110812
-- for i=1,getn(TB_SKILL_4) do
-- AddMagic(TB_SKILL_4[i][1],TB_SKILL_4[i][2])
-- end
else
--·çÔÆÁîÅÆ- µ÷Õû¶ÔТÊÖÖØÉúµÄʱ¼ä- Modified By DinhHQ - 20110926
if tbPVLB_Check:IsNewPlayer() == 1 and tbPVLB_Check:CheckTime() == 1 and (n_transcount == 0 or n_transcount == 1) then
if n_transcount == 0 then
Pay(1000000)
elseif n_transcount == 1 then
Pay(20000000)
end
else
Pay(ZHUANSHENG_TUITION)
end
end
SetTask(144, 0); --Ãâ·ÑÏ´µã
SetRevPos(121, 55); --ÉèÖØÉúµãÔÚÁúÃÅÕò
zhuansheng_clear_skill(n_level, nmgpoint); --Çåµô¼¼Äܵã
zhuansheng_clear_prop(n_level, nprop); --ÇåµôDZÄܵã
SetSkillMaxLevelAddons(GetSkillMaxLevelAddons() + naddskill);
if (n_resistid >= 0 and n_resistid <= 4) then
-- AddMaxResist(n_resistid, nresist);
-- elseif (n_resistid == -1) then
for i = 0, 4 do
AddMaxResist(i, nresist);
end
end
local nBaseLevel = 10 --ĬÈÏתÉúºóÉý¼¶µ½10¼¶
ST_LevelUp(nBaseLevel-n_level); --ÉèµÈ¼¶Îª10¼¶,±ÜÃâ10¼¶Ç°½ÇÉ«� �¾ºÅ²»ÄÜÕÒ»Ø
SetTask(TSK_ZHUANSHENG_FLAG,0);
SetTask(TSK_ZHUANSHENG_LASTTIME, GetCurServerTime());
PARTNER_CallOutCurPartner(0)
--SetTask(TSK_ZHUANSHENG_FLAG, 2);
Msg2Player("LÜnh héi <B¾c §Èu Trêng Sinh ThuËt - T©m Ph¸p Thiªn>");
KickOutSelf();
--Msg2Player("Translife done")
return 1
end
+fuyuan.lua
--¸£ÔµÏµÍ³
--2004.8.5
TASKID_FY = 151; --ÈÎÎñ±äÁ¿ID of Íæ¼Ò¸£ÔµÖµ
TASKID_FY_START_ONLINE_TIME = 152; --ÈÎÎñ±äÁ¿ID of Íæ¼Ò×îºóÒ»´Î¿ªÊ¼»ýÔܸ£ÔµÊ ±µÄÔÚÏßʱ¼ä£¨Ã룩£¬-1±íʾ¸£Ôµ»ýÔÜÒѱ»ÔÝÍ£
TASKID_FY_ADDITIONAL_TIME = 153; --ÈÎÎñ±äÁ¿ID of Íæ¼Ò¸£Ôµ±»ÔÝͣǰ¿É»»¸£Ôµµ ÄÔÚÏßʱ¼ä£¨Ã룩
TASKID_GAIN_LAST_DATE = 154; --ÈÎÎñ±äÁ¿ID of Íæ¼Ò×îºóÒ»´ÎÁìÈ¡¸£ÔµÈÕÆÚ
TASKID_GAIN_TIMES_IN_DAY = 155; --ÈÎÎñ±äÁ¿ID of Íæ¼Ò×îºóÒ»´ÎÁìÈ¡¸£Ôµµ±ÌìÁ ìÈ¡¸£ÔµµÄ´ÎÊý
TIME_UNIT = 3600; --»ù±¾Ê±¼äµ¥Î»£¨1Сʱ£©
TIME_PER_FUYUAN = TIME_UNIT; --1µã¸£Ôµ»»È¡ËùÐèʱ¼ä £¨1Сʱ£©
TIME_FUYUAN_THRESHOLD1 = 2 * TIME_UNIT; --¸£Ôµ»»È¡ËùÐè»ù׼ʱ¼ä £¨2Сʱ£©
TIME_FUYUAN_THRESHOLD2 = 4 * TIME_UNIT; --¸£ÔµË¥¼õ¿ªÊ¼Ê±¼ä £¨4Сʱ£©
FUYUAN_EXTRA = 2; --½±ÀøµÄ¸£Ôµµã
TIMES_IN_DAY_EXTRA = 2; --»ñÈ¡½±ÀøËùÐèÒ»ÌìÁìÈ¡¸£Ôµµ Ä´ÎÊý
FUYUAN_MAX_GAIN = 100; --Ò»´Î×¿É»»È¡¶µÉٵ㸣Ե
--Æô¶¯¸£Ôµ»ýÔÜ
function FuYuan_Start()
--δ³ä¿¨
if( IsCharged() ~= 1 ) then
return 0;
end
SetTask( TASKID_FY_START_ONLINE_TIME, GetGameTime() );
SetTask( TASKID_FY_ADDITIONAL_TIME, 0 );
SetTask( TASKID_GAIN_LAST_DATE, date("%Y%m%d") );
SetTask( TASKID_GAIN_TIMES_IN_DAY, 0 );
end
--ÔÝÍ£¸£Ôµ»ýÔÜ
function FuYuan_Pause()
if( IsFuYuanAvailable() ~= 1 ) then
return 0;
end
local nFYStartOnlineTime = GetTask( TASKID_FY_START_ONLINE_TIME );
local nFYAdditionalTime = GetTask( TASKID_FY_ADDITIONAL_TIME );
if( IsFuYuanPaused() ~= 1 ) then
if (nFYAdditionalTime < 0) then
nFYAdditionalTime = 0
end
local nFYDiffer = GetGameTime() - nFYStartOnlineTime;
if (nFYDiffer < 0) then
nFYDiffer = 0
end
local nFYTotalTime = nFYDiffer + nFYAdditionalTime;
SetTask( TASKID_FY_ADDITIONAL_TIME, nFYTotalTime );
SetTask( TASKID_FY_START_ONLINE_TIME, -1 );
end
end
--¼ÌÐø¸£Ôµ»ýÔÜ
function FuYuan_Resume()
if( IsFuYuanAvailable() ~= 1 or IsFuYuanPaused() ~= 1 ) then
return 0;
end
SetTask( TASKID_FY_START_ONLINE_TIME, GetGameTime() );
end
--ÔÚÏßʱ¼ä»»È¡¸£Ôµ ( ·µ»ØÖµ 1:Õý³£ÁìÈ¡, 0:ÔÚÏßʱ¼ä²»¹»ÁìÈ¡¸£Ôµ, -1:δ³ä¿¨»ò¸£Ôµ»ýÔÜÉÐδÆô¶¯ )
function FuYuan_Gain()
if( IsFuYuanAvailable() ~= 1 ) then
return -1;
end
local nFuYuanGained = 0; --»ñÈ¡µÄ¸£Ôµµã;
local nFYStartOnlineTime;
local nFYTotalTime, nFYValidTime = FuYuan_GetDepositTime();
local nCurrentOnlineTime = GetGameTime();
local nFYGainLastDate = GetTask( TASKID_GAIN_LAST_DATE );
local nFYGainTimesInDay = GetTask( TASKID_GAIN_TIMES_IN_DAY )
--ÔÚÏßʱ¼ä²»¹»ÁìÈ¡¸£Ôµ
if( nFYValidTime < TIME_FUYUAN_THRESHOLD1 ) then
return 0;
end
nFuYuanGained = floor( nFYValidTime / TIME_PER_FUYUAN );
nFYGainTimesInDay = nFYGainTimesInDay + 1;
nFYStartOnlineTime = nCurrentOnlineTime - mod( nFYValidTime, TIME_UNIT );
--Ò»ÌìÄÚÁìÈ¡×ã¹»´Î¸£Ôµ,¶îÍâ� �Ù½±Àø¸£Ôµ
if( tonumber(date("%Y%m%d")) == nFYGainLastDate ) then
if( nFYGainTimesInDay == TIMES_IN_DAY_EXTRA ) then
nFuYuanGained = nFuYuanGained + FUYUAN_EXTRA;
end
else
nFYGainLastDate = date("%Y%m%d");
nFYGainTimesInDay = 1;
end
if( nFuYuanGained >= FUYUAN_MAX_GAIN ) then
FuYuan_Add( FUYUAN_MAX_GAIN );
WriteLog( "["..date("%Y-%m-%d %X").."] "..GetAccount().."("..GetName()..") get over "..FUYUAN_MAX_GAIN.." FUYUAN. (Current OnlineTime: "..GetGameTime().." sec)" );
else
FuYuan_Add( nFuYuanGained );
end
SetTask( TASKID_FY_START_ONLINE_TIME, nFYStartOnlineTime );
SetTask( TASKID_FY_ADDITIONAL_TIME, 0 );
SetTask( TASKID_GAIN_LAST_DATE, nFYGainLastDate );
SetTask( TASKID_GAIN_TIMES_IN_DAY, nFYGainTimesInDay );
return 1;
end
--»ñµÃÍæ¼Òµ±Ç°¿É»»È¡¸£ÔµµÄÀ Û»ýÔÚÏßʱ¼ä£¨Ã룩 £¨2¸ö·µ»ØÖµ£¬·Ö±ðΪ»»È¡¸£� �µµÄËùÓÐʱ¼äºÍÓÐЧʱ¼ä£©
function FuYuan_GetDepositTime()
if( IsFuYuanAvailable() ~= 1 ) then
return 0, 0;
end
local nCurrentOnlineTime = GetGameTime();
local nFYStartOnlineTime = GetTask( TASKID_FY_START_ONLINE_TIME );
local nFYAdditionalTime = GetTask( TASKID_FY_ADDITIONAL_TIME );
local nFYTotalTime;
local nFYValidTime;
--¸£Ôµ»ýÔÜÒѱ»ÔÝÍ£
if( IsFuYuanPaused() == 1 ) then
if( GetTeamSize() > 1 ) then
return 0, 0; --×é¶Ó״̬Ϣ²»ÄܼÌÐø¸£Ôµ»ýÔ Ü£¬·ÀÖ¹³öÏÖ±¾ÈËÔÚ¹Ò»ú£¬¶Ó ÓÑ´úÁ츣ԵµÄÒì³£³öÏÖʱ½«± ¾ÈËÔÝͣ״̬ÆÆ»µ
else
nFYStartOnlineTime = nCurrentOnlineTime; --Ö»ÄÜ»»È¡ÔÝ֮ͣǰ»ýÔܵÄÔÚÏ ßʱ¼ä
FuYuan_Resume(); --¼ÌÐø¸£Ôµ»ýÔÜ,·ÀÖ¹¸£ÔµPause¶ø δResume¾ÍÁìÈ¡¸£ÔµµÄÒì³£Çé¿ö Ï¢µ¼Ö¢µÄ¸£Ôµ»ýÔÜËÀËø
end
end
if (nFYAdditionalTime < 0) then
nFYAdditionalTime = 0;
SetTask(TASKID_FY_ADDITIONAL_TIME, 0);
end
if ((nCurrentOnlineTime - nFYStartOnlineTime) < 0) then
SetTask(TASKID_FY_START_ONLINE_TIME, nCurrentOnlineTime);
nFYStartOnlineTime = nCurrentOnlineTime;
end
nFYTotalTime = ( nCurrentOnlineTime - nFYStartOnlineTime ) + nFYAdditionalTime;
if( nFYTotalTime <= TIME_FUYUAN_THRESHOLD2 ) then
nFYValidTime = nFYTotalTime;
else
local nHour = floor( nFYTotalTime / TIME_UNIT );
nFYValidTime = ( nHour - floor( ( nFYTotalTime - TIME_FUYUAN_THRESHOLD2 ) / ( 2 * TIME_UNIT ) ) ) * TIME_UNIT + mod( nFYTotalTime, TIME_PER_FUYUAN );
end
return nFYTotalTime, nFYValidTime;
end
--»ñµÃÍæ¼ÒµÄ¸£ÔµÖµ
function FuYuan_Get()
return GetTask( TASKID_FY );
end
--ÉèÖÃÍæ¼ÒµÄ¸£ÔµÖµ
function FuYuan_Set( value )
if( IsFuYuanAvailable() ~= 1 ) then
return 0;
end
SetTask( TASKID_FY, value );
SyncTaskValue( TASKID_FY );
return 1;
end
--Ôö¼ÓÍæ¼ÒµÄ¸£ÔµÖµ
function FuYuan_Add( value )
local nResult = FuYuan_Set( FuYuan_Get() + value );
if( nResult == 1 ) then
Msg2Player( "<#>Ngµi thu ®îc "..value.."<#> ®iÓm phóc duyªn " );
end
return nResult;
end
--¼õÉÙÍæ¼ÒµÄ¸£ÔµÖµ
function FuYuan_Reduce( value )
local nResult = FuYuan_Set( FuYuan_Get() - value );
if( nResult == 1 ) then
Msg2Player( "<#>Ngµi tiªu hao "..value.."<#> ®iÓm phóc duyªn." );
end
return nResult;
end
--ÅжÏÍæ¼ÒÊÇ·ñ³ä¹ý¿¨
function IsCharged()
if( GetExtPoint( 0 ) >= 1 ) then
return 1;
else
return 0;
end
end
--ÅжÏÍæ¼ÒÊÇ·ñÒѾÆô¶¯¸£Ôµ» ýÔÜ
function IsFuYuanStarted()
local nFYStartOnlineTime = GetTask( TASKID_FY_START_ONLINE_TIME );
if( nFYStartOnlineTime == 0 ) then
return 0;
else
return 1;
end
end
--ÅжÏÍæ¼Ò¿É·ñ½øÐи£Ôµ²Ù×÷
function IsFuYuanAvailable()
--δ³ä¿¨»òδÆô¶¯¸£Ôµ»ýÔÜ
if( IsCharged() ~= 1 or IsFuYuanStarted() ~= 1 ) then
return 0;
else
return 1;
end
end
--ÅжÏÍæ¼Ò¸£Ôµ»ýÔÜÊÇ·ñÒѱ»Ô ÝÍ£
function IsFuYuanPaused()
local nFYStartOnlineTime = GetTask( TASKID_FY_START_ONLINE_TIME );
if( nFYStartOnlineTime < 0 ) then
return 1;
else
return 0;
end
end
+ npc_saodisend.lua
-- ====================== ÎļþÐÅÏ¢ ======================
-- ½£ÏÀÇéÔµÍøÂç°æÔ½ÄÏ°æ - NPC¶Ô»°´¦Àí
-- ÎļþÃû¡¡£ºnpc_saodiseng.lua
-- ´´½¨Õß¡¡£º×Ó·Çô~
-- ´´½¨Ê±¼ä£º2009-02-04 16:25:15
-- ================================================== ====
Include("\\script\\task\\metempsychosis\\task_func.lua")
Include("\\script\\task\\metempsychosis\\translife_4.lua")
--Phong V©n LÖnh Bµi - §iÒu chØnh thêi gian trïng sinh ®èi víi c¸c t©n thñ - Modified By DinhHQ - 20110926
Include("\\script\\activitysys\\config\\1005\\check_func.lu a")
-- ±»Ô½ÄÏÇ¿ÖÆǨÒƵ½ ±±¶·ÀÏÈË´¦
function beidou_translife_main()
CreateTaskSay({"<dec><npc>L¹i ®Õn 1 ngêi n÷a? Xem ra chuyÖn ta ®¹t ®îc <B¾c §Èu Trêng Sinh ThuËt - T©m Ph¸p Thiªn> kh«ng cßn lµ bÝ mËt n÷a råi. LÏ nµo viÖc phÕ vâ c«ng kh«ng lµm cho thiªn h¹ sî h·i hay sao. ViÖc ®· nh thÕ nµy råi, ng¬i t×m ta cã viÖc g×.",
"PhÕ vâ c«ng? Ngêi ®õng däa ta chø?/zhuansheng_ondialog",
"KiÓm tra kü n¨ng trïng sinh 4 cßn d ®iÓm kü n¨ng/querySkillPoint_4",
"TÈy ®iÓm kü n¨ng trïng sinh 4/wantClearSkillPoint_4",
"Vâ c«ng, t©m ph¸p c¸i g×! L¹i thªm 1 kÎ ®iªn khïng/OnCancel"
});
end
function zhuansheng_ondialog()
if (GetTask(TSK_ZHUANSHENG_FLAG) == 1) then
Msg2Player("§· häc <B¾c §Èu Trêng Sinh ThuËt - C¬ Së Thiªn>");
end
local tbOpp = {"<dec><npc>Kh«ng sai, lÏ nµo ng¬i kh«ng biÕt? Tu luyÖn B¾c §Èu Trêng Sinh ThuËt xong. CÊp bËc cña ®¹i hiÖp sÏ thµnh cÊp 10, tÊt c¶ kü n¨ng vâ c«ng sÏ bÞ phÕ, ®¹t ®Õn cÊp bËc t¬ng øng míi cã thÓ håi phôc (cÊp 90, 120 sÏ kh«i phôc c¸c kü n¨ng vèn cã). Ngoµi ra, sÏ b¶o lu tÊt c¶ nh÷ng ®iÓm kü n¨ng vµ tiÒm n¨ng cña ®¹i hiÖp.<enter> Nãi chung, ®¹i hiÖp cÇn b¾t ®Çu tõ ®Çu. Nhng còng ®õng qu¸ n«n nãng, ®îi ng¬i lªn cÊp 120 130 sÏ t¸i xuÊt giang hå, thiªn h¹ nµy vÉn lµ thiªn h¹ cña ng¬i mµ."};
local n_level = GetLevel();
local n_transcount = ST_GetTransLifeCount();
local n_date = tonumber(GetLocalDate("%Y%m%d"));
if (n_transcount == 0 and n_level == 199 and (n_date >= ZHUANSHENG_ITEM_BEGIN and n_date <= ZHUANSHENG_ITEM_ENDLE)) then --ÐèÒª¼ÓÈëʱ¼äÏÞÖÆ
tinsert(tbOpp, "Ta muèn t×m hiÓu vÒ B¾c §Èu Tiªn §¬n/zhuansheng_xiandan");
end
tinsert(tbOpp, "Xin hái tu luyÖn <B¾c §Èu Trêng Sinh ThuËt - T©m Ph¸p Thiªn> cÇn nh÷ng ®iÒu kiÖn g×?/zhuansheng_help_require");
tinsert(tbOpp, "Lµm thÕ nµo cã thÓ häc <B¾c §Èu Trêng Sinh ThuËt - T©m Ph¸p Thiªn>?/zhuansheng_help_method");
tinsert(tbOpp, "Xin hái ®¼ng cÊp cña ta cã thÓ lu gi÷ bao nhiªu ®iÓm kü n¨ng vµ tiÒm n¨ng?/zhuansheng_help_prop");
tinsert(tbOpp, "Xin hái ta cã thÓ tu luyÖn ®Õn møc ®é nµo råi?/zhuansheng_query");
tinsert(tbOpp, "Xin hái thêi gian ®Ó chuyÓn sinh lÇn kÕ tiÕp: /zhuansheng_time");
tinsert(tbOpp, "KÕt thóc ®èi tho¹i/OnCancel");
CreateTaskSay(tbOpp);
end
--תÉúµÄÌõ¼þ
function zhuansheng_help_require()
CreateTaskSay({"<dec><npc>§iÒu kiÖn rÊt ®¬n gi¶n"
.."<enter> ".."1. Yªu cÇu ®¼ng cÊp trïng sinh:"
.."<enter> "..format("LÇn trïng sinh thø %d, ®¼ng cÊp kh«ng ®îc nhá h¬n %d", 1, TB_LEVEL_LIMIT[1])
.."<enter> "..format("LÇn trïng sinh thø %d, ®¼ng cÊp kh«ng ®îc nhá h¬n %d", 2, TB_LEVEL_LIMIT[2])
.."<enter> "..format("LÇn trïng sinh thø %d, ®¼ng cÊp kh«ng ®îc nhá h¬n %d", 3, TB_LEVEL_LIMIT[3])
.."<enter> "..format("LÇn trïng sinh thø %d, ®¼ng cÊp kh«ng ®îc nhá h¬n %d", 4, TB_LEVEL_LIMIT[4])
.."<enter> "..format("LÇn trïng sinh thø %d, ®¼ng cÊp kh«ng ®îc nhá h¬n %d", 5, TB_LEVEL_LIMIT[5])
.."<enter> ".."2. §· häc <B¾c §Èu Trêng Sinh ThuËt - C¬ Së Thiªn>"
.."<enter> ".."3. Cëi bá tÊt c¶ trang bÞ vµ ngùa trªn ngêi."
.."<enter> ".."4. B¾t buéc ph¶i tho¸t khái chiÕn ®éi vâ l©m liªn ®Êu."
.."<enter> ".."5. Kh«ng ®îc cßn nhiÖm vô cha hoµn thµnh (S¸t thñ, tÝn sø, D· TÈu)."
.."<enter> ".."6. ChuyÓn sinh lÇn thø 1 ®Õn thø 3 cÇn cã 100 v¹n lîng, chuyÓn sinh lÇn thø 4 cÇn cã 200 v¹n lîng"
.."<enter> "..format("7. ChuyÓn sinh lÇn 4 cÇn cã %d c¸i %s.", TBITEMNEED_4[1].nCount, TBITEMNEED_4[1].szName)
.."<enter> "..format("8. ChuyÓn sinh lÇn 4 cÇn cã %d c¸i %s.", TBITEMNEED_4[2].nCount, TBITEMNEED_4[2].szName)
.."<enter> ".."9. Cha nhËn hoÆc cha hoµn thµnh nhiÖm vô kÜ n¨ng cÊp 150",
--.."<enter>¡¡¡¡".."3¡¢±ØÐëÇå³ýʦͽ¹Øϵ¡£", ¸ÄΪתÉúºó80¼¶ÒÔϲ»ÄÜʹÓà ʦͽÁî
"T×m hiÓu viÖc kh¸c./zhuansheng_ondialog",
"Ta hiÓu råi./OnCancel"});
end
--תÉúµÄºÃ´¦
function zhuansheng_help_effect()
CreateTaskSay({"<dec><npc>1. Thu ®îc ®iÓm d kü n¨ng vµ tiÒm n¨ng"
.."<enter> ".."2. Thu ®îc kh¸ng tÝnh cã giíi h¹n cao h¬n, cã ®îc n¨ng lùc sinh tån nhiÒu h¬n."
.."<enter> ".."3. T¨ng giíi h¹n kü n¨ng vâ c«ng cao nhÊt, sÏ cã ®îc lùc c«ng kÝch m¹nh h¬n vµ tèc ®é ®¸nh nhanh h¬n."
.."<enter> ".."4. Cã thÓ sö dông 1 sè trang bÞ míi nhÊt"
.."<enter> ".."5. Thu ®îc c¬ héi 1 lÇn tÈy ®iÓm miÔn phÝ",
"T×m hiÓu viÖc kh¸c./zhuansheng_ondialog",
"Ta hiÓu råi./OnCancel"});
end
--ÈçºÎѧϰתÉú
function zhuansheng_help_method()
CreateTaskSay({"<dec><npc>NÕu nh ng¬i ®· häc qua <B¾c §Èu Trêng Sinh ThuËt - C¬ Së Thiªn>, th× ta cã thÓ ®äc khÈu quyÕt d¹y ng¬i <B¾c §Èu Trêng Sinh ThuËt - T©m Ph¸p Thiªn>."
.. "ChuyÓn sinh lÇn 1 ®Õn lÇn 3 cÇn cã 10 ngµn v¹n lîng lµ ®îc, chuyÓn sinh lÇn 4 th× ph¶i 20 ngµn v¹n, ha ha."
.. "<enter>Nh¾c nhë mét chót lµ, nÕu nh muèn chuyÓn sinh lÇn 4, tríc tiªn b¶n th©n m×nh cÇn ph¶i nhËn nhiÖm vô, sau ®ã h·y ®i"
.. "<color=yellow>Trêng B¹ch S¬n Nam, Dîc V¬ng §éng TÇng 4, Sa M¹c S¬n §éng 3, Kháa Lang §éng <color> ®¸nh b¹i <color=yellow> S¬ng §ao, Xuyªn S¬n, TËt Phong, ¶nh C«n <color>"
.. "Míi cã tØ lÖ nhÊt ®Þnh nhËn ®îc TÝch LÞch §¬n vËt cÇn thiÕt ®Ó chuyÓn sinh 4.",
"§îc, ta muèn häc ngay./zhuansheng_want_learn",
"NhËn nhiÖm vô chuyÓn sinh 4/wantGetTranslifeTask_4",
"Ta muèn t×m hiÓu chi tiÕt h¬n/zhuansheng_ondialog",
"Ta biÕt rå/OnCancel"});
end
--ÏëҪѧϰתÉú
--ÔÚ´ËÅжÏÊÇ·ñ·ûºÏתÉúµÄÌõ¼ þ
function zhuansheng_want_learn()
local n_transcount = ST_GetTransLifeCount()
if (n_transcount >= 4) then
CreateTaskSay({"<dec><npc>"..format("LÇn chuyÓn sinh thø %d vÉn cha më, thêi gian cô thÓ sÏ cËp nhËt sau", 5),
"KÕt thóc ®èi tho¹i/OnCancel"});
return 0;
end
local nTaskValue = GetTask(2885)
local nTmpRes = floor(nTaskValue/100)
if nTaskValue > 0 and mod(nTmpRes, 100) < 14 then
Msg2Player("Ng¬i ®· nhËn nhiÖm vô kü n¨ng 150, xin h·y hoµn thµnh nhiÖm vô råi h·y ®Õn gÆp ta")
return
end
if (check_zhuansheng() == 0) then
return 0;
end
if (n_transcount == 0) then
CreateTaskSay({"<dec><npc>".."LÇn chuyÓn sinh thø nhÊt 5 lo¹i phßng ngù sÏ gia t¨ng.",
"§îc, ta muèn häc ngay./#zhuansheng_sure_learn(-1)", "KÕt thóc ®èi tho¹i/OnCancel"});
elseif (n_transcount < 0 or n_transcount >=5) then
Say("Tr¹ng th¸i bÊt thêng xin mêi liªn l¹c víi nhµ ®iÒu hµnh xö lý.", 0);
else
local tbOpp = {"<dec><npc>".."Xin mêi chän ®iÓm phßng ngù muèn t¨ng:"};
for k, sz in TB_BASE_RESIST do
tinsert(tbOpp, format("%s%s/#zhuansheng_sure_learn(%d)", "+", sz, k));
end
tinsert(tbOpp, "KÕt thóc ®èi tho¹i/OnCancel")
CreateTaskSay(tbOpp);
end
end
function zhuansheng_sure_learn(n_resist)
if (check_zhuansheng() == 0) then
return 0;
end
local n_transcount = ST_GetTransLifeCount();
if (n_transcount >= 2) then
for i = 2, n_transcount do
local n_translevel, n_transresist = zhuansheng_get_gre(i);
if (n_translevel ~= 0 and n_transresist == n_resist) then
CreateTaskSay({"<dec><npc>"..format("§©y lµ lÇn chuyÓn sinh thø %d vµ ®· chän %s kh«ng thÓ chän nhiÒu lÇn 1 ®iÓm phßng ngù, xin mêi h·y chän l¹i.", i, TB_BASE_RESIST[n_resist]),
"Ta muèn chän l¹i/zhuansheng_want_learn",
"KÕt thóc ®èi tho¹i/OnCancel"});
return 0;
end
end
end
SetTaskTemp(TSKM_ZHUANSHENG_RESISTID, n_resist);
if (n_transcount == 2 and GetLevel() >= 190) then
SetTask(TSK_ZHUANSHENG_AWARD, 1);
end
local nlevel = GetLevel();
--תÉúʱµÄ´¦Àí
LeaveTeam(); --½âÉ¢×é¶Ó¹Øϵ
ST_DoTransLife(); --Ö´ÐÐתÉú£¬»á×Ô¶¯µ÷ÓÃ\\script\\ global\\translife.luaµÄmainº¯Êý ·µ»ØֵΪ1Ϊ³É¹¦£¬³É¹¦ºó»á� �ǼתÉúÇ°µÄµÈ¼¶¡£
CreateTaskSay({"<dec><npc>Ng¬i ®· häc <B¾c §Èu Trêng Sinh ThuËt - T©m Ph¸p Thiªn> råi.", "§a ta s phô ®· chØ gi¸o/OnCancel"});
end
function check_zhuansheng()
-- Ô½ÄÏ°æÔÊÐí¶à´ÎתÉú ×î¶à 5´Î
if (check_zhuansheng_level() ~= 1) then --»ù´¡ÆªµÄѧϰ
return 0;
end
local ntranscount = ST_GetTransLifeCount();
if (ntranscount ~= 0) then
--Phong V©n LÖnh Bµi - §iÒu chØnh thêi gian trïng sinh ®èi víi c¸c t©n thñ - Modified By DinhHQ - 20110926
if tbPVLB_Check:IsNewPlayer() == 1 and tbPVLB_Check:CheckTime() == 1 then
local tb = {6, 10, 180, 180, 180}
if (GetTask(TSK_ZHUANSHENG_LASTTIME) + tb[ntranscount]*24*60*60 >= GetCurServerTime()) then
CreateTaskSay({format(TB_TRANSLIFE_ERRORMSG[12], tb[ntranscount]), "§îc råi./OnCancel"});
return 0;
end
else
if (GetTask(TSK_ZHUANSHENG_LASTTIME) + TB_TRANSTIME_LIMIT[ntranscount]*24*60*60 >= GetCurServerTime()) then
CreateTaskSay({format(TB_TRANSLIFE_ERRORMSG[12], TB_TRANSTIME_LIMIT[ntranscount]), "§îc råi./OnCancel"});
return 0;
end
end
end
--type=2 ºÃÏñÊÇÉíÉÏ
--type=3 Ó¦¸ÃÊDZ³°ü
if (CalcItemCount(2,0,-1,-1,-1) > 0) then
CreateTaskSay({TB_TRANSLIFE_ERRORMSG[1], "§îc råi./OnCancel"});
return 0;
end
--if (check_zhuansheng_league(LG_SHITULEAGUE) == 1) then --ʦͽ¹Øϵ
-- CreateTaskSay({TB_TRANSLIFE_ERRORMSG[3], "ºÃµÄ£¬ÎÒÖªµÀÁË¡£/OnCancel"});
-- return 0;
--end
--T¹m bá ®iÒu kiÖn rêi ®éi liªn ®Êu khi trïng sinh 4 - Modified By DinhHQ - 20110813
if ntranscount < 3 and (check_zhuansheng_league(LG_WLLSLEAGUE) == 1) then --Õ½¶Ó¹Øϵ
CreateTaskSay({TB_TRANSLIFE_ERRORMSG[6], "§îc råi./OnCancel"});
return 0;
end
if (GetTask(TSK_KILLER_ID) ~= 0) then --ɱÊÖÈÎÎñÍê³É
CreateTaskSay({TB_TRANSLIFE_ERRORMSG[8], "§îc råi./OnCancel"});
return 0;
end
if (GetTask(TSK_MESSENGER_FENG) ~= 0 or GetTask(TSK_MESSENGER_SHAN) ~= 0 or GetTask(TSK_MESSENGER_QIAN) ~= 0 ) then --ÐÅʹÈÎÎñÍê³É
CreateTaskSay({TB_TRANSLIFE_ERRORMSG[9], "§îc råi./OnCancel"});
return 0;
end
if (GetTask(TSK_TASKLINK_STATE) ~= 3 and GetTask(TSK_TASKLINK_STATE) ~= 0) then --Ò°ÛÅÈÎÎñÍê³É
CreateTaskSay({TB_TRANSLIFE_ERRORMSG[10], "§îc råi./OnCancel"});
return 0;
end
if GetTask(TSK_TASKLINK_CancelTaskLevel) ~= 0 or GetTask(TSK_TASKLINK_CancelTaskExp1) ~= 0 or GetTask(TSK_TASKLINK_CancelTaskExp2) ~= 0 then
CreateTaskSay({TB_TRANSLIFE_ERRORMSG[11], "§îc råi./OnCancel"});
return 0;
end
if (GetTask(TSK_ZHUANSHENG_FLAG) ~= 1) then --»ù´¡ÆªµÄѧϰ
CreateTaskSay({TB_TRANSLIFE_ERRORMSG[4], "§îc råi./OnCancel"});
return 0;
end
--Phong V©n LÖnh Bµi - §iÒu chØnh phÝ trïng sinh ®èi víi c¸c t©n thñ - Modified By DinhHQ - 20110926
if tbPVLB_Check:IsNewPlayer() == 1 and tbPVLB_Check:CheckTime() == 1 then
if ntranscount == 0 then
if GetCash() < 1000000 then
CreateTaskSay({"H×nh nh tiÒn vÉn cha ®ñ <color=red>1000000<color>.", "§îc råi./OnCancel"});
return 0;
end
elseif ntranscount == 1 then
if GetCash() < 20000000 then
CreateTaskSay({"H×nh nh tiÒn vÉn cha ®ñ <color=red>20000000<color>.", "§îc råi./OnCancel"});
return 0;
end
else
if (ntranscount < 3 and GetCash() < ZHUANSHENG_TUITION) then --jxbÒª1ÒÚ
CreateTaskSay({TB_TRANSLIFE_ERRORMSG[2], "§îc råi./OnCancel"});
return 0;
end
end
else
if (ntranscount < 3 and GetCash() < ZHUANSHENG_TUITION) then --jxbÒª1ÒÚ
CreateTaskSay({TB_TRANSLIFE_ERRORMSG[2], "§îc råi./OnCancel"});
return 0;
end
end
-- ÐèÒªµÚ4´ÎתÉú£¬ÅжÏÊÇ·ñ¾ß� �Ð999¸öÅùö¨µ¯£¬±±¶·³¤ÉúÊõ¡ª ´ó³ËÐÄ·¨ ºÍ ¶þÒÚjxb
if ntranscount == 3 then
for i=1,getn(TBITEMNEED_4) do
local tbProb = TBITEMNEED_4[i].tbProb
if CalcItemCount(3,tbProb[1], tbProb[2],tbProb[3], -1) < TBITEMNEED_4[i].nCount then
CreateTaskSay({TB_TRANSLIFE_ERRORMSG[13 + i], "§îc råi./OnCancel"})
return 0
end
end
-- 4ת¶þÒÚjxb
if GetCash() < ZHUANSHENG_TUITION_4 then
CreateTaskSay({TB_TRANSLIFE_ERRORMSG[13], "§îc råi./OnCancel"});
return 0;
end
end
--ÆäËû£¿É±ÊÖÈÎÎñ£¿
return 1;
end
--תÉúºóÄܱ£ÁôµÄDZÄܵ㠼¼Äܵã˵Ã÷
function zhuansheng_help_prop()
local nlevel = GetLevel();
local ncurexp = GetExp();
local ntranscount = ST_GetTransLifeCount();
if (check_zhuansheng_level() ~= 1) then
return 0;
end
local nmgpoint, nprop, nresist, naddskill = TB_LEVEL_REMAIN_PROP[nlevel][ntranscount+1][1],
TB_LEVEL_REMAIN_PROP[nlevel][ntranscount+1][2],
TB_LEVEL_REMAIN_PROP[nlevel][ntranscount+1][3],
TB_LEVEL_REMAIN_PROP[nlevel][ntranscount+1][4];
local sz_res = "Chän 1 lo¹i kh¸ng tÝnh";
local sz_addskill = "";
if (ntranscount == 0) then
sz_res = "TÊt c¶ kh¸ng tÝnh";
end
if (nlevel == 199 and ncurexp >= ZHUANSHENG_XIANDAN_MINEXP and ntranscount == 0) then
nmgpoint, nprop, nresist, naddskill = TB_LEVEL_REMAIN_PROP[200][ntranscount+1][1],
TB_LEVEL_REMAIN_PROP[200][ntranscount+1][2],
TB_LEVEL_REMAIN_PROP[200][ntranscount+1][3],
TB_LEVEL_REMAIN_PROP[200][ntranscount+1][4];
sz_addskill = "[HiÖn t¹i kinh nghiÖm ®· vît qu¸ 2 tû:]";
end
CreateTaskSay({"<dec><npc>"..format("Theo nh cÊp %d cña ng¬i vµ trïng sinh %d lÇn, %s cã thÓ t¨ng <color=yellow>%d<color> tiÒm n¨ng, <color=yellow>%d <color> kü n¨ng, t¨ng <color=yellow>%d%%<color> kh¸ng tÝnh (%s), n©ng cao <color=yellow>%d <color> giíi h¹n kü n¨ng cao nhÊt.",
nlevel, (ntranscount+1), sz_addskill, nprop, nmgpoint, nresist, sz_res, naddskill),
"T×m hiÓu viÖc kh¸c./zhuansheng_ondialog",
"§îc råi./OnCancel"});
end
function zhuansheng_query()
--do return Say("δÍê³É", 0)end
local n_transcount = ST_GetTransLifeCount();
local nmgpoint, nprop, nskill = 0,0,0;
local tbresist = {0, 0, 0, 0, 0};
local sz_msg = "";
if (n_transcount ~= 0) then
for i = 1, n_transcount do
nlevel, nresistid = zhuansheng_get_gre(i);
nmgpoint = TB_LEVEL_REMAIN_PROP[nlevel][i][1] + nmgpoint;
nprop = TB_LEVEL_REMAIN_PROP[nlevel][i][2] + nprop;
nskill = TB_LEVEL_REMAIN_PROP[nlevel][i][4] + nskill;
if (nresistid >= 0 and nresistid <= 4) then
tbresist[nresistid+1] = tbresist[nresistid+1] + TB_LEVEL_REMAIN_PROP[nlevel][i][3];
sz_msg = sz_msg.."<enter>"..format("Trïng sinh lÇn %d ®¼ng cÊp: %d; chän kh¸ng tÝnh: %s", i, nlevel, TB_BASE_RESIST[nresistid]);
elseif (nresistid == 255) then
tbresist[1] = tbresist[1] + TB_LEVEL_REMAIN_PROP[nlevel][i][3];
tbresist[2] = tbresist[2] + TB_LEVEL_REMAIN_PROP[nlevel][i][3];
tbresist[3] = tbresist[3] + TB_LEVEL_REMAIN_PROP[nlevel][i][3];
tbresist[4] = tbresist[4] + TB_LEVEL_REMAIN_PROP[nlevel][i][3];
tbresist[5] = tbresist[5] + TB_LEVEL_REMAIN_PROP[nlevel][i][3];
sz_msg = sz_msg.."<enter>"..format("Trïng sinh lÇn %d ®¼ng cÊp: %d; chän kh¸ng tÝnh: %s", i, nlevel, "TÊt c¶ kh¸ng tÝnh");
end
end
end
CreateTaskSay({format("%s<enter>%s<enter>%s<enter>%s<enter>%s<enter>%s<enter>%s<enter>%s<enter>%s<enter>%s%s",
"<dec><npc>",
format("Sè lÇn chuyÓn sinh: %d", n_transcount),
format("Thu ®îc ®iÓm kü n¨ng: %d", nmgpoint),
format("Thu ®îc ®iÓm tiÒm n¨ng: %d", nprop),
format("§iÓm kü n¨ng cao nhÊt t¨ng thªm: %d", nskill),
format("Háa phßng t¨ng: %d", tbresist[1]),
format("B¨ng phßng t¨ng: %d", tbresist[2]),
format("§éc phßng t¨ng: %d", tbresist[3]),
format("L«i phßng t¨ng: %d", tbresist[4]),
format("Phæ phßng t¨ng: %d", tbresist[5]),
sz_msg
),
"T×m hiÓu viÖc kh¸c./zhuansheng_ondialog",
"§îc råi./OnCancel"});
end
function zhuansheng_xiandan()
CreateTaskSay({"<dec><npc>".."'B¾c ®Èu tiªn ®¬n' lµ lo¹i linh dîc mµ vÞ vâ l©m cao thñ cã néi c«ng th©m hËu nµo muèn häc 'B¾c ®Èu trêng sinh thuËt' ®Òu ph¶i dïng ®Õn, sau khi sö dông cã thÓ t¨ng thªm nhiÒu phÇn c«ng lùc. ChÕ t¹o B¾c §Èu Tiªn §¬n b¾t buéc cÊp 199 vµ cã 201000 v¹n kinh nghiÖm míi chÕ t¹o ®îc, lóc chÕ t¹o B¾c §Èu Tiªn §¬n nh÷ng kinh nghiÖm vît qu¸ 2 tû sÏ chuyÓn hãa vµo tiªn ®¬n. Nªn nhí r»ng ph¶i chuyÓn sinh xong míi sö dông ®îc, mçi ngêi nhiÒu nhÊt sö dông 1 linh ®¬n, ®ång thêi b¾t buéc trong vßng 30 ngµy ph¶i sö dông. Tiªn ®¬n cã ®¬n vÞ kinh nghiÖm lµ 1000 v¹n, v× vËy nh÷ng kinh nghiÖm thõa cã nh÷ng sè kh«ng bÞ lît bá ®i. Ng¬i muèn chÕ t¹o 'B¾c §Èu Tiªn §¬n' kh«ng?",
"ChÕ t¹o B¾c §Èu Tiªn §¬n/zhuansheng_makexiandan",
"T×m hiÓu vÒ ®iÓm kinh nghiÖm/zhuansheng_help_xiandan",
"Ta muèn t×m hiÓu thªm./zhuansheng_ondialog",
"KÕt thóc ®èi tho¹i/OnCancel"
});
end
function zhuansheng_makexiandan()
local n_level = GetLevel();
local n_transcount = ST_GetTransLifeCount();
if (n_level ~= 199 or n_transcount ~= 0) then
return
end
if (GetTask(TSK_ZHUANSHENG_XIANDAN) > 0) then
CreateTaskSay({"<dec><npc>".."Mçi ngêi chØ cã thÓ chÕ t¹o 1 B¾c §Èu Tiªn §¬n, c¸c h¹ kh«ng thÓ lµm thÕ.", "KÕt thóc ®èi tho¹i/OnCancel"});
return
end
local n_curexp = GetExp();
if (n_curexp - ZHUANSHENG_XIANDAN_MINEXP >= ZHUANSHENG_XIANDAN_BASEEXP) then
local n_addexp = n_curexp - ZHUANSHENG_XIANDAN_MINEXP;
n_addexp = floor(n_addexp / 10e7) * 10e7;
CreateTaskSay({"<dec><npc>".."Ng¬i cã"..n_addexp.." kinh nghiÖm sÏ bÞ chuyÓn vµo tiªn ®¬n. Ng¬i cã x¸c nhËn muèn chÕ t¹o 'B¾c §Èu Tiªn §¬n'?",
"§óng råi, ta muèn luyÖn tiªn ®¬n!/zhuansheng_surexiandan",
"Ta muèn t×m hiÓu thªm./zhuansheng_ondialog",
"KÕt thóc ®èi tho¹i/OnCancel"});
else
CreateTaskSay({"<dec><npc>".."Theo nh c«ng lùc cña c¸c h¹ kh«ng thÓ luyÖn thµnh B¾c §Èu Tiªn §¬n, muèn luyÖn thµnh tiªn ®¬n th× xin h·y luyÖn thªm thêi gian n÷a nhÐ!",
"Ta muèn t×m hiÓu thªm./zhuansheng_ondialog",
"KÕt thóc ®èi tho¹i/OnCancel"});
end
end
function zhuansheng_surexiandan()
local n_level = GetLevel();
local n_transcount = ST_GetTransLifeCount();
if (n_level ~= 199 or n_transcount ~= 0) then
return
end
if (CalcFreeItemCellCount() < 10) then
CreateTaskSay({"<dec><npc>".."Hµnh trang kh«ng ®ñ 10 «, xin mêi h·y thu dän hµnh lý.", "KÕt thóc ®èi tho¹i/OnCancel"});
return
end
local n_curexp = GetExp();
if (n_curexp - ZHUANSHENG_XIANDAN_MINEXP >= ZHUANSHENG_XIANDAN_BASEEXP) then
local n_addexp = n_curexp - ZHUANSHENG_XIANDAN_MINEXP;
local nitemidx = AddItem(6,1,1970,1,1,0);
if (nitemidx > 0) then
-- local n_recexp = n_addexp;
-- if (n_recexp <= 10e8) then
-- ReduceOwnExp(n_recexp);
-- else
-- while (n_recexp > 0) do
-- if (n_recexp < 10e8) then
-- ReduceOwnExp(n_recexp);
-- n_recexp = 0;
-- else
-- n_recexp = n_recexp - 10e8;
-- ReduceOwnExp(10e8);
-- end
-- end
-- end
ReduceOwnExp(n_addexp);
SetSpecItemParam(nitemidx, 1, floor(n_addexp / ZHUANSHENG_XIANDAN_BASEEXP));
ITEM_SetExpiredTime(nitemidx, ZHUANSHENG_ITEM_EXTIME); -- ÓÐЧÆÚ30Ìì
SyncItem(nitemidx);
SetTask(TSK_ZHUANSHENG_XIANDAN, 1);
WriteLog(format("[%s]\t%s\tName:%s\tAccount:%s\tMakeSuccess,LEVEL:%d,FA CTION:%d,ReduceExp:"..n_addexp..",ItemExp:%d",
"B¾c §Èu Tiªn §¬n",
GetLocalDate("%Y-%m-%d %X"),GetName(), GetAccount(),
GetLevel(), GetLastFactionNumber(), floor(n_addexp / ZHUANSHENG_XIANDAN_BASEEXP)));
Msg2Player(format("Thu ®îc 1 %s", "B¾c §Èu Tiªn §¬n"));
end
end
end
function zhuansheng_help_xiandan()
CreateTaskSay({"<dec><npc>".."Phµm nh÷ng ngêi cã cÊp 199 vµ h¬n 2 tû kinh nghiÖm tu luyÖn 'B¾c §Èu Trêng Sinh ThuËt' sÏ ®îc n©ng cao nh÷ng thuéc tÝnh, nhng nh÷ng kinh nghiÖm thõa ra sÏ bÞ l·ng phÝ. V× vËy cã mét ngµy kia ta vµ 1 vÞ Èn sü ph¸t minh ra lo¹i tiªn ®¬n nµy, th«ng qua 'B¾c §Èu Tiªn §¬n' ng¬i cã thÓ lu gi÷ nh÷ng kinh nghiÖm cßn thõa ®Ó lóc trïng sinh xong th× cã thÓ sö dông.",
"Ta muèn t×m hiÓu thªm./zhuansheng_ondialog",
"KÕt thóc ®èi tho¹i/OnCancel"});
end
function zhuansheng_time()
local ntranscount = ST_GetTransLifeCount();
local n_last_time = GetTask(TSK_ZHUANSHENG_LASTTIME);
local n_cur_time = GetCurServerTime();
local n_add_time = n_cur_time - n_last_time;
if (ntranscount == 0) then
CreateTaskSay({"<dec><npc>".."C¸c h¹ vÉn cha häc B¾c §Èu TruyÒn Sinh ThuËt, chØ cÇn ®ñ ®iÒu kiÖn nµy th× cã thÓ chuyÓn sinh ngay lËp tøc.", "KÕt thóc ®èi tho¹i/OnCancel"})
else
if (n_add_time >= TB_TRANSTIME_LIMIT[ntranscount]*24*60*60) then
CreateTaskSay({"<dec><npc>".."§· ®ñ ®iÒu kiÖn gi·n c¸ch thêi gian chuyÓn sinh, chØ cÇn ®ñ ®iÒu kiÖn th× cã thÓ lËp tøc chuyÓn sinh.", "KÕt thóc ®èi tho¹i/OnCancel"})
else
CreateTaskSay({"<dec><npc>"..format("Cßn %d ngµy míi cã thÓ tiÕp tôc chuyÓn sinh.",ceil((TB_TRANSTIME_LIMIT[ntranscount]*24*60*60 - n_add_time) / (24*60*60))), "KÕt thóc ®èi tho¹i/OnCancel"})
end
end
end
Và cho mình hỏi thêm là chỉnh máu của Boss Sát thủ ở đâu vậy mọi người ?
Mình cảm ơn trước nhé !
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.