Advertisement
AlisaCodeDragon

AlterSkill

Jan 12th, 2024
1,009
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Class AlterSkill  Extends L2UIGFxScript;
  2. const FLASH_WIDTH = 800;
  3. const FLASH_HEIGHT = 600;
  4. var int currentScreenWidth;
  5. var int currentScreenHeight;
  6. function OnRegisterEvent()
  7. {
  8.     RegisterEvent(3410);
  9.     RegisterEvent(5130);
  10.     RegisterGFxEvent(5130);
  11.     RegisterGFxEvent(5131);
  12.     RegisterGFxEvent(5132);
  13.     RegisterGFxEvent(40);
  14.     RegisterGFxEvent(8545);
  15.     RegisterGFxEvent(8546);
  16.     return;
  17. }
  18. function OnLoad()
  19. {
  20.     RegisterState("AlterSkill", "GamingState");
  21.     SetContainerHUD("none", 0);
  22.     AddState("GAMINGSTATE");
  23.     AddState("ARENABATTLESTATE");
  24.     SetDefaultShow(True);
  25.     SetHavingFocus(False);
  26.     SetAnchor("", 9, 1, 0, 0);
  27.     return;
  28. }
  29. function OnShow()
  30. {
  31.     return;
  32. }
  33. function OnFlashLoaded()
  34. {
  35.     RegisterDelegateHandler(2);
  36.     return;
  37. }
  38. function OnHide()
  39. {
  40.     return;
  41. }
  42. function OnCallUCLogic(int logicID, string param)
  43. {
  44.     if(logicID == 1)
  45.     {
  46.         SetNextFocus();
  47.         HideWindow();
  48.     }
  49.     return;
  50. }
  51. function OnEvent(int Event_ID, string param)
  52. {
  53.     local string mainKey;
  54.     if(Event_ID == 5130)
  55.     {
  56.         ParseString(param, "mainKey", mainKey);
  57.         CallGFxFunction("AlterSkill", "setShowShortKey", string(mainKey != ""));
  58.     }
  59.     else
  60.     {
  61.         if(Event_ID == 3410)
  62.         {
  63.             if(param == "ARENAGAMINGSTATE")
  64.             {
  65.                 HideWindow();
  66.             }
  67.         }
  68.     }
  69.     return;
  70. }
  71. function bool bFlag(int nflag)
  72. {
  73.     if(nflag > 0)
  74.     {
  75.         return True;
  76.     }
  77.     else
  78.     {
  79.         return False;
  80.     }
  81.     return;
  82. }
  83. function int getSkillIconType(int skill_id)
  84. {
  85.     local int returnV;
  86.     returnV = 1;
  87.     switch(skill_id)
  88.     {
  89.         case 0:
  90.         case 1:
  91.         case 2:
  92.             returnV = 1;
  93.             break;
  94.         case 3:
  95.         case 4:
  96.         case 5:
  97.             returnV = 2;
  98.             break;
  99.         default:
  100.             break;
  101.     }
  102.     return returnV;
  103. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement