Advertisement
Guest User

Untitled

a guest
Nov 28th, 2019
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //------------------------------------------------------------------------------------------------------------------------
  2. //
  3. // Б¦ёс         : MainMenu  ї№Аь SystemMenuWndАЗ ЅєДЙАПЖы №цАь - SCALEFORM UI
  4. //              : MenuWnd.uc + SystemMenuWnd.uc
  5. //                ёЮАО ёЮґє
  6. //
  7. //------------------------------------------------------------------------------------------------------------------------
  8. class MainMenu extends L2UIGFxScript;
  9. /*
  10. //ЗГ·ЎЅ¬ їЙјВ БВЗҐ
  11. const FLASH_XPOS = 0;
  12. const FLASH_YPOS = -21;
  13.  
  14. //SubMenu іРАМ Flash ГЦґл 250 ~ ГЦјТ 166±оБц ё·ѕЖіхАЅ.
  15. const SUBMENUWIDTH  = 166;
  16. // БЯ±№ ВКАє ёЮґє°Ў ГС10°і, °Ў·О 5°і (202ЗИјї), ЗС±№Ає166 °Ў·О4°і ,µОБЩ ГС 8°і
  17. const MAINMENUWIDTH = 166;
  18.  
  19. //ёЮАО ёЮґє ё®ЅєЖ® №иї­
  20. var array<string> LIST;
  21. //ёЮАО ёЮґє ЕшЖБ №иї­
  22. var array<string> LISTCOMMAND;
  23. //ёЮАО ёЮґє АМё§ №иї­
  24. var array<int> LISTMENUNAME;
  25. //ј­єк1 ёЮґє ё®ЅєЖ® №иї­
  26. var array<string> LISTSUB1;
  27. //ј­єк2 ёЮґєАЗ ј­єк1 №иї­
  28. var array<int> LISTSUB2NUM;
  29. //ј­єк1 ёЮґє ЕшЖБ №иї­
  30. var array<string> LISTSUB1COMMAND;
  31. //ј­єк2 ёЮґє ё®ЅєЖ® №иї­
  32. var array<string> LISTSUB2;
  33.  
  34. //ЗцАз БцїЄ PeaceZoneАО°Ў
  35. var int IsPeaceZone;       
  36.  
  37. //ёЮґєё¦ ЗС№ш ёёµй±в А§ЗС єЇјц
  38. var bool IsStart;
  39.  
  40. //UIїл UC
  41. var L2Util util;
  42.  
  43. var toolTipWnd toolTipWndGFXScript;
  44.  
  45. //ґЬГаЕ° ЕшЖБїл
  46. var string groupName;
  47.  
  48. const DIALOGID_Gohome = 4420;
  49. */
  50. function OnRegisterEvent()
  51. {
  52.     /*
  53.     RegisterEvent( EV_GamingStateEnter );
  54.     RegisterEvent( EV_ShowWindow );
  55.  
  56.     RegisterEvent( EV_DialogOK );
  57.     RegisterEvent( EV_DialogCancel );
  58.  
  59.     RegisterEvent( EV_StateChanged );
  60.     RegisterEvent( EV_SetRadarZoneCode ); //branch 111109*/
  61. }
  62.  
  63. function OnLoad()
  64. {
  65.     /*
  66.     SetClosingOnESC();
  67.  
  68.     registerState( "MainMenu", "GamingState" );
  69.     //SetAlwaysFullAlpha( true );
  70.     SetHavingFocus( false );
  71.    
  72.     SetHUD();//nextFocus ё¦ №«ЅГ ±вБёїЎґВ SetDefaultShow °Ў µСґЩ Гіё® ЗЯАёіЄ єРё®
  73.     SetDefaultShow(true);
  74.     SetAnchor( "", EAnchorPointType.ANCHORPOINT_BottomRight, EAnchorPointType.ANCHORPOINT_TopLeft, 0, 0 );
  75.     //SetAnchor( "", EAnchorPointType.ANCHORPOINT_BottomRight, EAnchorPointType.ANCHORPOINT_BottomRight, FLASH_XPOS, FLASH_YPOS );
  76.    
  77.  
  78.     groupName = "GamingStateShortcut";
  79.     IsStart = false;
  80.  
  81.     //ёЮАО ёЮґє »эјєїл №иї­ »эјє
  82.     SetLISTDATA(); 
  83.  
  84.     util = L2Util(GetScript("L2Util"));
  85.  
  86.     toolTipWndGFXScript = toolTipWnd(GetScript("toolTipWnd"));  */
  87. }
  88. /*
  89. function OnShow()
  90. {
  91.     // empty
  92.    
  93. }
  94.  
  95. function OnFlashLoaded()
  96. {
  97.     // empty
  98. }  
  99.  
  100. function OnHide(){}
  101.  
  102. function OnFocus(bool bFlag, bool bTransparency)
  103. {
  104.     local array<GFxValue> args;
  105.     local GFxValue invokeResult;
  106.  
  107.     AllocGFxValues(args,2);
  108.     args[0].setbool(bflag);
  109.     args[1].setbool(bTransparency);
  110.     AllocGFxValue(invokeResult);
  111.        
  112.     Invoke("_root.onFocus", args, invokeResult);
  113.  
  114.     DeallocGFxValue(invokeResult);
  115.     DeallocGFxValues(args);
  116. }
  117.  
  118. function OnCallUCLogic( int logicID, string param )
  119. {  
  120.     local string strSection;
  121.  
  122.     ParseString(param, "strSection", strSection);
  123.    
  124.     if( logicID == 0 )
  125.     {
  126.         switch( strSection )
  127.         {
  128.             //ДщЅєЖ®
  129.             case "Quest":
  130.                 ToggleOpenQuestWnd();
  131.                 break;
  132.             //ЗчёНѕЧјЗ
  133.             case "Clan":
  134.                 ToggleOpenClanWnd();
  135.                 break;
  136.             //АОёЖ°ьё®
  137.             case "Personal":
  138.                 ToggleOpenPersonalConnectionsWnd();
  139.                 break;
  140.             //ЅєЕі&ё¶№э
  141.             case "Skill":
  142.                 ToggleOpenSkillWnd();
  143.                 break;
  144.             //ДіёЇЕН Б¤єё
  145.             case "Char":
  146.                 ToggleOpenCharInfoWnd();
  147.                 break;
  148.             //АОєҐЕдё®
  149.             case "Inven":
  150.                 ToggleOpenInventoryWnd();
  151.                 break;
  152.             //ѕЧјЗ
  153.             case "Action":
  154.                 ToggleOpenActionWnd();
  155.                 break;
  156.             //Бцµµ
  157.             case "Map":
  158.                 RequestOpenMinimap();
  159.                 break;
  160.         }
  161.     }
  162.  
  163.     //Sub1 ёЮґєїЎј­ єёі»ґВ °Є
  164.     else if( logicID == 1 )
  165.     {
  166.         switch( strSection )
  167.         {
  168.             case "Quit":
  169.                 ExecuteEvent(EV_OpenDialogQuit);
  170.                 break;
  171.             case "Restart":
  172.                 ExecuteEvent(EV_OpenDialogRestart);
  173.                 break;
  174.             //їЙјЗГў ї­±в
  175.             case "Option":
  176.                 HandleShowOptionWnd();
  177.                 break;
  178.             //ёЕЕ©·О
  179.             case "Macro":
  180.                 ExecuteEvent(EV_MacroShowListWnd);
  181.                 break;
  182.             //ґЬГаЕ°
  183.             case "Shortcut":
  184.                 HandleShowShortcutAssignWnd();
  185.                 break;
  186.             //ј­єсЅє
  187.             case "Service":
  188.                 //ѕшАЅ
  189.                 break;
  190.             //ГЯ°Ў±вґЙ
  191.             case "Add":
  192.                 //ѕшАЅ
  193.                 break;
  194.             //Бцµµ
  195.             case "Map":
  196.                 RequestOpenMinimap();
  197.                 break;
  198.             //№Ъ№°°ь > »иБ¦20121109
  199.             /*
  200.             case "Museum":
  201.                 ExecuteEvent(EV_StatisticWndshow);
  202.                 break;
  203.             */
  204.             //°ФЅГЖЗ
  205.             case "Board":
  206.                 HandleShowBoardWnd();
  207.                 break;
  208.             //°ФЅГЖЗ/№Ї°нґдЗП±в
  209.             case "QABoard":
  210.                 handleShowQABoardWnd();
  211.                 break;
  212.             //MSN ёЮЅЕБ®
  213.             /*13.01.23 АМИД »иБ¦ µЛґПґЩ.
  214.             case "MSN":
  215.                 ToggleMsnWindow();
  216.                 break;
  217.             */
  218.             //АОёЖ°ьё®
  219.             case "Personal":
  220.                 ToggleOpenPersonalConnectionsWnd();
  221.                 break;
  222.             //ЖДЖјёЕДЄ
  223.             case "Party":
  224.                 HandlePartyMatchWnd();
  225.                 break;
  226.             //їмЖнЗФ
  227.             case "Post":
  228.                 HandleShowPostBoxWnd();
  229.                 break;
  230.             //°іАО»уБЎ
  231.             case "Shop":
  232.                 //ѕшАЅ
  233.                 break;
  234.             //»уЗ° АОєҐЕдё®
  235.             case "Product":
  236.                 HandleShowProductInventory();
  237.                 break;
  238.             //µµїтё»
  239.             case "Help":
  240.                 HandleShowHelpHtmlWnd();
  241.                 break;
  242.             //БшБ¤
  243.             case "Petition":
  244.                 HandleShowPetitionBegin();
  245.                 break;
  246.             case "instanceZone":
  247.                 HandleShowInstanceZone();
  248.                 break;
  249.             //PC№ж АМєҐЖ®
  250.             case "PC":
  251.                 HandleShowPCWnd();
  252.                 break;
  253.             //24Hz
  254.             /*
  255.             case "24Hz":
  256.                 W24HzShowWnd();
  257.                 break;
  258.             */      
  259.             //µїїµ»у імИ­
  260.             case "Rec":
  261.                 HandleShowMovieCaptureWnd();
  262.                 break;
  263.             //ё®ЗГ·№АМ імИ­
  264.             case "reRec":
  265.                 DoAction( class'UICommonAPI'.static.GetItemID(55) );
  266.                 break;
  267.             //ИЁЖдАМБц
  268.             case "Home":
  269.                 linkHomePage();
  270.                 break;
  271.             //ЖЗёЕ»уБЎ
  272.             case "SellStore":
  273.                 DoAction( class'UICommonAPI'.static.GetItemID(10) );
  274.                 break;
  275.             //±ёёЕ»уБЎ
  276.             case "BuyStore":
  277.                 DoAction( class'UICommonAPI'.static.GetItemID(28) );
  278.                 break;
  279.             //АП°эЖЗёЕ»уБЎ
  280.             case "AllSell":
  281.                 DoAction( class'UICommonAPI'.static.GetItemID(61) );
  282.                 break;
  283.             //»уБЎ°Л»ц
  284.             case "StoreSearch":
  285.                 DoAction( class'UICommonAPI'.static.GetItemID(57) );
  286.                 break;
  287.             case "ClanSearch":
  288.                 HandleShowClanSearch();
  289.                 break;
  290.  
  291.             case "IngameNoticeWnd":
  292.                 handleShowInGameNoticeWnd();
  293.        
  294.                 break;
  295.             case "PathToAwakening":
  296.                 //9800 ЅЗЗа
  297.                 ExecuteEvent( EV_ShowWebPathMainPage );
  298.                 break;
  299.            
  300.         }
  301.     }
  302.     // ЕшЖБ »эјє
  303.     else if( logicID == 10001 )
  304.     {
  305.         toolTipWndGFXScript.externalCall(1, param);
  306.     }
  307.     // ЕшЖБ Б¦°Е
  308.     else if( logicID == 10002 )
  309.     {
  310.         toolTipWndGFXScript.externalCall(2, "");
  311.     }
  312. }
  313.  
  314. function handleShowInGameNoticeWnd()
  315. {
  316.     local IngameNoticeWnd script;
  317.    
  318.     script = IngameNoticeWnd ( GetScript("IngameNoticeWnd") );
  319.     script.MainMenuShow();
  320. }
  321.  
  322. function HandleShowClanSearch()
  323. {
  324.     local string windowName;  
  325.  
  326.     windowName = "ClanSearch";
  327.  
  328.     if ( class'UIAPI_WINDOW'.static.IsShowWindow (windowName) )
  329.     {
  330.         class'UIAPI_WINDOW'.static.HideWindow(windowName);
  331.     }
  332.     else
  333.     {
  334.         class'UIAPI_WINDOW'.static.ShowWindow(windowName);
  335.     }
  336.    
  337. }
  338.  
  339.  
  340. function OnEvent(int Event_ID, string param)
  341. {
  342.     local int zonetype;
  343.  
  344.     if( Event_ID == EV_GamingStateEnter )
  345.     {
  346.         if( IsStart == false )
  347.         {
  348.             SetShowWindow();
  349.  
  350.             CreateMainMenu();
  351.             CreateMainMenuTooltip();
  352.  
  353.             CreateMenuWidth();
  354.  
  355.             CreateSub1Menu();
  356.             CreateSUB1Tooltip();
  357.  
  358.             CreateSub2Menu();
  359.             IsStart = true;
  360.         }
  361.         else
  362.         {
  363.             SetShowWindow();
  364.             CreateSub1Menu();
  365.             CreateSUB1Tooltip();
  366.             CreateSub2Menu();
  367.         }
  368.     }
  369.     else if ( Event_ID == EV_SetRadarZoneCode )
  370.     {
  371.         ParseInt( param, "ZoneCode", zonetype );       
  372.         if (zonetype == 12)
  373.         {
  374.             IsPeaceZone = 1;
  375.         }
  376.         else
  377.         {
  378.             IsPeaceZone = 0;
  379.         }
  380.     }
  381.     else if( Event_ID == EV_DialogOK )
  382.     {
  383.         HandleDialogOK();
  384.     }
  385.     else if( Event_ID == EV_ShowWindow )
  386.     {
  387.         HandleSubMenuOpen( param );
  388.     }
  389.     else if( Event_ID == EV_StateChanged )
  390.     {
  391.         HandleStateChange( param );
  392.     }
  393. }
  394.  
  395. function changeEnterChat( string str )
  396. {
  397.     groupName = str;
  398.     updateTooltip();
  399. }
  400.  
  401.  
  402. function updateTooltip()
  403. {      
  404.     CreateMainMenuTooltip();
  405.     CreateSUB1Tooltip();
  406. }
  407.  
  408.  
  409. function HandleStateChange( String state )
  410. {
  411.     local   FlightShipCtrlWnd           scriptShip;
  412.     local   FlightTransformCtrlWnd      scriptTrans;
  413.    
  414.     if( state == "GAMINGSTATE" )
  415.     {
  416.         scriptShip = FlightShipCtrlWnd ( GetScript("FlightShipCtrlWnd") );
  417.         scriptTrans = FlightTransformCtrlWnd ( GetScript("FlightTransformCtrlWnd") );
  418.  
  419.         if(GetOptionBool( "CommunIcation", "EnterChatting" ))
  420.         {  
  421.             changeEnterChat( "TempStateShortcut" );        
  422.         }
  423.         else
  424.         {
  425.             changeEnterChat( "GamingStateShortcut" );
  426.         }
  427.        
  428.         //
  429.         if(scriptShip.isNowActiveFlightShipShortcut)    // єсЗаБ¤ Б¶Бѕ ёрµе¶уёй      
  430.         {
  431.             //if(GetOptionBool( "Game", "EnterChatting" ))  {class'ShortcutAPI'.static.DeactivateGroup("TempStateShortcut");}
  432.             //Debug("isNowActiveFlightShipShortcut???? єсЗаБ¤ Б¶Бѕ ёрµе¶уёй");
  433.             changeEnterChat( "FlightStateShortcut" );
  434.             //class'ShortcutAPI'.static.ActivateGroup("FlightStateShortcut");
  435.         }
  436.         else if (scriptTrans.isNowActiveFlightTransShortcut ) // єсЗа єЇЅЕГј ёрµе¶уёй
  437.         {
  438.             //Debug("isNowActiveFlightTransShortcut????  єсЗа єЇЅЕГј ёрµе");
  439.             changeEnterChat("FlightTransformShortcut");
  440.             //if(GetOptionBool( "Game", "EnterChatting" ))  {class'ShortcutAPI'.static.DeactivateGroup("TempStateShortcut");}
  441.             //class'ShortcutAPI'.static.ActivateGroup("FlightTransformShortcut");
  442.         }
  443.     }
  444. }
  445.  
  446.  
  447. function HandleSubMenuOpen( string a_Param )
  448. {
  449.     local string WNDName;
  450.     ParseString(a_Param, "Name", WNDName);
  451.  
  452.     if( WNDName == "SystemMenuWnd" )
  453.     {
  454.         //ShowWindowWithFocus();
  455.         ShowWindow();
  456.         SetFocus();
  457.         OpenSub1Menu();
  458.     }
  459. }
  460.  
  461. /**
  462.  * ёЮАО ёЮґє ёёµй±в.
  463.  * 0№ш ИЈГв
  464.  */
  465. function CreateMainMenu()
  466. {
  467.     dispatchEventToFlash_String(0 , TransArrayToString(LIST));
  468. }
  469.  
  470. /**
  471.  * ёЮґє іРАМ
  472.  */
  473. function CreateMenuWidth()
  474. {
  475.     // ЗГ·ЎЅГ ЕёАФ µҐАМЕё АОЅєЕПЅє »эјє
  476.     local array<GFxValue> args;
  477.     local GFxValue invokeResult;
  478.  
  479.     AllocGFxValues(args, 2);       
  480.     AllocGFxValue(invokeResult);
  481.  
  482.     // °ўјє ѕЛ¶ч : АМєҐЖ® №шИЈ 5№ш
  483.     args[0].SetInt( 5 );
  484.  
  485.     CreateObject(args[1]);
  486.     args[1].SetMemberInt( "MAINMENUWIDTH" , MAINMENUWIDTH );
  487.     args[1].SetMemberInt( "SUBMENUWIDTH"  , SUBMENUWIDTH );
  488.      
  489.     Invoke( "_root.onEvent", args, invokeResult );
  490.  
  491.     DeallocGFxValue( invokeResult );
  492.     DeallocGFxValues( args );  
  493. }
  494.  
  495. /**
  496.  * Sub1 ёЮґє ёёµй±в.
  497.  */
  498. function CreateSub1Menu()
  499. {
  500.    
  501.     LISTSUB1.remove( 0, LISTSUB1.Length );
  502.     SetLISTSUB1DATA()
  503.     dispatchEventToFlash_String(10 , TransArrayToString(LISTSUB1));    
  504.     //Debug("! --- CreateSub1Menu create" @ LISTSUB1.length );
  505. }
  506.  
  507. /**
  508.  * Sub2 ёЮґє ёёµй±в.
  509.  */
  510. function CreateSub2Menu()
  511. {
  512.    
  513.     LISTSUB2.remove( 0, LISTSUB2.Length );
  514.     SetLISTSUB2DATA()
  515.     dispatchEventToFlash_String(20 , TransArrayToString(LISTSUB2));    
  516.     //Debug("! --- CreateSub2Menu create" @ LISTSUB2.length);
  517. }
  518.  
  519. /**
  520.  * ј­єк ёЮґє ї­±в.
  521.  */
  522. function OpenSub1Menu()
  523. {
  524.     dispatchEventToFlash_String(100 , "");     
  525. }
  526.  
  527.  
  528.  
  529. /**
  530.  * ЗС±№ѕо ёЮАО ёЮґє јіБ¤.
  531.  */
  532. function SetLISTDATA()
  533. {  
  534.     local int MAINum;
  535.     MAINum = 0;
  536.     SetLIST(  MAINum, 434, "Char", "DetailStatusWnd" );     //ДіёЇЕН Б¤єё
  537.     SetLIST(++MAINum, 1,   "Inven","InventoryWnd");         //АОєҐЕдё®
  538.     SetLIST(++MAINum, 197, "Action","ActionWnd");           //ѕЧјЗ
  539.     SetLIST(++MAINum, 196, "Skill","MagicSkillWnd");        //ЅєЕі
  540.     SetLIST(++MAINum, 198, "Quest","QuestTreeWnd");         //ДщЅєЖ®
  541.     SetLIST(++MAINum, 314, "Clan", "ClanWnd");              //ЗчёНѕЧјЗ
  542.     SetLIST(++MAINum, 447, "Map", "MinimapWnd" );           //ёг
  543.     SetLIST(++MAINum, 2641,"Total","SystemMenuWnd");        //ЕлЗХёЮґє
  544. }
  545.  
  546. function SetLIST (int MAINum, int stringNum, string menuID, string tooltipCommand)
  547. {
  548.     local string MenuName;
  549.     MenuName = GetSystemString(stringNum);     
  550.     LIST[MAINum] = MAINum $ "|" $ MenuName $ "|" $ menuID $ "|<NORMAL_FONT13>" $ MenuName $ "<br/>&lt;ґЬГаЕ°:&gt;";  
  551.     LISTMENUNAME[MAINum]= stringNum;
  552.     LISTCOMMAND[MAINum] = tooltipCommand;
  553. }
  554.  
  555. function CreateMainMenuTooltip()
  556. {
  557.     local int i;
  558.     local array<string> LISTToolTip;
  559.     for (i=0; i< LISTCOMMAND.Length ; i++)
  560.     {
  561. //      Debug("CreateMainMenuTooltip" @ LISTMENUNAME[i] @  LISTCOMMAND[i]);
  562.         LISTToolTip[i] = setMainShortcutString( LISTMENUNAME[i], LISTCOMMAND[i]);
  563.     }
  564.     dispatchEventToFlash_String(1 , TransArrayToString(LISTToolTip));  
  565. }
  566.  
  567. function string TransArrayToString( array<string> arr )
  568. {
  569.     local int i;
  570.     local string str;
  571.  
  572.     for( i = 0 ; i < arr.Length ; i ++ )
  573.     {
  574.         if( i !=  arr.Length - 1 )
  575.         {
  576.             str = str $ arr[i] $ "!";
  577.         }
  578.         else
  579.         {
  580.             str = str $ arr[i];
  581.         }
  582.     }
  583.     return str;
  584. }
  585.  
  586. function SetLISTSUB1DATA()
  587. {
  588.     local ELanguageType Language;  
  589.     local int sub1num;
  590.     local int bValue;
  591.  
  592.     local bool isClassic;
  593.    
  594.     isClassic = getInstanceUIData().getIsClassicServer();
  595.  
  596.     Language = GetLanguage();
  597.     sub1num=0;
  598.  
  599.     setLISTSUB1(  sub1num, 148,  "Quit",    false, 1, "");                  //°ФАУ Бѕ·б
  600.     setLISTSUB1(++sub1num, 147,  "Restart", false, 1, "");                  //ё®ЅєЕёЖ®
  601.     inputDivision( ); //єРё®ј±--------------------------------------------------------------------
  602.     setLISTSUB1(++sub1num, 146,  "Option",  false, 1, "OptionWnd");         //їЙјЗ
  603.     setLISTSUB1(++sub1num, 711,  "Macro",   false, 1, "MacroWnd");          //ёЕЕ©·О
  604.     setLISTSUB1(++sub1num, 1523, "Shortcut",false, 1, "");                  //ґЬГаЕ°
  605.     inputDivision( ); //єРё®ј±--------------------------------------------------------------------
  606.     setLISTSUB1(++sub1num, 2643, "Service", true,  1, "");                  //ј­єсЅє 
  607.     inputDivision( ); //єРё®ј±--------------------------------------------------------------------
  608.     setLISTSUB1(++sub1num, 2642, "Add_Tooltip", true, 1, "");               //ГЯ°Ў±вґЙ 
  609.     //inputDivision( ); //єРё®ј±--------------------------------------------------------------------
  610.     //setLISTSUB1(++sub1num, 2600, "Museum",  false, 1, "");                  //№Ъ№°°ь > »иБ¦20121109
  611.     inputDivision( ); //єРё®ј±--------------------------------------------------------------------
  612.     setLISTSUB1(++sub1num, 387,  "Board",   false, 1, "BoardWnd");          //°ФЅГЖЗ
  613.     //13.02.27 АМИД ГЯ°Ў µЛґПґЩ.
  614.  
  615.     //ЗШїЬїЎј­ »зїл ЗПБц ѕКґВ ёЮґє 2013.12.06¤У;
  616.     if (Language != ELanguageType.LANG_Korean) bValue = 0;else bValue = 1
  617.     if ( isClassic ) bValue = 0;
  618.     setLISTSUB1(++sub1num, 3136,  "QABoard",   false, bValue, "");          //°ФЅГЖЗ/№Ї°нґдЗП±в   
  619.     //setLISTSUB1(++sub1num, 387,  "QABoard",   false, 1, "QABoardWnd");          //°ФЅГЖЗ/№Ї°нґдЗП±в 
  620.  
  621.     //13.01.23 АМИД »иБ¦ µЛґПґЩ.
  622.     // БЯ±№ ВКїЎґВ msn АМ ѕшґЩ.±ЧїЎ µыёҐ ї№їЬ Гіё®
  623.     //if (Language == ELanguageType.LANG_Chinese) GetINIBool("Localize", "UseMsn", bValue, "L2.ini"); //Б¶°З Б¶»з
  624.     //else bValue = 1;
  625.     //setLISTSUB1(++sub1num, 896,  "MSN",     false, bValue, "");               //ёЮЅЕБ®
  626.  
  627.     setLISTSUB1(++sub1num, 2383, "Personal",false, 1, "PersonalConnectionsWnd");  //АОёЖ
  628.     setLISTSUB1(++sub1num, 389,  "Party",   false, 1, "PartyMatchWnd");     //ЖДЖјёЮДЄ
  629.     setLISTSUB1(++sub1num, 3068,  "ClanSearch",  false, 1, "");             //ЗчёН °ЎАФ
  630.     setLISTSUB1(++sub1num, 2074, "Post",    false, 1, "PostWnd");           //їмЖнЗФ
  631.     inputDivision( ); //єРё®ј±--------------------------------------------------------------------
  632.     setLISTSUB1(++sub1num, 498,  "Shop",    true , 1, "");                  //°іАО»уБЎ
  633.  
  634.     GetINIBool("PrimeShop", "UseGoodsInventory", bValue, "L2.ini");         //Б¶°З Б¶»з
  635.     setLISTSUB1(++sub1num, 2469, "Product", false, bValue, "");             //»уЗ°АОєҐЕдё®
  636. }
  637.  
  638. function setLISTSUB1(int sub1num, int stringNUm, string menuName,  bool useSubMenu, int bValue, string tooltip)
  639. {
  640.     if (bValue == 1)    //ЗШґз Б¶°ЗАМ ёВАёёй
  641.     {
  642.         LISTSUB1[LISTSUB1.Length] = sub1num$"|"$GetSystemString(stringNUm)$"|"$menuName$"|"; // ёЮґє АФ·В ѕЖґПёй »иБ¦
  643.     }
  644.     if ( useSubMenu )   //ј­єк ёЮґє°Ў АЦАёёй
  645.     {
  646.             LISTSUB2NUM[LISTSUB2NUM.Length] = sub1num;  //ј­єкёЮґє №шИЈ АФ·В
  647.     }  
  648.     LISTSUB1COMMAND[sub1num] = tooltip; //ЕшЖБїЎ ДїёЗµе АФ·В
  649. }
  650.  
  651. function CreateSUB1Tooltip( )
  652. {  
  653.     local int i;   
  654.     local array<string> LISTSUB1ToolTip;
  655.     for ( i =0 ; i< LISTSUB1COMMAND.Length ; i++)
  656.     {
  657.         LISTSUB1ToolTip[i] = setSubShortcutString(LISTSUB1COMMAND[i]);
  658.     }
  659.     dispatchEventToFlash_String(15 , TransArrayToString(LISTSUB1ToolTip))
  660. }
  661.  
  662. function inputDivision( )
  663. {
  664.     local string divisionStr ;
  665.     divisionStr = "999|єРё®ј±Divi|false|Tooltip";
  666.     if ( LISTSUB1[LISTSUB1.Length - 1] != divisionStr ) //їЙјЗїЎ АЗЗШ ёЮґє°Ў ЕлВ°·О »з¶уБцґВ °жїм µрєсБЇАМ µО№ш µйѕо°ЎґВ °Й №жБц
  667.     {      
  668.         LISTSUB1[LISTSUB1.Length] = divisionStr;   
  669.     }  
  670. }
  671.  
  672. function SetLISTSUB2DATA()
  673. {  
  674.     local int bValue ;
  675.     local int sub2num ;
  676.     local bool isClassic;
  677.  
  678.     local ELanguageType Language;  
  679.    
  680.     isClassic = getInstanceUIData().getIsClassicServer();
  681.     Language = GetLanguage();
  682.  
  683.     sub2num =0;
  684.  
  685.     setLISTSUB2(LISTSUB2NUM[2],   sub2num, 2644, "|SellStore|false", 1);    //ЖЗёЕ»уБЎ
  686.     setLISTSUB2(LISTSUB2NUM[2], ++sub2num, 2645, "|BuyStore|false", 1);     //±ёёЕ»уБЎ
  687.     setLISTSUB2(LISTSUB2NUM[2], ++sub2num, 2646, "|AllSell|false", 1);      //АП°эЖЗёЕ»уБЎ
  688.     setLISTSUB2(LISTSUB2NUM[2], ++sub2num, 1283, "|StoreSearch|false", 1);  //»уБЎ°Л»ц
  689.     /*-----------------------------------------------------------------------------------------------------------------------------*/      
  690.     if ( isClassic ) bValue = 0;else bValue = 1;
  691.     setLISTSUB2(LISTSUB2NUM[1], ++sub2num, 2796, "|InstanceZone|false", bValue); //АОЅєЕПЅє Бё
  692.    
  693.     //Е¬·ЎЅД ј­№цїЎј­ґВ PC№ж ЖчАОЖ®°Ў єёАМБц ѕКАЅ.
  694.     GetINIBool("Localize", "UsePCBangPoint", bValue, "L2.ini");             //Б¶°З°Л»ц
  695.     if ( isClassic ) bValue = 0;
  696.     setLISTSUB2(LISTSUB2NUM[1], ++sub2num, 1277, "|PC|false", bValue);      //PC№ж АМєҐЖ®
  697.  
  698.     //GetINIBool("URL", "bUse24HZ", bValue, "L2.ini");                        //Б¶°З °Л»ц
  699.     //setLISTSUB2(LISTSUB2NUM[1], ++sub2num, 2410, "|24Hz|false", bValue);    //24Hz
  700.     setLISTSUB2(LISTSUB2NUM[1], ++sub2num, 2448, "|Rec|false",  1);         //µїїµ»у імИ­
  701.     setLISTSUB2(LISTSUB2NUM[1], ++sub2num, 2647, "|reRec|false",  1);       //ё®ЗГ·№АМ імИ­
  702.     /*-----------------------------------------------------------------------------------------------------------------------------*/
  703.     if ( isClassic ) bValue = 0;else bValue = 1;
  704.     setLISTSUB2(LISTSUB2NUM[0], ++sub2num, 145, "|Help|false",  bValue);        //µµїтё»
  705.    
  706.     //ЗС±№ їЬїЎј­ґВ 1:1 БшБ¤ №®АЗ°Ў ѕшАЅ ±ЧїЎ ґЩёҐ ї№їЬ Гіё®
  707.     if (Language != ELanguageType.LANG_Korean) bValue = 0;else bValue = 1
  708.     setLISTSUB2(LISTSUB2NUM[0], ++sub2num, 470, "|Petition|false",  bValue);    //БшБ¤
  709.     //ЗШїЬїЎј­ »зїл ЗПБц ѕКґВ ёЮґє 2013.12.0
  710.     if (Language != ELanguageType.LANG_Korean) bValue = 0;else bValue = 1
  711.     setLISTSUB2(LISTSUB2NUM[0], ++sub2num, 3169, "|IngameNoticeWnd|false",  bValue);    //БўјУ°шБцГў
  712.     setLISTSUB2(LISTSUB2NUM[0], ++sub2num, 2257, "|Home|false",  1);       //ИЁЖдАМБц
  713.     //ЖдЅє Ех ѕоїюАМЕ«
  714.     if ( !GetINIBool("Localize", "UsePathToAwakening", bValue, "L2.ini")) bValue = 0;
  715.     setLISTSUB2(LISTSUB2NUM[0], ++sub2num, 5178, "|PathToAwakening|false", bValue);
  716. }
  717.  
  718. function setLISTSUB2(int snub1num, int sub2num, int stringNUm, string etc,  int  bValue)                   
  719. {
  720.     if (bValue == 1)
  721.          LISTSUB2[LISTSUB2.Length] = snub1num $ "||" $ sub2num $ "|" $ GetSystemString(stringNUm) $ etc;//Tool";
  722. }
  723.  
  724.  
  725.  
  726. /**
  727.  * ShowWindow ГўАМ ї­·Б АЦА»¶§ ґЩЅГ ї­Бц ѕК±в.
  728.  */
  729. function SetShowWindow()
  730. {  
  731.     if( IsShowWindow() == false )
  732.     {
  733.         ShowWindow();
  734.     }
  735. }
  736.  
  737.  
  738. function string setMainShortcutString( int sysNum, string commandName )
  739. {
  740.     local ShortcutCommandItem   commandItem;
  741.     local string                strShort;
  742.     local OptionWnd     Script;
  743.  
  744.     Script = OptionWnd( GetScript( "OptionWnd" ) );
  745.  
  746.     strShort = "<NORMAL_FONT13>" $ GetSystemString( sysNum ) $ "<br>&lt;" $ GetSystemString(1523) $ ": ";
  747.  
  748.     //ДщЅєЖ®
  749.     class'ShortcutAPI'.static.GetAssignedKeyFromCommand( groupName, "ShowWindow Name=" $ commandName, commandItem);
  750.  
  751.     //ґЬГаЕ° јіён...
  752.     if( commandItem.subkey1 != "" )
  753.     {
  754.         strShort = strShort $ Script.GetUserReadableKeyName( commandItem.subkey1 ) $ "+";
  755.     }
  756.     if( commandItem.subkey2 != "" )
  757.     {
  758.         strShort = strShort $ Script.GetUserReadableKeyName( commandItem.subkey2 ) $ "+";
  759.     }
  760.     if( commandItem.Key != "" )
  761.     {
  762.         if( commandName == "InventoryWnd" )
  763.         {
  764.             strShort = strShort $ Script.GetUserReadableKeyName( commandItem.Key ) $ ",";          
  765.         }
  766.         else
  767.             strShort = strShort $ Script.GetUserReadableKeyName( commandItem.Key ) $ "&gt;</NORMAL_FONT13>";
  768.     }
  769.  
  770.     if( commandItem.subkey1 == "" && commandItem.subkey2 == "" && commandItem.Key == "" )
  771.     {
  772.         strShort = strShort $ "ѕшАЅ&gt;</NORMAL_FONT13>";
  773.     }
  774.  
  775.     if( commandName == "InventoryWnd" )
  776.     {
  777.         class'ShortcutAPI'.static.GetAssignedKeyFromCommand( "GamingStateShortcut", "TabShowInventoryWindow", commandItem);
  778.  
  779.         if( commandItem.subkey1 != "" )
  780.         {
  781.             strShort =  strShort $ Script.GetUserReadableKeyName( commandItem.subkey1 ) $ "+";
  782.         }
  783.         if( commandItem.subkey2 != "" )
  784.         {
  785.             strShort = strShort $ Script.GetUserReadableKeyName( commandItem.subkey2 ) $ "+";
  786.         }
  787.         if( commandItem.Key != "" )
  788.         {
  789.             strShort = strShort $ Script.GetUserReadableKeyName( commandItem.Key ) $ "&gt;</NORMAL_FONT13>";
  790.         }  
  791.     }
  792.  
  793.     return strShort;
  794. }
  795.  
  796. function string setSubShortcutString( string commandName )
  797. {
  798.     local ShortcutCommandItem   commandItem;
  799.     local string                strShort;
  800.     local OptionWnd     Script;
  801.  
  802.     if( commandName == "" )
  803.     {
  804.         return "";
  805.     }
  806.  
  807.     Script = OptionWnd( GetScript( "OptionWnd" ) );
  808.  
  809.     strShort = "<NORMAL_FONT13>&lt;" $ GetSystemString(1523) $ ": ";
  810.  
  811.     //ДщЅєЖ®
  812.     class'ShortcutAPI'.static.GetAssignedKeyFromCommand( groupName, "ShowWindow Name=" $ commandName, commandItem);
  813.  
  814.     //ґЬГаЕ° јіён...
  815.     if( commandItem.subkey1 != "" )
  816.     {
  817.         strShort = strShort $ Script.GetUserReadableKeyName( commandItem.subkey1 ) $ "+";
  818.     }
  819.     if( commandItem.subkey2 != "" )
  820.     {
  821.         strShort = strShort $ Script.GetUserReadableKeyName( commandItem.subkey2 ) $ "+";
  822.     }
  823.     if( commandItem.Key != "" )
  824.     {
  825.         strShort = strShort $ Script.GetUserReadableKeyName( commandItem.Key ) $ "&gt;</NORMAL_FONT13>";
  826.     }
  827.  
  828.     if( commandItem.subkey1 == "" && commandItem.subkey2 == "" && commandItem.Key == "" )
  829.     {
  830.         class'ShortcutAPI'.static.GetAssignedKeyFromCommand( "GamingStateShortcut", "ShowWindow Name=" $ commandName, commandItem);
  831.         if( commandItem.subkey1 != "" )
  832.         {
  833.         strShort = strShort $ Script.GetUserReadableKeyName( commandItem.subkey1 ) $ "+";
  834.         }
  835.         if( commandItem.subkey2 != "" )
  836.         {
  837.             strShort = strShort $ Script.GetUserReadableKeyName( commandItem.subkey2 ) $ "+";
  838.         }
  839.         if( commandItem.Key != "" )
  840.         {
  841.             strShort = strShort $ Script.GetUserReadableKeyName( commandItem.Key ) $ "&gt;</NORMAL_FONT13>";
  842.         }
  843.     }
  844.  
  845.     if( commandItem.subkey1 == "" && commandItem.subkey2 == "" && commandItem.Key == "" )
  846.     {
  847.         strShort = "";
  848.     }
  849.  
  850.     //strShort = substitute( strShort, "<", "&lt;", true );
  851.     //strShort = substitute( strShort, ">", "&gt;", true );
  852.  
  853.     return strShort;
  854. }
  855.  
  856. /*
  857. function int Split( string strInput, string delim, out array<string> arrToken )
  858. {
  859.     local int arrSize;
  860.    
  861.     while ( InStr(strInput, delim)>0 )
  862.     {
  863.         arrToken.Insert(arrToken.Length, 1);
  864.         arrToken[arrToken.Length-1] = Left(strInput, InStr(strInput, delim));
  865.         strInput = Mid(strInput, InStr(strInput, delim)+1);
  866.         arrSize = arrSize + 1;
  867.     }
  868.     arrToken.Insert(arrToken.Length, 1);
  869.     arrToken[arrToken.Length-1] = strInput;
  870.     arrSize = arrSize + 1;
  871.    
  872.     return arrSize;
  873. }
  874. */
  875.  
  876.  
  877.  
  878. /**
  879.  * ДщЅєЖ® Гў ї­±в
  880.  */
  881. function ToggleOpenQuestWnd()
  882. {
  883.     local WindowHandle win;
  884.     win = GetWindowHandle( "QuestTreeWnd" );
  885.    
  886.     if( win.IsShowWindow() )
  887.     {
  888.         win.HideWindow();
  889.         PlaySound("InterfaceSound.map_close_01");
  890.     }
  891.     else
  892.     {
  893.         win.ShowWindow();
  894.         win.SetFocus();
  895.         PlaySound("InterfaceSound.map_open_01");
  896.        
  897.     }  
  898. }
  899.  
  900. /**
  901.  * ЗчёН Гў ї­±в
  902.  */
  903. function ToggleOpenClanWnd()
  904. {
  905.     local WindowHandle win;
  906.  
  907.     win = getWindowHandleCheckClassic( "ClanWnd" );
  908.    
  909.     if( win.IsShowWindow() )
  910.     {
  911.         win.HideWindow();
  912.         PlaySound("InterfaceSound.charstat_close_01");
  913.     }
  914.     else
  915.     {
  916.         win.ShowWindow();
  917.         win.SetFocus();
  918.         PlaySound("InterfaceSound.charstat_open_01");          
  919.     }
  920. }
  921.  
  922. /**
  923.  * АОёЖ°ьё® ЅГЅєЕЫ ї­±в
  924.  */
  925. function ToggleOpenPersonalConnectionsWnd ()
  926. {
  927.     local WindowHandle win;
  928.     win = GetWindowHandle( "PersonalConnectionsWnd" );
  929.    
  930.     if( win.IsShowWindow() )
  931.     {
  932.         win.HideWindow();
  933.         PlaySound("ItemSound.window_close");
  934.     }
  935.     else
  936.     {
  937.         win.ShowWindow();
  938.         win.SetFocus();
  939.         PlaySound("ItemSound.window_open");        
  940.     }
  941. }
  942.  
  943. /**
  944.  * ЅєЕі Гў ї­±в
  945.  */
  946. function ToggleOpenSkillWnd()
  947. {
  948.     local WindowHandle win;
  949.     win = GetWindowHandle( "MagicSkillWnd" );
  950.    
  951.     if( win.IsShowWindow() )
  952.     {
  953.         win.HideWindow();
  954.         PlayConsoleSound(IFST_MAPWND_OPEN);
  955.        
  956.     }
  957.     else
  958.     {
  959.         win.ShowWindow();
  960.         win.SetFocus();
  961.         PlayConsoleSound(IFST_MAPWND_CLOSE);
  962.     }
  963. }
  964.  
  965.  
  966. function WindowHandle getWindowHandleCheckClassic( String winName)
  967. {
  968.     local WindowHandle win;
  969.     //local bool _isClassicServer;
  970.     //local UIData script;
  971.     //script = getInstanceUIData();
  972.     //_isClassicServer = true; 
  973.     //Debug ( "isclassic?" @script.getIsClassicServer() );
  974.     if ( getInstanceUIData().getIsClassicServer() )
  975.     {
  976.         //Debug ( "classic");
  977.         win = GetWindowHandle( winName $ "Classic" );      
  978.     }
  979.     else
  980.     {
  981.         //Debug ( "normal");
  982.         win = GetWindowHandle( winName );
  983.     }
  984.     return win;
  985. }
  986.  
  987. /**
  988.  * ДЙёЇЕН Б¤єё Гў ї­±в
  989.  */
  990. function ToggleOpenCharInfoWnd()
  991. {
  992.     local WindowHandle win;
  993.  
  994.     win = getWindowHandleCheckClassic( "DetailStatusWnd" );
  995.  
  996.    
  997.     if( win.IsShowWindow() )
  998.     {
  999.         win.HideWindow();
  1000.         PlayConsoleSound(IFST_WINDOW_CLOSE);
  1001.     }
  1002.     else
  1003.     {
  1004.         win.ShowWindow();
  1005.         win.SetFocus();
  1006.         PlayConsoleSound(IFST_WINDOW_OPEN);
  1007.     }
  1008. }
  1009.  
  1010. /**
  1011.  * АОєҐЕдё® Гў ї­±в
  1012.  */
  1013. function ToggleOpenInventoryWnd()
  1014. {
  1015.     local WindowHandle win;
  1016.     win = GetWindowHandle( "InventoryWnd" );
  1017.    
  1018.     if( win.IsShowWindow() )
  1019.     {
  1020.         win.HideWindow();
  1021.         PlaySound("InterfaceSound.inventory_close_01");
  1022.     }
  1023.     else
  1024.     {
  1025.         ExecuteEvent(EV_InventoryToggleWindow);
  1026.         PlaySound("InterfaceSound.inventory_open_01")
  1027.     }
  1028. }
  1029.  
  1030. /**
  1031.  * ѕЧјЗ Гў ї­±в
  1032.  */
  1033. function ToggleOpenActionWnd()
  1034. {
  1035.     local WindowHandle win;
  1036.     win = GetWindowHandle( "ActionWnd" );
  1037.    
  1038.     if( win.IsShowWindow() )
  1039.     {
  1040.         win.HideWindow();
  1041.         PlayConsoleSound(IFST_WINDOW_OPEN);
  1042.     }
  1043.     else
  1044.     {
  1045.         win.ShowWindow();
  1046.         win.SetFocus();
  1047.         ExecuteEvent(EV_ActionListStart);
  1048.         ExecuteEvent(EV_ActionList);
  1049.         ExecuteEvent(EV_LanguageChanged);
  1050.         ExecuteEvent(EV_ActionListNew);
  1051.         PlayConsoleSound(IFST_WINDOW_CLOSE);               
  1052.     }
  1053. }
  1054.  
  1055. /**
  1056.  * їЙјЗ Гў ї­±в
  1057.  */
  1058. function HandleShowOptionWnd()
  1059. {
  1060.     local OptionWnd win;
  1061.     win = OptionWnd( GetScript("OptionWnd") );
  1062.     win.ToggleOpenMeWnd(false); //їЙјЗГўёё ї­±в
  1063.     //ExecuteEvent( EV_OptionWndShow ) ;//ґЬГаЕ° Гў ї­±в
  1064. }
  1065.  
  1066. /**
  1067.  * ґЬГаЕ° Гў ї­±в
  1068.  */
  1069. function HandleShowShortcutAssignWnd()
  1070. {
  1071.  
  1072.     local OptionWnd win;   
  1073.     win = OptionWnd( GetScript("OptionWnd") );
  1074.     win.ToggleOpenMeWnd(true);  //јфДЖ ГўАё·О ї­±в
  1075.  
  1076. }
  1077.  
  1078. /**
  1079.  * °ФЅГЖЗ ї­±в
  1080.  */
  1081. function HandleShowBoardWnd()
  1082. {
  1083.     local string strParam;
  1084.     ParamAdd(strParam, "Init", "1");
  1085.     ExecuteEvent(EV_ShowBBS, strParam);
  1086. }
  1087.  
  1088. //°ФЅГЖЗ/№Ї°н ґдЗП±в
  1089. function handleShowQABoardWnd()
  1090. {
  1091.     local string strParam;
  1092.     ParamAdd(strParam, "Index", "8");
  1093.     ExecuteEvent(EV_ShowBBS, strParam);
  1094. }
  1095.  
  1096. /**
  1097.  * ЖДЖјёЕДЄ ї­±в
  1098.  */
  1099. function HandlePartyMatchWnd()
  1100. {  
  1101.     ExecuteEvent( EV_ShowWindow, "Name=PartyMatchWnd" );   
  1102. }
  1103.  
  1104. /**
  1105.  * їмЖпЗФ ї­±в
  1106.  */
  1107. function HandleShowPostBoxWnd()
  1108. {
  1109.     local WindowHandle win;
  1110.     win = GetWindowHandle( "PostBoxWnd" );
  1111.    
  1112.     if( win.IsShowWindow() )
  1113.     {
  1114.         win.HideWindow();
  1115.         PlayConsoleSound(IFST_WINDOW_CLOSE);
  1116.     }
  1117.     else
  1118.     {
  1119.         PlayConsoleSound(IFST_WINDOW_OPEN);
  1120.         RequestRequestReceivedPostList();
  1121.         if (IsPeaceZone == 0)
  1122.             AddSystemMessage(3066);
  1123.     }
  1124. }
  1125.  
  1126. /**
  1127.  * µµїтё» ї­±в
  1128.  */
  1129. function HandleShowHelpHtmlWnd()
  1130. {
  1131.     local AgeWnd script;    // µо±ЮЗҐЅГ ЅєЕ©ёіЖ® °ЎБ®їА±в
  1132.    
  1133.     local string strParam;
  1134.     ParamAdd(strParam, "FilePath", "..\\L2text\\help.htm");
  1135.     ExecuteEvent(EV_ShowHelp, strParam);
  1136.    
  1137.     script = AgeWnd( GetScript("AgeWnd") );
  1138.    
  1139.     if(script.bBlock == false)  script.startAge()//µо±ЮЗҐЅГё¦ ДСБШґЩ.
  1140. }
  1141. /**
  1142.  * АОЅєЕПЅє Бё Гў ї­±в
  1143.  */
  1144. function HandleShowInstanceZone()
  1145. {
  1146.     //Debug(" HandleShowInstanceZone" );
  1147.     RequestInzoneWaitingTime();
  1148. }
  1149.  
  1150. /**
  1151.  * БшБ¤ Гў ї­±в
  1152.  */
  1153. function HandleShowPetitionBegin()
  1154. {
  1155.     local WindowHandle win;
  1156.     local WindowHandle win1;   
  1157.     local WindowHandle win2;   
  1158.     local PetitionMethod useNewPetition;
  1159.  
  1160.     win = GetWindowHandle( "NewUserPetitionWnd" );
  1161.     win1 = GetWindowHandle( "UserPetitionWnd" );
  1162.     win2 = GetWindowHandle( "WebPetitionWnd" );
  1163.  
  1164.     useNewPetition = GetPetitionMethod();
  1165.  
  1166.     if( useNewPetition == PetitionMethod_New )
  1167.     {
  1168.         if(win.IsShowWindow())
  1169.         {
  1170.             PlayConsoleSound(IFST_WINDOW_CLOSE);
  1171.             win.HideWindow();
  1172.         }
  1173.         else
  1174.         {
  1175.             PlayConsoleSound(IFST_WINDOW_OPEN);
  1176.             RequestShowPetitionAsMethod();
  1177.         }
  1178.     }
  1179.     else if( useNewPetition == PetitionMethod_Default )
  1180.     {
  1181.         if (win1.IsShowWindow())
  1182.         {
  1183.             PlayConsoleSound(IFST_WINDOW_CLOSE);
  1184.             win1.HideWindow();
  1185.         }
  1186.         else
  1187.         {
  1188.             PlayConsoleSound(IFST_WINDOW_OPEN);
  1189.             win1.ShowWindow();
  1190.             win1.SetFocus();
  1191.         }
  1192.     }
  1193.     else if( useNewPetition == PetitionMethod_Web )
  1194.     {
  1195.         if (win2.IsShowWindow())
  1196.         {
  1197.             PlayConsoleSound(IFST_WINDOW_CLOSE);
  1198.             win2.HideWindow();
  1199.         }
  1200.         else
  1201.         {
  1202.             PlayConsoleSound(IFST_WINDOW_OPEN);
  1203.             RequestShowPetitionAsMethod();
  1204.         }
  1205.     }
  1206. }
  1207.  
  1208. /**
  1209.  * PC№ж АМєҐЖ® ї­±в
  1210.  */
  1211. function HandleShowPCWnd()
  1212. {
  1213.     local PCCafeEventWnd script;   
  1214.     script = PCCafeEventWnd( GetScript("PCCafeEventWnd") );
  1215.    
  1216.     script.HandleToggleShowPCCafeEventWnd();
  1217.     PlayConsoleSound(IFST_WINDOW_OPEN);
  1218. }
  1219.  
  1220. /**
  1221.  * 24Hz ї­±в
  1222.  
  1223. function W24HzShowWnd()
  1224. {
  1225.     local WindowHandle win;
  1226.     win = GetWindowHandle( "W24HzWnd" );
  1227.  
  1228.     //єёї©Бцёй ґЭ±в
  1229.     if( win.isShowWindow())
  1230.     {
  1231.         PlayConsoleSound(IFST_WINDOW_CLOSE);
  1232.         win.HideWindow();
  1233.     }
  1234.     //ѕЖґПёй ї­±в
  1235.     else
  1236.     {  
  1237.         PlayConsoleSound(IFST_WINDOW_OPEN);
  1238.         win.ShowWindow();
  1239.         win.SetFocus();
  1240.     }
  1241. }
  1242. */
  1243.  
  1244. /**
  1245.  * µїїµ»у імИ­ Гў ї­±в
  1246.  */
  1247. function HandleShowMovieCaptureWnd()
  1248. {
  1249.     local bool tmpBool;
  1250.     local WindowHandle win;
  1251.     local WindowHandle win1;   
  1252.  
  1253.     win = GetWindowHandle( "MovieCaptureWnd_Expand" );
  1254.     win1 = GetWindowHandle( "MovieCaptureWnd" );
  1255.  
  1256.     tmpBool =IsNowMovieCapturing();
  1257.  
  1258.     //ДОГД µЗ°н АЦґЩёй
  1259.     if(tmpBool)
  1260.     {
  1261.         win.HideWindow();
  1262.         //И®Ае ГўАМ єёї© БшґЩёй
  1263.         if ( win.IsShowWindow() )
  1264.         {
  1265.             PlayConsoleSound(IFST_WINDOW_CLOSE);
  1266.             win.HideWindow();
  1267.         }
  1268.         else
  1269.         {          
  1270.             PlayConsoleSound(IFST_WINDOW_OPEN);
  1271.             win.ShowWindow();
  1272.             win.SetFocus();
  1273.         }
  1274.     }
  1275.     //ѕЖґП¶уёй АП№Э Гў ї­°н ґЭ±в
  1276.     else
  1277.     {
  1278.         if (win1.IsShowWindow())
  1279.         {
  1280.             PlayConsoleSound(IFST_WINDOW_CLOSE);
  1281.             win1.HideWindow();
  1282.         }
  1283.         else
  1284.         {  
  1285.             PlayConsoleSound(IFST_WINDOW_OPEN);
  1286.             win1.ShowWindow();
  1287.             win1.SetFocus();
  1288.  
  1289.         }
  1290.     }  
  1291. }
  1292.  
  1293. /**
  1294.  * ИЁЖдАМБц ї­±в
  1295.  */
  1296. function linkHomePage()
  1297. {
  1298.     class'UICommonAPI'.static.DialogSetID( DIALOGID_Gohome );
  1299.     class'UICommonAPI'.static.DialogShow( DialogModalType_Modalless, DialogType_OKCancel, GetSystemMessage( 3208 ), string(Self));
  1300. }
  1301.  
  1302. //ИЁЖдАМБц ёµЕ©(10.1.18 №®ј±БШ ГЯ°Ў)
  1303. function HandleDialogOK()
  1304. {  
  1305.     if( ! class'UICommonAPI'.static.DialogIsOwnedBy( string(Self) ) )
  1306.         return;
  1307.  
  1308.     switch( class'UICommonAPI'.static.DialogGetID() )
  1309.     {
  1310.     case DIALOGID_Gohome:
  1311.         OpenL2Home();
  1312.         break;
  1313.     }
  1314. }
  1315.  
  1316. //»уЗ° АОєҐЕдё® ї­±в
  1317. function HandleShowProductInventory()
  1318. {
  1319.     local WindowHandle win;
  1320.     local WindowHandle win1;   
  1321.  
  1322.     //local ShortcutAssignWnd sc;
  1323.     //sc = ShortcutAssignWnd( GetScript("ShortcutAssignWnd") );
  1324.     //debug( ">>>>>" $ sc.GetShortcutItemNameWithID(1) );
  1325.  
  1326.     win = GetWindowHandle( "ProductInventoryWnd" );
  1327.     win1 = GetWindowHandle( "ShopWnd" );
  1328.  
  1329.     //єёї©Бцёй ґЭ±в
  1330.     if( win.isShowWindow())
  1331.     {
  1332.         PlayConsoleSound(IFST_INVENWND_CLOSE);
  1333.         win.HideWindow();
  1334.     }
  1335.     //ѕЖґПёй ї­±в
  1336.     else
  1337.     {  
  1338.         util.ItemRelationWindowHide( "ProductInventoryWnd" );
  1339.  
  1340.         if( !win1.IsShowWindow() )
  1341.         {
  1342.             PlayConsoleSound(IFST_INVENWND_OPEN);
  1343.             win.ShowWindow();
  1344.             win.SetFocus();
  1345.         }
  1346.     }
  1347. }
  1348.  
  1349. //FlashїЎ ё¶їмЅє їА№цЅГ АМєҐЖ® №Я»э.
  1350. event OnMouseOver( WindowHandle w )
  1351. {  
  1352.    
  1353. }
  1354. //FlashїЎ ё¶їмЅє ѕЖїфЅГ АМєҐЖ® №Я»э.
  1355. event OnMouseOut( WindowHandle w )
  1356. {
  1357.     //°­Б¦·О ё¶їмЅє А§ДЎё¦ 0,0Аё·О.
  1358.     ForceToMoveMousePos( 0, 0 );
  1359. }
  1360.  
  1361. /**
  1362.  * А©µµїм ESC Е°·О ґЭ±в Гіё®
  1363.  * "Esc" Key
  1364.  **/
  1365. function OnReceivedCloseUI()
  1366. {  
  1367.     local array<GFxValue> args;
  1368.     local GFxValue invokeResult;
  1369.    
  1370.     AllocGFxValues(args, 1);       
  1371.    
  1372.     Invoke("_root.onReceivedCloseUI", args, invokeResult);
  1373.  
  1374.     DeallocGFxValue(invokeResult);
  1375.     DeallocGFxValues(args);
  1376. }
  1377.  
  1378.  
  1379. function dispatchEventToFlash_String(int Event_ID, string argString){
  1380.     local array<GFxValue> args;
  1381.     local GFxValue invokeResult;
  1382.  
  1383.     AllocGFxValues(args, 2);
  1384.     AllocGFxValue(invokeResult);
  1385.     args[0].SetInt(Event_ID);
  1386.     CreateObject(args[1]);
  1387.  
  1388. //  Debug("argString"@argString);
  1389.     args[1].SetMemberString("list", argString );
  1390.  
  1391.     Invoke("_root.onEvent", args, invokeResult);
  1392.     DeallocGFxValue(invokeResult);
  1393.     DeallocGFxValues(args);
  1394. }
  1395. */
  1396.  
  1397.  
  1398. //function changeEnterChat( string str )
  1399. //{
  1400. //  //groupName = str;
  1401. //  //updateTooltip();
  1402. //}
  1403. //function updateTooltip()
  1404. //{    
  1405. //}
  1406. defaultproperties
  1407. {
  1408. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement