PDA

View Full Version : [TLBB] Cho Em Hỏi Vấn Đề Về Npc Vân Phi phi ... ?



vongabau
29-03-14, 12:08 PM
Mấy Anh Cho Em Hỏi sao npc Vân phi phi... không có chức năng nâng ngộ tính. làm cho cho nó có chức năng nâng ngộ tính ạ !

huuduyen_05
29-03-14, 01:29 PM
Trường hợp của bạn thì mình nghĩ chắc do lỗi việt hóa => tên NPC và tên trong script không giống nhau.

=> edit lại cho giống nhau là ok.

Sói Đẹp Trai
29-03-14, 05:28 PM
Mấy Anh Cho Em Hỏi sao npc Vân phi phi... không có chức năng nâng ngộ tính. làm cho cho nó có chức năng nâng ngộ tính ạ !Đây chắc dùng sv 4 lỗ cũ của Huy đại ka. Lỗi này do cái "Vân Phi Phi " và "Vân Phi Phi" gây nên, kiểm tra kỹ

vongabau
29-03-14, 06:47 PM
Em là thành viên mới nên k hiểu lắm... a chỉ e dc k ạ !...

Scripts của npc Vân Phi Phi đây ạ ! cần sửa chố nào ?


--Tô ChâuNPC
--ÔÆö­ö­
--mµt °ă

--½Å±¾ºÅ
x001050_g_ScriptId = 001050

x001050_g_shoptableindex = 27

x001050_g_eventList = { 800103, 800104 , 800106, 800101, 800102, 800108}
x001050_g_miscEventId = 311111;

x001050_g_key = {}
x001050_g_key["buy"]= 0 --¹ºẬƠäỄÓĂÆ·
x001050_g_key["ask"]= 1 --Ki¬m tra mÑc đµ tång trß·ng
x001050_g_key["rep"]= 2 --È·Èϲéѯ
x001050_g_key["i_pc"]= 5 --·¢²¼Ơ÷ÓÑĐÅÏ¢ ±ØĐè=5
x001050_g_key["ask_pc"]= 6 --Ơ÷ÓÑ ±ØĐè=6
x001050_g_key["ask_prcr"]= 7 --²éѯ·±Ö³toƠ đµ ƠäỄ
x001050_g_key["pet_help"]= 10 --ƠäỄÏà¹Ø½éÉÜ
x001050_g_key["pet_help_savvy"]= 11 --̀LinhưƠäỄỊ̂ĐÔ½éÉÜ
x001050_g_key["pet_help_prcr"]= 12 --ƠäỄ·±Ö³½éÉÜ

--**********************************
--ʼ₫½»»¥Èë¿Ú
--**********************************
function x001050_OnDefaultEvent( sceneId, selfId,targetId )
BeginEvent( sceneId )
AddText( sceneId, "#{OBJ_suzhou_0019}" )

AddNumText( sceneId, x001050_g_ScriptId, "Gi¾i thi®u v« trân thú", 11, x001050_g_key["pet_help"] )

AddNumText( sceneId, x001050_g_ScriptId, "Mua đ° dùng cho Trân Thú", 7, x001050_g_key["buy"] )
AddNumText( sceneId, x001050_g_ScriptId, "Ki¬m tra mÑc tång trß·ng", 6, x001050_g_key["ask"] )
AddNumText(sceneId,x001050_g_ScriptId,"Thông báo thông tin trân thú",6,x001050_g_key["i_pc"])
AddNumText(sceneId,x001050_g_ScriptId,"Trân thú Giao Hæu",6,x001050_g_key["ask_pc"])

CallScriptFunction( 800101, "OnEnumerate", sceneId, selfId, targetId )
CallScriptFunction( 800102, "OnEnumerate", sceneId, selfId, targetId )

AddNumText(sceneId,x001050_g_ScriptId,"Ki¬m tra đµ sinh sän",6,x001050_g_key["ask_prcr"])

CallScriptFunction( 800103, "OnEnumerate", sceneId, selfId, targetId )
CallScriptFunction( 800104, "OnEnumerate", sceneId, selfId, targetId )
CallScriptFunction( 800106, "OnEnumerate", sceneId, selfId, targetId )
CallScriptFunction( 800108, "OnEnumerate", sceneId, selfId, targetId )

EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
end

--**********************************
--ʼ₫ÁбíÑ¡ÖĐmµt Ïî
--**********************************
function x001050_OnEventRequest( sceneId, selfId, targetId, eventId )
if eventId == x001050_g_ScriptId then
local key = GetNumText()
if key == x001050_g_key["pet_help"] then
BeginEvent(sceneId)
AddNumText( sceneId, x001050_g_ScriptId, "Gi¾i thi®u liên quan v« trân thú", 11, x001050_g_key["pet_help_savvy"] )
AddNumText(sceneId, x001050_g_ScriptId,"Gi¾i thi®u v« sinh sän",11,x001050_g_key["pet_help_prcr"]);
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return
elseif key == x001050_g_key["pet_help_savvy"] then
BeginEvent(sceneId)
AddText( sceneId, "#{function_help_059}" )
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return
elseif key == x001050_g_key["pet_help_prcr"] then
BeginEvent(sceneId)
AddText(sceneId,"#{function_help_057}#r")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return
--¹ºẬƠäỄÓĂÆ·
elseif key == x001050_g_key["buy"] then
DispatchShopItem( sceneId, selfId,targetId, x001050_g_shoptableindex )

--Ki¬m tra mÑc đµ tång trß·ng
elseif key == x001050_g_key["ask"] then
-- BeginEvent( sceneId )
-- AddText( sceneId, " ²éѯmµt ´ÎC¥n ÊƠÈ¡#{_MONEY100}toƠ đµ ·ÑÓĂ." ) -- zchw
-- AddNumText( sceneId, x001050_g_ScriptId, "Xác nh§n", -1, x001050_g_key["rep"] )
-- EndEvent( sceneId )
-- DispatchEventList( sceneId, selfId, targetId )

--È·Èϲéѯ
-- elseif key == x001050_g_key["rep"] then
x001050_OnConfirm( sceneId, selfId, targetId )
--·¢²¼Ơ÷ÓÑĐÅÏ¢/Ơ÷ÓÑ
elseif key == x001050_g_key["i_pc"] or key == x001050_g_key["ask_pc"] then
local sel = GetNumText();
CallScriptFunction( x001050_g_miscEventId, "OnEnumerate",sceneId, selfId, targetId, sel)
--È·Èϲéѯ
elseif key == x001050_g_key["ask_prcr"] then
LuaFnGetPetProcreateInfo(sceneId, selfId);
else
end

--ÆäËûʼ₫
else
for i, findId in x001050_g_eventList do
if eventId == findId then
CallScriptFunction( eventId, "OnDefaultEvent", sceneId, selfId, targetId )
return
end
end
end
end

--**********************************
--È·Èϲéѯ
--**********************************
function x001050_OnConfirm( sceneId, selfId, targetId )
BeginUICommand( sceneId )
UICommand_AddInt( sceneId, targetId )
UICommand_AddInt( sceneId, 6 ) --ƠäỄ²éѯ·ÖÖ§
EndUICommand( sceneId )
DispatchUICommand( sceneId, selfId, 3 ) --µ÷ÓĂƠäỄ½çĂæ
end

--**********************************
--Ki¬m tra mÑc đµ tång trß·ng
--**********************************
function x001050_OnInquiryForGrowRate( sceneId, selfId, petHid, petLid )
--local num = LuaFnGetPetCount( sceneId, selfId )
--if num <= 0 or index < 0 or index >= num then
-- x001050_MsgTip( sceneId, selfId, " ¶Ô²»Æđ,ÄúĂ»ÓĐÑ¡ÔñƠäỄ!" )
-- return 0
--end

-- Èç¹ûCái này ƠäỄ̉Ѿ­²éѯ¹ưÉú³¤ÂÊ,¾Í¸øÍ æ¼̉mµt cáìáʾ,È»ºó²»TƠi ¿Û¶«Î÷ÁË
if LuaFnIsPetGrowRateByGUID(sceneId, selfId, petHid, petLid) > 0 then
BeginEvent( sceneId )
AddText( sceneId, "Trân thú đă đß₫c ki¬m tra sñ tång trß·ng" )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )

return
end

local PlayerMoney = GetMoney( sceneId, selfId ) + GetMoneyJZ(sceneId, selfId) --½»×ÓÆƠ¼° Vega
if PlayerMoney < 100 then
x001050_MsgTip( sceneId, selfId, " Xin l²i bƠn Đang thiªu ngân lß₫ng #{_EXCHG100}!" )
return 0
end

local lev = LuaFnGetPetLevelByGUID( sceneId, selfId, petHid, petLid )
if lev < 1 then -- zchw
x001050_MsgTip( sceneId, selfId, " Xin L²i ,Trân thú cüa bƠn chßa đƠt đäng c¤p 10" )
return 0
end

--¿Û³ư½đÇ®
local costJ , costM = LuaFnCostMoneyWithPriority( sceneId, selfId, 100 ) --½»×ÓÆƠ¼° Vega
if costM ~= nil and costJ ~= nil then
if costJ > 0 then
local str = format("BƠn đă chi #{_EXCHG%d}",costJ )
Msg2Player( sceneId, selfId, str, MSG2PLAYER_PARA )
end
if costM > 0 then
local str = format("BƠn đă chi #{_MONEY%d}",costM )
Msg2Player( sceneId, selfId, str, MSG2PLAYER_PARA )
end
Msg2Player( sceneId, selfId, "Ki¬m tra tång trß·ng trân thú!", MSG2PLAYER_PARA )
else
return
end

local nGrowLevel = LuaFnGetPetGrowRateByGUID( sceneId, selfId, petHid, petLid )
local strTbl = { "S½ C¤p", "Xu¤t S¡c", "Ki®t Xu¤t", "Trác Vi®t", "Toàn MÛ" }
if( nGrowLevel < 1 or nGrowLevel > getn( strTbl ) ) then
nGrowLevel = 1
end
local strLevel = strTbl[nGrowLevel]

--½«»ñÈ¡Êư¾Ư´«¸øClient
BeginUICommand( sceneId )
UICommand_AddString( sceneId, "key="..1 ) --¹Ø¼ü×Ö,1±íʾ³É¹¦Ö´ĐĐ
UICommand_AddString( sceneId, "rat="..nGrowLevel ) --³É³¤ÂÊ
UICommand_AddString( sceneId, "gld="..100 ) --»¨·Ñ½đÇ®
EndUICommand( sceneId )
DispatchUICommand( sceneId, selfId, 4 )

--µ±²éѯtoƠ đµ ƠäỄΪ±¦±¦¡¢±ä̉́,²¢Ç̉³É³¤Â ʲéѯ½á¹ûĐúng3¡¢4»̣5ʱ,·¢²¼Ê À½ç¹«¸æ
local rnd = random( 4 )
local msg = {}
local typ = LuaFnGetPetTypeByGUID( sceneId, selfId, petHid, petLid )
if( nGrowLevel >= 4 and nGrowLevel <= 5 and typ ~= 2 ) then -- zchw
if ( sceneId == 1 ) then --Tô ChâuNPC
msg[1] = format( "#W#{_INFOUSR%s}#{GLBB_1_A}#Y%s#ItoƠ đµ #{_INFOMSG%s}!",
GetName( sceneId, selfId ),
strLevel,
LuaFnGetPetTransferByGUID( sceneId, selfId, petHid, petLid ) )
msg[2] = format( "#W#{_INFOUSR%s}#{GLBB_2_A}#{_INFOMSG%s}#{GLBB_2_B} #Y%s#I#{GLBB_2_C}",
GetName( sceneId, selfId ),
LuaFnGetPetTransferByGUID( sceneId, selfId, petHid, petLid ),
strLevel )
msg[3] = format( "#Imµt Ö»#{_INFOMSG%s}#{GLBB_3_A}#Y%s#I#{GLBB_3_B}#{_IN FOUSR%s}#{GLBB_3_C}",
LuaFnGetPetTransferByGUID( sceneId, selfId, petHid, petLid ),
strLevel,
GetName( sceneId, selfId ) )
msg[4] = format( "#W#{_INFOUSR%s}#{GLBB_4_A}#{_INFOMSG%s}#{GLBB_4_B} #Y%s#I#{GLBB_4_C}",
GetName( sceneId, selfId ),
LuaFnGetPetTransferByGUID( sceneId, selfId, petHid, petLid ),
strLevel )
--È«Ç̣¹«¸æ
AddGlobalCountNews( sceneId, msg[rnd] )
elseif ( sceneId == 0 ) then --LƠc Dß½ngNPC
msg[1] = format( "#W#{_INFOUSR%s}#{LLBB_1_A}#Y%s#ItoƠ đµ #{_INFOMSG%s}!",
GetName( sceneId, selfId ),
strLevel,
LuaFnGetPetTransferByGUID( sceneId, selfId, petHid, petLid ) )
msg[2] = format( "#W#{_INFOUSR%s}#{LLBB_2_A}#{_INFOMSG%s}#{LLBB_2_B} #Y%s#I#{LLBB_2_C}",
GetName( sceneId, selfId ),
LuaFnGetPetTransferByGUID( sceneId, selfId, petHid, petLid ),
strLevel )
msg[3] = format( "#Imµt Ö»#{_INFOMSG%s}#{LLBB_3_A}#Y%s#I#{LLBB_3_B}#{_IN FOUSR%s}#{LLBB_3_C}",
LuaFnGetPetTransferByGUID( sceneId, selfId, petHid, petLid ),
strLevel,
GetName( sceneId, selfId ) )
msg[4] = format( "#W#{_INFOUSR%s}#{LLBB_4_A}#{_INFOMSG%s}#{LLBB_4_B} #Y%s#I#{LLBB_4_C}",
GetName( sceneId, selfId ),
LuaFnGetPetTransferByGUID( sceneId, selfId, petHid, petLid ),
strLevel )
--È«Ç̣¹«¸æ
AddGlobalCountNews( sceneId, msg[rnd] )
end
end

return 1
end

--**********************************
--¶Ô»°´°¿ÚĐÅÏ¢̀áʾ
--**********************************
function x001050_MsgBox( sceneId, selfId, targetId, msg )
BeginEvent( sceneId )
AddText( sceneId, msg )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
end

--**********************************
--ĐÑÄ¿H® th¯ngĐÅÏ¢̀áʾ
--**********************************
function x001050_MsgTip( sceneId, selfId, msg )
BeginEvent( sceneId )
AddText( sceneId, msg )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end

Sói Đẹp Trai
29-03-14, 07:17 PM
Em là thành viên mới nên k hiểu lắm... a chỉ e dc k ạ !...

Scripts của npc Vân Phi Phi đây ạ ! cần sửa chố nào ?


--Tô ChâuNPC
--ÔÆö­ö­
--mµt °ă

--½Å±¾ºÅ
x001050_g_ScriptId = 001050

x001050_g_shoptableindex = 27

x001050_g_eventList = { 800103, 800104 , 800106, 800101, 800102, 800108}
x001050_g_miscEventId = 311111;

x001050_g_key = {}
x001050_g_key["buy"]= 0 --¹ºẬƠäỄÓĂÆ·
x001050_g_key["ask"]= 1 --Ki¬m tra mÑc đµ tång trß·ng
x001050_g_key["rep"]= 2 --È·Èϲéѯ
x001050_g_key["i_pc"]= 5 --·¢²¼Ơ÷ÓÑĐÅÏ¢ ±ØĐè=5
x001050_g_key["ask_pc"]= 6 --Ơ÷ÓÑ ±ØĐè=6
x001050_g_key["ask_prcr"]= 7 --²éѯ·±Ö³toƠ đµ ƠäỄ
x001050_g_key["pet_help"]= 10 --ƠäỄÏà¹Ø½éÉÜ
x001050_g_key["pet_help_savvy"]= 11 --̀LinhưƠäỄỊ̂ĐÔ½éÉÜ
x001050_g_key["pet_help_prcr"]= 12 --ƠäỄ·±Ö³½éÉÜ

--**********************************
--ʼ₫½»»¥Èë¿Ú
--**********************************
function x001050_OnDefaultEvent( sceneId, selfId,targetId )
BeginEvent( sceneId )
AddText( sceneId, "#{OBJ_suzhou_0019}" )

AddNumText( sceneId, x001050_g_ScriptId, "Gi¾i thi®u v« trân thú", 11, x001050_g_key["pet_help"] )

AddNumText( sceneId, x001050_g_ScriptId, "Mua đ° dùng cho Trân Thú", 7, x001050_g_key["buy"] )
AddNumText( sceneId, x001050_g_ScriptId, "Ki¬m tra mÑc tång trß·ng", 6, x001050_g_key["ask"] )
AddNumText(sceneId,x001050_g_ScriptId,"Thông báo thông tin trân thú",6,x001050_g_key["i_pc"])
AddNumText(sceneId,x001050_g_ScriptId,"Trân thú Giao Hæu",6,x001050_g_key["ask_pc"])

CallScriptFunction( 800101, "OnEnumerate", sceneId, selfId, targetId )
CallScriptFunction( 800102, "OnEnumerate", sceneId, selfId, targetId )

AddNumText(sceneId,x001050_g_ScriptId,"Ki¬m tra đµ sinh sän",6,x001050_g_key["ask_prcr"])

CallScriptFunction( 800103, "OnEnumerate", sceneId, selfId, targetId )
CallScriptFunction( 800104, "OnEnumerate", sceneId, selfId, targetId )
CallScriptFunction( 800106, "OnEnumerate", sceneId, selfId, targetId )
CallScriptFunction( 800108, "OnEnumerate", sceneId, selfId, targetId )

EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
end

--**********************************
--ʼ₫ÁбíÑ¡ÖĐmµt Ïî
--**********************************
function x001050_OnEventRequest( sceneId, selfId, targetId, eventId )
if eventId == x001050_g_ScriptId then
local key = GetNumText()
if key == x001050_g_key["pet_help"] then
BeginEvent(sceneId)
AddNumText( sceneId, x001050_g_ScriptId, "Gi¾i thi®u liên quan v« trân thú", 11, x001050_g_key["pet_help_savvy"] )
AddNumText(sceneId, x001050_g_ScriptId,"Gi¾i thi®u v« sinh sän",11,x001050_g_key["pet_help_prcr"]);
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return
elseif key == x001050_g_key["pet_help_savvy"] then
BeginEvent(sceneId)
AddText( sceneId, "#{function_help_059}" )
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return
elseif key == x001050_g_key["pet_help_prcr"] then
BeginEvent(sceneId)
AddText(sceneId,"#{function_help_057}#r")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return
--¹ºẬƠäỄÓĂÆ·
elseif key == x001050_g_key["buy"] then
DispatchShopItem( sceneId, selfId,targetId, x001050_g_shoptableindex )

--Ki¬m tra mÑc đµ tång trß·ng
elseif key == x001050_g_key["ask"] then
-- BeginEvent( sceneId )
-- AddText( sceneId, " ²éѯmµt ´ÎC¥n ÊƠÈ¡#{_MONEY100}toƠ đµ ·ÑÓĂ." ) -- zchw
-- AddNumText( sceneId, x001050_g_ScriptId, "Xác nh§n", -1, x001050_g_key["rep"] )
-- EndEvent( sceneId )
-- DispatchEventList( sceneId, selfId, targetId )

--È·Èϲéѯ
-- elseif key == x001050_g_key["rep"] then
x001050_OnConfirm( sceneId, selfId, targetId )
--·¢²¼Ơ÷ÓÑĐÅÏ¢/Ơ÷ÓÑ
elseif key == x001050_g_key["i_pc"] or key == x001050_g_key["ask_pc"] then
local sel = GetNumText();
CallScriptFunction( x001050_g_miscEventId, "OnEnumerate",sceneId, selfId, targetId, sel)
--È·Èϲéѯ
elseif key == x001050_g_key["ask_prcr"] then
LuaFnGetPetProcreateInfo(sceneId, selfId);
else
end

--ÆäËûʼ₫
else
for i, findId in x001050_g_eventList do
if eventId == findId then
CallScriptFunction( eventId, "OnDefaultEvent", sceneId, selfId, targetId )
return
end
end
end
end

--**********************************
--È·Èϲéѯ
--**********************************
function x001050_OnConfirm( sceneId, selfId, targetId )
BeginUICommand( sceneId )
UICommand_AddInt( sceneId, targetId )
UICommand_AddInt( sceneId, 6 ) --ƠäỄ²éѯ·ÖÖ§
EndUICommand( sceneId )
DispatchUICommand( sceneId, selfId, 3 ) --µ÷ÓĂƠäỄ½çĂæ
end

--**********************************
--Ki¬m tra mÑc đµ tång trß·ng
--**********************************
function x001050_OnInquiryForGrowRate( sceneId, selfId, petHid, petLid )
--local num = LuaFnGetPetCount( sceneId, selfId )
--if num <= 0 or index < 0 or index >= num then
-- x001050_MsgTip( sceneId, selfId, " ¶Ô²»Æđ,ÄúĂ»ÓĐÑ¡ÔñƠäỄ!" )
-- return 0
--end

