skythienlong
08-09-14, 06:06 PM
hôm qua nhận được 2 cái script a Huy gửi, có cái nhận pet trong script tổng hợp . Mình muốn tách riêng ra thành cái mới không có khả năng lập trình chỉ có thể suy đoán, cắt ghép ae xem có thiếu gì không giúp mình hoàn thiện...............
Đây là đoạn sau khi mình cắt ghép
--ËÕÖÝNPC
--ÿÈÕÔùµãÁìÈ¡Ô±
--Ò»°ã
x891002_g_ScriptId = 891002
--**********************************
--ʼþ½»»¥Èë¿Ú
--**********************************
function x891002_OnDefaultEvent( sceneId, selfId,targetId )
local nam = LuaFnGetName( sceneId, selfId )
BeginEvent(sceneId)
AddNumText( sceneId, x891002_g_ScriptId, "#e195e1a#c72d27cNh§n Pet",5,12 )
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end
if key == 12 then
BeginEvent(sceneId)
AddText( sceneId, "Chào bÕn, hãy ch÷n trân thú bÕn mu¯n #r#GCh÷n ðúng trân thú có th¬ dùng ðßþc nhé bÕn.#b#cFF0000Lßu Y: chï ðßþc ch÷n 1 l¥n" )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Trân thú h°i xuân ðan",5,50 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Trân thú h°i xuân ðan",5,51 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Trân thú h°i xuân ðan",5,52 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Bï Dñc Ði¬u Biªn d¸",5,53 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Cùng KÏ Biªn D¸",5,54 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Ð߶ng Trang ThØ Biªn D¸",5,55 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Long Quy Biªn D¸",5,56 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Áp ChuÖ Thú Biªn D¸",5,57 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Thø ÐÕi Hùng Biªn D¸",5,58 )
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end
if key == 50 then
local index = GetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET)
if index == 1 then
BeginEvent(sceneId)
AddText(sceneId, "#gffff00BÕn ðã nh§n thß·ng.#G Không th¬ nh§n næa.")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return 0
end
local createPetRet, retGUID_H, retGUID_L = LuaFnCreatePetToHuman(sceneId, selfId, 9110, 1, 0);
TryRecieveItem( sceneId, selfId, 30607001, 1 )
if createPetRet and createPetRet == 1 then
SetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET, 1 )
local nam = LuaFnGetName( sceneId, selfId )
BroadMsgByChatPipe( sceneId, selfId, "#gffff00Xin chúc m×ng "..nam.." Trân thú h°i xuân ðan", 4 )
str= "#gffff00BÕn ðã có PET. "
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
end
if key == 51 then
local index = GetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET)
if index == 1 then
BeginEvent(sceneId)
AddText(sceneId, "#gffff00BÕn ðã nh§n thß·ng.#G Không th¬ nh§n næa.")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return 0
end
local createPetRet, retGUID_H, retGUID_L = LuaFnCreatePetToHuman(sceneId, selfId, 9120, 1, 0);
TryRecieveItem( sceneId, selfId, 30607001, 1 )
if createPetRet and createPetRet == 1 then
SetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET, 1 )
local nam = LuaFnGetName( sceneId, selfId )
BroadMsgByChatPipe( sceneId, selfId, "#gffff00Xin chúc m×ng "..nam.." Trân thú h°i xuân ðan", 4 )
str= "#gffff00BÕn ðã có PET."
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
end
if key == 52 then
local index = GetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET)
if index == 1 then
BeginEvent(sceneId)
AddText(sceneId, "#gffff00BÕn ðã nh§n thß·ng.#G Không th¬ nh§n næa.")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return 0
end
local createPetRet, retGUID_H, retGUID_L = LuaFnCreatePetToHuman(sceneId, selfId, 9130, 1, 0);
TryRecieveItem( sceneId, selfId, 30607001, 1 )
if createPetRet and createPetRet == 1 then
SetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET, 1 )
local nam = LuaFnGetName( sceneId, selfId )
BroadMsgByChatPipe( sceneId, selfId, "#gffff00Xin chúc m×ng "..nam.." Trân thú h°i xuân ðan", 4 )
str= "#gffff00BÕn ðã có PET."
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
end
if key == 53 then
local index = GetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET)
if index == 2 then
BeginEvent(sceneId)
AddText(sceneId, "#gffff00BÕn ðã nh§n thß·ng.#G Không th¬ nh§n næa.")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return 0
end
local createPetRet, retGUID_H, retGUID_L = LuaFnCreatePetToHuman(sceneId, selfId, 22266, 1, 0);
if createPetRet and createPetRet == 2 then
SetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET, 1 )
local nam = LuaFnGetName( sceneId, selfId )
BroadMsgByChatPipe( sceneId, selfId, "#gffff00Xin chúc m×ng "..nam.." ðã nh§n thành công Boss PET", 4 )
str= "#gffff00BÕn ðã có PET ."
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
end
if key == 54 then
local index = GetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET)
if index == 1 then
BeginEvent(sceneId)
AddText(sceneId, "#gffff00BÕn ðã nh§n thß·ng.#G Không th¬ nh§n næa.")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return 0
end
local createPetRet, retGUID_H, retGUID_L = LuaFnCreatePetToHuman(sceneId, selfId, 22068, 1, 0);
if createPetRet and createPetRet == 1 then
SetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET, 1 )
local nam = LuaFnGetName( sceneId, selfId )
BroadMsgByChatPipe( sceneId, selfId, "#gffff00Xin chúc m×ng "..nam.." ðã nh§n thành công PET", 4 )
str= "#gffff00BÕn ðã có PET."
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
end
if key == 55 then
local index = GetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET)
if index == 1 then
BeginEvent(sceneId)
AddText(sceneId, "#gffff00BÕn ðã nh§n thß·ng.#G Không th¬ nh§n næa.")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return 0
end
local createPetRet, retGUID_H, retGUID_L = LuaFnCreatePetToHuman(sceneId, selfId, 8808, 1, 0);
if createPetRet and createPetRet == 1 then
SetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET, 1 )
local nam = LuaFnGetName( sceneId, selfId )
BroadMsgByChatPipe( sceneId, selfId, "#gffff00Xin chúc m×ng "..nam.." ðã nh§n thành công PET", 4 )
str= "#gffff00BÕn ðã có PET."
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
end
if key == 56 then
local index = GetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET)
if index == 1 then
BeginEvent(sceneId)
AddText(sceneId, "#gffff00BÕn ðã nh§n thß·ng.#G Không th¬ nh§n næa.")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return 0
end
local createPetRet, retGUID_H, retGUID_L = LuaFnCreatePetToHuman(sceneId, selfId, 3317, 1, 0);
if createPetRet and createPetRet == 1 then
SetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET, 1 )
local nam = LuaFnGetName( sceneId, selfId )
BroadMsgByChatPipe( sceneId, selfId, "#gffff00Xin chúc m×ng "..nam.." ðã nh§n thành công PET", 4 )
str= "#gffff00BÕn ðã có #WBOSS PET."
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
end
if key == 57 then
local index = GetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET)
if index == 1 then
BeginEvent(sceneId)
AddText(sceneId, "#gffff00BÕn ðã nh§n thß·ng.#G Không th¬ nh§n næa.")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return 0
end
local createPetRet, retGUID_H, retGUID_L = LuaFnCreatePetToHuman(sceneId, selfId, 7568, 1, 0);
if createPetRet and createPetRet == 1 then
SetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET, 1 )
local nam = LuaFnGetName( sceneId, selfId )
BroadMsgByChatPipe( sceneId, selfId, "#gffff00Xin chúc m×ng "..nam.." ðã nh§n thành công PET", 4 )
str= "#gffff00BÕn ðã có PET."
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
end
if key == 58 then
local index = GetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET)
if index == 1 then
BeginEvent(sceneId)
AddText(sceneId, "#gffff00BÕn ðã nh§n thß·ng.#G Không th¬ nh§n næa.")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return 0
end
local createPetRet, retGUID_H, retGUID_L = LuaFnCreatePetToHuman(sceneId, selfId, 8548, 1, 0);
if createPetRet and createPetRet == 1 then
SetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET, 1 )
local nam = LuaFnGetName( sceneId, selfId )
BroadMsgByChatPipe( sceneId, selfId, "#gffff00Xin chúc m×ng "..nam.." ðã nh§n thành công PET", 4 )
str= "#gffff00BÕn ðã có PET."
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
end
cái đoạn
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Trân thú h°i xuân ðan",5,50 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Trân thú h°i xuân ðan",5,51 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Trân thú h°i xuân ðan",5,52 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Bï Dñc Ði¬u Biªn d¸",5,53 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Cùng KÏ Biªn D¸",5,54 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Ð߶ng Trang ThØ Biªn D¸",5,55 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Long Quy Biªn D¸",5,56 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Áp ChuÖ Thú Biªn D¸",5,57 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Thø ÐÕi Hùng Biªn D¸",5,58 )
từ 50 đến 58 có thay bằng 1 đến x không
Đây là đoạn sau khi mình cắt ghép
--ËÕÖÝNPC
--ÿÈÕÔùµãÁìÈ¡Ô±
--Ò»°ã
x891002_g_ScriptId = 891002
--**********************************
--ʼþ½»»¥Èë¿Ú
--**********************************
function x891002_OnDefaultEvent( sceneId, selfId,targetId )
local nam = LuaFnGetName( sceneId, selfId )
BeginEvent(sceneId)
AddNumText( sceneId, x891002_g_ScriptId, "#e195e1a#c72d27cNh§n Pet",5,12 )
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end
if key == 12 then
BeginEvent(sceneId)
AddText( sceneId, "Chào bÕn, hãy ch÷n trân thú bÕn mu¯n #r#GCh÷n ðúng trân thú có th¬ dùng ðßþc nhé bÕn.#b#cFF0000Lßu Y: chï ðßþc ch÷n 1 l¥n" )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Trân thú h°i xuân ðan",5,50 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Trân thú h°i xuân ðan",5,51 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Trân thú h°i xuân ðan",5,52 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Bï Dñc Ði¬u Biªn d¸",5,53 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Cùng KÏ Biªn D¸",5,54 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Ð߶ng Trang ThØ Biªn D¸",5,55 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Long Quy Biªn D¸",5,56 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Áp ChuÖ Thú Biªn D¸",5,57 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Thø ÐÕi Hùng Biªn D¸",5,58 )
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end
if key == 50 then
local index = GetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET)
if index == 1 then
BeginEvent(sceneId)
AddText(sceneId, "#gffff00BÕn ðã nh§n thß·ng.#G Không th¬ nh§n næa.")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return 0
end
local createPetRet, retGUID_H, retGUID_L = LuaFnCreatePetToHuman(sceneId, selfId, 9110, 1, 0);
TryRecieveItem( sceneId, selfId, 30607001, 1 )
if createPetRet and createPetRet == 1 then
SetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET, 1 )
local nam = LuaFnGetName( sceneId, selfId )
BroadMsgByChatPipe( sceneId, selfId, "#gffff00Xin chúc m×ng "..nam.." Trân thú h°i xuân ðan", 4 )
str= "#gffff00BÕn ðã có PET. "
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
end
if key == 51 then
local index = GetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET)
if index == 1 then
BeginEvent(sceneId)
AddText(sceneId, "#gffff00BÕn ðã nh§n thß·ng.#G Không th¬ nh§n næa.")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return 0
end
local createPetRet, retGUID_H, retGUID_L = LuaFnCreatePetToHuman(sceneId, selfId, 9120, 1, 0);
TryRecieveItem( sceneId, selfId, 30607001, 1 )
if createPetRet and createPetRet == 1 then
SetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET, 1 )
local nam = LuaFnGetName( sceneId, selfId )
BroadMsgByChatPipe( sceneId, selfId, "#gffff00Xin chúc m×ng "..nam.." Trân thú h°i xuân ðan", 4 )
str= "#gffff00BÕn ðã có PET."
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
end
if key == 52 then
local index = GetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET)
if index == 1 then
BeginEvent(sceneId)
AddText(sceneId, "#gffff00BÕn ðã nh§n thß·ng.#G Không th¬ nh§n næa.")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return 0
end
local createPetRet, retGUID_H, retGUID_L = LuaFnCreatePetToHuman(sceneId, selfId, 9130, 1, 0);
TryRecieveItem( sceneId, selfId, 30607001, 1 )
if createPetRet and createPetRet == 1 then
SetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET, 1 )
local nam = LuaFnGetName( sceneId, selfId )
BroadMsgByChatPipe( sceneId, selfId, "#gffff00Xin chúc m×ng "..nam.." Trân thú h°i xuân ðan", 4 )
str= "#gffff00BÕn ðã có PET."
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
end
if key == 53 then
local index = GetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET)
if index == 2 then
BeginEvent(sceneId)
AddText(sceneId, "#gffff00BÕn ðã nh§n thß·ng.#G Không th¬ nh§n næa.")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return 0
end
local createPetRet, retGUID_H, retGUID_L = LuaFnCreatePetToHuman(sceneId, selfId, 22266, 1, 0);
if createPetRet and createPetRet == 2 then
SetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET, 1 )
local nam = LuaFnGetName( sceneId, selfId )
BroadMsgByChatPipe( sceneId, selfId, "#gffff00Xin chúc m×ng "..nam.." ðã nh§n thành công Boss PET", 4 )
str= "#gffff00BÕn ðã có PET ."
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
end
if key == 54 then
local index = GetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET)
if index == 1 then
BeginEvent(sceneId)
AddText(sceneId, "#gffff00BÕn ðã nh§n thß·ng.#G Không th¬ nh§n næa.")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return 0
end
local createPetRet, retGUID_H, retGUID_L = LuaFnCreatePetToHuman(sceneId, selfId, 22068, 1, 0);
if createPetRet and createPetRet == 1 then
SetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET, 1 )
local nam = LuaFnGetName( sceneId, selfId )
BroadMsgByChatPipe( sceneId, selfId, "#gffff00Xin chúc m×ng "..nam.." ðã nh§n thành công PET", 4 )
str= "#gffff00BÕn ðã có PET."
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
end
if key == 55 then
local index = GetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET)
if index == 1 then
BeginEvent(sceneId)
AddText(sceneId, "#gffff00BÕn ðã nh§n thß·ng.#G Không th¬ nh§n næa.")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return 0
end
local createPetRet, retGUID_H, retGUID_L = LuaFnCreatePetToHuman(sceneId, selfId, 8808, 1, 0);
if createPetRet and createPetRet == 1 then
SetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET, 1 )
local nam = LuaFnGetName( sceneId, selfId )
BroadMsgByChatPipe( sceneId, selfId, "#gffff00Xin chúc m×ng "..nam.." ðã nh§n thành công PET", 4 )
str= "#gffff00BÕn ðã có PET."
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
end
if key == 56 then
local index = GetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET)
if index == 1 then
BeginEvent(sceneId)
AddText(sceneId, "#gffff00BÕn ðã nh§n thß·ng.#G Không th¬ nh§n næa.")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return 0
end
local createPetRet, retGUID_H, retGUID_L = LuaFnCreatePetToHuman(sceneId, selfId, 3317, 1, 0);
if createPetRet and createPetRet == 1 then
SetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET, 1 )
local nam = LuaFnGetName( sceneId, selfId )
BroadMsgByChatPipe( sceneId, selfId, "#gffff00Xin chúc m×ng "..nam.." ðã nh§n thành công PET", 4 )
str= "#gffff00BÕn ðã có #WBOSS PET."
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
end
if key == 57 then
local index = GetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET)
if index == 1 then
BeginEvent(sceneId)
AddText(sceneId, "#gffff00BÕn ðã nh§n thß·ng.#G Không th¬ nh§n næa.")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return 0
end
local createPetRet, retGUID_H, retGUID_L = LuaFnCreatePetToHuman(sceneId, selfId, 7568, 1, 0);
if createPetRet and createPetRet == 1 then
SetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET, 1 )
local nam = LuaFnGetName( sceneId, selfId )
BroadMsgByChatPipe( sceneId, selfId, "#gffff00Xin chúc m×ng "..nam.." ðã nh§n thành công PET", 4 )
str= "#gffff00BÕn ðã có PET."
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
end
if key == 58 then
local index = GetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET)
if index == 1 then
BeginEvent(sceneId)
AddText(sceneId, "#gffff00BÕn ðã nh§n thß·ng.#G Không th¬ nh§n næa.")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
return 0
end
local createPetRet, retGUID_H, retGUID_L = LuaFnCreatePetToHuman(sceneId, selfId, 8548, 1, 0);
if createPetRet and createPetRet == 1 then
SetMissionFlag( sceneId, selfId, MF_LINGQUYUANBAOPET, 1 )
local nam = LuaFnGetName( sceneId, selfId )
BroadMsgByChatPipe( sceneId, selfId, "#gffff00Xin chúc m×ng "..nam.." ðã nh§n thành công PET", 4 )
str= "#gffff00BÕn ðã có PET."
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
end
cái đoạn
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Trân thú h°i xuân ðan",5,50 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Trân thú h°i xuân ðan",5,51 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Trân thú h°i xuân ðan",5,52 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Bï Dñc Ði¬u Biªn d¸",5,53 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Cùng KÏ Biªn D¸",5,54 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Ð߶ng Trang ThØ Biªn D¸",5,55 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Long Quy Biªn D¸",5,56 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Áp ChuÖ Thú Biªn D¸",5,57 )
AddNumText( sceneId, x891002_g_ScriptId, "#gffff00Thø ÐÕi Hùng Biªn D¸",5,58 )
từ 50 đến 58 có thay bằng 1 đến x không