[TLBB] NPc Nhận Thưởng - Trang 2
Follow us on
Follow us on Facebook Follow us on Twitter Linked In Flickr Watch us on YouTube My Space Blogger
 
Trang 2 của 2 Đầu tiênĐầu tiên 1 2
Kết quả 11 đến 17 của 17

Chủ đề: NPc Nhận Thưởng

  1. #11
    Thành Viên
    Ngày tham gia
    Oct 2008
    Bài viết
    456
    Thanks
    58
    Thanked 114 Times in 96 Posts

    Ðề: NPc Nhận Thưởng

    Trích dẫn Gửi bởi huuduyen_05 [Only registered and activated users can see links. ]
    không ai tự dưng mà biết hết đâu bạn à! phải biết cách hỏi thì người khác mới chỉ, hỏi và đòi ăn sẵn như bạn thì khó lắm.
    Khuyên chân thành là bạn đừng nên lập topic hỏi dạng như thế này nữa. Ở box này ít bị ăn gạch chứ mấy box khác thì đủ xây biệt thự
    chắc AE trong box này hiền, không thì cũng đủ xây biệt thự thiệt chứ chẳng chơi
    Khách viếng thăm hãy cùng vocweb xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  2. #12
    Thành Viên
    Ngày tham gia
    Jul 2014
    Bài viết
    153
    Thanks
    31
    Thanked 16 Times in 16 Posts

    Ðề: NPc Nhận Thưởng

    số mình nó may mắn ý mà )))))))))))))))))))))))))
    Khách viếng thăm hãy cùng chicanem12q xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  3. #13
    Thành Viên skythienlong's Avatar
    Ngày tham gia
    Apr 2014
    Bài viết
    628
    Thanks
    209
    Thanked 324 Times in 165 Posts

    Ðề: NPc Nhận Thưởng

    box ít người, có gạch cũng chỉ xây nhà cấp 4 được thôi.........
    Khách viếng thăm hãy cùng skythienlong xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  4. #14
    Thành Viên
    Ngày tham gia
    Oct 2010
    Bài viết
    440
    Thanks
    36
    Thanked 55 Times in 40 Posts

    Ðề: NPc Nhận Thưởng

    Trích dẫn Gửi bởi skythienlong [Only registered and activated users can see links. ]
    box ít người, có gạch cũng chỉ xây nhà cấp 4 được thôi.........
    PHP Code:
    x399998_g_scriptId 399998
    x399998_g_MaxBagSize    
    60
    --**********************************
    -- 
    ʼþ½»»¥Èë¿Ú
    --**********************************
    function 
    x399998_OnDefaultEventsceneIdselfId )
        if 
    GetNumText()>=100 and GetNumText()<200 then
            x399998_SuiShen
    (sceneIdselfId0,0)
        elseif 
    GetNumText()>=200 and GetNumText()<300 then
            x399998_JiaRuMenPai
    (sceneIdselfId,0)
        elseif 
    GetNumText()>=300 and GetNumText()<400 then
            x399998_BaoShi
    (sceneIdselfId)
        elseif 
    GetNumText()>=400 and GetNumText()<500 or GetNumText()>=1000 and GetNumText()<2000 then
            x399998_ChuanSong
    (sceneIdselfId0,0)
        elseif 
    GetNumText()>=500 and GetNumText()<600 then
            x399998_EquipBase
    (sceneId,selfId)
        elseif 
    GetNumText()>=600 and GetNumText()<700 then
            x399998_Pet
    (sceneId,selfId)
        elseif 
    GetNumText() == 8888  then
            x399998_BackToIndex
    sceneIdselfId )
        elseif 
    GetNumText() == 9999  then
            x399998_CloseMe
    (sceneIdselfId)
        
    end
    end
    --**********************************
    --
    ×°±¸¹¦ÄÜ
    --**********************************
    function 
    x399998_Pet(sceneId,selfId)
        if 
    GetNumText()==600 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#G    Các chÑc nång trân thú")
                
    AddNumText(sceneIdx399998_g_scriptId,"#RLuy®n kÛ nång Trân Thú"5601)
                
    AddNumText(sceneIdx399998_g_scriptId,"Quay lÕi"88888)
            
    EndEvent(sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    GetNumText()==601 then
            BeginUICommand
    (sceneId)
                
    UICommand_AddInt(sceneId,selfId);
            
    EndUICommand(sceneId)
            
    DispatchUICommand(sceneId,selfId223)
        
    end
    end
    --**********************************
    --
    ×°±¸¹¦ÄÜ
    --**********************************
    function 
    x399998_EquipBase(sceneId,selfId)
        if 
    GetNumText()==500 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#G    Gia công trang b¸")
                
    AddNumText(sceneIdx399998_g_scriptId,"#RGiám ð¸nh tß ch¤t trang b¸"6501)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RTái giám ð¸nh trang b¸"6502)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RC߶ng hóa trang b¸"6503)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RTång s¯ l¥n sØa chæa"6504)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RKh¡c Danh Trang B¸"6505)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RGÞ kh¡c danh trang b¸"6506)
                
    AddNumText(sceneIdx399998_g_scriptId,"Quay lÕi"88888)
            
    EndEvent(sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    GetNumText()==501 then
            BeginUICommand
    sceneId )
                
    UICommand_AddIntsceneIdselfId )
            
    EndUICommandsceneId )
            
    DispatchUICommandsceneIdselfId1001 )
        elseif 
    GetNumText()==502 then
            BeginUICommand
    sceneId )
                
    UICommand_AddIntsceneIdselfId )
            
    EndUICommandsceneId )
            
    DispatchUICommandsceneIdselfId112233 )
        elseif 
    GetNumText()==503 then
            BeginUICommand
    (sceneId)
            
    UICommand_AddInt(sceneId,selfId)
            
    EndUICommand(sceneId)
            
    DispatchUICommand(sceneId,selfId1002)
        elseif 
    GetNumText()==504 then
            BeginUICommand
    (sceneId)
                
    UICommand_AddInt(sceneId,selfId)
            
    EndUICommand(sceneId)
            
    DispatchUICommand(sceneId,selfId1004)
        elseif 
    GetNumText()==505 then
            BeginUICommand
    (sceneId)
                
    UICommand_AddInt(sceneId,selfId)
            
    EndUICommand(sceneId)
            
    DispatchUICommand(sceneId,selfId1005)
        elseif 
    GetNumText()==506 then
            BeginUICommand
    (sceneId)
                
    UICommand_AddInt(sceneId,selfId)
            
    EndUICommand(sceneId)
            
    DispatchUICommand(sceneId,selfId1006)
        
    end
    end
    --**********************************
    --
    ´«Ë͹¦ÄÜ
    --**********************************
    function 
    x399998_ChuanSong(sceneId,selfId,key,isNPC)
        if 
    key==0 then
            key
    =GetNumText()    
        
    end
        
    if key==400 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#Y    ChÑc nång d¸ch chuy¬n chï cho phép dùng · #RtÑ#Y ðÕi thành th¸ (Lâu Lan, ÐÕi Lý, Tô Châu LÕc Dß½ng) cùng #Rth§p#Y ðÕi môn phái.")
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffÐßa ta ðªn các Thành th¸"9401)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffÐßa ta ðªn các môn phái khác"9402)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffKhu luy®n c¤p"9403) -- r¤t nhanh lên c¤p
                AddNumText
    (sceneIdx399998_g_scriptId,"#YKhu vñc phøc bän"9406)    -- bän sao ðµc ðáo cüa h® th¯ng
                AddNumText
    (sceneIdx399998_g_scriptId,"#cff0000Khu vñc tà ác"9404) -- nhanh thu th§p bäo v§t
                AddNumText
    (sceneIdx399998_g_scriptId,"#c00ffffKhu vñc khác"9405)  -- khu luy®n công khác
                
    if isNPC==0 then
                    AddNumText
    (sceneIdx399998_g_scriptId,"Quay lÕi"88888)
                
    end
            EndEvent
    (sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key==401 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#Y    Ði ðªn các thành th¸ l¾n:")
                
    AddNumText(sceneIdx399998_g_scriptId,"#RLâu Lan"9424)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RÐÕi Lý"9421)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RTô Châu"9423)            
                
    AddNumText(sceneIdx399998_g_scriptId,"#RLÕc Dß½ng"9422)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RVõ quán LÕc Dß½ng"9425)            
                
    AddNumText(sceneIdx399998_g_scriptId,"#RPhßþng Minh Tr¤n"91502)

                if 
    isNPC==0 then
                    AddNumText
    (sceneIdx399998_g_scriptId,"Quay lÕi"88888)
                
    end
            EndEvent
    (sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key==425 then
            
    --x399998_MsgBoxsceneIdselfId"#cfff263    Â¥À¼Ö÷³ÇÒÑÖØй滮£¬¿É½øÐÐÇдèÁË£¬Ö±½Ó·µ»ØÖ÷³ÇÌôÕ½¶Ô·½¡£" )
            
    x399998_GoTo(sceneId,selfId,0186328)--ÂåÑô
        
    elseif key==402 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#Y    D¸ch chuy¬n ðªn th§p ðÕi môn phái")
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Mµ Dung"9440)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Tinh Túc"9441)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Tiêu Dao"9442)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Thiªu Lâm"9443)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Thiên S½n"9444)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Thiên Long"9445)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Nga My"9446)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Võ Ðang"9447)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Minh Giáo"9448)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Cái Bang"9449)
                if 
    isNPC==0 then
                    AddNumText
    (sceneIdx399998_g_scriptId,"Quay lÕi"88888)
                
    end
            EndEvent
    (sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key==404 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#Y    Khu vñc nguy hi¬m sát khí cao, nªu các hÕ mu¯n ði c¦n th§n an toàn tính mÕng!")
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Thúc Hà C· Tr¤n"91501)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - C± Mµ T¥ng Chín"91503)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffCänh KÛ - CÕnh KÛ Tr߶ng"91504)
                --
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Phßþng Minh Tr¤n"91502)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Thông Thiên Tháp"91512)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Côn Lôn S½n"9461)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Côn Lôn Phúc Ð¸a"9470)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Phßþng Hoàn C± Thành"9462)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Thanh Nguyên"9463)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Thanh Nguyên S½n Ðµng"9465)            
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Thiên Kiªp Lâu"9464)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Phßþng Hoàng Bình Nguyên"9466)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Trøc Lµc Chiªn Tr߶ng"9467)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Phßþng Hoàng Lång Mµ"9468)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Thúc Hà C± Tr¤n"9469)

                        if 
    isNPC==0 then
                    AddNumText
    (sceneIdx399998_g_scriptId,"Quay lÕi"88888)
                
    end
            EndEvent
    (sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key==1512 then
            x399998_GoTo
    (sceneId,selfId,475256278)--Thông Thiên Tháp
           
    elseif key==1504 then
            x399998_GoTo
    (sceneId,selfId,41410098)--ÊøºÓ¹ÅÕò
        
    elseif key==1503 then
            x399998_GoTo
    (sceneId,selfId,1675679)--ÊøºÓ¹ÅÕò
        
    elseif key==1501 then
            x399998_GoTo
    (sceneId,selfId,420200211)--ÊøºÓ¹ÅÕò
        
    elseif key==1502 then
            x399998_GoTo
    (sceneId,selfId,48015861)--Phßþng minh tr¤n
        
    elseif key==403 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#Y    Sau ðây là khu vñc vô cùng lÕ, quái cñc nhi«u, kinh nghi®m tång cñc ðã")
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffThông Thiên Tháp Ð¸a Cung [45-100]"9450)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffYªn Vß½ng C± Mµ T¥ng 1 [35 - 60]"91401)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffYªn Vß½ng C± Mµ T¥ng 7 [60 - 80]"91402)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffT¥n Hoàng Ð¸a Cung T¥ng 1 [80 - 100]"91403)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffT¥n Hoàng Ð¸a Cung T¥ng 2 [80 - 100]"91404)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffT¥n Hoàng Ð¸a Cung T¥ng 3 [80 - 100]"91405)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffThánh Höa Cung [100 - 150]"91406)
                --
    AddNumText(sceneIdx399998_g_scriptId,"#cff0000Thông Thiên Tháp Ð¸a Cung [150 +]"9450)
                if 
    isNPC==0 then
                    AddNumText
    (sceneIdx399998_g_scriptId,"Quay lÕi"88888)
                
    end
            EndEvent
    (sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key==1401 then
            x399998_GoTo
    (sceneId,selfId,1596893)--ÑàÍõ¹ÅĹ1²ã
        
    elseif key==1402 then
            x399998_GoTo
    (sceneId,selfId,16529106)--ÑàÍõ¹ÅĹ7²ã
        
    elseif key==1403 then
            x399998_GoTo
    (sceneId,selfId,400228219)--Çػʵع¬1²ã
        
    elseif key==1404 then
            x399998_GoTo
    (sceneId,selfId,401185163)--Çػʵع¬2²ã
        
    elseif key==1405 then
            x399998_GoTo
    (sceneId,selfId,402225214)--Çػʵع¬3²ã
        
    elseif key==1406 then
            x399998_GoTo
    (sceneId,selfId,20222106)--Ê¥»ð¹¬

        
    elseif key==461 then
            x399998_GoTo
    (sceneId,selfId,433,  10921)--Côn Lôn S½n
        
    elseif key==462 then
            x399998_GoTo
    (sceneId,selfId,180,  3943)--·Phung Hoàn C± Tr¤n
        
    elseif key==463 then
            x399998_GoTo
    (sceneId,selfId,444,  104299)--Thanh Nguyên
        
    elseif key==464 then
            x399998_GoTo
    (sceneId,selfId,435,  100100)--Thiên Kiªp Lâu
        
    elseif key==465 then
            x399998_GoTo
    (sceneId,selfId,445,  43218)--THanh Nguyên S½n Ðµng
        
    elseif key==466 then
            x399998_GoTo
    (sceneId,selfId,441,  9291)--Phug hoan minh nguyên
        
    elseif key==467 then
            x399998_GoTo
    (sceneId,selfId,408,  100100)--Trác Lµc
        
    elseif key==468 then
            x399998_GoTo
    (sceneId,selfId,442,  100100)--Phøng Hoàn Lång Mµ
        
    elseif key==469 then
            x399998_GoTo
    (sceneId,selfId,420,  100100)--Thúc hà c± tr¤n
        
    elseif key==470 then
            x399998_GoTo
    (sceneId,selfId,434,  100100)--Côn lôn phúc ð¸a
        
    elseif key==450 then
            x399998_GoTo
    (sceneId,selfId,475,  256.211378.436)--Thông thiên tháp ð¸a cung


        
    elseif key==422 then
            x399998_GoTo
    (sceneId,selfId,0333271)--LÕc Dß½ng
        
    elseif key==423 then
            x399998_GoTo
    (sceneId,selfId,1194255)--Tô châu
        
    elseif key==424 then
            x399998_GoTo
    (sceneId,selfId,186288136)--Lâu Lan
        
    elseif key==421 then
            x399998_GoTo
    (sceneId,selfId,2160160)--ÐÕi Ly
        
    elseif key==440 then
            x399998_GoTo
    (sceneId,selfId,195154165)--Mµ Dung
        
    elseif key==441 then
            x399998_GoTo
    (sceneId,selfId,16,  96152)--Tinh Túc
        
    elseif key==442 then
            x399998_GoTo
    (sceneId,selfId,14,  67145)--Tiêu Dao
        
    elseif key==443 then
            x399998_GoTo
    (sceneId,selfId,9,  96127)--Thiªu Lâm
        
    elseif key==444 then
            x399998_GoTo
    (sceneId,selfId,17,  95120)--Thiên S½n
        
    elseif key==445 then
            x399998_GoTo
    (sceneId,selfId,13,  96120)--Thiên Long
        
    elseif key==446 then
            x399998_GoTo
    (sceneId,selfId,15,  89139)--Nga My
        
    elseif key==447 then
            x399998_GoTo
    (sceneId,selfId,12103150)--Võ Ðang
        
    elseif key==448 then
            x399998_GoTo
    (sceneId,selfId,11,  98167)--Minh Giáo
        
    elseif key==449 then
            x399998_GoTo
    (sceneId,selfId,10,  91116)--Cái Bang
        
    elseif key==405 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#Y    D¸ch chuy¬n ðªn các khu vñc khác:")
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffThánh Thú S½n"91301)            
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffVõ Di"91302)            
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffNgân Ngai Tuyªt Nguyên"91303)            
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffThäo Nguyên"91304)            
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffThß½ng S½n"91305)            
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffTháp Kh¡c LÕp Mã Can"91306)            
                if 
    isNPC==0 then
                    AddNumText
    (sceneIdx399998_g_scriptId,"Quay lÕi"88888)
                
    end
            EndEvent
    (sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key==1301 then
            x399998_GoTo
    (sceneId,selfId,158231,226)--Ê¥ÊÞɽ
        
    elseif key==1302 then
            x399998_GoTo
    (sceneId,selfId,324337)--ÎäÒÄ
        
    elseif key==1303 then
            x399998_GoTo
    (sceneId,selfId,18860214)--Òø°¨Ñ©Ô­
        
    elseif key==1304 then
            x399998_GoTo
    (sceneId,selfId,20279255)--²ÝÔ­
        
    elseif key==1305 then
            x399998_GoTo
    (sceneId,selfId,2527652)--²Ôɽ
        
    elseif key==1306 then
            x399998_GoTo
    (sceneId,selfId,4273425)--Ëþ¿ËÀ­Âê¸É
        
    elseif key==406 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#Y    Thiên Long Phø Bän, D¸ch ðªn các bän ð° ð£c bi®t")
                --
    AddNumText(sceneIdx399998_g_scriptId,"#cff0000BOSS TÕp tri®u hoán ð¸a ð°"91201)                        
                --
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffXúc Cúc Phø Bän"91202)                        
                --
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffKÏ Cuµc Phø Bän"91203)                        
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffThüy Lao Phø Bän"91204)                        
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffYªn TØ Phø Bän"91205)                        
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffLâu Lan T¥m Bäo"91206)                        
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffTân Tam Hoàn"91207)                        
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffTân Thiªu Th¤t S½n Phiêu Mi­u"91208)                        
                if 
    isNPC==0 then
                    AddNumText
    (sceneIdx399998_g_scriptId,"Quay lÕi"88888)
                
    end
            EndEvent
    (sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key==1201 then
            x399998_GoTo
    (sceneId,selfId,4583233)--BOSS¿¨ÕÙ»½µØͼ
        
    elseif key==1202 then
            x399998_GoTo
    (sceneId,selfId,2160160)--õí¾Ï¸±±¾
        
    elseif key==1203 then
            x399998_GoTo
    (sceneId,selfId,2430234)--Æå¾Ö¸±±¾
        
    elseif key==1204 then
            x399998_GoTo
    (sceneId,selfId,1339310)--Ë®Àθ±±¾
        
    elseif key==1205 then
            x399998_GoTo
    (sceneId,selfId,470121)--Ñà×Ó¸±±¾
        
    elseif key==1206 then
            x399998_GoTo
    (sceneId,selfId,18616275)--Â¥À¼Ñ°±¦
        
    elseif key==1207 then
            x399998_GoTo
    (sceneId,selfId,18629066)--ÐÂÈý»·
        
    elseif key==1208 then
            x399998_GoTo
    (sceneId,selfId,1581482)--ÐÂÉÙÊÒɽƮÃì
        end
    end
    --**********************************
    --
    ´«Ë͹¦ÄÜ
    --**********************************
    function 
    x399998_GoTosceneIdselfIdtoSceneIdx)
        -- 
    ¼ì²âÍæ¼ÒÉíÉÏÊDz»ÊÇÓС°ÒøƱ¡±Õâ¸ö¶«Î÷£¬ÓоͲ»ÄÜʹÓÃÕâÀïµÄ¹¦ÄÜ
        
    if GetItemCount(sceneIdselfIdx210504_g_Yinpiao)>=1  then
            BeginEvent
    sceneId )
                
    AddTextsceneId"  Xin thÑ l²i trên ng߶i các hÕ ðang giæ ngân phiªu, chÕy thß½ng nhân! Ta không th¬ giúp ðßþc." )
            
    EndEventsceneId )
            
    DispatchEventListsceneIdselfIdtargetId )
            return
        
    end
        
    if sceneId~=and sceneId~=and sceneId~=and sceneId~=16 and sceneId~=14 and sceneId~=and sceneId~=17 and sceneId~=13 and sceneId~=15 and sceneId~=12 and sceneId~=11 and sceneId~=10 and sceneId~=380 and sceneId~=186 then
            x399998_Tips
    sceneIdselfId"Ngß½i ðang · khu vñc không th¬ sØ døng chÑc nång này, sau khi tr· v« thành r°i hãy sØ døng lÕi!" )
            
    x399998_CloseMe(sceneIdselfId)
            return
        
    end
        CallScriptFunction
    ( (400900), "TransferFunc"sceneIdselfIdtoSceneIdx)
    end
    --**********************************
    --
    ·µ»ØÖ÷Ò³
    --**********************************
    function 
    x399998_BackToIndexsceneIdselfId )
        
    x399999_OnDefaultEventsceneIdselfId, -)
    end
    --**********************************
    --
    Íæ¼ÒÆÁÄ»ÖмäÌáʾ
    --**********************************
    function 
    x399998_TipssceneIdselfIdstr )
        
    BeginEventsceneId )
            
    AddTextsceneIdstr )
        
    EndEventsceneId )
        
    DispatchMissionTipssceneIdselfId )
    end

    --**********************************
    --
    ¶Ô»°´°¿ÚÐÅÏ¢Ìáʾ
    --**********************************
    function 
    x399998_MsgBoxsceneIdselfIdmsg )
        
    BeginEventsceneId )
            
    AddTextsceneIdmsg )
        
    EndEventsceneId )
        
    DispatchEventListsceneIdselfId, -)
    end
    --**********************************
    --
    ¹Ø±Õ¶Ô»°¿ò
    --**********************************
    function 
    x399998_CloseMe(sceneIdselfId)
        
    BeginUICommand(sceneId)
        
    EndUICommand(sceneId)
        
    DispatchUICommand(sceneId,selfId1000)
    end
    --**********************************
    --
    ±¦Ê¯¹¦ÄÜ
    --**********************************
    function 
    x399998_BaoShi(sceneId,selfId)
        if 
    GetNumText()==300 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#G  Ngß½i có th¬ ðem m¤y viên Bäo ThÕch gi¯ng nhau hþp thành 1 viên Bäo ThÕch cao h½n 1 c¤p, ðem nguyên li®u cüa m¤y viên c¤p th¤p hþp thành 1 nguyên li®u cao h½n 1 c¤p, cûng có th¬ khoan l² khäm Bäo ThÕch lên trang b¸, cûng có th¬ gÞ bö Bäo ThÕch")
                --
    AddNumText(sceneIdx399998_g_scriptId,"Khoan ba l² cho trang b¸"5301)
                
    AddNumText(sceneIdx399998_g_scriptId,"Trang B¸ Khoan"5302)
                
    AddNumText(sceneIdx399998_g_scriptId,"Bäo ThÕch Hþp Thành"5303)
                
    AddNumText(sceneIdx399998_g_scriptId,"Khäm Bäo ThÕch"5306)
                
    AddNumText(sceneIdx399998_g_scriptId,"Tháo gÞ Bäo ThÕch"5304)
                
    AddNumText(sceneIdx399998_g_scriptId,"Nguyên li®u hþp thành"5305)
                
    AddNumText(sceneIdx399998_g_scriptId,"Ðiêu trác Bäo ThÕch"5307)
                
    AddNumText(sceneIdx399998_g_scriptId,"Bäo ThÕch Dung Luy®n"5308)
                
    AddNumText(sceneIdx399998_g_scriptId,"Quay lÕi"88888)
            
    EndEvent(sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    GetNumText()==301 then
            local tEquipGemTable 
    = { 01234567121415}--8 thú cßÞi,17 ám khí
            local bagbegin 
    GetBasicBagStartPos(sceneIdselfId)
            
    local bagend GetBasicBagEndPos(sceneIdselfId)        
            for 
    i=bagbeginbagend do
                
    local itemIndex LuaFnGetItemTableIndexByIndexsceneIdselfId)            
                if 
    itemIndex>0 then
                    local ret 
    LuaFnIsItemLockedsceneIdselfId)
                    if 
    ret ~= 0 then
                        
    return
                    
    end    
                    local EquipType 
    LuaFnGetBagEquipTypesceneIdselfId)                
                    
    local find 0
                    
    for jgem in tEquipGemTable do
                        if 
    gem == EquipType then
                            find 
    1
                        end
                    end
                    
    if find == 1 then    
                        local equipMaxGemCount 
    GetBagGemCountsceneIdselfId)                    
                        while 
    equipMaxGemCount<do                
                            
    local ret AddBagItemSlotsceneIdselfId)
                            
    equipMaxGemCount GetBagGemCountsceneIdselfId)            
                        
    end
                    end
                end
            end
            x399998_MsgBox
    sceneIdselfId"#Y    T¤t cä trang b¸ cüa các hÕ ðã ðßþc khoan [#R3#Y] l²." )
        elseif 
    GetNumText()==302 then
            BeginUICommand
    sceneId )
            
    UICommand_AddIntsceneIdselfId )
            
    UICommand_AddIntsceneId)--type£¬µã½ðÖ®¼ý
            EndUICommand
    sceneId )
            
    DispatchUICommandsceneIdselfId75117 )
        elseif 
    GetNumText()==303 then
            BeginUICommand
    sceneId )
            
    UICommand_AddIntsceneIdselfId )
            
    EndUICommandsceneId )
            
    DispatchUICommandsceneIdselfId23 )
        elseif 
    GetNumText()==304 then
            BeginUICommand
    sceneId )
            
    UICommand_AddIntsceneIdselfId )
            
    EndUICommandsceneId )
            
    DispatchUICommandsceneIdselfId27 )
        elseif 
    GetNumText()==305 then
            BeginUICommand
    sceneId )
            
    UICommand_AddIntsceneIdselfId )
            
    EndUICommandsceneId )
            
    DispatchUICommandsceneIdselfId19810424 )
        elseif 
    GetNumText()==306 then
            BeginUICommand
    sceneId )
            
    UICommand_AddIntsceneIdselfId )
            
    EndUICommandsceneId )
            
    DispatchUICommandsceneIdselfId19830424 )
        elseif 
    GetNumText()==307 then
            BeginUICommand
    sceneId )
            
    UICommand_AddIntsceneIdselfId )
            
    EndUICommandsceneId )
            
    DispatchUICommandsceneIdselfId112236 )
        elseif 
    GetNumText()==308 then
            BeginUICommand
    sceneId )
            
    UICommand_AddIntsceneIdselfId )
            
    EndUICommandsceneId )
            
    DispatchUICommandsceneIdselfId112237 )
        
    end
    end

    --**********************************
    --
    ËæÉí¹¦ÄÜ
    --**********************************
    function 
    x399998_SuiShen(sceneId,selfId,key,isNPC)
        if 
    key==0 then
            key
    =GetNumText()    
        
    end
                    
    --AddNumText(sceneIdx399998_g_scriptId,"#RLînh thß·ng theo ðÆng c¤p"6130)

                --
    AddNumText(sceneIdx399998_g_scriptId,"#c0066ffNh§n 500.000 KNB"5107)    
                --
    AddNumText(sceneIdx399998_g_scriptId,"#c0066ffNh§n 1500 Vàng"5106)            

        if 
    key==100 then
            BeginEvent
    (sceneId)
                if 
    isNPC==0 then
                AddText
    (sceneId"#G    Các chÑc nång t±ng hþp")
                else
                
    AddText(sceneId"#G  Trinh xin chào các anh các ch¸! #r  #YXin m¶i lña ch÷n chÑc nång c¥n sØ døng!")
                
    end
                

            
                AddNumText
    (sceneIdx399998_g_scriptId,"#b#GNh§n 5000 Vàng"5109)            
                
    AddNumText(sceneIdx399998_g_scriptId,"#b#Gбi vàng thành KNB"4120)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RThß½ng kh¯"5102)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c0066ffNh§n ði¬m khyªch trß½ng"6101)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RSØa l²i EXP"6104)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RGiäi tr× trÕng thái tàu v§n - out bang"6108)
                --
    AddNumText(sceneIdx399998_g_scriptId,"#RThông báo"1103)    
                
    AddNumText(sceneIdx399998_g_scriptId,"#RNews"2103)    
                if 
    isNPC==0 then
                    AddNumText
    (sceneIdx399998_g_scriptId,"Quay lÕi"88888)
                
    end            
            EndEvent
    (sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key== 109 then
                local day 
    GetDayTime();
                
    local lastDay GetMissionData(sceneIdselfIdAddMoneyJZ );
                if 
    lastDay == day then
                BeginEvent
    sceneId )
                
    AddTextsceneId"#gffff00Chào bÕn, hôm nay bÕn ðã sØ døng chÑc nång này. M²i ngày chï ðßþc dùng chÑc nång này mµt l¥n. #rHãy quay lÕi vào hôm sau." )
                
    EndEventsceneId )
                
    DispatchEventListsceneIdselfIdtargetId )
                return
                
    end
                AddMoneyJZ
    sceneIdselfId50000000 )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#HChúc m×ng #cFF0000"..nam.." #Hðã nh§n Vàng thành công!")
                
    SetMissionData(sceneIdselfIdAddMoneyJZday);

            
    BeginEvent(sceneId)
            
    local    nam    LuaFnGetNamesceneIdselfId )
                
    AddText(sceneId,"#HChúc m×ng #cFF0000"..nam.." #Hðã nh§n thành công #G#{_EXCHG50000000}#H. Cám ½n ðã üng hµ #e0e8de5#c00ffffTh¥n Kiªm.")
            
    EndEvent(sceneId)
            
    DispatchEventList(sceneId,selfId,targetId)
            
        elseif 
    key==108  then
            LuaFnCancelSpecificImpact
    (sceneId,selfId,59)
            
    LuaFnCancelSpecificImpact(sceneId,selfId,113)
            
    LuaFnCancelSpecificImpact(sceneId,selfId,200)
            
    LuaFnCancelSpecificImpact(sceneId,selfId,33815)
            
    x399998_CloseMe(sceneIdselfId)
        elseif 
    key==107  then
            local getYB
    =500000;
            
    YuanBao(sceneId,selfId,targetId,1,getYB)
            
    x399998_TipssceneIdselfId"Chúc m×ng các hÕ nh§n thành công "..getYB.." KNB" )
            
    x399998_CloseMe(sceneIdselfId)
        elseif 
    key==106  then
            
    --local getYB=500000;
            
    AddMoney(sceneId,selfId,50000000)
            
    x399998_TipssceneIdselfId"Chúc m×ng các hÕ nh§n thành công 5000 Vàng" )
            
    x399998_CloseMe(sceneIdselfId)

        elseif 
    key==105  then
            BeginEvent
    sceneId )
                
    LuaFnSendSpecificImpactToUnit(sceneId,selfId,selfId,selfId,18,1000)
                for 
    0,1000  do
                    
    AddExp(sceneId,selfId,GetExp(sceneId,selfId)*-1)
                
    end
                AddText
    (sceneId,"Xin chúc m×ng, kinh nghi®m cüa các hÕ ðã tr· v« bình th߶ng!")
            
    EndEventsceneId )
            
    DispatchEventListsceneIdselfId, -)
        elseif 
    key==104  then
            BeginEvent
    sceneId )
            
    AddTextsceneId"ChÑc nång này giäi quyªt tình trÕng âm EXP ho£c do các hÕ dß EXP quá nhi«u dçn ðªn l²i." )
            
    AddNumText(sceneIdx399998_g_scriptId"Ðúng ta mu¯n sØa"12105 )
            
    AddNumText(sceneIdx399998_g_scriptId,"Ta không c¥n"88888)
            
    EndEventsceneId )
            
    DispatchEventListsceneIdselfId, -)
        elseif 
    key==103  then
            CallScriptFunction
    110001"OnDefaultEvent"sceneIdselfId )
        elseif 
    key==102  then
            
    if sceneId==or sceneId==or sceneId==or sceneId==186 then
                BankBegin
    (sceneIdselfIdselfId)                
            else
                
    x399998_TipssceneIdselfId"Chï có th¬ sØ døng ti«n trang t× xa tÕi 4 thành th¸ l¾n." )
                
    x399998_CloseMe(sceneIdselfId)
            
    end        
        
    elseif key==101  then
        BeginAddItem
    (sceneId)
            
    AddItemsceneId39910007)
        
    EndAddItem(sceneId,selfId)
        
    AddItemListToHuman(sceneId,selfId)

        elseif 
    key==120  then
            BeginEvent
    (sceneId)
                
    AddText(sceneId,"#G    — ðây, ngß½i có th¬ ð±i vàng thành KNB. #rTï l® ð±i: #e6f00c7#c00ffff[#R#{_EXCHG1000}#c00ffff] : [#R10#c00ffffKNB]")
                
    AddNumTextsceneIdx399998_g_scriptId"#c00ffffB¡t ð¥u ð±i"6121 )
                
    AddNumTextsceneIdx399998_g_scriptId"Không c¥n"89999 )
            
    EndEvent(sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key==121  then
            BeginUICommand
    sceneId )
                
    UICommand_AddIntsceneIdselfId )
            
    EndUICommandsceneId )
            
    DispatchUICommandsceneIdselfId5430 )
        elseif 
    key==130  then
            BeginEvent
    (sceneId)
                
    AddText(sceneId,"    #GKhi ðü c¤p ðµ, các hÕ có th¬ ðªn n½i này ð¬ nh§n thß·ng! Chúc các hÕ ch½i game vui vë!")
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 10"5131 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 100 [10W] di¬m t£ng"5132 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 130 [15W] di¬m t£ng"5133 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 140 [20W] di¬m t£ng"5134 )
                ---
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 150 [30W] di¬m t£ng"5135 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 160 [50W] di¬m t£ng"5136 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 170 [60W] di¬m t£ng"5137 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 180 [70W] di¬m t£ng"5138 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 190 [80W] di¬m t£ng"5139 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 200 [90W] di¬m t£ng"5140 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 210 [100W] di¬m t£ng"5141 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 220 [200W] di¬m t£ng"5142 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 230 [300W] di¬m t£ng"5143 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 240 [400W] di¬m t£ng"5144 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 250 [500W] di¬m t£ng"5145 )
                if 
    isNPC==0 then
                    AddNumText
    (sceneIdx399998_g_scriptId,"Quay lÕi"88888)
                
    end
            EndEvent
    (sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key==145  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<250 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 250 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL250 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    SetMissionDatasceneIdselfIdDANJIAN_JL250)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 250 thành công ðßþc: #G[500W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==144  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<240 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 240 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL240 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    SetMissionDatasceneIdselfIdDANJIAN_JL240)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 240 thành công ðßþc: #G[400W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==143  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<230 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 230 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL230 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,3000000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL230)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 230 thành công ðßþc: #G[300W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==142  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<220 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 220 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL220 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,2000000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL220)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 220 thành công ðßþc: #G[200W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==141  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<210 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 210 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL210 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,1000000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL210)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 210 thành công ðßþc: #G[100W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==140  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<200 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 200 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL200 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,900000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL200)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 200 thành công ðßþc: #G[90W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==139  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<190 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 190 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL190 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,800000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL190)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 190 thành công ðßþc: #G[80W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==138  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<180 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 180 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL180 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,700000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL180)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 180 thành công ðßþc: #G[70W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==137  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<170 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 170 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL170 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,600000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL170)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 170 thành công ðßþc: #G[60W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==136  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<160 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 160 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL160 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,500000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL160)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 160 thành công ðßþc: #G[50W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==135  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<150 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 150 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL150 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,300000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL150)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 150 thành công ðßþc: #G[30W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==134  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<140 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 140 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL140 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,200000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL140)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 140 thành công ðßþc: #G[20W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==133  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<130 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 130 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL130 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,150000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL130)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 130 thành công ðßþc: #G[15W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==132  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<100 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 100 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL100 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,100000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL100)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 100 thành công ðßþc: #G[10W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==131  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<10 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 80 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL10 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                --
    YuanBao(sceneId,selfId,targetId,1,50000)
                
    BeginAddItem(sceneId)

                
    AddItemsceneId10141030)
                
    AddItemsceneId10157001)
                
    AddItemsceneId10155001)
                
    AddItemsceneId30008059)
                
    EndAddItem(sceneId,selfId)
                
    AddItemListToHuman(sceneId,selfId)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL10)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 10 thành công!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==132  then
            
        end
    end

    --**********************************
    --
    Vat pham nhan khi gia nhap mon phai
    --**********************************
    function 
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,menpaiId)
        
    local qishu=0
        local zuoqi
    =0
        
    if menpaiId ==0 then
            qishu
    =30308081
            zuoqi
    =10149024
        
    elseif menpaiId ==1 then
            qishu
    =30308080
            zuoqi
    =10149029
        
    elseif menpaiId ==2 then
            qishu
    =30308079
            zuoqi
    =10149025
        
    elseif menpaiId ==3 then
            qishu
    =30308084
            zuoqi
    =10149023
        
    elseif menpaiId ==4 then
            qishu
    =30308078
            zuoqi
    =10149022
        
    elseif menpaiId ==5 then
            qishu
    =30308086
            zuoqi
    =10149028
        
    elseif menpaiId ==6 then
            qishu
    =30308082
            zuoqi
    =10149027
        
    elseif menpaiId ==7 then
            qishu
    =30308083
            zuoqi
    =10149021
        
    elseif menpaiId ==8 then
            qishu
    =30308085
            zuoqi
    =10149026
        
    elseif menpaiId ==9 then
            qishu
    =39920006
            zuoqi
    =10149035
        end
        BeginAddItem
    (sceneId)
            
    AddItemsceneIdqishu)
            
    AddItemsceneIdzuoqi)
        
    EndAddItem(sceneId,selfId)
        
    AddItemListToHuman(sceneId,selfId)
    end

    --**********************************
    --
    ¼ÓÈëÃÅÅɼì²é
    --**********************************
    function 
    x399998_CheckJiaRuMenPai(sceneId,selfId)
        
    local index =    GetMissionDatasceneIdselfIdMY_JIARUMENPAI )
        if 
    index ==0 then
            
    return 1
        
    else
            if 
    LuaFnGetAvailableItemCount(sceneIdselfId39910006) >= 1 then
                
    return 1
            
    else
                
    x399998_MsgBoxsceneIdselfId"    #b#YBÕn ðã gia nh§p môn phái, nªu mu¯n thay ð±i c¥n #GMôn Phái Chuy¬n Hoán L®nh#Y!" )
                return 
    0
            end
        end
        
    end

    --**********************************
    --
    Ch÷n mon phái
    --**********************************
    function 
    x399998_JiaRuMenPai(sceneId,selfId,key)
        if 
    key==0 then
            key
    =GetNumText()
        
    end
        
    if key == 200 then
            
    if LuaFnGetAvailableItemCount(sceneIdselfId39910006) >= 1 then
            BeginEvent
    sceneId )
                
    AddText(sceneId,"  Xin chào các hÕ Õ! m¶i các hÕ lña ch÷n môn phái mu¯n chuy¬n")
                
    AddText(sceneId,"Chú ý: c¥n môn phái chuy¬n hoán l®nh, khi ð±i môn phái t¤t cä tâm pháp v« 20.")
                --
    AddTextsceneId"    #b#YCác tân thü ch÷n môn phái mu¯n gia nh§p tÕi ðây. Nªu mu¯n thay ð±i môn phái thì ðªn nguyên bäo thß½ng ðiªm mua #GMôn phái chuy¬n hoán l®nh#Y." )
                --
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Mµ Dung",3,201 )
                
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Tinh Túc",3,202 )
                
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Tiêu Dao",3,203 )
                
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Thiªu Lâm",3,204 )
                
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Thiên S½n",3,205 )
                
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Thiên Long",3,206 )        
                
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Võ Ðang",3,207 )
                
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Minh Giáo",3,208 )
                
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Cái Bang",3,209 )
                
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Nga My",3,210 )
                
    AddNumText(sceneIdx399998_g_scriptId,"Quay lÕi"88888)
            
    EndEventsceneId )
            
    DispatchEventListsceneIdselfId, -)
            else
            
    BeginEvent(sceneId)
                
    AddText(sceneId"#GNgß½i không có Môn phái chuy¬n hoán l®nh")
            
    EndEvent(sceneId)
            
    DispatchEventList(sceneId,selfId,targetId
            
    end        
        
    elseif key == 201  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId9)
                
    LuaFnSetXinFaLevel(sceneId,selfId,64,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,65,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,66,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,67,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,68,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,69,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,70,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,71,20)
                
    AddSkill(  sceneIdselfId200)
                --
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,9)
                
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);            
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #GMµ Dung Thª Gia#B. Thêm môn hÕ m¾i gia nh§p #GMµ Dung Thª Gia#B ngày càng l¾n mÕnh h½n trß¾c!")    
            
    end
        
    elseif key == 202  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId5)
                
    LuaFnSetXinFaLevel(sceneId,selfId,31,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,32,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,33,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,34,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,35,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,36,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,60,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,77,20)
                
    AddSkill(  sceneIdselfId28)
                --
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,5)
                
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #GTinh Túc#B. Thêm môn hÕ m¾i gia nh§p #GTinh Túc#B ngày càng l¾n mÕnh h½n trß¾c!")
            
    end
        
    elseif key == 203  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId8)
                
    LuaFnSetXinFaLevel(sceneId,selfId,49,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,50,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,51,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,52,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,53,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,54,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,63,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,80,20)
                
    AddSkill(  sceneIdselfId31)
                --
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,8)
                
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #GTiêu Dao#B. Thêm môn hÕ m¾i gia nh§p #GTiêu Dao#B ngày càng l¾n mÕnh h½n trß¾c!")
            
    end
        
    elseif key == 204  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId0)
                
    LuaFnSetXinFaLevel(sceneId,selfId,1,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,2,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,3,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,4,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,5,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,6,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,55,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,72,20)
                
    AddSkill(  sceneIdselfId23)
                --
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,0)
                
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #GThiªu Lâm#B. Thêm môn hÕ m¾i gia nh§p #GThiªu Lâm#B ngày càng l¾n mÕnh h½n trß¾c!")
            
    end
        
    elseif key == 205  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId7)
                
    LuaFnSetXinFaLevel(sceneId,selfId,43,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,44,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,45,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,46,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,47,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,48,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,62,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,79,20)
                
    AddSkill(  sceneIdselfId30)
                --
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,7)
                
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #GThiên S½n#B. Thêm môn hÕ m¾i gia nh§p #GThiên S½n#B ngày càng l¾n mÕnh h½n trß¾c!")
            
    end
        
    elseif key == 206  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId6)
                
    LuaFnSetXinFaLevel(sceneId,selfId,37,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,38,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,39,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,40,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,41,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,42,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,61,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,78,20)
                
    AddSkill(  sceneIdselfId29)
                
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,6)
                --
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #GThiên Long#B. Thêm môn hÕ m¾i gia nh§p #GThiên Long#B ngày càng l¾n mÕnh h½n trß¾c!")
            
    end
        
    elseif key == 207  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId3)
                
    LuaFnSetXinFaLevel(sceneId,selfId,19,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,20,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,21,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,22,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,23,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,24,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,58,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,75,20)
                
    AddSkill(  sceneIdselfId26)
                --
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,3)
                
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #GVõ Ðang#B. Thêm môn hÕ m¾i gia nh§p #GVõ Ðang#B ngày càng l¾n mÕnh h½n trß¾c!")
            
    end
        
    elseif key == 208  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId1)
                
    LuaFnSetXinFaLevel(sceneId,selfId,7,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,8,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,9,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,10,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,11,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,12,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,56,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,73,20)
                
    AddSkill(  sceneIdselfId24)
                --
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,1)
                
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #GMinh Giáo#B. Thêm môn hÕ m¾i gia nh§p #GMinh Giáo#B ngày càng l¾n mÕnh h½n trß¾c!")
            
    end
        
    elseif key == 209  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId2)
                
    LuaFnSetXinFaLevel(sceneId,selfId,13,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,14,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,15,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,16,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,17,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,18,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,57,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,74,20)
                
    AddSkill(  sceneIdselfId25)
                --
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,2)
                
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #Cái Bang#B. Thêm môn hÕ m¾i gia nh§p #GNga My#B ngày càng l¾n mÕnh h½n trß¾c!")
            
    end
        
    elseif key == 210  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId4)
                
    LuaFnSetXinFaLevel(sceneId,selfId,25,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,26,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,27,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,28,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,29,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,30,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,59,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,76,20)
                
    AddSkill(  sceneIdselfId27)
                --
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,4)
                
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #GNga My#B. Thêm môn hÕ m¾i gia nh§p #GNga My#B ngày càng l¾n mÕnh h½n trß¾c!")
            
    end
        end
    end
    --**********************************
    --
    Vàng to KNB
    --**********************************
    function 
    x399998_GoldToZDsceneIdselfIdtoZDNum)
        
    local needMoney=toZDNum*100;
        
    local   SelfMoneyJZ GetMoneyJZ (sceneIdselfId)
        
    local    SelfMoney   GetMoney   (sceneIdselfId)
        if (
    SelfMoney SelfMoneyJZ <needMoneythen
            local sMessage 
    format("#Y    Không ðü ngân lßþng, vui lòng ki¬m tra lÕi!")
            
    x399999_MsgBoxsceneIdselfIdsMessage )
            return
        
    end
        local reply 
    LuaFnCostMoneyWithPriority(sceneId,selfId,needMoney)
        if 
    reply == -1 then
            local sMessage 
    format("#Y    Không ðü ngân lßþng, vui lòng ki¬m tra lÕi!")
            
    x399999_MsgBoxsceneIdselfIdsMessage )
            return
        else
            
    local result =    YuanBao(sceneId,selfId,targetId,1,toZDNum)
            
    local sMessage format("#YChúc m×ng trao ð±i thành công#rTiêu hao [#R#{_EXCHG%d}#Y]#rNh§n ðßþc [#R%d KNB]",needMoney,toZDNum)
            
    x399999_MsgBoxsceneIdselfIdsMessage )
        
    end
    end 
    Mạo mụi share cái code đa chức năng,
    Hướng dẫn sơ qua:
    Chỉnh tất cả các số 399998 thành ID của NPC bạn cần trỏ tới
    Khách viếng thăm hãy cùng 3z3z3z xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  5. #15
    Super Moderator Sói Đẹp Trai's Avatar
    Ngày tham gia
    Apr 2011
    Đang ở
    地獄
    Bài viết
    3,991
    Thanks
    369
    Thanked 4,069 Times in 1,403 Posts

    Ðề: NPc Nhận Thưởng

    Trích dẫn Gửi bởi 3z3z3z [Only registered and activated users can see links. ]
    PHP Code:
    x399998_g_scriptId 399998
    x399998_g_MaxBagSize    
    60
    --**********************************
    -- 
    ʼþ½»»¥Èë¿Ú
    --**********************************
    function 
    x399998_OnDefaultEventsceneIdselfId )
        if 
    GetNumText()>=100 and GetNumText()<200 then
            x399998_SuiShen
    (sceneIdselfId0,0)
        elseif 
    GetNumText()>=200 and GetNumText()<300 then
            x399998_JiaRuMenPai
    (sceneIdselfId,0)
        elseif 
    GetNumText()>=300 and GetNumText()<400 then
            x399998_BaoShi
    (sceneIdselfId)
        elseif 
    GetNumText()>=400 and GetNumText()<500 or GetNumText()>=1000 and GetNumText()<2000 then
            x399998_ChuanSong
    (sceneIdselfId0,0)
        elseif 
    GetNumText()>=500 and GetNumText()<600 then
            x399998_EquipBase
    (sceneId,selfId)
        elseif 
    GetNumText()>=600 and GetNumText()<700 then
            x399998_Pet
    (sceneId,selfId)
        elseif 
    GetNumText() == 8888  then
            x399998_BackToIndex
    sceneIdselfId )
        elseif 
    GetNumText() == 9999  then
            x399998_CloseMe
    (sceneIdselfId)
        
    end
    end
    --**********************************
    --
    ×°±¸¹¦ÄÜ
    --**********************************
    function 
    x399998_Pet(sceneId,selfId)
        if 
    GetNumText()==600 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#G    Các chÑc nång trân thú")
                
    AddNumText(sceneIdx399998_g_scriptId,"#RLuy®n kÛ nång Trân Thú"5601)
                
    AddNumText(sceneIdx399998_g_scriptId,"Quay lÕi"88888)
            
    EndEvent(sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    GetNumText()==601 then
            BeginUICommand
    (sceneId)
                
    UICommand_AddInt(sceneId,selfId);
            
    EndUICommand(sceneId)
            
    DispatchUICommand(sceneId,selfId223)
        
    end
    end
    --**********************************
    --
    ×°±¸¹¦ÄÜ
    --**********************************
    function 
    x399998_EquipBase(sceneId,selfId)
        if 
    GetNumText()==500 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#G    Gia công trang b¸")
                
    AddNumText(sceneIdx399998_g_scriptId,"#RGiám ð¸nh tß ch¤t trang b¸"6501)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RTái giám ð¸nh trang b¸"6502)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RC߶ng hóa trang b¸"6503)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RTång s¯ l¥n sØa chæa"6504)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RKh¡c Danh Trang B¸"6505)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RGÞ kh¡c danh trang b¸"6506)
                
    AddNumText(sceneIdx399998_g_scriptId,"Quay lÕi"88888)
            
    EndEvent(sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    GetNumText()==501 then
            BeginUICommand
    sceneId )
                
    UICommand_AddIntsceneIdselfId )
            
    EndUICommandsceneId )
            
    DispatchUICommandsceneIdselfId1001 )
        elseif 
    GetNumText()==502 then
            BeginUICommand
    sceneId )
                
    UICommand_AddIntsceneIdselfId )
            
    EndUICommandsceneId )
            
    DispatchUICommandsceneIdselfId112233 )
        elseif 
    GetNumText()==503 then
            BeginUICommand
    (sceneId)
            
    UICommand_AddInt(sceneId,selfId)
            
    EndUICommand(sceneId)
            
    DispatchUICommand(sceneId,selfId1002)
        elseif 
    GetNumText()==504 then
            BeginUICommand
    (sceneId)
                
    UICommand_AddInt(sceneId,selfId)
            
    EndUICommand(sceneId)
            
    DispatchUICommand(sceneId,selfId1004)
        elseif 
    GetNumText()==505 then
            BeginUICommand
    (sceneId)
                
    UICommand_AddInt(sceneId,selfId)
            
    EndUICommand(sceneId)
            
    DispatchUICommand(sceneId,selfId1005)
        elseif 
    GetNumText()==506 then
            BeginUICommand
    (sceneId)
                
    UICommand_AddInt(sceneId,selfId)
            
    EndUICommand(sceneId)
            
    DispatchUICommand(sceneId,selfId1006)
        
    end
    end
    --**********************************
    --
    ´«Ë͹¦ÄÜ
    --**********************************
    function 
    x399998_ChuanSong(sceneId,selfId,key,isNPC)
        if 
    key==0 then
            key
    =GetNumText()    
        
    end
        
    if key==400 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#Y    ChÑc nång d¸ch chuy¬n chï cho phép dùng · #RtÑ#Y ðÕi thành th¸ (Lâu Lan, ÐÕi Lý, Tô Châu LÕc Dß½ng) cùng #Rth§p#Y ðÕi môn phái.")
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffÐßa ta ðªn các Thành th¸"9401)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffÐßa ta ðªn các môn phái khác"9402)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffKhu luy®n c¤p"9403) -- r¤t nhanh lên c¤p
                AddNumText
    (sceneIdx399998_g_scriptId,"#YKhu vñc phøc bän"9406)    -- bän sao ðµc ðáo cüa h® th¯ng
                AddNumText
    (sceneIdx399998_g_scriptId,"#cff0000Khu vñc tà ác"9404) -- nhanh thu th§p bäo v§t
                AddNumText
    (sceneIdx399998_g_scriptId,"#c00ffffKhu vñc khác"9405)  -- khu luy®n công khác
                
    if isNPC==0 then
                    AddNumText
    (sceneIdx399998_g_scriptId,"Quay lÕi"88888)
                
    end
            EndEvent
    (sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key==401 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#Y    Ði ðªn các thành th¸ l¾n:")
                
    AddNumText(sceneIdx399998_g_scriptId,"#RLâu Lan"9424)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RÐÕi Lý"9421)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RTô Châu"9423)            
                
    AddNumText(sceneIdx399998_g_scriptId,"#RLÕc Dß½ng"9422)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RVõ quán LÕc Dß½ng"9425)            
                
    AddNumText(sceneIdx399998_g_scriptId,"#RPhßþng Minh Tr¤n"91502)

                if 
    isNPC==0 then
                    AddNumText
    (sceneIdx399998_g_scriptId,"Quay lÕi"88888)
                
    end
            EndEvent
    (sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key==425 then
            
    --x399998_MsgBoxsceneIdselfId"#cfff263    Â¥À¼Ö÷³ÇÒÑÖØй滮£¬¿É½øÐÐÇдèÁË£¬Ö±½Ó·µ»ØÖ÷³ÇÌôÕ½¶Ô·½¡£" )
            
    x399998_GoTo(sceneId,selfId,0186328)--ÂåÑô
        
    elseif key==402 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#Y    D¸ch chuy¬n ðªn th§p ðÕi môn phái")
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Mµ Dung"9440)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Tinh Túc"9441)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Tiêu Dao"9442)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Thiªu Lâm"9443)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Thiên S½n"9444)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Thiên Long"9445)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Nga My"9446)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Võ Ðang"9447)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Minh Giáo"9448)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RMôn phái - Cái Bang"9449)
                if 
    isNPC==0 then
                    AddNumText
    (sceneIdx399998_g_scriptId,"Quay lÕi"88888)
                
    end
            EndEvent
    (sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key==404 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#Y    Khu vñc nguy hi¬m sát khí cao, nªu các hÕ mu¯n ði c¦n th§n an toàn tính mÕng!")
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Thúc Hà C· Tr¤n"91501)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - C± Mµ T¥ng Chín"91503)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffCänh KÛ - CÕnh KÛ Tr߶ng"91504)
                --
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Phßþng Minh Tr¤n"91502)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Thông Thiên Tháp"91512)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Côn Lôn S½n"9461)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Côn Lôn Phúc Ð¸a"9470)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Phßþng Hoàn C± Thành"9462)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Thanh Nguyên"9463)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Thanh Nguyên S½n Ðµng"9465)            
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Thiên Kiªp Lâu"9464)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Phßþng Hoàng Bình Nguyên"9466)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Trøc Lµc Chiªn Tr߶ng"9467)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Phßþng Hoàng Lång Mµ"9468)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffDã NgoÕi - Thúc Hà C± Tr¤n"9469)

                        if 
    isNPC==0 then
                    AddNumText
    (sceneIdx399998_g_scriptId,"Quay lÕi"88888)
                
    end
            EndEvent
    (sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key==1512 then
            x399998_GoTo
    (sceneId,selfId,475256278)--Thông Thiên Tháp
           
    elseif key==1504 then
            x399998_GoTo
    (sceneId,selfId,41410098)--ÊøºÓ¹ÅÕò
        
    elseif key==1503 then
            x399998_GoTo
    (sceneId,selfId,1675679)--ÊøºÓ¹ÅÕò
        
    elseif key==1501 then
            x399998_GoTo
    (sceneId,selfId,420200211)--ÊøºÓ¹ÅÕò
        
    elseif key==1502 then
            x399998_GoTo
    (sceneId,selfId,48015861)--Phßþng minh tr¤n
        
    elseif key==403 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#Y    Sau ðây là khu vñc vô cùng lÕ, quái cñc nhi«u, kinh nghi®m tång cñc ðã")
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffThông Thiên Tháp Ð¸a Cung [45-100]"9450)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffYªn Vß½ng C± Mµ T¥ng 1 [35 - 60]"91401)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffYªn Vß½ng C± Mµ T¥ng 7 [60 - 80]"91402)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffT¥n Hoàng Ð¸a Cung T¥ng 1 [80 - 100]"91403)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffT¥n Hoàng Ð¸a Cung T¥ng 2 [80 - 100]"91404)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffT¥n Hoàng Ð¸a Cung T¥ng 3 [80 - 100]"91405)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffThánh Höa Cung [100 - 150]"91406)
                --
    AddNumText(sceneIdx399998_g_scriptId,"#cff0000Thông Thiên Tháp Ð¸a Cung [150 +]"9450)
                if 
    isNPC==0 then
                    AddNumText
    (sceneIdx399998_g_scriptId,"Quay lÕi"88888)
                
    end
            EndEvent
    (sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key==1401 then
            x399998_GoTo
    (sceneId,selfId,1596893)--ÑàÍõ¹ÅĹ1²ã
        
    elseif key==1402 then
            x399998_GoTo
    (sceneId,selfId,16529106)--ÑàÍõ¹ÅĹ7²ã
        
    elseif key==1403 then
            x399998_GoTo
    (sceneId,selfId,400228219)--Çػʵع¬1²ã
        
    elseif key==1404 then
            x399998_GoTo
    (sceneId,selfId,401185163)--Çػʵع¬2²ã
        
    elseif key==1405 then
            x399998_GoTo
    (sceneId,selfId,402225214)--Çػʵع¬3²ã
        
    elseif key==1406 then
            x399998_GoTo
    (sceneId,selfId,20222106)--Ê¥»ð¹¬

        
    elseif key==461 then
            x399998_GoTo
    (sceneId,selfId,433,  10921)--Côn Lôn S½n
        
    elseif key==462 then
            x399998_GoTo
    (sceneId,selfId,180,  3943)--·Phung Hoàn C± Tr¤n
        
    elseif key==463 then
            x399998_GoTo
    (sceneId,selfId,444,  104299)--Thanh Nguyên
        
    elseif key==464 then
            x399998_GoTo
    (sceneId,selfId,435,  100100)--Thiên Kiªp Lâu
        
    elseif key==465 then
            x399998_GoTo
    (sceneId,selfId,445,  43218)--THanh Nguyên S½n Ðµng
        
    elseif key==466 then
            x399998_GoTo
    (sceneId,selfId,441,  9291)--Phug hoan minh nguyên
        
    elseif key==467 then
            x399998_GoTo
    (sceneId,selfId,408,  100100)--Trác Lµc
        
    elseif key==468 then
            x399998_GoTo
    (sceneId,selfId,442,  100100)--Phøng Hoàn Lång Mµ
        
    elseif key==469 then
            x399998_GoTo
    (sceneId,selfId,420,  100100)--Thúc hà c± tr¤n
        
    elseif key==470 then
            x399998_GoTo
    (sceneId,selfId,434,  100100)--Côn lôn phúc ð¸a
        
    elseif key==450 then
            x399998_GoTo
    (sceneId,selfId,475,  256.211378.436)--Thông thiên tháp ð¸a cung


        
    elseif key==422 then
            x399998_GoTo
    (sceneId,selfId,0333271)--LÕc Dß½ng
        
    elseif key==423 then
            x399998_GoTo
    (sceneId,selfId,1194255)--Tô châu
        
    elseif key==424 then
            x399998_GoTo
    (sceneId,selfId,186288136)--Lâu Lan
        
    elseif key==421 then
            x399998_GoTo
    (sceneId,selfId,2160160)--ÐÕi Ly
        
    elseif key==440 then
            x399998_GoTo
    (sceneId,selfId,195154165)--Mµ Dung
        
    elseif key==441 then
            x399998_GoTo
    (sceneId,selfId,16,  96152)--Tinh Túc
        
    elseif key==442 then
            x399998_GoTo
    (sceneId,selfId,14,  67145)--Tiêu Dao
        
    elseif key==443 then
            x399998_GoTo
    (sceneId,selfId,9,  96127)--Thiªu Lâm
        
    elseif key==444 then
            x399998_GoTo
    (sceneId,selfId,17,  95120)--Thiên S½n
        
    elseif key==445 then
            x399998_GoTo
    (sceneId,selfId,13,  96120)--Thiên Long
        
    elseif key==446 then
            x399998_GoTo
    (sceneId,selfId,15,  89139)--Nga My
        
    elseif key==447 then
            x399998_GoTo
    (sceneId,selfId,12103150)--Võ Ðang
        
    elseif key==448 then
            x399998_GoTo
    (sceneId,selfId,11,  98167)--Minh Giáo
        
    elseif key==449 then
            x399998_GoTo
    (sceneId,selfId,10,  91116)--Cái Bang
        
    elseif key==405 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#Y    D¸ch chuy¬n ðªn các khu vñc khác:")
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffThánh Thú S½n"91301)            
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffVõ Di"91302)            
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffNgân Ngai Tuyªt Nguyên"91303)            
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffThäo Nguyên"91304)            
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffThß½ng S½n"91305)            
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffTháp Kh¡c LÕp Mã Can"91306)            
                if 
    isNPC==0 then
                    AddNumText
    (sceneIdx399998_g_scriptId,"Quay lÕi"88888)
                
    end
            EndEvent
    (sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key==1301 then
            x399998_GoTo
    (sceneId,selfId,158231,226)--Ê¥ÊÞɽ
        
    elseif key==1302 then
            x399998_GoTo
    (sceneId,selfId,324337)--ÎäÒÄ
        
    elseif key==1303 then
            x399998_GoTo
    (sceneId,selfId,18860214)--Òø°¨Ñ©Ô­
        
    elseif key==1304 then
            x399998_GoTo
    (sceneId,selfId,20279255)--²ÝÔ­
        
    elseif key==1305 then
            x399998_GoTo
    (sceneId,selfId,2527652)--²Ôɽ
        
    elseif key==1306 then
            x399998_GoTo
    (sceneId,selfId,4273425)--Ëþ¿ËÀ­Âê¸É
        
    elseif key==406 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#Y    Thiên Long Phø Bän, D¸ch ðªn các bän ð° ð£c bi®t")
                --
    AddNumText(sceneIdx399998_g_scriptId,"#cff0000BOSS TÕp tri®u hoán ð¸a ð°"91201)                        
                --
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffXúc Cúc Phø Bän"91202)                        
                --
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffKÏ Cuµc Phø Bän"91203)                        
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffThüy Lao Phø Bän"91204)                        
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffYªn TØ Phø Bän"91205)                        
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffLâu Lan T¥m Bäo"91206)                        
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffTân Tam Hoàn"91207)                        
                
    AddNumText(sceneIdx399998_g_scriptId,"#c00ffffTân Thiªu Th¤t S½n Phiêu Mi­u"91208)                        
                if 
    isNPC==0 then
                    AddNumText
    (sceneIdx399998_g_scriptId,"Quay lÕi"88888)
                
    end
            EndEvent
    (sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key==1201 then
            x399998_GoTo
    (sceneId,selfId,4583233)--BOSS¿¨ÕÙ»½µØͼ
        
    elseif key==1202 then
            x399998_GoTo
    (sceneId,selfId,2160160)--õí¾Ï¸±±¾
        
    elseif key==1203 then
            x399998_GoTo
    (sceneId,selfId,2430234)--Æå¾Ö¸±±¾
        
    elseif key==1204 then
            x399998_GoTo
    (sceneId,selfId,1339310)--Ë®Àθ±±¾
        
    elseif key==1205 then
            x399998_GoTo
    (sceneId,selfId,470121)--Ñà×Ó¸±±¾
        
    elseif key==1206 then
            x399998_GoTo
    (sceneId,selfId,18616275)--Â¥À¼Ñ°±¦
        
    elseif key==1207 then
            x399998_GoTo
    (sceneId,selfId,18629066)--ÐÂÈý»·
        
    elseif key==1208 then
            x399998_GoTo
    (sceneId,selfId,1581482)--ÐÂÉÙÊÒɽƮÃì
        end
    end
    --**********************************
    --
    ´«Ë͹¦ÄÜ
    --**********************************
    function 
    x399998_GoTosceneIdselfIdtoSceneIdx)
        -- 
    ¼ì²âÍæ¼ÒÉíÉÏÊDz»ÊÇÓС°ÒøƱ¡±Õâ¸ö¶«Î÷£¬ÓоͲ»ÄÜʹÓÃÕâÀïµÄ¹¦ÄÜ
        
    if GetItemCount(sceneIdselfIdx210504_g_Yinpiao)>=1  then
            BeginEvent
    sceneId )
                
    AddTextsceneId"  Xin thÑ l²i trên ng߶i các hÕ ðang giæ ngân phiªu, chÕy thß½ng nhân! Ta không th¬ giúp ðßþc." )
            
    EndEventsceneId )
            
    DispatchEventListsceneIdselfIdtargetId )
            return
        
    end
        
    if sceneId~=and sceneId~=and sceneId~=and sceneId~=16 and sceneId~=14 and sceneId~=and sceneId~=17 and sceneId~=13 and sceneId~=15 and sceneId~=12 and sceneId~=11 and sceneId~=10 and sceneId~=380 and sceneId~=186 then
            x399998_Tips
    sceneIdselfId"Ngß½i ðang · khu vñc không th¬ sØ døng chÑc nång này, sau khi tr· v« thành r°i hãy sØ døng lÕi!" )
            
    x399998_CloseMe(sceneIdselfId)
            return
        
    end
        CallScriptFunction
    ( (400900), "TransferFunc"sceneIdselfIdtoSceneIdx)
    end
    --**********************************
    --
    ·µ»ØÖ÷Ò³
    --**********************************
    function 
    x399998_BackToIndexsceneIdselfId )
        
    x399999_OnDefaultEventsceneIdselfId, -)
    end
    --**********************************
    --
    Íæ¼ÒÆÁÄ»ÖмäÌáʾ
    --**********************************
    function 
    x399998_TipssceneIdselfIdstr )
        
    BeginEventsceneId )
            
    AddTextsceneIdstr )
        
    EndEventsceneId )
        
    DispatchMissionTipssceneIdselfId )
    end

    --**********************************
    --
    ¶Ô»°´°¿ÚÐÅÏ¢Ìáʾ
    --**********************************
    function 
    x399998_MsgBoxsceneIdselfIdmsg )
        
    BeginEventsceneId )
            
    AddTextsceneIdmsg )
        
    EndEventsceneId )
        
    DispatchEventListsceneIdselfId, -)
    end
    --**********************************
    --
    ¹Ø±Õ¶Ô»°¿ò
    --**********************************
    function 
    x399998_CloseMe(sceneIdselfId)
        
    BeginUICommand(sceneId)
        
    EndUICommand(sceneId)
        
    DispatchUICommand(sceneId,selfId1000)
    end
    --**********************************
    --
    ±¦Ê¯¹¦ÄÜ
    --**********************************
    function 
    x399998_BaoShi(sceneId,selfId)
        if 
    GetNumText()==300 then
            BeginEvent
    (sceneId)
                
    AddText(sceneId"#G  Ngß½i có th¬ ðem m¤y viên Bäo ThÕch gi¯ng nhau hþp thành 1 viên Bäo ThÕch cao h½n 1 c¤p, ðem nguyên li®u cüa m¤y viên c¤p th¤p hþp thành 1 nguyên li®u cao h½n 1 c¤p, cûng có th¬ khoan l² khäm Bäo ThÕch lên trang b¸, cûng có th¬ gÞ bö Bäo ThÕch")
                --
    AddNumText(sceneIdx399998_g_scriptId,"Khoan ba l² cho trang b¸"5301)
                
    AddNumText(sceneIdx399998_g_scriptId,"Trang B¸ Khoan"5302)
                
    AddNumText(sceneIdx399998_g_scriptId,"Bäo ThÕch Hþp Thành"5303)
                
    AddNumText(sceneIdx399998_g_scriptId,"Khäm Bäo ThÕch"5306)
                
    AddNumText(sceneIdx399998_g_scriptId,"Tháo gÞ Bäo ThÕch"5304)
                
    AddNumText(sceneIdx399998_g_scriptId,"Nguyên li®u hþp thành"5305)
                
    AddNumText(sceneIdx399998_g_scriptId,"Ðiêu trác Bäo ThÕch"5307)
                
    AddNumText(sceneIdx399998_g_scriptId,"Bäo ThÕch Dung Luy®n"5308)
                
    AddNumText(sceneIdx399998_g_scriptId,"Quay lÕi"88888)
            
    EndEvent(sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    GetNumText()==301 then
            local tEquipGemTable 
    = { 01234567121415}--8 thú cßÞi,17 ám khí
            local bagbegin 
    GetBasicBagStartPos(sceneIdselfId)
            
    local bagend GetBasicBagEndPos(sceneIdselfId)        
            for 
    i=bagbeginbagend do
                
    local itemIndex LuaFnGetItemTableIndexByIndexsceneIdselfId)            
                if 
    itemIndex>0 then
                    local ret 
    LuaFnIsItemLockedsceneIdselfId)
                    if 
    ret ~= 0 then
                        
    return
                    
    end    
                    local EquipType 
    LuaFnGetBagEquipTypesceneIdselfId)                
                    
    local find 0
                    
    for jgem in tEquipGemTable do
                        if 
    gem == EquipType then
                            find 
    1
                        end
                    end
                    
    if find == 1 then    
                        local equipMaxGemCount 
    GetBagGemCountsceneIdselfId)                    
                        while 
    equipMaxGemCount<do                
                            
    local ret AddBagItemSlotsceneIdselfId)
                            
    equipMaxGemCount GetBagGemCountsceneIdselfId)            
                        
    end
                    end
                end
            end
            x399998_MsgBox
    sceneIdselfId"#Y    T¤t cä trang b¸ cüa các hÕ ðã ðßþc khoan [#R3#Y] l²." )
        elseif 
    GetNumText()==302 then
            BeginUICommand
    sceneId )
            
    UICommand_AddIntsceneIdselfId )
            
    UICommand_AddIntsceneId)--type£¬µã½ðÖ®¼ý
            EndUICommand
    sceneId )
            
    DispatchUICommandsceneIdselfId75117 )
        elseif 
    GetNumText()==303 then
            BeginUICommand
    sceneId )
            
    UICommand_AddIntsceneIdselfId )
            
    EndUICommandsceneId )
            
    DispatchUICommandsceneIdselfId23 )
        elseif 
    GetNumText()==304 then
            BeginUICommand
    sceneId )
            
    UICommand_AddIntsceneIdselfId )
            
    EndUICommandsceneId )
            
    DispatchUICommandsceneIdselfId27 )
        elseif 
    GetNumText()==305 then
            BeginUICommand
    sceneId )
            
    UICommand_AddIntsceneIdselfId )
            
    EndUICommandsceneId )
            
    DispatchUICommandsceneIdselfId19810424 )
        elseif 
    GetNumText()==306 then
            BeginUICommand
    sceneId )
            
    UICommand_AddIntsceneIdselfId )
            
    EndUICommandsceneId )
            
    DispatchUICommandsceneIdselfId19830424 )
        elseif 
    GetNumText()==307 then
            BeginUICommand
    sceneId )
            
    UICommand_AddIntsceneIdselfId )
            
    EndUICommandsceneId )
            
    DispatchUICommandsceneIdselfId112236 )
        elseif 
    GetNumText()==308 then
            BeginUICommand
    sceneId )
            
    UICommand_AddIntsceneIdselfId )
            
    EndUICommandsceneId )
            
    DispatchUICommandsceneIdselfId112237 )
        
    end
    end

    --**********************************
    --
    ËæÉí¹¦ÄÜ
    --**********************************
    function 
    x399998_SuiShen(sceneId,selfId,key,isNPC)
        if 
    key==0 then
            key
    =GetNumText()    
        
    end
                    
    --AddNumText(sceneIdx399998_g_scriptId,"#RLînh thß·ng theo ðÆng c¤p"6130)

                --
    AddNumText(sceneIdx399998_g_scriptId,"#c0066ffNh§n 500.000 KNB"5107)    
                --
    AddNumText(sceneIdx399998_g_scriptId,"#c0066ffNh§n 1500 Vàng"5106)            

        if 
    key==100 then
            BeginEvent
    (sceneId)
                if 
    isNPC==0 then
                AddText
    (sceneId"#G    Các chÑc nång t±ng hþp")
                else
                
    AddText(sceneId"#G  Trinh xin chào các anh các ch¸! #r  #YXin m¶i lña ch÷n chÑc nång c¥n sØ døng!")
                
    end
                

            
                AddNumText
    (sceneIdx399998_g_scriptId,"#b#GNh§n 5000 Vàng"5109)            
                
    AddNumText(sceneIdx399998_g_scriptId,"#b#Gбi vàng thành KNB"4120)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RThß½ng kh¯"5102)
                
    AddNumText(sceneIdx399998_g_scriptId,"#c0066ffNh§n ði¬m khyªch trß½ng"6101)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RSØa l²i EXP"6104)
                
    AddNumText(sceneIdx399998_g_scriptId,"#RGiäi tr× trÕng thái tàu v§n - out bang"6108)
                --
    AddNumText(sceneIdx399998_g_scriptId,"#RThông báo"1103)    
                
    AddNumText(sceneIdx399998_g_scriptId,"#RNews"2103)    
                if 
    isNPC==0 then
                    AddNumText
    (sceneIdx399998_g_scriptId,"Quay lÕi"88888)
                
    end            
            EndEvent
    (sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key== 109 then
                local day 
    GetDayTime();
                
    local lastDay GetMissionData(sceneIdselfIdAddMoneyJZ );
                if 
    lastDay == day then
                BeginEvent
    sceneId )
                
    AddTextsceneId"#gffff00Chào bÕn, hôm nay bÕn ðã sØ døng chÑc nång này. M²i ngày chï ðßþc dùng chÑc nång này mµt l¥n. #rHãy quay lÕi vào hôm sau." )
                
    EndEventsceneId )
                
    DispatchEventListsceneIdselfIdtargetId )
                return
                
    end
                AddMoneyJZ
    sceneIdselfId50000000 )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#HChúc m×ng #cFF0000"..nam.." #Hðã nh§n Vàng thành công!")
                
    SetMissionData(sceneIdselfIdAddMoneyJZday);

            
    BeginEvent(sceneId)
            
    local    nam    LuaFnGetNamesceneIdselfId )
                
    AddText(sceneId,"#HChúc m×ng #cFF0000"..nam.." #Hðã nh§n thành công #G#{_EXCHG50000000}#H. Cám ½n ðã üng hµ #e0e8de5#c00ffffTh¥n Kiªm.")
            
    EndEvent(sceneId)
            
    DispatchEventList(sceneId,selfId,targetId)
            
        elseif 
    key==108  then
            LuaFnCancelSpecificImpact
    (sceneId,selfId,59)
            
    LuaFnCancelSpecificImpact(sceneId,selfId,113)
            
    LuaFnCancelSpecificImpact(sceneId,selfId,200)
            
    LuaFnCancelSpecificImpact(sceneId,selfId,33815)
            
    x399998_CloseMe(sceneIdselfId)
        elseif 
    key==107  then
            local getYB
    =500000;
            
    YuanBao(sceneId,selfId,targetId,1,getYB)
            
    x399998_TipssceneIdselfId"Chúc m×ng các hÕ nh§n thành công "..getYB.." KNB" )
            
    x399998_CloseMe(sceneIdselfId)
        elseif 
    key==106  then
            
    --local getYB=500000;
            
    AddMoney(sceneId,selfId,50000000)
            
    x399998_TipssceneIdselfId"Chúc m×ng các hÕ nh§n thành công 5000 Vàng" )
            
    x399998_CloseMe(sceneIdselfId)

        elseif 
    key==105  then
            BeginEvent
    sceneId )
                
    LuaFnSendSpecificImpactToUnit(sceneId,selfId,selfId,selfId,18,1000)
                for 
    0,1000  do
                    
    AddExp(sceneId,selfId,GetExp(sceneId,selfId)*-1)
                
    end
                AddText
    (sceneId,"Xin chúc m×ng, kinh nghi®m cüa các hÕ ðã tr· v« bình th߶ng!")
            
    EndEventsceneId )
            
    DispatchEventListsceneIdselfId, -)
        elseif 
    key==104  then
            BeginEvent
    sceneId )
            
    AddTextsceneId"ChÑc nång này giäi quyªt tình trÕng âm EXP ho£c do các hÕ dß EXP quá nhi«u dçn ðªn l²i." )
            
    AddNumText(sceneIdx399998_g_scriptId"Ðúng ta mu¯n sØa"12105 )
            
    AddNumText(sceneIdx399998_g_scriptId,"Ta không c¥n"88888)
            
    EndEventsceneId )
            
    DispatchEventListsceneIdselfId, -)
        elseif 
    key==103  then
            CallScriptFunction
    110001"OnDefaultEvent"sceneIdselfId )
        elseif 
    key==102  then
            
    if sceneId==or sceneId==or sceneId==or sceneId==186 then
                BankBegin
    (sceneIdselfIdselfId)                
            else
                
    x399998_TipssceneIdselfId"Chï có th¬ sØ døng ti«n trang t× xa tÕi 4 thành th¸ l¾n." )
                
    x399998_CloseMe(sceneIdselfId)
            
    end        
        
    elseif key==101  then
        BeginAddItem
    (sceneId)
            
    AddItemsceneId39910007)
        
    EndAddItem(sceneId,selfId)
        
    AddItemListToHuman(sceneId,selfId)

        elseif 
    key==120  then
            BeginEvent
    (sceneId)
                
    AddText(sceneId,"#G    — ðây, ngß½i có th¬ ð±i vàng thành KNB. #rTï l® ð±i: #e6f00c7#c00ffff[#R#{_EXCHG1000}#c00ffff] : [#R10#c00ffffKNB]")
                
    AddNumTextsceneIdx399998_g_scriptId"#c00ffffB¡t ð¥u ð±i"6121 )
                
    AddNumTextsceneIdx399998_g_scriptId"Không c¥n"89999 )
            
    EndEvent(sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key==121  then
            BeginUICommand
    sceneId )
                
    UICommand_AddIntsceneIdselfId )
            
    EndUICommandsceneId )
            
    DispatchUICommandsceneIdselfId5430 )
        elseif 
    key==130  then
            BeginEvent
    (sceneId)
                
    AddText(sceneId,"    #GKhi ðü c¤p ðµ, các hÕ có th¬ ðªn n½i này ð¬ nh§n thß·ng! Chúc các hÕ ch½i game vui vë!")
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 10"5131 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 100 [10W] di¬m t£ng"5132 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 130 [15W] di¬m t£ng"5133 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 140 [20W] di¬m t£ng"5134 )
                ---
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 150 [30W] di¬m t£ng"5135 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 160 [50W] di¬m t£ng"5136 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 170 [60W] di¬m t£ng"5137 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 180 [70W] di¬m t£ng"5138 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 190 [80W] di¬m t£ng"5139 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 200 [90W] di¬m t£ng"5140 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 210 [100W] di¬m t£ng"5141 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 220 [200W] di¬m t£ng"5142 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 230 [300W] di¬m t£ng"5143 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 240 [400W] di¬m t£ng"5144 )
                --
    AddNumTextsceneIdx399998_g_scriptId"#gFF3E96Lînh thß·ng c¤p 250 [500W] di¬m t£ng"5145 )
                if 
    isNPC==0 then
                    AddNumText
    (sceneIdx399998_g_scriptId,"Quay lÕi"88888)
                
    end
            EndEvent
    (sceneId)
            
    DispatchEventList(sceneId,selfId,-1)
        elseif 
    key==145  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<250 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 250 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL250 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    SetMissionDatasceneIdselfIdDANJIAN_JL250)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 250 thành công ðßþc: #G[500W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==144  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<240 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 240 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL240 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    SetMissionDatasceneIdselfIdDANJIAN_JL240)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 240 thành công ðßþc: #G[400W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==143  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<230 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 230 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL230 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,3000000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL230)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 230 thành công ðßþc: #G[300W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==142  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<220 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 220 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL220 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,2000000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL220)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 220 thành công ðßþc: #G[200W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==141  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<210 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 210 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL210 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,1000000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL210)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 210 thành công ðßþc: #G[100W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==140  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<200 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 200 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL200 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,900000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL200)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 200 thành công ðßþc: #G[90W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==139  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<190 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 190 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL190 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,800000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL190)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 190 thành công ðßþc: #G[80W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==138  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<180 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 180 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL180 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,700000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL180)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 180 thành công ðßþc: #G[70W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==137  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<170 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 170 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL170 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,600000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL170)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 170 thành công ðßþc: #G[60W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==136  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<160 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 160 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL160 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,500000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL160)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 160 thành công ðßþc: #G[50W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==135  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<150 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 150 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL150 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,300000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL150)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 150 thành công ðßþc: #G[30W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==134  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<140 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 140 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL140 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,200000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL140)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 140 thành công ðßþc: #G[20W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==133  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<130 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 130 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL130 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,150000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL130)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 130 thành công ðßþc: #G[15W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==132  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<100 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 100 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL100 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                
    YuanBao(sceneId,selfId,targetId,1,100000)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL100)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 100 thành công ðßþc: #G[10W] ði¬m t£ng#W. Cám ½n các hÕ ðã üng hµ, chúc các hÕ ch½i game vui vë!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==131  then
            local    lev    
    GetLevelsceneIdselfId )
            if 
    lev<10 then
                x399998_Tips
    sceneIdselfId"C¤p ðµ không ðü, khi nào ðªn 80 c¤p hãy ðªn tìm ta." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            
    end
            local index 
    =    GetMissionDatasceneIdselfIdDANJIAN_JL10 )
            if 
    index == 1 then
                x399998_Tips
    sceneIdselfId"Xin l²i! các hÕ ðã nh§n ph¥n thß·ng này r°i." )
                
    x399998_CloseMe(sceneIdselfId)
                return
            else
                --
    YuanBao(sceneId,selfId,targetId,1,50000)
                
    BeginAddItem(sceneId)

                
    AddItemsceneId10141030)
                
    AddItemsceneId10157001)
                
    AddItemsceneId10155001)
                
    AddItemsceneId30008059)
                
    EndAddItem(sceneId,selfId)
                
    AddItemListToHuman(sceneId,selfId)
                
    SetMissionDatasceneIdselfIdDANJIAN_JL10)
                
    x399998_TipssceneIdselfId"Chúc m×ng, nh§n ph¥n thß·ng c¤p 10 thành công!" )
                
    x399998_CloseMe(sceneIdselfId)
            
    end
        
    elseif key==132  then
            
        end
    end

    --**********************************
    --
    Vat pham nhan khi gia nhap mon phai
    --**********************************
    function 
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,menpaiId)
        
    local qishu=0
        local zuoqi
    =0
        
    if menpaiId ==0 then
            qishu
    =30308081
            zuoqi
    =10149024
        
    elseif menpaiId ==1 then
            qishu
    =30308080
            zuoqi
    =10149029
        
    elseif menpaiId ==2 then
            qishu
    =30308079
            zuoqi
    =10149025
        
    elseif menpaiId ==3 then
            qishu
    =30308084
            zuoqi
    =10149023
        
    elseif menpaiId ==4 then
            qishu
    =30308078
            zuoqi
    =10149022
        
    elseif menpaiId ==5 then
            qishu
    =30308086
            zuoqi
    =10149028
        
    elseif menpaiId ==6 then
            qishu
    =30308082
            zuoqi
    =10149027
        
    elseif menpaiId ==7 then
            qishu
    =30308083
            zuoqi
    =10149021
        
    elseif menpaiId ==8 then
            qishu
    =30308085
            zuoqi
    =10149026
        
    elseif menpaiId ==9 then
            qishu
    =39920006
            zuoqi
    =10149035
        end
        BeginAddItem
    (sceneId)
            
    AddItemsceneIdqishu)
            
    AddItemsceneIdzuoqi)
        
    EndAddItem(sceneId,selfId)
        
    AddItemListToHuman(sceneId,selfId)
    end

    --**********************************
    --
    ¼ÓÈëÃÅÅɼì²é
    --**********************************
    function 
    x399998_CheckJiaRuMenPai(sceneId,selfId)
        
    local index =    GetMissionDatasceneIdselfIdMY_JIARUMENPAI )
        if 
    index ==0 then
            
    return 1
        
    else
            if 
    LuaFnGetAvailableItemCount(sceneIdselfId39910006) >= 1 then
                
    return 1
            
    else
                
    x399998_MsgBoxsceneIdselfId"    #b#YBÕn ðã gia nh§p môn phái, nªu mu¯n thay ð±i c¥n #GMôn Phái Chuy¬n Hoán L®nh#Y!" )
                return 
    0
            end
        end
        
    end

    --**********************************
    --
    Ch÷n mon phái
    --**********************************
    function 
    x399998_JiaRuMenPai(sceneId,selfId,key)
        if 
    key==0 then
            key
    =GetNumText()
        
    end
        
    if key == 200 then
            
    if LuaFnGetAvailableItemCount(sceneIdselfId39910006) >= 1 then
            BeginEvent
    sceneId )
                
    AddText(sceneId,"  Xin chào các hÕ Õ! m¶i các hÕ lña ch÷n môn phái mu¯n chuy¬n")
                
    AddText(sceneId,"Chú ý: c¥n môn phái chuy¬n hoán l®nh, khi ð±i môn phái t¤t cä tâm pháp v« 20.")
                --
    AddTextsceneId"    #b#YCác tân thü ch÷n môn phái mu¯n gia nh§p tÕi ðây. Nªu mu¯n thay ð±i môn phái thì ðªn nguyên bäo thß½ng ðiªm mua #GMôn phái chuy¬n hoán l®nh#Y." )
                --
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Mµ Dung",3,201 )
                
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Tinh Túc",3,202 )
                
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Tiêu Dao",3,203 )
                
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Thiªu Lâm",3,204 )
                
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Thiên S½n",3,205 )
                
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Thiên Long",3,206 )        
                
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Võ Ðang",3,207 )
                
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Minh Giáo",3,208 )
                
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Cái Bang",3,209 )
                
    AddNumTextsceneIdx399998_g_scriptId"#RGia nh§p Môn phái Nga My",3,210 )
                
    AddNumText(sceneIdx399998_g_scriptId,"Quay lÕi"88888)
            
    EndEventsceneId )
            
    DispatchEventListsceneIdselfId, -)
            else
            
    BeginEvent(sceneId)
                
    AddText(sceneId"#GNgß½i không có Môn phái chuy¬n hoán l®nh")
            
    EndEvent(sceneId)
            
    DispatchEventList(sceneId,selfId,targetId
            
    end        
        
    elseif key == 201  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId9)
                
    LuaFnSetXinFaLevel(sceneId,selfId,64,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,65,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,66,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,67,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,68,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,69,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,70,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,71,20)
                
    AddSkill(  sceneIdselfId200)
                --
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,9)
                
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);            
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #GMµ Dung Thª Gia#B. Thêm môn hÕ m¾i gia nh§p #GMµ Dung Thª Gia#B ngày càng l¾n mÕnh h½n trß¾c!")    
            
    end
        
    elseif key == 202  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId5)
                
    LuaFnSetXinFaLevel(sceneId,selfId,31,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,32,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,33,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,34,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,35,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,36,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,60,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,77,20)
                
    AddSkill(  sceneIdselfId28)
                --
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,5)
                
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #GTinh Túc#B. Thêm môn hÕ m¾i gia nh§p #GTinh Túc#B ngày càng l¾n mÕnh h½n trß¾c!")
            
    end
        
    elseif key == 203  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId8)
                
    LuaFnSetXinFaLevel(sceneId,selfId,49,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,50,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,51,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,52,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,53,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,54,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,63,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,80,20)
                
    AddSkill(  sceneIdselfId31)
                --
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,8)
                
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #GTiêu Dao#B. Thêm môn hÕ m¾i gia nh§p #GTiêu Dao#B ngày càng l¾n mÕnh h½n trß¾c!")
            
    end
        
    elseif key == 204  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId0)
                
    LuaFnSetXinFaLevel(sceneId,selfId,1,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,2,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,3,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,4,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,5,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,6,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,55,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,72,20)
                
    AddSkill(  sceneIdselfId23)
                --
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,0)
                
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #GThiªu Lâm#B. Thêm môn hÕ m¾i gia nh§p #GThiªu Lâm#B ngày càng l¾n mÕnh h½n trß¾c!")
            
    end
        
    elseif key == 205  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId7)
                
    LuaFnSetXinFaLevel(sceneId,selfId,43,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,44,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,45,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,46,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,47,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,48,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,62,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,79,20)
                
    AddSkill(  sceneIdselfId30)
                --
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,7)
                
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #GThiên S½n#B. Thêm môn hÕ m¾i gia nh§p #GThiên S½n#B ngày càng l¾n mÕnh h½n trß¾c!")
            
    end
        
    elseif key == 206  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId6)
                
    LuaFnSetXinFaLevel(sceneId,selfId,37,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,38,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,39,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,40,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,41,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,42,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,61,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,78,20)
                
    AddSkill(  sceneIdselfId29)
                
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,6)
                --
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #GThiên Long#B. Thêm môn hÕ m¾i gia nh§p #GThiên Long#B ngày càng l¾n mÕnh h½n trß¾c!")
            
    end
        
    elseif key == 207  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId3)
                
    LuaFnSetXinFaLevel(sceneId,selfId,19,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,20,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,21,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,22,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,23,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,24,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,58,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,75,20)
                
    AddSkill(  sceneIdselfId26)
                --
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,3)
                
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #GVõ Ðang#B. Thêm môn hÕ m¾i gia nh§p #GVõ Ðang#B ngày càng l¾n mÕnh h½n trß¾c!")
            
    end
        
    elseif key == 208  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId1)
                
    LuaFnSetXinFaLevel(sceneId,selfId,7,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,8,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,9,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,10,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,11,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,12,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,56,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,73,20)
                
    AddSkill(  sceneIdselfId24)
                --
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,1)
                
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #GMinh Giáo#B. Thêm môn hÕ m¾i gia nh§p #GMinh Giáo#B ngày càng l¾n mÕnh h½n trß¾c!")
            
    end
        
    elseif key == 209  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId2)
                
    LuaFnSetXinFaLevel(sceneId,selfId,13,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,14,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,15,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,16,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,17,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,18,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,57,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,74,20)
                
    AddSkill(  sceneIdselfId25)
                --
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,2)
                
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #Cái Bang#B. Thêm môn hÕ m¾i gia nh§p #GNga My#B ngày càng l¾n mÕnh h½n trß¾c!")
            
    end
        
    elseif key == 210  then
            
    if x399998_CheckJiaRuMenPai(sceneId,selfId) == 1 then
                LuaFnJoinMenpai
    (sceneIdselfIdselfId4)
                
    LuaFnSetXinFaLevel(sceneId,selfId,25,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,26,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,27,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,28,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,29,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,30,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,59,20)
                
    LuaFnSetXinFaLevel(sceneId,selfId,76,20)
                
    AddSkill(  sceneIdselfId27)
                --
    x399998_JiaRuMenPaiAddItem(sceneId,selfId,4)
                
    LuaFnDelAvailableItem(sceneId,selfId,39910006,1)
                
    LuaFnSendSpecificImpactToUnit(sceneIdselfIdselfIdselfId1480)
                
    SetMissionData(sceneIdselfIdMY_JIARUMENPAI1);
                
    x399998_MsgBoxsceneIdselfId"#YXin chúc m×ng các hÕ gia nh§p môn phái thành công, chúc các hÕ ch½i game vui vë!" )
                
    local    nam    LuaFnGetNamesceneIdselfId )
                
    BroadMsgByChatPipesceneIdselfId"#BChúc m×ng #Y"..nam.." #Bträi qua nhi«u l¥n khäo hÕch, ðã ðßþc nh§n làm ð® tØ #GNga My#B. Thêm môn hÕ m¾i gia nh§p #GNga My#B ngày càng l¾n mÕnh h½n trß¾c!")
            
    end
        end
    end
    --**********************************
    --
    Vàng to KNB
    --**********************************
    function 
    x399998_GoldToZDsceneIdselfIdtoZDNum)
        
    local needMoney=toZDNum*100;
        
    local   SelfMoneyJZ GetMoneyJZ (sceneIdselfId)
        
    local    SelfMoney   GetMoney   (sceneIdselfId)
        if (
    SelfMoney SelfMoneyJZ <needMoneythen
            local sMessage 
    format("#Y    Không ðü ngân lßþng, vui lòng ki¬m tra lÕi!")
            
    x399999_MsgBoxsceneIdselfIdsMessage )
            return
        
    end
        local reply 
    LuaFnCostMoneyWithPriority(sceneId,selfId,needMoney)
        if 
    reply == -1 then
            local sMessage 
    format("#Y    Không ðü ngân lßþng, vui lòng ki¬m tra lÕi!")
            
    x399999_MsgBoxsceneIdselfIdsMessage )
            return
        else
            
    local result =    YuanBao(sceneId,selfId,targetId,1,toZDNum)
            
    local sMessage format("#YChúc m×ng trao ð±i thành công#rTiêu hao [#R#{_EXCHG%d}#Y]#rNh§n ðßþc [#R%d KNB]",needMoney,toZDNum)
            
    x399999_MsgBoxsceneIdselfIdsMessage )
        
    end
    end 
    Mạo mụi share cái code đa chức năng,
    Hướng dẫn sơ qua:
    Chỉnh tất cả các số 399998 thành ID của NPC bạn cần trỏ tới
    Code này để học chắc ngỏm củ tỏi luôn. Code này thật sự rất khó hiểu vì nó được gọi tới từ cái script khác. Thay nguyên ID cũng không chạy nổi trừ khi edit cả bên script gọi tới nó
    Khách viếng thăm hãy cùng Sói Đẹp Trai xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  6. #16
    Thành Viên skythienlong's Avatar
    Ngày tham gia
    Apr 2014
    Bài viết
    628
    Thanks
    209
    Thanked 324 Times in 165 Posts

    Ðề: NPc Nhận Thưởng

    code này giống Tùy thân bảo thạch của tàu hơi khác 1 chút

    cái đoạn này nghĩa là gì vậy
    Code:
    x399998_g_MaxBagSize    = 60
    Lần sửa cuối bởi skythienlong, ngày 07-09-14 lúc 09:05 AM.
    Khách viếng thăm hãy cùng skythienlong xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  7. #17
    Super Moderator Sói Đẹp Trai's Avatar
    Ngày tham gia
    Apr 2011
    Đang ở
    地獄
    Bài viết
    3,991
    Thanks
    369
    Thanked 4,069 Times in 1,403 Posts

    Ðề: NPc Nhận Thưởng

    Trích dẫn Gửi bởi skythienlong [Only registered and activated users can see links. ]
    code này giống Tùy thân bảo thạch của tàu hơi khác 1 chút

    cái đoạn này nghĩa là gì vậy
    Code:
    x399998_g_MaxBagSize    = 60
    Ô thường để vật phẩm là Đạo Cụ và Nguyên liệu. ĐC: 0->29, NL: 30->59
    =>Tự hiểu cái giá trị kia
    Khách viếng thăm hãy cùng Sói Đẹp Trai xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  8. Các thành viên gởi lời cảm ơn đến Sói Đẹp Trai vì bài viết này !

    skythienlong (07-09-14)

 

 
Trang 2 của 2 Đầu tiênĐầu tiên 1 2

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •  
Múi giờ GMT +7. Bây giờ là 06:10 PM.
vBulletin®, Copyright ©2000-2011, Jelsoft Enterprises Ltd.
CLBGamesVN không chịu trách nhiệm về Luật Bản Quyền của các tài liệu, bài viết v.v...được đăng tải trên diễn đàn này.
Diễn đàn phát triển dưới sự đóng góp của tất cả thành viên. BQT chỉ là những người thành lập ra sân chơi, quản lý và duy trì về mặt kỹ thuật, nội dung khi hợp lệ.