775 lines
		
	
	
		
			25 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
			
		
		
	
	
			775 lines
		
	
	
		
			25 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| /*
 | ||
| 文件名:DrawMainCustomUi_All.nut
 | ||
| 路径:DrawMainCustomUi/DrawMainCustomUi_All.nut
 | ||
| 创建日期:2022-09-04	20:15
 | ||
| 文件用途:全职业界面绘制函数
 | ||
| */
 | ||
| 
 | ||
| 
 | ||
| dofile("sqr/DrawMainCustomUi/DrawMainCustomUi_ATFighter.nut");
 | ||
| dofile("sqr/DrawMainCustomUi/DrawMainCustomUi_ATGunner.nut");
 | ||
| dofile("sqr/DrawMainCustomUi/DrawMainCustomUi_ATMage.nut");
 | ||
| dofile("sqr/DrawMainCustomUi/DrawMainCustomUi_CreatorMage.nut");
 | ||
| dofile("sqr/DrawMainCustomUi/DrawMainCustomUi_DemonicSwordman.nut");
 | ||
| dofile("sqr/DrawMainCustomUi/DrawMainCustomUi_Fighter.nut");
 | ||
| dofile("sqr/DrawMainCustomUi/DrawMainCustomUi_Gunner.nut");
 | ||
| dofile("sqr/DrawMainCustomUi/DrawMainCustomUi_Mage.nut");
 | ||
| dofile("sqr/DrawMainCustomUi/DrawMainCustomUi_Priest.nut");
 | ||
| dofile("sqr/DrawMainCustomUi/DrawMainCustomUi_Swordman.nut");
 | ||
| dofile("sqr/DrawMainCustomUi/DrawMainCustomUi_Thief.nut");
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| function Sq_TestDraw(a, b) {
 | ||
|     local X = 63;
 | ||
|     local Y = 124;
 | ||
|     local obj = sq_GetMyMasterCharacter();
 | ||
|     // L_sq_DrawImg("lenheartsevernotianimotionswmain.img", 0, -1, 0);
 | ||
|     // obj = sq_GetCNRDObjectToSQRCharacter(obj);
 | ||
|     // local Ani = obj.sq_GetRestAni();
 | ||
|     // sq_AnimationProc(Ani);
 | ||
|     // sq_drawCurrentFrame(Ani, 100, 200, true);
 | ||
| 
 | ||
| 
 | ||
|     local MedalButton = TabTextButtonPro(obj, "小勋章Tab", X + 5, Y, "common/medal/main.ani", 7, 38, 21, "世界频道", 8, 5);
 | ||
|     MedalButton.SwitchState = 1;
 | ||
|     MedalButton.SetRectEnble(true, "a勋章Tab", X + 5, Y, "common/medal/main.ani", 8);
 | ||
|     MedalButton.SetCustomClickEnble(true, "a勋章Tab", X + 5, Y, "common/medal/main.ani", 9);
 | ||
| 
 | ||
|     MedalButton.Show();
 | ||
|     if (MedalButton.isLBActive()) {
 | ||
|         print(1);
 | ||
|     }
 | ||
| 
 | ||
|     local TAni = BasicsDrawTool.T_DrawDynamicAni(obj, "common/addpoint/dh.ani", 0, 0, "asdasdas");
 | ||
| }
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| // LsX <- 0
 | ||
| // LsY <- 0
 | ||
| 
 | ||
| // PVFSTR <- null;
 | ||
| 
 | ||
| 
 | ||
| class Window extends BasicsDrawTool {
 | ||
|     //宽度
 | ||
|     Width = null;
 | ||
|     //高度
 | ||
|     Height = null;
 | ||
|     //标题高度
 | ||
|     TitleH = null;
 | ||
| 
 | ||
|     //X坐标
 | ||
|     X = null;
 | ||
|     //Y坐标
 | ||
|     Y = null;
 | ||
| 
 | ||
|     YMouseSw = true;
 | ||
| 
 | ||
|     constructor(gX, gY, gWidth, gHeight, gTitleH) {
 | ||
|         //宽度
 | ||
|         Width = gWidth;
 | ||
|         //高度
 | ||
|         Height = gHeight;
 | ||
|         //标题高度
 | ||
|         TitleH = gTitleH;
 | ||
| 
 | ||
|         //X坐标
 | ||
|         X = gX;
 | ||
|         //Y坐标
 | ||
|         Y = gY;
 | ||
|     }
 | ||
| 
 | ||
|     //设定鼠标逻辑
 | ||
|     function LockMouse() {
 | ||
|         if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, Width, Height)) {
 | ||
|             IMouse.LockMouseClick();
 | ||
|             YMouseSw = false;
 | ||
|         } else {
 | ||
|             if (YMouseSw == false) {
 | ||
|                 IMouse.ReleaseMouseClick();
 | ||
|                 YMouseSw = true;
 | ||
|             }
 | ||
|         }
 | ||
|     }
 | ||
| 
 | ||
|     function Show(obj) {
 | ||
|         //sq_DrawBox(X, Y, Width, Height, 0xffffffff);
 | ||
| 
 | ||
|         //设定鼠标逻辑
 | ||
|         LockMouse();
 | ||
| 
 | ||
| 
 | ||
|     }
 | ||
| }
 | ||
| 
 | ||
| 
 | ||
| function TestDrawRgbaImage(X, Y, Image) {
 | ||
|     for (local i = 0; i< 28; i++) {
 | ||
|         for (local z = 0; z< 28; z++) {
 | ||
|             sq_DrawLine(X + z, Y + i + 1, X + z, Y + i, sq_RGBA(Image[((z * 4) + (i * 4 * 28))], Image[((z * 4) + (i * 4 * 28))] + 1, Image[((z * 4) + (i * 4 * 28))] + 2, Image[((z * 4) + (i * 4 * 28))] + 3));
 | ||
|         }
 | ||
|     }
 | ||
| }
 | ||
| 
 | ||
| 
 | ||
| /*
 | ||
|     local InfoTable = {
 | ||
|         Id = 3037,
 | ||
|         Name = "无色小晶块",
 | ||
|         Name2 = "Yosin-Team",
 | ||
|         Price = 20,
 | ||
|         Type = "材料",
 | ||
|         Explain = "    异变的空间里特有的神奇石头, 蕴含有神秘的魔法力量。 听说任何状态下, 它都能保持方块形状。"
 | ||
|     };
 | ||
|     */
 | ||
| // L_sq_WAB(0x00F4AA66, 0xE9);
 | ||
| // L_sq_WAB(0x00F4AA66 + 1, 0xFA);
 | ||
| // L_sq_WAB(0x00F4AA66 + 2, 0x02);
 | ||
| // L_sq_WAB(0x00F4AA66 + 3, 0x00);
 | ||
| // L_sq_WAB(0x00F4AA66 + 4, 0x00);
 | ||
| // L_sq_WAB(0x00F4AA66 + 5, 0x90);
 | ||
| 
 | ||
| 
 | ||
| function drawMainCustomUI_All(obj) {
 | ||
| 
 | ||
| 
 | ||
|     // if (getroottable().rawin("WindowsObject") == false) getroottable().rawset("WindowsObject", Window(100, 100, 100, 200, 10));
 | ||
|     // getroottable()["WindowsObject"].Show(obj);
 | ||
| 
 | ||
|     RecoverySystem(obj); //回收系统
 | ||
|     ChargeNotiFunc(obj); //充值系统
 | ||
|     SetUpgradeRate(); //设置强化增伤
 | ||
| 
 | ||
|     local InfoTable = {
 | ||
|         Id = 2019185,
 | ||
|         Rarity = 4,
 | ||
|         Name = "测试物品",
 | ||
|         Name2 = "Yosin-Team",
 | ||
|         Weight = 10,
 | ||
|         CoolTime = 1000,
 | ||
|         Price = 20,
 | ||
|         Type = "消耗品",
 | ||
|         Explain = "    异变的空间里特有的神奇石头, 蕴含有神秘的魔法力量。 听说任何状态下, 它都能保持方块形状。"
 | ||
|     };
 | ||
| 
 | ||
|     // local Item = ItemInfoClass(InfoTable);
 | ||
|     // Item.Show(200, 200);
 | ||
| 
 | ||
|     // local InfoW = sq_GetPopupWindowMainCotrol(74);
 | ||
| 
 | ||
|     // if(InfoW){
 | ||
|     //     print(InfoW.IsOverAbsolutely());
 | ||
|     // }
 | ||
|     // local Lnnn = 0;
 | ||
|     // for (local i = 0; i< 400; i++) {
 | ||
|     //     if (i == 176 || i == 1) continue;
 | ||
|     //     local InfoW = sq_GetPopupWindowMainCotrol(i);
 | ||
|     //     if (InfoW) {
 | ||
|     //         // print("Pos_X : " + InfoW.GetXPos());
 | ||
|     //         // print("Pos_Y : " + InfoW.GetYPos());
 | ||
|     //         print("WindowsId: " + i);
 | ||
|     //         // Lnnn++;
 | ||
|     //     }
 | ||
|     // }
 | ||
|     // print(Lnnn);
 | ||
| 
 | ||
|     // if (KeyPress.isKeyPress(78)) {
 | ||
|     //     //local itemSS = sq_GetPopupWindowMainCotrol(170);
 | ||
|     //     // local objectManager = obj.getObjectManager();
 | ||
| 
 | ||
|     //     // local Skill = sq_GetSkill(obj, 1);
 | ||
|     //     //local chrobj = sq_CreateCharacter(1, 4);
 | ||
|     //     local Win = sq_GetPopupWindowMainCotrol(74);
 | ||
|     //     print("-----------------------------------------------/");
 | ||
|     //     foreach(member, val in Win.getclass()) {
 | ||
|     //         ::print(member + "\n");
 | ||
|     //         local attr;
 | ||
|     //         if ((attr = Win.getclass().getattributes(member)) != null) {
 | ||
|     //             foreach(i, v in attr) {
 | ||
|     //                 ::print("\t" + i + " = " + (typeof v) + "\n");
 | ||
|     //             }
 | ||
|     //         } else {
 | ||
|     //             ::print("\t<no attributes>\n")
 | ||
|     //         }
 | ||
| 
 | ||
|     //     }
 | ||
|     // }
 | ||
| 
 | ||
|     local RootTab = getroottable();
 | ||
|     if (KeyPress.isKeyPress(75)) {
 | ||
| 
 | ||
|     }
 | ||
| 
 | ||
|     if (RootTab.rawin("testchrobj")) {
 | ||
|         // local tobj = RootTab["testchrobj"];
 | ||
|         // tobj = sq_ObjectToSQRCharacter(tobj);
 | ||
|         // local charAni = tobj.sq_GetStayAni();
 | ||
|         // sq_AnimationProc(charAni);
 | ||
|         // sq_drawCurrentFrame(charAni, 150, 300, false);
 | ||
|     }
 | ||
| 
 | ||
|     /*
 | ||
|             Combat += L_sq_GetCharacterAttribute(0x2364) * Chr_liliang;
 | ||
|             Combat += L_sq_GetCharacterAttribute(0x2394) * Chr_zhili;
 | ||
|             Combat += L_sq_GetCharacterAttribute(0x237c) * Chr_tili;
 | ||
|             Combat += L_sq_GetCharacterAttribute(0x23ac) * Chr_jinshen;
 | ||
|     */
 | ||
|     // local ANTONTOWNINDEX = 1
 | ||
| 
 | ||
|     // print("X: " + W.GetXPos());
 | ||
|     // print("Y: " + W.GetYPos());
 | ||
| 
 | ||
|     /*
 | ||
|         local BaseAni = BasicsDrawTool.T_DrawDynamicAni(obj, "common/addpoint/dh.ani", 0, -180, 0 + "asdaasd");
 | ||
| 
 | ||
|         if (sq_GetAnimationFrameIndex(BaseAni) >= 80) {
 | ||
|             L_sq_DrawCode("      [倾泪寒大玩家]", 170, 286 - 173, sq_RGBA(255, 177, 0, 250), 1, 0);
 | ||
|             L_sq_DrawCode("玩家                  通过CDK充值 [1000W] 人民币,大哥恭喜发财,身体健康,万事如意 !!!", 170, 286 - 173, sq_RGBA(230, 200, 155, 250), 1, 0);
 | ||
|         }
 | ||
|         */
 | ||
| 
 | ||
| 
 | ||
|     //testani(obj);
 | ||
| 
 | ||
|     //print(L_sq_GetCharacterAttribute(0x1C, 22));
 | ||
| 
 | ||
|     // for (local i = 0; i < 1000; i++) {
 | ||
|     //     L_sq_DrawImg("interface/windowcommon.img", 27, 200, 200);
 | ||
|     // }
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
|     // L_sq_DrawCode("A B C D E F G H I J K L M N O P Q R S T U V W X Y Z", 206, 206 + 100, sq_RGBA(255, 255, 255, 250), 0, 1);
 | ||
|     // L_sq_DrawCode("a b c d e f g h i j k l m n o p q r s t u v w x y z ", 206, 206 + 120, sq_RGBA(255, 255, 255, 250), 0, 1);
 | ||
|     // L_sq_DrawCode(", , . 。 ! ! ? ? ; ; [ ] { } ( ) \" “ ” ' ’ + - * / = ", 206, 206 + 140, sq_RGBA(255, 255, 255, 250), 0, 1);
 | ||
|     // L_sq_DrawCode("sdgergwegewrgwa", 206, 206 + 15, sq_RGBA(255, 255, 255, 250), 0, 1);
 | ||
| 
 | ||
|     // print(format("0x%02X", sq_RGBA(255, 255, 255, 250)));
 | ||
| 
 | ||
|     //MoveTownEvent(); //城镇移动事件逻辑
 | ||
|     //SyncMousePos(); //同步鼠标坐标
 | ||
| 
 | ||
|     // DebugInfo();
 | ||
| 
 | ||
|     // local skl = sq_GetSkill(obj, 169);
 | ||
|     // sq_DrawSkillIcon(skl, 225, 12, sq_ALPHA(150));
 | ||
|     /*
 | ||
|     local stage = sq_GetGlobaludpModuleStage();
 | ||
|     local dungeon = sq_GetDungeonByStage(stage);
 | ||
|     local dungeonIndex = sq_GetDuegonIndex(dungeon);
 | ||
|     local MapIndex = sq_GetMapIndex(stage);
 | ||
|     print("MapIndex: " + MapIndex + "\n");
 | ||
|     */
 | ||
|     //print(obj.sq_GetRestAni() == sq_GetCurrentAnimation(obj));
 | ||
| 
 | ||
|     /*
 | ||
|     local stage = sq_GetGlobaludpModuleStage();
 | ||
|     local dungeon = sq_GetDungeonByStage(stage);
 | ||
|     local dungeonIndex = sq_GetDuegonIndex(dungeon);
 | ||
|     local MapIndex = sq_GetMapIndex(stage);
 | ||
|     print("MapIndex: " + MapIndex + "\n");
 | ||
|     print("Xpos:  " + obj.getXPos());
 | ||
|     print("Ypos:  " + obj.getYPos());
 | ||
|     */
 | ||
| 
 | ||
|     // BasicsDrawTool.T_DrawDynamicAni(obj, "common/tuguan/0510_danjinjar/iconslot_00.ani", 196, 100,  "Twwzvbqw5rrrq6wzzn");
 | ||
| 
 | ||
|     // BasicsDrawTool.T_DrawStayAni(obj, "common/tuguan/main.ani", 196, 100, 0, "TuguanSystemMain");
 | ||
|     // BasicsDrawTool.T_DrawStayAni(obj, "common/tuguan/main.ani", 196 + 20, 100 + 30, 6, "TuguanRewardMainT");
 | ||
|     // for (local i = 0; i < 10; i++) {
 | ||
|     //     local ofs = i;
 | ||
|     //     if(i > 7)ofs += 1;
 | ||
|     //     BasicsDrawTool.T_DrawStayAni(obj, "common/tuguan/main.ani", 198 + 30 + ((ofs%4) * 86), 100 + 62 + ((ofs/4) * 50) , 7, "TuguanRewardMainTenX");
 | ||
|     // }
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
|     //Sout("X偏移为: " + LsX);
 | ||
|     //Sout("Y偏移为: " + LsY);
 | ||
| 
 | ||
|     //BasicsDrawTool.T_DrawDynamicAni(obj, "common/dargonbox/animation/box_a_s.ani", 196 + 20, 100 + 30, "TuguanSysteeemMainasabackgroundeff");
 | ||
| 
 | ||
|     //local isRecover = sq_IsItemRecover(2682609);
 | ||
|     //print(isRecover);
 | ||
| 
 | ||
|     //L_sq_SetCharacterAttribute(0x1E54,ll+2500);
 | ||
|     // print(IMouse.GetMouseTask());
 | ||
| 
 | ||
|     try {
 | ||
|         // local Ret = file("Yosin_Game_Reloading.Sign", "r");
 | ||
|         local Func = loadfile("Yosin_Game_Reloading.Sign", true);
 | ||
|         Func();
 | ||
|         L_Cmd("del Yosin_Game_Reloading.Sign");
 | ||
| 
 | ||
|         // BasicsDrawTool.InitClass("WorldTowerObj");
 | ||
|         // BasicsDrawTool.InitClass("RAIDAUCTIONObj");
 | ||
|         BasicsDrawTool.InitClass("SIGNINCObj");
 | ||
|         BasicsDrawTool.InitClass("YosinEventSystem");
 | ||
|         // BasicsDrawTool.InitClass("ServerAuctionCObj");
 | ||
|         // BasicsDrawTool.InitClass("CollectBoxCObj");
 | ||
|         // BasicsDrawTool.InitClass("AvatarShapeCObj");
 | ||
|         BasicsDrawTool.InitClass("OnlineEventCObj");
 | ||
|         BasicsDrawTool.InitClass("TuguanObj");
 | ||
|         // BasicsDrawTool.InitClass("YosinPlayerEachSystem");
 | ||
|         // BasicsDrawTool.InitClass("MarrySystemCObj");
 | ||
|         // BasicsDrawTool.InitClass("WorldTowerCObj");
 | ||
|         // BasicsDrawTool.InitClass("Fate_SelectCObj");
 | ||
|         // BasicsDrawTool.InitClass("DamageFontCObj");
 | ||
|         BasicsDrawTool.InitClass("PtstObj");
 | ||
|         // BasicsDrawTool.InitClass("CollectBooksCObj");
 | ||
|         BasicsDrawTool.InitClass("YosinPlayerEachSystem");
 | ||
|         // BasicsDrawTool.InitClass("Lenheart_LaunchAnnouncementCObj");
 | ||
|         // BasicsDrawTool.InitClass("DungeonRankCObj");
 | ||
|         BasicsDrawTool.InitClass("TownMoveCObj");
 | ||
|         BasicsDrawTool.InitClass("HorseGuessingCObj");
 | ||
|         BasicsDrawTool.InitClass("AradPassCObj");
 | ||
|         BasicsDrawTool.InitClass("MidsummerPartyCObj");
 | ||
|         BasicsDrawTool.InitClass("Lenheart_100UI_DrawSkillAddClassCObj");
 | ||
|         BasicsDrawTool.InitClass("New_RotersCObj");
 | ||
|         BasicsDrawTool.InitClass("TombCObj");
 | ||
|         //BasicsDrawTool.InitClass("MouseObject");
 | ||
| 
 | ||
|         BasicsDrawTool.InitClass("LUKEDUNGEONINFOCONTROL");
 | ||
| 
 | ||
| 
 | ||
|         L_Windows_List = [];
 | ||
|         BasicsDrawTool.InitClass("FiendwarCObj");
 | ||
|         BasicsDrawTool.InitClass("FiendwarHallCObj");
 | ||
|         BasicsDrawTool.InitClass("FiendwarHallCreatePartyCObj");
 | ||
|     } catch (exception) {
 | ||
|         if (exception != "cannot open the file")
 | ||
|             print("Reloading Script Fail !!!   \n" + exception);
 | ||
|     }
 | ||
| 
 | ||
| 
 | ||
|     // print(L_sq_GetCharacterAttribute(0x1c, 21));
 | ||
|     if (KeyPress.isKeyPress(77)) {
 | ||
|         /*
 | ||
|         local T = {
 | ||
|             op = 50001001,
 | ||
|             testint = 1,
 | ||
|             testfloat = 0.5,
 | ||
|             testbool = true,
 | ||
|             teststring = "测试",
 | ||
|             testtable = {
 | ||
|                 a = 1,
 | ||
|                 b = 2
 | ||
|             },
 | ||
|             testarrayint = [1, 2, 3],
 | ||
|             testarrayfloat = [1.0, 2.0, 3.0],
 | ||
|             testarraybool = [true, false, true],
 | ||
|             testarraystring = ["好好好", "这么玩"],
 | ||
|             testarrayTable = [{
 | ||
|                 c = 6,
 | ||
|                 d = 7
 | ||
|             }, {
 | ||
|                 e = 8,
 | ||
|                 f = 9
 | ||
|             }],
 | ||
|             testarrayArray = [
 | ||
|                 [1, 2],
 | ||
|                 [3, 4]
 | ||
|             ],
 | ||
|         }
 | ||
|         local Str = L_sq_EncondeJson(T);
 | ||
| 
 | ||
|         L_sq_SendPackType(130);
 | ||
|         L_sq_SendPackWChar(Str);
 | ||
|         L_sq_SendPack();
 | ||
|         */
 | ||
|         // local str = Json.Encode(T);
 | ||
|         // print(str);
 | ||
|         // 2023102201
 | ||
|         // local T = {
 | ||
|         //     op = 20059003,
 | ||
|         //     // realop = 20055262,
 | ||
|         //     // itemId = [3037, 3038, 3039],
 | ||
|         //     // Type = 1,
 | ||
|         // }
 | ||
|         // BasicsDrawTool.SendPack(T);
 | ||
| 
 | ||
|         // obj.setHp(obj.getHp() - (obj.getHpMax() * 0.2).tointeger(), null, true);
 | ||
|         // obj.sendSetMpPacket((obj.getMp() - (obj.getMpMax() * 0.2)).tointeger());
 | ||
|         // L_sq_Open_ExWindow(0x1ADE090, 5, 0, 1);
 | ||
| 
 | ||
|         // print(format("address : %02x", L_Sq_GetSkillAddress(1)));
 | ||
| 
 | ||
| 
 | ||
|         // L_sq_Test(L_Sq_GetObjectAddress(getroottable().testobj), 27);
 | ||
|         /*
 | ||
|                 local objectManager = obj.getObjectManager();
 | ||
|                 if (objectManager) {
 | ||
|                     local CollisionObjectNumber = objectManager.getCollisionObjectNumber();
 | ||
|                     for (local i = 0; i< CollisionObjectNumber; i += 1) {
 | ||
|                         local object = objectManager.getCollisionObject(i);
 | ||
|                         local activeObj = sq_GetCNRDObjectToActiveObject(object);
 | ||
|                         // local activeObj = sq_GetCNRDObjectToSQRCharacter(object);
 | ||
| 
 | ||
|                         // if (sq_IsMyControlObject(activeObj)) {
 | ||
|                         // Sout("对象的名字: %L", L_Sq_GetObjectName(object));
 | ||
|                         local Level = L_Sq_GetObjectLevel(activeObj);
 | ||
|                         print(Level);
 | ||
|                         if (Level == 80) {
 | ||
|                             print(111);
 | ||
|                             L_sq_Test(L_Sq_GetObjectAddress(activeObj), 1);
 | ||
|                             // local skillmgr = activeObj.getSkillManager();
 | ||
|                             // local SkillId = 0;
 | ||
| 
 | ||
|                             // while (true) {
 | ||
|                             //     local SkillIdT = sq_getRandom(1, 250);
 | ||
|                             //     local skl = sq_GetSkill(activeObj, SkillIdT);
 | ||
|                             //     if (skl) {
 | ||
| 
 | ||
|                             //         print(SkillIdT);
 | ||
|                             //         L_sq_Test(L_Sq_GetObjectAddress(activeObj), SkillIdT);
 | ||
|                             //         break;
 | ||
|                             //     }
 | ||
|                             // }
 | ||
|                         }
 | ||
|                         //if (sq_IsAiCharacter(activeObj)) {
 | ||
|                         // print(123123123);
 | ||
|                         //}
 | ||
|                         // }
 | ||
|                         // local Address = L_Sq_GetObjectAddress(object);
 | ||
|                         // if (Address == L_Sq_GetRidingObjectAddress(obj)) {
 | ||
|                         //     local activeObj = sq_GetCNRDObjectToActiveObject(object);
 | ||
|                         //     getroottable()["Lenheart100UIMyRidingObject"] <- activeObj;
 | ||
|                         // }
 | ||
|                     }
 | ||
|                 }
 | ||
|                 */
 | ||
|         // L_sq_Test();
 | ||
| 
 | ||
|         // L_sq_Open_ExWindow(0x1ADE090, 5, 0, 1);
 | ||
|         // L_sq_WAB(0xB3F012B, 0x80);
 | ||
| 
 | ||
|         // L_sq_Test(L_Sq_GetObjectAddress(obj), 62);
 | ||
| 
 | ||
|         // print(format("%02X", P));
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
|     }
 | ||
| 
 | ||
| 
 | ||
|     // L_sq_Test(335, 15);
 | ||
|     // L_Sq_DrawSkill(L_Sq_GetSkillAddress(46), 300, 300, -1, 0, 0, 1, 1, 0, 0);
 | ||
| 
 | ||
|     // local ssani = BasicsDrawTool.T_DrawDynamicAni(obj, "common/collectbooks/iconslot_01.ani", 200,200, "TuguassnR00asdasd");
 | ||
|     // if(sq_IsEnd(ssani)){
 | ||
|     //     obj.sq_PlaySound("DANJIN_GAMBLE_CLASS_A");
 | ||
|     //     sq_Rewind(ssani);
 | ||
|     // }
 | ||
| 
 | ||
|     // print(L_sq_GetTownIndex());
 | ||
| 
 | ||
|     local RootTab = getroottable();
 | ||
|     if (KeyPress.isKeyPress(76)) {
 | ||
| 
 | ||
|         //ClearIntData(obj, 81, 4);
 | ||
|         // ClearSkillCoolTime(obj, 81);
 | ||
|         // print(obj.sq_GetLevelData(72, 6, sq_GetSkillLevel(obj, 72)));
 | ||
| 
 | ||
|         //ClearLevelData(obj, 25, 0);
 | ||
|         //81号技能的4号位增加3倍
 | ||
|         // local BaseData = obj.sq_GetIntData(81, 4);
 | ||
|         //AddIntData(obj, 72, 0, 1);
 | ||
|         //AddSkillCoolTime(obj, 81, -40000);
 | ||
| 
 | ||
|         //AddLevelData(obj, 25, 0, 20);
 | ||
|         // obj.sq_GetLevelData(2);
 | ||
|         //print(obj.L_sq_GetLevelData(2));
 | ||
|         // local Arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20];
 | ||
|         // local Scobj = ScrollControl(Arr, 5, 2);
 | ||
|         // RootTab.rawset("TestScobj", Scobj);
 | ||
|         //  IRDSQRCharacter.pushPassiveObj("character/swordman/swordman_po.nut", 24000001);
 | ||
|         // IRDSQRCharacter.pushPassiveObj("Character/ATMage/WindStrike/po_wind_strike.nut", 24201);
 | ||
| 
 | ||
| 
 | ||
|         // local os = sq_CreateAICharacter(4999);
 | ||
|         // os.setCurrentPos(obj.getXPos() + 100, obj.getYPos(), 0);
 | ||
|         // sq_AddObject(obj, os, OBJECTTYPE_DRAWONLY, false);
 | ||
| 
 | ||
|         // local os = sq_CreateAICharacter(4999);
 | ||
|         // os.setCurrentPos(obj.getXPos() + 100, obj.getYPos(), 0);
 | ||
|         // sq_AddObject(obj, os, OBJECTTYPE_DRAWONLY, false);
 | ||
| 
 | ||
|         //print(sq_GetIntData(obj, 169, 1));
 | ||
|         //print(obj.sq_GetIntData(169, 1));
 | ||
|         //print(L_sq_GetIntData(obj,169,1));
 | ||
|         // getroottable().testobj <- sq_CreateAICharacter(40401);
 | ||
| 
 | ||
|         // getroottable().testobj.setCurrentPos(obj.getXPos() + 100, obj.getYPos(), 0);
 | ||
|         // sq_AddObject(obj, getroottable().testobj, OBJECTTYPE_DRAWONLY, false);
 | ||
| 
 | ||
| 
 | ||
|         // L_sq_Open_ExWindow2(0x1ADE090, 69, "asdasd", 0);
 | ||
| 
 | ||
|     }
 | ||
| 
 | ||
| 
 | ||
|     // L_sq_DrawImg("Interface2/event/Chn_event_2020/201029_AncientHeroLuckyBox/common_open.img", 1, 100, 100, 0, sq_RGBA(255, 255, 255, 250));
 | ||
| 
 | ||
| 
 | ||
|     if (KeyPress.isKeyPress(78)) {
 | ||
|         // local Arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20];
 | ||
|         // local Scobj = ScrollControl(Arr, 5, 2);
 | ||
|         // RootTab.rawset("TestScobj", Scobj);
 | ||
| 
 | ||
|         //IRDSQRCharacter.pushPassiveObj("character/swordman/swordman_po.nut", 24000001);
 | ||
| 
 | ||
| 
 | ||
|         // local Base = Clock();
 | ||
|         // for (local i = 0; i < 2000; i++) {
 | ||
|         //     L_sq_DrawImg("common/etc/combo.img", 100000000, -1, -1, sq_RGBA(250, 0, 0, 0));
 | ||
|         //     //L_sq_DrawImg("common/etc/combo.img", 1, 100, 100, 0, sq_RGBA(255, 255, 255, 250));
 | ||
|         // }
 | ||
|         // print("ok: " + (Clock() - Base));
 | ||
| 
 | ||
|         //getroottable()["DamageFontCObj"].PushDamageFontArray(0x4000000, 200, 200, 0, 1234567890, 0);
 | ||
|         //}
 | ||
|         // print(obj.sq_GetLevelData(25, 0, sq_GetSkillLevel(obj, 25)));
 | ||
|         // print(L_Sq_GetSkillAddress(25));
 | ||
| 
 | ||
|         // print(getroottable().TestAddr);
 | ||
|         // L_sq_NewInputBox(0x3AEC9800);
 | ||
|         // setVisibleInput();
 | ||
|         // L_sq_NewInputBox(0, 0, 100, 20);
 | ||
|         // L_sq_Open_ExWindow(0x1ADE090, 269, 0, 1);
 | ||
| 
 | ||
|     }
 | ||
| 
 | ||
| 
 | ||
|     //L_sq_DrawNumber(0,0,sq_RGBA(255, 255, 255, 250),1.0,1.0,0,18,6,1234567890);
 | ||
|     //L_sq_DrawImg("common/etc/combo.img", 0, 100, 100, 0, sq_RGBA(255, 255, 255, 250), 1.0, 1.0);
 | ||
|     // local Ani = obj.getCurrentAnimation();
 | ||
|     // Ani.setEffectLayer(true, 6, true, sq_RGB(255, 0, 0), sq_ALPHA(100), true, true);
 | ||
|     // print("Mouse_Left: " + L_sq_RA(0x1B46874));
 | ||
|     // print("Mouse_Right: " + L_sq_RA(0x1B46878));
 | ||
|     // print("Mouse_XPos: " + L_sq_RA(0x1B4686C));
 | ||
|     // print("Mouse_YPos: " + L_sq_RA(0x1B46870));
 | ||
|     // print(IMouse);
 | ||
| 
 | ||
|     if (RootTab.rawin("TestScobj")) {
 | ||
| 
 | ||
| 
 | ||
|         local Scobj = RootTab["TestScobj"];
 | ||
| 
 | ||
|         if (IMouse.IsWheelUp()) {
 | ||
|             Scobj.M();
 | ||
|         }
 | ||
|         if (IMouse.IsWheelDown()) {
 | ||
|             Scobj.A();
 | ||
|         }
 | ||
| 
 | ||
|         // foreach(v in Scobj.FocusList) {
 | ||
|         //     local printstr = "";
 | ||
|         //     foreach(num in v) {
 | ||
|         //         printstr += num;
 | ||
|         //         printstr += "  ";
 | ||
|         //     }
 | ||
|         //     print(printstr);
 | ||
|         // }
 | ||
|         // print("\n");
 | ||
|     }
 | ||
| 
 | ||
|     /*
 | ||
|         local Button = ServerAuctionPro(obj, "TTTA", 300, 500, "common/bianshen/bianshen.ani", 28, 28, 16);
 | ||
|         Button.SetRectEnble(true, "TTTAr", 300, 500, "common/bianshen/bianshen.ani", 17);
 | ||
|         Button.SetCustomClickEnble(true, "TTTAc", 300, 500, "common/bianshen/bianshen.ani", 18);
 | ||
|         Button.Show();
 | ||
| 
 | ||
|         if (Button.isLBActive()) {
 | ||
|             L_sq_SendPackType(214);
 | ||
|             L_sq_SendPackByte(2);
 | ||
|             L_sq_SendPackWord(20218);
 | ||
|             L_sq_SendPack();
 | ||
|         }
 | ||
|         */
 | ||
| 
 | ||
| 
 | ||
|     //L_sq_Test();
 | ||
| 
 | ||
|     // //上
 | ||
|     // if (KeyPress.isKeyPress(77)) {
 | ||
|     //     LsY--;
 | ||
|     // }
 | ||
| 
 | ||
|     // //下
 | ||
|     // if (KeyPress.isKeyPress(71)) {
 | ||
|     //     LsY++;
 | ||
|     // }
 | ||
| 
 | ||
| 
 | ||
|     // //左
 | ||
|     // if (KeyPress.isKeyPress(73)) {
 | ||
|     //     LsX--;
 | ||
|     // }
 | ||
| 
 | ||
| 
 | ||
|     // //右
 | ||
|     // if (KeyPress.isKeyPress(75)) {
 | ||
|     //     LsX++;
 | ||
|     // }
 | ||
|     /*
 | ||
| 
 | ||
| 
 | ||
|         if (KeyPress.isKeyPress(77)) {
 | ||
|             //GameC.sendSummonMonsterPacketWithFriend(obj, 107010506, 86, 10000000, obj.getXPos() + 100, obj.getYPos(), 0, 100);
 | ||
|             L_sq_GoDungeon(18081);
 | ||
|         }
 | ||
| 
 | ||
|         if (KeyPress.isKeyPress(76)) {
 | ||
|             //GameC.sendSummonMonsterPacketWithFriend(obj, 107010506, 86, 10000000, obj.getXPos() + 100, obj.getYPos(), 0, 100);
 | ||
|             //L_sq_MoveTown(23, 2, 100, 300);
 | ||
| 
 | ||
|         }
 | ||
| 
 | ||
|         if (KeyPress.isKeyPress(75)) {
 | ||
| 
 | ||
|         }
 | ||
| 
 | ||
| 
 | ||
|         if (KeyPress.isKeyPress(79)) {
 | ||
|             ArtDofile = true;
 | ||
|         }
 | ||
|     */
 | ||
| 
 | ||
| 
 | ||
| }
 | ||
| 
 | ||
| function Testdsahjkds(name) {
 | ||
|     Sout("当前交互的玩家名字是: %L", name);
 | ||
| }
 | ||
| 
 | ||
| function drawCustomUI_All(obj) {
 | ||
|     Training(obj); //修炼场
 | ||
|     //NewMonsterBloodUi(obj); //怪物血条
 | ||
|     //monhpprint(obj);//怪物血条
 | ||
| }
 | ||
| 
 | ||
| 
 | ||
| /*
 | ||
| //绘制转职时装层
 | ||
| function drawGrowAvatarAniType(a,b,c,d,e,f) {
 | ||
| 
 | ||
|     UnderBaseDraw.T_DrawDynamicAni("character/gunner/effect/animation/revolvercriticaldamageup/revolver_critical_damage_up1.ani", c, d,"qqBMain0");
 | ||
| 
 | ||
| }
 | ||
| */
 | ||
| 
 | ||
| //绘制人物执行
 | ||
| function drawAppend_VirtualCharacter(a, b, c, d, e, f) {
 | ||
|     local obj = sq_GetMyMasterCharacter();
 | ||
| 
 | ||
|     // Sout("a: %L",a);
 | ||
|     // Sout("b: %L",b);
 | ||
|     // Sout("c: %L",c);
 | ||
|     // Sout("d: %L",d);
 | ||
|     // Sout("e: %L",e);
 | ||
|     // Sout("f: %L",f);
 | ||
| 
 | ||
| 
 | ||
|     // BasicsDrawTool.T_DrawDynamicAni(obj, "Character/Common/Animation/Aura/chn_2021_chivarly_system3/Chivalry_S3_Bottom_00.ani", c, d, "Server_AuctionSystemTimeP22");
 | ||
|     // BasicsDrawTool.T_DrawDynamicAni(obj, "Character/Common/Animation/Aura/chn_2021_chivarly_system3_2/Chivalry_S3_Text.ani", c, d, "Server_AuctionSystemTimeP");
 | ||
|     // BasicsDrawTool.T_DrawDynamicAni(obj, "Character/Common/Animation/Aura/chn_2021_chivarly_system3/Chivalry_S3_Text.ani", c, d - 50, "Server_AuctionSystemTimeP2");
 | ||
|     // BasicsDrawTool.T_DrawDynamicAni(obj, "Character/Common/Animation/Aura/chn_2021_chivarly_system3_3/Chivalry_S3_Text.ani", c, d - 100, "Server_AuctionSystemTimeP3");
 | ||
| }
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| /*
 | ||
| //绘制人物执行 只在副本
 | ||
| function drawAppend_ATMage(a,b,c,d)
 | ||
| {
 | ||
|     UnderBaseDraw.T_DrawDynamicAni("character/gunner/effect/animation/revolvercriticaldamageup/revolver_critical_damage_up1.ani", c, d,"qqBMain0");
 | ||
|     //Sout("a: %L",a.GetName());
 | ||
|     //Sout("b: %L",b);
 | ||
|     //Sout("c: %L",c);
 | ||
|     //Sout("d: %L",d);
 | ||
| 
 | ||
| }
 | ||
| */
 | ||
| /*
 | ||
| function checkOverItemObject_ATMage(a)
 | ||
| {
 | ||
|   //Sout("a: %L",a.GetName());
 | ||
| }
 | ||
| */
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| function TOW_CharacterAppendage(obj) {
 | ||
| 
 | ||
| 
 | ||
|     if (!CNSquirrelAppendage.sq_IsAppendAppendage(obj, "thetowerofworld/2023.02.04_thetowerofworld/ap_tocharacter.nut")) {
 | ||
| 
 | ||
|         local masterAppendage = CNSquirrelAppendage.sq_AppendAppendage(obj, obj, 14, false,
 | ||
|             "thetowerofworld/2023.02.04_thetowerofworld/ap_tocharacter.nut", true);
 | ||
| 
 | ||
|         masterAppendage.getVar("ScanTime").clear_vector();
 | ||
|         masterAppendage.getVar("ScanTime").push_vector(-9999);
 | ||
| 
 | ||
|     } else {
 | ||
| 
 | ||
|         local apd = obj.GetSquirrelAppendage("thetowerofworld/2023.02.04_thetowerofworld/ap_tocharacter.nut");
 | ||
| 
 | ||
|         local encodeT = apd.getVar("ScanTime").get_vector(0);
 | ||
|         local curT = apd.getTimer().Get()
 | ||
| 
 | ||
|         if (curT - encodeT > 500) {
 | ||
|             apd.getVar("ScanTime").set_vector(0, curT);
 | ||
|             TOW_ScanMonsterAppendage(obj);
 | ||
| 
 | ||
| 
 | ||
|         }
 | ||
| 
 | ||
| 
 | ||
|     }
 | ||
| 
 | ||
| }
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| function TOW_ScanMonsterAppendage(obj) {
 | ||
| 
 | ||
|     if (!obj)
 | ||
|         return null;
 | ||
| 
 | ||
|     local objectManager = obj.getObjectManager();
 | ||
| 
 | ||
|     if (objectManager == null)
 | ||
|         return null;
 | ||
| 
 | ||
|     for (local i = 0; i< objectManager.getCollisionObjectNumber(); i += 1) {
 | ||
|         local object = objectManager.getCollisionObject(i);
 | ||
| 
 | ||
|         if (object && object.isObjectType(OBJECTTYPE_MONSTER)) {
 | ||
|             object = sq_GetCNRDObjectToActiveObject(object);
 | ||
| 
 | ||
|             if (!CNSquirrelAppendage.sq_IsAppendAppendage(object, "thetowerofworld/2023.02.04_thetowerofworld/ap_tomonster.nutt")) {
 | ||
| 
 | ||
|                 local masterAppendage = CNSquirrelAppendage.sq_AppendAppendage(object, object, 14, false,
 | ||
|                     "thetowerofworld/2023.02.04_thetowerofworld/ap_tomonster.nut", true);
 | ||
|             }
 | ||
|         }
 | ||
| 
 | ||
|     }
 | ||
| 
 | ||
|     return null;
 | ||
| 
 | ||
| } |