-- Èç¹ûCái này ƠäỄ̉Ѿ­²éѯ¹ưÉú³¤ÂÊ,¾Í¸øÍ æ¼̉mµt cáìáʾ,È»ºó²»TƠi ¿Û¶«Î÷ÁË
if LuaFnIsPetGrowRateByGUID(sceneId, selfId, petHid, petLid) > 0 then
BeginEvent( sceneId )
AddText( sceneId, "Trân thú đă đß₫c ki¬m tra sñ tång trß·ng" )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )

return
end

local PlayerMoney = GetMoney( sceneId, selfId ) + GetMoneyJZ(sceneId, selfId) --½»×ÓÆƠ¼° Vega
if PlayerMoney < 100 then
x001050_MsgTip( sceneId, selfId, " Xin l²i bƠn Đang thiªu ngân lß₫ng #{_EXCHG100}!" )
return 0
end

local lev = LuaFnGetPetLevelByGUID( sceneId, selfId, petHid, petLid )
if lev < 1 then -- zchw
x001050_MsgTip( sceneId, selfId, " Xin L²i ,Trân thú cüa bƠn chßa đƠt đäng c¤p 10" )
return 0
end

--¿Û³ư½đÇ®
local costJ , costM = LuaFnCostMoneyWithPriority( sceneId, selfId, 100 ) --½»×ÓÆƠ¼° Vega
if costM ~= nil and costJ ~= nil then
if costJ > 0 then
local str = format("BƠn đă chi #{_EXCHG%d}",costJ )
Msg2Player( sceneId, selfId, str, MSG2PLAYER_PARA )
end
if costM > 0 then
local str = format("BƠn đă chi #{_MONEY%d}",costM )
Msg2Player( sceneId, selfId, str, MSG2PLAYER_PARA )
end
Msg2Player( sceneId, selfId, "Ki¬m tra tång trß·ng trân thú!", MSG2PLAYER_PARA )
else
return
end

local nGrowLevel = LuaFnGetPetGrowRateByGUID( sceneId, selfId, petHid, petLid )
local strTbl = { "S½ C¤p", "Xu¤t S¡c", "Ki®t Xu¤t", "Trác Vi®t", "Toàn MÛ" }
if( nGrowLevel < 1 or nGrowLevel > getn( strTbl ) ) then
nGrowLevel = 1
end
local strLevel = strTbl[nGrowLevel]

--½«»ñÈ¡Êư¾Ư´«¸øClient
BeginUICommand( sceneId )
UICommand_AddString( sceneId, "key="..1 ) --¹Ø¼ü×Ö,1±íʾ³É¹¦Ö´ĐĐ
UICommand_AddString( sceneId, "rat="..nGrowLevel ) --³É³¤ÂÊ
UICommand_AddString( sceneId, "gld="..100 ) --»¨·Ñ½đÇ®
EndUICommand( sceneId )
DispatchUICommand( sceneId, selfId, 4 )

--µ±²éѯtoƠ đµ ƠäỄΪ±¦±¦¡¢±ä̉́,²¢Ç̉³É³¤Â ʲéѯ½á¹ûĐúng3¡¢4»̣5ʱ,·¢²¼Ê À½ç¹«¸æ
local rnd = random( 4 )
local msg = {}
local typ = LuaFnGetPetTypeByGUID( sceneId, selfId, petHid, petLid )
if( nGrowLevel >= 4 and nGrowLevel <= 5 and typ ~= 2 ) then -- zchw
if ( sceneId == 1 ) then --Tô ChâuNPC
msg[1] = format( "#W#{_INFOUSR%s}#{GLBB_1_A}#Y%s#ItoƠ đµ #{_INFOMSG%s}!",
GetName( sceneId, selfId ),
strLevel,
LuaFnGetPetTransferByGUID( sceneId, selfId, petHid, petLid ) )
msg[2] = format( "#W#{_INFOUSR%s}#{GLBB_2_A}#{_INFOMSG%s}#{GLBB_2_B} #Y%s#I#{GLBB_2_C}",
GetName( sceneId, selfId ),
LuaFnGetPetTransferByGUID( sceneId, selfId, petHid, petLid ),
strLevel )
msg[3] = format( "#Imµt Ö»#{_INFOMSG%s}#{GLBB_3_A}#Y%s#I#{GLBB_3_B}#{_IN FOUSR%s}#{GLBB_3_C}",
LuaFnGetPetTransferByGUID( sceneId, selfId, petHid, petLid ),
strLevel,
GetName( sceneId, selfId ) )
msg[4] = format( "#W#{_INFOUSR%s}#{GLBB_4_A}#{_INFOMSG%s}#{GLBB_4_B} #Y%s#I#{GLBB_4_C}",
GetName( sceneId, selfId ),
LuaFnGetPetTransferByGUID( sceneId, selfId, petHid, petLid ),
strLevel )
--È«Ç̣¹«¸æ
AddGlobalCountNews( sceneId, msg[rnd] )
elseif ( sceneId == 0 ) then --LƠc Dß½ngNPC
msg[1] = format( "#W#{_INFOUSR%s}#{LLBB_1_A}#Y%s#ItoƠ đµ #{_INFOMSG%s}!",
GetName( sceneId, selfId ),
strLevel,
LuaFnGetPetTransferByGUID( sceneId, selfId, petHid, petLid ) )
msg[2] = format( "#W#{_INFOUSR%s}#{LLBB_2_A}#{_INFOMSG%s}#{LLBB_2_B} #Y%s#I#{LLBB_2_C}",
GetName( sceneId, selfId ),
LuaFnGetPetTransferByGUID( sceneId, selfId, petHid, petLid ),
strLevel )
msg[3] = format( "#Imµt Ö»#{_INFOMSG%s}#{LLBB_3_A}#Y%s#I#{LLBB_3_B}#{_IN FOUSR%s}#{LLBB_3_C}",
LuaFnGetPetTransferByGUID( sceneId, selfId, petHid, petLid ),
strLevel,
GetName( sceneId, selfId ) )
msg[4] = format( "#W#{_INFOUSR%s}#{LLBB_4_A}#{_INFOMSG%s}#{LLBB_4_B} #Y%s#I#{LLBB_4_C}",
GetName( sceneId, selfId ),
LuaFnGetPetTransferByGUID( sceneId, selfId, petHid, petLid ),
strLevel )
--È«Ç̣¹«¸æ
AddGlobalCountNews( sceneId, msg[rnd] )
end
end

return 1
end

--**********************************
--¶Ô»°´°¿ÚĐÅÏ¢̀áʾ
--**********************************
function x001050_MsgBox( sceneId, selfId, targetId, msg )
BeginEvent( sceneId )
AddText( sceneId, msg )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
end

--**********************************
--ĐÑÄ¿H® th¯ngĐÅÏ¢̀áʾ
--**********************************
function x001050_MsgTip( sceneId, selfId, msg )
BeginEvent( sceneId )
AddText( sceneId, msg )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
Không phải cái này mà là nó là cái script dành cho ép ngộ tính đó, petsavvy gì đó quên tên rồi ở event/

vongabau
29-03-14, 07:30 PM
Không phải cái này mà là nó là cái script dành cho ép ngộ tính đó, petsavvy gì đó quên tên rồi ở event/

Cái Này Hả A..... Cần Sửa Chố Nào Ạ !


-- ³èÎïỊ̂ĐỒLinhư

-- ½Å±¾ºÅ
x800104_g_ScriptId = 800104

-- NPC Tên
x800104_g_Name = "Vân Phi Phi"

--**********************************
-- ÈÎÎñÈë¿Úº¯Êư
--**********************************
function x800104_OnDefaultEvent( sceneId, selfId, targetId ) -- đi¬m»÷¸ĂÈÎÎñºóÖ´ĐĐ´Ë½Å±¾
if GetName( sceneId, targetId ) ~= x800104_g_Name then --ÅĐ¶Ï¸Ă npc Đúng·ñĐúngÖ¸¶¨toƠ đµ npc
return
end

BeginUICommand( sceneId )
UICommand_AddInt( sceneId, targetId )
EndUICommand( sceneId )
DispatchUICommand( sceneId, selfId, 19820424 )
end

--**********************************
-- ÁĐ¾Ùʼ₫
--**********************************
function x800104_OnEnumerate( sceneId, selfId, targetId )
if GetName( sceneId, targetId ) ~= x800104_g_Name then --ÅĐ¶Ï¸Ă npc Đúng·ñĐúngÖ¸¶¨toƠ đµ npc
return
end

AddNumText( sceneId, x800104_g_ScriptId, "Nâng cao ngµ tính trân thú" ,6,-1)
end


--**********************************
-- ³èÎïỊ̂ĐỒLinhư
--**********************************
function x800104_PetSavvy( sceneId, selfId, mainPetGuidH, mainPetGuidL, assisPetGuidH, assisPetGuidL )
--ÅĐ¶Ï¸ù¹Ç
local gengu = LuaFnGetPetGenGuByGUID(sceneId, selfId, assisPetGuidH, assisPetGuidL)
if gengu ==0 then
BeginEvent( sceneId )
AddText( sceneId, "Trân thú có cån c¯t b¢ng 0 không th¬ nâng cao ngµ tính cüa trân thú" )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
return 0
end
local retDiff = IncreaceSavvyByCompound( sceneId, selfId, mainPetGuidH, mainPetGuidL, assisPetGuidH, assisPetGuidL )
if retDiff and retDiff > 0 then
--³É¹¦toƠ đµ ¹âЧ
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0);
end
end

satthupro95
29-03-14, 07:35 PM
Tìm cái đoạn Vân Phi Phi trong cái file mà để thêm/bớt npc ấy :3 xem tên nó là "Vân Phi Phi" (Thì chuẩn, trùng với trong script), còn nếu là "Vân Phi Phi " (Có khoảng trắng ở sau chữ Phi thứ 2 thì xóa cái khoảng trắng đó đi)

vongabau
29-03-14, 07:54 PM
Đã Sửa Được.... Cho Em Hỏi Thêm Cách Nâng Ngộ Tính 100% k rớt dc k ạ !

Sói Đẹp Trai
30-03-14, 08:46 AM
Cái Này Hả A..... Cần Sửa Chố Nào Ạ !


-- ³èÎïỊ̂ĐỒLinhư

-- ½Å±¾ºÅ
x800104_g_ScriptId = 800104

-- NPC Tên
x800104_g_Name = "Vân Phi Phi"

--**********************************
-- ÈÎÎñÈë¿Úº¯Êư
--**********************************
function x800104_OnDefaultEvent( sceneId, selfId, targetId ) -- đi¬m»÷¸ĂÈÎÎñºóÖ´ĐĐ´Ë½Å±¾
if GetName( sceneId, targetId ) ~= x800104_g_Name then --ÅĐ¶Ï¸Ă npc Đúng·ñĐúngÖ¸¶¨toƠ đµ npc
return
end

BeginUICommand( sceneId )
UICommand_AddInt( sceneId, targetId )
EndUICommand( sceneId )
DispatchUICommand( sceneId, selfId, 19820424 )
end

--**********************************
-- ÁĐ¾Ùʼ₫
--**********************************
function x800104_OnEnumerate( sceneId, selfId, targetId )
if GetName( sceneId, targetId ) ~= x800104_g_Name then --ÅĐ¶Ï¸Ă npc Đúng·ñĐúngÖ¸¶¨toƠ đµ npc
return
end

AddNumText( sceneId, x800104_g_ScriptId, "Nâng cao ngµ tính trân thú" ,6,-1)
end


--**********************************
-- ³èÎïỊ̂ĐỒLinhư
--**********************************
function x800104_PetSavvy( sceneId, selfId, mainPetGuidH, mainPetGuidL, assisPetGuidH, assisPetGuidL )
--ÅĐ¶Ï¸ù¹Ç
local gengu = LuaFnGetPetGenGuByGUID(sceneId, selfId, assisPetGuidH, assisPetGuidL)
if gengu ==0 then
BeginEvent( sceneId )
AddText( sceneId, "Trân thú có cån c¯t b¢ng 0 không th¬ nâng cao ngµ tính cüa trân thú" )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
return 0
end
local retDiff = IncreaceSavvyByCompound( sceneId, selfId, mainPetGuidH, mainPetGuidL, assisPetGuidH, assisPetGuidL )
if retDiff and retDiff > 0 then
--³É¹¦toƠ đµ ¹âЧ
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0);
end
end

Đúng như mình đã nói ở bên trên đó. Cái này đúng và cái chỗ làm nên ko nhận chính là cái khoảng trắng cuối từ Phi