[TLBB] Hướng Dẫn Sửa Shop Hoàn Chỉnh
Hello & Welcome to our community. Is this your first visit? Đăng Ký
Follow us on
Follow us on Facebook Follow us on Twitter Linked In Flickr Watch us on YouTube My Space Blogger
 
Kết quả 1 đến 7 của 7
  1. #1
    Thành Viên
    Ngày tham gia
    Aug 2012
    Đang ở
    Hà Nội . Bán Server+clien tlbb new.Liên Hệ [email protected]
    Bài viết
    48
    Thanks
    77
    Thanked 41 Times in 15 Posts

    Icon1 Hướng Dẫn Sửa Shop Hoàn Chỉnh

    Công Cụ Cần Thiết :
    AXPPacker .
    - Chuẩn Bị các File Cần Thiết :
    + YuanbaoShop.lua -- Lấy được bằng cách dùng AXPPacker mở file trong Clien Data/Interface.axp . Và Tìm folder YuanbaoShop
    + yuanbaoshop.lua -- Trong Server đường dẫn home/tlbb/Public/Data/event/prize/
    + Shoptable.txt -- Trong Server đường dẫn home/tlbb/Public/Config
    + CommonItem.txt -- Trong Server đường dẫn home/tlbb/Public/Config
    + EquipBase.txt -- Trong Server đường dẫn home/tlbb/Public/Config
    + Geminfo.txt -- Trong Server đường dẫn home/tlbb/Public/Config

    Bắt đầu :
    * Mở 2 file yuanbaoshop.lua và YuanbaoShop.lua :
    File YuanbaoShop.lua là lấy từ clien dùng để hiển thị trong game

    Ở Dưới Shop 1 - 1 tên trong clien là Nhiệt Mại Thương Phẩm 1 - Và Tên Shop trong server là 217

    [Only registered and activated users can see links. ]

    ** Mở File Shoptable.txt tìm đến shop ID số 217

    [Only registered and activated users can see links. ]

    *** Ở Đây shop 217
    Sử dụng loại tiền Tệ là Điểm Môn Phái (7) - Item đầu tiên ID là 30008018 . Số Lượng 1 . Giá 800 . Bán với 100% giá .

    [Only registered and activated users can see links. ]

    **** Bạn Mở File Commonitem.txt sear 30008018 ta có Item tên là Thanh Tâm Đan .

    [Only registered and activated users can see links. ]


    *** Tổng Kết lại : Shop trong game tên là Nhiệt Mại Thương Phẩm 1 - sẽ hiển thị Shop số 217 trong server - Item đầu tiên của nó là Thanh Tâm Đan giá 800 ĐMP .
    Lần sửa cuối bởi duc2071990, ngày 20-10-12 lúc 11:37 PM.
    Khách viếng thăm hãy cùng duc2071990 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  2. The Following 27 Users Say Thank You to duc2071990 For This Useful Post:

    akiem9x (17-03-13), anhcuti24 (06-02-15), billbin0506 (13-12-14), chuthikji (13-08-13), chymquoc (27-11-12), consautlbb (08-01-13), dinhdtd (15-12-14), dodt93 (08-05-13), dominhtuan2411 (24-06-13), dulong1 (11-12-15), emtapchoi (21-10-12), hoangdinhdo (21-10-12), locvn (29-12-12), longnhj1 (22-10-12), longpro22 (03-05-13), mastervnn (05-08-13), maxtest (30-01-15), photuong1994 (12-02-15), puskien (17-08-13), ronglam (07-11-12), Sadlove123 (11-07-15), saodzi (22-01-21), thanhluan.cklk (31-01-13), thutrang123 (04-08-13), tualua2010 (21-10-12), vuhuy99v (21-10-12), xaoemxauthe (06-01-13)

  3. #2
    Thành Viên doanlephuvinh9's Avatar
    Ngày tham gia
    Dec 2014
    Bài viết
    269
    Thanks
    39
    Thanked 34 Times in 30 Posts

    Icon2 Ðề: Hướng Dẫn Sửa Shop Hoàn Chỉnh

    Bácc nào cho mình hỏi sao mình add thêm shoplist lại không được,chỉ add được button của shoplist thôi,nhưng lại không mở được shop ...

    yuanbaoShop.lua trong sever,

    PHP Code:
    --еÄÔª±¦É̵ê

    x888902_g_scriptId 
    888902
    --Ôª±¦É̵êÁбí ÒªÓë¿Í»§¶Ë½çÃæ¶ÔÓ¦
    x888902_g_shoplist 
    = {}
    x888902_g_shoplist[1]    = {217242244244211213214149}                --´óÂô³¡
    x888902_g_shoplist
    [2]    = {178193188198193}            --±¦Ê¯É̳Ç,Ìí¼Ó"´óÀí±¦Ê¯Õ«--149",czf,2009.07.21
    x888902_g_shoplist
    [3]    = {194135152195}            --ÕäÊÞÉ̳Ç
    x888902_g_shoplist
    [4]    = {136137144}                --Äϱ±ÔÓ»õ
    x888902_g_shoplist
    [5]    = {120181145182134}            --ÐÎÏó¹ã³¡
    x888902_g_shoplist
    [6]    = {133133133133}                --»¨ÎèÈ˼ä
    x888902_g_shoplist
    [7]    = {146244271245}                        --Î书Ãؼ®
    x888902_g_shoplist
    [8]    = {156157158159160161162163}    --´òÔìͼ
    --x888902_g_shoplist[9]    = {217,217217217217217}            --ÎÒÒª¸üÇ¿´ó
    --x888902_g_shoplist[10]    = {217217217217217}            --ÎÒÒª¸üÓÐ÷ÈÁ¦
    --x888902_g_shoplist[11]    = {217,217217217217}            --ÎÒÒª´òÔ켫Ʒװ±¸
    --x888902_g_shoplist[12]    = {217217217217}                --ÎÒÒª´òÔ켫ƷÕäÊÞ
    --x888902_g_shoplist[13]    = {217144}                    --ÎÒÒªÒƶ¯µÄ¸ü¿ì
    --x888902_g_shoplist[14]    = {217217217217217}            --ÎÒÒªÏò±ðÈ˱í°×
    --x888902_g_shoplist[15]    = {217217217}                --ÎÒҪѧϰм¼ÄÜ

    --**********************************
    -- 
    ¼ì²é´ËËæÉíNPCµÄ¹¦ÄÜ
    -- opÊÇÇëÇóÀà±ð£¬±ÈÈç1´ú±íÔª±¦Ïà¹ØµÄËæÉí²Ù×÷¡­¡­
    --**********************************
    function 
    x888902_OpenYuanbaoShopsceneIdselfIdtargetId shopA ,shopB )

        
    local bCheck x888902_YuanbaoShopCheckOp(sceneId,selfId);
        
        if 
    bCheck 0 then
            
    if shopA and shopA 16 and x888902_g_shoplist[shopA][shopB] ~= nil then
                
    --PrintStr(x888902_g_shoplist[shopA][shopB])
                if 
    targetId == -1 then
                    DispatchYuanbaoShopItem
    sceneIdselfIdx888902_g_shoplist[shopA][shopB])
                else
                    
    DispatchNpcYuanbaoShopItemsceneIdselfIdtargetId x888902_g_shoplist[shopA][shopB])
                
    end
            end
        end
    end

    function x888902_YuanbaoShopCheckOp(sceneId,selfId)
        --
    µØ¸®
        
    if sceneId == 77 then 
            BroadMsgByChatPipe
    (sceneIdselfId"@*;SrvMsg;DBD: ChÑc nång này không th¬ sØ døng · Ð¸a Phü"0);
            return 
    0
        end
        
    --ÉúËÀÀÞ̨
        
    if sceneId == 410 then 
            BroadMsgByChatPipe
    (sceneIdselfId"@*;SrvMsg;DBD: N½i này không th¬ sØ døng chÑc nång ðßþc."0);
            return 
    0
        end
        
    --ÉÙÊÒɽ
        
    if sceneId == 530 then 
            BroadMsgByChatPipe
    (sceneIdselfId"@*;SrvMsg;DBD: N½i này không th¬ sØ døng chÑc nång ðßþc."0);
            return 
    0
        end
        
    --×é¶Ó¸úËæ
        local selfHasTeamFlag 
    LuaFnHasTeam(sceneIdselfId);
        if 
    selfHasTeamFlag and selfHasTeamFlag == 1 then
            local teamFollowFlag 
    IsTeamFollow(sceneId,selfId);
            
    local teamLeaderFlag LuaFnIsTeamLeader(sceneId,selfId);
            if 
    not teamLeaderFlag or not teamFollowFlag then
                
    return 0
            end
            
    if teamFollowFlag ~= and teamLeaderFlag ~= 1 then
                
    return 0
            end
        end
        
    --Ë«ÈËÆï³Ë
        local selfHasDRideFlag 
    LuaFnGetDRideFlag(sceneIdselfId);
        if 
    selfHasDRideFlag and selfHasDRideFlag == 1 then
            local selfIsDRideMountOwner 
    LuaFnIsDRideMountOwner(sceneIdselfId);
            if 
    not selfIsDRideMountOwner or selfIsDRideMountOwner ~= 1 then
                
    --´¦ÓÚË«ÈËÆï³Ë״̬£¬ÇÒÊDZ»¶¯µÄ£¬½»¸øÖ÷¶¯·½À´´¦Àí
                
    return 0
            end
        end
        
    --10¼¶ÒÔÉÏ
        local level 
    GetLevel(sceneId,selfId);
        if 
    nil == level or level 10 then
            BroadMsgByChatPipe
    (sceneIdselfId"@*;SrvMsg;DBD: ÐÕt c¤p 10 tr· lên m¾i có th¬ sØ døng chÑc nång này!"0);
            return 
    0
        
    else

            return 
    1
        end
        
    return 0
    end 
    YuanBaoShop.lua trong client ..

    PHP Code:
    local GOODS_BUTTONS_NUM 18;
    local GOODS_BUTTONS = {};
    local GOODS_DESCS = {};
    local GOOD_BAD    = {};

    local CU_MONEY            1    -- Ç®
    local CU_GOODBAD        
    2    -- ÉƶñÖµ
    local CU_MORALPOINT    
    3    -- Ê¦µÂµã
    local CU_TICKET            
    -- ¹ÙƱǮ
    local CU_YUANBAO        
    5    -- Ôª±¦
    local CU_ZENGDIAN        
    -- Ôùµã
    local CU_MENPAI_POINT        
    -- ÃÅÅɹ±Ï׶È
    local CU_MONEYJZ        
    -- ½»×Ó

    --±êÇ©Ò³Ë÷ÒýÖµ
    local ShopTabIdx 
    = {
        
    YuanBao     0,    --Ôª±¦É̵ê
        Bind        
    1,    --°ó¶¨Ôª±¦É̵ê
        GiftToken    
    2,    --·µÈ¯É̵ê
    }

    local SHOP_LIST_A = {};
    local SHOP_LIST_B = {};
    local SHOP_SEARCH_LIST ={};

    local SHOP_LIST_A_BIND = {};
    local SHOP_LIST_B_BIND = {};
    local SHOP_SEARCH_LIST_BIND ={};

    local SHOP_LIST_A_GIFTTOKEN = {};        --»õ±ÒÀàÐÍϵÄÒ»¼¶²Ëµ¥ Èç ´óÂô³¡ ±¦Ê¯É̳ǵÈ
    local SHOP_LIST_B_GIFTTOKEN 
    = {};        --»õ±ÒÀàÐÍϵĶþ¼¶²Ëµ¥ Èç ÐÂÆ·ÉϼܠµÈ
    local SHOP_SEARCH_LIST_GIFTTOKEN 
    ={};        --ËÑË÷²Ëµ¥

    local nPageNum 
    1;
    local maxPage 1;
    local objCared = -1;
    local lastA 0
    local lastB 
    0
    local lastA_Bind 
    0
    local lastB_Bind 
    0
    local lastSelect 
    0
    local lastSelect_Bind 
    0

    local lastA_GiftToken 
    0
    local lastB_GiftToken 
    0
    local lastSelect_GiftToken 
    0

    local maxChildShop 
    8
    local isCareObj 
    0

    --´æ´¢Ëæ»úÅÅÐòµÄË÷ÒýÖµ
    local    g_tOrderPool    
    = {};
    --
    µ±Ç°É̵êµÄÉÌÆ·ÊýÁ¿
    local    g_nTotalNum        
    0;

    local    g_changeTabFlag    0;
    local    g_tabIndex    0;        -- 0±íʾԪ±¦ --1±íʾ°ó¶¨Ôª±¦

    local g_YuanbaoShop_Frame_UnifiedXPosition
    ;
    local g_YuanbaoShop_Frame_UnifiedYPosition;

    function 
    YuanbaoShop_PreLoad()

        
    this:RegisterEvent("OPEN_YUANBAOSHOP");
        
    this:RegisterEvent("PLAYER_ENTERING_WORLD");
        
    this:RegisterEvent("UPDATE_BOOTH");
        
    this:RegisterEvent("OBJECT_CARED_EVENT");
        
    this:RegisterEvent("CLOSE_BOOTH");
        
    this:RegisterEvent("PLAYER_LEAVE_WORLD");
        
    this:RegisterEvent("TOGGLE_YUANBAOSHOP");
        
    this:RegisterEvent("UPDATE_YUANBAO");
        
    this:RegisterEvent("UPDATE_BIND_YUANBAO");
        
    this:RegisterEvent("UPDATE_GIFTTOKEN");
        
    this:RegisterEvent("UI_COMMAND");
        
    this:RegisterEvent("ADJEST_UI_POS")
        
    this:RegisterEvent("VIEW_RESOLUTION_CHANGED")
    end

    function YuanbaoShop_OnLoad()
        
    GOODS_BUTTONS[1] = YuanbaoShop_Item1;
        
    GOODS_BUTTONS[2] = YuanbaoShop_Item2;
        
    GOODS_BUTTONS[3] = YuanbaoShop_Item3;
        
    GOODS_BUTTONS[4] = YuanbaoShop_Item4;
        
    GOODS_BUTTONS[5] = YuanbaoShop_Item5;
        
    GOODS_BUTTONS[6] = YuanbaoShop_Item6;
        
    GOODS_BUTTONS[7] = YuanbaoShop_Item7;
        
    GOODS_BUTTONS[8] = YuanbaoShop_Item8;
        
    GOODS_BUTTONS[9] = YuanbaoShop_Item9;
        
    GOODS_BUTTONS[10]= YuanbaoShop_Item10;
        
    GOODS_BUTTONS[11]= YuanbaoShop_Item11;
        
    GOODS_BUTTONS[12]= YuanbaoShop_Item12;
        
    GOODS_BUTTONS[13]= YuanbaoShop_Item13;
        
    GOODS_BUTTONS[14]= YuanbaoShop_Item14;
        
    GOODS_BUTTONS[15]= YuanbaoShop_Item15;
        
    GOODS_BUTTONS[16]= YuanbaoShop_Item16;
        
    GOODS_BUTTONS[17]= YuanbaoShop_Item17;
        
    GOODS_BUTTONS[18]= YuanbaoShop_Item18;

        
    GOODS_DESCS[1] = YuanbaoShop_ItemInfo1_Text;
        
    GOODS_DESCS[2] = YuanbaoShop_ItemInfo2_Text;
        
    GOODS_DESCS[3] = YuanbaoShop_ItemInfo3_Text;
        
    GOODS_DESCS[4] = YuanbaoShop_ItemInfo4_Text;
        
    GOODS_DESCS[5] = YuanbaoShop_ItemInfo5_Text;
        
    GOODS_DESCS[6] = YuanbaoShop_ItemInfo6_Text;
        
    GOODS_DESCS[7] = YuanbaoShop_ItemInfo7_Text;
        
    GOODS_DESCS[8] = YuanbaoShop_ItemInfo8_Text;
        
    GOODS_DESCS[9] = YuanbaoShop_ItemInfo9_Text;
        
    GOODS_DESCS[10]= YuanbaoShop_ItemInfo10_Text;
        
    GOODS_DESCS[11]= YuanbaoShop_ItemInfo11_Text;
        
    GOODS_DESCS[12]= YuanbaoShop_ItemInfo12_Text;
        
    GOODS_DESCS[13]= YuanbaoShop_ItemInfo13_Text;
        
    GOODS_DESCS[14]= YuanbaoShop_ItemInfo14_Text;
        
    GOODS_DESCS[15]= YuanbaoShop_ItemInfo15_Text;
        
    GOODS_DESCS[16]= YuanbaoShop_ItemInfo16_Text;
        
    GOODS_DESCS[17]= YuanbaoShop_ItemInfo17_Text;
        
    GOODS_DESCS[18]= YuanbaoShop_ItemInfo18_Text;

        
    GOOD_BAD[1]  =     YuanbaoShop_ItemInfo1_GB;
        
    GOOD_BAD[2]  =     YuanbaoShop_ItemInfo2_GB;
        
    GOOD_BAD[3]  =     YuanbaoShop_ItemInfo3_GB;
        
    GOOD_BAD[4]  =     YuanbaoShop_ItemInfo4_GB;
        
    GOOD_BAD[5]  =     YuanbaoShop_ItemInfo5_GB;
        
    GOOD_BAD[6]  =     YuanbaoShop_ItemInfo6_GB;
        
    GOOD_BAD[7]  =     YuanbaoShop_ItemInfo7_GB;
        
    GOOD_BAD[8]  =     YuanbaoShop_ItemInfo8_GB;
        
    GOOD_BAD[9]  =     YuanbaoShop_ItemInfo9_GB;
        
    GOOD_BAD[10] =     YuanbaoShop_ItemInfo10_GB;
        
    GOOD_BAD[11] =     YuanbaoShop_ItemInfo11_GB;
        
    GOOD_BAD[12] =     YuanbaoShop_ItemInfo12_GB;
        
    GOOD_BAD[13] =     YuanbaoShop_ItemInfo13_GB;
        
    GOOD_BAD[14] =     YuanbaoShop_ItemInfo14_GB;
        
    GOOD_BAD[15] =     YuanbaoShop_ItemInfo15_GB;
        
    GOOD_BAD[16] =     YuanbaoShop_ItemInfo16_GB;
        
    GOOD_BAD[17] =     YuanbaoShop_ItemInfo17_GB;
        
    GOOD_BAD[18] =     YuanbaoShop_ItemInfo18_GB;

        --
    ´óÂô³¡
        SHOP_LIST_A
    [1] = {btn YuanbaoShop_Button1 shoplist = {}}
        
    SHOP_LIST_A[1].shoplist[1] = "#GNhi®t MÕi Thß½ng Ph¦m"   -- "Nhiet mai thuong pham";
        
    SHOP_LIST_A[1].shoplist[2] = "#YV§t Ph¦m H² Trþ"   -- "Gianni Versace";
        
    SHOP_LIST_A[1].shoplist[3] = "#GRa M¡t V§t Ph¦m M¾i"   -- "Bau vat";
        
    SHOP_LIST_A[1].shoplist[4] = "#cFF0000Th¥n Khí Thiên Höa"   -- "Th¥n Khí;
        SHOP_LIST_A[1].shoplist[5] = "
    #GNguyên Li®u Cao C¤p"   -- "Nguyên Li®u";
        
    SHOP_LIST_A[1].shoplist[6] = "#GYªu Quyªt 35 Môn Phái"   -- "YQ 35";
        --
    SHOP_LIST_A[1].shoplist[7] = "Bách hóa t±ng hþp 1"   -- "Bach hoa tong hop 1";
        --
    SHOP_LIST_A[1].shoplist[8] = "Bách hóa t±ng hþp 2"   -- "Bach hoa tong hop 2";

        --
    ±¦Ê¯É̳Ç
        SHOP_LIST_A
    [2] = {btn YuanbaoShop_Button2 shoplist = {}}
        
    SHOP_LIST_A[2].shoplist[1] = "#{YBSD_081225_025}"    -- "Tiem bao thach tinh hoa";
        
    SHOP_LIST_A[2].shoplist[2] = "#{YBSD_081225_022}"    -- "Phong bao thach Dai Ly";
        
    SHOP_LIST_A[2].shoplist[3] = "#{YBSD_081225_024}"    -- "Phong bao thach Lac Duong";
        
    SHOP_LIST_A[2].shoplist[4] = "#{YBSD_081225_023}"    -- "Phong bao thach To Chau";
        --
    SHOP_LIST_A[2].shoplist[5] = "Phòng bäo thÕch Lâu Lan"    -- "Phong bao thach Lau Lan";
        --
    SHOP_LIST_A[2].shoplist[6] = "#{YBSD_081225_026}"    -- "Phong gia cong bao thach";
        --
    SHOP_LIST_A[2].shoplist[7] = "Phòng gia công bäo thÕch 2"    -- "Phong gia cong bao thach 2";
        --
    SHOP_LIST_A[2].shoplist[8] = "TÕp hóa"                    -- "Tap hoa";
        

        --
    ÕäÊÞÉ̳Ç
        SHOP_LIST_A
    [3] = {btn YuanbaoShop_Button3 shoplist = {}}
        
    SHOP_LIST_A[3].shoplist[1] = "#GThß½ng Ti®m Trân Thú"    --"Tiem tran thu hiem";
        
    SHOP_LIST_A[3].shoplist[2] = "KÛ Nång Bình Thß¾ng"            --"Sieu tran thu";
        
    SHOP_LIST_A[3].shoplist[3] = "#GSiêu C¤p KÛ Nång"    --"Ky nang binh thuong";
        
    SHOP_LIST_A[3].shoplist[4] = "Trân Thú Bách Väo Rß½ng"    --"Ky nang cao cap";
        --
    SHOP_LIST_A[3].shoplist[5] = "#{YBSD_081225_030}"    --"Tran thu bach bao ruong";
        --
    SHOP_LIST_A[3].shoplist[6] = "Trân thú døng ph¦m 1"    --"Tran thu dung pham 1";
        --
    SHOP_LIST_A[3].shoplist[7] = "Trân thú døng ph¦m 2"    --"Tran thu dung pham 2";
        --
    SHOP_LIST_A[3].shoplist[8] = "Trân thú døng ph¦m 3"    --"Tran thu dung pham 3";
        
        --
    Äϱ±ÔÓ»õ
        SHOP_LIST_A
    [4] = {btn YuanbaoShop_Button4 shoplist = {}}
        
    SHOP_LIST_A[4].shoplist[1] = "#{YBSD_081225_091}"    --"Tien dan linh duoc";
        
    SHOP_LIST_A[4].shoplist[2] = "#{YBSD_081225_031}"    --"Ki tran di bao";
        
    SHOP_LIST_A[4].shoplist[3] = "#{YBSD_081225_032}"    --"Tam thanh than phu";
        --
    SHOP_LIST_A[4].shoplist[4] = "TÕp hóa 1"            --"Tap hoa 1";
        --
    SHOP_LIST_A[4].shoplist[5] = "TÕp hóa 2"            --"Tap hoa 2";
        --
    SHOP_LIST_A[4].shoplist[6] = "TÕp hóa 3"            --"Tap hoa 3";
        --
    SHOP_LIST_A[4].shoplist[7] = "TÕp hóa 4"            --"Tap hoa 4";
        --
    SHOP_LIST_A[4].shoplist[8] = "TÕp hóa 5"            --"Tap hoa 5";

        --
    ÐÎÏó¹ã³¡
        SHOP_LIST_A
    [5] = {btn YuanbaoShop_Button5 shoplist = {}}
        
    SHOP_LIST_A[5].shoplist[1] = "#{YBSD_081225_033}"    --"Me Lan thoi trang diem";
        
    SHOP_LIST_A[5].shoplist[2] = "#{YBSD_081225_034}"    --"Nhu y bien than trai";
        
    SHOP_LIST_A[5].shoplist[3] = "#{YBSD_081225_035}"    --"Thien Duong phat nghe quan";
        
    SHOP_LIST_A[5].shoplist[4] = "#{YBSD_081225_036}"    --"Lan Vu mo dung phuong";
        
    SHOP_LIST_A[5].shoplist[5] = "#{YBSD_081225_037}"    --"Thien cung ngu ma giam";
        --
    SHOP_LIST_A[5].shoplist[6] = "Th¶i trang môn phái"            --"Thoi trang mon phai";
        --
    SHOP_LIST_A[5].shoplist[7] = "Chþ ve chai 1"            --"Cho ve chai 1";
        --
    SHOP_LIST_A[5].shoplist[8] = "Chþ ve chai 2"            --"Cho ve chai 2";

        --
    »¨ÎèÈ˼ä
        SHOP_LIST_A
    [6] = {btn YuanbaoShop_Button6 shoplist = {}}
        
    SHOP_LIST_A[6].shoplist[1] = "#{YBSD_081225_038}"    --"Phao hoa truyen thong";
        
    SHOP_LIST_A[6].shoplist[2] = "#{YBSD_081225_039}"    --"Phao hoa ca tinh";
        
    SHOP_LIST_A[6].shoplist[3] = "#{YBSD_081225_040}"    --"Phao hoa toan canh";
        
    SHOP_LIST_A[6].shoplist[4] = "#{YBSD_081225_041}"    --"Xuan thanh bach hoa";

        --
    Î书Ãؼ®
        SHOP_LIST_A
    [7] = {btn YuanbaoShop_Button7 shoplist = {}}
        
    SHOP_LIST_A[7].shoplist[1] = "#{YBSD_081225_042}"    --"Hoang thi thuy cac";
        
    SHOP_LIST_A[7].shoplist[2] = "Bí t¸ch - Yªu quyªt"        --"Bi tich & yeu quyet";
        
    SHOP_LIST_A[7].shoplist[3] = "V§t ph¦m ðµc môn"        --"Vat pham doc mon";
        
    SHOP_LIST_A[7].shoplist[3] = "#GYªu Quyªt 35 Môn Phái"        --"YQ 35";
        
        --
    ´òÔìͼ
        SHOP_LIST_A
    [8] = {btn YuanbaoShop_Button8 shoplist = {}}
        
    SHOP_LIST_A[8].shoplist[1] = "#{YBSD_081225_043}"    --"Dao phu & thuong bong";
        
    SHOP_LIST_A[8].shoplist[2] = "#{YBSD_081225_044}"    --"Don doan & song doan";
        
    SHOP_LIST_A[8].shoplist[3] = "#{YBSD_081225_045}"    --"Phien & hoan";
        
    SHOP_LIST_A[8].shoplist[4] = "#{YBSD_081225_096}"    --"Mao & y phuc";
        
    SHOP_LIST_A[8].shoplist[5] = "#{YBSD_081225_046}"    --"Thu sao & hai";
        
    SHOP_LIST_A[8].shoplist[6] = "#{YBSD_081225_047}"    --"Ho uyen & ho kien";
        
    SHOP_LIST_A[8].shoplist[7] = "#{YBSD_081225_048}"    --"Yeu dai & hang lien";
        
    SHOP_LIST_A[8].shoplist[8] = "#{YBSD_081225_049}"    --"Gioi chi & ho phu";
        
        --
    ¶þ¼¶É̵ê
        SHOP_LIST_B
    [1] = YuanbaoShop_Button01
        SHOP_LIST_B
    [2] = YuanbaoShop_Button02
        SHOP_LIST_B
    [3] = YuanbaoShop_Button03
        SHOP_LIST_B
    [4] = YuanbaoShop_Button04
        SHOP_LIST_B
    [5] = YuanbaoShop_Button05
        SHOP_LIST_B
    [6] = YuanbaoShop_Button06
        SHOP_LIST_B
    [7] = YuanbaoShop_Button07
        SHOP_LIST_B
    [8] = YuanbaoShop_Button08
        
        


        
    if lastA ~= nil and lastA and lastA 9 then
            SHOP_LIST_A
    [lastA].btn:SetCheck(1)
        
    end

        
    if lastB ~= nil and lastB and lastB 9 then
            SHOP_LIST_B
    [lastB]:SetCheck(1)
        
    end

        
    for =,do
            
    SHOP_LIST_B[i]:Hide()
        
    end


        
    --ÎÒÒª¸üÇ¿´ó
        SHOP_SEARCH_LIST
    [1] = {}
        
    SHOP_SEARCH_LIST[1][1] = "#{YBSD_081225_022}"    --Ìí¼Ó"´óÀí±¦Ê¯Õ«",czf,2009.07.21
        SHOP_SEARCH_LIST
    [1][2] = "#{YBSD_081225_023}"    --"ËÕÖݱ¦Ê¯Õ«";
        
    SHOP_SEARCH_LIST[1][3] = "#{YBSD_081225_024}"    --"ÂåÑô±¦Ê¯Õ«";
        
    SHOP_SEARCH_LIST[1][4] = "#{YBSD_081225_025}"    --"±¦Ê¯¾«»ªµê";
        
    SHOP_SEARCH_LIST[1][5] = "#{YBSD_081225_027}"    --"Ï¡ÓÐÕäÊÞ¹Ý";
        
    SHOP_SEARCH_LIST[1][6] = "#{YBSD_081225_091}"    --"Ïɵ¤ÁéÒ©";
        
        --
    ÎÒÒª¸üÓÐ÷ÈÁ¦
        SHOP_SEARCH_LIST
    [2] = {}
        
    SHOP_SEARCH_LIST[2][1] = "#{YBSD_081225_037}"    --"×øÆïÉ̳Ç";
        
    SHOP_SEARCH_LIST[2][2] = "#{YBSD_081225_033}"    --"Ã×À¼Ê±×°µê";
        
    SHOP_SEARCH_LIST[2][3] = "#{YBSD_081225_034}"    --"ÈçÒâ±äÉíÕ«";
        
    SHOP_SEARCH_LIST[2][4] = "#{YBSD_081225_035}"    --"ÌìÑï·¢ÒÕ¹Ý";
        
    SHOP_SEARCH_LIST[2][5] = "#{YBSD_081225_036}"    --"À¼ÓêÃÀÈÝ·»";
        
        --
    ÎÒÒª´òÔ켫Ʒװ±¸
        SHOP_SEARCH_LIST
    [3] = {}
        
    SHOP_SEARCH_LIST[3][1] = "#{YBSD_081225_022}"    --Ìí¼Ó"´óÀí±¦Ê¯Õ«",czf,2009.07.21
        SHOP_SEARCH_LIST
    [3][2] = "#{YBSD_081225_023}"    --"ËÕÖݱ¦Ê¯Õ«";
        
    SHOP_SEARCH_LIST[3][3] = "#{YBSD_081225_024}"    --"ÂåÑô±¦Ê¯Õ«";
        
    SHOP_SEARCH_LIST[3][4] = "#{YBSD_081225_026}"    --"±¦Ê¯¼Ó¹¤·»";
        
    SHOP_SEARCH_LIST[3][5] = "#{YBSD_081225_031}"    --"ÆæÕäÒ챦";
        
        --
    ÎÒÒª´òÔ켫ƷÕäÊÞ
        SHOP_SEARCH_LIST
    [4] = {}
        
    SHOP_SEARCH_LIST[4][1] = "#{YBSD_081225_027}"    --"Ï¡ÓÐÕäÊÞ¹Ý";
        
    SHOP_SEARCH_LIST[4][2] = "#{YBSD_081225_028}"    --"ÆÕͨ¼¼ÄܹÝ";
        
    SHOP_SEARCH_LIST[4][3] = "#{YBSD_081225_029}"    --"¸ß¼¶¼¼ÄܹÝ";
        
    SHOP_SEARCH_LIST[4][4] = "#{YBSD_081225_030}"    --"ÕäÊÞÁéÒ©·»";
        
        --
    ÎÒÒªÒƶ¯µÄ¸ü¿ì
        SHOP_SEARCH_LIST
    [5] = {}
        
    SHOP_SEARCH_LIST[5][1] = "#{YBSD_081225_037}"    --"×øÆïÉ̳Ç";
        
    SHOP_SEARCH_LIST[5][2] = "#{YBSD_081225_032}"    --"ÈýÇåÉñ·û";
        
        --
    ÎÒÒªÏò±ðÈ˱í°×
        SHOP_SEARCH_LIST
    [6] = {}
        
    SHOP_SEARCH_LIST[6][1] = "#{YBSD_081225_039}"    --"¸öÐÔÑÌ»¨";
        
    SHOP_SEARCH_LIST[6][2] = "#{YBSD_081225_040}"    --"È«³¡¾°ÑÌ»¨";
        
    SHOP_SEARCH_LIST[6][3] = "#{YBSD_081225_041}"    --"ÏÊ»¨";
        
    SHOP_SEARCH_LIST[6][4] = "#{YBSD_081225_033}"    --"Ã×À¼Ê±×°µê";
        
    SHOP_SEARCH_LIST[6][5] = "#{YBSD_081225_037}"    --"×øÆïÉ̳Ç";
        
        --
    ÎÒҪѧϰм¼ÄÜ
        SHOP_SEARCH_LIST
    [7] = {}
        
    SHOP_SEARCH_LIST[7][1] = "#{YBSD_081225_042}"    --"»¹Ê©Ë®¸ó";
        
    SHOP_SEARCH_LIST[7][2] = "#{YBSD_081225_028}"    --"ÆÕͨ¼¼ÄܹÝ";
        
    SHOP_SEARCH_LIST[7][3] = "#{YBSD_081225_029}"    --"¸ß¼¶¼¼ÄܹÝ";
        
        
    YuanbaoShop_SearchMode:AddTextItem("#{YBSD_081225_055}" ,1)    --ÎÒÒª¸üÇ¿´ó
        YuanbaoShop_SearchMode
    :AddTextItem("#{YBSD_081225_056}" ,2)    --"ÎÒÒª¸üÓÐ÷ÈÁ¦"
        
    YuanbaoShop_SearchMode:AddTextItem("#{YBSD_081225_057}" ,3)    --"ÎÒÒª´òÔ켫Ʒװ±¸"
        
    YuanbaoShop_SearchMode:AddTextItem("#{YBSD_081225_058}",4)    --"ÎÒÒª´òÔ켫ƷÕäÊÞ"
        
    YuanbaoShop_SearchMode:AddTextItem("#{YBSD_081225_059}",5)    --"ÎÒÒªÒƶ¯µÄ¸ü¿ì"
        
    YuanbaoShop_SearchMode:AddTextItem("#{YBSD_081225_060}",6)    --"ÎÒÒªÏò±ðÈ˱í°×"
        
    YuanbaoShop_SearchMode:AddTextItem("#{YBSD_081225_061}",7)    --"ÎÒҪѧϰм¼ÄÜ"


        
    -- °ó¶¨Ôª±¦begin
        SHOP_LIST_A_BIND
    [1] = {btn YuanbaoShop_Button1_Bind shoplist = {}}
        
    SHOP_LIST_A_BIND[1].shoplist[1] = "#{YBSD_081225_019}"        --"";
        --
    SHOP_LIST_A_BIND[1].shoplist[1] = "#{YBSD_081225_020}"        --"";
        --
    SHOP_LIST_A_BIND[1].shoplist[3] = "#{YBSD_081225_021}"        --"";

        --
        
    SHOP_LIST_A_BIND[2] = {btn YuanbaoShop_Button2_Bind shoplist = {}}
        --
    SHOP_LIST_A_BIND[2].shoplist[1] = "#{YBSD_081225_022}"        --"";
        --
    SHOP_LIST_A_BIND[2].shoplist[1] = "#{YBSD_081225_023}"        --"";
        --
    SHOP_LIST_A_BIND[2].shoplist[2] = "#{YBSD_081225_024}"        --"";
        --
    SHOP_LIST_A_BIND[2].shoplist[3] = "#{YBSD_081225_025}"        --"";
        
    SHOP_LIST_A_BIND[2].shoplist[1] = "#{YBSD_081225_026}"        --"";

        --
        
    SHOP_LIST_A_BIND[3] = {btn YuanbaoShop_Button3_Bind shoplist = {}}
        --
    SHOP_LIST_A_BIND[3].shoplist[1] = "#{YBSD_081225_027}"        --"";
        --
    SHOP_LIST_A_BIND[3].shoplist[2] = "#{YBSD_081225_028}"        --"";
        --
    SHOP_LIST_A_BIND[3].shoplist[3] = "#{YBSD_081225_029}"        --"";
        
    SHOP_LIST_A_BIND[3].shoplist[1] = "#{YBSD_081225_030}"        --"";

        --
        
    SHOP_LIST_A_BIND[4] = {btn YuanbaoShop_Button4_Bind shoplist = {}}
        
    SHOP_LIST_A_BIND[4].shoplist[1] = "#{YBSD_081225_091}"        --"";
        
    SHOP_LIST_A_BIND[4].shoplist[2] = "#{YBSD_081225_031}"        --"";
        
    SHOP_LIST_A_BIND[4].shoplist[3] = "#{YBSD_101110_01}"        --"";

        --
        
    SHOP_LIST_A_BIND[5] = {btn YuanbaoShop_Button5_Bind shoplist = {}}
        
    SHOP_LIST_A_BIND[5].shoplist[1] = "#{YBSD_081225_033}"        --"";
        
    SHOP_LIST_A_BIND[5].shoplist[2] = "#{YBSD_081225_034}"        --"";
        
    SHOP_LIST_A_BIND[5].shoplist[3] = "#{YBSD_081225_035}"        --"";
        
    SHOP_LIST_A_BIND[5].shoplist[4] = "#{YBSD_081225_036}"        --"";
        
    SHOP_LIST_A_BIND[5].shoplist[5] = "#{YBSD_081225_037}"        --"";
        
    SHOP_LIST_A_BIND[5].shoplist[6] = "#{YBSD_90624_1}"            --"";

        --
        
    SHOP_LIST_A_BIND[6] = {btn YuanbaoShop_Button6_Bind shoplist = {}}
        
    SHOP_LIST_A_BIND[6].shoplist[1] = "#{YBSD_081225_038}"        --"";
        
    SHOP_LIST_A_BIND[6].shoplist[2] = "#{YBSD_081225_039}"        --"";
        
    SHOP_LIST_A_BIND[6].shoplist[3] = "#{YBSD_081225_040}"        --"";
        
    SHOP_LIST_A_BIND[6].shoplist[4] = "#{YBSD_081225_041}"        --"";

        --
        
    SHOP_LIST_A_BIND[7] = {btn YuanbaoShop_Button7_Bind shoplist = {}}
        
    SHOP_LIST_A_BIND[7].shoplist[1] = "#{YBSD_081225_042}"        --"";

        --
        
    SHOP_LIST_A_BIND[8] = {btn YuanbaoShop_Button8_Bind shoplist = {}}
        
    SHOP_LIST_A_BIND[8].shoplist[1] = "#{YBSD_081225_043}"        --"";
        
    SHOP_LIST_A_BIND[8].shoplist[2] = "#{YBSD_081225_044}"        --"";
        
    SHOP_LIST_A_BIND[8].shoplist[3] = "#{YBSD_081225_045}"        --"";
        
    SHOP_LIST_A_BIND[8].shoplist[4] = "#{YBSD_081225_096}"        --"";
        
    SHOP_LIST_A_BIND[8].shoplist[5] = "#{YBSD_081225_046}"        --"";
        
    SHOP_LIST_A_BIND[8].shoplist[6] = "#{YBSD_081225_047}"        --"";
        
    SHOP_LIST_A_BIND[8].shoplist[7] = "#{YBSD_081225_048}"        --"";
        
    SHOP_LIST_A_BIND[8].shoplist[8] = "#{YBSD_081225_049}"        --"";

        --
    ¶þ¼¶É̵ê
        SHOP_LIST_B_BIND
    [1] = YuanbaoShop_Button01_Bind
        SHOP_LIST_B_BIND
    [2] = YuanbaoShop_Button02_Bind
        SHOP_LIST_B_BIND
    [3] = YuanbaoShop_Button03_Bind
        SHOP_LIST_B_BIND
    [4] = YuanbaoShop_Button04_Bind
        SHOP_LIST_B_BIND
    [5] = YuanbaoShop_Button05_Bind
        SHOP_LIST_B_BIND
    [6] = YuanbaoShop_Button06_Bind
        SHOP_LIST_B_BIND
    [7] = YuanbaoShop_Button07_Bind
        SHOP_LIST_B_BIND
    [8] = YuanbaoShop_Button08_Bind


        
    if lastA_Bind ~= nil and lastA_Bind and lastA_Bind 9 then
            SHOP_LIST_A_BIND
    lastA_Bind ].btn SetCheck(1)
        
    end

        
    if lastB_Bind ~= nil and lastB_Bind and lastB_Bind 9 then
            SHOP_LIST_B_BIND
    lastB_Bind ] : SetCheck(1)
        
    end

        
    for =,do
            
    SHOP_LIST_B_BIND[i]:Hide()
        
    end

        
    --
        
    SHOP_SEARCH_LIST_BIND[1] = {}
        
    SHOP_SEARCH_LIST_BIND[1][1] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[1][2] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[1][3] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[1][4] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[1][5] = "BindSearch1"    --"";
        --
        
    SHOP_SEARCH_LIST_BIND[2] = {}
        
    SHOP_SEARCH_LIST_BIND[2][1] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[2][2] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[2][3] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[2][4] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[2][5] = "BindSearch1"    --"";
        --
        
    SHOP_SEARCH_LIST_BIND[3] = {}
        
    SHOP_SEARCH_LIST_BIND[3][1] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[3][2] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[3][3] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[3][4] = "BindSearch1"    --"";

        --
        
    SHOP_SEARCH_LIST_BIND[4] = {}
        
    SHOP_SEARCH_LIST_BIND[4][1] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[4][2] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[4][3] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[4][4] = "BindSearch1"    --"";

        --
        
    SHOP_SEARCH_LIST_BIND[5] = {}
        
    SHOP_SEARCH_LIST_BIND[5][1] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[5][2] = "BindSearch1"    --"";
        --
        
    SHOP_SEARCH_LIST_BIND[6] = {}
        
    SHOP_SEARCH_LIST_BIND[6][1] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[6][2] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[6][3] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[6][4] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[6][5] = "BindSearch1"    --"";
        --
        
    SHOP_SEARCH_LIST_BIND[7] = {}
        
    SHOP_SEARCH_LIST_BIND[7][1] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[7][2] = "BindSearch1"    --"";
        
    SHOP_SEARCH_LIST_BIND[7][3] = "BindSearch1"    --"";


        
    YuanbaoShop_SearchMode_Bind:AddTextItem("BindSearch1}" ,1)    --
        
    YuanbaoShop_SearchMode_Bind:AddTextItem("BindSearch2}" ,2)    --""
        
    YuanbaoShop_SearchMode_Bind:AddTextItem("BindSearch3}" ,3)    --""
        
    YuanbaoShop_SearchMode_Bind:AddTextItem("BindSearch4}",4)        --""
        
    YuanbaoShop_SearchMode_Bind:AddTextItem("BindSearch5}",5)        --""
        
    YuanbaoShop_SearchMode_Bind:AddTextItem("BindSearch6}",6)        --""
        
    YuanbaoShop_SearchMode_Bind:AddTextItem("BindSearch7}",7)        --""


        
    YuanbaoShop_Bk1_Bind Hide();
        
    YuanbaoShop_Bk2_Bind Hide();
        
    YuanbaoShop_SearchMode_Bind Hide();
        
    YuanbaoShop_Text2_Bind Hide();
        
    YuanbaoShop_Bk4 Hide();
        -- 
    °ó¶¨Ôª±¦end

        
    ------------------------------------------ ·µÈ¯É̵ê -------------------------------------------------------
        --
    ·µÈ¯É̵êBegin
        YuanbaoShop_Fanquan
    :Disable(); --¹Ø±Õ·µÈ¯É̵ê
        YuanbaoShop_Fanquan
    :Hide();

        --
    ´óÂô³¡
        SHOP_LIST_A_GIFTTOKEN
    [1] = {btn YuanbaoShop_Button1 shoplist = {}}
        --
    SHOP_LIST_A_GIFTTOKEN[1].shoplist[1] = "#{YBSD_081225_019}"    --"ÐÂÆ·ÉϼÜ";

        --
    µÚ¶þ¼ä
        SHOP_LIST_A_GIFTTOKEN
    [2] = {btn YuanbaoShop_Button2 shoplist = {}}

        --
    µÚÈý¼ä
        SHOP_LIST_A_GIFTTOKEN
    [3] = {btn YuanbaoShop_Button3 shoplist = {}}

        --
    µÚËļä
        SHOP_LIST_A_GIFTTOKEN
    [4] = {btn YuanbaoShop_Button4 shoplist = {}}

        --
    µÚÎå¼ä
        SHOP_LIST_A_GIFTTOKEN
    [5] = {btn YuanbaoShop_Button5 shoplist = {}}

        --
    µÚÁù¼ä
        SHOP_LIST_A_GIFTTOKEN
    [6] = {btn YuanbaoShop_Button6 shoplist = {}}

        --
    µÚÆß¼ä
        SHOP_LIST_A_GIFTTOKEN
    [7] = {btn YuanbaoShop_Button7 shoplist = {}}

        --
    µÚ°Ë¼ä
        SHOP_LIST_A_GIFTTOKEN
    [8] = {btn YuanbaoShop_Button8 shoplist = {}}

        --
    ¶þ¼¶É̵ê
        SHOP_LIST_B_GIFTTOKEN
    [1] = YuanbaoShop_Button01
        SHOP_LIST_B_GIFTTOKEN
    [2] = YuanbaoShop_Button02
        SHOP_LIST_B_GIFTTOKEN
    [3] = YuanbaoShop_Button03
        SHOP_LIST_B_GIFTTOKEN
    [4] = YuanbaoShop_Button04
        SHOP_LIST_B_GIFTTOKEN
    [5] = YuanbaoShop_Button05
        SHOP_LIST_B_GIFTTOKEN
    [6] = YuanbaoShop_Button06
        SHOP_LIST_B_GIFTTOKEN
    [7] = YuanbaoShop_Button07
        SHOP_LIST_B_GIFTTOKEN
    [8] = YuanbaoShop_Button08


        
    if lastA ~= nil and lastA and lastA table.getn(SHOP_LIST_B_GIFTTOKEN)+1 then
            SHOP_LIST_A_GIFTTOKEN
    [lastA].btn:SetCheck(1)
        
    end

        
    if lastB ~= nil and lastB and lastB table.getn(SHOP_LIST_B_GIFTTOKEN)+1 then
            SHOP_LIST_B_GIFTTOKEN
    [lastB]:SetCheck(1)
        
    end

        
    for =,table.getn(SHOP_LIST_B_GIFTTOKEN) do
            
    SHOP_LIST_B_GIFTTOKEN[i]:Hide()
        
    end

        
    --ËÑË÷Ñ¡ÔñÏî
        SHOP_SEARCH_LIST_GIFTTOKEN
    [1] = {}

        
    YuanbaoShop_FanquanRateInfo Hide();
        --
    ·µÈ¯É̵êEnd

    g_YuanbaoShop_Frame_UnifiedXPosition    
    YuanbaoShop_Frame:GetProperty("UnifiedXPosition");
    g_YuanbaoShop_Frame_UnifiedYPosition    YuanbaoShop_Frame:GetProperty("UnifiedYPosition");

    end


    function YuanbaoShop_OnEvent(event)

        if ( 
    event == "PLAYER_ENTERING_WORLD" or event == "PLAYER_LEAVE_WORLD"then
            YuanbaoShop_Close
    ()
        
    end

        
    if event == "OPEN_YUANBAOSHOP" then
            g_nTotalNum    
    0;
            
    local check  tonumber(NpcShop:GetBuyDirectly());
            if(
    check>=1)then
                YuanbaoShop_querengoumai
    :SetCheck(0);
            else
                
    YuanbaoShop_querengoumai:SetCheck(1);
            
    end
            
    if( this:IsVisible() == false then
                YubanbaoShop_ADRandom
    ()
                if (
    IsWindowShow("YbMarket")) then
                    CloseWindow
    ("YbMarket"true);
                
    end
                this
    :Show();
                
    OpenWindow("Packet")

                -- 
    ÔÚÏÈ´ò¿ªNPCÉ̵꣬ºó´ò¿ªÔª±¦É̵êµÄʱºò£¬´æÔÚÒ»¸öÎÊÌâ
                
    -- Ôª±¦É̵êÔÚ´ò¿ªÊ±»á¹Ø±ÕÒѾ­´ò¿ªµÄNPCÉ̵꣬¶ø¹Ø±ÕÕâ¸ö²Ù×÷»á½«ÊÇ·ñ´ò¿ªÉ̵êÕâ¸ö״ֻ̬Ϊ¼Ù£¬´Ó¶øµ¼Ö¹ºÂòÏà¹ØµÄÂß¼­³öÏÖ´íÎó
                
    -- Ä¿Ç°µÄ½â¾ö°ì·¨ÊÇÔÚShowµÄµØ·½£¬ÉèÖÃÊÇ·ñ´ò¿ªÉ̵êµÄ״̬ΪÕæ¡£
                OpenBooth
    ();
            
    end

            
    --¹ØÐÄÉÌÈËObj
            objCared 
    NpcShop:GetNpcId();
            
    this:CareObject(objCared1"YuanbaoShop");

            
    NpcShop:CloseConfirm();
            
    YuanbaoShop_UpdatePage(1);

            if(
    IsWindowShow("Shop_Fitting")) then
                RestoreShopFitting
    ();
                
    CloseWindow("Shop_Fitting"true);
            
    end
            SetDefaultMouse
    ();
        elseif ( 
    event == "TOGGLE_YUANBAOSHOP"then
            
    if( this:IsVisible() ) then
                YuanbaoShop_Close
    ();
            else

                
    lastA 1;
                
    lastB 1;
                
    YuanbaoShop_Show()
            
    end
        
    elseif ( event == "UPDATE_BOOTH" then

            YuanbaoShop_UpdatePage
    (nPageNum);

        elseif (
    event == "CLOSE_BOOTH"then
            YuanbaoShop_Close
    ()
        elseif (
    event == "UPDATE_YUANBAO" and this:IsVisible()) then
            YuanbaoShop_Text2
    :SetText("#{YBSD_081225_068}"..tostring(Player:GetData("YUANBAO")))
        elseif (
    event == "UI_COMMAND" and tonumberarg0 ) == 888902then
            ObjCared 
    Get_XParam_INT)
            if 
    Get_XParam_INT) ~= and Get_XParam_INT) ~= 0 then
                lastA 
    Get_XParam_INT
                
    lastB Get_XParam_INT)
            
    end
            YuanbaoShop_Show
    ()
        
    end
    end
    --==================
    --
    ´ò¿ªÉ̵ê
    function YuanbaoShop_Show()

        if 
    lastA or lastA maxChildShop then
            lastA 
    1;
            
    lastB 1;
        
    end

        
    if lastB or lastB maxChildShop then
            lastB 
    1;
        
    end


        lastSelect 
    0;
        for 
    ,maxChildShop do
            
    SHOP_LIST_B[i]:Hide()
            if 
    SHOP_LIST_A[lastA].shoplist[i] ~= nil then
                SHOP_LIST_B
    [i]:SetText(SHOP_LIST_A[lastA].shoplist[i])
                
    SHOP_LIST_B[i]:Show()
            
    end
        end
        SHOP_LIST_A
    [lastA].btn:SetCheck(1)
        
    SHOP_LIST_B[lastB]:SetCheck(1)


        
    lastA_Bind 1;
        
    lastB_Bind 1;

        
    lastSelect_Bind 0;
        for 
    ,maxChildShop do
            
    SHOP_LIST_B_BIND[i]:Hide()
            if 
    SHOP_LIST_A_BIND[lastA_Bind].shoplist[i] ~= nil then
                SHOP_LIST_B_BIND
    [i]:SetText(SHOP_LIST_A_BIND[lastA_Bind].shoplist[i])
                
    SHOP_LIST_B_BIND[i]:Show()
            
    end
        end
        SHOP_LIST_A_BIND
    [lastA_Bind].btn:SetCheck(1)
        
    SHOP_LIST_B_BIND[lastB_Bind]:SetCheck(1)


        
    SHOP_LIST_A_BIND[1].btn SetCheck(1)
        if ( 
    == g_tabIndex then
            UpdateShopItem
    lastA lastB )
        else
            
    YuanbaoShop_Yuanbao SetCheck(1)
            
    YuanbaoShop_Gongzi SetCheck(0)
            --
    ´ò¿ªÊ±Ä¬ÈÏÇл»µ½ÆÕͨԪ±¦µê
            YuanbaoShop_ChangeTabIndex
    )
        
    end
    end
    --===============================
    --
    Ë¢ÐÂÒ»Ò³
    function YuanbaoShop_UpdatePage(thePage)
        
        
    YuanbaoShop_Text2:SetText ("#{YBSD_081225_068}"..tostring(Player:GetData("MENPAIPOINT")))
        for 
    i=1GOODS_BUTTONS_NUM  do
            
    GOOD_BAD[i]:Show()
        
    end

        local    i 
    1;
        
        if 
    g_nTotalNum == or g_nTotalNum ~= GetActionNum("boothitem"then
            g_nTotalNum    
    GetActionNum("boothitem");
            
    YuanbaoShop_Order();
        
    end
            
        
    -- ¼ÆËã×ÜÒ³Êý
        local    nTotalPage
    ;
        if( 
    g_nTotalNum then
            nTotalPage    
    1;
        else
            
    nTotalPage    math.floor((g_nTotalNum-1)/GOODS_BUTTONS_NUM)+1;
        
    end

        maxPage 
    nTotalPage;
        
        if(
    thePage or thePage nTotalPagethen 
            
    return;    
        
    end
        
    --HEQUIP_DRESS        =16,    //ʱװ                   
        
    --HEQUIP_RIDER        =8,    //Æï³Ë    
        
    local bHaveRide=0;
        
        
    nPageNum thePage;

        
    local nStartIndex = (thePage-1)*GOODS_BUTTONS_NUM;

        
    local nActIndex nStartIndex;
        
    1;
        while 
    <= GOODS_BUTTONS_NUM do
            
    local    idx    g_tOrderPool[nActIndex+1];
            if 
    idx == nil then
                idx    
    = -1;
            
    end

            local theAction 
    EnumAction(idx"boothitem");
            if 
    theAction:GetID() ~= 0 then
                local nEquipPoint 
    theAction:GetEquipPoint();
                
                if 
    nEquipPoint == 16 or nEquipPoint == 8 then
                    bHaveRide 
    1;
                
    end
                
            
                GOODS_BUTTONS
    [i]:SetActionItem(theAction:GetID());
                if(
    theAction:GetItemColorInShop()~=""then
                    GOODS_DESCS
    [i]:SetTexttheAction:GetItemColorInShop()..theAction:GetName() );
                else
                    
    GOODS_DESCS[i]:SetTexttheAction:GetName() );
                
    end
                
                local nPrice    
    NpcShop:EnumItemPriceidx )
                
    local nUnit NpcShop:GetShopType("unit");
                if( 
    nUnit == CU_GOODBAD then
                    GOOD_BAD
    [i]:SetText("Giá tr¸ thi®n ác: " .. tostring(nPrice) .. " Ði¬m")
                elseif( 
    nUnit == CU_MORALPOINT then
                    GOOD_BAD
    [i]:SetText("Ði¬m Sß ÐÑc: " .. tostring(nPrice) .. " Ði¬m")
                elseif( 
    nUnit == CU_YUANBAO then
                    GOOD_BAD
    [i]:SetText("Nguyên bäo: " .. tostring(nPrice))
                    --
    GOOD_BAD[i]:SetText("#{YBSD_081225_101}" .. tostring(nPrice)) Nguyen bao
                
    elseif( nUnit == CU_ZENGDIAN then
                    GOOD_BAD
    [i]:SetText("Ði¬m t£ng: " .. tostring(nPrice))
                elseif( 
    nUnit == CU_MENPAI_POINT then
                    GOOD_BAD
    [i]:SetText("Ði¬m môn phái: " .. tostring(nPrice))
                elseif( 
    nUnit == CU_MONEYJZ then
                    
    --GOODS_PRICE[i]:SetProperty("GoldIcon""set:Button6 image:Lace_JiaoziJin")
                    --
    GOODS_PRICE[i]:SetProperty("SilverIcon""set:Button6 image:Lace_JiaoziYin")
                    --
    GOODS_PRICE[i]:SetProperty("CopperIcon""set:Button6 image:Lace_JiaoziTong")
                 -- 
    GOODS_PRICE[i]:SetProperty("MoneyNumber"tostring(nPrice))
                else    --
    Ç®£¬¹ÙƱǮ
                    
    --GOODS_PRICE[i]:SetProperty("GoldIcon""set:Button2 image:Icon_GoldCoin")
                    --
    GOODS_PRICE[i]:SetProperty("SilverIcon""set:Button2 image:Icon_SilverCoin")
                    --
    GOODS_PRICE[i]:SetProperty("CopperIcon""set:Button2 image:Icon_CopperCoin")
                    --
    GOODS_PRICE[i]:SetProperty("MoneyNumber"tostring(nPrice))
                
    end
                
                i 
    i+1;
            else
                
    GOODS_BUTTONS[i]:SetActionItem(-1);
                
    GOODS_DESCS[i]:SetText("");
                
    GOOD_BAD[i]:SetText("");
                
    i+1;        
            
    end
            nActIndex 
    nActIndex+1;
        
    end


        
    if bHaveRide >= 1 then
            YuanbaoShop_Try
    :Show();        
        else
            
    YuanbaoShop_Try:Hide();    
        
    end
        
        
    if( nTotalPage == then
            YuanbaoShop_UpPage
    :Hide();
            
    YuanbaoShop_DownPage:Hide();
            
    YuanbaoShop_CurrentlyPage:Hide();
        else
            
    YuanbaoShop_UpPage:Show();
            
    YuanbaoShop_DownPage:Show();
            
    YuanbaoShop_CurrentlyPage:Show();
            
            
    YuanbaoShop_UpPage:Enable();
            
    YuanbaoShop_DownPage:Enable();

            if ( 
    nPageNum == nTotalPage then
                YuanbaoShop_DownPage
    :Disable();
            
    end
            
            
    if ( nPageNum == then
                YuanbaoShop_UpPage
    :Disable()
            
    end

            YuanbaoShop_CurrentlyPage
    :SetText(tostring(nPageNum) .. "/" .. tostring(nTotalPage) );
        
    end
    end
    --µã»÷Ò»¼¶±êÇ©
    function YuanbaoShop_UpdateList(nIndex)

        if 
    g_tabIndex == ShopTabIdx.GiftToken then
            YuanbaoShop_UpdateList_GiftToken
    (nIndex)
            return
        
    end

        
    --PushDebugMessage("YuanbaoShop_UpdateList:"..nIndex);
        if 
    nIndex <or nIndex or ( nIndex == lastA and g_changeTabFlag == then
            
    return
        
    end

        
    for ,maxChildShop do
            
    SHOP_LIST_B[i]:Hide()
            if 
    SHOP_LIST_A[nIndex].shoplist[i] ~= nil then
                SHOP_LIST_B
    [i]:SetText(SHOP_LIST_A[nIndex].shoplist[i])
                
    SHOP_LIST_B[i]:Show()
            
    end
        end

        SHOP_LIST_B
    [1]:SetCheck(1)
        
    lastB 1
        lastA 
    nIndex
        lastSelect 
    0

        UpdateShopItem
    lastA ,lastB )
    end
    --µã»÷µêÆÌ
    function YuanbaoShop_UpdateShop(nIndex)

        if 
    nIndex <or nIndex maxChildShop or nIndex == lastB then
            
    return
        
    end

        lastB 
    nIndex
        
        
    if lastSelect and lastSelect 8 then
            UpdateShopItem
    lastSelect+lastB )
        elseif 
    lastA and lastA 9 then
            UpdateShopItem
    lastA lastB )
        else
            
    UpdateShopItem1)
        
    end
        
    --PushDebugMessage(nIndex);
    end
    --²éÕÒ
    function YuanbaoShop_BeginSearch()

        if ( 
    YuanbaoShop_SearchMode_Bind IsVisible( ) ) then
            YuanbaoShop_BeginSearch_Bind
    ();
            return;
        
    end

        local str 
    nIndex YuanbaoShop_SearchMode:GetCurrentSelect()

        if 
    nIndex <or nIndex table.getn(SHOP_SEARCH_LISTthen
            
    return
        
    end

        
    for ,maxChildShop do
            
    SHOP_LIST_B[i]:Hide()
            if 
    SHOP_SEARCH_LIST[nIndex][i] ~= nil then
                SHOP_LIST_B
    [i]:SetText(SHOP_SEARCH_LIST[nIndex][i])
                
    SHOP_LIST_B[i]:Show()
            
    end
        end

        SHOP_LIST_B
    [1]:SetCheck(1)
        
    lastB 1
        lastA 
    0
        lastSelect 
    nIndex

        
    for ,do
            
    SHOP_LIST_A[i].btn:SetCheck(0)
        
    end

        UpdateShopItem
    nIndex+)
    end

    -- °ó¶¨Ôª±¦ begin

    --µã»÷Ò»¼¶±êÇ©
    function YuanbaoShop_UpdateList_Bind(nIndex)

        --
    PushDebugMessage("YuanbaoShop_UpdateList_Bind:"..nIndex);
        if 
    nIndex or nIndex or ( nIndex == lastA_Bind and g_changeTabFlag == then
            
    return
        
    end

        
    for maxChildShop do
            
    SHOP_LIST_B_BIND[i]:Hide()
            if 
    SHOP_LIST_A_BIND[nIndex].shoplist[i] ~= nil then
                SHOP_LIST_B_BIND
    [i]:SetText(SHOP_LIST_A_BIND[nIndex].shoplist[i])
                
    SHOP_LIST_B_BIND[i]:Show()
            
    end
        end

        SHOP_LIST_B_BIND
    [1]:SetCheck(1)
        
    lastB_Bind 1
        lastA_Bind 
    nIndex
        lastSelect_Bind 
    0

        UpdateShopItem
    lastA_Bind 100 ,lastB_Bind )
    end

    --µã»÷µêÆÌ
    function YuanbaoShop_UpdateShop_Bind(nIndex)

        --
    PushDebugMessage("YuanbaoShop_UpdateShop_Bind:"..nIndex..",lastB_Bind:"..lastB_Bind..",g_changeTabFlag:"..g_changeTabFlag );
        if 
    nIndex <or nIndex maxChildShop or ( nIndex == lastB_Bind and g_changeTabFlag == then
            
    return
        
    end

        lastB_Bind 
    nIndex

        
    if lastSelect_Bind and lastSelect_Bind 8 then
            UpdateShopItem
    lastSelect_Bind 108 lastB_Bind )
        elseif 
    lastA_Bind and lastA_Bind 9 then
            UpdateShopItem
    lastA_Bind 100 lastB_Bind )
        else
            
    UpdateShopItem1)
        
    end

    end

    --²éÕÒ
    function YuanbaoShop_BeginSearch_Bind()

        
    local str nIndex YuanbaoShop_SearchMode_Bind:GetCurrentSelect()

        if 
    nIndex <or nIndex 7 then
            
    return
        
    end

        
    for ,maxChildShop do
            
    SHOP_LIST_B_BIND[i]:Hide()
            if 
    SHOP_SEARCH_LIST_BIND[nIndex][i] ~= nil then
                SHOP_LIST_B_BIND
    [i]:SetText(SHOP_SEARCH_LIST_BIND[nIndex][i])
                
    SHOP_LIST_B_BIND[i]:Show()
            
    end
        end

        SHOP_LIST_B_BIND
    [1]:SetCheck(1)
        
    lastB_Bind 1
        lastA_Bind 
    0
        lastSelect_Bind 
    nIndex

        
    for ,do
            
    SHOP_LIST_A_BIND[i].btn:SetCheck(0)
        
    end

        UpdateShopItem
    nIndex 108 )
    end

    ---------------------------------------- ·µÈ¯É̵ê -------------------------------------------
    --
    µã»÷Ò»¼¶±êÇ©
    function YuanbaoShop_UpdateList_GiftToken(nIndex)

        --
    PushDebugMessage("YuanbaoShop_UpdateList:"..nIndex);
        if 
    nIndex <or nIndex or ( nIndex == lastA_GiftToken and g_changeTabFlag == then
            
    return
        
    end

        
    for ,maxChildShop do
            
    SHOP_LIST_B_GIFTTOKEN[i]:Hide()
            if 
    SHOP_LIST_A_GIFTTOKEN[nIndex].shoplist[i] ~= nil then
                SHOP_LIST_B_GIFTTOKEN
    [i]:SetText(SHOP_LIST_A_GIFTTOKEN[nIndex].shoplist[i])
                
    SHOP_LIST_B_GIFTTOKEN[i]:Show()
            
    end
        end

        SHOP_LIST_B_GIFTTOKEN
    [1]:SetCheck(1)
        
    lastB_GiftToken 1
        lastA_GiftToken 
    nIndex
        lastSelec_GiftTokent 
    0

        UpdateShopItem
    lastA_GiftToken 200lastB_GiftToken )
    end
    --µã»÷µêÆÌ
    function YuanbaoShop_UpdateShop_GiftToken(nIndex)

        --
    PushDebugMessage("YuanbaoShop_UpdateShop:"..nIndex);
        if 
    nIndex <or nIndex maxChildShop or ( nIndex == lastB_GiftToken and g_changeTabFlag == then
            
    return
        
    end

        lastB_GiftToken 
    nIndex

        
    if lastSelect_GiftToken and lastSelect_GiftToken <= table.getn(SHOP_SEARCH_LIST_GIFTTOKENthen
            UpdateShopItem
    lastSelect_GiftToken+208 lastB_GiftToken )
        elseif 
    lastA_GiftToken and lastA_GiftToken table.getn(SHOP_LIST_A_GIFTTOKENthen
            UpdateShopItem
    lastA_GiftToken 200lastB_GiftToken )
        else
            
    UpdateShopItem(201 1)
        
    end
    end
    --²éÕÒ
    function YuanbaoShop_BeginSearch_GiftToken()

        
    lastB_GiftToken 1
        lastA_GiftToken 
    0
        lastSelect_GiftToken 
    0
    end
    ---------------------------------------- ·µÈ¯É̵꠽áÊø -------------------------------------------

    --
    ÉèÖò˵¥µÄÏÔʾÊôÐÔ
    function YuanbaoShop_UpdateVisiableProperty(shopAListshopBListsearchListlastAlastBlastSelect)

        if (
    shopAList == nil or shopBList == nil or searchList == nilthen
            
    return
        
    end

        local findA 
    0

        
    for i=1table.getn(shopAList) do
            if (
    table.getn(shopAList[i].shoplist) > 0then
                shopAList
    [i].btn Show()
                if (
    == lastAthen
                    findA 
    i
                end
            
    else
                
    shopAList[i].btn Hide()
            
    end
        end

        
    if (findA 0then
            shopAList
    [lastA].btn SetCheck(1)
            for 
    1table.getn(shopBList) do
                
    shopBList[j] : Hide()
                if 
    shopAList[lastA].shoplist[j] ~= nil then
                    shopBList
    [j] : SetText(shopAList[lastA].shoplist[j])
                    
    shopBList[j] : Show()
                    if 
    == lastB then
                        shopBList
    [j] : SetCheck(1)
                    
    end
                end
            end
        
    elseif lastSelect and lastSelect <= table.getn(searchListthen
            
    for ,table.getn(shopAList) do
                
    shopAList[i].btn:SetCheck(0)
            
    end
            
    for ,table.getn(shopBList) do
                
    shopBList[i]:Hide()
                if 
    searchList[lastSelect][i] ~= nil then
                    shopBList
    [i]:SetText(searchList[lastSelect][i])
                    
    shopBList[i]:Show()
                
    end
            end
            shopBList
    [lastB]:SetCheck(1)
        
    end
    end

    function YuanbaoShop_ChangeTabIndexnIndex )

        if (
    nIndex == ShopTabIdx.GiftTokenthen --¹Ø±Õ·µÈ¯É̵ê
            
    return
        
    end

        
    if ( nIndex == g_tabIndex then
            
    return
        
    end

        g_changeTabFlag 
    1
        g_tabIndex 
    nIndex

        YuanbaoShop_Bk1_Bind 
    Hide();
        
    YuanbaoShop_Bk2_Bind Hide();
        
    YuanbaoShop_SearchMode_Bind Hide();
        
    YuanbaoShop_Bk1 Hide();
        
    YuanbaoShop_Bk2 Hide();
        
    YuanbaoShop_SearchMode Hide();

        
    YuanbaoShop_Text1 Hide();
        
    YuanbaoShop_Begin Hide();

        
    YuanbaoShop_Text2 Hide();
        
    YuanbaoShop_Text2_Bind Hide();

        
    YuanbaoShop_Bk3 Hide();
        
    YuanbaoShop_Bk4 Hide();

        
    YuanbaoShop_Dis Hide();
        
    YuanbaoShop_Dis3 Hide();
        
    YuanbaoShop_FanquanRateInfo Hide();

        if( 
    nIndex ==  ShopTabIdx.YuanBao then
            YuanbaoShop_Bk1 
    Show();
            
    YuanbaoShop_Bk2 Show();
            
    YuanbaoShop_SearchMode Show();

            
    YuanbaoShop_Text1 Show();
            
    YuanbaoShop_Begin Show();

            
    YuanbaoShop_Text2 Show();
            
    YuanbaoShop_Dis Show();
            --
    YuanbaoShop_Dis3 Show();

            
    YuanbaoShop_UpdateVisiableProperty(SHOP_LIST_ASHOP_LIST_BSHOP_SEARCH_LISTlastAlastBlastSelect)
            
    YuanbaoShop_Bk3 Show();

            
    local check  tonumber(NpcShop:GetBuyDirectly());
            if(
    check>=1)then
                YuanbaoShop_querengoumai
    :SetCheck(0);
            else
                
    YuanbaoShop_querengoumai:SetCheck(1);
            
    end

            YuanbaoShop_UpdateShop
    lastB );

        elseif( 
    nIndex ==  ShopTabIdx.Bind then
            YuanbaoShop_Bk1_Bind 
    Show();
            
    YuanbaoShop_Bk2_Bind Show();

            
    YuanbaoShop_Text2_Bind Show();

            
    YuanbaoShop_Bk4 Show();

            
    local check  tonumber(NpcShop:GetBuyDirectly());
            if(
    check>=1)then
                YuanbaoShop_querengoumaiBind
    :SetCheck(0);
            else
                
    YuanbaoShop_querengoumaiBind:SetCheck(1);
            
    end

            check  
    tonumber(NpcShop:GetUseYBForBind());
            if(
    check>=1)then
                YuanbaoShop_querenzhifuBind
    :SetCheck(0);
            else
                
    YuanbaoShop_querenzhifuBind:SetCheck(1);
            
    end

            
    -- YuanbaoShop_SearchMode_Bind Show();
            if ( 
    lastB_Bind == then
                YuanbaoShop_UpdateList_Bind
    );
            else
                
    YuanbaoShop_UpdateShop_BindlastB_Bind );
            
    end
        
    elseif( nIndex ==  ShopTabIdx.GiftToken then
            YuanbaoShop_Bk1 
    Show();
            
    YuanbaoShop_Bk2 Show();

            
    YuanbaoShop_Text2 Show();
            
    YuanbaoShop_FanquanRateInfo Show();

            
    YuanbaoShop_Bk3 Show();
            
    local check  tonumber(NpcShop:GetBuyDirectly());
            if(
    check>=1)then
                YuanbaoShop_querengoumai
    :SetCheck(0);
            else
                
    YuanbaoShop_querengoumai:SetCheck(1);
            
    end

            
    -- YuanbaoShop_SearchMode_Bind Show();
            if ( 
    lastB_GiftToken == then
                YuanbaoShop_UpdateVisiableProperty
    (SHOP_LIST_A_GIFTTOKENSHOP_LIST_B_GIFTTOKENSHOP_SEARCH_LIST_GIFTTOKEN110)
                
    YuanbaoShop_UpdateList_GiftToken);
            else
                
    YuanbaoShop_UpdateVisiableProperty(SHOP_LIST_A_GIFTTOKENSHOP_LIST_B_GIFTTOKENSHOP_SEARCH_LIST_GIFTTOKENlastA_GiftTokenlastB_GiftTokenlastSelect_GiftToken)
                
    YuanbaoShop_UpdateShop_GiftTokenlastB_GiftToken );
            
    end
        end

    end

    -- °ó¶¨Ôª±¦ end

    --ÊÔ´©
    function YuanbaoShop_OpenFitting()
        if 
    IsIdleLogic() ~= 1 then
            SetNotifyTip
    ("#{YBSD_081225_100}");
            return 
    0;
        
    end
        
        
    if(IsWindowShow("Shop_Fitting")) then
            CloseWindow
    ("Shop_Fitting"true);
        
    end
        RestoreShopFitting
    ();
        
    this:Show();    
        
    MouseCmd_ShopFittingSet();
        
    SetNotifyTip("#{YBSD_081225_099}");
    end
    --ÇëÇóÉ̵êÐÅÏ¢
    function UpdateShopItemshopA shopB)

        
    Clear_XSCRIPT();
            
    Set_XSCRIPT_Function_Name("OpenYuanbaoShop");
            
    Set_XSCRIPT_ScriptID(888902);
            
    Set_XSCRIPT_Parameter(0,ObjCared);
            
    Set_XSCRIPT_Parameter(1,shopA);
            
    Set_XSCRIPT_Parameter(2,shopB);
            
    Set_XSCRIPT_ParamCount(3);
        
    Send_XSCRIPT();
    end
    --===============================================
    -- 
    Button_Clicked
    --===============================================
    function 
    YuanbaoShop_GoodButton_Clicked(nIndex)
        if(
    nIndex or nIndex 18then
            
    return;
        
    end
        GOODS_BUTTONS
    [nIndex]:DoAction();
    end
    --===============================================
    -- 
    PageUp
    --===============================================
    function 
    YuanbaoShop_PageUp()
        
    curPage nPageNum 1;
        if ( 
    curPage >= maxPage then
            curPage 
    maxPage;
        
    end
        NpcShop
    :CloseConfirm();
        
    YuanbaoShop_UpdatePagecurPage );
    end

    --===============================================
    -- 
    PageDown
    --===============================================
    function 
    YuanbaoShop_PageDown()
        
    curPage nPageNum 1;
        if ( 
    curPage )  then
            curPage 
    0;
        
    end
        NpcShop
    :CloseConfirm();
        
    YuanbaoShop_UpdatePagecurPage );
    end

    --===============================================
    -- 
    Close
    --===============================================
    function 
    YuanbaoShop_Close()
        
    ObjCared = -1
        this
    :CareObject(objCared0"YuanbaoShop");
        if(
    IsWindowShow("Shop_Fitting")) then
            CloseWindow
    ("Shop_Fitting"true);
        
    end
        
    if(IsWindowShow("YBShopReference")) then
            CloseWindow
    ("YBShopReference",true)
        
    end
        SetDefaultMouse
    ();
        
    CloseBooth();
        
    NpcShop:CloseConfirm();
        
    RestoreShopFitting();
        
    this:Hide();
    end

    --Ëæ»úÅÅÐò
    function YuanbaoShop_Order()
        
    local    max        g_nTotalNum;
        
    local oldt    = {};
        
    g_tOrderPool= {};

        for 
    1tonumber(max) do
          
    oldt[i] = i-1;
        
    end

        
    if tonumber(NpcShop:GetIsShopReorder()) == 0 then
            g_tOrderPool        
    oldt;
        else
            for 
    1table.getn(oldt) do
             
    local idx    math.random(1table.getn(oldt));
             
    local val    oldt[idx];
             
    g_tOrderPool[i]= val;
             
    table.remove(oldtidx);
            
    end
        end
    end

    --È·ÈÏ°´Å¥
    function YuanbaoShop_querengoumai_Clicked()
        if(
    NpcShop:GetBuyDirectly() == 0)then
    --        YuanbaoShop_querengoumai:SetCheck(0);
            
    NpcShop:SetBuyDirectly(1);
        else
    --        
    YuanbaoShop_querengoumai:SetCheck(1);
            
    NpcShop:SetBuyDirectly(0);
        
    end
    end

    --È·ÈÏ°´Å¥
    function YuanbaoShop_querenzhifu_Clicked()
        if(
    NpcShop:GetUseYBForBind() == 0)then
            NpcShop
    :SetUseYBForBind(1)
        else
            
    NpcShop:SetUseYBForBind(0)
        
    end
    end

    --¿ìËÙ³äÖµ
    function YuanbaoShop_web_Clicked()
        
    GameProduceLogin:OpenURL("https://pay.gate.vn/Business/GateCard/")
    end
    --Ŀ¼ºÍ²éÕÒ˵Ã÷
    function YuanbaoShop_Dis_Clicked()
        
    OpenYBShopReference("#{YBSD_081225_070}")
    end
    --Ôª±¦É̵êʹÓÃ˵Ã÷
    function YuanbaoShop_Dis2_Clicked()
        
    OpenYBShopReference("#{YBSD_081225_098}")
    end
    --ÉñÃØÉ̵êʹÓÃ˵Ã÷
    function YuanbaoShop_Dis3_Clicked()
        
    OpenYBShopReference("#{SMSD_100127_01}")
    end

    --¹ö¶¯ÐÅϢ˳ÐòËæ»úÅÅÁÐ
    function YubanbaoShop_ADRandom()
        
    YuanbaoShop_ScrollInfo_Frame:ClearInfo()

        
    local ADInfo = {
                    
    "#{YBSD_081225_093}",
                    
    "#{YBSD_081225_094}",
                    
    "#{YBSD_081225_095}",
                }
        
    local nADInfoNum table.getn(ADInfo)
        if (
    nil == nADInfoNum or nADInfoNum or nADInfoNum 3then
            nADInfoNum 
    3
        end

        
    for ,do
            
    local idx math.random(,nADInfoNum i)
            
    local str ADInfo[idx]
            
    ADInfo[idx] = ADInfo[nADInfoNum i]
            
    ADInfo[nADInfoNum i] = str
        end

        
    for ,nADInfoNum do
            
    YuanbaoShop_ScrollInfo_Frame:SetScrollInfoFixed(ADInfo[i])
        
    end

    end

    function YuanbaoShop_ResetPos()
        
    YuanbaoShop_Frame:SetProperty("UnifiedXPosition"g_YuanbaoShop_Frame_UnifiedXPosition);
        
    YuanbaoShop_Frame:SetProperty("UnifiedYPosition"g_YuanbaoShop_Frame_UnifiedYPosition);

    end 
    Mình muốn add thêm một shoplist chứa yếu quyết 35 của phái,nhưng add chỉ được button không hiển thị được cái frame ,ai chỉ mình với.
    Khách viếng thăm hãy cùng doanlephuvinh9 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  4. #3
    Thành Viên akiem9x's Avatar
    Ngày tham gia
    Feb 2013
    Bài viết
    255
    Thanks
    260
    Thanked 187 Times in 99 Posts

    Ðề: Hướng Dẫn Sửa Shop Hoàn Chỉnh

    [QUOTE=doanlephuvinh9;910041]Bácc nào cho mình hỏi sao mình add thêm shoplist lại không được,chỉ add được button của shoplist thôi,nhưng lại không mở được shop ...
    yuanbaoshop.lua ở client
    SHOP_LIST_A[7].shoplist[3] = "V§t ph¦m ðµc môn" --"Vat pham doc mon";
    SHOP_LIST_A[7].shoplist[3] = "#GYªu Quyªt 35 Môn Phái" --"YQ 35"; thành số 4 nhé
    Khách viếng thăm hãy cùng akiem9x xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  5. #4
    Thành Viên doanlephuvinh9's Avatar
    Ngày tham gia
    Dec 2014
    Bài viết
    269
    Thanks
    39
    Thanked 34 Times in 30 Posts

    Ðề: Hướng Dẫn Sửa Shop Hoàn Chỉnh

    [QUOTE=akiem9x;910050]
    Trích dẫn Gửi bởi doanlephuvinh9 [Only registered and activated users can see links. ]
    Bácc nào cho mình hỏi sao mình add thêm shoplist lại không được,chỉ add được button của shoplist thôi,nhưng lại không mở được shop ...
    yuanbaoshop.lua ở client
    SHOP_LIST_A[7].shoplist[3] = "V§t ph¦m ðµc môn" --"Vat pham doc mon";
    SHOP_LIST_A[7].shoplist[3] = "#GYªu Quyªt 35 Môn Phái" --"YQ 35"; thành số 4 nhé
    biết là như vậy nhưng không thể add thêm item vào frame đó được,nghĩa là mình muốn thêm 1 shoplist vào frame shoplist Võ học có button là "Yếu Quyết 35 Môn Phái",nhưng khi click vào đó thì lại không mở được,chỉ add được button thôi.
    Khách viếng thăm hãy cùng doanlephuvinh9 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  6. #5
    Thành Viên akiem9x's Avatar
    Ngày tham gia
    Feb 2013
    Bài viết
    255
    Thanks
    260
    Thanked 187 Times in 99 Posts

    Ðề: Hướng Dẫn Sửa Shop Hoàn Chỉnh

    [QUOTE=doanlephuvinh9;910065]
    Trích dẫn Gửi bởi akiem9x [Only registered and activated users can see links. ]

    biết là như vậy nhưng không thể add thêm item vào frame đó được,nghĩa là mình muốn thêm 1 shoplist vào frame shoplist Võ học có button là "Yếu Quyết 35 Môn Phái",nhưng khi click vào đó thì lại không mở được,chỉ add được button thôi.
    Cụ thể
    Yuanbaoshop.lua (Client)
    SHOP_LIST_A[7] = {btn = YuanbaoShop_Button7 , shoplist = {}}
    SHOP_LIST_A[7].shoplist[1] = "#{YBSD_081225_042}" --"Hoang thi thuy cac";
    SHOP_LIST_A[7].shoplist[2] = "Bí t¸ch - Yªu quyªt" --"Bi tich & yeu quyet";
    SHOP_LIST_A[7].shoplist[3] = "V§t ph¦m ðµc môn" --"Vat pham doc mon";
    SHOP_LIST_A[7].shoplist[4] = "#GYªu Quyªt 35 Môn Phái" --"YQ 35";

    Sẽ tương ứng với
    Yuanbaoshop.ua (Sever)
    x888902_g_shoplist[7] = {146, 244, 271, 245} --Î书Ãؼ®

    Nghĩa là shop list 4 bạn cần add là shop 245 ở Server
    Khách viếng thăm hãy cùng akiem9x xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  7. #6
    Thành Viên doanlephuvinh9's Avatar
    Ngày tham gia
    Dec 2014
    Bài viết
    269
    Thanks
    39
    Thanked 34 Times in 30 Posts

    Ðề: Hướng Dẫn Sửa Shop Hoàn Chỉnh

    [QUOTE=akiem9x;910079]
    Trích dẫn Gửi bởi doanlephuvinh9 [Only registered and activated users can see links. ]

    Cụ thể
    Yuanbaoshop.lua (Client)
    SHOP_LIST_A[7] = {btn = YuanbaoShop_Button7 , shoplist = {}}
    SHOP_LIST_A[7].shoplist[1] = "#{YBSD_081225_042}" --"Hoang thi thuy cac";
    SHOP_LIST_A[7].shoplist[2] = "Bí t¸ch - Yªu quyªt" --"Bi tich & yeu quyet";
    SHOP_LIST_A[7].shoplist[3] = "V§t ph¦m ðµc môn" --"Vat pham doc mon";
    SHOP_LIST_A[7].shoplist[4] = "#GYªu Quyªt 35 Môn Phái" --"YQ 35";

    Sẽ tương ứng với
    Yuanbaoshop.ua (Sever)
    x888902_g_shoplist[7] = {146, 244, 271, 245} --Î书Ãؼ®

    Nghĩa là shop list 4 bạn cần add là shop 245 ở Server

    mình đã làm rồi nhưng vẫn không ăn thua,chỉ nhận cái button mà không click vào được ý.
    Khách viếng thăm hãy cùng doanlephuvinh9 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  8. #7
    Thành Viên
    Ngày tham gia
    Aug 2012
    Đang ở
    Hà Nội . Bán Server+clien tlbb new.Liên Hệ [email protected]
    Bài viết
    48
    Thanks
    77
    Thanked 41 Times in 15 Posts

    Ðề: Hướng Dẫn Sửa Shop Hoàn Chỉnh

    [QUOTE=doanlephuvinh9;910100]
    Trích dẫn Gửi bởi akiem9x [Only registered and activated users can see links. ]


    mình đã làm rồi nhưng vẫn không ăn thua,chỉ nhận cái button mà không click vào được ý.
    Bạn kiểm tra lại kỹ 2 file Yuanbaoshop.lua nếu vẫn lỗi ko hiện được đồ là do 1 trong các ID đồ trên shop không tồn tại.
    Khách viếng thăm hãy cùng duc2071990 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

 

 

Các Chủ đề tương tự

  1. Share shop 1 KNB dùng để TEST và hướng dẫn chỉnh giá shop KNB !!!
    Bởi Sói Đẹp Trai trong diễn đàn Releases
    Trả lời: 27
    Bài viết cuối: 11-08-13, 05:00 PM
  2. Cần giúp đỡ về Cash shop và PC Point shop!!
    Bởi clackkein trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 2
    Bài viết cuối: 08-05-13, 03:33 PM
  3. [MU] Cho hỏi về cách edit cash shop và npc shop trên sv scf ss6.2
    Bởi regunnar trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 0
    Bài viết cuối: 28-05-12, 11:13 PM
  4. [TLBB] Xin shop pet và shop đồ+ thú cưỡi cho TLBB 4 lỗ 7 skill
    Bởi note87 trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 6
    Bài viết cuối: 10-02-12, 02:04 PM
  5. Tool chỉnh sửa Shop Game - Mu Shop 1.6 Final
    Bởi SnowBlood™ trong diễn đàn Guides - Kho Lưu trữ
    Trả lời: 22
    Bài viết cuối: 10-09-10, 04:44 PM

Tag của Chủ đề này

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à 08:42 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ệ.