111
This commit is contained in:
commit
c4aef8f3a3
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"files.associations": {
|
||||
"*.nut": "squirrel",
|
||||
"*.cpp": "cpp",
|
||||
"awtawd-处理后": "cpp"
|
||||
},
|
||||
"vue.features.codeActions.enable": false
|
||||
}
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
//循环加载
|
||||
|
||||
//---@回调事件类
|
||||
dofile("sqr/LenheartCallBack/Sq_SendPackType_Event.nut"); //发包类型事件回调
|
||||
dofile("sqr/LenheartCallBack/Sq_Pack_Control.nut"); //收包类型事件回调
|
||||
dofile("sqr/LenheartCallBack/Sq_GetExeStr_Event.nut"); //获取EXE字符串回调
|
||||
dofile("sqr/LenheartCallBack/Sq_SelectCharacter.nut"); //选择角色界面回调
|
||||
dofile("sqr/LenheartCallBack/Sq_CreatChr.nut"); //创建角色界面回调
|
||||
dofile("sqr/LenheartCallBack/Sq_DrawItem.nut"); //绘制Item的函数 回调
|
||||
dofile("sqr/LenheartCallBack/Sq_DrawMainMaxLayerCustomUI.nut"); //最高层界面绘制回调
|
||||
dofile("sqr/LenheartCallBack/Sq_DrawMainTopLayerCustomUI.nut"); //窗口界面绘制回调
|
||||
dofile("sqr/LenheartCallBack/Sq_SettingWindow.nut"); //设置窗口绘制回调
|
||||
dofile("sqr/LenheartCallBack/Sq_RecoveryCallBack.nut"); //背包窗口回收回调
|
||||
dofile("sqr/LenheartCallBack/Sq_MouseEventCallBack.nut"); //鼠标点击回调
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//---@工具API类
|
||||
dofile("sqr/Tool/Tool.nut"); //主要拓展API工具类
|
||||
dofile("sqr/Tool/ClassTool.nut"); //主要拓展API工具类
|
||||
dofile("sqr/Tool/DebugInfo.nut"); //输出人物主要信息类
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
|
||||
dofile("sqr/Plugins/Medal/Medal.nut"); //勋章系统
|
||||
//---@UI类
|
||||
dofile("sqr/DrawMainCustomUi/DrawMainCustomUi_All.nut"); //全职业界面绘制函数
|
||||
dofile("sqr/ProcPassiveSkill/ProcPassiveSkill_All.nut"); //全职业被动技能函数
|
||||
dofile("sqr/UI/HOOK_UI/CreatChr.nut"); //创建角色界面绘制函数
|
||||
|
||||
dofile("sqr/Plugins/Training/Training.nut"); //修炼场
|
||||
dofile("sqr/UI/TeamDps/TeamDps.nut"); //组队DPS
|
||||
dofile("sqr/Plugins/BuffSwitching/BuffSwitching.nut"); //BUFF换装
|
||||
dofile("sqr/Plugins/NewUpgrade/NewUpgrade.nut"); //新版强化系统
|
||||
dofile("sqr/Plugins/Ptst/Ptst.nut"); //护石系统
|
||||
dofile("sqr/Plugins/Ptst/Ptst_Func.nut"); //护石函数系统
|
||||
//dofile("sqr/UI/MonsterBloodUi/MonsterBloodUi.nut");//怪物血条
|
||||
//dofile("sqr/UI/MonsterBloodUi/MonsterBloodUi_TWO.nut");//怪物血条
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
|
||||
dofile("sqr/Plugins/Luke/luke.nut"); //卢克8人
|
||||
dofile("sqr/Plugins/Luke/lukeparty.nut"); //卢克8人
|
||||
dofile("sqr/Plugins/Luke/lukedungeoninfo.nut"); //卢克8人
|
||||
|
||||
|
||||
|
||||
dofile("sqr/Plugins/WorldTower/WorldTower.nut"); //世界之塔
|
||||
dofile("sqr/Plugins/RaidAuction/RaidAuction.nut"); //团本竞拍
|
||||
|
||||
dofile("sqr/Plugins/SignIn/SignIn.nut"); //每日签到
|
||||
dofile("sqr/Plugins/ServerAuction/ServerAuction.nut"); //全服拍卖
|
||||
dofile("sqr/Plugins/CollectBox/CollectBox.nut"); //宝珠图鉴
|
||||
dofile("sqr/Plugins/AvatarShape/AvatarShape.nut"); //时装变身
|
||||
dofile("sqr/Plugins/OnlineEvent/OnlineEvent.nut"); //在线活动
|
||||
dofile("sqr/Plugins/MarrySystem/MarrySystem.nut"); //结婚系统
|
||||
dofile("sqr/Plugins/Fate_Select/Fate_Select.nut"); //命运的抉择
|
||||
dofile("sqr/Plugins/DamageFont/DamageFont.nut"); //伤害字体
|
||||
dofile("sqr/Plugins/CollectBooks/CollectBooks.nut"); //收集图鉴
|
||||
dofile("sqr/Plugins/LaunchAnnouncement/LaunchAnnouncement.nut"); //上线公告
|
||||
dofile("sqr/Plugins/DungeonRank/DungeonRank.nut"); //副本排行
|
||||
dofile("sqr/Plugins/TownMove/TownMove.nut"); //城镇移动
|
||||
dofile("sqr/Plugins/HorseGuessing/HorseGuessing.nut"); //骑士马战
|
||||
dofile("sqr/Plugins/SeverNotiAnimotion/SeverNotiAnimotion.nut"); //全服公告Ani
|
||||
dofile("sqr/Plugins/AradPass/AradPass.nut"); //阿拉德探险记
|
||||
dofile("sqr/Plugins/Tuguan/Tuguan.nut"); //土罐
|
||||
dofile("sqr/Plugins/MidsummerParty/MidsummerParty.nut"); //夏日音乐会
|
||||
dofile("sqr/Plugins/Tomb/Tomb.nut"); //夏日音乐会
|
||||
dofile("sqr/Plugins/100UI/100UI.nut"); //百级UI
|
||||
dofile("sqr/Plugins/Fiendwar/Fiendwar.nut"); //超时空之战
|
||||
|
||||
//---@状态类
|
||||
dofile("sqr/SetState/SetState_All.nut"); //全职业设置状态函数
|
||||
dofile("sqr/procAppend/procAppend_All.nut"); //全职业Proc循环函数
|
||||
dofile("sqr/character/GetCurrentModuleDamageRate.nut"); //获取技能攻击力
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//---@技能类
|
||||
dofile("sqr/character/atgunner_load_state.nut"); //女漫游
|
||||
dofile("sqr/character/swordman_load_state.nut"); //鬼剑士
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
|
||||
//单次加载
|
||||
if (getroottable().rawin("InitDofile") && InitDofile) {
|
||||
|
||||
//初始化Item颜色类
|
||||
dofile("sqr/UI/Init_ItemColor/Init_ItemColor.nut");
|
||||
//初始化文字绘制类
|
||||
dofile("sqr/UI/Init_CodeDraw/Init_CodeDraw.nut");
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//城镇区域移动类
|
||||
dofile("sqr/MoveTownEvent/MoveTownEvent.nut");
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//---@插件类
|
||||
dofile("sqr/Plugins/DragonBox/DragonBox.nut"); //圣者遗物箱
|
||||
dofile("sqr/Plugins/Tuguan/Tuguan.nut"); //土罐的特别袖珍罐
|
||||
dofile("sqr/Plugins/Anton/anton.nut"); //安图恩20人
|
||||
dofile("sqr/Plugins/Roters/New_Roters.nut"); //罗特斯团本
|
||||
dofile("sqr/Plugins/Luke/luke.nut"); //卢克8人
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
|
||||
//dofile("sqr/UI/MonsterBloodUi/MonsterBloodUi_TWO.nut");//怪物血条
|
||||
dofile("sqr/UI/MonsterBloodUi/MonsterBloodUi.nut"); //怪物血条
|
||||
InitDofile = !InitDofile;
|
||||
}
|
||||
|
||||
//手动加载
|
||||
if (getroottable().rawin("ArtDofile") && ArtDofile) {
|
||||
|
||||
//---@插件类
|
||||
//dofile("sqr/Plugins/Anton/anton.nut"); //安图恩20人
|
||||
dofile("sqr/Plugins/DragonBox/DragonBox.nut"); //圣者遗物箱
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
|
||||
//dofile("sqr/UI/MonsterBloodUi/MonsterBloodUi_TWO.nut");//怪物血条
|
||||
//dofile("sqr/UI/MonsterBloodUi/MonsterBloodUi.nut");//怪物血条
|
||||
ArtDofile = !ArtDofile;
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
文件名:DrawMainCustomUi_ATFighter.nut
|
||||
路径:DrawMainCustomUi/DrawMainCustomUi_ATFighter.nut
|
||||
创建日期:2022-09-04 20:18
|
||||
文件用途:男格斗界面绘制函数
|
||||
*/
|
||||
function drawMainCustomUI_ATFighter(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawMainCustomUI_All(obj);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function drawCustomUI_ATFighter(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawCustomUI_All(obj);
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
文件名:DrawMainCustomUi_ATGunner.nut
|
||||
路径:DrawMainCustomUi/DrawMainCustomUi_ATGunner.nut
|
||||
创建日期:2022-09-04 20:19
|
||||
文件用途:女枪手界面绘制函数
|
||||
*/
|
||||
function drawMainCustomUI_ATGunner(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawMainCustomUI_All(obj);
|
||||
}
|
||||
|
||||
|
||||
function drawCustomUI_ATGunner(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawCustomUI_All(obj);
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
文件名:DrawMainCustomUi_ATMage.nut
|
||||
路径:DrawMainCustomUi/DrawMainCustomUi_ATMage.nut
|
||||
创建日期:2022-09-04 20:19
|
||||
文件用途:男法师界面绘制函数
|
||||
*/
|
||||
function drawMainCustomUI_ATMage(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawMainCustomUI_All(obj);
|
||||
}
|
||||
|
||||
function drawCustomUI_ATMage(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawCustomUI_All(obj);
|
||||
}
|
||||
|
|
@ -0,0 +1,757 @@
|
|||
/*
|
||||
文件名: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);
|
||||
|
||||
|
||||
|
||||
|
||||
// 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(176);
|
||||
// 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");
|
||||
|
||||
|
||||
BasicsDrawTool.InitClass("FiendwarCObj");
|
||||
BasicsDrawTool.InitClass("FiendwarHallCObj");
|
||||
BasicsDrawTool.InitClass("FiendwarHallCreatePartyCObj");
|
||||
} catch (exception) {
|
||||
if (exception != "cannot open the file")
|
||||
print("Reloading Script Fail !!! \n" + exception);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
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_NewWindows("Lenheart", 24, 0x65535);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//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);
|
||||
|
||||
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
文件名:DrawMainCustomUi_CreatorMage.nut
|
||||
路径:DrawMainCustomUi/DrawMainCustomUi_CreatorMage.nut
|
||||
创建日期:2022-09-04 20:19
|
||||
文件用途:缔造者界面绘制函数
|
||||
*/
|
||||
function drawMainCustomUI_CreatorMage(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawMainCustomUI_All(obj);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function drawCustomUI_CreatorMage(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawCustomUI_All(obj);
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
文件名:DrawMainCustomUi_DemonicSwordman.nut
|
||||
路径:DrawMainCustomUi/DrawMainCustomUi_DemonicSwordman.nut
|
||||
创建日期:2022-09-04 20:19
|
||||
文件用途:黑暗武士界面绘制函数
|
||||
*/
|
||||
function drawMainCustomUI_DemonicSwordman(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawMainCustomUI_All(obj);
|
||||
}
|
||||
|
||||
function drawCustomUI_DemonicSwordman(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawCustomUI_All(obj);
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
文件名:DrawMainCustomUi_Fighter.nut
|
||||
路径:DrawMainCustomUi/DrawMainCustomUi_Fighter.nut
|
||||
创建日期:2022-09-04 20:19
|
||||
文件用途:女格斗界面绘制函数
|
||||
*/
|
||||
function drawMainCustomUI_Fighter(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawMainCustomUI_All(obj);
|
||||
}
|
||||
|
||||
function drawCustomUI_Fighter(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawCustomUI_All(obj);
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
文件名:DrawMainCustomUi_Gunner.nut
|
||||
路径:DrawMainCustomUi/DrawMainCustomUi_Gunner.nut
|
||||
创建日期:2022-09-04 20:19
|
||||
文件用途:男枪手界面绘制函数
|
||||
*/
|
||||
function drawMainCustomUI_Gunner(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawMainCustomUI_All(obj);
|
||||
}
|
||||
|
||||
function drawCustomUI_Gunner(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawCustomUI_All(obj);
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
文件名:DrawMainCustomUi_Mage.nut
|
||||
路径:DrawMainCustomUi/DrawMainCustomUi_Mage.nut
|
||||
创建日期:2022-09-04 20:20
|
||||
文件用途:女法师界面绘制函数
|
||||
*/
|
||||
function drawMainCustomUI_Mage(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawMainCustomUI_All(obj);
|
||||
}
|
||||
|
||||
|
||||
function drawCustomUI_Mage(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawCustomUI_All(obj);
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
文件名:DrawMainCustomUi_Priest.nut
|
||||
路径:DrawMainCustomUi/DrawMainCustomUi_Priest.nut
|
||||
创建日期:2022-09-04 20:20
|
||||
文件用途:圣职者界面绘制函数
|
||||
*/
|
||||
function drawMainCustomUI_Priest(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawMainCustomUI_All(obj);
|
||||
}
|
||||
|
||||
|
||||
function drawCustomUI_Priest(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawCustomUI_All(obj);
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
文件名:DrawMainCustomUi_Swordman.nut
|
||||
路径:DrawMainCustomUi/DrawMainCustomUi_Swordman.nut
|
||||
创建日期:2022-09-04 20:15
|
||||
文件用途:鬼剑士绘制界面回调函数(原生)
|
||||
*/
|
||||
function drawMainCustomUI_Swordman(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawMainCustomUI_All(obj);
|
||||
}
|
||||
|
||||
|
||||
function drawCustomUI_Swordman(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawCustomUI_All(obj);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
文件名:DrawMainCustomUi_Thief.nut
|
||||
路径:DrawMainCustomUi/DrawMainCustomUi_Thief.nut
|
||||
创建日期:2022-09-04 20:20
|
||||
文件用途:暗夜使者界面绘制函数
|
||||
*/
|
||||
function drawMainCustomUI_Thief(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawMainCustomUI_All(obj);
|
||||
}
|
||||
|
||||
|
||||
function drawCustomUI_Thief(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
drawCustomUI_All(obj);
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
function Sq_CreatChr(chunk) {
|
||||
CreatChr();
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
文件名:Sq_DrawItem.nut
|
||||
路径:LenheartCallBack/Sq_DrawItem.nut
|
||||
创建日期:2022-09-05 21:11
|
||||
文件用途:绘制Item的函数 CallBack
|
||||
*/
|
||||
if (!getroottable().rawin("Sq_DrawItemTable")) Sq_DrawItemTable <- {}
|
||||
|
||||
function DrawItem_Siroco(Xpos, Ypos) {
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
BasicsDrawTool.T_DrawDynamicAni(obj, "common/item_effect/siroco.ani", Xpos, Ypos, "sirocoequani");
|
||||
}
|
||||
|
||||
|
||||
Sq_DrawItemTable.rawset(L_Sq_GetImg(2019185), DrawItem_Siroco);
|
||||
Sq_DrawItemTable.rawset(L_Sq_GetImg(2022110703), DrawItem_Siroco);
|
||||
Sq_DrawItemTable.rawset(L_Sq_GetImg(2022110704), DrawItem_Siroco);
|
||||
|
||||
|
||||
function Sq_DrawItemBack(Xpos, Ypos, Image) {
|
||||
//Sout("X坐标 %L",Xpos);
|
||||
//Sout("Y坐标 %L",Ypos);
|
||||
//UnderBaseDraw.T_DrawDynamicAni("character/gunner/effect/animation/revolvercriticaldamageup/revolver_critical_damage_up1.ani", Xpos + 10, Ypos + 40,"qqBMain0");
|
||||
}
|
||||
|
||||
function Sq_DrawItemFront(Xpos, Ypos, Image) {
|
||||
|
||||
// if (Xpos == 10 && Ypos == 4) DebugInfo();
|
||||
if (Sq_DrawItemTable.rawin(Image)) Sq_DrawItemTable[Image](Xpos, Ypos);
|
||||
//UnderBaseDraw.T_DrawDynamicAni("common/item_effect/100.ani", Xpos, Ypos, "qqBMain0");
|
||||
}
|
||||
|
|
@ -0,0 +1,253 @@
|
|||
function Sq_DrawMainMaxLayerCustomUI(pack) {
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
if (!obj) return;
|
||||
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("LenheartBaseFuncTab")) {
|
||||
local LenheartFunc = RootTab["LenheartBaseFuncTab"];
|
||||
foreach(Func in LenheartFunc) {
|
||||
Func(obj);
|
||||
}
|
||||
}
|
||||
|
||||
DrawYosinEventIconSystem(obj);
|
||||
DrawYosinPlayerEachSystem(obj);
|
||||
|
||||
// AvatarShape(obj); //时装变身
|
||||
DamageFont(obj); //伤害字体
|
||||
|
||||
DargonBox(obj); //龙盒
|
||||
Medal(obj); //勋章系统
|
||||
|
||||
Anton(obj); //安图恩
|
||||
AntonTopDraw(obj); //安图恩绘制
|
||||
Luke(obj); //卢克
|
||||
DrawLukeParty(obj); //卢克绘制
|
||||
|
||||
//TeamDPS(obj);//队伍dps
|
||||
|
||||
BuffSwitching(obj); //buff换装
|
||||
UpgradeSystem(obj); //新版强化系统
|
||||
Ptst(obj); //护石系统
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Raid_Auction(obj); //团本竞拍
|
||||
|
||||
// SignIn(obj); //每日签到
|
||||
|
||||
ServerAuction(obj); //全服拍卖
|
||||
|
||||
// OnlineEvent(obj); //在线活动
|
||||
|
||||
MarrySystem(obj); //结婚系统
|
||||
|
||||
WorldTower(obj); //世界之塔
|
||||
|
||||
Fate_Select(obj); //命运的抉择
|
||||
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("LenheartFuncTab")) {
|
||||
local LenheartFunc = RootTab["LenheartFuncTab"];
|
||||
foreach(Func in LenheartFunc) {
|
||||
Func(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Lenheartancient(obj);
|
||||
|
||||
|
||||
LenheartSeverNotiAnimotion(obj);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
function Lenheartancient(obj) {
|
||||
if (!obj)
|
||||
return;
|
||||
local WeaponIndex = [28285];
|
||||
local ExWeaponIndex = [28285];
|
||||
local OpenSwitch = 0;
|
||||
foreach(v in WeaponIndex) {
|
||||
if (L_sq_GetCharacterAttribute(0x1c, 1) == v) OpenSwitch = 1;
|
||||
}
|
||||
foreach(v in WeaponIndex) {
|
||||
if (L_sq_GetCharacterAttribute(0x1c, 1) == v) OpenSwitch = 2;
|
||||
}
|
||||
if (OpenSwitch == 0) return;
|
||||
|
||||
obj = sq_GetCNRDObjectToSQRCharacter(obj);
|
||||
local OutbreakBool = obj.getMyPassiveObject(48882, 0); //获取我创造的obj 荒古开启信号
|
||||
local ap = obj.GetSquirrelAppendage("nutweapon/ancient/ap_ancient.nut"); //获取AP
|
||||
|
||||
local AncientAttackHit = obj.getVar("AncientAttackHit"); //定义储存器
|
||||
local AncientPowerValue = AncientAttackHit.getInt(0); //获取荒古魔能积攒数值
|
||||
local AncientPowerStaAdd = 350; //获取常规状态伤害增加率
|
||||
local AncientPowerLisAdd = 200; //获取魔能开启状态伤害增加率
|
||||
if (OpenSwitch == 2 && AncientPowerValue == 0) {
|
||||
AncientAttackHit.setInt(0, 100);
|
||||
}
|
||||
|
||||
AncientAttackHit.setInt(10, AncientPowerStaAdd); //设置技能伤害提升 -- 常规
|
||||
|
||||
if (!CNSquirrelAppendage.sq_IsAppendAppendage(obj, "nutweapon/ancient/ap_ancient.nut")) //如果AP不在身上 附加AP给 人物
|
||||
{
|
||||
CNSquirrelAppendage.sq_RemoveAppendage(obj, "nutweapon/ancient/ap_ancient.nut");
|
||||
local masterAppendage = CNSquirrelAppendage.sq_AppendAppendage(obj, obj, -1, false, "nutweapon/ancient/ap_ancient.nut", true);
|
||||
}
|
||||
|
||||
|
||||
if (AncientPowerValue == 101 || AncientPowerValue == 103 || AncientPowerValue == 105 || AncientPowerValue == 107) //开启魔能的后续状态
|
||||
{
|
||||
if (OutbreakBool || AncientPowerValue == 103 || AncientPowerValue == 105) {
|
||||
AncientAttackHit.setInt(0, AncientPowerValue + 1);
|
||||
CNSquirrelAppendage.sq_RemoveAppendage(obj, "nutweapon/ancient/ap_ancient.nut");
|
||||
local masterAppendage = CNSquirrelAppendage.sq_AppendAppendage(obj, obj, -1, false, "nutweapon/ancient/ap_ancient.nut", true);
|
||||
}
|
||||
if (AncientPowerValue == 107) {
|
||||
obj.sq_SendCreatePassiveObjectPacket(48883, 0, 0, 0, 0);
|
||||
AncientAttackHit.setInt(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (AncientPowerValue >= 102) AncientAttackHit.setInt(10, AncientPowerStaAdd + AncientPowerLisAdd); //如果魔能开启则设置技能伤害提升 --爆发
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function proc_appendage_ancient(appendage) {
|
||||
if (!appendage) return;
|
||||
|
||||
local obj = appendage.getParent(); //获取父对象
|
||||
obj = sq_GetCNRDObjectToSQRCharacter(obj); //转换为角色类
|
||||
local AncientAttackHit = obj.getVar("AncientAttackHit"); //定义储存器
|
||||
local AncientPowerValue = AncientAttackHit.getInt(0); //获取荒古魔能数值
|
||||
|
||||
if (AncientAttackHit.getInt(16) != AncientAttackHit.getInt(0)) //储存器 缓冲值 不等于 荒古魔能数值
|
||||
{
|
||||
if (AncientPowerValue == 0) //魔能为0删除动画
|
||||
{
|
||||
appendage.sq_DeleteEffectFront();
|
||||
}
|
||||
if (AncientPowerValue > 0 && AncientPowerValue< 20) //画动画
|
||||
{
|
||||
if (AncientAttackHit.getInt(16) <= 0 || AncientAttackHit.getInt(16) >= 20) {
|
||||
appendage.sq_DeleteEffectFront();
|
||||
appendage.sq_AddEffectFront("common/nutwepen/ancient/1/particle2.ani");
|
||||
}
|
||||
}
|
||||
if (AncientPowerValue >= 20 && AncientPowerValue< 40) //画动画
|
||||
{
|
||||
if (AncientAttackHit.getInt(16)< 20 || AncientAttackHit.getInt(16) >= 40) {
|
||||
appendage.sq_DeleteEffectFront();
|
||||
appendage.sq_AddEffectFront("common/nutwepen/ancient/2/particle2.ani");
|
||||
}
|
||||
}
|
||||
if (AncientPowerValue >= 40 && AncientPowerValue< 60) //画动画
|
||||
{
|
||||
if (AncientAttackHit.getInt(16)< 40 || AncientAttackHit.getInt(16) >= 60) {
|
||||
appendage.sq_DeleteEffectFront();
|
||||
appendage.sq_AddEffectFront("common/nutwepen/ancient/3/particle1.ani");
|
||||
}
|
||||
}
|
||||
if (AncientPowerValue >= 60 && AncientPowerValue< 80) //画动画
|
||||
{
|
||||
if (AncientAttackHit.getInt(16)< 60 || AncientAttackHit.getInt(16) >= 80) {
|
||||
appendage.sq_DeleteEffectFront();
|
||||
appendage.sq_AddEffectFront("common/nutwepen/ancient/4/particle1.ani");
|
||||
}
|
||||
}
|
||||
if (AncientPowerValue >= 80 && AncientPowerValue< 100) //画动画
|
||||
{
|
||||
if (AncientAttackHit.getInt(16)< 80 || AncientAttackHit.getInt(16) >= 100) {
|
||||
appendage.sq_DeleteEffectFront();
|
||||
appendage.sq_AddEffectFront("common/nutwepen/ancient/5/particle1.ani");
|
||||
}
|
||||
}
|
||||
if (AncientPowerValue == 100) //画动画
|
||||
{
|
||||
if (AncientAttackHit.getInt(16)< 100) {
|
||||
appendage.sq_DeleteEffectFront();
|
||||
appendage.sq_AddEffectFront("common/nutwepen/ancient/6/new_effect.ani");
|
||||
AncientAttackHit.setInt(0, AncientAttackHit.getInt(0) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
//开启魔能后
|
||||
if (AncientPowerValue == 102 && AncientAttackHit.getInt(16) != 102) {
|
||||
appendage.sq_DeleteEffectFront();
|
||||
appendage.sq_AddEffectFront("common/nutwepen/ancient/open/01_red/red_onedodge2.ani");
|
||||
}
|
||||
if (AncientPowerValue == 104 && AncientAttackHit.getInt(16) != 104) {
|
||||
appendage.sq_DeleteEffectFront();
|
||||
appendage.sq_AddEffectFront("common/nutwepen/ancient/open/02_yellow/yellow_onedodge2.ani");
|
||||
}
|
||||
if (AncientPowerValue == 106 && AncientAttackHit.getInt(16) != 106) {
|
||||
appendage.sq_DeleteEffectFront();
|
||||
appendage.sq_AddEffectFront("common/nutwepen/ancient/open/03_white/white_onedodge2.ani");
|
||||
}
|
||||
|
||||
AncientAttackHit.setInt(16, AncientAttackHit.getInt(0)); //同步储存器 缓冲值和魔能值
|
||||
}
|
||||
|
||||
|
||||
|
||||
local Time = appendage.getTimer().Get(); //获取AP持续时间
|
||||
if (Time > AncientAttackHit.getInt(15) && AncientPowerValue< 100) //AP时间大于 储存器中的缓冲时间 并且魔能值小于100
|
||||
{
|
||||
if (Time - AncientAttackHit.getInt(15) >= 5000) //如果超过五秒没有攻击
|
||||
{
|
||||
AncientAttackHit.setInt(0, AncientPowerValue - 10); //减少十点魔能
|
||||
AncientAttackHit.setInt(15, appendage.getTimer().Get()); //同步缓冲区
|
||||
if (AncientAttackHit.getInt(0)< 0) AncientAttackHit.setInt(0, 0); //如果是负数就归零
|
||||
}
|
||||
}
|
||||
if (AncientPowerValue > 101) //如果处于魔能开启状态
|
||||
{
|
||||
if (Time > 7000) //每过7秒 进入下一阶段
|
||||
{
|
||||
AncientAttackHit.setInt(0, AncientPowerValue + 1);
|
||||
appendage.setValid(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function onAttackParent_appendage_ancient(appendage, realAttacker, damager, boundingBox, isStuck) {
|
||||
if (!appendage) return;
|
||||
|
||||
local obj = appendage.getParent(); //获取父对象
|
||||
obj = sq_GetCNRDObjectToSQRCharacter(obj); //转化为角色类对象
|
||||
|
||||
local AncientAttackHit = obj.getVar("AncientAttackHit"); //定义储存器
|
||||
AncientAttackHit.clear_vector(); //清栈 初始化储存器
|
||||
|
||||
local AncientPowerValue = AncientAttackHit.getInt(0); //获取魔能值
|
||||
|
||||
if (AncientPowerValue< 100) //魔能值小于100时
|
||||
{
|
||||
AncientAttackHit.setInt(0, AncientPowerValue + 1); //攻击魔能值+1
|
||||
AncientAttackHit.setInt(15, appendage.getTimer().Get()); //同步储存器缓冲时间
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
function Sq_DrawMainTopLayerCustomUI(pack) {
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
|
||||
|
||||
|
||||
// DrawWorldTower(obj);//世界之塔
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
文件名:Sq_GetExeStr_Event.nut
|
||||
路径:LenheartCallBack/Sq_GetExeStr_Event.nut
|
||||
创建日期:2022-09-06 15:52
|
||||
文件用途:获取EXE字符串HOOK
|
||||
*/
|
||||
|
||||
function Sq_GetExeStr_Event(StrIndex) {
|
||||
//Sout("StrIndex: %L",StrIndex);
|
||||
//if(StrIndex == 29002)StrIndex = 60291;
|
||||
return StrIndex;
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
文件名:Sq_MouseEventCallBack.nut
|
||||
路径:LenheartCallBack/Sq_MouseEventCallBack.nut
|
||||
创建日期:2023-02-10 05:58
|
||||
文件用途:鼠标回调
|
||||
*/
|
||||
class MouseEvent {
|
||||
Lb = 0;
|
||||
LbEvent = false;
|
||||
Rb = 0;
|
||||
RbEvent = false;
|
||||
Mb = 0;
|
||||
MbEvent = false;
|
||||
constructor() {
|
||||
|
||||
}
|
||||
}
|
||||
if (getroottable().rawin("MouseObject") == false) getroottable().rawset("MouseObject", MouseEvent());
|
||||
|
||||
function Sq_MouseEventCallBack(Lb, Rb, Mb) {
|
||||
if (getroottable().rawin("MouseObject") == false) return;
|
||||
local Tobj = getroottable()["MouseObject"];
|
||||
|
||||
if (Tobj.Lb == 0 && Lb == 1) {
|
||||
Tobj.Lb = Lb;
|
||||
} else if (Tobj.Lb == 1 && Lb == 0) {
|
||||
Tobj.Lb = Lb;
|
||||
Tobj.LbEvent = true;
|
||||
} else {
|
||||
Tobj.LbEvent = false;
|
||||
}
|
||||
|
||||
if (Tobj.Rb == 0 && Rb == 1) {
|
||||
Tobj.Rb = Rb;
|
||||
} else if (Tobj.Rb == 1 && Rb == 0) {
|
||||
Tobj.Rb = Rb;
|
||||
Tobj.RbEvent = true;
|
||||
} else {
|
||||
Tobj.RbEvent = false;
|
||||
}
|
||||
|
||||
if (Tobj.Mb == 0 && Mb == 1) {
|
||||
Tobj.Mb = Mb;
|
||||
} else if (Tobj.Mb == 1 && Lb == 0) {
|
||||
Tobj.Mb = Mb;
|
||||
Tobj.MbEvent = true;
|
||||
} else {
|
||||
Tobj.MbEvent = false;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
if (!getroottable().rawin("Pack_Control")) Pack_Control <- {}
|
||||
|
||||
function Sq_Pack_Control(chunk) {
|
||||
|
||||
local Pack_Json = Json_STL("buffer");
|
||||
Pack_Json.Parse(chunk, 0, false);
|
||||
local Op = Pack_Json.Get("op");
|
||||
|
||||
if (Pack_Control.rawin(Op) == true) {
|
||||
Pack_Control[Op](chunk);
|
||||
}
|
||||
Pack_Json.Delete();
|
||||
}
|
||||
|
|
@ -0,0 +1,190 @@
|
|||
/*
|
||||
文件名:Sq_RecoveryCallBack.nut
|
||||
路径:LenheartCallBack/Sq_RecoveryCallBack.nut
|
||||
创建日期:2022-11-03 02:04
|
||||
文件用途:回收功能CallBack
|
||||
*/
|
||||
|
||||
/*
|
||||
11D24F0
|
||||
|
||||
|
||||
*/
|
||||
|
||||
//设置回收模式
|
||||
function Sq_RecoveryTypeSetCallBack(Type) {
|
||||
getroottable().rawset("RecoverySystemType", Type);
|
||||
}
|
||||
|
||||
//鼠标位置回调
|
||||
function Sq_Set_Inventory_M_Pos(This) {
|
||||
//print(This);
|
||||
//在回收模式中
|
||||
if (getroottable().rawin("RecoverySystemState") && getroottable()["RecoverySystemState"] == true) {
|
||||
local StaticPos = L_sq_RA(This + 0x310);
|
||||
if (StaticPos >= 0) {
|
||||
if (KeyPress.isKeyPress(7)) {
|
||||
local Time = TimeSTL("RecoveryCD", 1000);
|
||||
if (Time.Get() == false || Time.Get() == 1000) {
|
||||
Time.Reset();
|
||||
Time.Start();
|
||||
local Type = getroottable()["RecoverySystemType"];
|
||||
|
||||
local SendType = 0;
|
||||
local SendPos = 0;
|
||||
|
||||
//回收物品栏
|
||||
if (Type >= 1 && Type <= 5) {
|
||||
SendPos = 9 + ((Type - 1) * 48);
|
||||
}
|
||||
|
||||
//回收时装
|
||||
else if (Type == 6) {
|
||||
SendType = 1;
|
||||
}
|
||||
//回收徽章
|
||||
else if (Type == 7) {
|
||||
SendType = 0;
|
||||
SendPos = 249;
|
||||
}
|
||||
//回收宠物
|
||||
else if (Type == 8) {
|
||||
SendType = 7;
|
||||
}
|
||||
//回收宠物装备
|
||||
else if (Type == 9) {
|
||||
SendType = 7;
|
||||
SendPos = 140;
|
||||
}
|
||||
//回收宠物消耗品
|
||||
else if (Type == 10) {
|
||||
SendType = 7;
|
||||
SendPos = 189;
|
||||
}
|
||||
|
||||
// local RecoverySomething = Json_STL("RecoverySomething");
|
||||
// RecoverySomething.Put("op", 20003001);
|
||||
// RecoverySomething.Put("Type", SendType);
|
||||
// RecoverySomething.Put("Pos", StaticPos + SendPos);
|
||||
// local str = RecoverySomething.GetString();
|
||||
// L_sq_SendPackType(130);
|
||||
// L_sq_SendPackWChar(str);
|
||||
// L_sq_SendPack();
|
||||
// RecoverySomething.Delete();
|
||||
|
||||
local RecoverySomething = Json_STL("RecoverySomething");
|
||||
RecoverySomething.Put("op", 20003107);
|
||||
RecoverySomething.Put("Type", SendType);
|
||||
RecoverySomething.Put("Pos", StaticPos + SendPos);
|
||||
local str = RecoverySomething.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
RecoverySomething.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//在装备强化模式中
|
||||
if (getroottable().rawin("UpgradeObj") && getroottable()["UpgradeObj"].Sw == true && getroottable()["UpgradeObj"].State == true) {
|
||||
local StaticPos = L_sq_RA(This + 0x310);
|
||||
if (StaticPos >= 0) {
|
||||
if (getroottable().rawin("MouseObject")) {
|
||||
local Mobj = getroottable()["MouseObject"];
|
||||
if (Mobj.LbEvent) {
|
||||
print(11);
|
||||
local UpGradeSomething = Json_STL("UpGradeSomething");
|
||||
UpGradeSomething.Put("op", 20018001);
|
||||
UpGradeSomething.Put("Pos", StaticPos + 9);
|
||||
local str = UpGradeSomething.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
UpGradeSomething.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function GetRecoveryPPos(Type) {
|
||||
if (Type == 1) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Sq_RecoveryCallBack(x, y) {
|
||||
//print(x);
|
||||
//print(IMouse.GetXPos());
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, 42, 23) && IMouse.isButtonUpEvent()) {
|
||||
getroottable().rawset("RecoverySystemState", true);
|
||||
getroottable().rawset("RecoverySystemSwitch", true);
|
||||
}
|
||||
|
||||
/*
|
||||
//如果背包拓展偏移值不存在
|
||||
if (!getroottable().rawin("InventorySize") || getroottable()["InventorySize"] == -1) {
|
||||
if (!Pack_Control.rawin("InventorySize_switch")) {
|
||||
local GetInventorySize = Json_STL("GetInventorySize");
|
||||
GetInventorySize.Put("op", 607);
|
||||
local str = GetInventorySize.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
GetInventorySize.Delete();
|
||||
Pack_Control.rawset("InventorySize_switch", 1);
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
*/
|
||||
/*
|
||||
local InventoryWindow = sq_GetPopupWindowMainCotrol(64);
|
||||
if (InventoryWindow) {
|
||||
local X = InventoryWindow.GetXPos();
|
||||
local Y = InventoryWindow.GetYPos();
|
||||
for (local i = 0; i < 8; i++) {
|
||||
for (local z = 0; z < 6; z++) {
|
||||
//sq_DrawBox(X + (i * 30), Y + 206 + (z * 30), 28, 28, 0xffffffff);
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X + (i * 30), Y + 206 + (z * 30), 28, 28)) {
|
||||
//Sout("指向的行数: %L 指向的列数: %L", i.tostring(), z.tostring());
|
||||
if (KeyPress.isKeyPress(7)) {
|
||||
local Pos = (i + 9) + (z * 8);
|
||||
|
||||
local RecoveryEqu = Json_STL("RecoveryEqu");
|
||||
RecoveryEqu.Put("op", 10052001);
|
||||
RecoveryEqu.Put("POS", Pos);
|
||||
local str = RecoveryEqu.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
RecoveryEqu.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
function RecoverySystem(obj) {
|
||||
//如果在回收状态 改变鼠标
|
||||
if (getroottable().rawin("RecoverySystemState") && getroottable()["RecoverySystemState"] == true && sq_GetPopupWindowMainCotrol(64)) {
|
||||
IMouse.SetMouseTask(13);
|
||||
if (IMouse.isButtonUpEvent()) getroottable().rawset("RecoverySystemState", false);
|
||||
} else //否则就设置一次归零
|
||||
{
|
||||
getroottable().rawset("RecoverySystemState", false);
|
||||
if (getroottable().rawin("RecoverySystemSwitch") && getroottable()["RecoverySystemSwitch"] == true) {
|
||||
IMouse.SetMouseTask(0);
|
||||
getroottable().rawset("RecoverySystemSwitch", false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
function Sq_SelectCharacter(Chunk) {
|
||||
//CreatChr(pack);
|
||||
}
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
if (!getroottable().rawin("SendPackTypeTable")) SendPackTypeTable <- {}
|
||||
SendPackDeBug <- false;
|
||||
|
||||
function Sq_SendPackType_Event(Type) {
|
||||
if (SendPackDeBug) Sout("发包类型: %L", Type);
|
||||
//调用发包CallBack
|
||||
if (SendPackTypeTable.rawin(Type)) {
|
||||
SendPackTypeTable[Type](Type);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Sq_SendPackByte_Event(Parm) {
|
||||
if (SendPackDeBug) Sout("构造Byte: %L", Parm);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function Sq_SendPackWord_Event(Parm) {
|
||||
if (SendPackDeBug) Sout("构造Word: %L", Parm);
|
||||
|
||||
}
|
||||
|
||||
function Sq_SendPackDWord_Event(Parm) {
|
||||
if (SendPackDeBug) Sout("构造DWord: %L", Parm);
|
||||
|
||||
}
|
||||
|
||||
function Sq_SendPackChar_Event(Parm) {
|
||||
if (SendPackDeBug) Sout("构造Char: %L", Parm);
|
||||
}
|
||||
|
||||
function Sq_SendPack_Event() {
|
||||
if (SendPackDeBug) Sout("发包事件 %L", "\n\n");
|
||||
|
||||
}
|
||||
/*
|
||||
function drawGrowAvatarAniType(a,b,c,d,e,f) {
|
||||
print(a);
|
||||
print(b);
|
||||
print(c);
|
||||
print(d);
|
||||
|
||||
print(e);
|
||||
print(f);
|
||||
}
|
||||
|
||||
function drawAppend_VirtualCharacter()
|
||||
|
||||
function onOpenPopupWindow_ATMage
|
||||
|
||||
function onLButtonUpCharacter_ATMage
|
||||
|
||||
function onMouseMoveCharacter_ATMage
|
||||
|
||||
function onClosePopupWindow_ATMage
|
||||
|
||||
function onInActiveWindow_ATMage
|
||||
|
||||
function onMouseLeftButtonDown_ATMage
|
||||
|
||||
function onMouseLeftButtonUp_ATMage
|
||||
|
||||
function onMouseRightButtonDown_ATMage
|
||||
|
||||
function onMouseRightButtonUp_ATMage
|
||||
|
||||
function drawAppend_ATMage
|
||||
|
||||
function checkOverItemObject_ATMage
|
||||
|
||||
function onDestroyObject_ATMage
|
||||
|
||||
function addSetStatePacket_ATMage
|
||||
|
||||
function getImmuneTypeDamgeRate_ATMage
|
||||
|
||||
function getImmuneType_ATMage
|
||||
|
||||
function onBeforeDamage_ATMage
|
||||
|
||||
function isCounterState_ATMage
|
||||
|
||||
function setEnableCancelSkill_ATMage
|
||||
|
||||
function prepareDraw_ATMage
|
||||
|
||||
function getScrollBasisPos_Attack
|
||||
|
||||
function onEnterFrame_Attack
|
||||
|
||||
function getAttackCancelStartFrameSize_ATMage
|
||||
|
||||
function getAttackCancelStartFrame_ATMage
|
||||
|
||||
function onIsCheckHitCollision_Attack
|
||||
|
||||
function isForceHitCheck_Attack
|
||||
|
||||
function onCreateObject_ //创建Obj时
|
||||
|
||||
function isApplyConversionSkillPassiveObject_ATMage
|
||||
|
||||
function onUseSkill_WindStrike(obj,a,b)//使用技能时
|
||||
|
||||
|
||||
|
||||
|
||||
8606795
|
||||
|
||||
*/
|
||||
|
|
@ -0,0 +1,219 @@
|
|||
/*
|
||||
文件名:Sq_SettingWindow.nut
|
||||
路径:LenheartCallBack/Sq_SettingWindow.nut
|
||||
创建日期:2022-10-21 08:29
|
||||
文件用途:设置窗口回调函数
|
||||
*/
|
||||
|
||||
//切换武器回调
|
||||
// function SelectWeapon(Type) {
|
||||
// SetUpgradeRate();
|
||||
// }
|
||||
// if (getroottable().rawin("SendPackTypeTable")) getroottable()["SendPackTypeTable"].rawset(19, SelectWeapon);
|
||||
|
||||
//上传设置发包
|
||||
function ReqPlayerSettingSet(Type) {
|
||||
local MonsterBloodSB = getroottable()["MonsterBloodSwitchButtonObj"];
|
||||
local GameShakeSB = getroottable()["GameShakeSwitchButtonObj"];
|
||||
local DamageNumSB = getroottable()["DamageNumSwitchButtonObj"];
|
||||
local Tabbuffer = {
|
||||
MonsterBloodSB = MonsterBloodSB.SwitchState,
|
||||
GameShakeSB = GameShakeSB.SwitchState,
|
||||
DamageNumSB = DamageNumSB.SwitchState,
|
||||
}
|
||||
local PlayerSettingSetPack = Json_STL("PlayerSettingSetPack");
|
||||
PlayerSettingSetPack.Put("op", 20001001);
|
||||
PlayerSettingSetPack.Put("Setting", Json_STL.Encode(Tabbuffer));
|
||||
|
||||
|
||||
local str = PlayerSettingSetPack.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
PlayerSettingSetPack.Delete();
|
||||
}
|
||||
if (getroottable().rawin("SendPackTypeTable")) getroottable()["SendPackTypeTable"].rawset(200, ReqPlayerSettingSet);
|
||||
|
||||
//获取设置收包
|
||||
function RcvPlayerSettingSet(Chunk) {
|
||||
local RootTab = getroottable();
|
||||
local Buffer = Json_STL("RcvPlayerSettingSetBuffer");
|
||||
Buffer.Parse(Chunk, 0, false);
|
||||
local str = Buffer.Get("Setting");
|
||||
Buffer.Delete();
|
||||
if (str && str.len() > 0) {
|
||||
local SettingBuffer = Json_STL("SettingBuffer");
|
||||
SettingBuffer.Parse(str, 0, false);
|
||||
RootTab.rawset("S_MonsterBloodSB", SettingBuffer.Get("MonsterBloodSB"));
|
||||
RootTab.rawset("S_GameShakeSB", SettingBuffer.Get("GameShakeSB"));
|
||||
RootTab.rawset("S_DamageNumSB", SettingBuffer.Get("DamageNumSB"));
|
||||
SettingBuffer.Delete();
|
||||
} else {
|
||||
RootTab.rawset("S_MonsterBloodSB", false);
|
||||
RootTab.rawset("S_GameShakeSB", false);
|
||||
RootTab.rawset("S_DamageNumSB", false);
|
||||
}
|
||||
//设置一下伤害字体上限
|
||||
if (RootTab["S_DamageNumSB"]) {
|
||||
L_sq_WA(0x7EEA7A, 999999999);
|
||||
L_sq_WA(0x7EEAA7, 999999999);
|
||||
}
|
||||
}
|
||||
|
||||
if (getroottable().rawin("Pack_Control")) getroottable()["Pack_Control"].rawset(20001002, RcvPlayerSettingSet);
|
||||
|
||||
|
||||
function InitGameSetting(obj) {
|
||||
local PlayerSettingGetPack = Json_STL("PlayerSettingGetPack");
|
||||
PlayerSettingGetPack.Put("op", 20001003);
|
||||
local str = PlayerSettingGetPack.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
PlayerSettingGetPack.Delete();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Sq_SettingWindowCallBack(Xpos, Ypos) {
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
|
||||
L_sq_DrawCode(":: 开启新版怪物血条", Xpos + 228, Ypos + 32, 0xFF93C5DD, 0, 1);
|
||||
L_sq_DrawCode(" ┄┄┄┄┄", Xpos + 338, Ypos + 32, 0x9693C5DD, 0, 1);
|
||||
L_sq_DrawCode(":: 关闭震动屏幕效果", Xpos + 228, Ypos + 32 + 19, 0xFF93C5DD, 0, 1);
|
||||
L_sq_DrawCode(" ┄┄┄┄┄", Xpos + 338, Ypos + 32 + 19, 0x9693C5DD, 0, 1);
|
||||
L_sq_DrawCode(":: 新版伤害字体上限", Xpos + 228, Ypos + 32 + 19 + 19, 0xFF93C5DD, 0, 1);
|
||||
L_sq_DrawCode(" ┄┄┄┄┄", Xpos + 338, Ypos + 32 + 19 + 19, 0x9693C5DD, 0, 1);
|
||||
|
||||
|
||||
//怪物血条
|
||||
//if (!getroottable().rawin("MonsterBloodSwitchButtonObj")) {
|
||||
local MonsterBloodSB = SettingWindowSwitchButtonPro(obj, "MonsterBloodSwitchButton", Xpos + 410, Ypos + 32, "ui/optionwindow/custombutton/switchbutton.ani", 0, 16, 15);
|
||||
MonsterBloodSB.SetRectEnble(true, "MonsterBloodSwitchButtonR", Xpos + 410, Ypos + 32, "ui/optionwindow/custombutton/switchbutton.ani", 1);
|
||||
MonsterBloodSB.SetCustomClickEnble(true, "MonsterBloodSwitchButtonC", Xpos + 410, Ypos + 32, "ui/optionwindow/custombutton/switchbutton.ani", 1);
|
||||
MonsterBloodSB.SetSwitchStateAni("MonsterBloodSwitchButtonS", "ui/optionwindow/custombutton/switchbutton.ani", 2);
|
||||
if (getroottable().rawin("S_MonsterBloodSB")) MonsterBloodSB.SwitchState = getroottable()["S_MonsterBloodSB"];
|
||||
else MonsterBloodSB.SwitchState = false;
|
||||
getroottable().rawset("MonsterBloodSwitchButtonObj", MonsterBloodSB);
|
||||
//}
|
||||
if (getroottable().rawin("MonsterBloodSwitchButtonObj")) {
|
||||
local MonsterBloodSB = getroottable()["MonsterBloodSwitchButtonObj"];
|
||||
MonsterBloodSB.Show();
|
||||
if (MonsterBloodSB.isLBActive()) {
|
||||
MonsterBloodSB.SwitchState = !MonsterBloodSB.SwitchState;
|
||||
getroottable().rawset("S_MonsterBloodSB", MonsterBloodSB.SwitchState);
|
||||
}
|
||||
}
|
||||
|
||||
//游戏震动
|
||||
//if (!getroottable().rawin("GameShakeSwitchButtonObj")) {
|
||||
local GameShakeSB = SettingWindowSwitchButtonPro(obj, "GameShakeSwitchButton", Xpos + 410, Ypos + 32 + 19, "ui/optionwindow/custombutton/switchbutton.ani", 0, 16, 15);
|
||||
GameShakeSB.SetRectEnble(true, "GameShakeSwitchButtonR", Xpos + 410, Ypos + 32 + 19, "ui/optionwindow/custombutton/switchbutton.ani", 1);
|
||||
GameShakeSB.SetCustomClickEnble(true, "GameShakeSwitchButtonC", Xpos + 410, Ypos + 32 + 19, "ui/optionwindow/custombutton/switchbutton.ani", 1);
|
||||
GameShakeSB.SetSwitchStateAni("GameShakeSwitchButtonS", "ui/optionwindow/custombutton/switchbutton.ani", 2);
|
||||
if (getroottable().rawin("S_GameShakeSB")) GameShakeSB.SwitchState = getroottable()["S_GameShakeSB"];
|
||||
else GameShakeSB.SwitchState = false;
|
||||
getroottable().rawset("GameShakeSwitchButtonObj", GameShakeSB);
|
||||
//}
|
||||
if (getroottable().rawin("GameShakeSwitchButtonObj")) {
|
||||
local GameShakeSB = getroottable()["GameShakeSwitchButtonObj"];
|
||||
GameShakeSB.Show();
|
||||
if (GameShakeSB.isLBActive()) {
|
||||
GameShakeSB.SwitchState = !GameShakeSB.SwitchState;
|
||||
getroottable().rawset("S_GameShakeSB", GameShakeSB.SwitchState);
|
||||
}
|
||||
}
|
||||
|
||||
//伤害字体上限
|
||||
//if (!getroottable().rawin("DamageNumSwitchButtonObj")) {
|
||||
local DamageNumSB = SettingWindowSwitchButtonPro(obj, "DamageNumSwitchButton", Xpos + 410, Ypos + 32 + 19 + 19, "ui/optionwindow/custombutton/switchbutton.ani", 0, 16, 15);
|
||||
DamageNumSB.SetRectEnble(true, "DamageNumSwitchButtonR", Xpos + 410, Ypos + 32 + 19 + 19, "ui/optionwindow/custombutton/switchbutton.ani", 1);
|
||||
DamageNumSB.SetCustomClickEnble(true, "DamageNumSwitchButtonC", Xpos + 410, Ypos + 32 + 19 + 19, "ui/optionwindow/custombutton/switchbutton.ani", 1);
|
||||
DamageNumSB.SetSwitchStateAni("DamageNumSwitchButtonS", "ui/optionwindow/custombutton/switchbutton.ani", 2);
|
||||
if (getroottable().rawin("S_DamageNumSB")) DamageNumSB.SwitchState = getroottable()["S_DamageNumSB"];
|
||||
else DamageNumSB.SwitchState = false;
|
||||
getroottable().rawset("DamageNumSwitchButtonObj", DamageNumSB);
|
||||
//}
|
||||
if (getroottable().rawin("DamageNumSwitchButtonObj")) {
|
||||
local DamageNumSB = getroottable()["DamageNumSwitchButtonObj"];
|
||||
DamageNumSB.Show();
|
||||
if (DamageNumSB.isLBActive()) {
|
||||
DamageNumSB.SwitchState = !DamageNumSB.SwitchState;
|
||||
getroottable().rawset("S_DamageNumSB", DamageNumSB.SwitchState);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//踢自己
|
||||
function KickMySelf(chunk) {
|
||||
local KickMySelf = Json_STL("KickMySelf");
|
||||
KickMySelf.Put("op", 77777);
|
||||
local str = KickMySelf.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
KickMySelf.Delete();
|
||||
L_sq_SendPack();
|
||||
}
|
||||
if (getroottable().rawin("Pack_Control")) getroottable()["Pack_Control"].rawset(77778, KickMySelf);
|
||||
|
||||
//全屏拾物
|
||||
function MoveItems(chunk) {
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
local objectManager = obj.getObjectManager();
|
||||
if (!objectManager) return;
|
||||
local CollisionObjectNumber = objectManager.getCollisionObjectNumber();
|
||||
for (local i = 0; i < CollisionObjectNumber; i += 1) {
|
||||
local object = objectManager.getCollisionObject(i);
|
||||
if (object.isObjectType(OBJECTTYPE_ITEM)) {
|
||||
sq_SetCurrentPos(object, obj.getXPos(), obj.getYPos(), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (getroottable().rawin("Pack_Control")) getroottable()["Pack_Control"].rawset(900, MoveItems);
|
||||
|
||||
|
||||
//充值全服公告动画
|
||||
function ChargeNotiFunc(obj) {
|
||||
if (getroottable().rawin("ChargeNotiTab") && getroottable()["ChargeNotiTab"].len() > 0) {
|
||||
local BaseAni = BasicsDrawTool.T_DrawDynamicAni(obj, "common/addpoint/dh.ani", 0, -180, "ChargeNotiAni");
|
||||
if (sq_GetAnimationFrameIndex(BaseAni) >= 80) {
|
||||
//L_sq_DrawCode(" [" + getroottable()["ChargeNotiTab"][0].name + "]", 170, 286 - 173, sq_RGBA(255, 177, 0, 250), 1, 0);
|
||||
local NotiObj = getroottable()["ChargeNotiTab"][0];
|
||||
local StrArr = NotiObj.Noti;
|
||||
|
||||
L_sq_DrawCode(StrArr[0] + NotiObj.name + StrArr[1] + StrArr[2] + NotiObj.point + StrArr[3], NotiObj.nameposx,NotiObj.nameposy, NotiObj.color, 1, 0);
|
||||
}
|
||||
if (sq_GetCurrentTime(BaseAni) >= 6000) {
|
||||
sq_Rewind(BaseAni);
|
||||
getroottable()["ChargeNotiTab"].remove(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//大佬充值全服公告
|
||||
function ChargeNoti(Chunk) {
|
||||
local Buffer = Json_STL("ChargeNotiBuffer");
|
||||
Buffer.Parse(Chunk, 0, false);
|
||||
local Tab = {
|
||||
name = Buffer.Get("name"),
|
||||
point = Buffer.Get("Point"),
|
||||
nameposx = Buffer.Get("NameXpos"),
|
||||
nameposy = Buffer.Get("NameYpos"),
|
||||
Noti = [Buffer.Get("ExNot0"), Buffer.Get("ExNot1"), Buffer.Get("ExNot2"), Buffer.Get("ExNot3")],
|
||||
color = sq_RGBA(Buffer.Get("R"),Buffer.Get("G"),Buffer.Get("B"),Buffer.Get("A")),
|
||||
}
|
||||
local arr;
|
||||
if (!getroottable().rawin("ChargeNotiTab")) {
|
||||
arr = [];
|
||||
} else {
|
||||
arr = getroottable()["ChargeNotiTab"];
|
||||
}
|
||||
arr.append(Tab);
|
||||
getroottable().rawset("ChargeNotiTab", arr);
|
||||
|
||||
Buffer.Delete();
|
||||
}
|
||||
if (getroottable().rawin("Pack_Control")) getroottable()["Pack_Control"].rawset(20005002, ChargeNoti);
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
文件名:MoveTownEvent.nut
|
||||
路径:MoveTownEvent/MoveTownEvent.nut
|
||||
创建日期:2022-09-06 13:21
|
||||
文件用途:城镇移动事件
|
||||
*/
|
||||
MoveTownEventTable <- {}
|
||||
|
||||
//进入修炼场
|
||||
function MoveTraining() {
|
||||
L_sq_GoDungeon(6000);
|
||||
}
|
||||
|
||||
MoveTownEventTable.rawset([2, 4, 915, 135, 990, 170], MoveTraining);
|
||||
|
||||
|
||||
function MoveTownEvent() {
|
||||
local TownIndex = L_sq_GetTownIndex();
|
||||
local TownRegion = L_sq_GetRegionIndex()
|
||||
local TownXpos = L_sq_GetTownXpos();
|
||||
local TownYpos = L_sq_GetTownYpos();
|
||||
print(TownXpos);
|
||||
print(TownYpos);
|
||||
foreach(PosTable, Func in MoveTownEventTable) {
|
||||
if (TownIndex == PosTable[0] && TownRegion == PosTable[1] && TownXpos >= PosTable[2] && TownYpos >= PosTable[3] && TownXpos <= PosTable[4] && TownYpos <= PosTable[5]) {
|
||||
if (!MoveTownEventTable.rawin("Mark" + PosTable)) {
|
||||
MoveTownEventTable.rawset("Mark" + PosTable, 1);
|
||||
Func();
|
||||
}
|
||||
} else {
|
||||
if (MoveTownEventTable.rawin("Mark" + PosTable)) MoveTownEventTable.rawdelete("Mark" + PosTable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
function IRDAICharacter::GetAddress() {
|
||||
return L_Sq_GetObjectAddress(this);
|
||||
}
|
||||
|
||||
function IRDAICharacter::GetName() {
|
||||
return L_Sq_GetObjectName(this);
|
||||
}
|
||||
|
||||
function IRDAICharacter::GetLevel() {
|
||||
return L_Sq_GetObjectLevel(this);
|
||||
}
|
||||
|
||||
// function IRDAICharacter::sq_GetIntData(SkillId,Idx) {
|
||||
// local ret = L_sq_GetIntData(SkillId,Idx);
|
||||
// return ret + HookIntData(this,SkillId,Idx);
|
||||
// }
|
||||
|
||||
// function IRDAICharacter::sq_getIntData(SkillId,Idx) {
|
||||
// local ret = L_sq_GetIntData(SkillId,Idx);
|
||||
// return ret + HookIntData(this,SkillId,Idx);
|
||||
// }
|
||||
|
||||
// function IRDAICharacter::sq_GetLevelData(SkillId,Idx,SkillLevel) {
|
||||
// local ret = L_sq_GetLevelData(SkillId,Idx,SkillLevel);
|
||||
// return ret + HookLevelData(this,SkillId,Idx,SkillLevel);
|
||||
// }
|
||||
|
||||
// function IRDAICharacter::sq_getLevelData(SkillId,Idx,SkillLevel) {
|
||||
// local ret = L_sq_GetLevelData(SkillId,Idx,SkillLevel);
|
||||
// return ret + HookLevelData(this,SkillId,Idx,SkillLevel);
|
||||
// }
|
||||
|
||||
|
||||
function IRDMonster::GetAddress() {
|
||||
return L_Sq_GetObjectAddress(this);
|
||||
}
|
||||
|
||||
function IRDCollisionObject::GetAddress() {
|
||||
return L_Sq_GetObjectAddress(this);
|
||||
}
|
||||
|
||||
function IRDItem::GetAddress() {
|
||||
return L_Sq_GetObjectAddress(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
function IRDActiveObject::GetAddress() {
|
||||
return L_Sq_GetObjectAddress(this);
|
||||
}
|
||||
|
||||
function IRDActiveObject::GetName() {
|
||||
return L_Sq_GetObjectName(this);
|
||||
}
|
||||
|
||||
function IRDActiveObject::GetLevel() {
|
||||
return L_Sq_GetObjectLevel(this);
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
function IRDSQRCharacter::GetAddress() {
|
||||
return L_Sq_GetObjectAddress(this);
|
||||
}
|
||||
|
||||
function IRDSQRCharacter::GetName() {
|
||||
return L_Sq_GetObjectName(this);
|
||||
}
|
||||
|
||||
function IRDSQRCharacter::GetLevel() {
|
||||
return L_Sq_GetObjectLevel(this);
|
||||
}
|
||||
|
||||
// function IRDSQRCharacter::sq_GetIntData(SkillId, Idx) {
|
||||
|
||||
// local ret = L_sq_GetIntData(SkillId, Idx);
|
||||
// return ret + HookIntData(this, SkillId, Idx);
|
||||
// }
|
||||
|
||||
// function IRDSQRCharacter::sq_getIntData(SkillId, Idx) {
|
||||
// local ret = L_sq_GetIntData(SkillId, Idx);
|
||||
// return ret + HookIntData(this, SkillId, Idx);
|
||||
// }
|
||||
|
||||
// function IRDSQRCharacter::sq_GetLevelData(...) {
|
||||
// if (vargc == 1) {
|
||||
// local ret = L_sq_GetLevelData(vargv[0]);
|
||||
// local SkillId = this.getCurrentSkillIndex();
|
||||
// local SkillLevel = this.sq_GetSkillLevel(SkillId);
|
||||
// return ret + HookLevelData(this, SkillId, vargv[0]);
|
||||
// } else {
|
||||
// local SkillId = vargv[0];
|
||||
// local Idx = vargv[1];
|
||||
// local SkillLevel = vargv[2];
|
||||
// local ret = L_sq_GetLevelData(SkillId, Idx, SkillLevel);
|
||||
// return ret + HookLevelData(this, SkillId, Idx);
|
||||
// }
|
||||
// }
|
||||
|
||||
// function IRDSQRCharacter::sq_getLevelData(...) {
|
||||
// if (vargc == 1) {
|
||||
// local ret = L_sq_GetLevelData(vargv[0]);
|
||||
// local SkillId = this.getCurrentSkillIndex();
|
||||
// local SkillLevel = this.sq_GetSkillLevel(SkillId);
|
||||
// return ret + HookLevelData(this, SkillId, vargv[0]);
|
||||
// } else {
|
||||
// local SkillId = vargv[0];
|
||||
// local Idx = vargv[1];
|
||||
// local SkillLevel = vargv[2];
|
||||
// local ret = L_sq_GetLevelData(SkillId, Idx, SkillLevel);
|
||||
// return ret + HookLevelData(this, SkillId, Idx);
|
||||
// }
|
||||
// }
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,93 @@
|
|||
|
||||
dofile("sqr/Plugins/Anton/antonbuttonclass.nut"); //安图恩按钮类
|
||||
|
||||
dofile("sqr/Plugins/Anton/antontownmainbutton.nut"); //安图恩城镇开启攻坚队界面按钮部分
|
||||
|
||||
dofile("sqr/Plugins/Anton/antontownmainparty_list.nut"); //安图恩城镇队伍列表部分
|
||||
dofile("sqr/Plugins/Anton/antontownmainparty_info.nut"); //安图恩城镇队伍信息部分
|
||||
dofile("sqr/Plugins/Anton/antontownmainparty_req.nut"); //安图恩城镇队伍组队部分
|
||||
dofile("sqr/Plugins/Anton/antontownmainparty_user.nut"); //安图恩城镇队伍玩家部分
|
||||
|
||||
|
||||
|
||||
dofile("sqr/Plugins/Anton/antondungeoninfo.nut"); //安图恩开始攻坚主界面按钮
|
||||
|
||||
|
||||
|
||||
function Anton(obj) {
|
||||
|
||||
//判断 查看信息窗口 交易窗口如果开启则隐藏UI
|
||||
{
|
||||
if (sq_GetPopupWindowMainCotrol(74) || sq_GetPopupWindowMainCotrol(64)) {
|
||||
local window = sq_GetPopupWindowMainCotrol(267);
|
||||
if (window) window.SetVisible(false);
|
||||
} else {
|
||||
local window = sq_GetPopupWindowMainCotrol(267);
|
||||
if (window) window.SetVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
//如果不在安图恩区域则不执行
|
||||
if (L_sq_GetTownIndex() != 18 || L_sq_GetRegionIndex() < 1) return;
|
||||
|
||||
//检查自己是否断线重连
|
||||
if (!getroottable().rawin("AntonDConnect")) {
|
||||
local AntonDConnect = Json_STL("AntonDConnect");
|
||||
AntonDConnect.Put("op", 1075);
|
||||
local str = AntonDConnect.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
AntonDConnect.Delete();
|
||||
getroottable().rawset("AntonDConnect", true);
|
||||
}
|
||||
|
||||
//安图恩城镇开启攻坚队界面按钮部分
|
||||
AntonTownMainButtonControl(obj);
|
||||
|
||||
//安图恩城镇攻坚队界面 攻坚队队伍列表部分
|
||||
AntonTownMainControl_PartyList(obj);
|
||||
//安图恩城镇攻坚队界面 攻坚队队伍信息部分
|
||||
AntonTownMainControl_PartyInfo(obj);
|
||||
//安图恩城镇攻坚队界面 攻坚队队伍申请部分
|
||||
AntonTownMainControl_PartyReq(obj);
|
||||
|
||||
|
||||
//安图恩攻坚副本信息
|
||||
AntonDungeonInfoControlFunc(obj);
|
||||
}
|
||||
|
||||
function AntonTopDraw(obj) {
|
||||
local RootTab = getroottable();
|
||||
|
||||
//如果不在安图恩区域则不执行
|
||||
if (L_sq_GetTownIndex() != 18 || L_sq_GetRegionIndex() < 1) return;
|
||||
|
||||
//如果界面按钮被点击状态为打开 就运行攻坚队伍列表 绘制
|
||||
if (RootTab.rawin("ANTONTEAMMAINBUTTON") && RootTab["ANTONTEAMMAINBUTTON"].WindowSwitch == true) {
|
||||
RootTab["ANTONTOWNMAINCONTROLLIST"].Run(obj);
|
||||
}
|
||||
|
||||
//如果安图恩队伍被点击状态为打开 就运行攻坚队伍信息 绘制
|
||||
if (RootTab.rawin("ANTONTOWNMAINCONTROLLIST") && RootTab["ANTONTOWNMAINCONTROLLIST"].NowSelectTeam != null) {
|
||||
RootTab["ANTONTOWNCONTROLINFO"].Run(obj);
|
||||
}
|
||||
|
||||
|
||||
//如果安图恩攻坚已经开始
|
||||
if (RootTab.rawin("ANTONDUNGEONINFOCONTROL") && RootTab["ANTONDUNGEONINFOCONTROL"].PageState == 1) {
|
||||
RootTab["ANTONDUNGEONINFOCONTROL"].Draw(obj);
|
||||
}
|
||||
|
||||
|
||||
//如果安图恩主界面开启就绘制申请队伍人信息
|
||||
RootTab["ANTONTOWNMAINCONTROLREQ"].Run(obj);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,360 @@
|
|||
//HudPro按钮类
|
||||
class AntonButtonPro extends BasicsDrawTool // obj -- 按钮名称 -- X坐标 -- Y坐标 -- Ani调用路径 -- 宽度 -- 高度
|
||||
{
|
||||
obj = null; //Obj对象
|
||||
State = 0; //按钮状态
|
||||
ClickEnble = false; //点击效果
|
||||
ButtonDynamic = false; //动态按钮效果
|
||||
Index = 0;
|
||||
|
||||
CustomClickEnble = false; //自定义点击效果
|
||||
CustomClickAnifile = null; //自定义点击效果Ani路径
|
||||
CustomButtonName = null; //自定义点击效果名称
|
||||
CustomClickFrame = null; //自定义点击效果Ani编号
|
||||
CustomClickx = null; //自定义点击效果X坐标
|
||||
CustomClicky = null; //自定义点击效果Y坐标
|
||||
|
||||
|
||||
RectEnble = false; //悬停效果
|
||||
RectButtonName = null; //悬停名称
|
||||
RectBaseAnifile = null; //悬停Ani路径
|
||||
RectFrame = null; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = null; //悬停X坐标
|
||||
Recty = null; //悬停Y坐标
|
||||
|
||||
|
||||
ButtonName = null; //按钮名称
|
||||
x = null; //X坐标
|
||||
y = null; //Y坐标
|
||||
BaseAnifile = null; //调用Ani路径
|
||||
width = null; //可点击宽度
|
||||
length = null; //可点击高度
|
||||
//构造函数
|
||||
constructor(gObj, gButtonName, gX, gY, gAnifile, gWidth, gLength, gIndex)
|
||||
{
|
||||
obj = gObj;
|
||||
ButtonName = gButtonName;
|
||||
x = gX;
|
||||
y = gY;
|
||||
BaseAnifile = gAnifile;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
Index = gIndex;
|
||||
}
|
||||
//绘制按钮
|
||||
function Show()
|
||||
{
|
||||
isLBDown();
|
||||
isRBDown();
|
||||
if(ClickEnble) //是否开启点击效果
|
||||
{
|
||||
if(isLBDown() && State == 0) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 1; //按键进入按下状态
|
||||
++y;
|
||||
}
|
||||
if(!isLBDown() && State == 1) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 0; //按键进入弹起状态
|
||||
--y;
|
||||
}
|
||||
}
|
||||
|
||||
if(CustomClickEnble) //是否开启自定义点击效果
|
||||
{
|
||||
if(isLBDown()) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
if(!ButtonDynamic) T_DrawStayAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomClickFrame, CustomButtonName);
|
||||
else T_DrawDynamicAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if(RectEnble) //开启悬停效果时
|
||||
{
|
||||
if((isInRect() && !isLBDown()) || (isInRect() && !CustomClickEnble)) //如果鼠标悬停的时候 并且没有点击的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(44);
|
||||
if(!ButtonDynamic) T_DrawStayAni(obj, RectBaseAnifile, Rectx, Recty, RectFrame, RectButtonName);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
if(!isInRect()) //如果鼠标没有悬停的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(0);
|
||||
if(!ButtonDynamic) T_DrawStayAni(obj, BaseAnifile, x, y, Index, ButtonName);
|
||||
else T_DrawDynamicAni(obj, BaseAnifile, x, y, ButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
//设置自定义点击效果
|
||||
function SetCustomClickEnble(bool, gButtonName, gX, gY, gAnifile, gFrame)
|
||||
{
|
||||
CustomClickEnble = bool; //自定义点击效果
|
||||
CustomClickAnifile = gAnifile; //自定义点击效果Ani路径
|
||||
CustomButtonName = gButtonName; //自定义点击效果名称
|
||||
CustomClickFrame = gFrame; //自定义点击效果Ani编号
|
||||
CustomClickx = gX; //自定义点击效果X坐标
|
||||
CustomClicky = gY; //自定义点击效果Y坐标
|
||||
}
|
||||
|
||||
//设置悬停效果
|
||||
function SetRectEnble(bool, gButtonName, gX, gY, gAnifile, gFrame)
|
||||
{
|
||||
RectEnble = bool; //悬停效果
|
||||
RectButtonName = gButtonName; //悬停名称
|
||||
RectBaseAnifile = gAnifile; //悬停Ani路径
|
||||
RectFrame = gFrame; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = gX; //悬停X坐标
|
||||
Recty = gY; //悬停Y坐标
|
||||
}
|
||||
|
||||
//设置动态按钮
|
||||
function SetClickEnble(bool)
|
||||
{
|
||||
ButtonDynamic = bool;
|
||||
}
|
||||
|
||||
//设置点击效果
|
||||
function SetClickEnble(bool)
|
||||
{
|
||||
ClickEnble = bool;
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect()
|
||||
{
|
||||
if(sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown()
|
||||
{
|
||||
if(isInRect() && IMouse.GetLButton() == 1)
|
||||
{
|
||||
obj.getVar(ButtonName).setBool(0, true);
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
//右键按下状态
|
||||
function isRBDown()
|
||||
{
|
||||
if(isInRect() && IMouse.GetRButton() == 2)
|
||||
{
|
||||
obj.getVar(ButtonName).setBool(1, true);
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp()
|
||||
{
|
||||
if(isInRect() && IMouse.GetLButton() == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键双击状态
|
||||
function IsLBDoubleClick()
|
||||
{
|
||||
if(isInRect() && IMouse.GetLButton() == 64) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键单击状态
|
||||
function isLBActive()
|
||||
{
|
||||
if(isInRect() && IMouse.isButtonUpEvent() && obj.getVar(ButtonName).getBool(0) == true)
|
||||
{
|
||||
obj.getVar(ButtonName).setBool(0, false);
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
//右键单击状态
|
||||
function isRBActive()
|
||||
{
|
||||
if(isInRect() && IMouse.isButtonUpEvent() && obj.getVar(ButtonName).getBool(1) == true)
|
||||
{
|
||||
obj.getVar(ButtonName).setBool(1, false);
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
//别处点击
|
||||
function isNotLBActive()
|
||||
{
|
||||
|
||||
if(!isInRect() && IMouse.isButtonUpEvent()) return true;
|
||||
else return false;
|
||||
}
|
||||
//别处右键点击
|
||||
function isNotRBActive()
|
||||
{
|
||||
if(!isInRect() && IMouse.GetRButton() == 2) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Switch按钮类
|
||||
class AntonSwitchButtonPro extends SwitchButtonPro
|
||||
{
|
||||
obj = null; //Obj对象
|
||||
State = 0; //按钮状态
|
||||
ClickEnble = false; //点击效果
|
||||
ButtonDynamic = false; //动态按钮效果
|
||||
SwitchState = false; //复选框是否选中
|
||||
|
||||
CustomClickEnble = false; //自定义点击效果
|
||||
CustomClickAnifile = null; //自定义点击效果Ani路径
|
||||
CustomButtonName = null; //自定义点击效果名称
|
||||
CustomClickFrame = null; //自定义点击效果Ani编号
|
||||
CustomClickx = null; //自定义点击效果X坐标
|
||||
CustomClicky = null; //自定义点击效果Y坐标
|
||||
|
||||
|
||||
RectEnble = false; //悬停效果
|
||||
RectButtonName = null; //悬停名称
|
||||
RectBaseAnifile = null; //悬停Ani路径
|
||||
RectFrame = null; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = null; //悬停X坐标
|
||||
Recty = null; //悬停Y坐标
|
||||
|
||||
|
||||
ButtonName = null; //按钮名称
|
||||
x = null; //X坐标
|
||||
y = null; //Y坐标
|
||||
BaseAnifile = null; //调用Ani路径
|
||||
BaseAnifileFrame = null; //调用的Ani帧数
|
||||
width = null; //可点击宽度
|
||||
length = null; //可点击高度
|
||||
//构造函数
|
||||
constructor(gObj, gButtonName, gX, gY, gAnifile, gBaseAnifileFrame, gWidth, gLength)
|
||||
{
|
||||
obj = gObj;
|
||||
ButtonName = gButtonName;
|
||||
x = gX;
|
||||
y = gY;
|
||||
BaseAnifile = gAnifile;
|
||||
BaseAnifileFrame = gBaseAnifileFrame;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
}
|
||||
|
||||
//绘制按钮
|
||||
function Show()
|
||||
{
|
||||
|
||||
|
||||
if(ClickEnble) //是否开启点击效果
|
||||
{
|
||||
if(isLBDown() && State == 0) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 1; //按键进入按下状态
|
||||
++y;
|
||||
}
|
||||
if(!isLBDown() && State == 1) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 0; //按键进入弹起状态
|
||||
--y;
|
||||
}
|
||||
}
|
||||
|
||||
if(CustomClickEnble) //是否开启自定义点击效果
|
||||
{
|
||||
if(isLBDown()) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
if(!ButtonDynamic) T_DrawStayAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomClickFrame, CustomButtonName);
|
||||
else T_DrawDynamicAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if(RectEnble) //开启悬停效果时
|
||||
{
|
||||
if((isInRect() && !isLBDown()) || (isInRect() && !CustomClickEnble)) //如果鼠标悬停的时候 并且没有点击的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(44);
|
||||
if(!ButtonDynamic) T_DrawStayAni(obj, RectBaseAnifile, Rectx, Recty, RectFrame, RectButtonName);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if(!isInRect() && !SwitchState) //如果鼠标没有悬停的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(0);
|
||||
if(!ButtonDynamic) T_DrawStayAni(obj, BaseAnifile, x, y, BaseAnifileFrame, ButtonName);
|
||||
else T_DrawDynamicAni(obj, BaseAnifile, x, y, ButtonName);
|
||||
}
|
||||
|
||||
if(!isInRect() && SwitchState)
|
||||
{
|
||||
if(!ButtonDynamic) T_DrawStayAni(obj, RectBaseAnifile, Rectx, Recty, RectFrame, RectButtonName);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
//设置自定义点击效果
|
||||
function SetCustomClickEnble(bool, gButtonName, gX, gY, gAnifile, gFrame)
|
||||
{
|
||||
CustomClickEnble = bool; //自定义点击效果
|
||||
CustomClickAnifile = gAnifile; //自定义点击效果Ani路径
|
||||
CustomButtonName = gButtonName; //自定义点击效果名称
|
||||
CustomClickFrame = gFrame; //自定义点击效果Ani编号
|
||||
CustomClickx = gX; //自定义点击效果X坐标
|
||||
CustomClicky = gY; //自定义点击效果Y坐标
|
||||
}
|
||||
|
||||
//设置悬停效果
|
||||
function SetRectEnble(bool, gButtonName, gX, gY, gAnifile, gFrame)
|
||||
{
|
||||
RectEnble = bool; //悬停效果
|
||||
RectButtonName = gButtonName; //悬停名称
|
||||
RectBaseAnifile = gAnifile; //悬停Ani路径
|
||||
RectFrame = gFrame; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = gX; //悬停X坐标
|
||||
Recty = gY; //悬停Y坐标
|
||||
}
|
||||
|
||||
//设置动态按钮
|
||||
function SetClickEnble(bool)
|
||||
{
|
||||
ButtonDynamic = bool;
|
||||
}
|
||||
|
||||
//设置点击效果
|
||||
function SetClickEnble(bool)
|
||||
{
|
||||
ClickEnble = bool;
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect()
|
||||
{
|
||||
if(sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown()
|
||||
{
|
||||
if(isInRect() && IMouse.GetLButton() == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp()
|
||||
{
|
||||
if(isInRect() && IMouse.GetLButton() == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键双击状态
|
||||
function IsLBDoubleClick()
|
||||
{
|
||||
if(isInRect() && IMouse.GetLButton() == 64) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键单击状态
|
||||
function isLBActive()
|
||||
{
|
||||
if(isInRect() && IMouse.isButtonUpEvent()) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,108 @@
|
|||
/*
|
||||
文件名:antontownmainbutton.nut
|
||||
路径:Plugins/Anton/antontownmainbutton.nut
|
||||
创建日期:2022-09-04 08:54
|
||||
文件用途:城镇中打开安图恩攻坚队面板按钮部分
|
||||
*/
|
||||
|
||||
class AntonTeamMainButtonC extends BasicsDrawTool {
|
||||
ButtonObject = null;
|
||||
State = 0;
|
||||
WindowSwitch = false;
|
||||
|
||||
//创建队伍和加入队伍事件
|
||||
function SendPackEvent_JoinTeam_and_CreatTeam(Type) {
|
||||
local JoinTeam_and_CreatTeam = Json_STL("JoinTeam_and_CreatTeam");
|
||||
JoinTeam_and_CreatTeam.Put("op", 1025);
|
||||
local str = JoinTeam_and_CreatTeam.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
JoinTeam_and_CreatTeam.Delete();
|
||||
}
|
||||
|
||||
//退出队伍事件
|
||||
function SendPackEvent_ExitTeam(Type) {
|
||||
local ExitTeam = Json_STL("ExitTeam");
|
||||
ExitTeam.Put("op", 1029);
|
||||
local str = ExitTeam.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
ExitTeam.Delete();
|
||||
}
|
||||
|
||||
//退出队伍请求
|
||||
function PartyKickPlayer(chunk) {
|
||||
print(chunk);
|
||||
L_sq_SendPackType(13);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
|
||||
//委任队长事件
|
||||
function PartyGiveM(chunk) {
|
||||
local PartyGiveM = Json_STL("PartyGiveM");
|
||||
PartyGiveM.Put("op", 1023);
|
||||
local str = PartyGiveM.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
PartyGiveM.Delete();
|
||||
}
|
||||
|
||||
constructor(obj) {
|
||||
ButtonObject = ButtonPro(obj, "RankSystemMainSwitchButton", 15, 300, "common/training/main/maintab.ani", 39, 35);
|
||||
ButtonObject.SetRectEnble(true, "RankSystemMainSwitchButtonr", 15, 300, "common/training/main/maintab.ani", 0);
|
||||
ButtonObject.SetCustomClickEnble(true, "RankSystemMainSwitchButtonc", 15, 300, "common/training/main/maintab.ani", 0);
|
||||
|
||||
//安图恩创建队伍和加入队伍事件
|
||||
SendPackTypeTable.rawset(11, SendPackEvent_JoinTeam_and_CreatTeam);
|
||||
SendPackTypeTable.rawset(12, SendPackEvent_JoinTeam_and_CreatTeam);
|
||||
//安图恩退出队伍事件
|
||||
SendPackTypeTable.rawset(13, SendPackEvent_ExitTeam);
|
||||
//委任队长事件
|
||||
SendPackTypeTable.rawset(124, PartyGiveM);
|
||||
//玩家自己退出队伍
|
||||
Pack_Control.rawset(1030, PartyKickPlayer);
|
||||
}
|
||||
|
||||
function Run(obj) {
|
||||
if (State == 0 && !sq_GetPopupWindowMainCotrol(267)) {
|
||||
ButtonObject.Show();
|
||||
if (ButtonObject.isLBActive()) {
|
||||
State = 1;
|
||||
L_NewWindows("Lenheart", 267, 0x65535);
|
||||
|
||||
local GetAntonTeamList = Json_STL("GetAntonTeamList");
|
||||
GetAntonTeamList.Put("op", 1007);
|
||||
GetAntonTeamList.Put("Page", 1);
|
||||
local str = GetAntonTeamList.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
GetAntonTeamList.Delete();
|
||||
}
|
||||
} else if (State == 1 && !sq_GetPopupWindowMainCotrol(267)) {
|
||||
local RootTab = getroottable();
|
||||
RootTab["ANTONTOWNMAINCONTROLLIST"].NowSelectTeamFunc = null; //把功能选择页关掉
|
||||
RootTab["ANTONTOWNMAINCONTROLLIST"].NowSelectTeam = null; //把功能选择页关掉
|
||||
State = 0;
|
||||
WindowSwitch = false;
|
||||
} else if (State == 1 && sq_GetPopupWindowMainCotrol(267)) {
|
||||
WindowSwitch = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local RootTab = getroottable();
|
||||
RootTab.rawdelete("ANTONTEAMMAINBUTTON");
|
||||
|
||||
function AntonTownMainButtonControl(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("ANTONTEAMMAINBUTTON") == false) {
|
||||
local ANTONTEAMMAINBUTTONOBJ = AntonTeamMainButtonC(obj);
|
||||
RootTab.rawset("ANTONTEAMMAINBUTTON", ANTONTEAMMAINBUTTONOBJ);
|
||||
} else {
|
||||
RootTab["ANTONTEAMMAINBUTTON"].Run(obj);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
/*
|
||||
文件名:antontownmainparty_info.nut
|
||||
路径:Plugins/Anton/antontownmainparty_info.nut
|
||||
创建日期:2022-09-04 20:09
|
||||
文件用途:城镇中打开安图恩攻坚队面板攻坚队信息部分
|
||||
*/
|
||||
|
||||
class AntonTownControlInfo_C extends BasicsDrawTool {
|
||||
X = 424;
|
||||
Y = 28;
|
||||
UserUiMap = null; //小队成员UI Map
|
||||
UserInfoMap = null; //小队成员Info Map
|
||||
MySelfMap = null; //自己
|
||||
|
||||
CaptainControl = false; //攻坚队长主控
|
||||
|
||||
function RedAntonPlayerInfo(chunk) {
|
||||
//Sout("收到包: %L", chunk);
|
||||
local RootTab = getroottable();
|
||||
BasicsDrawTool.InitClass("AntonTownUserJson"); //自动判断清空
|
||||
local JsonObj = Json_STL("AntonTownUserJsonBuffer");
|
||||
RootTab.rawset("AntonTownUserJson", JsonObj);
|
||||
RootTab["AntonTownUserJson"].Parse(chunk, 0, false);
|
||||
|
||||
//判断是否是攻坚队长主控
|
||||
RootTab["ANTONTOWNCONTROLINFO"].CaptainControl = RootTab["AntonTownUserJson"].Get("CaptainBool");
|
||||
//清空自己的信息
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap = {};
|
||||
//写入自己的信息
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap.rawset("PartyID", RootTab["AntonTownUserJson"].Get("myself->PartyID"));
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap.rawset("PartyCaptain", RootTab["AntonTownUserJson"].Get("myself->PartyCaptain"));
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap.rawset("PlayerGrowTypeJob", RootTab["AntonTownUserJson"].Get("myself->PlayerGrowTypeJob"));
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap.rawset("PlayerSession", RootTab["AntonTownUserJson"].Get("myself->PlayerSession"));
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap.rawset("PlayerLevel", RootTab["AntonTownUserJson"].Get("myself->PlayerLevel"));
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap.rawset("PlayerJob", RootTab["AntonTownUserJson"].Get("myself->PlayerJob"));
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap.rawset("PlayerName", RootTab["AntonTownUserJson"].Get("myself->PlayerName"));
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap.rawset("CaptainBool", RootTab["AntonTownUserJson"].Get("myself->CaptainBool"));
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap.rawset("isPrepare", RootTab["AntonTownUserJson"].Get("myself->isPrepare"));
|
||||
|
||||
//清空小队成员数组
|
||||
RootTab["ANTONTOWNCONTROLINFO"].UserInfoMap = [];
|
||||
//写入小队成员信息
|
||||
for (local i = 0; i < 20; i++) {
|
||||
local gPartyID = RootTab["AntonTownUserJson"].Get("result->" + i + "->PartyID"); //得到队伍ID
|
||||
if (gPartyID == true || gPartyID == false) break; //如果读不到说明读完了 直接走
|
||||
local gPartyCaptain = RootTab["AntonTownUserJson"].Get("result->" + i + "->PartyCaptain"); //得到是否为小队队长
|
||||
local gPlayerGrowTypeJob = RootTab["AntonTownUserJson"].Get("result->" + i + "->PlayerGrowTypeJob"); //得到转职职业(String)
|
||||
local gPlayerSession = RootTab["AntonTownUserJson"].Get("result->" + i + "->PlayerSession"); //得到世界编号
|
||||
local gPlayerLevel = RootTab["AntonTownUserJson"].Get("result->" + i + "->PlayerLevel"); //得到等级
|
||||
local gPlayerJob = RootTab["AntonTownUserJson"].Get("result->" + i + "->PlayerJob"); //得到基础职业
|
||||
local gPlayerJobEx = RootTab["AntonTownUserJson"].Get("result->" + i + "->PlayerJobEx"); //得到基础职业
|
||||
local gPlayerName = RootTab["AntonTownUserJson"].Get("result->" + i + "->PlayerName"); //得到玩家名字
|
||||
local gCaptainBool = RootTab["AntonTownUserJson"].Get("result->" + i + "->CaptainBool"); //得到是否为攻坚队队长
|
||||
local gMaterial = RootTab["AntonTownUserJson"].Get("result->" + i + "->isPrepare"); //得到是否拥有材料
|
||||
local gCID = RootTab["AntonTownUserJson"].Get("result->" + i + "->CID"); //得到是否拥有材料
|
||||
|
||||
local PlayerTab = {
|
||||
PartyID = gPartyID,
|
||||
PartyCaptain = gPartyCaptain,
|
||||
PlayerGrowTypeJob = gPlayerGrowTypeJob,
|
||||
PlayerSession = gPlayerSession,
|
||||
PlayerLevel = gPlayerLevel,
|
||||
PlayerJob = gPlayerJob,
|
||||
PlayerJobEx = gPlayerJobEx,
|
||||
PlayerName = gPlayerName,
|
||||
CaptainBool = gCaptainBool,
|
||||
Material = gMaterial,
|
||||
CID = gCID,
|
||||
}
|
||||
RootTab["ANTONTOWNCONTROLINFO"].UserInfoMap.append(PlayerTab); //PlayerInfoTable丢进数组
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
constructor() {
|
||||
UserUiMap = []; //小队成员UI Map
|
||||
UserInfoMap = []; //小队成员Info Map
|
||||
MySelfMap = {}; //自己
|
||||
|
||||
print("AntonTownControl_C ClassObject Succes");
|
||||
Pack_Control.rawset(1002, RedAntonPlayerInfo);
|
||||
Pack_Control.rawset(1012, RedAntonPlayerInfo);
|
||||
UserUiMap.resize(20);
|
||||
}
|
||||
|
||||
function DrawPartyInfo(obj) {
|
||||
for (local i = 0; i < UserInfoMap.len(); ++i) {
|
||||
if (!UserUiMap[i]) UserUiMap[i] = AntonUserControl_C("AntonUserPlayer" + i, 308 + ((i % 2) * 223), 97 + ((i / 2) * 42), CaptainControl); //如果用户Map没有被实例化则实例化他
|
||||
|
||||
UserUiMap[i].SetPlayerInfo(UserInfoMap[i]);
|
||||
|
||||
UserUiMap[i].Run(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Show(obj) {
|
||||
//如果有攻坚队的具体信息才绘制
|
||||
if (UserInfoMap.len() > 0) {
|
||||
DrawPartyInfo(obj);
|
||||
}
|
||||
}
|
||||
|
||||
function Run(obj) {
|
||||
Show(obj);
|
||||
}
|
||||
}
|
||||
|
||||
local RootTab = getroottable();
|
||||
RootTab.rawdelete("ANTONTOWNCONTROLINFO");
|
||||
|
||||
function AntonTownMainControl_PartyInfo(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("ANTONTOWNCONTROLINFO") == false) {
|
||||
local ANTONTOWNCONTROLINFOOBJ = AntonTownControlInfo_C();
|
||||
RootTab.rawset("ANTONTOWNCONTROLINFO", ANTONTOWNCONTROLINFOOBJ);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,377 @@
|
|||
/*
|
||||
文件名:antontownmainpartylist.nut
|
||||
路径:Plugins/Anton/antontownmainpartylist.nut
|
||||
创建日期:2022-09-04 09:03
|
||||
文件用途:城镇中打开安图恩攻坚队面板攻坚队列表部分
|
||||
*/
|
||||
|
||||
class AntonTownMainControl_PartyList_C extends BasicsDrawTool {
|
||||
X = 37;
|
||||
Y = 38;
|
||||
|
||||
ListUiMap = null; //小队成员UI Map
|
||||
ListInfoMap = null; //小队成员Info Map
|
||||
|
||||
ListCount = null;
|
||||
NowSelectTeam = null;
|
||||
NowSelectTeamFunc = null; //当前选择队伍功能
|
||||
MyTeamId = -1; //我的队伍Id
|
||||
MyCaptainControl = 0; //我是否为攻坚队长
|
||||
|
||||
ReloadingButtonObject = null; //刷新按钮
|
||||
MyTeamButtonObject = null; //我的队伍按钮
|
||||
LeftButtonObject = null; //左按钮
|
||||
RightButtonObject = null; //右按钮
|
||||
PartyReqButtonObject = null; //申请加入攻坚队伍按钮
|
||||
PartyExitButtonObject = null; //退出攻坚队伍按钮
|
||||
PartyStartButtonObject = null; //开始攻坚按钮
|
||||
Page = 1;
|
||||
|
||||
//获取汉字偏移
|
||||
function GetOffserFromLen(char, offset) {
|
||||
return (char.len() * offset)
|
||||
}
|
||||
|
||||
function RedAntonListInfo(chunk) {
|
||||
//Sout("\n\n收到包数据: %L", chunk);
|
||||
local RootTab = getroottable();
|
||||
BasicsDrawTool.InitClass("AntonTownListJson"); //自动判断清空
|
||||
local JsonObj = Json_STL("AntonTownListJsonBuffer");
|
||||
RootTab.rawset("AntonTownListJson", JsonObj);
|
||||
RootTab["AntonTownListJson"].Parse(chunk, 0, false);
|
||||
|
||||
//清空自己的信息
|
||||
RootTab["ANTONTOWNMAINCONTROLLIST"].ListInfoMap = [];
|
||||
|
||||
//获取自己的攻坚队ID
|
||||
local gMyTeamId = RootTab["AntonTownListJson"].Get("MyTeamId");
|
||||
if (gMyTeamId) RootTab["ANTONTOWNMAINCONTROLLIST"].MyTeamId = gMyTeamId;
|
||||
|
||||
//获取自己是否为攻坚队队长
|
||||
local gMyCaptain = RootTab["AntonTownListJson"].Get("MyCaptain");
|
||||
if (gMyCaptain) RootTab["ANTONTOWNMAINCONTROLLIST"].MyCaptainControl = gMyCaptain;
|
||||
|
||||
RootTab["ANTONTOWNMAINCONTROLLIST"].ListCount = RootTab["AntonTownListJson"].Get("ListCount").tointeger();
|
||||
//写入小队成员信息
|
||||
for (local i = 0; i < RootTab["ANTONTOWNMAINCONTROLLIST"].ListCount; i++) {
|
||||
local gTeamId = RootTab["AntonTownListJson"].Get("result->" + i + "->TeamId"); //得到攻坚队伍ID
|
||||
if (gTeamId == true || gTeamId == false) break; //如果读不到说明读完了 直接走
|
||||
local gTeamName = RootTab["AntonTownListJson"].Get("result->" + i + "->TeamName"); //得到攻坚队名称
|
||||
local gState = RootTab["AntonTownListJson"].Get("result->" + i + "->State"); //得到队伍状态
|
||||
local gTeamPlayerCount = RootTab["AntonTownListJson"].Get("result->" + i + "->TeamPlayerCount"); //得到队伍人数
|
||||
|
||||
local ListTab = {
|
||||
TeamId = gTeamId,
|
||||
TeamName = gTeamName,
|
||||
State = gState,
|
||||
TeamPlayerCount = gTeamPlayerCount,
|
||||
}
|
||||
RootTab["ANTONTOWNMAINCONTROLLIST"].ListInfoMap.append(ListTab); //ListTabInfoTable丢进数组
|
||||
}
|
||||
}
|
||||
|
||||
constructor() {
|
||||
ListUiMap = [];
|
||||
ListInfoMap = [];
|
||||
ListUiMap.resize(10);
|
||||
Pack_Control.rawset(1008, RedAntonListInfo);
|
||||
Pack_Control.rawset(1010, RedAntonListInfo);
|
||||
}
|
||||
|
||||
//功能按钮
|
||||
function FuncButtonC(obj, YposOffset, AniIndex) {
|
||||
local FuncThis = null;
|
||||
if (FuncThis == null) {
|
||||
FuncThis = AntonButtonPro(obj, "" + MyTeamId + FuncThis + "Func", X + 360, Y - 32 + YposOffset, "common/anton/funcbutton.ani", 100, 21, AniIndex);
|
||||
FuncThis.SetRectEnble(true, "" + MyTeamId + FuncThis + "Func", X + 360, Y - 32 + YposOffset, "common/anton/funcbutton.ani", AniIndex + 1);
|
||||
FuncThis.SetCustomClickEnble(true, "" + MyTeamId + FuncThis + "FuncSwitchButtonc", X + 360, Y - 32 + YposOffset, "common/anton/funcbutton.ani", AniIndex + 2);
|
||||
}
|
||||
FuncThis.Show();
|
||||
return FuncThis;
|
||||
}
|
||||
|
||||
//绘制背景框
|
||||
function DrawMainBackGround(obj) {
|
||||
//绘制主界面
|
||||
{
|
||||
T_DrawStayAni(obj, "common/anton/new/newbaseui.ani", X, Y, 0, "安图恩队伍列表界面");
|
||||
}
|
||||
}
|
||||
|
||||
//绘制攻坚队伍页面控制
|
||||
function DrawPartyListPageConctrl(obj) {
|
||||
//绘制攻坚队伍数量
|
||||
local ListMaxPage = (ListCount / 12).tointeger() + 1;
|
||||
L_Code_STL(Page.tostring() + " / " + ListMaxPage.tostring(), X + 41, Y + 293, 0xFFFFFFFF, 1);
|
||||
//如果不止1页
|
||||
if (ListMaxPage > 1) {
|
||||
//左按钮
|
||||
{
|
||||
if (LeftButtonObject == null) {
|
||||
LeftButtonObject = AntonButtonPro(obj, "AntonPartyListLeftButton", X + 17, Y + 292, "common/anton/new/newbasebutton.ani", 15, 13, 0);
|
||||
LeftButtonObject.SetRectEnble(true, "AntonPartyListLeftButtonr", X + 17, Y + 292, "common/anton/new/newbasebutton.ani", 1);
|
||||
LeftButtonObject.SetCustomClickEnble(true, "AntonPartyListLeftButtonc", X + 17, Y + 293, "common/anton/new/newbasebutton.ani", 2);
|
||||
}
|
||||
LeftButtonObject.Show();
|
||||
if (LeftButtonObject.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON2");
|
||||
if (Page > 1) --Page;
|
||||
local GetAntonTeamList = Json_STL("GetAntonTeamList");
|
||||
GetAntonTeamList.Put("op", 1007);
|
||||
GetAntonTeamList.Put("Page", Page);
|
||||
local str = GetAntonTeamList.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
GetAntonTeamList.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
//右按钮
|
||||
{
|
||||
if (RightButtonObject == null) {
|
||||
RightButtonObject = AntonButtonPro(obj, "AntonPartyListRightButton", X + 75, Y + 292, "common/anton/new/newbasebutton.ani", 15, 13, 3);
|
||||
RightButtonObject.SetRectEnble(true, "AntonPartyListRightButtonr", X + 75, Y + 292, "common/anton/new/newbasebutton.ani", 4);
|
||||
RightButtonObject.SetCustomClickEnble(true, "AntonPartyListRightButtonc", X + 75, Y + 293, "common/anton/new/newbasebutton.ani", 5);
|
||||
}
|
||||
RightButtonObject.Show();
|
||||
if (RightButtonObject.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON2");
|
||||
if (Page < ListMaxPage) ++Page;
|
||||
local GetAntonTeamList = Json_STL("GetAntonTeamList");
|
||||
GetAntonTeamList.Put("op", 1007);
|
||||
GetAntonTeamList.Put("Page", Page);
|
||||
local str = GetAntonTeamList.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
GetAntonTeamList.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制攻坚队列表信息
|
||||
function DrawPartyListInfo(obj) {
|
||||
//已经开始的 0xFF676665 灰色
|
||||
//可以申请的 0xFFddddea 珍珠白
|
||||
//可以申请的 0xFF4990aa 定义黄
|
||||
|
||||
local Min = 0 + (12 * (Page - 1));
|
||||
local Max = 12 * Page;
|
||||
for (local i = Min; i < ListCount % Max; ++i) {
|
||||
T_DrawStayAni(obj, "common/anton/new/newbaseui.ani", X + 15, Y + 61 + (19 * i), 1, "安图恩队伍列表底框" + i);
|
||||
|
||||
//阶段
|
||||
local stage = 5;
|
||||
if (ListInfoMap[i].State >= 1 && ListInfoMap[i].State <= 3) stage = 6;
|
||||
if (ListInfoMap[i].State >= 4 && ListInfoMap[i].State <= 5) stage = 7;
|
||||
if (ListInfoMap[i].State >= 6) stage = 8;
|
||||
|
||||
T_DrawStayAni(obj, "common/anton/new/newbaseui.ani", X + 18, Y + 62 + (19 * i), stage, "安图恩队伍列表底框" + stage);
|
||||
|
||||
local Color = null;
|
||||
if (ListInfoMap[i].State != 3) {
|
||||
Color = 0xFF4990aa;
|
||||
} else {
|
||||
Color = 0xFF676665;
|
||||
}
|
||||
|
||||
//绘制攻坚队名称
|
||||
local TeamNameStr = ListInfoMap[i].TeamName;
|
||||
|
||||
L_Code_STL(TeamNameStr, X + 60, Y + 64 + (19 * i), Color, 1);
|
||||
|
||||
//绘制攻坚队人数
|
||||
local PlayerCountStr = ListInfoMap[i].TeamPlayerCount + "/20";
|
||||
L_Code_STL(PlayerCountStr, X + 205, Y + 64 + (19 * i), Color, 1);
|
||||
|
||||
ListUiMap[i] = AntonButtonPro(obj, "AntonPartyListSwitchButton" + TeamNameStr, X + 15, Y + 61 + (19 * i), "common/anton/new/newnull.ani", 255, 15, 0);
|
||||
ListUiMap[i].SetRectEnble(true, "AntonPartyListSwitchButtonr" + TeamNameStr, X + 15, Y + 61 + (19 * i), "common/anton/new/newbaseui.ani", 3);
|
||||
ListUiMap[i].Show();
|
||||
|
||||
if (ListUiMap[i].isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
NowSelectTeam = i;
|
||||
|
||||
local GetAntonTeamInfo = Json_STL("GetAntonTeamInfo");
|
||||
GetAntonTeamInfo.Put("op", 1011);
|
||||
GetAntonTeamInfo.Put("TeamId", ListInfoMap[i].TeamId);
|
||||
local str = GetAntonTeamInfo.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
GetAntonTeamInfo.Delete();
|
||||
}
|
||||
|
||||
//当前选择队伍不为空 并且等于当前的i
|
||||
if (NowSelectTeam != null && NowSelectTeam == i) {
|
||||
local Ani = T_DrawStayAni(obj, "common/anton/new/newbaseui.ani", X + 15, Y + 61 + (19 * i), 2, "安图恩队伍列表界面当前选中");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制攻坚队列表功能按钮
|
||||
function DrawPartyListFuncButton(obj) {
|
||||
//刷新攻坚队
|
||||
{
|
||||
if (ReloadingButtonObject == null) {
|
||||
ReloadingButtonObject = AntonButtonPro(obj, "AntonPartyListReloadingButton", X + 96, Y + 291, "common/anton/new/newbasebutton.ani", 46, 17, 7);
|
||||
ReloadingButtonObject.SetRectEnble(true, "AntonPartyListReloadingButtonr", X + 96, Y + 291, "common/anton/new/newbasebutton.ani", 8);
|
||||
ReloadingButtonObject.SetCustomClickEnble(true, "AntonPartyListReloadingButtonc", X + 96, Y + 291, "common/anton/new/newbasebutton.ani", 9);
|
||||
}
|
||||
ReloadingButtonObject.Show();
|
||||
if (ReloadingButtonObject.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
local GetAntonTeamList = Json_STL("GetAntonTeamList");
|
||||
GetAntonTeamList.Put("op", 1007);
|
||||
GetAntonTeamList.Put("Page", Page);
|
||||
local str = GetAntonTeamList.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
GetAntonTeamList.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
//我的攻坚队
|
||||
{
|
||||
if (MyTeamId == -1) {
|
||||
T_DrawStayAni(obj, "common/anton/new/newbasebutton.ani", X + 96 + 48 + 3, Y + 291, 10, "安图恩队伍列表我的攻坚队不可用");
|
||||
} else {
|
||||
if (MyTeamButtonObject == null) {
|
||||
MyTeamButtonObject = AntonButtonPro(obj, "AntonPartyListMyTeamButton", X + 96 + 48 + 3, Y + 291, "common/anton/new/newbasebutton.ani", 97, 23, 11);
|
||||
MyTeamButtonObject.SetRectEnble(true, "AntonPartyListMyTeamButtonr", X + 96 + 48 + 3, Y + 291, "common/anton/new/newbasebutton.ani", 12);
|
||||
MyTeamButtonObject.SetCustomClickEnble(true, "AntonPartyListMyTeamButtonc", X + 96 + 48 + 3, Y + 291, "common/anton/new/newbasebutton.ani", 13);
|
||||
}
|
||||
MyTeamButtonObject.Show();
|
||||
if (MyTeamButtonObject.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
local GetAntonTeamList = Json_STL("GetAntonTeamList");
|
||||
GetAntonTeamList.Put("op", 1011);
|
||||
local str = GetAntonTeamList.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
GetAntonTeamList.Delete();
|
||||
NowSelectTeam = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制攻坚队请求按钮
|
||||
function DrawPartyReqButton(obj) {
|
||||
if (MyTeamId == -1) {
|
||||
//申请加入
|
||||
{
|
||||
if (PartyReqButtonObject == null) {
|
||||
PartyReqButtonObject = AntonButtonPro(obj, "AntonPartyListReloadingButton", X + 636, Y + 500, "common/anton/new/newbasebutton.ani", 70, 17, 14);
|
||||
PartyReqButtonObject.SetRectEnble(true, "AntonPartyListReloadingButtonr", X + 636, Y + 500, "common/anton/new/newbasebutton.ani", 15);
|
||||
PartyReqButtonObject.SetCustomClickEnble(true, "AntonPartyListReloadingButtonc", X + 636, Y + 500, "common/anton/new/newbasebutton.ani", 16);
|
||||
}
|
||||
PartyReqButtonObject.Show();
|
||||
if (PartyReqButtonObject.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON4");
|
||||
local AntonJoinPartyReq = Json_STL("AntonJoinPartyReq");
|
||||
AntonJoinPartyReq.Put("op", 1003);
|
||||
AntonJoinPartyReq.Put("TeamId", ListInfoMap[NowSelectTeam].TeamId);
|
||||
local str = AntonJoinPartyReq.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
AntonJoinPartyReq.Delete();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//退出攻坚队
|
||||
{
|
||||
if (PartyExitButtonObject == null) {
|
||||
PartyExitButtonObject = AntonButtonPro(obj, "AntonPartyListReloadingButton", X + 636, Y + 500, "common/anton/new/newbasebutton.ani", 70, 17, 17);
|
||||
PartyExitButtonObject.SetRectEnble(true, "AntonPartyListReloadingButtonr", X + 636, Y + 500, "common/anton/new/newbasebutton.ani", 18);
|
||||
PartyExitButtonObject.SetCustomClickEnble(true, "AntonPartyListReloadingButtonc", X + 636, Y + 500, "common/anton/new/newbasebutton.ani", 19);
|
||||
}
|
||||
PartyExitButtonObject.Show();
|
||||
if (PartyExitButtonObject.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON4");
|
||||
local AntonExitPartyReq = Json_STL("AntonExitPartyReq");
|
||||
AntonExitPartyReq.Put("op", 1005);
|
||||
local str = AntonExitPartyReq.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
AntonExitPartyReq.Delete();
|
||||
NowSelectTeam = null; //关闭队伍详细信息显示
|
||||
MyTeamId = -1; //清空自己的队伍信息
|
||||
|
||||
//清除正在攻坚的信息
|
||||
local RootTab = getroottable();
|
||||
RootTab.rawdelete("ANTONDUNGEONINFOCONTROL");
|
||||
}
|
||||
}
|
||||
//开始攻坚
|
||||
{
|
||||
local RootTab = getroottable();
|
||||
//如果自己是攻坚队队长 并且 攻坚状态为未开启
|
||||
if (MyCaptainControl == 1 && RootTab.rawin("ANTONDUNGEONINFOCONTROL") && (RootTab["ANTONDUNGEONINFOCONTROL"].State == -1 || RootTab["ANTONDUNGEONINFOCONTROL"].State == 2)) {
|
||||
if (PartyStartButtonObject == null) {
|
||||
PartyStartButtonObject = AntonButtonPro(obj, "AntonPartyListReloadingButton", X + 536, Y + 500, "common/anton/new/newbasebutton.ani", 70, 17, 29);
|
||||
PartyStartButtonObject.SetRectEnble(true, "AntonPartyListReloadingButtonr", X + 536, Y + 500, "common/anton/new/newbasebutton.ani", 30);
|
||||
PartyStartButtonObject.SetCustomClickEnble(true, "AntonPartyListReloadingButtonc", X + 536, Y + 500, "common/anton/new/newbasebutton.ani", 31);
|
||||
}
|
||||
PartyStartButtonObject.Show();
|
||||
if (PartyStartButtonObject.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON4");
|
||||
local AntonPartyStart = Json_STL("AntonPartyStart");
|
||||
local op = 1041;
|
||||
//默认一阶段 如果是二阶段则发1047包二阶段开始
|
||||
if (RootTab["ANTONDUNGEONINFOCONTROL"].State == 2) op = 1047;
|
||||
AntonPartyStart.Put("op", op);
|
||||
local str = AntonPartyStart.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
AntonPartyStart.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
//绘制背景框
|
||||
DrawMainBackGround(obj);
|
||||
|
||||
//如果没有攻坚队信息 则返回
|
||||
if (!ListCount || ListCount <= 0) return;
|
||||
|
||||
//绘制攻坚队伍页面控制
|
||||
DrawPartyListPageConctrl(obj);
|
||||
|
||||
//绘制攻坚队列表信息
|
||||
DrawPartyListInfo(obj);
|
||||
|
||||
//绘制攻坚队功能按钮
|
||||
DrawPartyListFuncButton(obj);
|
||||
|
||||
//绘制攻坚队请求按钮
|
||||
DrawPartyReqButton(obj);
|
||||
}
|
||||
|
||||
function Run(obj) {
|
||||
//绘制类
|
||||
Show(obj);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
local RootTab = getroottable();
|
||||
RootTab.rawdelete("ANTONTOWNMAINCONTROLLIST");
|
||||
|
||||
function AntonTownMainControl_PartyList(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("ANTONTOWNMAINCONTROLLIST") == false) {
|
||||
local ANTONTOWNMAINCONTROLLISTOBJ = AntonTownMainControl_PartyList_C();
|
||||
RootTab.rawset("ANTONTOWNMAINCONTROLLIST", ANTONTOWNMAINCONTROLLISTOBJ);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,233 @@
|
|||
/*
|
||||
文件名:antontownmainparty_req.nut
|
||||
路径:Plugins/Anton/antontownmainparty_req.nut
|
||||
创建日期:2022-09-04 20:11
|
||||
文件用途:城镇中打开安图恩攻坚队面板攻坚队申请部分
|
||||
*/
|
||||
|
||||
|
||||
class AntonTownMainControl_PartyReq_C extends BasicsDrawTool {
|
||||
X = 57;
|
||||
Y = 385;
|
||||
ReqList = null;
|
||||
|
||||
Page = 1;
|
||||
NowSelect = 0;
|
||||
|
||||
|
||||
LeftButtonObject = null; //左按钮
|
||||
RightButtonObject = null; //右按钮
|
||||
|
||||
ClossButtonObj = null;
|
||||
AllowJoinButtonObj = null;
|
||||
RejectJoinButtonObj = null;
|
||||
|
||||
|
||||
function AntonPartyReqPack(chunk) {
|
||||
//print(chunk);
|
||||
local RootTab = getroottable();
|
||||
BasicsDrawTool.InitClass("AntonPartyReqJson"); //自动判断清空
|
||||
local JsonObj = Json_STL("AntonPartyReqJson");
|
||||
RootTab.rawset("AntonPartyReqJson", JsonObj);
|
||||
RootTab["AntonPartyReqJson"].Parse(chunk, 0, false);
|
||||
|
||||
|
||||
local TabBuffer = {
|
||||
UID = RootTab["AntonPartyReqJson"].Get("Charac->UID"),
|
||||
CID = RootTab["AntonPartyReqJson"].Get("Charac->CID"),
|
||||
CaptainBool = RootTab["AntonPartyReqJson"].Get("Charac->CaptainBool"),
|
||||
PartyCaptain = RootTab["AntonPartyReqJson"].Get("Charac->PartyCaptain"),
|
||||
PlayerSession = RootTab["AntonPartyReqJson"].Get("Charac->PlayerSession"),
|
||||
PartyID = RootTab["AntonPartyReqJson"].Get("Charac->PartyID"),
|
||||
PlayerLevel = RootTab["AntonPartyReqJson"].Get("Charac->PlayerLevel"),
|
||||
PlayerName = RootTab["AntonPartyReqJson"].Get("Charac->PlayerName"),
|
||||
PlayerJob = RootTab["AntonPartyReqJson"].Get("Charac->PlayerJob"),
|
||||
PlayerJobEx = RootTab["AntonPartyReqJson"].Get("Charac->PlayerJobEx"),
|
||||
PlayerGrowTypeJob = RootTab["AntonPartyReqJson"].Get("Charac->PlayerGrowTypeJob"),
|
||||
isPrepare = RootTab["AntonPartyReqJson"].Get("Charac->isPrepare"),
|
||||
UiButton = null,
|
||||
}
|
||||
|
||||
RootTab["ANTONTOWNMAINCONTROLREQ"].ReqList.append(TabBuffer);
|
||||
}
|
||||
|
||||
constructor() {
|
||||
ReqList = [];
|
||||
Pack_Control.rawset(1004, AntonPartyReqPack);
|
||||
}
|
||||
|
||||
//获取汉字偏移
|
||||
function GetOffserFromLen(char, offset) {
|
||||
return (char.len() * offset)
|
||||
}
|
||||
|
||||
//绘制申请人具体信息
|
||||
function DrawReqPlayerInfo(obj) {
|
||||
//材料准备情况
|
||||
T_DrawStayAni(obj, "common/anton/material.ani", X + 157, Y - 1, ReqList[NowSelect].isPrepare.tointeger(), "安图恩队伍申请材料准备情况" + ReqList[NowSelect].isPrepare);
|
||||
//头像
|
||||
T_DrawStayAni(obj, "common/anton/face/" + ReqList[NowSelect].PlayerJob + "/" + (ReqList[NowSelect].PlayerJobEx % 16) + ".ani", X, Y, 0, "安图恩队伍申请头像编号" + ReqList[NowSelect].PlayerName);
|
||||
//绘制等级
|
||||
L_Code_STL("Lv." + ReqList[NowSelect].PlayerLevel, X + 40, Y + 17, 0xFF29708a, 1);
|
||||
//绘制名字
|
||||
L_Code_STL(ReqList[NowSelect].PlayerName, X + 40, Y - 1, 0xFF29708a, 1);
|
||||
//绘制职业名
|
||||
L_Code_STL(ReqList[NowSelect].PlayerGrowTypeJob, X + 65 + GetOffserFromLen(ReqList[NowSelect].PlayerGrowTypeJob.tostring(), 3), Y + 17, 0xFF29708a, 1);
|
||||
//绘制信息
|
||||
L_Code_STL("", X + 200, Y + 75, 0xFF29708a, 1);
|
||||
}
|
||||
|
||||
//绘制申请人列表
|
||||
function DrawReqPlayerList(obj) {
|
||||
local Min = 0 + (5 * (Page - 1));
|
||||
local Max = 5 * Page;
|
||||
for (local i = Min; i < ReqList.len() % Max; ++i) {
|
||||
T_DrawStayAni(obj, "common/anton/new/newbaseui.ani", X - 5, Y + 53 + (19 * i), 1, "安图恩队伍申请列表底框" + i);
|
||||
//绘制等级
|
||||
L_Code_STL("Lv." + ReqList[i].PlayerLevel, X + 3, Y + 56 + (19 * i), 0xFF29708a, 1);
|
||||
//绘制名字
|
||||
L_Code_STL(ReqList[i].PlayerName, X + 57, Y + 56 + (19 * i), 0xFF29708a, 1);
|
||||
//材料准备情况
|
||||
T_DrawStayAni(obj, "common/anton/material.ani", X + 160, Y + 56 + (19 * i), ReqList[i].isPrepare.tointeger(), "安图恩队伍申请材料准备情况" + ReqList[NowSelect].isPrepare);
|
||||
|
||||
ReqList[i].UiButton = AntonButtonPro(obj, "AntonPartyReqListSwitchButton" + ReqList[i].PlayerName, X - 5, Y + 53 + (19 * i), "common/anton/new/newnull.ani", 255, 15, 0);
|
||||
ReqList[i].UiButton.SetRectEnble(true, "AntonPartyReqListSwitchButtonr" + ReqList[i].PlayerName, X - 5, Y + 53 + (19 * i), "common/anton/new/newbaseui.ani", 3);
|
||||
ReqList[i].UiButton.Show();
|
||||
|
||||
if (ReqList[i].UiButton.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
NowSelect = i;
|
||||
}
|
||||
}
|
||||
T_DrawStayAni(obj, "common/anton/new/newbaseui.ani", X - 5, Y + 53 + (19 * NowSelect), 2, "安图恩队伍申请列表界面当前选中");
|
||||
}
|
||||
|
||||
//绘制申请人页面控制
|
||||
function DrawReqPlayerListPageConctrl(obj) {
|
||||
//绘制申请人页面数量
|
||||
local ListMaxPage = (ReqList.len() / 5).tointeger() + 1;
|
||||
L_Code_STL(Page.tostring() + " / " + ListMaxPage.tostring(), X + 21, Y + 155, 0xFFFFFFFF, 1);
|
||||
|
||||
//如果申请人列表不止1页
|
||||
if (ListMaxPage > 1) {
|
||||
//左按钮
|
||||
{
|
||||
if (LeftButtonObject == null) {
|
||||
LeftButtonObject = AntonButtonPro(obj, "AntonPartyReqListLeftButton", X - 3, Y + 154, "common/anton/new/newbasebutton.ani", 15, 13, 0);
|
||||
LeftButtonObject.SetRectEnble(true, "AntonPartyReqListLeftButtonr", X - 3, Y + 154, "common/anton/new/newbasebutton.ani", 1);
|
||||
LeftButtonObject.SetCustomClickEnble(true, "AntonPartyReqListLeftButtonc", X - 3, Y + 155, "common/anton/new/newbasebutton.ani", 2);
|
||||
}
|
||||
LeftButtonObject.Show();
|
||||
if (LeftButtonObject.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON2");
|
||||
if (Page > 1) --Page;
|
||||
}
|
||||
}
|
||||
|
||||
//右按钮
|
||||
{
|
||||
if (RightButtonObject == null) {
|
||||
RightButtonObject = AntonButtonPro(obj, "AntonPartyReqListRightButton", X + 55, Y + 154, "common/anton/new/newbasebutton.ani", 15, 13, 3);
|
||||
RightButtonObject.SetRectEnble(true, "AntonPartyReqListRightButtonr", X + 55, Y + 154, "common/anton/new/newbasebutton.ani", 4);
|
||||
RightButtonObject.SetCustomClickEnble(true, "AntonPartyReqListRightButtonc", X + 55, Y + 155, "common/anton/new/newbasebutton.ani", 5);
|
||||
}
|
||||
RightButtonObject.Show();
|
||||
if (RightButtonObject.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON2");
|
||||
if (Page < ListMaxPage) ++Page;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制申请人控制按钮
|
||||
function DrawReqPlayerConctrlButton(obj, Type) {
|
||||
if (Type == 0) {
|
||||
T_DrawStayAni(obj, "common/anton/new/newbasebutton.ani", X + 138, Y + 153, 20, "安图恩队伍申请同意不可用");
|
||||
T_DrawStayAni(obj, "common/anton/new/newbasebutton.ani", X + 138 + 43, Y + 153, 24, "安图恩队伍申请拒绝不可用");
|
||||
} else {
|
||||
//同意按钮
|
||||
{
|
||||
if (AllowJoinButtonObj == null) {
|
||||
AllowJoinButtonObj = AntonButtonPro(obj, "AntonAllowJoinButton", X + 138, Y + 153, "common/anton/new/newbasebutton.ani", 40, 17, 21);
|
||||
AllowJoinButtonObj.SetRectEnble(true, "AntonAllowJoinButtonr", X + 138, Y + 153, "common/anton/new/newbasebutton.ani", 22);
|
||||
AllowJoinButtonObj.SetCustomClickEnble(true, "AntonAllowJoinButtonc", X + 138, Y + 153, "common/anton/new/newbasebutton.ani", 23);
|
||||
}
|
||||
AllowJoinButtonObj.Show();
|
||||
if (AllowJoinButtonObj.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON2");
|
||||
local TabBuffer = {
|
||||
UID = ReqList[NowSelect].UID,
|
||||
CID = ReqList[NowSelect].CID,
|
||||
CaptainBool = ReqList[NowSelect].CaptainBool,
|
||||
PartyCaptain = ReqList[NowSelect].PartyCaptain,
|
||||
PlayerSession = ReqList[NowSelect].PlayerSession,
|
||||
PartyID = ReqList[NowSelect].PartyID,
|
||||
PlayerLevel = ReqList[NowSelect].PlayerLevel,
|
||||
PlayerJob = ReqList[NowSelect].PlayerJob,
|
||||
PlayerJobEx = ReqList[NowSelect].PlayerJobEx,
|
||||
IsPrepare = ReqList[NowSelect].isPrepare,
|
||||
}
|
||||
local TabBufferB = {
|
||||
Charac = TabBuffer,
|
||||
op = 1013,
|
||||
}
|
||||
local ReqStr = Json.Encode(TabBufferB);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(ReqStr);
|
||||
L_sq_SendPack();
|
||||
ReqList.remove(NowSelect);
|
||||
}
|
||||
}
|
||||
|
||||
//拒绝按钮
|
||||
{
|
||||
if (RejectJoinButtonObj == null) {
|
||||
RejectJoinButtonObj = AntonButtonPro(obj, "AntonRejectJoinButton", X + 138 + 43, Y + 153, "common/anton/new/newbasebutton.ani", 40, 17, 25);
|
||||
RejectJoinButtonObj.SetRectEnble(true, "AntonRejectJoinButtonr", X + 138 + 43, Y + 153, "common/anton/new/newbasebutton.ani", 26);
|
||||
RejectJoinButtonObj.SetCustomClickEnble(true, "AntonRejectJoinButtonc", X + 138 + 43, Y + 153, "common/anton/new/newbasebutton.ani", 27);
|
||||
}
|
||||
RejectJoinButtonObj.Show();
|
||||
if (RejectJoinButtonObj.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON2");
|
||||
ReqList.remove(NowSelect);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
//绘制申请人具体信息
|
||||
DrawReqPlayerInfo(obj);
|
||||
|
||||
//绘制申请人列表
|
||||
DrawReqPlayerList(obj);
|
||||
|
||||
//绘制申请人页面控制
|
||||
DrawReqPlayerListPageConctrl(obj);
|
||||
|
||||
//绘制申请人控制按钮
|
||||
DrawReqPlayerConctrlButton(obj, 1);
|
||||
}
|
||||
|
||||
function Run(obj) {
|
||||
//如果不是自己的界面打开
|
||||
local RootTab = getroottable();
|
||||
if(RootTab["ANTONTEAMMAINBUTTON"].State == 0)return;
|
||||
local ArrSize = ReqList.len();
|
||||
if (ArrSize > 0) {
|
||||
Show(obj);
|
||||
} else DrawReqPlayerConctrlButton(obj, 0);
|
||||
}
|
||||
}
|
||||
|
||||
local RootTab = getroottable();
|
||||
RootTab.rawdelete("ANTONTOWNMAINCONTROLREQ");
|
||||
|
||||
function AntonTownMainControl_PartyReq(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("ANTONTOWNMAINCONTROLREQ") == false) {
|
||||
local ANTONTOWNMAINCONTROLREQOBJ = AntonTownMainControl_PartyReq_C();
|
||||
RootTab.rawset("ANTONTOWNMAINCONTROLREQ", ANTONTOWNMAINCONTROLREQOBJ);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,303 @@
|
|||
/*
|
||||
文件名:antontownmainparty_user.nut
|
||||
路径:Plugins/Anton/antontownmainparty_user.nut
|
||||
创建日期:2022-09-04 20:12
|
||||
文件用途:城镇中打开安图恩攻坚队面板攻坚队玩家部分
|
||||
*/
|
||||
|
||||
class AntonUserControl_C extends BasicsDrawTool
|
||||
{
|
||||
CaptainControl = null; //攻坚队长主控
|
||||
|
||||
PartyID = null; //队伍ID
|
||||
PlayerLevel = null; //玩家等级
|
||||
PlayerName = null; //玩家名字
|
||||
PlayerJob = null; //玩家基础职业
|
||||
PlayerJobEx = null; //玩家转职职业
|
||||
PlayerGrowTypeJob = null; //玩家转职职业
|
||||
PlayerSession = null; //玩家世界编号
|
||||
PartyCaptain = null; //玩家是否小队队长
|
||||
CaptainBool = null; //是否攻坚队队长
|
||||
Material = null; //是否拥有材料
|
||||
CID = null; //玩家CID
|
||||
|
||||
CheakPlayerInfoFunc = null;
|
||||
|
||||
FuncButtonSwitch = false; //功能界面是否打开
|
||||
MyName = null;
|
||||
ButtonObj = null;
|
||||
X = 0;
|
||||
Y = 0;
|
||||
|
||||
KickoutPlayerButtonObj = null; //踢出玩家按钮
|
||||
CheckPlayerInfoButtonObj = null; //查看信息按钮
|
||||
PartyFuncButtonObj = null; //组队按钮
|
||||
TradingPlayerButtonObj = null; //交易按钮
|
||||
|
||||
//获取汉字偏移
|
||||
function GetOffserFromLen(char, offset)
|
||||
{
|
||||
return (char.len() * offset)
|
||||
}
|
||||
|
||||
constructor(gName, gX, gY, gCaptainControl)
|
||||
{
|
||||
MyName = gName;
|
||||
X = gX;
|
||||
Y = gY;
|
||||
print("AntonUserControl_C ClassObject Succes");
|
||||
CaptainControl = gCaptainControl;
|
||||
}
|
||||
|
||||
//设置Player信息
|
||||
function SetPlayerInfo(InfoTable)
|
||||
{
|
||||
PartyID = InfoTable.PartyID; //队伍ID
|
||||
PlayerLevel = InfoTable.PlayerLevel; //玩家等级
|
||||
PlayerName = InfoTable.PlayerName; //玩家名字
|
||||
PlayerJob = InfoTable.PlayerJob; //玩家基础职业
|
||||
PlayerJobEx = InfoTable.PlayerJobEx; //玩家转职职业
|
||||
PlayerGrowTypeJob = InfoTable.PlayerGrowTypeJob; //玩家转职职业
|
||||
PlayerSession = InfoTable.PlayerSession; //玩家世界编号
|
||||
PartyCaptain = InfoTable.PartyCaptain; //玩家是否小队队长
|
||||
CaptainBool = InfoTable.CaptainBool; //是否攻坚队队长
|
||||
Material = InfoTable.Material; //是否拥有材料
|
||||
CID = InfoTable.CID; //玩家CID
|
||||
}
|
||||
|
||||
function FuncButtonC(obj, YposOffset, AniIndex)
|
||||
{
|
||||
local FuncThis = null;
|
||||
if(FuncThis == null)
|
||||
{
|
||||
FuncThis = AntonButtonPro(obj, MyName + FuncThis + "Func", AntonTownControl_C.X + X - 110, AntonTownControl_C.Y + Y - 1 + YposOffset, "common/anton/funcbutton.ani", 100, 21, AniIndex);
|
||||
FuncThis.SetRectEnble(true, MyName + FuncThis + "Func", AntonTownControl_C.X + X - 110, AntonTownControl_C.Y + Y - 1 + YposOffset, "common/anton/funcbutton.ani", AniIndex + 1);
|
||||
FuncThis.SetCustomClickEnble(true, FuncThis + "FuncSwitchButtonc", AntonTownControl_C.X + X - 110, AntonTownControl_C.Y + Y - 1 + YposOffset, "common/anton/funcbutton.ani", AniIndex + 2);
|
||||
}
|
||||
FuncThis.Show();
|
||||
return FuncThis;
|
||||
}
|
||||
|
||||
//绘制功能按键
|
||||
function DrawFucButton(obj)
|
||||
{
|
||||
if(FuncButtonSwitch) //功能函数开关
|
||||
{
|
||||
local Ypos = 0; //初始偏移
|
||||
|
||||
{ //邀请组队
|
||||
if(PartyID == 0)
|
||||
{
|
||||
local CheakPlayer = FuncButtonC(obj, Ypos, 12);
|
||||
if(CheakPlayer.isLBActive())
|
||||
{
|
||||
L_sq_SendPackType(10);
|
||||
L_sq_SendPackWord(PlayerSession);
|
||||
L_sq_SendPackByte(0);
|
||||
L_sq_SendPackDWord(1);
|
||||
L_sq_SendPackWord(0);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
Ypos += 21;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
{ //查看信息
|
||||
local CheakPlayer = FuncButtonC(obj, Ypos, 0);
|
||||
if(CheakPlayer.isLBActive())
|
||||
{
|
||||
L_sq_SendPackType(8);
|
||||
L_sq_SendPackWord(PlayerSession);
|
||||
L_sq_SendPackByte(3);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
Ypos += 21;
|
||||
}
|
||||
|
||||
{ //交易
|
||||
local TradingPlayer = FuncButtonC(obj, Ypos, 6);
|
||||
if(TradingPlayer.isLBActive())
|
||||
{
|
||||
L_sq_SendPackType(10);
|
||||
L_sq_SendPackWord(PlayerSession);
|
||||
L_sq_SendPackByte(1);
|
||||
L_sq_SendPackDWord(22053);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
Ypos += 21;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//绘制主Ani
|
||||
function DrawMainAni(obj)
|
||||
{
|
||||
if(ButtonObj == null)
|
||||
{
|
||||
ButtonObj = AntonButtonPro(obj, MyName, AntonTownControl_C.X + X, AntonTownControl_C.Y + Y, "common/anton/user.ani", 329, 17, 0);
|
||||
ButtonObj.SetRectEnble(true, MyName + "SwitchButtonr", AntonTownControl_C.X + X - 8, AntonTownControl_C.Y + Y - 8, "common/anton/user.ani", 2);
|
||||
}
|
||||
ButtonObj.Show();
|
||||
|
||||
//绘制队伍
|
||||
T_DrawStayAni(obj, "common/anton/partytype.ani", AntonTownControl_C.X + X + 6, AntonTownControl_C.Y + Y + 2, PartyID + 1, "安图恩队伍编号" + PartyID, 1.0);
|
||||
//绘制材料准备情况
|
||||
T_DrawStayAni(obj, "common/anton/material.ani", AntonTownControl_C.X + X + 272, AntonTownControl_C.Y + Y + 2, Material.tointeger(), "安图恩材料准备情况" + Material, 1.0);
|
||||
}
|
||||
|
||||
//绘制头像
|
||||
function DrawFaceAni(obj)
|
||||
{
|
||||
T_DrawStayAni(obj, "common/anton/face/" + PlayerJob + "/" + (PlayerJobEx % 16) + ".ani", X, Y, 0, "安图恩头像编号" + PlayerName);
|
||||
//如果是攻坚队长主控
|
||||
if(CaptainControl && !CaptainBool)
|
||||
{
|
||||
KickoutPlayerButtonObj = AntonButtonPro(obj, "AntonPartyKickoutButton" + PlayerName.tostring(), X - 9, Y - 10, "common/anton/new/newnull.ani", 38, 39, 0);
|
||||
KickoutPlayerButtonObj.SetRectEnble(true, "AntonPartyKickoutButtonr" + PlayerName.tostring(), X - 9, Y - 10, "common/anton/new/newfunc.ani", 0);
|
||||
KickoutPlayerButtonObj.Show();
|
||||
|
||||
if(KickoutPlayerButtonObj.isLBActive())
|
||||
{
|
||||
obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
local AntonKickoutPartyPlayer = Json_STL("AntonKickoutPartyPlayer");
|
||||
AntonKickoutPartyPlayer.Put("op", 1015);
|
||||
AntonKickoutPartyPlayer.Put("TCID", CID);
|
||||
local str = AntonKickoutPartyPlayer.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
AntonKickoutPartyPlayer.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制名字
|
||||
function DrawPlayerName(obj)
|
||||
{
|
||||
L_Code_STL(PlayerName.tostring(), X + 40, Y - 1, 0xFF4990aa, 1);
|
||||
}
|
||||
|
||||
//绘制等级
|
||||
function DrawPlayerLevel(obj)
|
||||
{
|
||||
L_Code_STL("Lv." + PlayerLevel, X + 40, Y + 17, 0xFF29708a, 1);
|
||||
}
|
||||
|
||||
//绘制职业名字
|
||||
function DrawPlayerGrowTypeName(obj)
|
||||
{
|
||||
L_Code_STL(PlayerGrowTypeJob, X + 65 + GetOffserFromLen(PlayerLevel.tostring(), 3), Y + 17, 0xFF29708a, 1);
|
||||
}
|
||||
|
||||
//绘制队伍图标
|
||||
function DrawPlayerPartyType(obj)
|
||||
{
|
||||
if(CaptainBool == true)
|
||||
{
|
||||
T_DrawStayAni(obj, "common/anton/partytype.ani", X + 133, Y - 1, 0, "安图恩队伍编号队长");
|
||||
}
|
||||
else T_DrawStayAni(obj, "common/anton/partytype.ani", X + 133, Y - 1, PartyID + 1, "安图恩队伍编号" + PartyID);
|
||||
}
|
||||
|
||||
//绘制材料准备情况
|
||||
function DrawPlayerMaterial(obj)
|
||||
{
|
||||
T_DrawStayAni(obj, "common/anton/material.ani", X + 157, Y - 1, Material.tointeger(), "安图恩材料准备情况" + Material.tostring());
|
||||
}
|
||||
|
||||
//绘制交互功能按钮
|
||||
function DrawPlayerFunc(obj)
|
||||
{
|
||||
//绘制查看信息按钮
|
||||
{
|
||||
if(!CheckPlayerInfoButtonObj)
|
||||
{
|
||||
CheckPlayerInfoButtonObj = AntonButtonPro(obj, "AntonCheckPlayerInfoButton", X + 153, Y + 12, "common/anton/new/newfunc.ani", 16, 16, 1);
|
||||
CheckPlayerInfoButtonObj.SetRectEnble(true, "AntonCheckPlayerInfoButtonr", X + 153, Y + 12, "common/anton/new/newfunc.ani", 2);
|
||||
CheckPlayerInfoButtonObj.SetCustomClickEnble(true, "AntonCheckPlayerInfoButtonr", X + 153, Y + 13, "common/anton/new/newfunc.ani", 2);
|
||||
}
|
||||
CheckPlayerInfoButtonObj.Show();
|
||||
if(CheckPlayerInfoButtonObj.isLBActive())
|
||||
{
|
||||
obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
L_sq_SendPackType(8);
|
||||
L_sq_SendPackWord(PlayerSession);
|
||||
L_sq_SendPackByte(3);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
}
|
||||
|
||||
//绘制交易按钮
|
||||
{
|
||||
if(!TradingPlayerButtonObj)
|
||||
{
|
||||
TradingPlayerButtonObj = AntonButtonPro(obj, "AntonTradingPlayerButton", X + 171, Y + 12, "common/anton/new/newfunc.ani", 16, 16, 3);
|
||||
TradingPlayerButtonObj.SetRectEnble(true, "AntonTradingPlayerButtonr", X + 171, Y + 12, "common/anton/new/newfunc.ani", 4);
|
||||
TradingPlayerButtonObj.SetCustomClickEnble(true, "AntonTradingPlayerButtonr", X + 171, Y + 13, "common/anton/new/newfunc.ani", 4);
|
||||
}
|
||||
TradingPlayerButtonObj.Show();
|
||||
if(TradingPlayerButtonObj.isLBActive())
|
||||
{
|
||||
obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
L_sq_SendPackType(10);
|
||||
L_sq_SendPackWord(PlayerSession);
|
||||
L_sq_SendPackByte(1);
|
||||
L_sq_SendPackDWord(22053);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
}
|
||||
|
||||
//绘制组队按钮
|
||||
{
|
||||
if(!PartyFuncButtonObj)
|
||||
{
|
||||
PartyFuncButtonObj = AntonButtonPro(obj, "AntonPartyFuncButton", X + 189, Y + 12, "common/anton/new/newfunc.ani", 16, 16, 5);
|
||||
PartyFuncButtonObj.SetRectEnble(true, "AntonPartyFuncButtonr", X + 189, Y + 12, "common/anton/new/newfunc.ani", 6);
|
||||
PartyFuncButtonObj.SetCustomClickEnble(true, "AntonPartyFuncButtonr", X + 189, Y + 13, "common/anton/new/newfunc.ani", 6);
|
||||
}
|
||||
PartyFuncButtonObj.Show();
|
||||
if(PartyFuncButtonObj.isLBActive())
|
||||
{
|
||||
obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
L_sq_SendPackType(10);
|
||||
L_sq_SendPackWord(PlayerSession);
|
||||
L_sq_SendPackByte(0);
|
||||
L_sq_SendPackDWord(1);
|
||||
L_sq_SendPackWord(0);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj)
|
||||
{
|
||||
//绘制头像
|
||||
DrawFaceAni(obj);
|
||||
|
||||
//绘制名字
|
||||
DrawPlayerName(obj);
|
||||
|
||||
//绘制等级
|
||||
DrawPlayerLevel(obj);
|
||||
|
||||
//绘制职业名字
|
||||
DrawPlayerGrowTypeName(obj);
|
||||
|
||||
//绘制队伍图标
|
||||
DrawPlayerPartyType(obj);
|
||||
|
||||
//绘制材料准备情况
|
||||
DrawPlayerMaterial(obj);
|
||||
|
||||
//绘制交互功能按钮
|
||||
DrawPlayerFunc(obj);
|
||||
}
|
||||
|
||||
function Run(obj)
|
||||
{
|
||||
Show(obj);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,969 @@
|
|||
/*
|
||||
文件名:AradPass.nut
|
||||
路径:Plugins/AradPass/AradPass.nut
|
||||
创建日期:2023-10-18 08:38
|
||||
文件用途:
|
||||
*/
|
||||
class AradPassC extends BasicsDrawTool {
|
||||
WindowObj = null; //窗口对象
|
||||
MainState = false; //主状态
|
||||
X = 124;
|
||||
Y = 34;
|
||||
|
||||
Page = 0;
|
||||
|
||||
Title = null;
|
||||
QuestTitle = null;
|
||||
QuestPage = 0;
|
||||
|
||||
BaseInfo = null;
|
||||
|
||||
Mobj = null;
|
||||
|
||||
|
||||
|
||||
//每日任务数组
|
||||
DailyTasks = null;
|
||||
//重复任务数组
|
||||
RepeatingTasks = null;
|
||||
//赛季任务数组
|
||||
SeasonTasks = null;
|
||||
|
||||
//标签提示
|
||||
TabSuccessTips = null;
|
||||
|
||||
//等级按钮
|
||||
LevelButton = null;
|
||||
LevelPage = 0;
|
||||
|
||||
//战令等级
|
||||
MyPassLevel = 2;
|
||||
|
||||
//ItemInfo
|
||||
ItemInfoObject = null;
|
||||
ItemInfoDrawS = null;
|
||||
|
||||
RewardInfoObject = null;
|
||||
RewardInfoEffTimer = null;
|
||||
RewardSuccessTips = null;
|
||||
|
||||
function GetBaseInfo() {
|
||||
local T = {
|
||||
op = 20059001
|
||||
}
|
||||
SendPack(T);
|
||||
local T2 = {
|
||||
op = 20059005
|
||||
}
|
||||
SendPack(T2);
|
||||
}
|
||||
|
||||
function GetBaseInfoCallBack(Chunk) {
|
||||
// Sout("收到包 : \n %L", Chunk);
|
||||
local Jso = Json.Decode(Chunk);
|
||||
foreach(Value in Jso.itemInfo) {
|
||||
if (Value.Name2.len() == 0)
|
||||
Value.Name2 = "Yosin-Team";
|
||||
ItemInfoObject[Value.Id] <- Value;
|
||||
}
|
||||
}
|
||||
|
||||
function GetBaseInfoCallBack2(Chunk) {
|
||||
// Sout("收到包 : \n %L", Chunk);
|
||||
local Jso = Json.Decode(Chunk);
|
||||
BaseInfo = {};
|
||||
BaseInfo = clone(Jso);
|
||||
|
||||
LevelPage = ((BaseInfo.Exp / 1000) + 1) / 10;
|
||||
}
|
||||
|
||||
|
||||
QuestSuccessTips = null;
|
||||
|
||||
function GetPlayerQuestCallBack(Chunk) {
|
||||
// Sout("收到包 : \n %L", Chunk);
|
||||
local Jso = Json.Decode(Chunk);
|
||||
DailyTasks = Jso.task[0];
|
||||
RepeatingTasks = Jso.task[1];
|
||||
SeasonTasks = Jso.task[2];
|
||||
|
||||
QuestSuccessTips = [0, 0, 0];
|
||||
TabSuccessTips[1] = 0;
|
||||
|
||||
foreach(Pos, Value in Jso.task) {
|
||||
foreach(QuestObject in Value) {
|
||||
if (QuestObject.SuccessState == 0) {
|
||||
if (QuestObject.NowSuccessCount >= QuestObject.MaxSuccessCount) {
|
||||
QuestSuccessTips[Pos] = 1;
|
||||
TabSuccessTips[1] = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function GetPlayerReward() {
|
||||
local T = {
|
||||
op = 20059003
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
function GetPlayerQuest() {
|
||||
local T = {
|
||||
op = 20059031
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
function GetPlayerRewardCallBack(Chunk) {
|
||||
// Sout("收到包 : \n %L", Chunk);
|
||||
//还原奖励领取提示数组
|
||||
RewardSuccessTips = [0, 0, 0, 0, 0];
|
||||
TabSuccessTips[0] = 0;
|
||||
|
||||
RewardInfoObject = {};
|
||||
local Jso = Json.Decode(Chunk);
|
||||
foreach(Pos, Value in Jso.reward) {
|
||||
RewardInfoObject.rawset(Pos, Value);
|
||||
if ((Pos)<(BaseInfo.Exp / 1000 + 1)) {
|
||||
//判断是否有未领取的道具绘制感叹号要用
|
||||
local Page = (Pos / 10);
|
||||
if (RewardSuccessTips[Page] == 0) {
|
||||
if (Value.isOrdinary == 0) {
|
||||
RewardSuccessTips[Page] = 1;
|
||||
TabSuccessTips[0] = 1;
|
||||
}
|
||||
if (BaseInfo.isVip) {
|
||||
if (Value.isadditional == 0) {
|
||||
RewardSuccessTips[Page] = 1;
|
||||
TabSuccessTips[0] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//发包成功
|
||||
function SendSuccessAradPass(a2, a3, a4) {
|
||||
local T = {
|
||||
op = 20059023,
|
||||
id = a2,
|
||||
count = a4,
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
function RegisterQuestSu() {
|
||||
L_CompleteTaskTable.rawset("AradPass", SendSuccessAradPass.bindenv(this));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
constructor() {
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
|
||||
//注册完成任务回调
|
||||
RegisterQuestSu();
|
||||
|
||||
ItemInfoObject = {};
|
||||
|
||||
//标签完成提示
|
||||
TabSuccessTips = [0, 0, 0];
|
||||
|
||||
Pack_Control.rawset(20059002, GetBaseInfoCallBack.bindenv(this));
|
||||
Pack_Control.rawset(20059006, GetBaseInfoCallBack2.bindenv(this));
|
||||
Pack_Control.rawset(20059004, GetPlayerRewardCallBack.bindenv(this));
|
||||
Pack_Control.rawset(20059032, GetPlayerQuestCallBack.bindenv(this));
|
||||
|
||||
GetBaseInfo();
|
||||
GetPlayerReward();
|
||||
GetPlayerQuest();
|
||||
|
||||
RewardInfoEffTimer = Clock();
|
||||
RewardSuccessTips = [0, 0, 0, 0, 0];
|
||||
}
|
||||
|
||||
//绘制等级数字
|
||||
function DrawNumber(num, ...) {
|
||||
num = num.tostring();
|
||||
local x = X + 38;
|
||||
local y = Y + 110;
|
||||
if (num.len() == 2) x = X + 28;
|
||||
for (local i = 0; i< num.len(); i++) {
|
||||
local n = num.slice(i, i + 1);
|
||||
n = n.tointeger();
|
||||
local Img = "interface2/ui/aradpass/chn/aradpassnum.img";
|
||||
if (BaseInfo.isVip) Img = "interface2/ui/aradpass/chn/aradpassnumy.img";
|
||||
L_sq_DrawImg(Img, n, x + (i * 18), y);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//绘制等级数字
|
||||
function DrawSmallNumber(num, bx) {
|
||||
num = num.tostring();
|
||||
local x = X + 38 + bx;
|
||||
local y = Y + 250;
|
||||
if (num.len() == 2) x = X + 33 + bx;
|
||||
for (local i = 0; i< num.len(); i++) {
|
||||
local n = num.slice(i, i + 1);
|
||||
n = n.tointeger();
|
||||
local Img = "interface2/ui/aradpass/chn/aradpassnum.img";
|
||||
if (BaseInfo.isVip) Img = "interface2/ui/aradpass/chn/aradpassnumy.img";
|
||||
L_sq_DrawImg(Img, n, x + (i * 9), y, 0, sq_RGBA(255, 255, 255, 255), 0.5, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
//绘制道具带道具信息
|
||||
function DrawItemEx(X, Y, Id, Count) {
|
||||
L_Sq_DrawItem(X, Y, Id, Count, 0, 0, 0);
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, 24, 24)) {
|
||||
ItemInfoDrawS = {};
|
||||
ItemInfoDrawS.X <- X;
|
||||
ItemInfoDrawS.Y <- Y;
|
||||
ItemInfoDrawS.ItemId <- Id;
|
||||
}
|
||||
}
|
||||
|
||||
//绘制道具相信信息
|
||||
ItemObject = null;
|
||||
|
||||
function DrawItemInfo(obj) {
|
||||
if (ItemInfoDrawS) {
|
||||
if (!ItemObject) {
|
||||
local ItemId = ItemInfoDrawS.ItemId;
|
||||
if (ItemInfoObject.rawin(ItemId)) {
|
||||
ItemObject = ItemInfoClass(ItemInfoObject[ItemId]);
|
||||
}
|
||||
}
|
||||
ItemObject.Show(ItemInfoDrawS.X, ItemInfoDrawS.Y - ItemObject.PageLength);
|
||||
} else {
|
||||
ItemObject = null;
|
||||
}
|
||||
}
|
||||
|
||||
function DrawRewardItem(obj) {
|
||||
local Idx = LevelPage * 10;
|
||||
for (local i = 0; i< 10; i++) {
|
||||
//奖励下标
|
||||
local RealPos = Idx + i;
|
||||
|
||||
if (RealPos in RewardInfoObject) {
|
||||
|
||||
local RewardObject = RewardInfoObject[RealPos];
|
||||
|
||||
//普通道具
|
||||
if ("itemid" in RewardObject) {
|
||||
//普通底
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 21, X + 11 + 45 + (i * 47), Y + 50 + 162 + 61);
|
||||
|
||||
DrawItemEx(X + 64 + (i * 47), Y + 296, RewardObject.itemid, RewardObject.num);
|
||||
|
||||
//已领取
|
||||
if (RewardObject.isOrdinary) {
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 23, X + 11 + 45 + (i * 47), Y + 50 + 162 + 61);
|
||||
}
|
||||
//未领取
|
||||
else if (!RewardObject.isOrdinary) {
|
||||
//快达到等级
|
||||
if ((RealPos + 1) == MyPassLevel + 1) {
|
||||
|
||||
}
|
||||
//已达到等级
|
||||
else if ((RealPos + 1) <= MyPassLevel) {
|
||||
local A = 60;
|
||||
if (RewardInfoEffTimer) {
|
||||
if (Clock() - RewardInfoEffTimer <= 1000) {
|
||||
A = sq_GetUniformVelocity(60, 255, Clock() - RewardInfoEffTimer, 1000);
|
||||
}
|
||||
if (Clock() - RewardInfoEffTimer <= 2000 && Clock() - RewardInfoEffTimer > 1000) {
|
||||
A = sq_GetUniformVelocity(255, 60, Clock() - RewardInfoEffTimer - 1000, 1000);
|
||||
}
|
||||
if (Clock() - RewardInfoEffTimer > 2000) {
|
||||
RewardInfoEffTimer = Clock();
|
||||
}
|
||||
}
|
||||
L_sq_SetDrawImgModel(2, 0);
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 29, X + 7 + 45 + (i * 47), Y + 50 + 162 + 58, 0, sq_RGBA(255, 255, 255, A), 1.0, 1.0);
|
||||
L_sq_ReleaseDrawImgModel();
|
||||
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X + 7 + 45 + (i * 47), Y + 50 + 162 + 58, 44, 74)) {
|
||||
if (Mobj.LbEvent) {
|
||||
local T = {
|
||||
op = 20059007,
|
||||
Type = 0,
|
||||
lv = RealPos + 1,
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
}
|
||||
}
|
||||
//未达到等级
|
||||
else {
|
||||
//普通底Eff 未领取
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 33, X + 11 + 45 + (i * 47), Y + 50 + 162 + 61);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//是不是VIP
|
||||
local IsVip = BaseInfo.isVip;
|
||||
|
||||
//进阶道具
|
||||
if ("additionalItemId" in RewardObject && "additionalItemId2" in RewardObject) {
|
||||
//普通底
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 26, X + 11 + 45 + (i * 47), Y + 50 + 162 + 138);
|
||||
|
||||
DrawItemEx(X + 64 + (i * 47), Y + 356, RewardObject.additionalItemId, RewardObject.additionalNum);
|
||||
DrawItemEx(X + 64 + (i * 47), Y + 390, RewardObject.additionalItemId2, RewardObject.additionalNum2);
|
||||
|
||||
if (RewardObject.isadditional) {
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 28, X + 11 + 45 + (i * 47), Y + 50 + 162 + 138);
|
||||
} else {
|
||||
if (!IsVip) {
|
||||
//普通底
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 32, X + 11 + 45 + (i * 47), Y + 50 + 162 + 138);
|
||||
} else {
|
||||
//快达到等级
|
||||
if ((RealPos + 1) == MyPassLevel + 1) {
|
||||
|
||||
}
|
||||
//已达到等级
|
||||
else if ((RealPos + 1) <= MyPassLevel) {
|
||||
local A = 60;
|
||||
if (RewardInfoEffTimer) {
|
||||
if (Clock() - RewardInfoEffTimer <= 1000) {
|
||||
A = sq_GetUniformVelocity(60, 255, Clock() - RewardInfoEffTimer, 1000);
|
||||
}
|
||||
if (Clock() - RewardInfoEffTimer <= 2000 && Clock() - RewardInfoEffTimer > 1000) {
|
||||
A = sq_GetUniformVelocity(255, 60, Clock() - RewardInfoEffTimer - 1000, 1000);
|
||||
}
|
||||
if (Clock() - RewardInfoEffTimer > 2000) {
|
||||
RewardInfoEffTimer = Clock();
|
||||
}
|
||||
}
|
||||
L_sq_SetDrawImgModel(2, 0);
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 30, X + 7 + 45 + (i * 47), Y + 45 + 162 + 138, 0, sq_RGBA(255, 255, 255, A), 1.0, 1.0);
|
||||
L_sq_ReleaseDrawImgModel();
|
||||
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X + 7 + 45 + (i * 47), Y + 45 + 162 + 138, 44, 74)) {
|
||||
if (Mobj.LbEvent) {
|
||||
local T = {
|
||||
op = 20059007,
|
||||
Type = 1,
|
||||
lv = RealPos + 1,
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
}
|
||||
}
|
||||
//未达到等级
|
||||
else {
|
||||
//普通底Eff 未领取
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 33, X + 11 + 45 + (i * 47), Y + 50 + 162 + 138);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
//普通底
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 25, X + 11 + 45 + (i * 47), Y + 50 + 162 + 138);
|
||||
|
||||
DrawItemEx(X + 64 + (i * 47), Y + 373, RewardObject.additionalItemId, RewardObject.additionalNum);
|
||||
|
||||
|
||||
if (RewardObject.isadditional) {
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 27, X + 11 + 45 + (i * 47), Y + 50 + 162 + 138);
|
||||
} else {
|
||||
if (!IsVip) {
|
||||
//普通底
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 31, X + 11 + 45 + (i * 47), Y + 50 + 162 + 138);
|
||||
} else {
|
||||
//快达到等级
|
||||
if ((RealPos + 1) == MyPassLevel + 1) {
|
||||
|
||||
}
|
||||
//已达到等级
|
||||
else if ((RealPos + 1) <= MyPassLevel) {
|
||||
local A = 60;
|
||||
if (RewardInfoEffTimer) {
|
||||
if (Clock() - RewardInfoEffTimer <= 1000) {
|
||||
A = sq_GetUniformVelocity(60, 255, Clock() - RewardInfoEffTimer, 1000);
|
||||
}
|
||||
if (Clock() - RewardInfoEffTimer <= 2000 && Clock() - RewardInfoEffTimer > 1000) {
|
||||
A = sq_GetUniformVelocity(255, 60, Clock() - RewardInfoEffTimer - 1000, 1000);
|
||||
}
|
||||
if (Clock() - RewardInfoEffTimer > 2000) {
|
||||
RewardInfoEffTimer = Clock();
|
||||
}
|
||||
}
|
||||
L_sq_SetDrawImgModel(2, 0);
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 30, X + 7 + 45 + (i * 47), Y + 45 + 162 + 138, 0, sq_RGBA(255, 255, 255, A), 1.0, 1.0);
|
||||
L_sq_ReleaseDrawImgModel();
|
||||
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X + 7 + 45 + (i * 47), Y + 45 + 162 + 138, 44, 74)) {
|
||||
if (Mobj.LbEvent) {
|
||||
local T = {
|
||||
op = 20059007,
|
||||
Type = 1,
|
||||
lv = RealPos + 1,
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
}
|
||||
}
|
||||
//未达到等级
|
||||
else {
|
||||
//普通底Eff 未领取
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 33, X + 11 + 45 + (i * 47), Y + 50 + 162 + 138);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (MyPassLevel >= LevelPage * 10) {
|
||||
|
||||
//是不是VIP
|
||||
local IsVip = BaseInfo.isVip;
|
||||
|
||||
local MyExp;
|
||||
local Rate;
|
||||
if (MyPassLevel == LevelPage * 10) {
|
||||
MyExp = (BaseInfo.Exp + 1000.0) % 10000.0;
|
||||
Rate = MyExp.tofloat() / 10000.0;
|
||||
} else if (MyPassLevel<(LevelPage + 1) * 10) {
|
||||
MyExp = BaseInfo.Exp % 10000.0 + 1000.0;
|
||||
Rate = MyExp.tofloat() / 10000.0;
|
||||
} else {
|
||||
Rate = 100.0;
|
||||
}
|
||||
local ImgIndex = 34;
|
||||
if (IsVip) ImgIndex = 35;
|
||||
|
||||
if (Rate <= 0) Rate = 0.01;
|
||||
setClip(X + 11 + 45, Y, X + 11 + 45 + (470 * Rate).tointeger(), Y + 264 + 4); //开始裁切
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", ImgIndex, X + 11 + 45, Y + 264);
|
||||
releaseClip(); //裁切结束
|
||||
|
||||
L_sq_SetDrawImgModel(2, 0);
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", ImgIndex + 2, X + 11 + 34 + (470 * Rate).tointeger(), Y + 255);
|
||||
L_sq_ReleaseDrawImgModel();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
if (!BaseInfo) return;
|
||||
|
||||
//Item信息框一般为211的宽度
|
||||
L_sq_DrawWindow(X, Y + 10, 540, 420, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
|
||||
L_sq_DrawWindow(X + 6, Y + 45, 528, 384, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
|
||||
|
||||
// L_sq_DrawWindow(X + 5, Y + 28, 530, 390, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
|
||||
//绘制背景框标题栏
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpassmain.img", 0, X + 1, Y);
|
||||
|
||||
//构造标题栏
|
||||
if (!Title) {
|
||||
Title = [];
|
||||
for (local i = 0; i< 3; i++) {
|
||||
local Str = "奖励";
|
||||
if (i == 1) Str = "任务";
|
||||
if (i == 2) Str = "社交";
|
||||
local ButtonBuf = LenheartTabbarsText(X, Y, Str);
|
||||
if (i == 0) ButtonBuf.State = 1;
|
||||
Title.append(ButtonBuf);
|
||||
}
|
||||
} else {
|
||||
foreach(Pos, Value in Title) {
|
||||
Value.SyncPos(X + 12 + (Pos * 62), Y + 27);
|
||||
Value.Show();
|
||||
//如果有可领取实践 还要画上感叹号标记
|
||||
if (Value.isLBActive()) {
|
||||
foreach(Pp, Vv in Title) {
|
||||
if (Pp != Pos) Vv.State = 0;
|
||||
Page = Pos;
|
||||
}
|
||||
}
|
||||
|
||||
//绘制完成事件的感叹号
|
||||
if (TabSuccessTips[Pos] == 1) {
|
||||
L_sq_DrawImg("interface/Lenheartwindowcommon.img", 301, X + 58 + (Pos * 62), Y + 31, 0, sq_RGBA(255, 255, 255, 210), 0.8, 0.8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制主题栏
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 0, X + 11, Y + 50);
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass_banner.img", 0, X + 11, Y + 50);
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 3, X + 547 - 252, Y + 207 - 47);
|
||||
|
||||
//绘制等级与经验值
|
||||
MyPassLevel = BaseInfo.Exp / 1000 + 1;
|
||||
DrawNumber(MyPassLevel);
|
||||
local jystr = (BaseInfo.Exp % 1000) + " / " + 1000;
|
||||
L_sq_DrawCode(jystr, X + 11 + 50 - LenheartTextClass.GetStringLength(jystr) / 2, Y + 50 + 20 + 80, sq_RGBA(179, 169, 135, 255), 0, 1);
|
||||
if (BaseInfo.isVip) {
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 6, X + 11 + 22, Y + 50 + 24);
|
||||
}
|
||||
|
||||
//绘制战令名
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpassl.img", 0, X + 11 + 91, Y + 50 + 20);
|
||||
|
||||
//绘制时装套装名
|
||||
local szstr = BaseInfo.Apn;
|
||||
L_sq_DrawCode(szstr, X + 500 - LenheartTextClass.GetStringLength(szstr) / 2, Y + 192, sq_RGBA(179, 169, 135, 255), 0, 1);
|
||||
|
||||
//绘制结束时间
|
||||
L_sq_DrawCode("距离结束还有" + BaseInfo.EndTime + "天", X + 11 + 91, Y + 50 + 20 + 31, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
|
||||
//绘制激活按钮
|
||||
if (!(BaseInfo.isVip)) {
|
||||
local ActivationButton = LenheartButtonText(X + 11 + 91, Y + 50 + 20 + 31 + 20, 22, "激 活");
|
||||
ActivationButton.SetFrame(null, 323);
|
||||
ActivationButton.SetTextOffset(6, 1);
|
||||
ActivationButton.Show();
|
||||
if (ActivationButton.isLBActive()) {
|
||||
local T = {
|
||||
op = 20059013
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//绘制主要奖励框
|
||||
for (local i = 0; i< 5; i++) {
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 4, X + 11 + 91 + (36 * i), Y + 31 + 124);
|
||||
DrawItemEx(X + 11 + 95 + (36 * i), Y + 33 + 124, BaseInfo.showItemIds[i], 1);
|
||||
}
|
||||
|
||||
//绘制奖励页
|
||||
if (Page == 0) {
|
||||
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 1, X + 11, Y + 50 + 162);
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 2, X + 11, Y + 50 + 162 + 214);
|
||||
|
||||
L_sq_DrawCode("区", X + 11 + 14, Y + 50 + 162 + 14, sq_RGBA(179, 169, 135, 255), 1, 1);
|
||||
L_sq_DrawCode("间", X + 11 + 14, Y + 50 + 162 + 14 + 19, sq_RGBA(179, 169, 135, 255), 1, 1);
|
||||
|
||||
L_sq_DrawCode("免", X + 11 + 14, Y + 50 + 162 + 14 + 19 + 47, sq_RGBA(179, 169, 135, 255), 1, 1);
|
||||
L_sq_DrawCode("费", X + 11 + 14, Y + 50 + 162 + 14 + 19 + 47 + 19, sq_RGBA(179, 169, 135, 255), 1, 1);
|
||||
|
||||
|
||||
L_sq_DrawCode("追", X + 11 + 14, Y + 50 + 162 + 14 + 19 + 47 + 19 + 54, sq_RGBA(179, 169, 135, 255), 1, 1);
|
||||
L_sq_DrawCode("加", X + 11 + 14, Y + 50 + 162 + 14 + 19 + 47 + 19 + 54 + 19, sq_RGBA(179, 169, 135, 255), 1, 1);
|
||||
|
||||
|
||||
|
||||
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 19, X + 11, Y + 240);
|
||||
|
||||
|
||||
// local SuccessButton = LenheartBaseButtonText(X + 60, Y + 215, 88, 25, "interface2/ui/aradpass/chn/aradpass.img", 15, "1 - 10");
|
||||
// local SuccessButton = LenheartTabbarsText(X + 60, Y + 215, "1 - 10", 88, 25);
|
||||
// SuccessButton.SetFrame("interface2/ui/aradpass/chn/aradpass.img", 15);
|
||||
// SuccessButton.SetTextOffset(30, 5);
|
||||
// SuccessButton.Show();
|
||||
|
||||
|
||||
//构造等级按钮
|
||||
if (!LevelButton) {
|
||||
LevelButton = [];
|
||||
for (local i = 0; i< 5; i++) {
|
||||
local Str = "1 - 10";
|
||||
if (i == 1) Str = "11 - 20";
|
||||
if (i == 2) Str = "21 - 30";
|
||||
if (i == 3) Str = "31 - 40";
|
||||
if (i == 4) Str = "41 - 50";
|
||||
local ButtonBuf = LenheartTabbarsText(X + 11 + 50 + (i * 93), Y + 215, Str, 88, 25);
|
||||
ButtonBuf.SetFrame("interface2/ui/aradpass/chn/aradpass.img", 15);
|
||||
ButtonBuf.SetTextOffset(50 - LenheartTextClass.GetStringLength(Str) / 2, 6);
|
||||
if (i == 0) ButtonBuf.State = 1;
|
||||
LevelButton.append(ButtonBuf);
|
||||
}
|
||||
} else {
|
||||
foreach(Pos, Value in LevelButton) {
|
||||
Value.SyncPos(X + 11 + 50 + (Pos * 93), Y + 215);
|
||||
Value.Show();
|
||||
if (Pos == LevelPage) Value.State = 1;
|
||||
else Value.State = 0;
|
||||
//如果有可领取实践 还要画上感叹号标记
|
||||
if (Value.isLBActive()) {
|
||||
LevelPage = Pos;
|
||||
}
|
||||
if (Value.State == 1) {
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 18, X + 11 + 50 + (Pos * 93), Y + 215);
|
||||
}
|
||||
|
||||
|
||||
//绘制是否可领取奖励的感叹号
|
||||
if (RewardSuccessTips[Pos] == 1) {
|
||||
L_sq_DrawImg("interface/Lenheartwindowcommon.img", 301, X + 125 + (Pos * 93), Y + 224, 0, sq_RGBA(255, 255, 255, 210), 0.8, 0.8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (local i = 0; i< 10; i++) {
|
||||
DrawSmallNumber(i + 1 + (LevelPage * 10), 124 - 91 + (i * 47));
|
||||
}
|
||||
|
||||
DrawRewardItem(obj);
|
||||
|
||||
|
||||
|
||||
|
||||
L_sq_DrawImg("interface/Lenheartwindowcommon.img", 504, X + 24, Y + 438, 0, sq_RGBA(255, 255, 255, 250), 0.8, 0.8);
|
||||
L_sq_DrawImg("interface/Lenheartwindowcommon.img", 504, X + 24, Y + 460, 0, sq_RGBA(255, 255, 255, 250), 0.8, 0.8);
|
||||
L_sq_DrawCode("获得的物品将发放至物品栏。", X + 44, Y + 438, sq_RGBA(179, 169, 135, 150), 1, 1);
|
||||
L_sq_DrawCode("未使用的奖励道具将在本季通行券结束时删除。", X + 44, Y + 460, sq_RGBA(179, 169, 135, 150), 1, 1);
|
||||
|
||||
|
||||
|
||||
|
||||
//绘制领取全部奖励按钮
|
||||
local ClaimAllButton = LenheartButtonText(X + 460, Y + 440, 22, "全部领取");
|
||||
// ClaimAllButton.SetFrame(null, 323);
|
||||
ClaimAllButton.SetTextOffset(-3, 1);
|
||||
ClaimAllButton.Show();
|
||||
if (ClaimAllButton.isLBActive()) {
|
||||
local T = {
|
||||
op = 20059009
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//绘制任务页
|
||||
if (Page == 1) {
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 43, X + 11, Y + 50 + 162);
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 38, X + 13, Y + 50 + 184);
|
||||
|
||||
|
||||
//构造标题栏
|
||||
if (!QuestTitle) {
|
||||
QuestTitle = [];
|
||||
for (local i = 0; i< 3; i++) {
|
||||
local Str = "每日任务";
|
||||
if (i == 1) Str = "重复任务";
|
||||
if (i == 2) Str = "赛季任务";
|
||||
local ButtonBuf = LenheartTabbarsText(X, Y, Str);
|
||||
if (i == 0) ButtonBuf.State = 1;
|
||||
ButtonBuf.SetTextOffset(8, 3);
|
||||
QuestTitle.append(ButtonBuf);
|
||||
}
|
||||
} else {
|
||||
foreach(Pos, Value in QuestTitle) {
|
||||
Value.SyncPos(X + 12 + (Pos * 62), Y + 213);
|
||||
Value.Show();
|
||||
//如果有可领取实践 还要画上感叹号标记
|
||||
if (Value.isLBActive()) {
|
||||
foreach(Pp, Vv in QuestTitle) {
|
||||
if (Pp != Pos) Vv.State = 0;
|
||||
}
|
||||
QuestPage = Pos;
|
||||
}
|
||||
|
||||
|
||||
if (QuestSuccessTips && QuestSuccessTips.len() == 3) {
|
||||
//绘制是否可领取奖励的感叹号
|
||||
if (QuestSuccessTips[Pos] == 1) {
|
||||
L_sq_DrawImg("interface/Lenheartwindowcommon.img", 301, X + 64 + (Pos * 62), Y + 216, 0, sq_RGBA(255, 255, 255, 210), 0.8, 0.8);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
L_sq_DrawCode("任务内容", X + 120, Y + 7 + 231, sq_RGBA(179, 169, 135, 255), 1, 1);
|
||||
L_sq_DrawCode("完成次数", X + 288, Y + 7 + 231, sq_RGBA(179, 169, 135, 255), 1, 1);
|
||||
L_sq_DrawCode("经验值", X + 388, Y + 7 + 231, sq_RGBA(179, 169, 135, 255), 1, 1);
|
||||
L_sq_DrawCode("状态", X + 492, Y + 7 + 231, sq_RGBA(179, 169, 135, 255), 1, 1);
|
||||
|
||||
local QuestTasks = null;
|
||||
//每日
|
||||
if (QuestPage == 0) {
|
||||
//每日任务数组
|
||||
QuestTasks = DailyTasks;
|
||||
}
|
||||
//重复
|
||||
else if (QuestPage == 1) {
|
||||
//重复任务数组
|
||||
QuestTasks = RepeatingTasks;
|
||||
}
|
||||
//赛季
|
||||
else {
|
||||
//赛季任务数组
|
||||
QuestTasks = SeasonTasks;
|
||||
}
|
||||
|
||||
if (QuestTasks) {
|
||||
QuestWheelMax = QuestTasks.len();
|
||||
local SuccessCount = 0;
|
||||
local Incomplete = 0;
|
||||
foreach(Pos, Value in QuestTasks) {
|
||||
local OffsetPos = Pos - QuestWheelNow - SuccessCount;
|
||||
if (Pos >= QuestWheelNow && Pos <= QuestWheelNow + 5) {
|
||||
if (Value.SuccessState == 0) {
|
||||
Incomplete++;
|
||||
L_sq_DrawCode(Value.QuestExplain, X + 20, Y + 50 + 162 + 53 + (OffsetPos * 30) + (OffsetPos), sq_RGBA(179, 169, 135, 255), 1, 1);
|
||||
local SuccessStr = Value.NowSuccessCount + " / " + Value.MaxSuccessCount;
|
||||
L_sq_DrawCode(SuccessStr, X + 320 - LenheartTextClass.GetStringLength(SuccessStr) / 2, Y + 50 + 162 + 53 + (OffsetPos * 30) + (OffsetPos), sq_RGBA(179, 169, 135, 255), 1, 1);
|
||||
L_sq_DrawCode(Value.Experience.tostring(), X + 404 - LenheartTextClass.GetStringLength(Value.Experience.tostring()) / 2, Y + 50 + 162 + 53 + (OffsetPos * 30) + (OffsetPos), sq_RGBA(179, 169, 135, 255), 1, 1);
|
||||
//绘制完成按钮
|
||||
local SuccessButton = LenheartButtonText(X + 472, Y + 261 + (OffsetPos * 30) + (OffsetPos), 10, "完成");
|
||||
SuccessButton.SetTextOffset(3, 1);
|
||||
if (Value.NowSuccessCount >= Value.MaxSuccessCount) {
|
||||
if (SuccessButton.isLBActive()) {
|
||||
Value.op <- 20059033;
|
||||
SendPack(Value);
|
||||
}
|
||||
} else {
|
||||
SuccessButton.State = 8;
|
||||
}
|
||||
SuccessButton.Show();
|
||||
} else {
|
||||
SuccessCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
local SuccessPos = 0;
|
||||
foreach(Pos, Value in QuestTasks) {
|
||||
local SuccessOffsetPos = SuccessPos - QuestWheelNow + Incomplete;
|
||||
if (Value.SuccessState == 1) {
|
||||
SuccessPos++;
|
||||
L_sq_DrawCode(Value.QuestExplain, X + 20, Y + 50 + 162 + 53 + (SuccessOffsetPos * 30) + (SuccessOffsetPos), sq_RGBA(179, 169, 135, 150), 1, 1);
|
||||
local SuccessStr = Value.NowSuccessCount + " / " + Value.MaxSuccessCount;
|
||||
L_sq_DrawCode(SuccessStr, X + 320 - LenheartTextClass.GetStringLength(SuccessStr) / 2, Y + 50 + 162 + 53 + (SuccessOffsetPos * 30) + (SuccessOffsetPos), sq_RGBA(179, 169, 135, 150), 1, 1);
|
||||
L_sq_DrawCode(Value.Experience.tostring(), X + 404 - LenheartTextClass.GetStringLength(Value.Experience.tostring()) / 2, Y + 50 + 162 + 53 + (SuccessOffsetPos * 30) + (SuccessOffsetPos), sq_RGBA(179, 169, 135, 150), 1, 1);
|
||||
//绘制完成按钮
|
||||
local SuccessButton = LenheartButtonText(X + 472, Y + 261 + (SuccessOffsetPos * 30) + (SuccessOffsetPos), 10, "已完成");
|
||||
SuccessButton.SetTextOffset(-2, 1);
|
||||
SuccessButton.State = 8;
|
||||
SuccessButton.Show();
|
||||
// L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 41, X + 14, Y + 50 + 160 + 50 + (SuccessOffsetPos * 30) + (SuccessOffsetPos));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X + 25, Y + 456, 16, 16)) {
|
||||
L_sq_DrawImg("interface/lenheartwindowcommon.img", 240, X + 25, Y + 456);
|
||||
QuestTips = true;
|
||||
} else {
|
||||
L_sq_DrawImg("interface/lenheartwindowcommon.img", 239, X + 25, Y + 456);
|
||||
QuestTips = false;
|
||||
}
|
||||
|
||||
// 周获取的经验
|
||||
local MaxExp = BaseInfo.ExpLimitMax;
|
||||
local NowExp = BaseInfo.ExpLimit;
|
||||
L_sq_DrawCode("每周重复任务经验获取上限 " + NowExp + "/" + MaxExp, X + 40 + 7, Y + 7 + 451, sq_RGBA(179, 169, 135, 255), 1, 1);
|
||||
|
||||
|
||||
local ReceiveExpButton = LenheartButtonText(X + 464, Y + 7 + 446, 22, "全部领取");
|
||||
ReceiveExpButton.SetTextOffset(-2, 1);
|
||||
ReceiveExpButton.Show();
|
||||
if (ReceiveExpButton.isLBActive()) {
|
||||
local T = {
|
||||
op = 20059035
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//绘制助力页
|
||||
if (Page == 2) {
|
||||
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 42, X + 11, Y + 50 + 162);
|
||||
|
||||
L_sq_DrawCode("助力奖励", X + 11 + 115, Y + 50 + 162 + 7, sq_RGBA(124, 110, 82, 255), 1, 0);
|
||||
L_sq_DrawCode("[发起助力]说明", X + 11 + 372, Y + 50 + 162 + 7, sq_RGBA(124, 110, 82, 255), 1, 0);
|
||||
L_sq_DrawCode("获得助力 : " + BaseInfo.helpNum + " 次", X + 11 + 96, Y + 50 + 162 + 111, sq_RGBA(124, 110, 82, 255), 1, 0);
|
||||
|
||||
|
||||
|
||||
//助力按钮
|
||||
local UpButton = LenheartButtonText(X + 11 + 115 + 20, Y + 50 + 162 + 7 + 48, 4, "发起助力");
|
||||
if (BaseInfo.help == 1) {
|
||||
UpButton.State = 8;
|
||||
}
|
||||
UpButton.SetTextOffset(-12, 1);
|
||||
UpButton.Show();
|
||||
if (UpButton.isLBActive()) {
|
||||
local T = {
|
||||
op = 20059011,
|
||||
Type = 0,
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
L_sq_DrawCode("社交功能将于每日凌晨6点重置。", X + 11 + 322, Y + 50 + 162 + 77, sq_RGBA(124, 110, 82, 255), 1, 0);
|
||||
L_sq_DrawCode("点击[发起助力]按钮时,立即获得通行", X + 11 + 308, Y + 50 + 162 + 77 + 20, sq_RGBA(124, 110, 82, 255), 1, 0);
|
||||
L_sq_DrawCode("券经验值。", X + 11 + 380, Y + 50 + 162 + 77 + 40, sq_RGBA(124, 110, 82, 255), 1, 0);
|
||||
L_sq_DrawCode("获得助力次数将根据服务器玩家的发起", X + 11 + 300, Y + 50 + 162 + 77 + 60, sq_RGBA(124, 110, 82, 255), 1, 0);
|
||||
L_sq_DrawCode("助力次数而更新。", X + 11 + 364, Y + 50 + 162 + 77 + 80, sq_RGBA(124, 110, 82, 255), 1, 0);
|
||||
L_sq_DrawCode("每10秒可以点击刷新按钮更新信息。", X + 11 + 310, Y + 50 + 162 + 77 + 100, sq_RGBA(124, 110, 82, 255), 1, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
L_sq_DrawCode("5次", X + 11 + 48, Y + 50 + 162 + 148, sq_RGBA(124, 110, 82, 255), 1, 0);
|
||||
L_sq_DrawCode("10次", X + 11 + 132, Y + 50 + 162 + 148, sq_RGBA(124, 110, 82, 255), 1, 0);
|
||||
L_sq_DrawCode("20次", X + 11 + 216, Y + 50 + 162 + 148, sq_RGBA(124, 110, 82, 255), 1, 0);
|
||||
|
||||
|
||||
//刷新按钮
|
||||
local RefreshButton = LenheartTabbars(X + 11 + 256, Y + 50 + 162 + 108, 19, 19);
|
||||
RefreshButton.SetFrame(null, 445);
|
||||
RefreshButton.Show();
|
||||
if (RefreshButton.isLBActive()) {}
|
||||
|
||||
local SuccBtnArr = [BaseInfo.help5, BaseInfo.help10, BaseInfo.help20];
|
||||
//完成按钮
|
||||
foreach(Pos, Kf in SuccBtnArr) {
|
||||
local ButtonBuf = LenheartButtonText(X + 11 + 27 + (Pos * 85), Y + 50 + 162 + 206, 4, "完成");
|
||||
local RealP = Pos;
|
||||
if (RealP == 0) RealP = 5;
|
||||
if (RealP == 1) RealP = 10;
|
||||
if (RealP == 2) RealP = 20;
|
||||
if (Kf == 1 || RealP > BaseInfo.helpNum) ButtonBuf.State = 8;
|
||||
// ButtonBuf.SetFrame(null, 323);
|
||||
ButtonBuf.SetTextOffset(0, 1);
|
||||
ButtonBuf.Show();
|
||||
if (ButtonBuf.isLBActive()) {
|
||||
local T = {
|
||||
op = 20059011,
|
||||
Type = RealP,
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//TODO 临时绘制道具 2022110703
|
||||
//绘制道具
|
||||
L_Sq_DrawItem(X + 103, Y + 262, 1232, BaseInfo.helpExp, 0, 0, 0);
|
||||
|
||||
|
||||
L_Sq_DrawItem(X + 11 + 43, Y + 50 + 162 + 167, 1232, BaseInfo.helpExp5, 0, 0, 0);
|
||||
L_Sq_DrawItem(X + 11 + 128, Y + 50 + 162 + 167, 1232, BaseInfo.helpExp10, 0, 0, 0);
|
||||
L_Sq_DrawItem(X + 11 + 213, Y + 50 + 162 + 167, 1232, BaseInfo.helpExp20, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
QuestTips = false;
|
||||
QuestWheelNow = 0;
|
||||
QuestWheelMax = 0;
|
||||
|
||||
//悬浮层
|
||||
function DrawSuspensionLayer(obj) {
|
||||
//任务提示
|
||||
if (QuestTips) {
|
||||
L_sq_DrawWindow(X + 40, Y + 350, 224, 100, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
local QuestTipsStr = "每周可以通过完成重复任务获得的最大经验值。\n达到每周经验获取上限后,无法进行重复任务。\n通过每日任务以及赛季任务获得的经验值,不受每周经验获取上限的限制。\n每周星期四将初始化每周经验获取量。\n每周四凌晨6点初始化重复任务的进度,并删除未领取的重复任务经验值。";
|
||||
local QuestTipsArray = L_sq_GetStringDrawArray(QuestTipsStr, 251);
|
||||
foreach(Pos, va in QuestTipsArray) {
|
||||
// Sout("文本内容嗯: %L", va);
|
||||
L_sq_DrawCode(va, X + 40 + 7, Y + 7 + 350 + (Pos * 16), 0xFFFFFFFF, 1, 1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//开启界面回调
|
||||
function OpenClassCallBack() {
|
||||
L_NewWindows("Lenheart", 170, 0x65535);
|
||||
local W = sq_GetPopupWindowMainCotrol(170);
|
||||
W.SetVisible(false);
|
||||
W.SetEnable(false);
|
||||
|
||||
GetBaseInfo();
|
||||
GetPlayerReward();
|
||||
GetPlayerQuest();
|
||||
}
|
||||
|
||||
//绘制入口
|
||||
function Draw(obj) {
|
||||
if (MainState) {
|
||||
if (WindowObj) {
|
||||
ItemInfoDrawS = null;
|
||||
DrawMain(obj);
|
||||
DrawSuspensionLayer(obj);
|
||||
DrawItemInfo(obj);
|
||||
WindowObj.Show(obj);
|
||||
X = WindowObj.X;
|
||||
Y = WindowObj.Y;
|
||||
} else {
|
||||
WindowObj = LenheartWindow(X, Y, 558, 470, 15); //坐标 大小 标题栏高度
|
||||
// WindowObj.DeBugMode = true;
|
||||
}
|
||||
} else {
|
||||
if (WindowObj && WindowObj.YMouseSw == false) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
WindowObj.YMouseSw = true;
|
||||
WindowObj = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
if (IMouse.IsWheelUp()) {
|
||||
if (QuestWheelNow > 0) QuestWheelNow--;
|
||||
if (LevelPage > 0) LevelPage--;
|
||||
}
|
||||
if (IMouse.IsWheelDown()) {
|
||||
if (QuestWheelNow< QuestWheelMax - 6) QuestWheelNow++;
|
||||
if (LevelPage< 4) LevelPage++;
|
||||
}
|
||||
|
||||
if (KeyPressNB.isKeyPress(48, "AradPassCloseKey")) {
|
||||
MainState = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function AradPass(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("AradPassCObj")) {
|
||||
local Cobj = AradPassC();
|
||||
RootTab.rawset("AradPassCObj", Cobj);
|
||||
EventIcon("阿拉德探险记", 43, 43, Cobj);
|
||||
} else {
|
||||
RootTab["AradPassCObj"].Proc(obj);
|
||||
RootTab["AradPassCObj"].Draw(obj);
|
||||
}
|
||||
}
|
||||
|
||||
if (getroottable().rawin("LenheartFuncTab")) {
|
||||
getroottable()["LenheartFuncTab"].rawset("AradPassFunc", AradPass);
|
||||
} else {
|
||||
local T = {};
|
||||
T.rawset("AradPassFunc", AradPass);
|
||||
getroottable().rawset("LenheartFuncTab", T);
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
1*ä ‹â½´ï”›<O€arc€]lgrc8nsvìͱãȈPRfkp}1Atc~crQjore5Ctcxgt]javg<xur絼æ§ä¦£P4:47;2371M?::64攉îŶý–¢ë„’<*5
|
||||
51BhVtyð<EFBFBD>Ÿë ¸ë·½gzc}}$Gxo~axUbctcR€q$cz~onbu*Daqkm}Hxcq^sun*13&"ydj&";7$&膋阰ã’<C3A3>ý©º"$;/*"\㟚ð¤<C3B0>"*7-&"Wï<57>–誉$&/;"$Gpgê´<C3AA>鞪ìͱãȈ&";7$&ç¼ÇåШ*"-;"*믮縰
}$&"*qb€"K"nsnfE$51Ydjã±·ê±§"$&"]~arg*G$6=*13䎇뒼éˆÀ憃$&"*MpeeOnhnc"=&hovwc=*13ý„·ï‹É蓊欞$&"*DurvyxH<78>powia"K"fgn}o?&19芃暋甮䗂ðžª"$&"PcwcH€cmc"K"nsnfE
"$&"Mwrq{MpeeOnhnc"=&hovwc=*13þ‰¨ï®°æ·‹ëˆ»ã‰¿ä—‚ðžª"$&"Mwrq{MpeeCnhgve&?*xuzn5"35ê<35>¬å¼œî»‰ý„·ï‹É蓊欞Oxiþ¹¹ï¾‚"$&"Mwrq{DurvyxNgoc"=&psvpI"91ì<31>¬ã¸šâ»‡é‚Ïç<C38F>Åæ“Šä¨ 㒛髶"$&"Mwrq{MpeePrgoc"=&psvpI"91ì<31>¬ã¸šâ»‡é‚Ïç<C38F>Åæ“Šä¨ GpgéÀ”癹
"*"$Aw}~s{Efkgyz*G$|wfv?&19ê‹À缜èϋᄹ㉵ð•žè¬¦\㟚ð¤<C3B0>"$&"Mwrq{Mpee{$K"|pz=*13þ‰¨ï®°æ·‹ëˆ»ã‰¿ä—‚ðžª[ã§”ä¢<C3A4>
|
||||
$&"*TeavCxbzg*G$dcf}eI"91戮ム䗂ðžª"$&"`ogrDs~xup\cmc"K"nsnfE$51䄰ブ顲
"*"$Xgm~BgucCnhgve&?*xuzn5"35è<35>¶å‡žOxiþ¹¹ï¾‚"$&"`ogrH€cmc"K"nsnfE$51秞㌢ð„‡è†‹é˜°áœˆä„¦ï<C2A6>ªêº<C3AA>ë’ªOxiý¾”ï“Í"$&"`ogrz*G$|wfv?&19ð‚ºç<C2BA>¦\㟚ð¤<C3B0>"$&"`ogr{*G$|wfv?&19ð‚ºç<C2BA>¦Y㟚ð¤<C3B0>
|
||||
*"$&Ds~xup\cmc"K"nsnfE$51ä–‰ÿ”¼ï”›é¡²
"*"$Ž"K"nsnfE$51Rï<52>–誉
"*"$<24>"K"nsnfE$51Wï<57>–誉
"*"$Hc}oA|kdkpc"K"nsnfE$51ⲇý–¢Cnê±±å̆$&"*yibvb"=&psvpI"91啱ᄹ㉵ï®Ë縰
"*"$zg|ix~"K"nsnfE$51㑳ý„·ï‹É륚åШ
"*"$[qpl$K"|pz=*13ÿ¾ªð¤<C3B0>繻췣$&"*13ä Žë„¦ç<C2A6>Çæ“²$&"*ms|u~tuavyt,}Qpl0&iPxrq|Xa{g&"kn.*iY:"aCnhgve:"aYibvb6$}Ncxkrj&"kHc}oFxc{o)&}$&"*"$&"ydj&?*iShl5
|
||||
&"*"$&"*DurvyxNgoc"=&iPxrq|Xa{g5
|
||||
&"*"$&"*z$K"aZ?*"$&"*"$<24>"K"ko=$&"*"$&"PcwcC|kfnc"=&iOxidkfo?*"$&"*"$<24>kn~l&?*i[f~j?*"$&"*"$zg|ix~"K"kZg|ix~=$&"*"$&"PcwcH€cmc"K"kHc}oFxc{o?*"$&"*"$h**kcv€qsrvodpc*'8rgygx,(OywcQpleav0+)&Oydj&?*iertyqxrcpve>+U$Muw}oShlcmx(_5
|
||||
&"*"}*"$&19é¿®ç‚À暋甮*"$&hsxgrkyx$Qjyy,?"u
|
||||
&"*"$&"*kf&*MviamCxbzg'"35è’±å–¨ãÆ„ã’¹é‚Ïç<C38F>Åæ“Šä¨ *"$&"*"$‰"$&"*"$&"*"$h**iqNPNs<4E>p"+$$(*]xgvc"=K":+$51䖉⺅ﻤ랸åϸ䎇뒼箎èÐ<C3A8>ãÆ¹þ·±éŠ´èŠƒ
"*"$&"*"$&"*…
"*"$&"*"$&"*"$&"]~arg*G$7=*13䎇똼êɥ僧䖉⺅銴芃
"*"$&"*"$&"*"$&"%5yI"$&"*"$&"*"$‹"$&"*"$&"*"$h**!uFDHuy|*)&($"Wrc~o$K?*3)&19ð<39>Ÿæ²•åͨ瞮㻴膋阰㮈⼜ïÀÏê³¹ë ¸ä‚<C3A4>*"$&"*"$&"*"*"$&"*"$&"*"$&"*]xgvc"=&25"35膋钰âÁŸã‡£ïÀÏê³¹ë ¸ä‚<C3A4>*"$&"*"$&"*"$&"*7-<2D>=$&"*"$&"*"$&$&"*"$&"‹
|
||||
*"$&"*"$h**Gsu~qmAngmoCppve?"91殱㒦㾊ê<C2B5>¬å¼œî»‰ý„·ï‹É蓊欞$&"*"$&"u
|
||||
&"*"$&"*"$&"gp$>k}VBBqqx,?+*13䎇籰钰㻶⺞ð<C5BE>Ÿë ¸å¢†î¼Žã¾·êµÍéˆÀ憃$&"*"$&"*"$&}$&"*"$&"*"$&"*"$h**!Hw~~s|Fwxa{km+$RaNta<74>U~cyGpg*shl&"Gsu~qmAngmoGpgpizg&"Gsu~qmAngmoŽ.*MuqvywGzkmuy:"Mwrq{MpeePrgoc6$Aw}~s{Ds~xup\cmc+5
|
||||
&"*"$&"*"$&"*"$&gf}e&ViNrgyN{ngogmA|k"qb€.*MuqvywGzkmuA|kdkpc.*MuqvywGzkmu|:"Mwrq{Mpee{0&Es}xuoPxrq|Xa{g'E
"*"$&"*"$&"*‡
"*"$&"*"}$&"*"$&"gp$>TcmxCppve?"91åʂ㒳䄦ï<C2A6>ªè“Šæ¬žä™¶*"$&"*"$‰"$&"*"$&"*"$h**,uGxRce~*)&($"!uFDHuy|*)?"v†$>k}KnXgm~,?"$0$'Es}xuoMviamCxbzg'+$51ã°‚ä –ëÀ¦èª‰æˆ®ãƒ ýœŽð›´çŠ›$&ç·ÀèΖ䴡䞇é‚Ïç<C38F>Å밆䙶゗
|
||||
&"*"$&"*"$&"u
|
||||
&"*"$&"*"$&"*"$&19KMuw}o.Qg~Wssuc^aqm">8?=$&"*"$&"*"$&"*"$h**!Hw~~s|Fwxa{km+$RaNta<74>U~cyGpg*shl&"Rce~DaqgOxidkfo0&TcmxŽ.*Teavw6$Xgm~Fxc{o0&TcmxHw~~s|Powe?=$&"*"$&"*"$&"*"$cn}o$RaNta<74>Fwxa{kmCn*ydj:"`ogrDo}eGpgpizg&"Rce~z0&Tcmx<6D>.*TeavPxrq|Xa{g'E
"*"$&"*"$&"*‡
"*"$&"*"}*"$&"*"$h**!uGxRce~*)?"91å¤„ä¨ ÿ¾ªð¤<C3B0>èÀ£æª‹ä„°ãƒ–éš‚è‘À军$&"*"$&"u
|
||||
&"*"$&"*"$&"91I[qs}e<Uc~Muw}oXgue*4?=$&"*"$&"*"$&kd",'Ds~xupN{ngogm)&ViNrgy]~a<>C|k,udh6$Hc}oA|kdkpc.*z0&{&"BgucPrgoc6$Hw~~s|Powe?=$&"*"$&"*"$&gf}e&ViNrgyN{ngogmA|k"qb€.*DaqgOxidkfo0&z&"y:"Pxrq|Xa{g'E
"*"$&"*"}*"$&
"*"$51⸾ý¿¼ê‹À缜èϋᄹ㉵ð•žè¬¦
"*"$dw|mxq|"WcvMwrq{MpeeOnhnc*buqf6$}Ds~xup\cmc.*i\:"a[0&iOxidkfo0&iDta{g'"*"$&"*"$Aw}~s{EfkgyG|dpc"K"buqfE$51≪㰘é<C5B8>»å<C2BB>½äŸŒä –
|
||||
&"*"$&"*MuqvywGzkmuA|kdkpc"K"kGpgpizg5"35ê<35>¬å¼œî»‰ý„·ï‹É蓊欞Oxiþ¹¹ï¾‚"$&"*"$&Es}xuoPxrq|Xa{g*G$}Ds~xup\cmc=*13þ‰¨ï®°æ·‹ëˆ»ã‰¿ä—‚ðžªçš—ë½²$&"*"$&"Mwrq{MpeePrgoc"=&iDta{g5"35ê<35>¬å¼œî»‰ý„·ï‹É蓊欞Oxiý¾”ï“Í"$&"*"$&Es}xuoMviamr"=&iRE$51≪㰘é<C5B8>»å<C2BB>½äŸŒä –Z嫒䢋*"$&"*"$Aw}~s{Efkgy{*G$}[5"35ê<35>¬å¼œî»‰ý„·ï‹É蓊欞Wï<57>–誉
"*"$‹
|
||||
&"*"35ê¼Èë˰䄰ブð•žè¬¦
"*"$dw|mxq|"Wcv`ogrG|dpc*pqsz.*iBsv~qn\c{o0&iR6$}[&"kGpgpizg&"kDtowe?"u
|
||||
&"*"$&"*TeavCxbzg*G$hqyv?&19ð‚ºç<C2BA>¦æ“Šä¨ *"$&"*"$Xgm~Bsv~qn\c{o$K"aDurvyxNgocE$51䄰ブ顲
"*"$&"*"Rce~DaqgOxidkfo$K"aCnhgveI"91戮ムGpg껵çÌŽ
"*"$&"*"Rce~Prgoc"=&iDta{g5"35ë«¨å ªä‚<C3A4>䎇뒼阎戮ムþ²<C3BE>阾C|këʘ㑻*"$&"*"$Xgm~|&?*i\I"91戮ムn竒榉$&"*"$&"`ogr{*G$}[5"35è<35>¶å‡žWï<57>–誉
"*"$‹
|
||||
&"*"35ê¼Èë˰㌬ä‚<C3A4>ð<EFBFBD>Ÿë ¸
"*"$dw|mxq|"WcvMviamCxbzg"dsun'"*"$&"*"$Hw~~s|Fwxa{km"=&dyqpI"$&"‹
|
||||
*"$&19ê®Ìé˸눻㉿䗂ðžª"$&"dnavgqn&Uc~GzkmuE|dfo,hqyv)&}$&"*"$&"MviamCxbzg*G$hqyv?*"$&
"*"$51䄰ブ銴芃
"*"$dw|mxq|"iqK|Teav"+$‰"$&"*"$&kd",qsiKw_p~orqgm~Rce~*I[qs}e<Ic~\Vq}*):"GWssuc8KcvWRsq*'6$3.*?0&z&"y:"qkhrj&"pcpa~l?+*terw€x$rtso?*"$&"*"$cn}o$xg~r|"dcpqg5
|
||||
&"*"}*"$&19ﻤ랸暋îº<C3AE>ýŒ´ð„‡"$&"dnavgqn&k}VBBqqx,?"u
|
||||
&"*"$&"*kf&*g}I|Tcmx>+*0&&Oydj<Np"=K"?+$xg~r|"~tuc=$&"*"$&"cvwc"€oxst|"fgn}o?*"$&$&"*13㹤똼綻쳹ጶä‚<C3A4>
|
||||
&"*"fspm~iup*kwZDSr,?"u
|
||||
&"*"$&"*kf&*g}I|Tcmx>+*0&&Oydj<Np"=K":+$xg~r|"~tuc=$&"*"$&"cvwc"€oxst|"fgn}o?*"$&
"*"$51㹦ÿ–¼ï<C2BC>“ç<E2809C>Åë ¸ä‚<C3A4>*"$&hsxgrkyx$uFDAavg€e>+*…
"*"$&"*"id""kw_p`ogr*'"&$"[qb€0FdEtg|~)&tc~uxp*~rsg5
|
||||
&"*"$&"*opqg*terw€x$dcf}eI"$&"‹
|
||||
‹
|
||||
ano}w&Ctcxgt]javgQknbqq"eŽvcxhq"Pcwe}Nrgy^qsz"u
|
||||
&"*"35ç¼ÇåШ$&"*Yibvb"=&psvpI"$&"91鹚㼦*"$&Jckk~v*G$|wfv?*"$&19ð¤<C3B0>밚鹚㼦*"$&Vg~pcJ*G$|wfv?$&"*13n竒榉$&"*Z$K"|pz=$&"*Dcn"K"nsnfE
"*"$51Wï<57>–誉
"*"$o"K"nsnfE
"*"$HaW"=&psvpI
|
||||
&"*"Y[qs}eQy*G$rtso?*"$&FcDu}Oyne&?*pazucE
"$&"[qb€"K"nsnfE
"*"$[aRrsq"K"nsnfE
"*"$[aWrsq"K"nsnfE
|
||||
&"*"gup}~rse~qr>iR6$}[&"kmkn~l:"aJeib~0&i^kxzgB+$‰"$&"*"$&19ï®Ë縰
"*"$&"*"[f~j$K"aYibvbE
"*"$&"*"35륚åШ$&"*"$&"Boi}j~"=&iBoi}j~E
"*"$&"*"35誉騚絜㼤
|
||||
&"*"$&"*^irncJ$K"a^irncJ?$&"*"$&"91\㟚ð¤<C3B0>"$&"*"$&Z*G$}Z5
|
||||
&"*"$&"*13o竒榉$&"*"$&"W"=&iWE
"$&"*"$&kd",}g~tsuv~cbzg"+.xcqkn>$[quqgYdjce~$)?"[qb€"K"kcv€qsrvodpc*'e"[qs}eUdhogr$kE
"*"$‹
|
||||
&"*"35ê¼Èå¼œçÆ¤ä¢<C3A4>ë„ÉêÌ“
"*"$dw|mxq|"PueeWssuc*)&}$&"*"$&"gp$>uaIqK|~exucmxXgm~,_Oywc0AoxnRy},?.*KMuw}o.]g~[Tuu"+0&3&"1:"R6$o.*Yibvb6$^ggilr+'"*"$&"*"$&"*"I[qs}e<Nymo[qs}eAngmo>+5
|
||||
&"*"$&"*"$&"WWssuc]{&?*pazucE
"*"$&"*"}&gf}e&}$&"*"$&"*"$&kd",oOywcUq"=K"dcpqg*0&&uaIqK|~exucmxXgm~,_Oywc0AoxnRy},?.*KMuw}o.]g~[Tuu"+0&3&"1:":6$6.*:46.*@46+'"*"$&"*"$&"*"$&"*KMuw}o.Xgfoaqg[quqgMviam"+?*"$&"*"$&"*"$&"*[Muw}oW<6F>"K"xxwcE
"*"$&"*"$&"*‡
"*"$&"*"}$&"*‡
"$&"91ì¼À㸚ý¬‘ï“¡è… å ªç‚¿þÀŸ
|
||||
&"*"fspm~iup*WstgQknbqq*)&}$&"*"$&"gp$>uaIqK|~exucmxXgm~,_Oywc0AoxnRy},?.*KMuw}o.]g~[Tuu"+0&3&"1:"R6$o.*Yibvb6$Rk~ve^+'"$&"*"$&"*"$&kd",[qpl.Zd*G=&3'"*"$&"*"$&"*"$&"*kf&*/Wcnry})&OiZtuu*G$_Oywc0AoxnRy},?=*13ã<33>©ï«™ë¶¢æ¦‰îÇ<C3AE>ý¿¼ð•¶è›¸
"*"$&"*"$&"*"$&"gp$>#[aYvq}+$[aWrsq"K"I[qs}e<Ic~YVq}*)I"$&"*"$&"*"$&"*"id""#BeZ'"BeZ*G$n=*13ã<33>©ï«™é¨™å•¥îÇ<C3AE>ý¿¼
|
||||
&"*"$&"*"$&"*"$&kd",'Di[)&Di[$K"WE
"$&"*"$&"*"$&"*"\&?*Dcn";",[aRrsq";"I[qs}e<Ic~\Vq}*)?=$&"*"$&"*"$&"*"$o"K"Be[*7$>Oi[tuu*7$_Oywc0AoxoRy},?+5
|
||||
*"$&"*"$&"*"}&gf}e&kd",[qpl.Zd*G=&2'"*"$&"*"$&"*"$&"*Wcnry}$K"|pz=$&"*"$&"*"$&"*"$[aWrsq"K"nsnfE
"*"$&"*"$&"*"$&"Pa\&?*xuzn5
|
||||
&"*"$&"*"$&"*"$&Di[$K"|pz=$&"*"$&"*"$&$&"*"$&"‹
|
||||
&"*"}$&"*pu|e~ks|"]js<6A>*ydj?"u
|
||||
&"*"$&"*kf&*NoBsi[qhc+*}qeF€c{Hqr*\:"W6$mkn~l:"Boi}j~6$6zdpfdhdpf?=
"*"$&"*"35ê¼Èå¼œçÆ¤ä¢<C3A4>ë„ÉêÌ“
"*"$&"*"PueeWssuc*)I
|
||||
&"*"$&"*13þ°Ìﮰ騙啥䕖㌢ë„ÉêÌ“
"*"$&"*"MuxcYi|fyy,?=
"*"$‹‡
mpgu}"Atc~crQjoreA"czxcpn}$Hc}kgqF€c{Rqyv$‰"$&"QknbqqQb€"K"nsnfE$51ᬛã‘ï³Ïê¿£
"*"$[cgxWrc~o$K"dcpqg5"35æ²Åë ¸ä‚<C3A4>*"$&Z*G$6=$&"*[$K":E
"*"$Qjore[q|}xctGn$K"|pz=$&"*]lgrcWs|u~orQvo~e&?*pazucE
"*"$[Vgwex"K"nsnfE
"$&"]ovctCsu_pdq$K"|pz=
"*"$dw|mxq|"KcvO€arc€]lgrcKndq"+$‰"$&"*"$&nymaz"^"=&}$&"*"$&"*"$&qz"=&5?247"$&"*"$&$&"*"$&"fqggn*}xx"K"Jqq|8E|eyne>V'E
"*"$&"*"PeuaWcpnRaam^{tc*?=4?=$&"*"$&"Fawwa]onbRomomEbcr>u~t)I"$&"*"$&Ni}qeUcxhVcmu,?=$&"*‡
"$&"dnavgqn&Ic~Atc~crQjore_pdqGgnfDaam"Mlspe+$‰"$&"*"$&Uyx>$䞶㊺ï<C2BA>ƒç„<C3A7>弻&^|"%Z$&"G~w|u)I"$&"*"$&nymaz"Pfdg€"=&L}qneU^V,(Ctcxgt]javgH}s|Qpl"?=$&"*"$&"Pfdg€8Tgt}o,Ajsxo:":6$dcf}e?=
"*"$&"*"pueov$Xqy~Xgd*G$}g~tsuv~cbzg"+?*"$&"*"$h**Ruq~^ah0€c{p"$Atc~crQjoreAQpl"?+*…
"*"$&"*"$&"*Tsuv^cbi$O€arc€]lgrcMShl0g.QgtorCssKndq*G$|wfv?*"$&"*"$&"*"Ruq~^ah]0CvgvotW~czoGUdh$]<Uc€exGI|hy"=&]kE
"*"$&"*"$&"*Tsuv^cbi$O€arc€]lgrcMShl0g.n"K"Bshdor<Ic~,(Zzqw(+5
|
||||
&"*"$&"*"$&"`qsrVod_(Ctcxgt]javgMQb€$k8Y&?*Dudhct.]g~*"ory}"?=
"*"$&"*"$&"*psx""vsacf"i&?*2?&k*F$72:2?&k%5)&}$&"*"$&"*"$&"*"$zqmcp&i^quhw*G$Hwdpex0Aox>$gxfu/L$$9"g"/&$;HXuwp"?=$&"*"$&"*"$&"*"$h**kRqsdu&?K"fgn}o)&d€oay=$&"*"$&"*"$&"*"$zqmcp&i[cs<63>k*G$Hwdpex0Aox>$gxfu/L$$9"g"/&$;HMgqxk"?=$&"*"$&"*"$&"*"$zqmcp&iFka|ds"=&Dspfct<Ier*0kndq;H"&-*k$9"07>Zkoxbs$'E
"*"$&"*"$&"*"$&"fqggn*iKsc|ilsc|"=&Dspfct<Ier*0kndq;H"&-*k$9"07>]woxk~wox"?=$&"*"$&"*"$&"*"$zqmcp&iRks|ip$K"Pfdg€8Kcv"$i|hy7>("%"i&-*$-LZgqn}ds$)I"$&"*"$&"*"$&"*"pueov$}Ubcn}{g"=&Dspfct<Ier*0kndq;H"&-*k$9"07>Qjoxk<78>k0+?*"$&"*"$&"*"$&"*vsacf"kVkd$K"Pfdg€8Kcv"$i|hy7>("%"i&-*$-LRgpu(+5
|
||||
&"*"$&"*"$&"*"$&nymaz"a[auds"=&Dspfct<Ier*0kndq;H"&-*k$9"07>ocydu(+5
|
||||
&"*"$&"*"$&"*"$&nymaz"aZig|ba|i*G$Hwdpex0Aox>$gxfu/L$$9"g"/&$;H\cxjugpa$)I"$&"*"$&"*"$&"*"pueov$}Zgo$K"Pfdg€8Kcv"$i|hy7>("%"i&-*$-LZgo"?=$&"*"$&"*"$&"*"$zqmcp&i[qnqvctIb"K"Bshdor<Ic~,(k|ps;@0"/&k*5$(/LWs|u~or_f0+?*"$&"*"$&"*"$&"*vsacf"Eww*G$‰"$&"*"$&"*"$&"*"$&"*^ssds"=&i^quhw&
|
||||
&"*"$&"*"$&"*"$&"*"$[cy|i&?*iMgqxk0*"$&"*"$&"*"$&"*"$&"Fka|ds"=&iFka|ds6
"*"$&"*"$&"*"$&"*"$&Iscn}jscn&?*iKsc|ilsc|6
"*"$&"*"$&"*"$&"*"$&Zgqn}ds"=&iRks|ip0*"$&"*"$&"*"$&"*"$&"]ja|iwk$K"a]lgpa{i:"$&"*"$&"*"$&"*"$&"*Ridw*G$}Rgpu:"$&"*"$&"*"$&"*"$&"*[auds"=&iWcshw&
|
||||
&"*"$&"*"$&"*"$&"*"$nko|lsc|i$K"aZig|ba|i&
|
||||
&"*"$&"*"$&"*"$&"*"$nkc"=&iRke:"$&"*"$&"*"$&"*"$&"*Ws|u~or_f*G$}Oyxwrg€Kh*"$&"*"$&"*"$&"*‡
"*"$&"*"$&"*"$&"`qsrVod_(Ctcxgt]javgMQb€$k8WcxctEwwGxfu0ortcpn*Eww'E
"*"$&"*"$&"*‡
|
||||
&"*"$&"*‡
"*"$‹
|
||||
&"*"gup}~rse~qr>+*…
"*"$&"*"35轪儎â…ã¦<C3A3>îçè<C2A7>±å© ⲇ*"$&"*"$VcmucAq|~run<ta<74>uc~,13:22:"AoxGxo~axUbctcK|psAcfvBgee+?$&"*"$&"AoxGxo~axUbctcK|ps>+5
|
||||
"*"$&"*"MRk{or&?*^i{g]^P>$O€arc€]lgrc^i{g€$0&7:24?=
"*"$&"*"MRk{or<Fcverg"+?*"$&"*"$[Vgwex"K"Xoc]XZ*0CvgvotW~czoXoct":"3246+5
|
||||
&"*"$&"*WXoct.Qvotx>+5
|
||||
&"*"}$&"*13ý½’æ²Å듎秢*"$&hsxgrkyx$BtoyMgk|*shl'"
"*"$‹
|
||||
&"*"35ç¶‚å–±áŸ<C3A1>ÿŸ°ïŸ¬êº<C3AA>
"*"$dw|mxq|"Svg|Mpgu}MaznPcgy*'"
"*"$‹
|
||||
&"*"35鵚垸ã<C2B8>¥ã‘
|
||||
&"*"fspm~iup*Nrgy"qb€+*…
"*"$&"*"35r€knr*]javg[qnqvctIb+5
|
||||
&"*"$&"*13䞇긵IB"$&"*"$&kd",Qjore[q|}xctGn)&}$&"*"$&"*"$&19ð²§è–‹å•šâ¼¯ýœŽð‡ƒç„¿èÎ<C3A8>$&"*"$&"*"$&kd",'UbctcOyxwrg€]xgvc+$‰"$&"*"$&"*"$&"*"pueov$Hw~~s|"K"Atc~crQjoreVty*shl&""Gxo~axUbctcC|k":"R6$o.*$guo{qn5dgcnqjcx3hkoxw~g|8a|k06$8:&"2N.*36?=$&"*"$&"*"$&"*"$Hw~~s|0]oxXgm~E|dfo,rtso0&$O€arc€]lgrctA|k€$0&Z&"Y:"0ms{oyx3hkoxw~g|1bc|}lcp<cn$&"1M+5
|
||||
&"*"$&"*"$&"*"$&Ds~xup<]erEs}xuoMviamCxbzg"~rsg&""Gxo~axUbctcC|kg(.*Z0&[&""aq{ws|1pka|ubon5dgcnqjcx.gpg$0&32+?*"$&"*"$&"*"$&"*Durvyx.Qjyy,?=
"*"$&"*"$&"*"$&"gp$>Ds~xup<kwZDOmxxc*)?"u
|
||||
&"*"$&"*"$&"*"$&"*"$Za}scQg|nTgee^yvg"412+5
|
||||
&"*"$&"*"$&"*"$&"*"$Za}scQg|nTgeeDyrg"4)I"$&"*"$&"*"$&"*"$&"*Vcqsi]e|fZcgyYyth>UbctcOyxwrg€Kh?=$&"*"$&"*"$&"*"$&"*"PeuaWcpnRaam"+?*"$&"*"$&"*"$&"*"$&"]javg[qnqvctWrc~o$K"~tuc=$&"*"$&"*"$&"*"$‹"$&"*"$&"*"$‹"cvwc"u
|
||||
&"*"$&"*"$&"*"$&nymaz"Pxrq|"=&Ctcxgt]javgZts>qpl0&$\CvgvotW~czoA|k06$n.*[0&$mqm{q|1bc|}lcp9digp}je|0oxi(.*4<:"@:0&4:+?*"$&"*"$&"*"$&"*Durvyx.Qg~TeavCxbzg"~rsg&""\Ctcxgt]javg€Cnt06$n.*[0&$mqm{q|1bc|}lcp9digp}je|0oxi(.*41?=$&"*"$&"*"$&"*"$Hw~~s|0]oxAw}~s{EfkgyG|dpc*~tuc.*$NGxo~axUbctcC|kg(.*Z0&[&""aq{ws|1pka|ubon5dgcnqjcx.gpg$0&4@+?*"$&"*"$&"*"$&"*Durvyx.Qjyy,?=
"*"$&"*"$&"*"$&"gp$>Ds~xup<kwZDOmxxc*)?"u
|
||||
&"*"$&"*"$&"*"$&"*"$Za}scQg|nTgee^yvg"413+5
|
||||
&"*"$&"*"$&"*"$&"*"$Za}scQg|nTgee*)I"$&"*"$&"*"$&"*"$&"*]lgrcWs|u~orQvo~e&?*pazucE
"*"$&"*"$&"*"$&"‹
|
||||
&"*"$&"*"$&"‹
|
||||
&"*"$&"*‡
"*"$‹
|
||||
&"*"35蹞嵻⩒þ‹Àî¼œè–—å £ã›¬âÁ¯ð<C2AF>µè’±å–¨ã–¹ÿ‡›
|
||||
&"*"fspm~iup*MlceeRpg{ctI|hy^sQgtorQjore_pdq,?"u
|
||||
&"*"$&"*vsacf"Xuwp$K"FawwaAoxAjotaavctArv€kbsvc*4Ž3M6$76'E
"*"$&"*"pueov$[cy|i&?*VcqsiIerEbcrge~orGv~tihw~o,6z?M0&3=+?*"$&"*"$zqmcp&Ngcnhw*G$Za}sc]g~MlgtomxctO~xxkpxc*:z1A.*35?=$&"*"$&"fqggn*Iugpajugp*G$Za}sc]g~MlgtomxctO~xxkpxc*:z1A.*42?=$&"*"$&"fqggn*Ziupadu&?*VcqsiIerEbcrge~orGv~tihw~o,6z?M0&37+?*"$&"*"$zqmcp&Ubcn}{g"=&Ni}qeIc~G~c€cgrg€Cxrtgdurg"2|7E&"14+5
|
||||
&"*"$&"*vsacf"Ths"=&Ni}qeIc~G~c€cgrg€Cxrtgdurg"2|7E&"27+5
|
||||
&"*"$&"*vsacf"Ygqp$K"FawwaAoxAjotaavctArv€kbsvc*4Ž3M6$82'E
"*"$&"*"pueov$nko|lsc|i$K"FawwaAoxAjotaavctArv€kbsvc*4Ž3M6$79'E
"*"$&"*"pueov$nkc"=&Ni}qeIc~G~c€cgrg€Cxrtgdurg"2|7E&"1N+5
|
||||
*"$&"*"$dq€oaaj"€$p*]etg€OqsK|ps?"u
|
||||
&"*"$&"*"$&"gp$>x<^ssds"!K"^quhw*0&&x<^ssds"!K":+$aq|~i|wcE
"*"$&"*"$&"*kf&*t8Mgqxk$'?*Wau|g"&$"t8Mgqxk$'?*2)&eyxxpso?*"$&"*"$&"*"id""€.Zkoxbs"/G$Zkoxbs"$0$t0Fka|ds"!K":+$aq|~i|wcE
"*"$&"*"$&"*kf&*t8Ksc|ilsc|"!K"Aa|iba|"$0$t0Aa|iba|"/G$6+*ms|vgxuc=$&"*"$&"*"$&kd",t0Rks|ip$'?*Ziupadu&($"v<Zgqn}ds"!K":+$aq|~i|wcE
"*"$&"*"$&"*kf&*t8W~c|iy"/G$Qjoxk<78>k*0&&x<]lgpa{i&#K"4?"mqnrk|eI"$&"*"$&"*"$h**v<Rgpu&#K"Ths"&$"t8Ths"!K":+$aq|~i|wcE
"*"$&"*"$&"*kf&*t8Ygqp$'?*[auds"&$"t8Ygqp$'?*2)&eyxxpso?*"$&"*"$&"*"id""€.nko|lsc|i$'?*Zig|ba|i*0&&x<Zig|ba|i*#=&2'"gup~knsg5
|
||||
&"*"$&"*"$&"gp$>x<Zic"/G$nkc"&$"t8\g*#=&2'"gup~knsg5
|
||||
&"*"$&"*"$&"]javg[qnqvctIb"K"v<Oyxwrg€KhI"$&"*"$&"*"$xg~r|=$&"*"$&"‹
|
||||
&"*"$&"*]lgrcWs|u~or_f*G$|wfv?*"$&
"*"$51ç‚¿þÀŸï…£ç™
"*"$dw|mxq|"Txqm*shl'"*"$&"*"$51䱓⼞高ꜹ啘䮯ð ºç–²æ“²ä—®âÁ¯ð<C2AF>µ"$&"*"$&kd",[Vgwex+*…
"*"$&"*"$&"*kf&*[^i{g€8Kcv"+$L?*3462'"*"$&"*"$&"*"$&"*WXoct.Xg}ox>+5
|
||||
&"*"$&"*"$&"*"$&O^kmct<]xgt~*)I"$&"*"$&"*"$&"*"G~gmuTzcwor_pdqXuUc€exUbctcK|ps>+5
|
||||
&"*"$&"*"$&"‹
|
||||
&"*"$&"*‡
|
||||
&"*"}‹
|
||||
dnavgqn&Ctcxgt]javg"qb€+*…
"*"$zqmcp&TyqxRcp"=&ic~ruq~~ahnc*)I"$&"gp$>#`qsrVod.xcqkn>$O€arc€]lgrcMShl0+)&}$&"*"$&"fqggn*Mshl*G$Gxo~axUbctcE"+?*"$&"*"$Xqy~Xgd<ta<74>uc~,(Ctcxgt]javgMQb€$&"Gudh+?*"$&*opqg*…
"*"$&"*"Ruq~^ah]0CvgvotW~czoGUdh$]<R€qg>qpl)I"$&"*"$&TyqxRcpe"Gxo~axUbctcEYdj(_<Nrgy"qb€+5
|
||||
&"*"}‹
|
||||
|
|
@ -0,0 +1,416 @@
|
|||
/*
|
||||
文件名:AvatarShape.nut
|
||||
路径:Plugins/AvatarShape/AvatarShape.nut
|
||||
创建日期:2023-05-17 18:02
|
||||
文件用途:
|
||||
*/
|
||||
|
||||
//HudPro按钮类
|
||||
class AvatarShapePro extends BasicsDrawTool // obj -- 按钮名称 -- X坐标 -- Y坐标 -- Ani调用路径 -- 宽度 -- 高度
|
||||
{
|
||||
obj = null; //Obj对象
|
||||
State = 0; //按钮状态
|
||||
ClickEnble = false; //点击效果
|
||||
ButtonDynamic = false; //动态按钮效果
|
||||
BaseFrame = null;
|
||||
|
||||
CustomClickEnble = false; //自定义点击效果
|
||||
CustomClickAnifile = null; //自定义点击效果Ani路径
|
||||
CustomButtonName = null; //自定义点击效果名称
|
||||
CustomClickFrame = null; //自定义点击效果Ani编号
|
||||
CustomClickx = null; //自定义点击效果X坐标
|
||||
CustomClicky = null; //自定义点击效果Y坐标
|
||||
|
||||
|
||||
RectEnble = false; //悬停效果
|
||||
RectButtonName = null; //悬停名称
|
||||
RectBaseAnifile = null; //悬停Ani路径
|
||||
RectFrame = null; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = null; //悬停X坐标
|
||||
Recty = null; //悬停Y坐标
|
||||
|
||||
|
||||
ButtonName = null; //按钮名称
|
||||
x = null; //X坐标
|
||||
y = null; //Y坐标
|
||||
BaseAnifile = null; //调用Ani路径
|
||||
width = null; //可点击宽度
|
||||
length = null; //可点击高度
|
||||
|
||||
Mobj = null; //鼠标对象
|
||||
//构造函数
|
||||
constructor(gObj, gButtonName, gX, gY, gAnifile, gWidth, gLength, gBaseFrame) {
|
||||
obj = gObj;
|
||||
ButtonName = gButtonName;
|
||||
x = gX;
|
||||
y = gY;
|
||||
BaseAnifile = gAnifile;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
BaseFrame = gBaseFrame;
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
//绘制按钮
|
||||
function Show() {
|
||||
if (ClickEnble) //是否开启点击效果
|
||||
{
|
||||
if (isLBDown() && State == 0) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 1; //按键进入按下状态
|
||||
++y;
|
||||
}
|
||||
if (!isLBDown() && State == 1) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 0; //按键进入弹起状态
|
||||
--y;
|
||||
}
|
||||
}
|
||||
|
||||
if (CustomClickEnble) //是否开启自定义点击效果
|
||||
{
|
||||
if (isLBDown()) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomClickFrame, CustomButtonName);
|
||||
else T_DrawDynamicAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if (RectEnble) //开启悬停效果时
|
||||
{
|
||||
if ((isInRect() && !isLBDown()) || (isInRect() && !CustomClickEnble)) //如果鼠标悬停的时候 并且没有点击的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(44);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, RectBaseAnifile, Rectx, Recty, RectFrame, RectButtonName);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
if (!isInRect()) //如果鼠标没有悬停的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(0);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, BaseAnifile, x, y, BaseFrame, ButtonName);
|
||||
else T_DrawDynamicAni(obj, BaseAnifile, x, y, ButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
//设置自定义点击效果
|
||||
function SetCustomClickEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
CustomClickEnble = bool; //自定义点击效果
|
||||
CustomClickAnifile = gAnifile; //自定义点击效果Ani路径
|
||||
CustomButtonName = gButtonName; //自定义点击效果名称
|
||||
CustomClickFrame = gFrame; //自定义点击效果Ani编号
|
||||
CustomClickx = gX; //自定义点击效果X坐标
|
||||
CustomClicky = gY; //自定义点击效果Y坐标
|
||||
}
|
||||
|
||||
//设置悬停效果
|
||||
function SetRectEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
RectEnble = bool; //悬停效果
|
||||
RectButtonName = gButtonName; //悬停名称
|
||||
RectBaseAnifile = gAnifile; //悬停Ani路径
|
||||
RectFrame = gFrame; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = gX; //悬停X坐标
|
||||
Recty = gY; //悬停Y坐标
|
||||
}
|
||||
|
||||
//设置动态按钮
|
||||
function SetClickEnble(bool) {
|
||||
ButtonDynamic = bool;
|
||||
}
|
||||
|
||||
//设置点击效果
|
||||
function SetClickEnble(bool) {
|
||||
ClickEnble = bool;
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown() {
|
||||
if (isInRect() && Mobj.Lb == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp() {
|
||||
if (isInRect() && Mobj.Lb == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
//左键单击状态
|
||||
function isLBActive() {
|
||||
if (isInRect() && Mobj.LbEvent) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
class AvatarShapeWindow extends BasicsDrawTool {
|
||||
//宽度
|
||||
Width = null;
|
||||
//高度
|
||||
Height = null;
|
||||
//标题高度
|
||||
TitleH = null;
|
||||
|
||||
//X坐标
|
||||
X = null;
|
||||
B_X = null;
|
||||
//Y坐标
|
||||
Y = null;
|
||||
B_Y = null;
|
||||
|
||||
YMouseSw = true;
|
||||
DeBugMode = false;
|
||||
|
||||
Mobj = null;
|
||||
M_Xpos = null;
|
||||
M_Ypos = null;
|
||||
|
||||
|
||||
constructor(gX, gY, gWidth, gHeight, gTitleH) {
|
||||
//宽度
|
||||
Width = gWidth;
|
||||
//高度
|
||||
Height = gHeight;
|
||||
//标题高度
|
||||
TitleH = gTitleH;
|
||||
|
||||
//X坐标
|
||||
X = gX;
|
||||
//Y坐标
|
||||
Y = gY;
|
||||
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
|
||||
//设定鼠标逻辑
|
||||
function LockMouse() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, Width, Height)) {
|
||||
IMouse.LockMouseClick();
|
||||
YMouseSw = false;
|
||||
} else {
|
||||
if (YMouseSw == false && sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, 0, 0, 800, 600)) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
YMouseSw = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//设定窗口拖动逻辑
|
||||
function MoveWindow() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, Width, TitleH)) {
|
||||
|
||||
if (Mobj.Lb == 1) {
|
||||
if (!M_Xpos) M_Xpos = IMouse.GetXPos(); //原始鼠标位置数据
|
||||
if (!M_Ypos) M_Ypos = IMouse.GetYPos();
|
||||
if (!B_X) B_X = X; //原始窗口位置
|
||||
if (!B_Y) B_Y = Y;
|
||||
|
||||
X = B_X - (M_Xpos - IMouse.GetXPos());
|
||||
Y = B_Y - (M_Ypos - IMouse.GetYPos());
|
||||
|
||||
} else if (Mobj.Lb == 0) {
|
||||
M_Xpos = null;
|
||||
M_Ypos = null;
|
||||
B_X = null;
|
||||
B_Y = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
if (DeBugMode) sq_DrawBox(X, Y, Width, Height, 0xffffffff);
|
||||
|
||||
//设定鼠标逻辑
|
||||
LockMouse();
|
||||
|
||||
//设定窗口拖动逻辑
|
||||
MoveWindow();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class AvatarShapeC extends BasicsDrawTool {
|
||||
WindowObj = null; //窗口对象
|
||||
MainState = false; //主状态
|
||||
X = 0;
|
||||
Y = 0;
|
||||
ShapeMonsterId = null;
|
||||
ShapeMonsterState = false;
|
||||
MTimer = null;
|
||||
|
||||
SeverEquInfo = null;
|
||||
|
||||
function GetAvatarShapeInfo() {
|
||||
local T = {
|
||||
op = 31001
|
||||
}
|
||||
local str = Json.Encode(T);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
|
||||
function GetAvatarShapeInfoCallBack(Chunk) {
|
||||
// Sout("收到包内容为 \n %L", Chunk);
|
||||
local Buffer = Json_STL("AvatarShapeJsonObj");
|
||||
Buffer.Parse(Chunk, 0, false);
|
||||
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("AvatarShapeCObj")) {
|
||||
RootTab["AvatarShapeCObj"].SeverEquInfo = null;
|
||||
RootTab["AvatarShapeCObj"].SeverEquInfo = [];
|
||||
RootTab["AvatarShapeCObj"].X = Buffer.Get("Xpos");
|
||||
RootTab["AvatarShapeCObj"].Y = Buffer.Get("Ypos");
|
||||
|
||||
for (local i = 0; i < 1000; i++) {
|
||||
local gToubu = Buffer.Get("info->" + i + "->Toubu");
|
||||
if (gToubu == false) break;
|
||||
local gMaozi = Buffer.Get("info->" + i + "->Maozi");
|
||||
local gLianbu = Buffer.Get("info->" + i + "->Lianbu");
|
||||
local gGuanghuan = Buffer.Get("info->" + i + "->Guanghuan");
|
||||
local gXiongbu = Buffer.Get("info->" + i + "->Xiongbu");
|
||||
local gShangyi = Buffer.Get("info->" + i + "->Shangyi");
|
||||
local gPifu = Buffer.Get("info->" + i + "->Pifu");
|
||||
local gYaobu = Buffer.Get("info->" + i + "->Yaobu");
|
||||
local gXiazhuang = Buffer.Get("info->" + i + "->Xiazhuang");
|
||||
local gXie = Buffer.Get("info->" + i + "->Xie");
|
||||
local gMonsterId = Buffer.Get("info->" + i + "->MonsterId");
|
||||
local Equ = {
|
||||
Toubu = gToubu,
|
||||
Maozi = gMaozi,
|
||||
Lianbu = gLianbu,
|
||||
Guanghuan = gGuanghuan,
|
||||
Xiongbu = gXiongbu,
|
||||
Shangyi = gShangyi,
|
||||
Pifu = gPifu,
|
||||
Yaobu = gYaobu,
|
||||
Xiazhuang = gXiazhuang,
|
||||
Xie = gXie,
|
||||
MonsterId = gMonsterId
|
||||
}
|
||||
RootTab["AvatarShapeCObj"].SeverEquInfo.append(Equ);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
constructor() {
|
||||
//注册装备信息回调
|
||||
Pack_Control.rawset(31002, GetAvatarShapeInfoCallBack);
|
||||
|
||||
GetAvatarShapeInfo();
|
||||
|
||||
|
||||
|
||||
MTimer = TimeSTL("AvatarShapeTimer", 5000);
|
||||
|
||||
MTimer.Delete();
|
||||
MTimer = TimeSTL("AvatarShapeTimer", 5000);
|
||||
MTimer.Start();
|
||||
}
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
//开启界面回调
|
||||
function OpenClassCallBack() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
//绘制入口
|
||||
function Draw(obj) {
|
||||
//print(ShapeMonsterId);
|
||||
//有变身ID
|
||||
if (ShapeMonsterId) {
|
||||
//没有变身的情况下
|
||||
if (!ShapeMonsterState) {
|
||||
local Button = AvatarShapePro(obj, "AvatarShapeAni", X, Y, "common/bianshen/bianshen.ani", 28, 28, 16);
|
||||
Button.SetRectEnble(true, "AvatarShaperAnir", X, Y, "common/bianshen/bianshen.ani", 17);
|
||||
Button.SetCustomClickEnble(true, "AvatarShapeAnic", X, Y, "common/bianshen/bianshen.ani", 18);
|
||||
Button.Show();
|
||||
|
||||
if (Button.isLBActive()) {
|
||||
L_sq_SendPackType(214);
|
||||
L_sq_SendPackByte(2);
|
||||
L_sq_SendPackWord(ShapeMonsterId);
|
||||
L_sq_SendPack();
|
||||
ShapeMonsterState = true;
|
||||
}
|
||||
} else {
|
||||
local Button = AvatarShapePro(obj, "NAvatarShapeAni", X, Y, "common/bianshen/bianshen.ani", 28, 28, 20);
|
||||
Button.SetRectEnble(true, "NAvatarShaperAnir", X, Y, "common/bianshen/bianshen.ani", 21);
|
||||
Button.SetCustomClickEnble(true, "NAvatarShapeAnic", X, Y, "common/bianshen/bianshen.ani", 22);
|
||||
Button.Show();
|
||||
|
||||
if (Button.isLBActive()) {
|
||||
L_sq_SendPackType(215);
|
||||
L_sq_SendPack();
|
||||
ShapeMonsterState = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//比对角色与服务器信息是否匹配
|
||||
function CheckPlayerInfoToSeverShapeInfo() {
|
||||
local Toubu = L_sq_GetCharacterAttribute(0x1C, 14);
|
||||
local Maozi = L_sq_GetCharacterAttribute(0x1C, 13);
|
||||
local Lianbu = L_sq_GetCharacterAttribute(0x1C, 15);
|
||||
local Guanghuan = L_sq_GetCharacterAttribute(0x1C, 22);
|
||||
local Xiongbu = L_sq_GetCharacterAttribute(0x1C, 19);
|
||||
local Shangyi = L_sq_GetCharacterAttribute(0x1C, 16);
|
||||
local Pifu = L_sq_GetCharacterAttribute(0x1C, 21);
|
||||
local Yaobu = L_sq_GetCharacterAttribute(0x1C, 20);
|
||||
local Xiazhuang = L_sq_GetCharacterAttribute(0x1C, 17);
|
||||
local Xie = L_sq_GetCharacterAttribute(0x1C, 18);
|
||||
|
||||
foreach(v in SeverEquInfo) {
|
||||
if (v.Toubu != Toubu && v.Toubu != 0) continue;
|
||||
if (v.Maozi != Maozi && v.Maozi != 0) continue;
|
||||
if (v.Lianbu != Lianbu && v.Lianbu != 0) continue;
|
||||
if (v.Guanghuan != Guanghuan && v.Guanghuan != 0) continue;
|
||||
if (v.Xiongbu != Xiongbu && v.Xiongbu != 0) continue;
|
||||
if (v.Shangyi != Shangyi && v.Shangyi != 0) continue;
|
||||
if (v.Pifu != Pifu && v.Pifu != 0) continue;
|
||||
if (v.Yaobu != Yaobu && v.Yaobu != 0) continue;
|
||||
if (v.Xiazhuang != Xiazhuang && v.Xiazhuang != 0) continue;
|
||||
if (v.Xie != Xie && v.Xie != 0) continue;
|
||||
ShapeMonsterId = v.MonsterId;
|
||||
return;
|
||||
}
|
||||
ShapeMonsterId = null;
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
//每五秒获取一次本地数据信息
|
||||
if (MTimer) {
|
||||
if (MTimer.Get() >= 1000) {
|
||||
MTimer.Reset();
|
||||
MTimer.Start();
|
||||
CheckPlayerInfoToSeverShapeInfo();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function AvatarShape(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("AvatarShapeCObj")) {
|
||||
local Cobj = AvatarShapeC();
|
||||
RootTab.rawset("AvatarShapeCObj", Cobj);
|
||||
} else {
|
||||
RootTab["AvatarShapeCObj"].Proc(obj);
|
||||
RootTab["AvatarShapeCObj"].Draw(obj);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,767 @@
|
|||
/*
|
||||
文件名:BuffSwitching.nut
|
||||
路径:Plugins/BuffSwitching/BuffSwitching.nut
|
||||
创建日期:2023-02-01 01:09
|
||||
文件用途:buff换装
|
||||
*/
|
||||
|
||||
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();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//HudPro按钮类
|
||||
class BuffSwitchingButtonPro extends BasicsDrawTool // obj -- 按钮名称 -- X坐标 -- Y坐标 -- Ani调用路径 -- 宽度 -- 高度
|
||||
{
|
||||
obj = null; //Obj对象
|
||||
State = 0; //按钮状态
|
||||
ClickEnble = false; //点击效果
|
||||
ButtonDynamic = false; //动态按钮效果
|
||||
BaseFrame = null;
|
||||
|
||||
CustomClickEnble = false; //自定义点击效果
|
||||
CustomClickAnifile = null; //自定义点击效果Ani路径
|
||||
CustomButtonName = null; //自定义点击效果名称
|
||||
CustomClickFrame = null; //自定义点击效果Ani编号
|
||||
CustomClickx = null; //自定义点击效果X坐标
|
||||
CustomClicky = null; //自定义点击效果Y坐标
|
||||
|
||||
|
||||
RectEnble = false; //悬停效果
|
||||
RectButtonName = null; //悬停名称
|
||||
RectBaseAnifile = null; //悬停Ani路径
|
||||
RectFrame = null; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = null; //悬停X坐标
|
||||
Recty = null; //悬停Y坐标
|
||||
|
||||
|
||||
ButtonName = null; //按钮名称
|
||||
x = null; //X坐标
|
||||
y = null; //Y坐标
|
||||
BaseAnifile = null; //调用Ani路径
|
||||
width = null; //可点击宽度
|
||||
length = null; //可点击高度
|
||||
|
||||
Mobj = null; //鼠标对象
|
||||
//构造函数
|
||||
constructor(gObj, gButtonName, gX, gY, gAnifile, gWidth, gLength, gBaseFrame) {
|
||||
obj = gObj;
|
||||
ButtonName = gButtonName;
|
||||
x = gX;
|
||||
y = gY;
|
||||
BaseAnifile = gAnifile;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
BaseFrame = gBaseFrame;
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
//绘制按钮
|
||||
function Show() {
|
||||
if (ClickEnble) //是否开启点击效果
|
||||
{
|
||||
if (isLBDown() && State == 0) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 1; //按键进入按下状态
|
||||
++y;
|
||||
}
|
||||
if (!isLBDown() && State == 1) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 0; //按键进入弹起状态
|
||||
--y;
|
||||
}
|
||||
}
|
||||
|
||||
if (CustomClickEnble) //是否开启自定义点击效果
|
||||
{
|
||||
if (isLBDown()) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomClickFrame, CustomButtonName);
|
||||
else T_DrawDynamicAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if (RectEnble) //开启悬停效果时
|
||||
{
|
||||
if ((isInRect() && !isLBDown()) || (isInRect() && !CustomClickEnble)) //如果鼠标悬停的时候 并且没有点击的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(44);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, RectBaseAnifile, Rectx, Recty, RectFrame, RectButtonName);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
if (!isInRect()) //如果鼠标没有悬停的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(0);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, BaseAnifile, x, y, BaseFrame, ButtonName);
|
||||
else T_DrawDynamicAni(obj, BaseAnifile, x, y, ButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
//设置自定义点击效果
|
||||
function SetCustomClickEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
CustomClickEnble = bool; //自定义点击效果
|
||||
CustomClickAnifile = gAnifile; //自定义点击效果Ani路径
|
||||
CustomButtonName = gButtonName; //自定义点击效果名称
|
||||
CustomClickFrame = gFrame; //自定义点击效果Ani编号
|
||||
CustomClickx = gX; //自定义点击效果X坐标
|
||||
CustomClicky = gY; //自定义点击效果Y坐标
|
||||
}
|
||||
|
||||
//设置悬停效果
|
||||
function SetRectEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
RectEnble = bool; //悬停效果
|
||||
RectButtonName = gButtonName; //悬停名称
|
||||
RectBaseAnifile = gAnifile; //悬停Ani路径
|
||||
RectFrame = gFrame; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = gX; //悬停X坐标
|
||||
Recty = gY; //悬停Y坐标
|
||||
}
|
||||
|
||||
//设置动态按钮
|
||||
function SetClickEnble(bool) {
|
||||
ButtonDynamic = bool;
|
||||
}
|
||||
|
||||
//设置点击效果
|
||||
function SetClickEnble(bool) {
|
||||
ClickEnble = bool;
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown() {
|
||||
if (isInRect() && Mobj.Lb == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp() {
|
||||
if (isInRect() && Mobj.Lb == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
//左键单击状态
|
||||
function isLBActive() {
|
||||
if (isInRect() && Mobj.LbEvent) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
class BuffSwitchingSkillButtonPro extends BasicsDrawTool // obj -- 按钮名称 -- X坐标 -- Y坐标 -- Ani调用路径 -- 宽度 -- 高度
|
||||
{
|
||||
obj = null; //Obj对象
|
||||
State = 0; //按钮状态
|
||||
SkillId = null; //技能ID
|
||||
|
||||
x = null; //X坐标
|
||||
y = null; //Y坐标
|
||||
|
||||
width = null; //可点击宽度
|
||||
length = null; //可点击高度
|
||||
|
||||
Mobj = null; //鼠标对象
|
||||
//构造函数
|
||||
constructor(gObj, skillid, gX, gY) {
|
||||
obj = gObj;
|
||||
SkillId = sq_GetSkill(gObj, skillid);
|
||||
x = gX;
|
||||
y = gY;
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
//绘制按钮
|
||||
function Show() {
|
||||
isLBDown();
|
||||
sq_DrawSkillIcon(SkillId, x, y, sq_ALPHA(250));
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, 26, 26)) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
//左键按下状态
|
||||
function isLBDown() {
|
||||
if (isInRect() && Mobj.Lb == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp() {
|
||||
if (isInRect() && Mobj.Lb == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
//左键单击状态
|
||||
function isLBActive() {
|
||||
if (isInRect() && Mobj.LbEvent) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
class BuffSwitchingSystem extends BasicsDrawTool {
|
||||
PageSw = false;
|
||||
OpenSw = false;
|
||||
|
||||
WindowObj = null;
|
||||
ExcludeTab = null;
|
||||
|
||||
SkillData = null;
|
||||
EquData = null;
|
||||
EquAddress = null;
|
||||
AvaData = null;
|
||||
AvaAddress = null;
|
||||
CreData = null;
|
||||
|
||||
WindowsObj = null;
|
||||
BaseX = -160;
|
||||
BaseY = -38;
|
||||
State = true;
|
||||
|
||||
SkillSelectMain = false;
|
||||
SelectSkillArr = null;
|
||||
|
||||
Party = 0;
|
||||
|
||||
function Addexclude() {
|
||||
ExcludeTab = {};
|
||||
ExcludeTab.rawset("29201", 1);
|
||||
ExcludeTab.rawset("29202", 2);
|
||||
ExcludeTab.rawset("29203", 3);
|
||||
ExcludeTab.rawset("29204", 4);
|
||||
ExcludeTab.rawset("29205", 5);
|
||||
ExcludeTab.rawset("39278", 6);
|
||||
ExcludeTab.rawset("39400", 7);
|
||||
ExcludeTab.rawset("40600", 8);
|
||||
ExcludeTab.rawset("41000", 9);
|
||||
ExcludeTab.rawset("41800", 10);
|
||||
ExcludeTab.rawset("42200", 11);
|
||||
ExcludeTab.rawset("43400", 12);
|
||||
ExcludeTab.rawset("44600", 13);
|
||||
ExcludeTab.rawset("45000", 14);
|
||||
ExcludeTab.rawset("45800", 15);
|
||||
ExcludeTab.rawset("46200", 16);
|
||||
ExcludeTab.rawset("47400", 17);
|
||||
ExcludeTab.rawset("48426", 18);
|
||||
ExcludeTab.rawset("48600", 19);
|
||||
ExcludeTab.rawset("49000", 20);
|
||||
ExcludeTab.rawset("49800", 21);
|
||||
ExcludeTab.rawset("50200", 22);
|
||||
ExcludeTab.rawset("51265", 23);
|
||||
ExcludeTab.rawset("51400", 24);
|
||||
ExcludeTab.rawset("52600", 25);
|
||||
ExcludeTab.rawset("53000", 26);
|
||||
ExcludeTab.rawset("53800", 27);
|
||||
ExcludeTab.rawset("54200", 28);
|
||||
ExcludeTab.rawset("55400", 29);
|
||||
ExcludeTab.rawset("55820", 30);
|
||||
ExcludeTab.rawset("56600", 31);
|
||||
ExcludeTab.rawset("57000", 32);
|
||||
ExcludeTab.rawset("57800", 33);
|
||||
ExcludeTab.rawset("58200", 34);
|
||||
ExcludeTab.rawset("1600000", 35);
|
||||
ExcludeTab.rawset("1610000", 36);
|
||||
ExcludeTab.rawset("1640000", 37);
|
||||
ExcludeTab.rawset("1650000", 38);
|
||||
ExcludeTab.rawset("1670000", 39);
|
||||
ExcludeTab.rawset("1680000", 40);
|
||||
ExcludeTab.rawset("1720000", 41);
|
||||
ExcludeTab.rawset("1730000", 42);
|
||||
ExcludeTab.rawset("1750000", 43);
|
||||
ExcludeTab.rawset("1760000", 44);
|
||||
ExcludeTab.rawset("1770000", 45);
|
||||
ExcludeTab.rawset("1790000", 46);
|
||||
ExcludeTab.rawset("1800000", 47);
|
||||
ExcludeTab.rawset("2090000", 48);
|
||||
ExcludeTab.rawset("2120000", 49);
|
||||
ExcludeTab.rawset("2130000", 50);
|
||||
ExcludeTab.rawset("2140000", 51);
|
||||
ExcludeTab.rawset("2150000", 52);
|
||||
ExcludeTab.rawset("2160000", 53);
|
||||
ExcludeTab.rawset("29000", 54);
|
||||
ExcludeTab.rawset("31000", 55);
|
||||
ExcludeTab.rawset("33679", 56);
|
||||
ExcludeTab.rawset("33900", 57);
|
||||
ExcludeTab.rawset("35000", 58);
|
||||
ExcludeTab.rawset("37000", 59);
|
||||
ExcludeTab.rawset("27118", 60);
|
||||
ExcludeTab.rawset("27900", 61);
|
||||
ExcludeTab.rawset("2190000", 62);
|
||||
ExcludeTab.rawset("2190011", 63);
|
||||
ExcludeTab.rawset("2190041", 64);
|
||||
ExcludeTab.rawset("2190051", 65);
|
||||
ExcludeTab.rawset("2190071", 66);
|
||||
ExcludeTab.rawset("2190081", 67);
|
||||
}
|
||||
|
||||
constructor() {
|
||||
Addexclude();
|
||||
EquAddress = [5, 6, 1, 12, 3, 4, 7, 9, 2, 10, 8, 11];
|
||||
AvaAddress = [14, 13, 15, 22, 19, 16, 21, 20, 17, 18];
|
||||
|
||||
//注册换装配置信息回调
|
||||
Pack_Control.rawset(20013004, SetMyEquCallBack);
|
||||
//开始换装回调
|
||||
Pack_Control.rawset(20013008, StartSwitchingCallBack);
|
||||
|
||||
ReqMyEqu(); //请求服务端数据
|
||||
}
|
||||
|
||||
function SwitchingSendPack(Pos, Id, Type, Space, Index, LocalType) {
|
||||
L_sq_SendPackType(19);
|
||||
L_sq_SendPackByte(Space);
|
||||
L_sq_SendPackWord(Pos);
|
||||
L_sq_SendPackDWord(Id);
|
||||
L_sq_SendPackDWord(1);
|
||||
L_sq_SendPackByte(3);
|
||||
L_sq_SendPackWord(Type);
|
||||
local OldId;
|
||||
if (LocalType == 1) OldId = L_sq_GetCharacterAttribute(0x1C, EquAddress[Index]);
|
||||
if (LocalType == 0) OldId = L_sq_GetCharacterAttribute(0x1C, AvaAddress[Index]);
|
||||
if (LocalType == 2) OldId = L_sq_GetCharacterAttribute(0x1C, 24);
|
||||
if (OldId == null || OldId <= 0 || ExcludeTab.rawin(OldId.tostring())) L_sq_SendPackDWord(0);
|
||||
else L_sq_SendPackDWord(OldId);
|
||||
L_sq_SendPackDWord(L_sq_Switching());
|
||||
L_sq_SendPackByte(0);
|
||||
L_sq_SendPackByte(0);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
|
||||
//开始换装回调
|
||||
function StartSwitchingCallBack(Chunk) {
|
||||
local Buffer = Json_STL("StartSwitchingBuffer");
|
||||
Buffer.Parse(Chunk, 0, false);
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("BuffSwitchingObj")) {
|
||||
for (local i = 0; i < Buffer.Get("Acount"); i++) {
|
||||
local Pos = Buffer.Get("Apos->" + i);
|
||||
if (Pos < 0) continue;
|
||||
local Id = Buffer.Get("Aid->" + i);
|
||||
local Type = Buffer.Get("AType->" + i);
|
||||
RootTab["BuffSwitchingObj"].SwitchingSendPack(Pos, Id, Type, 1, i, 0);
|
||||
}
|
||||
for (local q = 0; q < Buffer.Get("Ecount"); q++) {
|
||||
local Pos = Buffer.Get("Epos->" + q);
|
||||
local Id = Buffer.Get("Eid->" + q);
|
||||
local Type = Buffer.Get("EType->" + q);
|
||||
RootTab["BuffSwitchingObj"].SwitchingSendPack(Pos, Id, Type, 0, q, 1);
|
||||
}
|
||||
local Crepos = Buffer.Get("Cpos");
|
||||
if (Crepos >= 0) {
|
||||
local Pos = Buffer.Get("Cpos");
|
||||
local Id = Buffer.Get("Creid");
|
||||
local Type = Buffer.Get("CreType");
|
||||
RootTab["BuffSwitchingObj"].SwitchingSendPack(Pos, Id, Type, 7, 0, 2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar("{\"op\":20013007}");
|
||||
L_sq_SendPack();
|
||||
}
|
||||
|
||||
//换装配置信息回调
|
||||
function SetMyEquCallBack(Chunk) {
|
||||
|
||||
local Buffer = Json_STL("GetSetMyEquBuffer");
|
||||
Buffer.Parse(Chunk, 0, false);
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("BuffSwitchingObj")) {
|
||||
local Tobj = RootTab["BuffSwitchingObj"];
|
||||
Tobj.EquData = Tobj.StringToArr(Buffer.Get("EquData"));
|
||||
Tobj.AvaData = Tobj.StringToArr(Buffer.Get("AvaData"));
|
||||
Tobj.CreData = Buffer.Get("CreData");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function ReqMyEqu() {
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar("{\"op\":20013003 , \"Party\":" + Party + "}");
|
||||
L_sq_SendPack();
|
||||
}
|
||||
|
||||
function GetMyEqu() {
|
||||
EquData = [];
|
||||
EquData.append(L_sq_GetCharacterAttribute(0x1C, 5));
|
||||
EquData.append(L_sq_GetCharacterAttribute(0x1C, 6));
|
||||
EquData.append(L_sq_GetCharacterAttribute(0x1C, 1));
|
||||
EquData.append(L_sq_GetCharacterAttribute(0x1C, 12));
|
||||
EquData.append(L_sq_GetCharacterAttribute(0x1C, 3));
|
||||
EquData.append(L_sq_GetCharacterAttribute(0x1C, 4));
|
||||
EquData.append(L_sq_GetCharacterAttribute(0x1C, 7));
|
||||
EquData.append(L_sq_GetCharacterAttribute(0x1C, 9));
|
||||
EquData.append(L_sq_GetCharacterAttribute(0x1C, 2));
|
||||
EquData.append(L_sq_GetCharacterAttribute(0x1C, 10));
|
||||
EquData.append(L_sq_GetCharacterAttribute(0x1C, 8));
|
||||
EquData.append(L_sq_GetCharacterAttribute(0x1C, 11));
|
||||
|
||||
AvaData = [];
|
||||
AvaData.append(L_sq_GetCharacterAttribute(0x1C, 14));
|
||||
AvaData.append(L_sq_GetCharacterAttribute(0x1C, 13));
|
||||
AvaData.append(L_sq_GetCharacterAttribute(0x1C, 15));
|
||||
AvaData.append(L_sq_GetCharacterAttribute(0x1C, 22));
|
||||
AvaData.append(L_sq_GetCharacterAttribute(0x1C, 19));
|
||||
AvaData.append(L_sq_GetCharacterAttribute(0x1C, 16));
|
||||
AvaData.append(L_sq_GetCharacterAttribute(0x1C, 21));
|
||||
AvaData.append(L_sq_GetCharacterAttribute(0x1C, 20));
|
||||
AvaData.append(L_sq_GetCharacterAttribute(0x1C, 17));
|
||||
AvaData.append(L_sq_GetCharacterAttribute(0x1C, 18));
|
||||
|
||||
CreData = L_sq_GetCharacterAttribute(0x1C, 24);
|
||||
}
|
||||
|
||||
//数组转字符串
|
||||
function ArrToString(ArrObject) {
|
||||
local str = "";
|
||||
//str += "[";
|
||||
foreach(Value in ArrObject) {
|
||||
str += Value.tostring();
|
||||
str += ",";
|
||||
}
|
||||
str = str.slice(0, str.len() - 1);
|
||||
//str += "\x005d";
|
||||
return str;
|
||||
}
|
||||
|
||||
//字符串转数组
|
||||
function StringToArr(Str) {
|
||||
Str = Str.slice(1, Str.len());
|
||||
local Arr = [];
|
||||
local Bpos = 0;
|
||||
local Fpos = 0;
|
||||
while (true) {
|
||||
Fpos = Str.find(",", Bpos);
|
||||
if (Fpos == null) break;
|
||||
if (Bpos != Fpos) {
|
||||
local buf = Str.slice(Bpos, Fpos);
|
||||
Arr.append(buf.tointeger());
|
||||
}
|
||||
Bpos = Fpos + 1;
|
||||
}
|
||||
Fpos = Str.find("]", Bpos);
|
||||
local buf = Str.slice(Bpos, Fpos);
|
||||
Arr.append(buf.tointeger());
|
||||
return Arr;
|
||||
}
|
||||
|
||||
function DrawMain(obj) {
|
||||
|
||||
{ //底图层绘制
|
||||
//窗口
|
||||
T_DrawStayAni(obj, "common/buffswitching/main.ani", BaseX + 222, BaseY + 86, 0, "BuffSwitchingSystemMain");
|
||||
//窗口标题
|
||||
L_sq_DrawCode("buff换装", BaseX + 376, BaseY + 88, sq_RGBA(230, 200, 155, 250), 0, 0);
|
||||
|
||||
if (!SkillSelectMain) T_DrawStayAni(obj, "common/buffswitching/main.ani", BaseX + 222 + 160, BaseY + 86 + 48, 2, "BuffSwitchingSystemSkillSlot");
|
||||
|
||||
L_sq_DrawCode("记录", BaseX + 388, BaseY + 107, sq_RGBA(247, 214, 90, 250), 1, 1);
|
||||
|
||||
L_sq_DrawCode("装备", BaseX + 282, BaseY + 221, sq_RGBA(247, 214, 90, 250), 1, 1);
|
||||
L_sq_DrawCode("装扮", BaseX + 423, BaseY + 221, sq_RGBA(247, 214, 90, 250), 1, 1);
|
||||
L_sq_DrawCode("宠物", BaseX + 530, BaseY + 221, sq_RGBA(247, 214, 90, 250), 1, 1);
|
||||
|
||||
for (local r = 0; r < 3; r++) {
|
||||
local PartyButton = BuffSwitchingButtonPro(obj, "BuffSwitchingPartyButton" + r, BaseX + 222 + 10, BaseY + 86 + 42 + (r * 23), "common/buffswitching/party.ani", 24, 14, 0 + (r * 2));
|
||||
PartyButton.SetRectEnble(true, "BuffSwitchingPartyButtonr" + r, BaseX + 222 + 10, BaseY + 86 + 42 + (r * 23), "common/buffswitching/party.ani", 1 + (r * 2));
|
||||
PartyButton.SetCustomClickEnble(true, "BuffSwitchingPartyButtonc" + r, BaseX + 222 + 10, BaseY + 86 + 43 + (r * 23), "common/buffswitching/party.ani", 1 + (r * 2));
|
||||
PartyButton.Show();
|
||||
if (PartyButton.isLBActive()) {
|
||||
Party = r;
|
||||
EquData = null;
|
||||
AvaData = null;
|
||||
CreData = null;
|
||||
ReqMyEqu();
|
||||
}
|
||||
}
|
||||
|
||||
T_DrawStayAni(obj, "common/buffswitching/main.ani", BaseX + 222 + 40, BaseY + 86 + 44 + (Party * 23), 7, "BuffSwitchingSystemMainSelect");
|
||||
|
||||
//如果当前没有技能提升数据
|
||||
if (EquData == null && AvaData == null && CreData == null) {
|
||||
local AddButton = BuffSwitchingButtonPro(obj, "BuffSwitchingAddButton", BaseX + 222 + 165, BaseY + 86 + 53, "common/buffswitching/main.ani", 26, 26, 4);
|
||||
AddButton.SetRectEnble(true, "BuffSwitchingAddButtonr", BaseX + 222 + 165, BaseY + 86 + 53, "common/buffswitching/main.ani", 4);
|
||||
AddButton.SetCustomClickEnble(true, "BuffSwitchingAddButtonc", BaseX + 222 + 165, BaseY + 86 + 53, "common/buffswitching/main.ani", 4);
|
||||
//if (!SkillSelectMain) AddButton.Show();
|
||||
AddButton.Show();
|
||||
|
||||
if (AddButton.isLBActive() && !SkillSelectMain) {
|
||||
// SkillSelectMain = true;
|
||||
GetMyEqu();
|
||||
|
||||
local BuffSwitchingPack = Json_STL("BuffSwitchingPack");
|
||||
BuffSwitchingPack.Put("op", 20013001);
|
||||
BuffSwitchingPack.Put("Party", Party);
|
||||
|
||||
foreach(pos, Value in EquData) {
|
||||
BuffSwitchingPack.Put("EquData" + pos, Value);
|
||||
}
|
||||
//BuffSwitchingPack.Put("EquData", ArrToString(EquData));
|
||||
foreach(apos, aValue in AvaData) {
|
||||
BuffSwitchingPack.Put("AvaData" + apos, aValue);
|
||||
}
|
||||
//BuffSwitchingPack.Put("AvaData", ArrToString(AvaData));
|
||||
BuffSwitchingPack.Put("CreData", CreData);
|
||||
|
||||
local str = BuffSwitchingPack.GetString();
|
||||
//print(str);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
BuffSwitchingPack.Delete();
|
||||
}
|
||||
|
||||
} else {
|
||||
local Skill = sq_GetSkill(obj, 174);
|
||||
sq_DrawSkillIcon(Skill, BaseX + 222 + 164, BaseY + 86 + 51, sq_ALPHA(250));
|
||||
// local SkillLevel = sq_GetSkillLevel(obj, SkillData);
|
||||
// L_sq_DrawCode("Lv." + SkillLevel, BaseX + 222 + 165, BaseY + 86 + 51 + 30, sq_RGBA(230, 200, 155, 250), 1, 1);
|
||||
L_sq_DrawCode("生效", BaseX + 222 + 167, BaseY + 86 + 51 + 30, sq_RGBA(230, 200, 155, 250), 1, 1);
|
||||
|
||||
{ //装备
|
||||
|
||||
for (local i = 0; i < 12; i++) {
|
||||
local z = i;
|
||||
if (i == 9 || i == 10) z = i + 1;
|
||||
if (i == 11) z = i + 4;
|
||||
if (EquData[i] != 0) L_Sq_DrawItem(BaseX + 231 + ((z % 4) * 32), BaseY + 240 + ((z / 4) * 32), EquData[i], 1, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
{ //时装
|
||||
for (local q = 0; q < 10; q++) {
|
||||
local z = q + 1;
|
||||
if (q >= 7) z = q + 2;
|
||||
if (AvaData[q] != 0) L_Sq_DrawItem(BaseX + 370 + ((z % 4) * 33), BaseY + 240 + ((z / 4) * 33), AvaData[q], 1, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
{ //宠物
|
||||
if (CreData != 0) L_Sq_DrawItem(BaseX + 527, BaseY + 250, CreData, 1, 0, 0, 0);
|
||||
}
|
||||
|
||||
local DeleteButton = BuffSwitchingButtonPro(obj, "BuffSwitchingDeleteButton", BaseX + 222 + 200, BaseY + 86 + 50, "common/buffswitching/main.ani", 26, 26, 8);
|
||||
DeleteButton.SetRectEnble(true, "BuffSwitchingDeleteButtonr", BaseX + 222 + 200, BaseY + 86 + 50, "common/buffswitching/main.ani", 9);
|
||||
DeleteButton.SetCustomClickEnble(true, "BuffSwitchingDeleteButtonc", BaseX + 222 + 200, BaseY + 86 + 50, "common/buffswitching/main.ani", 10);
|
||||
DeleteButton.Show();
|
||||
|
||||
if (DeleteButton.isLBActive()) {
|
||||
EquData = null;
|
||||
AvaData = null;
|
||||
CreData = null;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
//选择技能
|
||||
if (SkillSelectMain) {
|
||||
//候选技能表
|
||||
if (SelectSkillArr == null) {
|
||||
SelectSkillArr = [];
|
||||
local skillmgr = obj.getSkillManager();
|
||||
for (local i = 0; i < 255; i++) {
|
||||
local skl = sq_GetSkill(obj, i);
|
||||
if (skl) {
|
||||
local id = skillmgr.getSlotindex(i);
|
||||
if ((id >= 0 && id <= 6) || (id >= 198 && id <= 203)) {
|
||||
SelectSkillArr.append(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//返回按钮
|
||||
local LeftButton = BuffSwitchingButtonPro(obj, "BuffSwitchingLButton", BaseX + 222 + 165 + 170, BaseY + 86 + 53 + 58, "common/buffswitching/main.ani", 13, 9, 5);
|
||||
LeftButton.SetRectEnble(true, "BuffSwitchingLButtonr", BaseX + 222 + 165 + 170, BaseY + 86 + 53 + 58, "common/buffswitching/main.ani", 6);
|
||||
LeftButton.SetCustomClickEnble(true, "BuffSwitchingLButtonc", BaseX + 222 + 165 + 170, BaseY + 86 + 53 + 58, "common/buffswitching/main.ani", 7);
|
||||
LeftButton.Show();
|
||||
|
||||
if (LeftButton.isLBActive()) {
|
||||
SkillSelectMain = false;
|
||||
SelectSkillArr = null;
|
||||
}
|
||||
|
||||
//for (local i; i < SelectSkillArr.len(); i++) {
|
||||
for (local i = 0; i < SelectSkillArr.len(); i++) {
|
||||
local Id = SelectSkillArr[i];
|
||||
local SkillButton = BuffSwitchingSkillButtonPro(obj, Id, BaseX + 222 + 24 + ((i % 6) * 56), BaseY + 86 + 42 + ((i / 6) * 32));
|
||||
SkillButton.Show();
|
||||
if (SkillButton.isLBActive()) {
|
||||
SkillData = Id;
|
||||
GetMyEqu();
|
||||
SkillSelectMain = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
function Proc(obj) {
|
||||
//print(sq_GetPopupWindowMainCotrol(267));
|
||||
//如果背包打开 绘制系统开启
|
||||
|
||||
if (State && OpenSw) {
|
||||
if (WindowObj) {
|
||||
DrawMain(obj);
|
||||
WindowObj.Show(obj);
|
||||
} else {
|
||||
WindowObj = Window(BaseX, BaseY, 356, 288, 10);
|
||||
}
|
||||
} else {
|
||||
if (WindowObj && WindowObj.YMouseSw == false) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
WindowObj.YMouseSw = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function SyncData(x, y) {
|
||||
BaseX = x;
|
||||
BaseY = y;
|
||||
State = true;
|
||||
if (WindowObj) {
|
||||
WindowObj.X = x + 222;
|
||||
WindowObj.Y = y + 86;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//入口
|
||||
function BuffSwitching(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("BuffSwitchingObj")) {
|
||||
local Cobj = BuffSwitchingSystem();
|
||||
RootTab.rawset("BuffSwitchingObj", Cobj);
|
||||
} else {
|
||||
RootTab["BuffSwitchingObj"].Proc(obj);
|
||||
//RootTab["BuffSwitchingObj"].State = false;
|
||||
}
|
||||
|
||||
local Winddddd = sq_GetPopupWindowMainCotrol(244);
|
||||
if (!Winddddd) {
|
||||
RootTab["BuffSwitchingObj"].OpenSw = false;
|
||||
RootTab["BuffSwitchingObj"].State = false;
|
||||
RootTab["BuffSwitchingObj"].PageSw = false;
|
||||
}
|
||||
|
||||
/*
|
||||
local Winddddd = sq_GetPopupWindowMainCotrol(244);
|
||||
if(Winddddd)
|
||||
{
|
||||
local BaseX = Winddddd.GetXPos();
|
||||
local BaseY = Winddddd.GetYPos();
|
||||
|
||||
|
||||
local OpenButton = BuffSwitchingButtonPro(obj, "BuffSwitchingOpenButton", BaseX , BaseY, "common/buffswitching/main.ani", 26, 26, 11);
|
||||
OpenButton.SetRectEnble(true, "BuffSwitchingOpenButtonr", BaseX, BaseY , "common/buffswitching/main.ani", 12);
|
||||
OpenButton.SetCustomClickEnble(true, "BuffSwitchingOpenButtonc", BaseX , BaseY, "common/buffswitching/main.ani", 13);
|
||||
OpenButton.Show();
|
||||
|
||||
if (OpenButton.isLBActive()) {
|
||||
//RootTab["BuffSwitchingObj"].OpenSw = !RootTab["BuffSwitchingObj"].OpenSw;
|
||||
print(1111);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
//call
|
||||
function Sq_BuffSwitchingCallBack(x, y) {
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("BuffSwitchingObj") && RootTab["BuffSwitchingObj"].PageSw == true) {
|
||||
RootTab["BuffSwitchingObj"].SyncData(x - 1430, y - 500);
|
||||
//RootTab["BuffSwitchingObj"].PageSw = false;
|
||||
}
|
||||
}
|
||||
|
||||
function Sq_SwitchingCallBack(x, y) {
|
||||
/*
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("BuffSwitchingObj")) {
|
||||
RootTab["BuffSwitchingObj"].PageSw = true;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
local RootTab = getroottable();
|
||||
|
||||
if (RootTab.rawin("BuffSwitchingObj") && RootTab["BuffSwitchingObj"].PageSw == true) {
|
||||
RootTab["BuffSwitchingObj"].SyncData(-200, 0);
|
||||
//RootTab["BuffSwitchingObj"].PageSw = false;
|
||||
}
|
||||
|
||||
|
||||
local BaseX = x - 600 + 141;
|
||||
local BaseY = y - 200 - 83;
|
||||
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
if(!obj)return;
|
||||
local OpenButton = BuffSwitchingButtonPro(obj, "BuffSwitchingOpenButton", BaseX, BaseY, "common/buffswitching/main.ani", 55, 55, 14);
|
||||
OpenButton.SetRectEnble(true, "BuffSwitchingOpenButtonr", BaseX, BaseY, "common/buffswitching/main.ani", 15);
|
||||
OpenButton.SetCustomClickEnble(true, "BuffSwitchingOpenButtonc", BaseX, BaseY, "common/buffswitching/main.ani", 16);
|
||||
OpenButton.Show();
|
||||
|
||||
if (OpenButton.isLBActive()) {
|
||||
RootTab["BuffSwitchingObj"].OpenSw = !RootTab["BuffSwitchingObj"].OpenSw;
|
||||
RootTab["BuffSwitchingObj"].State = !RootTab["BuffSwitchingObj"].State;
|
||||
RootTab["BuffSwitchingObj"].PageSw = true;
|
||||
//print(1111);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,613 @@
|
|||
/*
|
||||
文件名:CollectBox.nut
|
||||
路径:Plugins/CollectBox/CollectBox.nut
|
||||
创建日期:2023-05-12 16:09
|
||||
文件用途:
|
||||
*/
|
||||
|
||||
//HudPro按钮类
|
||||
class CollectBoxPro extends BasicsDrawTool // obj -- 按钮名称 -- X坐标 -- Y坐标 -- Ani调用路径 -- 宽度 -- 高度
|
||||
{
|
||||
obj = null; //Obj对象
|
||||
State = 0; //按钮状态
|
||||
ClickEnble = false; //点击效果
|
||||
ButtonDynamic = false; //动态按钮效果
|
||||
BaseFrame = null;
|
||||
|
||||
CustomClickEnble = false; //自定义点击效果
|
||||
CustomClickAnifile = null; //自定义点击效果Ani路径
|
||||
CustomButtonName = null; //自定义点击效果名称
|
||||
CustomClickFrame = null; //自定义点击效果Ani编号
|
||||
CustomClickx = null; //自定义点击效果X坐标
|
||||
CustomClicky = null; //自定义点击效果Y坐标
|
||||
|
||||
|
||||
RectEnble = false; //悬停效果
|
||||
RectButtonName = null; //悬停名称
|
||||
RectBaseAnifile = null; //悬停Ani路径
|
||||
RectFrame = null; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = null; //悬停X坐标
|
||||
Recty = null; //悬停Y坐标
|
||||
|
||||
|
||||
ButtonName = null; //按钮名称
|
||||
x = null; //X坐标
|
||||
y = null; //Y坐标
|
||||
BaseAnifile = null; //调用Ani路径
|
||||
width = null; //可点击宽度
|
||||
length = null; //可点击高度
|
||||
|
||||
Mobj = null; //鼠标对象
|
||||
|
||||
Overturn = false; //翻转
|
||||
|
||||
|
||||
//构造函数
|
||||
constructor(gButtonName, gX, gY, gAnifile, gWidth, gLength, gBaseFrame) {
|
||||
ButtonName = gButtonName;
|
||||
x = gX;
|
||||
y = gY;
|
||||
BaseAnifile = gAnifile;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
BaseFrame = gBaseFrame;
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
//绘制按钮
|
||||
function Show() {
|
||||
if (ClickEnble) //是否开启点击效果
|
||||
{
|
||||
if (isLBDown() && State == 0) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 1; //按键进入按下状态
|
||||
++y;
|
||||
}
|
||||
if (!isLBDown() && State == 1) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 0; //按键进入弹起状态
|
||||
--y;
|
||||
}
|
||||
}
|
||||
|
||||
local Xr = 1.0
|
||||
local Xoffset = 0;
|
||||
|
||||
if (Overturn) {
|
||||
Xr = -1.0;
|
||||
Xoffset = width;
|
||||
}
|
||||
//L_sq_DrawImg("common/etc/combo.img", 0, 100, 100, 0, sq_RGBA(255, 255, 255, 250), 1.0, 1.0);
|
||||
|
||||
if (CustomClickEnble) //是否开启自定义点击效果
|
||||
{
|
||||
if (isLBDown()) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
if (!ButtonDynamic) L_sq_DrawImg(CustomClickAnifile, CustomClickFrame, CustomClickx + Xoffset, CustomClicky, 0, sq_RGBA(255, 255, 255, 250), Xr, 1.0);
|
||||
else T_DrawDynamicAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if (RectEnble) //开启悬停效果时
|
||||
{
|
||||
if ((isInRect() && !isLBDown()) || (isInRect() && !CustomClickEnble)) //如果鼠标悬停的时候 并且没有点击的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(44);
|
||||
if (!ButtonDynamic) L_sq_DrawImg(RectBaseAnifile, RectFrame, Rectx + Xoffset, Recty, 0, sq_RGBA(255, 255, 255, 250), Xr, 1.0);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
if (!isInRect()) //如果鼠标没有悬停的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(0);
|
||||
if (!ButtonDynamic) L_sq_DrawImg(BaseAnifile, BaseFrame, x + Xoffset, y, 0, sq_RGBA(255, 255, 255, 250), Xr, 1.0);
|
||||
else T_DrawDynamicAni(obj, BaseAnifile, x, y, ButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
//设置自定义点击效果
|
||||
function SetCustomClickEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
CustomClickEnble = bool; //自定义点击效果
|
||||
CustomClickAnifile = gAnifile; //自定义点击效果Ani路径
|
||||
CustomButtonName = gButtonName; //自定义点击效果名称
|
||||
CustomClickFrame = gFrame; //自定义点击效果Ani编号
|
||||
CustomClickx = gX; //自定义点击效果X坐标
|
||||
CustomClicky = gY; //自定义点击效果Y坐标
|
||||
}
|
||||
|
||||
//设置悬停效果
|
||||
function SetRectEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
RectEnble = bool; //悬停效果
|
||||
RectButtonName = gButtonName; //悬停名称
|
||||
RectBaseAnifile = gAnifile; //悬停Ani路径
|
||||
RectFrame = gFrame; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = gX; //悬停X坐标
|
||||
Recty = gY; //悬停Y坐标
|
||||
}
|
||||
|
||||
//设置动态按钮
|
||||
function SetClickEnble(bool) {
|
||||
ButtonDynamic = bool;
|
||||
}
|
||||
|
||||
//设置点击效果
|
||||
function SetClickEnble(bool) {
|
||||
ClickEnble = bool;
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown() {
|
||||
if (isInRect() && Mobj.Lb == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp() {
|
||||
if (isInRect() && Mobj.Lb == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
//左键单击状态
|
||||
function isLBActive() {
|
||||
if (isInRect() && Mobj.LbEvent) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
class CollectBoxWindow extends BasicsDrawTool {
|
||||
//宽度
|
||||
Width = null;
|
||||
//高度
|
||||
Height = null;
|
||||
//标题高度
|
||||
TitleH = null;
|
||||
|
||||
//X坐标
|
||||
X = null;
|
||||
B_X = null;
|
||||
//Y坐标
|
||||
Y = null;
|
||||
B_Y = null;
|
||||
|
||||
YMouseSw = true;
|
||||
DeBugMode = false;
|
||||
|
||||
Mobj = null;
|
||||
M_Xpos = null;
|
||||
M_Ypos = null;
|
||||
|
||||
|
||||
constructor(gX, gY, gWidth, gHeight, gTitleH) {
|
||||
//宽度
|
||||
Width = gWidth;
|
||||
//高度
|
||||
Height = gHeight;
|
||||
//标题高度
|
||||
TitleH = gTitleH;
|
||||
|
||||
//X坐标
|
||||
X = gX;
|
||||
//Y坐标
|
||||
Y = gY;
|
||||
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
|
||||
//设定鼠标逻辑
|
||||
function LockMouse() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, Width, Height)) {
|
||||
IMouse.LockMouseClick();
|
||||
YMouseSw = false;
|
||||
} else {
|
||||
if (YMouseSw == false && sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, 0, 0, 800, 600)) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
YMouseSw = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//设定窗口拖动逻辑
|
||||
function MoveWindow() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, Width, TitleH)) {
|
||||
|
||||
if (Mobj.Lb == 1) {
|
||||
if (!M_Xpos) M_Xpos = IMouse.GetXPos(); //原始鼠标位置数据
|
||||
if (!M_Ypos) M_Ypos = IMouse.GetYPos();
|
||||
if (!B_X) B_X = X; //原始窗口位置
|
||||
if (!B_Y) B_Y = Y;
|
||||
|
||||
X = B_X - (M_Xpos - IMouse.GetXPos());
|
||||
Y = B_Y - (M_Ypos - IMouse.GetYPos());
|
||||
|
||||
} else if (Mobj.Lb == 0) {
|
||||
M_Xpos = null;
|
||||
M_Ypos = null;
|
||||
B_X = null;
|
||||
B_Y = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
if (DeBugMode) sq_DrawBox(X, Y, Width, Height, 0xffffffff);
|
||||
|
||||
//设定鼠标逻辑
|
||||
LockMouse();
|
||||
|
||||
//设定窗口拖动逻辑
|
||||
MoveWindow();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class CollectBoxC extends BasicsDrawTool {
|
||||
WindowObj = null; //窗口对象
|
||||
Mobj = null; //鼠标对象
|
||||
MainState = false; //主状态
|
||||
X = 211;
|
||||
Y = 106;
|
||||
|
||||
//收集箱类型组
|
||||
CollectBoxTypeArr = null;
|
||||
//收集箱类型展示滚动控件
|
||||
Scobj = null;
|
||||
//收集箱类型
|
||||
PageSlot = 0;
|
||||
|
||||
|
||||
//总配置信息
|
||||
|
||||
GlobaInfo = null;
|
||||
|
||||
//道具信息
|
||||
ItemInfoArr = null;
|
||||
//箱子信息
|
||||
BoxInfoArr = null;
|
||||
|
||||
//玩家当前箱子信息
|
||||
PlayerBoxInfo = null;
|
||||
|
||||
//当前绘制道具信息
|
||||
NowDrawItemInfo = null;
|
||||
NowDrawItemInfoObject = null;
|
||||
//当前绘制收集箱属性信息
|
||||
NowDrawBoxSw = false;
|
||||
|
||||
//当前滚轮值
|
||||
NowWheel = 0;
|
||||
MaxWheel = null;
|
||||
|
||||
//获取基础信息回调包
|
||||
function GetBaseInfoCallBack(Chunk) {
|
||||
// Sout("收到包内容: %L", Chunk);
|
||||
local Jso = Json.Decode(Chunk);
|
||||
|
||||
|
||||
local StrBuf1 = L_sq_GetStringDrawArray(Jso.Message.collecText, 300);
|
||||
local StrBuf2 = L_sq_GetStringDrawArray(Jso.Message.collecText, 356);
|
||||
local T = {
|
||||
ballLst = Jso.Message.ballLst,
|
||||
collecImgName = Jso.Message.collecImgName,
|
||||
collecName = Jso.Message.collecName,
|
||||
collecStatus = Jso.Message.collecStatus,
|
||||
// collecTextS = StrBuf1[0] + "......",
|
||||
// collecTextM = StrBuf2,
|
||||
collecValue = Jso.Message.collecValue,
|
||||
collecTitle = Jso.Message.collecTitle,
|
||||
location = Jso.Message.location,
|
||||
itemlocationoffset = Jso.Message.itemlocationoffset,
|
||||
collecID = Jso.Message.collecID,
|
||||
}
|
||||
BoxInfoArr.append(T);
|
||||
|
||||
foreach(Value in Jso.Message.pvfFileLabels) {
|
||||
if (Value.Name2.len() == 0)
|
||||
Value.Name2 = "Yosin-Team";
|
||||
if (Value.Explain.len() == 0)
|
||||
Value.Explain = " " + Jso.Message.collecName + "收集箱,所需宝珠之一。";
|
||||
ItemInfoArr.rawset(Value.Id, Value);
|
||||
}
|
||||
|
||||
MaxWheel.rawset(Jso.Message.collecID, Jso.Message.maxDownPull);
|
||||
}
|
||||
|
||||
//获取玩家收集箱信息
|
||||
function GetPlayerBoxInfo(BoxId) {
|
||||
local Pack = {
|
||||
op = 40001001,
|
||||
CollectionID = BoxId,
|
||||
}
|
||||
SendPack(Pack);
|
||||
}
|
||||
|
||||
//获取玩家收集箱信息回调
|
||||
function GetPlayerBoxInfoCallBack(Chunk) {
|
||||
|
||||
// Sout("收到包内容: %L", Chunk);
|
||||
local Jso = Json.Decode(Chunk);
|
||||
|
||||
local StrBuf1 = L_sq_GetStringDrawArray(Jso.Message, 300);
|
||||
local StrBuf2 = L_sq_GetStringDrawArray(Jso.Message, 356);
|
||||
if (BoxInfoArr) {
|
||||
BoxInfoArr[Jso.CollecID].collecTextS <- StrBuf1[0] + "......";
|
||||
BoxInfoArr[Jso.CollecID].collecTextM <- StrBuf2;
|
||||
}
|
||||
|
||||
PlayerBoxInfo = {};
|
||||
foreach(Value in Jso.List) {
|
||||
PlayerBoxInfo.rawset(Value, true);
|
||||
}
|
||||
|
||||
local ab = {};
|
||||
foreach(pos, value in Jso.attribute) {
|
||||
ab.rawset(pos, value / 100);
|
||||
}
|
||||
|
||||
if ("LenheartAttributesTable" in getroottable()) {
|
||||
local T = getroottable()["LenheartAttributesTable"];
|
||||
T.rawset("LenheartCollectBoxAb", ab);
|
||||
} else {
|
||||
local T = {};
|
||||
T.rawset("LenheartCollectBoxAb", ab);
|
||||
getroottable().rawset("LenheartAttributesTable", T);
|
||||
}
|
||||
}
|
||||
|
||||
MosaicItem = false;
|
||||
|
||||
function GetPlayerItemCountCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
if (Jso.Slot != -1) {
|
||||
if (!MosaicItem) {
|
||||
MosaicItem = true;
|
||||
|
||||
} else {
|
||||
MosaicItem = false;
|
||||
local T = {
|
||||
op = 40001003,
|
||||
CollectionID = 1,
|
||||
BallID = Jso.itemid,
|
||||
CollectionID = Jso.Boxid,
|
||||
}
|
||||
SendPack(T);
|
||||
local W = {
|
||||
op = 2023100806,
|
||||
itemid = Jso.itemid,
|
||||
itemcount = 1,
|
||||
}
|
||||
SendPack(W);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//获取基础信息
|
||||
function GetBaseInfo() {
|
||||
local T = {
|
||||
op = 40001005,
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
constructor() {
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
|
||||
Pack_Control.rawset(40001006, GetBaseInfoCallBack.bindenv(this));
|
||||
|
||||
Pack_Control.rawset(40001002, GetPlayerBoxInfoCallBack.bindenv(this));
|
||||
|
||||
Pack_Control.rawset(40001012, GetPlayerItemCountCallBack.bindenv(this));
|
||||
|
||||
GetBaseInfo();
|
||||
|
||||
GlobaInfo = {};
|
||||
ItemInfoArr = {};
|
||||
BoxInfoArr = [];
|
||||
MaxWheel = {};
|
||||
|
||||
GetPlayerBoxInfo(0);
|
||||
}
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
if (!Scobj) return;
|
||||
//绘制背景框
|
||||
L_sq_DrawImg("interface2/collectbox/collectboxbtn.img", 0, X, Y);
|
||||
//绘制宝珠收集箱类型
|
||||
L_sq_DrawImg(BoxInfoArr[PageSlot].collecImgName, 0, X + 7, Y + 26);
|
||||
//绘制收集箱名称
|
||||
L_sq_DrawCode(BoxInfoArr[PageSlot].collecTitle, X + 208 - LenheartTextClass.GetStringLength(BoxInfoArr[PageSlot].collecTitle) / 2, Y + 40, sq_RGBA(255, 177, 0, 250), 0, 1);
|
||||
|
||||
//绘制收集箱信息缩略
|
||||
if ("collecTextS" in BoxInfoArr[PageSlot]) L_sq_DrawCode(BoxInfoArr[PageSlot].collecTextS, X + 228 - LenheartTextClass.GetStringLength(BoxInfoArr[PageSlot].collecTextS) / 2, Y + 40 + 20, sq_RGBA(255, 242, 0, 250), 0, 1);
|
||||
//绘制详细信息书本
|
||||
L_sq_DrawImg("interface/windowcommon.img", 262, X + 208 + 132, Y + 35);
|
||||
NowDrawBoxSw = sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X + 208 + 132, Y + 35, 22, 22);
|
||||
|
||||
|
||||
|
||||
local Count = 4;
|
||||
if (BoxInfoArr.len()< 4) Count = BoxInfoArr.len();
|
||||
|
||||
for (local i = 0; i< Count; i++) {
|
||||
local FocusT = Scobj.FocusList[i];
|
||||
local Pos = i;
|
||||
local Vo = FocusT;
|
||||
// foreach(Pos, Vo in Scobj.FocusList) {
|
||||
//print(FocusT[Pos]);
|
||||
local Btn = CollectBoxPro("CollectBoxButton" + FocusT[0], X + 8, Y + 95 + (i * 72), FocusT[0].collecImgName, 102, 70, 1);
|
||||
Btn.SetRectEnble(true, "CollectBoxButtonr" + FocusT[0], X + 8, Y + 95 + (i * 72), FocusT[0].collecImgName, 2);
|
||||
Btn.SetCustomClickEnble(true, "CollectBoxButtonc" + FocusT[0], X + 8, Y + 95 + (i * 72), FocusT[0].collecImgName, 3);
|
||||
Btn.Show();
|
||||
if (Btn.isLBActive()) {
|
||||
PageSlot = FocusT[0].collecID;
|
||||
GetPlayerBoxInfo(FocusT[0].collecID);
|
||||
NowWheel = 0;
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
local NowDrawItemSw = false;
|
||||
foreach(Pos, Value in BoxInfoArr[PageSlot].ballLst) {
|
||||
setClip(X + 110, Y + 96, X + 256 + 110, Y + 283 + 96); //开始裁切
|
||||
//绘制宝珠槽
|
||||
L_sq_DrawImg(BoxInfoArr[PageSlot].collecImgName, 5, X + BoxInfoArr[PageSlot].location[(Pos * 2)], Y + BoxInfoArr[PageSlot].location[((Pos * 2) + 1)] + NowWheel);
|
||||
//绘制宝珠
|
||||
L_Sq_DrawItem(X + BoxInfoArr[PageSlot].location[(Pos * 2)] + BoxInfoArr[PageSlot].itemlocationoffset[0], Y + BoxInfoArr[PageSlot].location[((Pos * 2) + 1)] + BoxInfoArr[PageSlot].itemlocationoffset[1] + NowWheel, Value, 1, 0, 0, 0);
|
||||
|
||||
if (PlayerBoxInfo && !PlayerBoxInfo.rawin(Value)) {
|
||||
L_sq_DrawImg("interface/windowcommon.img", 157, X + BoxInfoArr[PageSlot].location[(Pos * 2)] + BoxInfoArr[PageSlot].itemlocationoffset[0], Y + BoxInfoArr[PageSlot].location[((Pos * 2) + 1)] + BoxInfoArr[PageSlot].itemlocationoffset[1] + NowWheel);
|
||||
L_sq_DrawImg("interface/windowcommon.img", 157, X + BoxInfoArr[PageSlot].location[(Pos * 2)] + BoxInfoArr[PageSlot].itemlocationoffset[0], Y + BoxInfoArr[PageSlot].location[((Pos * 2) + 1)] + BoxInfoArr[PageSlot].itemlocationoffset[1] + NowWheel);
|
||||
}
|
||||
releaseClip(); //裁切结束
|
||||
|
||||
if (IMouse.GetXPos() >= X + 108 && IMouse.GetXPos() <= X + 108 + 254 && IMouse.GetYPos() >= Y + 90 && IMouse.GetYPos() <= Y + 90 + 285) {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X + BoxInfoArr[PageSlot].location[(Pos * 2)] + BoxInfoArr[PageSlot].itemlocationoffset[0], Y + BoxInfoArr[PageSlot].location[((Pos * 2) + 1)] + BoxInfoArr[PageSlot].itemlocationoffset[1] + NowWheel, 24, 24)) {
|
||||
// ItemDrawState = true;
|
||||
NowDrawItemInfo = {};
|
||||
NowDrawItemInfo.x <- (X + 32 + BoxInfoArr[PageSlot].location[(Pos * 2)]);
|
||||
NowDrawItemInfo.y <- (Y + 18 + BoxInfoArr[PageSlot].location[((Pos * 2) + 1)] + NowWheel);
|
||||
NowDrawItemInfo.itemid <- Value;
|
||||
NowDrawItemSw = true;
|
||||
if (!PlayerBoxInfo.rawin(Value)) {
|
||||
if (getroottable()["MouseObject"].LbEvent) {
|
||||
local T = {
|
||||
op = 2023100802,
|
||||
realop = 40001012,
|
||||
itemid = Value
|
||||
Boxid = PageSlot,
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
}
|
||||
L_sq_WA(0x1b46898, 12);
|
||||
} else {
|
||||
|
||||
// ItemDrawState = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!NowDrawItemSw) {
|
||||
NowDrawItemInfo = null;
|
||||
NowDrawItemInfoObject = null;
|
||||
MosaicItem = false;
|
||||
}
|
||||
}
|
||||
|
||||
function DrawItemInfo(obj) {
|
||||
if (NowDrawItemInfo) {
|
||||
if (!NowDrawItemInfoObject) {
|
||||
NowDrawItemInfoObject = ItemInfoClass(ItemInfoArr[NowDrawItemInfo.itemid]);
|
||||
}
|
||||
NowDrawItemInfoObject.Show(NowDrawItemInfo.x + 20 - (211 / 2), NowDrawItemInfo.y - NowDrawItemInfoObject.PageLength);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function DrawBoxAbInfo(obj) {
|
||||
if (NowDrawBoxSw) {
|
||||
L_sq_DrawWindow(X + 208 + 132 - 258, Y + 35, 258, BoxInfoArr[PageSlot].collecTextM.len() * 16, "interface2/popup/popup.img", 134, 6, 12, 6, 13);
|
||||
foreach(Pos, Value in BoxInfoArr[PageSlot].collecTextM) {
|
||||
L_sq_DrawCode(Value, X + 208 + 132 - 258 + 7, Y + 35 + (Pos * 16) + 7, sq_RGBA(255, 242, 0, 250), 0, 1);
|
||||
}
|
||||
}
|
||||
if (MosaicItem) {
|
||||
L_sq_DrawWindow(IMouse.GetXPos() + 20, IMouse.GetYPos() + 20, 219, 16, "interface2/popup/popup.img", 134, 6, 12, 6, 13);
|
||||
|
||||
L_sq_DrawCode("注意:镶嵌不可恢复,确认镶嵌请再次点击。", IMouse.GetXPos() + 20 + 7, IMouse.GetYPos() + 20 + 7, sq_RGBA(255, 242, 0, 250), 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
//开启界面回调
|
||||
function OpenClassCallBack() {
|
||||
|
||||
L_NewWindows("Lenheart", 170, 0x65535);
|
||||
local W = sq_GetPopupWindowMainCotrol(170);
|
||||
W.SetVisible(false);
|
||||
W.SetEnable(false);
|
||||
|
||||
|
||||
if (BoxInfoArr.len() > 0) {
|
||||
if (BoxInfoArr.len()< 4) Scobj = ScrollControl(BoxInfoArr, 1, BoxInfoArr.len());
|
||||
else Scobj = ScrollControl(BoxInfoArr, 1, 4);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//绘制入口
|
||||
function Draw(obj) {
|
||||
if (MainState) {
|
||||
if (WindowObj) {
|
||||
|
||||
WindowObj.Show(obj);
|
||||
X = WindowObj.X;
|
||||
Y = WindowObj.Y;
|
||||
|
||||
DrawMain(obj);
|
||||
DrawItemInfo(obj);
|
||||
DrawBoxAbInfo(obj);
|
||||
} else {
|
||||
WindowObj = LenheartWindow(X, Y, 378, 387, 28); //坐标 大小 标题栏高度
|
||||
// WindowObj.DeBugMode = true;
|
||||
}
|
||||
} else {
|
||||
if (WindowObj && WindowObj.YMouseSw == false) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
WindowObj.YMouseSw = true;
|
||||
WindowObj = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
if (MainState) {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y + 90, 105, 285)) {
|
||||
if (IMouse.IsWheelUp()) {
|
||||
Scobj.M();
|
||||
}
|
||||
if (IMouse.IsWheelDown()) {
|
||||
Scobj.A();
|
||||
}
|
||||
}
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X + 108, Y + 90, 254, 285)) {
|
||||
if (IMouse.IsWheelUp()) {
|
||||
if (NowWheel<(0)) NowWheel += 15;
|
||||
}
|
||||
if (IMouse.IsWheelDown()) {
|
||||
if (NowWheel > (MaxWheel[PageSlot])) NowWheel -= 15;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (KeyPressNB.isKeyPress(48, "CollectBoxCloseKey")) {
|
||||
MainState = false;
|
||||
MosaicItem = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function CollectBox(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("CollectBoxCObj")) {
|
||||
local Cobj = CollectBoxC();
|
||||
RootTab.rawset("CollectBoxCObj", Cobj);
|
||||
EventIcon("宝珠收集箱", 119, 119, Cobj);
|
||||
} else {
|
||||
RootTab["CollectBoxCObj"].Proc(obj);
|
||||
RootTab["CollectBoxCObj"].Draw(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (getroottable().rawin("LenheartFuncTab")) {
|
||||
getroottable()["LenheartFuncTab"].rawset("CollectBoxFunc", CollectBox);
|
||||
} else {
|
||||
local T = {};
|
||||
T.rawset("CollectBoxFunc", CollectBox);
|
||||
getroottable().rawset("LenheartFuncTab", T);
|
||||
}
|
||||
|
|
@ -0,0 +1,798 @@
|
|||
/*
|
||||
文件名:DamageFont.nut
|
||||
路径:Plugins/DamageFont/DamageFont.nut
|
||||
创建日期:2023-06-25 18:00
|
||||
文件用途:伤害字体
|
||||
*/
|
||||
|
||||
//HudPro按钮类
|
||||
class DamageFontIMGPro extends BasicsDrawTool // obj -- 按钮名称 -- X坐标 -- Y坐标 -- Ani调用路径 -- 宽度 -- 高度
|
||||
{
|
||||
obj = null; //Obj对象
|
||||
State = 0; //按钮状态
|
||||
ClickEnble = false; //点击效果
|
||||
ButtonDynamic = false; //动态按钮效果
|
||||
BaseFrame = null;
|
||||
|
||||
CustomClickEnble = false; //自定义点击效果
|
||||
CustomClickAnifile = null; //自定义点击效果Ani路径
|
||||
CustomButtonName = null; //自定义点击效果名称
|
||||
CustomClickFrame = null; //自定义点击效果Ani编号
|
||||
CustomClickx = null; //自定义点击效果X坐标
|
||||
CustomClicky = null; //自定义点击效果Y坐标
|
||||
|
||||
|
||||
RectEnble = false; //悬停效果
|
||||
RectButtonName = null; //悬停名称
|
||||
RectBaseAnifile = null; //悬停Ani路径
|
||||
RectFrame = null; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = null; //悬停X坐标
|
||||
Recty = null; //悬停Y坐标
|
||||
|
||||
|
||||
ButtonName = null; //按钮名称
|
||||
x = null; //X坐标
|
||||
y = null; //Y坐标
|
||||
BaseAnifile = null; //调用Ani路径
|
||||
width = null; //可点击宽度
|
||||
length = null; //可点击高度
|
||||
|
||||
Mobj = null; //鼠标对象
|
||||
//构造函数
|
||||
constructor(gObj, gButtonName, gX, gY, gAnifile, gWidth, gLength, gBaseFrame) {
|
||||
obj = gObj;
|
||||
ButtonName = gButtonName;
|
||||
x = gX;
|
||||
y = gY;
|
||||
BaseAnifile = gAnifile;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
BaseFrame = gBaseFrame;
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
|
||||
function T_DrawStayAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomClickFrame, CustomButtonName) {
|
||||
L_sq_DrawImg(CustomClickAnifile, CustomClickFrame, CustomClickx, CustomClicky);
|
||||
}
|
||||
|
||||
//绘制按钮
|
||||
function Show() {
|
||||
if (ClickEnble) //是否开启点击效果
|
||||
{
|
||||
if (isLBDown() && State == 0) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 1; //按键进入按下状态
|
||||
++y;
|
||||
}
|
||||
if (!isLBDown() && State == 1) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 0; //按键进入弹起状态
|
||||
--y;
|
||||
}
|
||||
}
|
||||
|
||||
if (CustomClickEnble) //是否开启自定义点击效果
|
||||
{
|
||||
if (isLBDown()) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomClickFrame, CustomButtonName);
|
||||
else T_DrawDynamicAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if (RectEnble) //开启悬停效果时
|
||||
{
|
||||
if ((isInRect() && !isLBDown()) || (isInRect() && !CustomClickEnble)) //如果鼠标悬停的时候 并且没有点击的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(44);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, RectBaseAnifile, Rectx, Recty, RectFrame, RectButtonName);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
if (!isInRect()) //如果鼠标没有悬停的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(0);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, BaseAnifile, x, y, BaseFrame, ButtonName);
|
||||
else T_DrawDynamicAni(obj, BaseAnifile, x, y, ButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
//设置自定义点击效果
|
||||
function SetCustomClickEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
CustomClickEnble = bool; //自定义点击效果
|
||||
CustomClickAnifile = gAnifile; //自定义点击效果Ani路径
|
||||
CustomButtonName = gButtonName; //自定义点击效果名称
|
||||
CustomClickFrame = gFrame; //自定义点击效果Ani编号
|
||||
CustomClickx = gX; //自定义点击效果X坐标
|
||||
CustomClicky = gY; //自定义点击效果Y坐标
|
||||
}
|
||||
|
||||
//设置悬停效果
|
||||
function SetRectEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
RectEnble = bool; //悬停效果
|
||||
RectButtonName = gButtonName; //悬停名称
|
||||
RectBaseAnifile = gAnifile; //悬停Ani路径
|
||||
RectFrame = gFrame; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = gX; //悬停X坐标
|
||||
Recty = gY; //悬停Y坐标
|
||||
}
|
||||
|
||||
//设置动态按钮
|
||||
function SetClickEnble(bool) {
|
||||
ButtonDynamic = bool;
|
||||
}
|
||||
|
||||
//设置点击效果
|
||||
function SetClickEnble(bool) {
|
||||
ClickEnble = bool;
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown() {
|
||||
if (isInRect() && Mobj.Lb == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp() {
|
||||
if (isInRect() && Mobj.Lb == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
//左键单击状态
|
||||
function isLBActive() {
|
||||
if (isInRect() && Mobj.LbEvent) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
class DamageFontWindow extends BasicsDrawTool {
|
||||
//宽度
|
||||
Width = null;
|
||||
//高度
|
||||
Height = null;
|
||||
//标题高度
|
||||
TitleH = null;
|
||||
|
||||
//X坐标
|
||||
X = null;
|
||||
B_X = null;
|
||||
//Y坐标
|
||||
Y = null;
|
||||
B_Y = null;
|
||||
|
||||
YMouseSw = true;
|
||||
DeBugMode = false;
|
||||
|
||||
Mobj = null;
|
||||
M_Xpos = null;
|
||||
M_Ypos = null;
|
||||
|
||||
|
||||
constructor(gX, gY, gWidth, gHeight, gTitleH) {
|
||||
//宽度
|
||||
Width = gWidth;
|
||||
//高度
|
||||
Height = gHeight;
|
||||
//标题高度
|
||||
TitleH = gTitleH;
|
||||
|
||||
//X坐标
|
||||
X = gX;
|
||||
//Y坐标
|
||||
Y = gY;
|
||||
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
|
||||
//设定鼠标逻辑
|
||||
function LockMouse() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, Width, Height)) {
|
||||
IMouse.LockMouseClick();
|
||||
YMouseSw = false;
|
||||
} else {
|
||||
if (YMouseSw == false && sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, 0, 0, 800, 600)) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
YMouseSw = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//设定窗口拖动逻辑
|
||||
function MoveWindow() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, Width, TitleH)) {
|
||||
|
||||
if (Mobj.Lb == 1) {
|
||||
if (!M_Xpos) M_Xpos = IMouse.GetXPos(); //原始鼠标位置数据
|
||||
if (!M_Ypos) M_Ypos = IMouse.GetYPos();
|
||||
if (!B_X) B_X = X; //原始窗口位置
|
||||
if (!B_Y) B_Y = Y;
|
||||
|
||||
X = B_X - (M_Xpos - IMouse.GetXPos());
|
||||
Y = B_Y - (M_Ypos - IMouse.GetYPos());
|
||||
|
||||
} else if (Mobj.Lb == 0) {
|
||||
M_Xpos = null;
|
||||
M_Ypos = null;
|
||||
B_X = null;
|
||||
B_Y = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
if (DeBugMode) sq_DrawBox(X, Y, Width, Height, 0xffffffff);
|
||||
|
||||
//设定鼠标逻辑
|
||||
LockMouse();
|
||||
|
||||
//设定窗口拖动逻辑
|
||||
MoveWindow();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class DamageFontObjectC extends BasicsDrawTool {
|
||||
X = 0;
|
||||
Y = 0;
|
||||
IDX = null;
|
||||
UIdx = null;
|
||||
Name = null;
|
||||
ImgPath = null;
|
||||
MaxNumArr = null;
|
||||
Mobj = null; //鼠标对象
|
||||
ID = null;
|
||||
|
||||
constructor(gIdx, gName, gImgPath, gMaxNumArr, gUIdx, gId) {
|
||||
this.IDX = gIdx;
|
||||
this.Name = gName;
|
||||
this.ImgPath = gImgPath;
|
||||
this.MaxNumArr = gMaxNumArr;
|
||||
this.UIdx = gUIdx;
|
||||
this.ID = gId;
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
|
||||
//绘制
|
||||
function Show(obj, x, y) {
|
||||
X = x;
|
||||
Y = y;
|
||||
|
||||
//绘制底
|
||||
L_sq_DrawImg("interface2/skinstorage/slots.img", 0, x, y);
|
||||
//绘制伤害字体999
|
||||
// local Idx = 70;
|
||||
// if (MaxNumArr.len() >= 3) Idx = 72;
|
||||
// L_sq_DrawImg(ImgPath, Idx, x + 3, y + 26);
|
||||
L_Sq_DrawItem(X + 22, Y + 23, ID, 1, 0, 0, 0);
|
||||
//绘制盖子
|
||||
L_sq_DrawImg("interface2/skinstorage/slots.img", 2, x, y);
|
||||
//
|
||||
L_sq_DrawCode(Name, X + 84, Y + 23, sq_RGBA(178, 155, 113, 250), 0, 1);
|
||||
L_sq_DrawCode("Yosin皮肤字体", X + 84, Y + 40, sq_RGBA(255, 177, 0, 250), 0, 1);
|
||||
L_sq_DrawCode("无限制使用", X + 84, Y + 55, sq_RGBA(255, 85, 0, 250), 0, 1);
|
||||
|
||||
|
||||
//绘制选中效果
|
||||
if (getroottable()["DamageFontCObj"].FocusPrintIdx == IDX) L_sq_DrawImg("interface2/skinstorage/slots.img", 4, x, y);
|
||||
//绘制应用中
|
||||
if (getroottable()["DamageFontCObj"].NowDamageSkinIndex == IDX) L_sq_DrawImg("interface2/skinstorage/slots.img", 23, x + 290, y + 3);
|
||||
|
||||
|
||||
//绘制应用按钮
|
||||
local Button = DamageFontIMGPro(obj, "应用", x + 284, y + 26, "interface2/yosin/windowscommon.img", 56, 24, 12);
|
||||
Button.SetRectEnble(true, "应用", x + 284, y + 26, "interface2/yosin/windowscommon.img", 13);
|
||||
Button.SetCustomClickEnble(true, "应用", x + 284, y + 26, "interface2/yosin/windowscommon.img", 14);
|
||||
Button.Show();
|
||||
if (Button.isInRect()) L_sq_DrawCode("应用", Button.x + 16, Button.y + 5, sq_RGBA(231, 198, 132, 250), 0, 1);
|
||||
else L_sq_DrawCode("应用", Button.x + 16, Button.y + 5, sq_RGBA(189, 148, 99, 250), 0, 1);
|
||||
if (Button.isLBActive()) {
|
||||
local T = {
|
||||
op = 20024003,
|
||||
UseIdx = UIdx,
|
||||
}
|
||||
SendPack(T);
|
||||
getroottable()["DamageFontCObj"].NowDamageSkinIndex = IDX;
|
||||
getroottable()["DamageFontCObj"].InitDamageFont(IDX);
|
||||
}
|
||||
|
||||
if (isLBActive()) {
|
||||
getroottable()["DamageFontCObj"].FocusPrintIdx = IDX;
|
||||
getroottable()["DamageFontCObj"].InitDamageFont(IDX);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//悬停状态
|
||||
function isInRect() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, X, Y, 354, 74)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown() {
|
||||
if (isInRect() && Mobj.Lb == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp() {
|
||||
if (isInRect() && Mobj.Lb == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
//左键单击状态
|
||||
function isLBActive() {
|
||||
if (isInRect() && Mobj.LbEvent) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
class DamageFontC extends BasicsDrawTool {
|
||||
WindowObj = null; //窗口对象
|
||||
MainState = false; //主状态
|
||||
X = 6;
|
||||
Y = 6;
|
||||
|
||||
//当前字体皮肤编号
|
||||
NowDamageSkinIndex = null;
|
||||
//字体皮肤数据
|
||||
DamageSkinList = null;
|
||||
//数字伤害类型
|
||||
RealType = null;
|
||||
//滚动列表对象
|
||||
Sobj = null;
|
||||
|
||||
//最大伤害数字
|
||||
MaxDamageNumber = 999999;
|
||||
|
||||
//显示对象
|
||||
FocusPrintIdx = 0;
|
||||
//Nut白字倍率
|
||||
NutWRate = 0;
|
||||
|
||||
//获取字体列表信息
|
||||
function GetFontList() {
|
||||
local T = {
|
||||
op = 20024001,
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
//获取字体列表信息回调
|
||||
function GetFontListCallBack(Chunk) {
|
||||
// Sout("收到包 %L", Chunk);
|
||||
local Buffer = Json_STL("CheckDamageFontCObjGetBaseInfoCallBackBuffer");
|
||||
Buffer.Parse(Chunk, 0, false);
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("DamageFontCObj")) {
|
||||
local Tobj = RootTab["DamageFontCObj"];
|
||||
Tobj.DamageSkinList = null;
|
||||
Tobj.DamageSkinList = [];
|
||||
|
||||
Tobj.MaxDamageNumber = Buffer.Get("MaxDamageNumber");
|
||||
// Tobj.MaxDamageNumber = 9999;
|
||||
Tobj.NowDamageSkinIndex = Buffer.Get("UseIdx");
|
||||
Tobj.FocusPrintIdx = Buffer.Get("UseIdx");
|
||||
|
||||
for (local i = 0; i< 100; i++) {
|
||||
local gIdx = Buffer.Get("FontArray->" + i + "->gIdx");
|
||||
if (gIdx == false) break;
|
||||
local cIdx = Buffer.Get("FontArray->" + i + "->cIdx");
|
||||
local gName = Buffer.Get("FontArray->" + i + "->gName");
|
||||
local gItem = Buffer.Get("FontArray->" + i + "->itemId");
|
||||
|
||||
local gImgPath = Buffer.Get("FontArray->" + i + "->gImgPath");
|
||||
|
||||
|
||||
local gMaxNumArr = [];
|
||||
for (local z = 0; z< 100; z++) {
|
||||
local buf = Buffer.Get("FontArray->" + i + "->gMaxNumArr->" + z);
|
||||
if (!buf) break;
|
||||
gMaxNumArr.append(buf);
|
||||
}
|
||||
local gKeyMaxNumArr = [];
|
||||
for (local y = 0; y< 100; y++) {
|
||||
local buf = Buffer.Get("FontArray->" + i + "->gKeyMaxNumArr->" + y);
|
||||
if (!buf) break;
|
||||
gKeyMaxNumArr.append(buf);
|
||||
}
|
||||
local T = {
|
||||
Idx = cIdx, //伤害字体排列编号
|
||||
UIdx = gIdx, //伤害字体编号
|
||||
Name = gName, //伤害字体名称
|
||||
ImgPath = gImgPath, //Img路径
|
||||
MaxNumArr = gMaxNumArr, //普通999帧数数组
|
||||
KeyMaxNumArr = gKeyMaxNumArr, //暴击999帧数数组
|
||||
Item = gItem, //道具ID
|
||||
}
|
||||
Tobj.DamageSkinList.append(T);
|
||||
}
|
||||
Tobj.InitDamageFont(Tobj.NowDamageSkinIndex);
|
||||
Tobj.Sobj = ScrollControl(Tobj.DamageSkinList, 5, 1);
|
||||
}
|
||||
}
|
||||
|
||||
//初始化伤害字体
|
||||
function InitDamageFont(Idx) {
|
||||
if (Idx == null) {
|
||||
for (local i = 0; i< 7; i++) {
|
||||
L_sq_IntiNumberDraw("common/etc/damagefontskin/damagefont00.img", 0 + (i * 10), i);
|
||||
}
|
||||
} else {
|
||||
for (local i = 0; i< 7; i++) {
|
||||
L_sq_IntiNumberDraw(DamageSkinList[Idx].ImgPath, 0 + (i * 10), i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//初始化数字伤害类型
|
||||
function InitRealType() {
|
||||
RealType = [0, 5, 1, 5, 2, 5, 1, 2, 3, 5, 4, 5, 3, 5, 4, 5, 0, 5, 4, 5, 2, 5, 4];
|
||||
// //白字
|
||||
// RealType.rwaset(0, 0);
|
||||
// //橙字
|
||||
// RealType.rwaset(1, 1);
|
||||
// //回血 绿字
|
||||
// RealType.rwaset(7, 2);
|
||||
// //回蓝 蓝字
|
||||
// RealType.rwaset(8, 3);
|
||||
// //流血
|
||||
// RealType.rwaset(34, 4);
|
||||
|
||||
}
|
||||
|
||||
constructor() {
|
||||
Pack_Control.rawset(20024002, GetFontListCallBack);
|
||||
|
||||
//初始化伤害类型
|
||||
InitRealType();
|
||||
|
||||
DamageFontArray = {};
|
||||
DamageSkinList = [];
|
||||
|
||||
local T = {
|
||||
Idx = 0, //伤害字体排列编号
|
||||
UIdx = 0, //伤害字体编号
|
||||
Name = "默认伤害字体", //伤害字体名称
|
||||
ImgPath = "common/etc/damagefontskin/damagefont00.img", //Img路径
|
||||
MaxNumArr = [73, 72], //普通999帧数数组
|
||||
KeyMaxNumArr = [71, 70], //暴击999帧数数组
|
||||
Item = 19880400, //道具ID
|
||||
}
|
||||
DamageSkinList.append(T);
|
||||
|
||||
//初始化伤害字体
|
||||
InitDamageFont(NowDamageSkinIndex);
|
||||
|
||||
//获取字体列表信息
|
||||
GetFontList();
|
||||
}
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
//绘制窗口
|
||||
L_sq_DrawImg("interface2/skinstorage/skinstorage.img", 0, X, Y);
|
||||
//绘制字体排列窗口
|
||||
L_sq_DrawImg("interface2/skinstorage/skinstorage.img", 5, X + 421 - 9, Y + 108 - 67);
|
||||
|
||||
//总览
|
||||
L_sq_DrawImg("interface2/skinstorage/tab/tab_summary.img", 3, X + 421 - 8, Y + 46 - 8);
|
||||
//边框
|
||||
L_sq_DrawImg("interface2/skinstorage/tab/tab_partyframe.img", 3, X + 487 - 8, Y + 46 - 8);
|
||||
//伤害字体
|
||||
L_sq_DrawImg("interface2/skinstorage/tab/tab_damagefonts.img", 2, X + 533 + 4, Y + 42 - 3);
|
||||
//觉醒插图
|
||||
L_sq_DrawImg("interface2/skinstorage/tab/tab_cutscene.img", 3, X + 609 - 7, Y + 52 - 14);
|
||||
//表情
|
||||
L_sq_DrawImg("interface2/skinstorage/tab/tab_instantemoticon.img", 3, X + 674 - 16, Y + 49 - 11);
|
||||
//表情
|
||||
L_sq_DrawImg("interface2/skinstorage/tab/tab_weaponlook.img", 3, X + 722 - 7, Y + 55 - 17);
|
||||
|
||||
|
||||
|
||||
if (Sobj) {
|
||||
foreach(Pos, v in Sobj.FocusList[0]) {
|
||||
local Dobj = DamageFontObjectC(v.Idx, v.Name, v.ImgPath, v.MaxNumArr, v.UIdx, v.Item);
|
||||
Dobj.Show(obj, X + 425, Y + 114 + (Pos * 85));
|
||||
}
|
||||
L_sq_DrawCode((Sobj.Controller.Value + 1).tostring(), X + 586, Y + 537, sq_RGBA(150, 255, 30, 250), 0, 1);
|
||||
L_sq_DrawCode(" / " + (Sobj.Controller.MaxValue + 1).tostring(), X + 586, Y + 537, sq_RGBA(150, 255, 30, 250), 0, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
local chr = sq_GetCNRDObjectToSQRCharacter(obj);
|
||||
local charAni = chr.sq_GetStayAni();
|
||||
sq_AnimationProc(charAni);
|
||||
sq_drawCurrentFrame(charAni, X + 210, Y + 364, false);
|
||||
|
||||
local MonsterAni = T_DrawDynamicAni_Fx(obj, "monster/goblin/animation_goblin2/down.ani", X + 360, Y + 364, "伤害字体哥布林倒地");
|
||||
local NeArray = TryGetArry(1);
|
||||
if (sq_GetCurrentTime(MonsterAni) >= 1000 && NeArray.len() == 0) {
|
||||
local Timer = TimeSTL("演示字体" + FontIdx, 2000);
|
||||
Timer.Reset();
|
||||
Timer.Start();
|
||||
local T = {
|
||||
Idx = "演示字体" + FontIdx,
|
||||
XPos = X + 166,
|
||||
YPos = Y + 230,
|
||||
DamageNum = 999999999,
|
||||
Type = 5,
|
||||
TimeObj = Timer,
|
||||
isKeyHit = false,
|
||||
}
|
||||
NeArray.append(T);
|
||||
DamageFontArray.rawset(1, NeArray);
|
||||
sq_Rewind(MonsterAni);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//开启界面回调
|
||||
function OpenClassCallBack() {
|
||||
|
||||
L_NewWindows("Lenheart", 170, 0x65535);
|
||||
local W = sq_GetPopupWindowMainCotrol(170);
|
||||
W.SetVisible(false);
|
||||
W.SetEnable(false);
|
||||
if (sq_GetMapIndex(sq_GetGlobaludpModuleStage()) >= 0) MainState = false;
|
||||
//获取字体列表信息
|
||||
GetFontList();
|
||||
if (DamageSkinList.len() > 0) Sobj = ScrollControl(DamageSkinList, 5, 1);
|
||||
}
|
||||
|
||||
//绘制入口
|
||||
function Draw(obj) {
|
||||
|
||||
if (MainState) {
|
||||
if (WindowObj) {
|
||||
DrawMain(obj);
|
||||
WindowObj.Show(obj);
|
||||
X = WindowObj.X;
|
||||
Y = WindowObj.Y;
|
||||
} else {
|
||||
WindowObj = DamageFontWindow(X, Y, 788, 576, 28); //坐标 大小 标题栏高度
|
||||
//WindowObj.DeBugMode = true;
|
||||
}
|
||||
} else {
|
||||
if (WindowObj && WindowObj.YMouseSw == false) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
WindowObj.YMouseSw = true;
|
||||
WindowObj = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//绘制字体
|
||||
if (sq_GetCurrentModuleType() == 3 || MainState) DrawFont(obj);
|
||||
//回到城镇清空字体数组
|
||||
else {
|
||||
DamageFontArray = null;
|
||||
DamageFontArray = {};
|
||||
MapBaseXPos = 0;
|
||||
MapBaseYPos = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//设置NUT白字
|
||||
function SetNutRate() {
|
||||
// local allRate = 1.0;
|
||||
// for (local i = 1; i < 41; i++) {
|
||||
// allRate = allRate * (sq_GetIntData(obj, 169, i) / 100).tofloat();
|
||||
// }
|
||||
// for (local w = 1; w < 21; w++) {
|
||||
// allRate = allRate * (sq_GetIntData(obj, 174, w) / 100).tofloat();
|
||||
// }
|
||||
NutWRate = 1.0;
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
if (KeyPressNB.isKeyPress(48, "DamageFontCloseKey")) {
|
||||
MainState = false;
|
||||
}
|
||||
if (MainState) {
|
||||
if (IMouse.IsWheelUp()) {
|
||||
Sobj.M();
|
||||
}
|
||||
if (IMouse.IsWheelDown()) {
|
||||
Sobj.A();
|
||||
}
|
||||
}
|
||||
|
||||
//设置地图原点
|
||||
SetMapBasePos(obj);
|
||||
//设置NUT白字
|
||||
SetNutRate();
|
||||
}
|
||||
|
||||
FontIdx = 0;
|
||||
MapBaseXPos = 0;
|
||||
MapBaseYPos = 0;
|
||||
DamageFontArray = null;
|
||||
|
||||
//设置地图原点
|
||||
function SetMapBasePos(obj) {
|
||||
local objectManager = obj.getObjectManager();
|
||||
if (!objectManager) return;
|
||||
MapBaseXPos = objectManager.getFieldXPos(0, ENUM_DRAWLAYER_NORMAL);
|
||||
MapBaseYPos = objectManager.getFieldYPos(0, 0, ENUM_DRAWLAYER_NORMAL);
|
||||
}
|
||||
|
||||
function TryGetArry(Type) {
|
||||
if (DamageFontArray.rawin(Type)) return DamageFontArray[Type];
|
||||
else return [];
|
||||
}
|
||||
|
||||
|
||||
//将伤害字体数据Push进数组
|
||||
function PushDamageFontArray(ObjAddress, X, Y, Z, Value, Type) {
|
||||
local Timer = TimeSTL("DamageFontTimer" + ObjAddress + FontIdx, 2000);
|
||||
Timer.Reset();
|
||||
Timer.Start();
|
||||
local gRealType;
|
||||
if (Type <= 7) gRealType = RealType[Type];
|
||||
else gRealType = RealType[((Type - 7) % 16) + 7];
|
||||
//暴击
|
||||
local KeyHit = false;
|
||||
if (Type == 17) KeyHit = true;
|
||||
//是扣血还是回血
|
||||
if (Type == 7) {
|
||||
if (Value< 0) gRealType = 4;
|
||||
}
|
||||
if (Type == 4) {
|
||||
if (Value< 0) gRealType = 0;
|
||||
}
|
||||
if (Type == 1 || Type == 17) {
|
||||
local oldDamageNum = Value;
|
||||
Value = (Value / NutWRate).tointeger();
|
||||
local newDamageNum = oldDamageNum - Value;
|
||||
local NeArray = TryGetArry(Type);
|
||||
local Timer = TimeSTL("WDamageFontTimer" + ObjAddress + FontIdx, 2000);
|
||||
Timer.Reset();
|
||||
Timer.Start();
|
||||
local T = {
|
||||
Idx = ObjAddress + FontIdx,
|
||||
XPos = X,
|
||||
YPos = Y - Z - (NeArray.len() * 6),
|
||||
DamageNum = Value,
|
||||
Type = 0,
|
||||
TimeObj = Timer,
|
||||
isKeyHit = KeyHit,
|
||||
}
|
||||
NeArray.append(T);
|
||||
DamageFontArray.rawset(Type, NeArray);
|
||||
++FontIdx;
|
||||
}
|
||||
local NeArray = TryGetArry(Type);
|
||||
local T = {
|
||||
Idx = ObjAddress + FontIdx,
|
||||
XPos = X,
|
||||
YPos = Y - Z - (NeArray.len() * 6),
|
||||
DamageNum = Value,
|
||||
Type = gRealType,
|
||||
TimeObj = Timer,
|
||||
isKeyHit = KeyHit,
|
||||
}
|
||||
NeArray.append(T);
|
||||
DamageFontArray.rawset(Type, NeArray);
|
||||
++FontIdx;
|
||||
}
|
||||
|
||||
function DrawFontImg(X, Y, Type, DamageNum, Time, isKeyHit) {
|
||||
local rate = sq_GetUniformVelocity(60, 100, Time, 100);
|
||||
rate = rate.tofloat() / 100.0;
|
||||
//如果暴击
|
||||
if (isKeyHit) {
|
||||
rate *= 1.3;
|
||||
Type = 4;
|
||||
}
|
||||
//白字
|
||||
if (Type == 0) {
|
||||
rate *= 0.7;
|
||||
Y += 60;
|
||||
}
|
||||
local UpOffset = 0;
|
||||
//超过0.3秒开始飘
|
||||
if (Time >= 600) {
|
||||
UpOffset = sq_GetUniformVelocity(0, 30, Time - 600, 500);
|
||||
}
|
||||
if (DamageNum > MaxDamageNumber) {
|
||||
if (isKeyHit) {
|
||||
foreach(imgpos in DamageSkinList[FocusPrintIdx].KeyMaxNumArr) {
|
||||
L_sq_DrawImg(DamageSkinList[FocusPrintIdx].ImgPath, imgpos, X + ((30 * (MaxDamageNumber.tostring().len())) - ((20 * (MaxDamageNumber.tostring().len())) * rate)), Y + (20 - (20 * rate)) - UpOffset, 0, sq_RGBA(255, 255, 255, 255 - (UpOffset * 8)), rate, rate);
|
||||
}
|
||||
} else {
|
||||
foreach(imgpos in DamageSkinList[FocusPrintIdx].MaxNumArr) {
|
||||
L_sq_DrawImg(DamageSkinList[FocusPrintIdx].ImgPath, imgpos, X + ((30 * (MaxDamageNumber.tostring().len())) - ((20 * (MaxDamageNumber.tostring().len())) * rate)), Y + (20 - (20 * rate)) - UpOffset, 0, sq_RGBA(255, 255, 255, 255 - (UpOffset * 8)), rate, rate);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
L_sq_DrawNumber(X + ((30 * (DamageNum.tostring().len())) - ((20 * (DamageNum.tostring().len())) * rate)), Y + (20 - (20 * rate)) - UpOffset, sq_RGBA(255, 255, 255, 255 - (UpOffset * 8)), rate, rate, Type, 18 * rate, 6, sq_Abs(DamageNum));
|
||||
}
|
||||
}
|
||||
|
||||
//伤害字体绘制
|
||||
function DrawFont(obj) {
|
||||
foreach(Type, FontArrayObject in DamageFontArray) {
|
||||
if (Type == 0) continue;
|
||||
for (local i = 0; i< FontArrayObject.len(); i++) {
|
||||
local FontObject = FontArrayObject[i];
|
||||
if (FontObject) {
|
||||
local Timer = FontObject.TimeObj;
|
||||
if (Timer) {
|
||||
local Time = Timer.Get();
|
||||
if (Time >= 1100) {
|
||||
FontObject.TimeObj.Delete();
|
||||
FontObject.TimeObj = null;
|
||||
FontArrayObject.remove(i);
|
||||
continue;
|
||||
} else {
|
||||
DrawFontImg(FontObject.XPos - MapBaseXPos, FontObject.YPos - MapBaseYPos, FontObject.Type, FontObject.DamageNum, Time, FontObject.isKeyHit);
|
||||
//L_sq_DrawCode(FontObject.DamageNum.tostring(), FontObject.XPos - MapBaseXPos, FontObject.YPos - (Time / 100) - MapBaseYPos, sq_RGBA(255, 255, 184, 250), 0, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//白字
|
||||
foreach(Type, FontArrayObject in DamageFontArray) {
|
||||
if (Type != 0) break;
|
||||
for (local i = 0; i< FontArrayObject.len(); i++) {
|
||||
local FontObject = FontArrayObject[i];
|
||||
if (FontObject) {
|
||||
local Timer = FontObject.TimeObj;
|
||||
if (Timer) {
|
||||
local Time = Timer.Get();
|
||||
if (Time >= 1100) {
|
||||
FontObject.TimeObj.Delete();
|
||||
FontObject.TimeObj = null;
|
||||
FontArrayObject.remove(i);
|
||||
continue;
|
||||
} else {
|
||||
DrawFontImg(FontObject.XPos - MapBaseXPos, FontObject.YPos - MapBaseYPos, FontObject.Type, FontObject.DamageNum, Time, FontObject.isKeyHit);
|
||||
//L_sq_DrawCode(FontObject.DamageNum.tostring(), FontObject.XPos - MapBaseXPos, FontObject.YPos - (Time / 100) - MapBaseYPos, sq_RGBA(255, 255, 184, 250), 0, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function T_DrawDynamicAni_Fx(obj, aniFileName, x, y, aniname) {
|
||||
local ani = obj.getVar().GetAnimationMap(aniname, aniFileName);
|
||||
ani.setImageRateFromOriginal(-1.0, 1.0);
|
||||
sq_AnimationProc(ani);
|
||||
sq_drawCurrentFrame(ani, x, y, true);
|
||||
return ani;
|
||||
}
|
||||
}
|
||||
|
||||
function DamageFont(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("DamageFontCObj")) {
|
||||
local Cobj = DamageFontC();
|
||||
RootTab.rawset("DamageFontCObj", Cobj);
|
||||
EventIcon("皮肤仓库", 70, 70, Cobj);
|
||||
} else {
|
||||
RootTab["DamageFontCObj"].Proc(obj);
|
||||
RootTab["DamageFontCObj"].Draw(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Sq_PushDamageFontData(ObjAddress, X, Y, Z, Value, Type) {
|
||||
// Sout("对象地址: %L", ObjAddress);
|
||||
// Sout("X坐标: %L", X);
|
||||
// Sout("Y坐标: %L", Y);
|
||||
// Sout("Z坐标: %L", Z);
|
||||
// Sout("伤害数值: %L", Value);
|
||||
// Sout("伤害类型: %L", Type);
|
||||
|
||||
getroottable()["DamageFontCObj"].PushDamageFontArray(ObjAddress, X - 100, Y, Z, Value, Type);
|
||||
}
|
||||
|
|
@ -0,0 +1,739 @@
|
|||
DB <- null
|
||||
BoxStetu <- 0 //????????
|
||||
Box_Redom_Model <- 0 //?????<3F><>???
|
||||
Box_Open_Stetu <- 0 //?????????
|
||||
|
||||
class DargonBoxButton // obj -- 按钮名称 -- 鼠标对象 -- X坐标 -- Y坐标 -- 宽度 -- 高度 -- Ani调用路径 -- Ani宽度 -- Ani高度 -- AniRGB --
|
||||
{
|
||||
obj = null;
|
||||
buttonName = null;
|
||||
IMouse = null;
|
||||
x = null;
|
||||
y = null;
|
||||
width = null;
|
||||
length = null;
|
||||
aniFileName = null;
|
||||
BoxStetu = null;
|
||||
|
||||
constructor(gObj, gButtonName, gIMouse, gX, gY, gWidth, gLength, ganiFileName) {
|
||||
obj = gObj;
|
||||
buttonName = gButtonName;
|
||||
IMouse = gIMouse;
|
||||
x = gX;
|
||||
y = gY;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
aniFileName = ganiFileName;
|
||||
BoxStetu = BoxStetu;
|
||||
}
|
||||
|
||||
function drawButtonImage() {
|
||||
if (isDown())
|
||||
y++;
|
||||
|
||||
if (isInRect()) {
|
||||
local buttonAniEff = obj.getVar().GetAnimationMap(buttonName + "rect", aniFileName.tostring() + "_2.ani");
|
||||
sq_AnimationProc(buttonAniEff);
|
||||
sq_drawCurrentFrame(buttonAniEff, x, y, true);
|
||||
}
|
||||
if (!isInRect()) {
|
||||
local buttonAni = obj.getVar().GetAnimationMap(buttonName, aniFileName.tostring() + "_1.ani");
|
||||
sq_AnimationProc(buttonAni);
|
||||
sq_drawCurrentFrame(buttonAni, x, y, true);
|
||||
}
|
||||
}
|
||||
|
||||
function isInRect() {
|
||||
local mouseX = IMouse.GetXPos();
|
||||
local mouseY = IMouse.GetYPos();
|
||||
if (sq_IsIntersectRect(mouseX, mouseY, 5, 5, x, y, width, length))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function isDown() {
|
||||
if (isInRect() && IMouse.IsLBDown()) {
|
||||
obj.getVar(buttonName).setBool(0, true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function isActive() {
|
||||
if (isInRect() && IMouse.IsLBUp() && obj.getVar(buttonName).getBool(0)) {
|
||||
obj.getVar(buttonName).setBool(0, false);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class DarBox {
|
||||
DragonboxJson = null; //龙盒Json对象
|
||||
op = null; //回调包活动状态
|
||||
Rest = 0; //重置值
|
||||
Box_Index = null; //盒子的编号
|
||||
BoxDoselect = null; //抽奖次数
|
||||
|
||||
thisname = null; //对象名称
|
||||
State = 0; //龙盒状态
|
||||
err = 0; //错误信息
|
||||
lucky_value = 0; //幸运值
|
||||
box_num = 0; //盒子数量
|
||||
|
||||
GradeAni = null; //开盒子的Ani
|
||||
BoxEffAni = null; //开盒子的背景Ani
|
||||
OneBoxAni = null; //单抽 盒子 Ani
|
||||
OneBoxAniEff = null; //单抽 Eff
|
||||
OneBoxSound = 0; //单抽盒子音效
|
||||
OneBoxEffSound = 0; //单抽盒子音效
|
||||
OneSyncPack = 0; //单抽同步状态
|
||||
|
||||
|
||||
TenGradeAni = [];
|
||||
TenBoxEffAni = [];
|
||||
TenBoxAniArr = []; //十连抽盒子Ani数组
|
||||
TenBoxAniEffArr = []; //十连抽 Eff 数组
|
||||
TenBoxSound = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; //十连抽盒子音效
|
||||
TenBoxEffSound = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; //十连抽盒子音效
|
||||
TenSyncPack = 0;
|
||||
|
||||
ItemIndexArr = []; //定义物品编号数组
|
||||
ItemNumArr = []; //定义物品数量数组
|
||||
ItenGradeArr = []; //定义物品品级数组
|
||||
ItenName = []; //定义物品名称
|
||||
|
||||
//构造对象 对象名称 并且获取一次Model
|
||||
constructor(G_thisname) {
|
||||
thisname = G_thisname;
|
||||
DragonboxJson = Json_STL("DragonBox"); //初始化龙盒Json对象
|
||||
op = DragonboxJson.Get("op");
|
||||
|
||||
TenGradeAni.resize(10); //初始化
|
||||
TenBoxEffAni.resize(10); //初始化
|
||||
TenBoxAniArr.resize(10); //初始化
|
||||
TenBoxAniEffArr.resize(10); //初始化
|
||||
|
||||
ItemIndexArr.resize(10); //初始化
|
||||
ItemNumArr.resize(10); //初始化
|
||||
ItenGradeArr.resize(10); //初始化
|
||||
ItenName.resize(10); //初始化
|
||||
}
|
||||
|
||||
//还原对象
|
||||
function reset() {
|
||||
sq_Rewind(OneBoxAni); //还原单抽Ani
|
||||
sq_Rewind(OneBoxAniEff); //还原单抽Ani
|
||||
|
||||
for (local i = 0; i < 10; ++i) //还原十连抽Ani
|
||||
{
|
||||
sq_Rewind(TenBoxAniArr[i]);
|
||||
sq_Rewind(TenBoxAniEffArr[i]);
|
||||
|
||||
}
|
||||
|
||||
op = null; //龙盒模式
|
||||
lucky_value = 0; //幸运值
|
||||
box_num = 0; //盒子数量
|
||||
|
||||
GradeAni = null; //开盒子的Ani
|
||||
BoxEffAni = null; //开盒子的背景Ani
|
||||
OneBoxAni = null; //单抽 盒子 Ani
|
||||
OneBoxAniEff = null; //单抽 Eff
|
||||
OneSyncPack = 0; //单抽同步状态
|
||||
TenGradeAni = [];
|
||||
TenBoxEffAni = [];
|
||||
TenBoxAniArr = []; //十连抽盒子Ani数组
|
||||
TenBoxAniEffArr = []; //十连抽 Eff 数组
|
||||
TenSyncPack = 0;
|
||||
|
||||
ItemIndexArr = []; //定义物品编号数组
|
||||
ItemNumArr = []; //定义物品数量数组
|
||||
ItenGradeArr = []; //定义物品品级数组
|
||||
ItenName = []; //定义物品名称数组
|
||||
|
||||
TenGradeAni.resize(10); //初始化
|
||||
TenBoxEffAni.resize(10); //初始化
|
||||
TenBoxAniArr.resize(10); //初始化
|
||||
TenBoxAniEffArr.resize(10); //初始化
|
||||
|
||||
ItemIndexArr.resize(10); //初始化
|
||||
ItemNumArr.resize(10); //初始化
|
||||
ItenGradeArr.resize(10); //初始化
|
||||
ItenName.resize(10); //初始化
|
||||
|
||||
|
||||
BoxStetu = 0;
|
||||
Box_Redom_Model = 0; //盒子切换模式
|
||||
Box_Open_Stetu = 0; //开盒子的状态
|
||||
}
|
||||
//获取 Model 是否开盒子状态
|
||||
function GetModel() {
|
||||
op = DragonboxJson.Get("op");
|
||||
err = DragonboxJson.Get("err");
|
||||
BoxDoselect = DragonboxJson.Get("doselect");
|
||||
}
|
||||
//初始化 还原 龙盒Model
|
||||
function Model_Init() {
|
||||
Rest = 0; //还原重置值
|
||||
box_num = DragonboxJson.Get("boxnum");
|
||||
lucky_value = DragonboxJson.Get("lucky_value");
|
||||
Box_Index = DragonboxJson.Get("itemindex");
|
||||
}
|
||||
//绘制数字
|
||||
function DrawNumberAni(obj, xPos, yPos, num, str, Interval, OneDeviation) {
|
||||
local len = (num.tostring()).len();
|
||||
for (local i = 0; i < len; i++) {
|
||||
local one = 0;
|
||||
local DrawNum = (num.tostring()).slice(i, i + 1);
|
||||
if (i != (len - 1)) one += OneDeviation * abs(i - (len - 1));
|
||||
local ani = obj.getVar().GetAnimationMap("db" + DrawNum + str, str + DrawNum + ".ani");
|
||||
sq_AnimationProc(ani);
|
||||
sq_drawCurrentFrame(ani, xPos + (i * Interval) + one, yPos, true);
|
||||
}
|
||||
}
|
||||
|
||||
//绘制幸运值
|
||||
function DrawLucky(obj, x, y, type) {
|
||||
switch (type) {
|
||||
case 0:
|
||||
local ani = obj.getVar().GetAnimationMap("DrawLucky", "common/dargonbox/animation/db_newani_bd.ani");
|
||||
sq_AnimationProc(ani);
|
||||
sq_DrawSpecificFrame(ani, x, y, false, lucky_value, false, 1.0);
|
||||
break;
|
||||
case 1:
|
||||
DrawAni(obj, "common/dargonbox/animation/gauge_normal.ani", x - 33, y - 42);
|
||||
break;
|
||||
}
|
||||
DrawNumberAni(obj, x + 54, y + 68, lucky_value, "common/dargonbox/lucky/db_bdnum_", 10, -2);
|
||||
local Offset;
|
||||
if (lucky_value < 10) Offset = 0;
|
||||
if (lucky_value >= 10 && lucky_value < 100) Offset = 10;
|
||||
if (lucky_value == 100) Offset = 20;
|
||||
DrawAni(obj, "common/dargonbox/lucky/db_bdnum_%.ani", x + 65 + Offset, y + 67);
|
||||
}
|
||||
//绘制图像
|
||||
function DrawAni(obj, aniFileName, x, y) {
|
||||
local ani = obj.getVar().GetAnimationMap("aniname" + aniFileName, aniFileName);
|
||||
sq_AnimationProc(ani);
|
||||
sq_drawCurrentFrame(ani, x, y, true);
|
||||
return ani;
|
||||
}
|
||||
//绘制盒子图像
|
||||
function DrawBoxAni(obj, aniname, aniFileName, x, y) {
|
||||
local ani = obj.getVar().GetAnimationMap(aniname, aniFileName);
|
||||
sq_AnimationProc(ani);
|
||||
sq_drawCurrentFrame(ani, x, y, true);
|
||||
return ani;
|
||||
}
|
||||
//绘制动态可选是否循环Ani
|
||||
function DatgonBoxDrawDynamicAni(obj, aniFileName, x, y, Loop) {
|
||||
local ani = DrawAni(obj, aniFileName, x, y);
|
||||
if (sq_IsEnd(ani) && Loop) {
|
||||
sq_Rewind(ani);
|
||||
}
|
||||
return ani;
|
||||
}
|
||||
|
||||
//绘制打开盖子动画
|
||||
function DargonBoxOpenAni(obj, aniFileName, x, y) {
|
||||
local ani = DrawAni(obj, aniFileName, x, y);
|
||||
if (sq_GetAnimationFrameIndex(ani) == 1) {
|
||||
obj.sq_PlaySound("ANCIENTBOX_WHEEL");
|
||||
}
|
||||
if (sq_IsEnd(ani)) {
|
||||
Box_Redom_Model = 2; //盒子切换模式 变为2 可以抽奖状态
|
||||
sq_Rewind(ani);
|
||||
}
|
||||
return ani;
|
||||
}
|
||||
//绘制关闭盖子动画
|
||||
function DargonBoxCloseAni(obj, aniFileName, x, y) {
|
||||
local ani = DrawAni(obj, aniFileName, x, y);
|
||||
|
||||
if (sq_IsEnd(ani)) {
|
||||
Box_Redom_Model = 1; //关闭盖子以后吧 模式切换为1 播放打开盖子
|
||||
sq_Rewind(ani);
|
||||
}
|
||||
return ani;
|
||||
}
|
||||
//设置龙盒 切换模式
|
||||
function SelectRedomModel() {
|
||||
if (Box_Redom_Model == 0)
|
||||
Box_Redom_Model = 1;
|
||||
else if (Box_Redom_Model == 2)
|
||||
Box_Redom_Model = 3;
|
||||
}
|
||||
|
||||
|
||||
//判断 并还原单抽Ani
|
||||
function RewindOpenDargonBox(obj) {
|
||||
if (OneBoxAni == null || OneBoxAniEff == null) return true;
|
||||
//如果 Ani播放完了可以重置 或者是 都没有播放也可以重置
|
||||
if ((sq_IsEnd(OneBoxAni) && sq_IsEnd(OneBoxAniEff))) {
|
||||
sq_Rewind(OneBoxAni);
|
||||
OneBoxSound = 0; //还原音效判断
|
||||
sq_Rewind(OneBoxAniEff);
|
||||
OneBoxEffSound = 0;
|
||||
}
|
||||
if ((sq_GetAnimationFrameIndex(OneBoxAni) == -1 && sq_GetAnimationFrameIndex(OneBoxAniEff) == -1)) {
|
||||
OneSyncPack = 0;
|
||||
return true;
|
||||
} else return false;
|
||||
}
|
||||
|
||||
//判断 并还原十连抽Ani
|
||||
function RewindTenOpenDargonBox(obj) {
|
||||
local num = 0;
|
||||
for (local i = 0; i < 10; ++i) {
|
||||
if (TenBoxAniArr[i] == null || TenBoxAniEffArr[i] == null) return true;
|
||||
//如果 Ani播放完了可以重置 或者是 都没有播放也可以重置
|
||||
if ((sq_IsEnd(TenBoxAniArr[i]) && sq_IsEnd(TenBoxAniArr[i]))) {
|
||||
num++;
|
||||
}
|
||||
}
|
||||
if (num != 10) return false;
|
||||
|
||||
for (local i = 0; i < 10; ++i) {
|
||||
sq_Rewind(TenBoxAniArr[i]);
|
||||
TenBoxSound[i] = 0;
|
||||
sq_Rewind(TenBoxAniEffArr[i]);
|
||||
TenBoxEffSound[i] = 0;
|
||||
}
|
||||
TenSyncPack = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
//绘制 单抽 动画 和奖励
|
||||
function OneOpenDargonBox(obj, X_Pos, Y_Pos) {
|
||||
GetModel();
|
||||
if (op != 4 || BoxDoselect != 1) return; //不是单抽就返回
|
||||
local ItemIndex = DragonboxJson.Get("result->0->item");
|
||||
local ItemNum = DragonboxJson.Get("result->0->num");
|
||||
local ItemGrade = DragonboxJson.Get("result->0->grade");
|
||||
local ItemName = DragonboxJson.Get("result->0->itemname");
|
||||
lucky_value = DragonboxJson.Get("lucky_value");
|
||||
box_num = DragonboxJson.Get("boxnum");
|
||||
switch (OneSyncPack) {
|
||||
case 0:
|
||||
OneSyncPack = 1;
|
||||
return; //返回 下一次进来继续判断 是否已经同步了最新的包
|
||||
break;
|
||||
case 1:
|
||||
switch (ItemGrade) //判断品级给随机渲染动画
|
||||
{
|
||||
case 0:
|
||||
GradeAni = "box_b";
|
||||
BoxEffAni = "b";
|
||||
break;
|
||||
case 1:
|
||||
GradeAni = "box_a";
|
||||
BoxEffAni = "a";
|
||||
break;
|
||||
case 2:
|
||||
switch (sq_getRandom(0, 2)) {
|
||||
case 0:
|
||||
GradeAni = "box_b_s";
|
||||
break;
|
||||
case 1:
|
||||
GradeAni = "box_a_s";
|
||||
break;
|
||||
case 2:
|
||||
GradeAni = "box_s";
|
||||
break;
|
||||
}
|
||||
BoxEffAni = "s";
|
||||
break;
|
||||
case 3:
|
||||
switch (sq_getRandom(0, 3)) {
|
||||
case 0:
|
||||
GradeAni = "box_b_ss";
|
||||
break;
|
||||
case 1:
|
||||
GradeAni = "box_a_ss";
|
||||
break;
|
||||
case 2:
|
||||
GradeAni = "box_s_ss";
|
||||
break;
|
||||
case 3:
|
||||
GradeAni = "box_ss";
|
||||
break;
|
||||
}
|
||||
BoxEffAni = "ss";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
OneSyncPack = 2; //设定一次渲染值以后就写到2号同步状态 即只绘制 不在 设定
|
||||
break;
|
||||
case 2: //可以开始绘制
|
||||
X_Pos += 222; //增加盒子和特效的偏移
|
||||
Y_Pos += 42;
|
||||
OneBoxAni = DrawBoxAni(obj, "OneBoxAni" + GradeAni, "common/dargonbox/animation/" + GradeAni + ".ani", X_Pos + 14, Y_Pos + 35); //盒子Ani
|
||||
if (sq_GetAnimationFrameIndex(OneBoxAni) == 1 && OneBoxSound == 0) {
|
||||
local str = GradeAni;
|
||||
local len = str.len();
|
||||
str = str.slice(4, len);
|
||||
str = "ANCIENTBOX_OPEN_" + str;
|
||||
obj.sq_PlaySound(str);
|
||||
OneBoxSound = 1;
|
||||
}
|
||||
local Item_Offset_X = 56; //增加物品特效的偏移
|
||||
local Item_Offset_Y = 123;
|
||||
if (sq_GetCurrentTime(OneBoxAni) > (OneBoxAni.getDelaySum(false) * 0.9).tointeger()) //盒子动画在超过百分之90的时候绘制物品特效
|
||||
{
|
||||
DatgonBoxDrawDynamicAni(obj, "common/dargonbox/animation/item_" + BoxEffAni + "_loop.ani", X_Pos + 14 + Item_Offset_X, Y_Pos + 35 + Item_Offset_Y, true); //LoopEffAni
|
||||
//DrawBoxAni(obj, "Item" + ItemIndex, "common/dargonbox/item/db_item_" + ItemIndex + ".ani", X_Pos + 25 + Item_Offset_X, Y_Pos + 47 + Item_Offset_Y); //物品Ani
|
||||
//DrawNumberAni(obj, X_Pos + 30 + Item_Offset_X, Y_Pos + 67 + Item_Offset_Y, ItemNum, "common/dargonbox/num/db_num_", 6, 0); //物品数量
|
||||
|
||||
L_Sq_DrawItem(X_Pos + 28 + Item_Offset_X, Y_Pos + 47 + Item_Offset_Y + 3, ItemIndex, ItemNum, 0, 0, 0);
|
||||
local CodeColor;
|
||||
switch (ItemGrade) {
|
||||
case 0:
|
||||
CodeColor = 0xFFEDD568;
|
||||
break;
|
||||
case 1:
|
||||
CodeColor = 0xFFFF6BB3;
|
||||
break;
|
||||
case 2:
|
||||
CodeColor = 0xFFF000FF;
|
||||
break;
|
||||
case 3:
|
||||
CodeColor = 0xFF00B1FF;
|
||||
break;
|
||||
}
|
||||
L_sq_DrawCode(ItemName, X_Pos + 28 + Item_Offset_X + 71, Y_Pos + 47 + Item_Offset_Y + 11, CodeColor, 0, 1);
|
||||
OneBoxAniEff = DrawBoxAni(obj, "OneBoxAniEff" + BoxEffAni, "common/dargonbox/animation/item_" + BoxEffAni + "_start.ani", X_Pos + 14 + Item_Offset_X, Y_Pos + 35 + Item_Offset_Y); //EffAni
|
||||
if (sq_GetAnimationFrameIndex(OneBoxAniEff) == 1 && OneBoxEffSound == 0) {
|
||||
local str = GradeAni;
|
||||
local len = str.len();
|
||||
str = str.slice(4, len);
|
||||
str = "ANCIENTBOX_RESULT_" + str;
|
||||
obj.sq_PlaySound(str);
|
||||
OneBoxEffSound = 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//绘制 十连抽 动画 和奖励
|
||||
function TenOpenDargonBox(obj, X_Pos, Y_Pos) {
|
||||
GetModel();
|
||||
if (op != 4 || BoxDoselect != 10) return; //不是十连抽就返回
|
||||
switch (TenSyncPack) {
|
||||
case 0:
|
||||
TenSyncPack = 1;
|
||||
lucky_value = DragonboxJson.Get("lucky_value");
|
||||
box_num = DragonboxJson.Get("boxnum");
|
||||
return; //返回 下一次进来继续判断 是否已经同步了最新的包
|
||||
break;
|
||||
case 1:
|
||||
for (local i = 0; i < 10; ++i) {
|
||||
ItemIndexArr[i] = DragonboxJson.Get("result->" + i + "->item");
|
||||
ItemNumArr[i] = DragonboxJson.Get("result->" + i + "->num");
|
||||
ItenGradeArr[i] = DragonboxJson.Get("result->" + i + "->grade");
|
||||
ItenName[i] = DragonboxJson.Get("result->" + i + "->itemname");
|
||||
switch (ItenGradeArr[i]) {
|
||||
case 0:
|
||||
TenGradeAni[i] = "box_b";
|
||||
TenBoxEffAni[i] = "b";
|
||||
break;
|
||||
case 1:
|
||||
TenGradeAni[i] = "box_a";
|
||||
TenBoxEffAni[i] = "a";
|
||||
break;
|
||||
case 2:
|
||||
switch (sq_getRandom(0, 2)) {
|
||||
case 0:
|
||||
TenGradeAni[i] = "box_b_s";
|
||||
break;
|
||||
case 1:
|
||||
TenGradeAni[i] = "box_a_s";
|
||||
break;
|
||||
case 2:
|
||||
TenGradeAni[i] = "box_s";
|
||||
break;
|
||||
}
|
||||
TenBoxEffAni[i] = "s";
|
||||
break;
|
||||
case 3:
|
||||
switch (sq_getRandom(0, 3)) {
|
||||
case 0:
|
||||
TenGradeAni[i] = "box_b_ss";
|
||||
break;
|
||||
case 1:
|
||||
TenGradeAni[i] = "box_a_ss";
|
||||
break;
|
||||
case 2:
|
||||
TenGradeAni[i] = "box_s_ss";
|
||||
break;
|
||||
case 3:
|
||||
TenGradeAni[i] = "box_ss";
|
||||
break;
|
||||
}
|
||||
TenBoxEffAni[i] = "ss";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
TenSyncPack = 2; //设定一次渲染值以后就写到2号同步状态 即只绘制 不在 设定
|
||||
break;
|
||||
case 2: //可以开始绘制
|
||||
//X_Pos += 222; //增加盒子和特效的偏移
|
||||
//Y_Pos += 42;
|
||||
local Item_Offset_X = 10; //增加物品特效的偏移
|
||||
local Item_Offset_Y = 110;
|
||||
for (local i = 0; i < 10; ++i) {
|
||||
TenBoxAniArr[i] = DrawBoxAni(obj, "TenBoxAni" + TenGradeAni[i], "common/dargonbox/animation/mini_" + TenGradeAni[i] + ".ani", X_Pos - 12 + (150 * (i % 5)), Y_Pos + 70 + (128 * (i / 5))); //盒子Ani
|
||||
if (sq_GetAnimationFrameIndex(TenBoxAniArr[i]) == 1 && TenBoxSound[i] == 0) {
|
||||
local str = TenGradeAni[i];
|
||||
local len = str.len();
|
||||
str = str.slice(4, len);
|
||||
str = "ANCIENTBOX_OPEN_" + str;
|
||||
obj.sq_PlaySound(str);
|
||||
TenBoxSound[i] = 1;
|
||||
}
|
||||
if (sq_GetCurrentTime(TenBoxAniArr[i]) > (TenBoxAniArr[i].getDelaySum(false) * 0.9).tointeger()) //盒子动画在超过百分之90的时候绘制物品特效
|
||||
{
|
||||
DatgonBoxDrawDynamicAni(obj, "common/dargonbox/animation/item_mini_" + TenBoxEffAni[i] + "_loop.ani", X_Pos + 14 + Item_Offset_X + (150 * (i % 5)), Y_Pos + 35 + Item_Offset_Y + (128 * (i / 5)), true); //LoopEffAni
|
||||
//DrawBoxAni(obj, "Ten" + "Item" + ItemIndexArr[i], "common/dargonbox/item/db_item_" + ItemIndexArr[i] + ".ani", X_Pos + 14 + Item_Offset_X + (150 * (i % 5)), Y_Pos + 35 + Item_Offset_Y + (128 * (i / 5))); //物品Ani
|
||||
//DrawNumberAni(obj, X_Pos + 19 + Item_Offset_X + (150 * (i % 5)), Y_Pos + 55 + Item_Offset_Y + (128 * (i / 5)), ItemNumArr[i], "common/dargonbox/num/db_num_", 6, 0); //物品数量
|
||||
L_Sq_DrawItem(X_Pos + 17 + Item_Offset_X + (150 * (i % 5)), Y_Pos + 38 + Item_Offset_Y + (128 * (i / 5)), ItemIndexArr[i], ItemNumArr[i], 0, 0, 0);
|
||||
local CodeColor;
|
||||
switch (ItenGradeArr[i]) {
|
||||
case 0:
|
||||
CodeColor = 0xFFEDD568;
|
||||
break;
|
||||
case 1:
|
||||
CodeColor = 0xFFFF6BB3;
|
||||
break;
|
||||
case 2:
|
||||
CodeColor = 0xFFF000FF;
|
||||
break;
|
||||
case 3:
|
||||
CodeColor = 0xFF00B1FF;
|
||||
break;
|
||||
}
|
||||
L_sq_DrawCode(ItenName[i], X_Pos + 17 + Item_Offset_X + (150 * (i % 5)) + 41, 9 + Y_Pos + 38 + Item_Offset_Y + (128 * (i / 5)), CodeColor, 0, 1);
|
||||
TenBoxAniEffArr[i] = DrawBoxAni(obj, "TenBoxAniEff" + TenBoxEffAni[i], "common/dargonbox/animation/item_mini_" + TenBoxEffAni[i] + "_start.ani", X_Pos + 39 + Item_Offset_X + (150 * (i % 5)), Y_Pos + 40 + Item_Offset_Y + (128 * (i / 5))); //EffAni
|
||||
if (sq_GetAnimationFrameIndex(TenBoxAniEffArr[i]) == 1 && TenBoxEffSound[i] == 0) {
|
||||
local str = TenGradeAni[i];
|
||||
local len = str.len();
|
||||
str = str.slice(4, len);
|
||||
str = "ANCIENTBOX_RESULT_" + str;
|
||||
obj.sq_PlaySound(str);
|
||||
TenBoxEffSound[i] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//运行函数
|
||||
function Run(obj) {
|
||||
local C_Main_X_Pos = 0; //龙盒 基准 X 坐标
|
||||
local C_Main_Y_Pos = 0; //龙盒 基准 Y 坐标
|
||||
|
||||
//未打开龙盒状态
|
||||
if (!sq_GetPopupWindowMainCotrol(267)) { //窗口关闭
|
||||
if (Rest == 0) //关闭后重置一次
|
||||
{
|
||||
reset(); { //恢复小地图
|
||||
local mapbox = sq_GetPopupWindowMainCotrol(176);
|
||||
if (mapbox) {
|
||||
mapbox.SetEnable(true);
|
||||
mapbox.SetVisible(true);
|
||||
}
|
||||
}
|
||||
State = 0; //龙盒状态写入关闭窗口状态
|
||||
Rest = 1;
|
||||
}
|
||||
//龙盒收包状态处理
|
||||
op = DragonboxJson.Get("op"); //得到op
|
||||
if (op == 2 && State == 0) {
|
||||
L_NewWindows("Lenheart", 267, 0x65535); //打开龙盒窗口
|
||||
State = 1;
|
||||
Model_Init(); //初始化龙盒幸运值 盒子数量 还原标志状态
|
||||
DragonboxJson.Delete(); //销毁当前Json包
|
||||
}
|
||||
}
|
||||
|
||||
//龙盒打开状态
|
||||
else if (sq_GetPopupWindowMainCotrol(267) && State == 1) {
|
||||
{ //关闭小地图
|
||||
if (sq_IsPopupWindowOpened(176)) {
|
||||
local mapbox = sq_GetPopupWindowMainCotrol(176);
|
||||
mapbox.SetEnable(false);
|
||||
mapbox.SetVisible(false);
|
||||
}
|
||||
} { //绘制主窗口
|
||||
//判断幸运值 来绘制主窗口
|
||||
if (lucky_value < 100)
|
||||
DatgonBoxDrawDynamicAni(obj, "common/dargonbox/animation/db_newani_text1.ani", C_Main_X_Pos + 9, C_Main_Y_Pos + 9, true); //Main底
|
||||
if (lucky_value == 100)
|
||||
DatgonBoxDrawDynamicAni(obj, "common/dargonbox/animation/db_newani_text2.ani", C_Main_X_Pos + 9, C_Main_Y_Pos + 9, true); //Main底
|
||||
|
||||
DatgonBoxDrawDynamicAni(obj, "common/dargonbox/animation/db_newani_item.ani", C_Main_X_Pos + 386, C_Main_Y_Pos + 404, true); //Main底
|
||||
|
||||
if (lucky_value < 100) DrawLucky(obj, C_Main_X_Pos + 359, C_Main_Y_Pos + 377, 0); //幸运值
|
||||
else DrawLucky(obj, C_Main_X_Pos + 359, C_Main_Y_Pos + 377, 1);
|
||||
|
||||
DrawNumberAni(obj, C_Main_X_Pos + 388, C_Main_Y_Pos + 422, box_num, "common/dargonbox/num/db_num_", 6, 0); //盒子数量
|
||||
|
||||
|
||||
}
|
||||
|
||||
{ //抽奖模式
|
||||
//单抽按钮
|
||||
local OneButton = DargonBoxButton(obj, "OneButton", IMouse, C_Main_X_Pos + 217, C_Main_Y_Pos + 436, 14, 15, "common/dargonbox/animation/db_newani_sel");
|
||||
OneButton.drawButtonImage();
|
||||
if (OneButton.isActive()) //单抽按钮按下
|
||||
{
|
||||
local OpenStatu = RewindOpenDargonBox(obj); //还原抽奖Ani状态 返回值 是否已经播放完并且重置了
|
||||
if (!OpenStatu) return; //如果未重置 则不允许切换模式
|
||||
|
||||
if (Box_Redom_Model != 2 && Box_Redom_Model != 0) return; //如果不在 未打开盖子 或者 可抽奖状态 直接返回
|
||||
BoxStetu = 0; //Box抽奖模式 单抽
|
||||
SelectRedomModel(); //播放切换模式状态
|
||||
Box_Open_Stetu = 0; //盒子打开的状态写回0 即未打开
|
||||
}
|
||||
//十连抽按钮
|
||||
local TenButton = DargonBoxButton(obj, "TenButton", IMouse, C_Main_X_Pos + 217 + 263, C_Main_Y_Pos + 436, 14, 15, "common/dargonbox/animation/db_newani_sel");
|
||||
TenButton.drawButtonImage();
|
||||
if (TenButton.isActive()) //十连抽按钮按下
|
||||
{
|
||||
local OpenStatu = RewindOpenDargonBox(obj); //还原抽奖Ani状态 返回值 是否已经播放完并且重置了
|
||||
if (!OpenStatu) return; //如果未重置 则不允许切换模式
|
||||
|
||||
if (Box_Redom_Model != 2 && Box_Redom_Model != 0) return; //如果不在 未打开盖子 或者 可抽奖状态 直接返回
|
||||
BoxStetu = 1; //Box抽奖模式 十连抽
|
||||
SelectRedomModel(); //播放切换模式状态
|
||||
Box_Open_Stetu = 0; //盒子打开的状态写回0 即未打开
|
||||
}
|
||||
//绘制选择好了的圆点
|
||||
local Box_Statu_Button_Offset = 0;
|
||||
if (BoxStetu != 0) Box_Statu_Button_Offset = 263;
|
||||
DatgonBoxDrawDynamicAni(obj, "common/dargonbox/animation/db_newani_sel_3.ani", C_Main_X_Pos + 217 + Box_Statu_Button_Offset, C_Main_Y_Pos + 436, true);
|
||||
}
|
||||
|
||||
//切换选择模式盖子状态
|
||||
switch (Box_Redom_Model) {
|
||||
case 0: //初始进来盖着盖子的状态
|
||||
if (Box_Index == 2022110703) {
|
||||
DatgonBoxDrawDynamicAni(obj, "common/dargonbox/animation/009.ani", C_Main_X_Pos + 14, 35, true); //Main盖
|
||||
L_Sq_DrawItem(215, 144, 2021033111, 1, 0, 0, 0);
|
||||
L_sq_DrawCode("巅峰的主宰", 185, 184, 0xFFF000FF, 0, 1);
|
||||
L_sq_DrawCode("稀有光环", 205, 200, 0xFFF000FF, 0, 1);
|
||||
L_Sq_DrawItem(386, 144, 400990654, 1, 0, 0, 0);
|
||||
L_sq_DrawCode("特殊宠物", 185 + 198, 184, 0xFFF000FF, 0, 1);
|
||||
L_sq_DrawCode("<超越时空宠物>", 185 + 176, 200, 0xFFF000FF, 0, 1);
|
||||
L_Sq_DrawItem(557, 144, 2019188, 1, 0, 0, 0);
|
||||
L_sq_DrawCode("云中剑风", 185 + 364, 184, 0xFFF000FF, 0, 1);
|
||||
L_sq_DrawCode("<一期专属称号>", 185 + 344, 200, 0xFFF000FF, 0, 1);
|
||||
} else if (Box_Index == 2022110702) {
|
||||
DatgonBoxDrawDynamicAni(obj, "common/dargonbox/animation/009.ani", C_Main_X_Pos + 14, 35, true); //Main盖
|
||||
L_Sq_DrawItem(215, 144, 8386, 1, 0, 0, 0);
|
||||
L_sq_DrawCode("全职业稀有克隆", 185, 184, 0xFFF000FF, 0, 1);
|
||||
L_sq_DrawCode("装扮礼盒", 205, 200, 0xFFF000FF, 0, 1);
|
||||
L_Sq_DrawItem(386, 144, 400990653, 1, 0, 0, 0);
|
||||
L_sq_DrawCode("特殊宠物", 185 + 198, 184, 0xFFF000FF, 0, 1);
|
||||
L_sq_DrawCode("<时空系列宠物>", 185 + 176, 200, 0xFFF000FF, 0, 1);
|
||||
L_Sq_DrawItem(557, 144, 500000016, 1, 0, 0, 0);
|
||||
L_sq_DrawCode("镜花水月", 185 + 364, 184, 0xFFF000FF, 0, 1);
|
||||
L_sq_DrawCode("<一期冷却光环>", 185 + 344, 200, 0xFFF000FF, 0, 1);
|
||||
}
|
||||
break;
|
||||
case 1: //单次拉开盖子的状态
|
||||
DargonBoxOpenAni(obj, "common/dargonbox/animation/intro.ani", C_Main_X_Pos + 14, 35); //Main盖
|
||||
break;
|
||||
case 2: //可以抽奖的状态
|
||||
switch (Box_Open_Stetu) //盒子打开的状态
|
||||
{
|
||||
case 0: //无状态
|
||||
break;
|
||||
case 1:
|
||||
OneOpenDargonBox(obj, C_Main_X_Pos, C_Main_Y_Pos); //进行抽奖中
|
||||
break;
|
||||
case 2:
|
||||
TenOpenDargonBox(obj, C_Main_X_Pos, C_Main_Y_Pos); //进行抽奖中
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 3: //先关闭在拉开盖子的状态
|
||||
DargonBoxCloseAni(obj, "common/dargonbox/animation/outro.ani", C_Main_X_Pos + 14, 35); //Main盖
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
{ //抽奖按钮
|
||||
local RedomButton = ButtonPro(obj, "RedomButton", C_Main_X_Pos + 342, C_Main_Y_Pos + 510, "common/dargonbox/animation/button.ani", 120, 20);
|
||||
RedomButton.SetRectEnble(true, "RedomButtonr", C_Main_X_Pos + 342, C_Main_Y_Pos + 510, "common/dargonbox/animation/button.ani", 1); //设置悬停效果
|
||||
RedomButton.SetCustomClickEnble(true, "RedomButtonr", C_Main_X_Pos + 342, C_Main_Y_Pos + 510 + 1, "common/dargonbox/animation/button.ani", 1); //设置点击效果
|
||||
RedomButton.Show();
|
||||
if (RedomButton.isLBActive()) //按下抽奖按钮
|
||||
{
|
||||
switch (Box_Redom_Model) {
|
||||
case 0: //如果盖子没打开 就打开盖子
|
||||
SelectRedomModel();
|
||||
break;
|
||||
case 2: //可抽奖的状态
|
||||
switch (BoxStetu) {
|
||||
case 0:
|
||||
local OpenStatu = RewindOpenDargonBox(obj); //还原Ani状态 返回值 是否已经播放完并且重置了
|
||||
if (OpenStatu == false) break;
|
||||
DragonboxJson.Delete();
|
||||
local One = Json_STL("DraboxOneS");
|
||||
One.Put("op", 3);
|
||||
One.Put("itemindex", Box_Index);
|
||||
One.Put("doselect", 1);
|
||||
local str = One.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
One.Delete();
|
||||
|
||||
Box_Open_Stetu = 1; //开启单抽渲染
|
||||
break;
|
||||
case 1:
|
||||
local OpenStatu = RewindTenOpenDargonBox(obj); //还原Ani状态 返回值 是否已经播放完并且重置了
|
||||
if (OpenStatu == false) break;
|
||||
DragonboxJson.Delete();
|
||||
local Ten = Json_STL("DraboxTenS");
|
||||
Ten.Put("op", 3);
|
||||
Ten.Put("itemindex", Box_Index);
|
||||
Ten.Put("doselect", 10);
|
||||
local str = Ten.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
Ten.Delete();
|
||||
|
||||
Box_Open_Stetu = 2; //开启十连抽渲染
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default: //在其他动画中直接返回
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//初始化龙盒对象
|
||||
function DargonBox(obj) {
|
||||
if (DB == null) DB = DarBox("Init");
|
||||
DB.Run(obj);
|
||||
}
|
||||
|
|
@ -0,0 +1,226 @@
|
|||
/*
|
||||
文件名:DungeonRank.nut
|
||||
路径:Plugins/DungeonRank/DungeonRank.nut
|
||||
创建日期:2023-09-18 12:08
|
||||
文件用途:副本排行
|
||||
*/
|
||||
class DungeonRankWindow extends BasicsDrawTool {
|
||||
//宽度
|
||||
Width = null;
|
||||
//高度
|
||||
Height = null;
|
||||
//标题高度
|
||||
TitleH = null;
|
||||
|
||||
//X坐标
|
||||
X = null;
|
||||
B_X = null;
|
||||
//Y坐标
|
||||
Y = null;
|
||||
B_Y = null;
|
||||
|
||||
YMouseSw = true;
|
||||
DeBugMode = false;
|
||||
|
||||
Mobj = null;
|
||||
M_Xpos = null;
|
||||
M_Ypos = null;
|
||||
|
||||
|
||||
constructor(gX, gY, gWidth, gHeight, gTitleH) {
|
||||
//宽度
|
||||
Width = gWidth;
|
||||
//高度
|
||||
Height = gHeight;
|
||||
//标题高度
|
||||
TitleH = gTitleH;
|
||||
|
||||
//X坐标
|
||||
X = gX;
|
||||
//Y坐标
|
||||
Y = gY;
|
||||
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
|
||||
//设定鼠标逻辑
|
||||
function LockMouse() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, Width, Height)) {
|
||||
IMouse.LockMouseClick();
|
||||
YMouseSw = false;
|
||||
} else {
|
||||
if (YMouseSw == false && sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, 0, 0, 800, 600)) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
YMouseSw = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//设定窗口拖动逻辑
|
||||
function MoveWindow() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, Width, TitleH)) {
|
||||
|
||||
if (Mobj.Lb == 1) {
|
||||
if (!M_Xpos) M_Xpos = IMouse.GetXPos(); //原始鼠标位置数据
|
||||
if (!M_Ypos) M_Ypos = IMouse.GetYPos();
|
||||
if (!B_X) B_X = X; //原始窗口位置
|
||||
if (!B_Y) B_Y = Y;
|
||||
|
||||
X = B_X - (M_Xpos - IMouse.GetXPos());
|
||||
Y = B_Y - (M_Ypos - IMouse.GetYPos());
|
||||
|
||||
} else if (Mobj.Lb == 0) {
|
||||
M_Xpos = null;
|
||||
M_Ypos = null;
|
||||
B_X = null;
|
||||
B_Y = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
if (DeBugMode) sq_DrawBox(X, Y, Width, Height, 0xffffffff);
|
||||
|
||||
//设定鼠标逻辑
|
||||
LockMouse();
|
||||
|
||||
//设定窗口拖动逻辑
|
||||
MoveWindow();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class DungeonRankC extends BasicsDrawTool {
|
||||
WindowObj = null; //窗口对象
|
||||
MainState = false; //主状态
|
||||
X = 129;
|
||||
Y = 20;
|
||||
|
||||
Info = null;
|
||||
|
||||
|
||||
function GetDungeonRankInfo() {
|
||||
local T = {
|
||||
op = 20054003,
|
||||
};
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
function GetDungeonRankInfoCallBack(Chunk) {
|
||||
local Buffer = Json_STL("GetDungeonRankInfoCallBackBuffer");
|
||||
Buffer.Parse(Chunk, 0, false);
|
||||
Info = [];
|
||||
|
||||
for (local i = 0; i< 10; i++) {
|
||||
local gjob = Buffer.Get("DungeonS->" + i + "->job");
|
||||
if (gjob) {
|
||||
local gdungeonTime = Buffer.Get("DungeonS->" + i + "->dungeonTime");
|
||||
local gname = Buffer.Get("DungeonS->" + i + "->name");
|
||||
local T = {
|
||||
Job = gjob,
|
||||
DungronTime = gdungeonTime,
|
||||
Name = gname,
|
||||
};
|
||||
Info.append(T);
|
||||
}
|
||||
}
|
||||
/*
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("CollectBooksCObj")) {
|
||||
local Tobj = RootTab["CollectBooksCObj"];
|
||||
Tobj.CollectAttributeObject = [];
|
||||
for (local i = 0; i < 22; i++) {
|
||||
Tobj.CollectAttributeObject.append(Buffer.Get("buffs->" + i));
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
constructor() {
|
||||
|
||||
//注册获取收集信息回调
|
||||
Pack_Control.rawset(20054004, GetDungeonRankInfoCallBack.bindenv(this));
|
||||
}
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
//绘制主界面
|
||||
L_sq_DrawImg("dungeon/rankmain.img", 0, X, Y);
|
||||
|
||||
L_sq_DrawCode("排名", X + 24, Y + 297, sq_RGBA(230, 200, 155, 250), 1, 1);
|
||||
L_sq_DrawCode("玩家角色名", X + 24 + 98, Y + 297, sq_RGBA(230, 200, 155, 250), 1, 1);
|
||||
L_sq_DrawCode("玩家职业", X + 24 + 98 + 152, Y + 297, sq_RGBA(230, 200, 155, 250), 1, 1);
|
||||
L_sq_DrawCode("通关时间", X + 24 + 98 + 152 + 155, Y + 297, sq_RGBA(230, 200, 155, 250), 1, 1);
|
||||
|
||||
if (Info) {
|
||||
foreach(Pos, Value in Info) {
|
||||
L_sq_DrawCode("" + Pos, X + 32, Y + 316 + (Pos * 17), sq_RGBA(255, 247, 107, 250), 1, 1);
|
||||
L_sq_DrawCode("" + Value.Name, X + 32 + 98, Y + 316 + (Pos * 17), sq_RGBA(255, 247, 107, 250), 1, 1);
|
||||
L_sq_DrawCode("" + Value.Job, X + 32 + 98 + 152, Y + 316 + (Pos * 17), sq_RGBA(255, 247, 107, 250), 1, 1);
|
||||
L_sq_DrawCode("" + Value.DungronTime, X + 32 + 98 + 152 + 120, Y + 316 + (Pos * 17), sq_RGBA(255, 247, 107, 250), 1, 1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//开启界面回调
|
||||
function OpenClassCallBack() {
|
||||
|
||||
L_NewWindows("Lenheart", 170, 0x65535);
|
||||
local W = sq_GetPopupWindowMainCotrol(170);
|
||||
W.SetVisible(false);
|
||||
W.SetEnable(false);
|
||||
|
||||
GetDungeonRankInfo();
|
||||
}
|
||||
|
||||
//绘制入口
|
||||
function Draw(obj) {
|
||||
if (MainState) {
|
||||
if (WindowObj) {
|
||||
DrawMain(obj);
|
||||
WindowObj.Show(obj);
|
||||
X = WindowObj.X;
|
||||
Y = WindowObj.Y;
|
||||
} else {
|
||||
WindowObj = DungeonRankWindow(X, Y, 542, 512, 28); //坐标 大小 标题栏高度
|
||||
// WindowObj.DeBugMode = true;
|
||||
}
|
||||
} else {
|
||||
if (WindowObj && WindowObj.YMouseSw == false) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
WindowObj.YMouseSw = true;
|
||||
WindowObj = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
if (KeyPressNB.isKeyPress(48, "DungeonRankCloseKey")) {
|
||||
MainState = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function DungeonRank(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("DungeonRankCObj")) {
|
||||
local Cobj = DungeonRankC();
|
||||
RootTab.rawset("DungeonRankCObj", Cobj);
|
||||
EventIcon("副本排行", 55, 55, Cobj);
|
||||
} else {
|
||||
RootTab["DungeonRankCObj"].Proc(obj);
|
||||
RootTab["DungeonRankCObj"].Draw(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (getroottable().rawin("LenheartFuncTab")) {
|
||||
getroottable()["LenheartFuncTab"].rawset("DungeonRankFunc", DungeonRank);
|
||||
} else {
|
||||
local T = {};
|
||||
T.rawset("DungeonRankFunc", DungeonRank);
|
||||
getroottable().rawset("LenheartFuncTab", T);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
文件名:Fiendwar.nut
|
||||
路径:Plugins/Fiendwar/Fiendwar.nut
|
||||
创建日期:2024-03-03 10:38
|
||||
文件用途:
|
||||
*/
|
||||
|
||||
class FiendwarTotal extends BasicsDrawTool {
|
||||
//基础配置
|
||||
BaseConfig = null;
|
||||
/*
|
||||
town_index 城镇编号
|
||||
channel_index 频道编号
|
||||
*/
|
||||
|
||||
function GetInstance() {
|
||||
return getroottable()["FiendwarCObj"];
|
||||
}
|
||||
|
||||
//请求基础信息配置
|
||||
function GetFiendwarBase() {
|
||||
local T = {
|
||||
op = 20063501,
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
//基础信息配置
|
||||
function FiendwarBase(Chunk) {
|
||||
BaseConfig = Json.Decode(Chunk);
|
||||
FiendwarChannelTownLogicCallBack();
|
||||
}
|
||||
|
||||
//团本专属频道上线城镇移动包
|
||||
function FiendwarChannelTownLogicCallBack() {
|
||||
if (BaseConfig.channel_index.find("20")) {
|
||||
if (L_sq_GetTownIndex() != BaseConfig.town_index) {
|
||||
L_sq_MoveTown(BaseConfig.town_index, 0, 474, 249);
|
||||
}
|
||||
}
|
||||
//不在超时空区域
|
||||
else {
|
||||
L_sq_MoveTown(1, 1, 474, 249);
|
||||
}
|
||||
}
|
||||
|
||||
constructor() {
|
||||
//获取基础配置回调包
|
||||
Pack_Control.rawset(20063502, FiendwarBase.bindenv(this));
|
||||
|
||||
//第一次上线要重新请求一下位置信息
|
||||
GetFiendwarBase();
|
||||
}
|
||||
|
||||
|
||||
function Proc(obj) {}
|
||||
}
|
||||
|
||||
function LenheartFiendwar(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("FiendwarCObj")) {
|
||||
local Cobj = FiendwarTotal();
|
||||
RootTab.rawset("FiendwarCObj", Cobj);
|
||||
} else {
|
||||
RootTab["FiendwarCObj"].Proc(obj);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//攻坚队列表框
|
||||
if (!RootTab.rawin("FiendwarHallCObj")) {
|
||||
local Cobj = FiendwarHallC();
|
||||
RootTab.rawset("FiendwarHallCObj", Cobj);
|
||||
} else {
|
||||
RootTab["FiendwarHallCObj"].Proc(obj);
|
||||
RootTab["FiendwarHallCObj"].Draw(obj);
|
||||
}
|
||||
|
||||
//创建队伍框
|
||||
if (!RootTab.rawin("FiendwarHallCreatePartyCObj")) {
|
||||
local Cobj = FiendwarHallCreatePartyC();
|
||||
RootTab.rawset("FiendwarHallCreatePartyCObj", Cobj);
|
||||
} else {
|
||||
RootTab["FiendwarHallCreatePartyCObj"].Proc(obj);
|
||||
RootTab["FiendwarHallCreatePartyCObj"].Draw(obj);
|
||||
}
|
||||
}
|
||||
|
||||
if (getroottable().rawin("LenheartFuncTab")) {
|
||||
getroottable()["LenheartFuncTab"].rawset("Fiendwar_LenheartFunc", LenheartFiendwar);
|
||||
} else {
|
||||
local T = {};
|
||||
T.rawset("Fiendwar_LenheartFunc", LenheartFiendwar);
|
||||
getroottable().rawset("LenheartFuncTab", T);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
dofile("sqr/Plugins/Fiendwar/FiendwarHall.nut");
|
||||
dofile("sqr/Plugins/Fiendwar/FiendwarHallCreateParty.nut");
|
||||
|
|
@ -0,0 +1,380 @@
|
|||
/*
|
||||
文件名:FiendwarHall.nut
|
||||
路径:Plugins/Fiendwar/FiendwarHall.nut
|
||||
创建日期:2024-03-11 12:54
|
||||
文件用途:超时空之战大厅
|
||||
*/
|
||||
|
||||
class FiendwarHallTeamC extends BasicsDrawTool {
|
||||
X = 0;
|
||||
Y = 0;
|
||||
Width = null;
|
||||
Height = null;
|
||||
TeamObj = null;
|
||||
//选中状态
|
||||
SelectState = false;
|
||||
//攻坚状态
|
||||
OffensiveState = 0;
|
||||
|
||||
Mobj = null; //鼠标对象
|
||||
|
||||
|
||||
constructor(gTeamObj) {
|
||||
TeamObj = gTeamObj;
|
||||
this.Width = 458;
|
||||
this.Height = 21;
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
|
||||
function SyncPos(X, Y) {
|
||||
this.X = X;
|
||||
this.Y = Y;
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X + 10, Y + 82, Width, Height)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown() {
|
||||
if (isInRect() && Mobj.Lb == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp() {
|
||||
if (isInRect() && Mobj.Lb == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
//左键单击状态
|
||||
function isLBActive() {
|
||||
if (isInRect() && Mobj.LbEvent) {
|
||||
return true;
|
||||
} else return false;
|
||||
}
|
||||
|
||||
|
||||
function Show() {
|
||||
//绘制底槽
|
||||
L_sq_DrawImg("hud/fiendwarl.img", 4, X + 10, Y + 82);
|
||||
|
||||
//绘制队伍编号
|
||||
L_sq_DrawCode(TeamObj.TeamId, X + 32 - LenheartTextClass.GetStringLength(TeamObj.TeamId) / 2, Y + 87, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
//绘制队长头像
|
||||
L_sq_DrawImg("interface/lenheartwindowcommon.img", 55, X + 62, Y + 89);
|
||||
try {
|
||||
local channel_index = FiendwarTotal.GetInstance().BaseConfig.channel_index;
|
||||
channel_index = channel_index.slice(channel_index.len() - 2, channel_index.len());
|
||||
//绘制频道信息
|
||||
L_sq_DrawCode(channel_index, X + 112 - LenheartTextClass.GetStringLength(channel_index) / 2, Y + 87, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
} catch (exception) {
|
||||
|
||||
}
|
||||
//绘制攻坚队名称
|
||||
L_sq_DrawCode(TeamObj.TeamName, X + 140, Y + 87, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
//绘制攻坚队攻坚状态
|
||||
L_sq_DrawImg("hud/fiendwarl.img", 6 + TeamObj.State, X + 324, Y + 84);
|
||||
|
||||
local PartyPlayerCountStr = TeamObj.TeamPlayerCount + " / " + 8;
|
||||
//绘制攻坚队队员数量
|
||||
L_sq_DrawCode(PartyPlayerCountStr, X + 444 - LenheartTextClass.GetStringLength(PartyPlayerCountStr) / 2, Y + 87, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
|
||||
if (SelectState) {
|
||||
L_sq_DrawImg("hud/fiendwarl.img", 5, X + 10, Y + 82);
|
||||
}
|
||||
|
||||
if (isInRect()) {
|
||||
L_sq_DrawImg("hud/fiendwarl.img", 5, X + 10, Y + 82);
|
||||
}
|
||||
|
||||
if (isLBActive()) {
|
||||
//还原其他 选中自己
|
||||
foreach(Obj in FiendwarHallC.GetInstance().PartyList) {
|
||||
Obj.SelectState = false;
|
||||
}
|
||||
SelectState = !SelectState;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class FiendwarHallC extends BasicsDrawTool {
|
||||
WindowObj = null; //窗口对象
|
||||
MainState = true; //主状态
|
||||
X = 320;
|
||||
Y = 40;
|
||||
|
||||
|
||||
PartyList = null;
|
||||
|
||||
function GetInstance() {
|
||||
return getroottable()["FiendwarHallCObj"];
|
||||
}
|
||||
|
||||
function GetAllTeamCallBack(Chunk) {
|
||||
// Sout("收到包 : \n %L", Chunk);
|
||||
local Jso = Json.Decode(Chunk);
|
||||
PartyList = [];
|
||||
foreach(TeamsSimple in Jso.TeamSimList) {
|
||||
local T = {
|
||||
TeamId = TeamsSimple.TeamId.tostring(),
|
||||
TeamName = TeamsSimple.TeamName,
|
||||
TeamPlayerCount = TeamsSimple.TeamPlayerCount,
|
||||
State = TeamsSimple.State
|
||||
}
|
||||
local TeamBuf = FiendwarHallTeamC(T);
|
||||
PartyList.append(TeamBuf);
|
||||
}
|
||||
}
|
||||
|
||||
function GetAllTeamCall() {
|
||||
local Jso = {
|
||||
op = 20063011
|
||||
}
|
||||
SendPack(Jso);
|
||||
}
|
||||
|
||||
constructor() {
|
||||
PartyList = [];
|
||||
Pack_Control.rawset(20063002, GetAllTeamCallBack.bindenv(this));
|
||||
GetAllTeamCall();
|
||||
}
|
||||
|
||||
MyChannelBtn = null;
|
||||
OnlyPreparingBtn = null;
|
||||
OnlyPreparingFlag = 1;
|
||||
InputObject = null;
|
||||
|
||||
function DrawMainBackGround(obj) {
|
||||
//Item信息框一般为211的宽度
|
||||
L_sq_DrawWindow(X, Y + 10, 540 * 0.85, 420 * 0.9, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
|
||||
// L_sq_DrawWindow(X + 6, Y + 56, 528 * 0.85, 384 * 0.85, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
L_sq_DrawWindow(X + 6, Y + 19, 528 * 0.85, 47, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
|
||||
//绘制背景框标题栏
|
||||
L_sq_DrawImg("hud/fiendwarl.img", 3, X + 1, Y);
|
||||
|
||||
L_sq_DrawCode("寻找攻坚队", X + 217, Y + 3, sq_RGBA(179, 169, 135, 255), 0, 1);
|
||||
|
||||
local CloseButton = LenheartBaseButton(X + 457, Y, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
||||
CloseButton.Show();
|
||||
if (CloseButton.isLBActive()) {
|
||||
MainState = false;
|
||||
}
|
||||
|
||||
//我的频道
|
||||
if (!MyChannelBtn) {
|
||||
MyChannelBtn = LenheartcommonSwitchButtonText(X + 16, Y + 30, "我的频道");
|
||||
MyChannelBtn.State = 1;
|
||||
MyChannelBtn.ImgIndex = 358;
|
||||
MyChannelBtn.SetTextPos(12, 2);
|
||||
MyChannelBtn.Width = 76;
|
||||
MyChannelBtn.Height = 16;
|
||||
}
|
||||
MyChannelBtn.SyncPos(X + 16, Y + 30);
|
||||
MyChannelBtn.Show();
|
||||
|
||||
//只查看招募中的攻坚队
|
||||
if (!OnlyPreparingBtn) {
|
||||
OnlyPreparingBtn = LenheartcommonSwitchButtonText(X + 50, Y + 30, "只查看招募中的攻坚队");
|
||||
OnlyPreparingBtn.ImgIndex = 358;
|
||||
OnlyPreparingBtn.SetTextPos(12, 2);
|
||||
OnlyPreparingBtn.Width = 76;
|
||||
OnlyPreparingBtn.Height = 16;
|
||||
}
|
||||
OnlyPreparingBtn.SyncPos(X + 110, Y + 30);
|
||||
OnlyPreparingBtn.Show();
|
||||
if (OnlyPreparingBtn.isLBActive()) {
|
||||
switch (OnlyPreparingFlag) {
|
||||
case 0:
|
||||
OnlyPreparingFlag = 1;
|
||||
break;
|
||||
case 1:
|
||||
OnlyPreparingFlag = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
OnlyPreparingBtn.State = OnlyPreparingFlag;
|
||||
|
||||
if (!InputObject) InputObject = LenheartBaseInput(X + 260, Y + 31, 80, 20);
|
||||
else {
|
||||
InputObject.SyncPos(X + 260, Y + 31);
|
||||
InputObject.Show();
|
||||
}
|
||||
|
||||
|
||||
local FindButton = LenheartButtonText(X + 348, Y + 28, 5, "搜索");
|
||||
FindButton.SetTextOffset(0, 1);
|
||||
FindButton.Show();
|
||||
if (FindButton.isLBActive()) {
|
||||
|
||||
}
|
||||
|
||||
local ResetButton = LenheartButtonText(X + 408, Y + 28, 5, "重置");
|
||||
ResetButton.SetTextOffset(0, 1);
|
||||
ResetButton.Show();
|
||||
if (ResetButton.isLBActive()) {
|
||||
InputObject.str = "";
|
||||
}
|
||||
|
||||
local ModelButton = LenheartButtonText(X + 9, Y + 56, -18, "编号");
|
||||
ModelButton.Idx = 163;
|
||||
ModelButton.DWidth = -8;
|
||||
ModelButton.SetTextOffset(-9, 1);
|
||||
ModelButton.Show();
|
||||
|
||||
local StateButton = LenheartButtonText(X + 51, Y + 56, -18, "状态");
|
||||
StateButton.Idx = 163;
|
||||
StateButton.DWidth = -8;
|
||||
StateButton.SetTextOffset(-9, 1);
|
||||
StateButton.Show();
|
||||
|
||||
local ChannelButton = LenheartButtonText(X + 93, Y + 56, -18, "频道");
|
||||
ChannelButton.Idx = 163;
|
||||
ChannelButton.DWidth = -8;
|
||||
ChannelButton.SetTextOffset(-9, 1);
|
||||
ChannelButton.Show();
|
||||
|
||||
local PartyNameButton = LenheartButtonText(X + 135, Y + 56, 100, "攻坚队名称");
|
||||
PartyNameButton.Idx = 163;
|
||||
PartyNameButton.DWidth = 223;
|
||||
PartyNameButton.FillWidth = 1;
|
||||
PartyNameButton.FirstWidth = 21;
|
||||
PartyNameButton.SetTextOffset(26, 1);
|
||||
PartyNameButton.Show();
|
||||
|
||||
local StageButton = LenheartButtonText(X + 289, Y + 56, 52, "阶段");
|
||||
StageButton.Idx = 163;
|
||||
StageButton.DWidth = 140;
|
||||
StageButton.FillWidth = 1;
|
||||
StageButton.FirstWidth = 21;
|
||||
StageButton.SetTextOffset(26, 1);
|
||||
StageButton.Show();
|
||||
|
||||
local TeammembersButton = LenheartButtonText(X + 402, Y + 56, 50, "队员数量");
|
||||
TeammembersButton.Idx = 163;
|
||||
TeammembersButton.FillWidth = 1;
|
||||
TeammembersButton.FirstWidth = 21;
|
||||
TeammembersButton.DWidth = 47;
|
||||
TeammembersButton.SetTextOffset(-8, 1);
|
||||
TeammembersButton.Show();
|
||||
|
||||
DrawPartyList(obj);
|
||||
|
||||
L_sq_DrawWindow(X + 6, Y + 382, 528 * 0.85, 24, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
|
||||
local CreateOrMyPartyStr = "创建攻坚队";
|
||||
local MyPartyButton = LenheartButtonText(X + 15, Y + 395, 30, CreateOrMyPartyStr);
|
||||
MyPartyButton.SetTextOffset(-6, 1);
|
||||
MyPartyButton.Show();
|
||||
if (MyPartyButton.isLBActive()) {
|
||||
FiendwarHallCreatePartyC.GetInstance().MainState = true;
|
||||
}
|
||||
|
||||
//绘制背景框标题栏
|
||||
// L_sq_DrawImg("interface/lenheartwindowcommon.img", 33, X + 150, Y + 395);
|
||||
|
||||
local LeftButton = LenheartBaseButton(X + 160, Y + 400, 15, 15, "interface/lenheartwindowcommon.img", 34);
|
||||
LeftButton.Show();
|
||||
if (LeftButton.isLBActive()) {
|
||||
|
||||
}
|
||||
|
||||
local PageStr = Page + 1 + " / " + ((PartyList.len() / PageMaxCount) + 1);
|
||||
//绘制当前页数
|
||||
L_sq_DrawCode(PageStr, X + 166 + LenheartTextClass.GetStringLength(PageStr) / 2, Y + 402, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
|
||||
local RightButton = LenheartBaseButton(X + 220, Y + 400, 15, 15, "interface/lenheartwindowcommon.img", 38);
|
||||
RightButton.Show();
|
||||
if (RightButton.isLBActive()) {
|
||||
|
||||
}
|
||||
|
||||
local FQButton = LenheartButtonText(X + 300, Y + 394, 20, "进入待机");
|
||||
FQButton.SetTextOffset(-5, 2);
|
||||
FQButton.State = 8;
|
||||
FQButton.Show();
|
||||
|
||||
|
||||
local RefreshButton = LenheartBaseButton(X + 410, Y + 395, 25, 25, "interface/lenheartwindowcommon.img", 366);
|
||||
RefreshButton.Show();
|
||||
if (RefreshButton.isLBActive()) {
|
||||
GetAllTeamCall();
|
||||
}
|
||||
|
||||
local SettingButton = LenheartBaseButton(X + 440, Y + 394, 15, 15, "interface/lenheartwindowcommon.img", 362);
|
||||
SettingButton.State = 8;
|
||||
SettingButton.Show();
|
||||
|
||||
}
|
||||
|
||||
Page = 0;
|
||||
PageMaxCount = 13;
|
||||
//绘制队伍信息
|
||||
function DrawPartyList(obj) {
|
||||
if (PartyList.len() <= 0) return;
|
||||
foreach(Index, TeamObj in PartyList.slice((((Page) * PageMaxCount) > 0) ? ((Page) * PageMaxCount) : 0, ((Page + 1) * PageMaxCount) > PartyList.len() ? PartyList.len() : ((Page + 1) * PageMaxCount))) {
|
||||
TeamObj.SyncPos(X, Y + 2 + (Index % PageMaxCount) * 23);
|
||||
TeamObj.Show();
|
||||
}
|
||||
}
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
DrawMainBackGround(obj);
|
||||
}
|
||||
|
||||
//开启界面回调
|
||||
function OpenClassCallBack() {
|
||||
|
||||
L_NewWindows("Lenheart", 170, 0x65535);
|
||||
local W = sq_GetPopupWindowMainCotrol(170);
|
||||
W.SetVisible(false);
|
||||
W.SetEnable(false);
|
||||
|
||||
}
|
||||
|
||||
MainButton = null;
|
||||
//绘制入口
|
||||
function Draw(obj) {
|
||||
//在甲板
|
||||
if (FiendwarTotal.GetInstance().BaseConfig && FiendwarTotal.GetInstance().BaseConfig.channel_index.find("20") && L_sq_GetTownIndex() == FiendwarTotal.GetInstance().BaseConfig.town_index && L_sq_GetRegionIndex() == 1) {
|
||||
if (!MainButton) {
|
||||
MainButton = LenheartBaseButton(0, 350, 100, 179, "hud/fiendwarl.img", 0);
|
||||
} else {
|
||||
MainButton.Show();
|
||||
if (MainButton.isLBActive()) {
|
||||
MainState = !MainState;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (MainState) {
|
||||
if (WindowObj) {
|
||||
DrawMain(obj);
|
||||
WindowObj.Show(obj);
|
||||
X = WindowObj.X;
|
||||
Y = WindowObj.Y;
|
||||
} else {
|
||||
WindowObj = LenheartWindow(X, Y, 476, 432, 10); //坐标 大小 标题栏高度
|
||||
// WindowObj.DeBugMode = true;
|
||||
}
|
||||
} else {
|
||||
if (WindowObj && WindowObj.YMouseSw == false) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
WindowObj.YMouseSw = true;
|
||||
WindowObj = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
if (KeyPressNB.isKeyPress(48, "FiendwarHallCloseKey")) {
|
||||
MainState = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
文件名:FiendwarHallCreateParty.nut
|
||||
路径:Plugins/Fiendwar/FiendwarHallCreateParty.nut
|
||||
创建日期:2024-03-18 13:20
|
||||
文件用途:
|
||||
*/
|
||||
|
||||
class FiendwarHallCreatePartyC extends BasicsDrawTool {
|
||||
WindowObj = null; //窗口对象
|
||||
MainState = true; //主状态
|
||||
X = 290;
|
||||
Y = 220;
|
||||
|
||||
constructor() {}
|
||||
|
||||
function GetInstance() {
|
||||
return getroottable()["FiendwarHallCreatePartyCObj"];
|
||||
}
|
||||
|
||||
|
||||
|
||||
InputObject = null;
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
|
||||
L_sq_DrawWindow(X, Y + 10, 260, 120, "interface/lenheartwindowcommon.img", 213, 12, 2, 13, 2);
|
||||
L_sq_DrawWindow(X, Y + 10, 260, 120, "interface/lenheartwindowcommon.img", 213, 12, 2, 13, 2);
|
||||
L_sq_DrawImg("interface2/gcontents/180621_fiendwar/raid/raid_areaimg_fiend.img", 0, X + 11, Y + 21);
|
||||
|
||||
L_sq_DrawImg("hud/fiendwarl.img", 9, X - 2, Y + 2);
|
||||
L_sq_DrawCode("创建攻坚队", X + 112, Y + 3, sq_RGBA(179, 169, 135, 255), 0, 1);
|
||||
|
||||
L_sq_DrawImg("hud/fiendwarl.img", 10, X + 72, Y + 44);
|
||||
|
||||
if (!InputObject) InputObject = LenheartBaseInput(X + 62, Y + 68, 152, 20);
|
||||
else {
|
||||
InputObject.SyncPos(X + 62, Y + 68);
|
||||
InputObject.Show();
|
||||
}
|
||||
|
||||
local OkButton = LenheartButtonText(X + 78, Y + 124, 5, "确定");
|
||||
OkButton.SetTextOffset(0, 1);
|
||||
OkButton.Show();
|
||||
if (OkButton.isLBActive()) {
|
||||
if (InputObject.str.len() > 0) {
|
||||
local T = {
|
||||
op = 20063001,
|
||||
teamsName = InputObject.str,
|
||||
items = [L_sq_GetCharacterAttribute(0x1c, 14), L_sq_GetCharacterAttribute(0x1c, 13)],
|
||||
}
|
||||
BasicsDrawTool.SendPackEx(T);
|
||||
MainState = false;
|
||||
}
|
||||
}
|
||||
|
||||
local CloseButton = LenheartButtonText(X + 144, Y + 124, 5, "取消");
|
||||
CloseButton.SetTextOffset(0, 1);
|
||||
CloseButton.Show();
|
||||
if (CloseButton.isLBActive()) {
|
||||
MainState = false;
|
||||
}
|
||||
}
|
||||
|
||||
//开启界面回调
|
||||
function OpenClassCallBack() {
|
||||
|
||||
L_NewWindows("Lenheart", 170, 0x65535);
|
||||
local W = sq_GetPopupWindowMainCotrol(170);
|
||||
W.SetVisible(false);
|
||||
W.SetEnable(false);
|
||||
|
||||
}
|
||||
|
||||
//绘制入口
|
||||
function Draw(obj) {
|
||||
if (MainState) {
|
||||
if (WindowObj) {
|
||||
DrawMain(obj);
|
||||
WindowObj.Show(obj);
|
||||
X = WindowObj.X;
|
||||
Y = WindowObj.Y;
|
||||
} else {
|
||||
WindowObj = LenheartWindow(X, Y, 800, 600, 28); //坐标 大小 标题栏高度
|
||||
// WindowObj.DeBugMode = true;
|
||||
}
|
||||
} else {
|
||||
if (WindowObj && WindowObj.YMouseSw == false) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
WindowObj.YMouseSw = true;
|
||||
WindowObj = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
if (KeyPressNB.isKeyPress(48, "FiendwarHallCreatePartyCloseKey")) {
|
||||
MainState = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,171 @@
|
|||
/*
|
||||
文件名:LaunchAnnouncement.nut
|
||||
路径:Plugins/LaunchAnnouncement/LaunchAnnouncement.nut
|
||||
创建日期:2023-08-21 12:52
|
||||
文件用途:上线公告
|
||||
*/
|
||||
|
||||
class LaunchAnnouncementC extends BasicsDrawTool {
|
||||
|
||||
//公告组
|
||||
NotiArr = null;
|
||||
Timer = null;
|
||||
|
||||
//收到信息包
|
||||
function LaunchAnnouncementCallBack(Chunk) {
|
||||
|
||||
local Buffer = Json_STL("CheckLaunchAnnouncementCallBack");
|
||||
Buffer.Parse(Chunk, 0, false);
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("Lenheart_LaunchAnnouncementCObj")) {
|
||||
local Tobj = RootTab["Lenheart_LaunchAnnouncementCObj"];
|
||||
|
||||
local ArrBuf = Tobj.NotiArr;
|
||||
local T = {
|
||||
NotiStrR = Buffer.Get("NotiStrR"),
|
||||
NotiStrG = Buffer.Get("NotiStrG"),
|
||||
NotiStrB = Buffer.Get("NotiStrB"),
|
||||
NotiStrA = Buffer.Get("NotiStrA"),
|
||||
NotiStrXpos = Buffer.Get("NotiStrXpos"),
|
||||
NotiStrYpos = Buffer.Get("NotiStrYpos"),
|
||||
//对应的话语
|
||||
NotiStr = Buffer.Get("NotiStr"),
|
||||
//对应话语渐入时间
|
||||
NotiStrUpTime = Buffer.Get("NotiStrUpTime"),
|
||||
//对应话语显示时间
|
||||
NotiStrPrintTime = Buffer.Get("NotiStrPrintTime"),
|
||||
//对应话语渐出时间
|
||||
NotiStrDownTime = Buffer.Get("NotiStrDownTime"),
|
||||
//对应出现的Img路径
|
||||
ImgPath = Buffer.Get("ImgPath"),
|
||||
//对应出现的Img帧数
|
||||
ImgFrame = Buffer.Get("ImgFrame"),
|
||||
ImgXpos = Buffer.Get("ImgXpos"),
|
||||
ImgYpos = Buffer.Get("ImgYpos"),
|
||||
//对应出现的Img渐入时间
|
||||
ImgUpTime = Buffer.Get("ImgUpTime"),
|
||||
//对应出现的Img渐出时间
|
||||
ImgDownTime = Buffer.Get("ImgDownTime"),
|
||||
}
|
||||
ArrBuf.append(T);
|
||||
Tobj.NotiArr = ArrBuf;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function SendUp() {
|
||||
local T = {
|
||||
op = 20053001,
|
||||
}
|
||||
local str = Json.Encode(T);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
|
||||
constructor() {
|
||||
Timer = TimeSTL("LaunchAnnouncementCTimer" + Clock(), 60000);
|
||||
|
||||
NotiArr = [];
|
||||
|
||||
SendUp();
|
||||
Pack_Control.rawset(20053002, LaunchAnnouncementCallBack);
|
||||
/*
|
||||
Timer = TimeSTL("LaunchAnnouncementCTimer" + Clock(), 60000);
|
||||
local T = {
|
||||
NotiStrR = 230,
|
||||
NotiStrG = 200,
|
||||
NotiStrB = 155,
|
||||
NotiStrA = 250,
|
||||
NotiStrXpos = 300,
|
||||
NotiStrYpos = 305,
|
||||
//对应的话语
|
||||
NotiStr = "这是一段测试文本",
|
||||
//对应话语渐入时间
|
||||
NotiStrUpTime = 320,
|
||||
//对应话语显示时间
|
||||
NotiStrPrintTime = 1000,
|
||||
//对应话语渐出时间
|
||||
NotiStrDownTime = 1000,
|
||||
//对应出现的Img路径
|
||||
ImgPath = "common/announcement/leveche_cutscene.ani",
|
||||
//对应出现的Img帧数
|
||||
ImgFrame = 99999999,
|
||||
ImgXpos = 0,
|
||||
ImgYpos = 200,
|
||||
//对应出现的Img渐入时间
|
||||
ImgUpTime = 0,
|
||||
//对应出现的Img渐出时间
|
||||
ImgDownTime = 0,
|
||||
}
|
||||
NotiArr.append(T);
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
function Proc(obj) {
|
||||
|
||||
}
|
||||
|
||||
function Draw(obj) {
|
||||
|
||||
if (NotiArr.len() > 0) {
|
||||
local T = NotiArr[0];
|
||||
|
||||
if (Timer.Get() == false || Timer.Get() == 60000) {
|
||||
Timer.Start();
|
||||
}
|
||||
if (Timer.Get() != false && Timer.Get() > 0) {
|
||||
|
||||
local Ani = null;
|
||||
if (T.ImgFrame == 99999999) {
|
||||
Ani = T_DrawDynamicAni(obj, T.ImgPath, T.ImgXpos, T.ImgYpos, T.ImgPath);
|
||||
}
|
||||
|
||||
if (Timer.Get() > (T.NotiStrPrintTime + T.NotiStrUpTime + T.NotiStrDownTime)) {
|
||||
Timer.Reset();
|
||||
if (Ani) sq_Rewind(Ani);
|
||||
NotiArr.remove(0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
local AlaphValue;
|
||||
//如果时间小于 文字渐入时间
|
||||
if (Timer.Get() <= T.NotiStrUpTime) {
|
||||
AlaphValue = sq_GetUniformVelocity(0, T.NotiStrA, Timer.Get(), T.NotiStrUpTime);
|
||||
}
|
||||
if (Timer.Get() > T.NotiStrUpTime && Timer.Get() <= (T.NotiStrPrintTime + T.NotiStrUpTime)) {
|
||||
AlaphValue = T.NotiStrA;
|
||||
}
|
||||
if (Timer.Get() > (T.NotiStrPrintTime + T.NotiStrUpTime) && Timer.Get() <= (T.NotiStrPrintTime + T.NotiStrUpTime + T.NotiStrDownTime)) {
|
||||
AlaphValue = sq_GetUniformVelocity(T.NotiStrA, 0, Timer.Get(), (T.NotiStrPrintTime + T.NotiStrUpTime + T.NotiStrDownTime));
|
||||
}
|
||||
|
||||
L_sq_DrawCode(T.NotiStr, T.NotiStrXpos, T.NotiStrYpos, sq_RGBA(T.NotiStrR, T.NotiStrG, T.NotiStrB, AlaphValue), 1, 1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Lenheart_LaunchAnnouncement(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("Lenheart_LaunchAnnouncementCObj")) {
|
||||
local Cobj = LaunchAnnouncementC();
|
||||
RootTab.rawset("Lenheart_LaunchAnnouncementCObj", Cobj);
|
||||
} else {
|
||||
RootTab["Lenheart_LaunchAnnouncementCObj"].Proc(obj);
|
||||
RootTab["Lenheart_LaunchAnnouncementCObj"].Draw(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (getroottable().rawin("LenheartFuncTab")) {
|
||||
getroottable()["LenheartFuncTab"].rawset("Lenheart_LaunchAnnouncementFunc", Lenheart_LaunchAnnouncement);
|
||||
} else {
|
||||
local T = {};
|
||||
T.rawset("Lenheart_LaunchAnnouncementFunc", Lenheart_LaunchAnnouncement);
|
||||
getroottable().rawset("LenheartFuncTab", T);
|
||||
}
|
||||
|
|
@ -0,0 +1,387 @@
|
|||
/*
|
||||
文件名:luke.nut
|
||||
路径:Plugins/Luke/luke.nut
|
||||
创建日期:2023-03-30 13:40
|
||||
文件用途:卢克主文件
|
||||
*/
|
||||
//HudPro按钮类
|
||||
class LukeButtonPro extends BasicsDrawTool // obj -- 按钮名称 -- X坐标 -- Y坐标 -- Ani调用路径 -- 宽度 -- 高度
|
||||
{
|
||||
obj = null; //Obj对象
|
||||
State = 0; //按钮状态
|
||||
ClickEnble = false; //点击效果
|
||||
ButtonDynamic = false; //动态按钮效果
|
||||
Index = 0;
|
||||
|
||||
CustomClickEnble = false; //自定义点击效果
|
||||
CustomClickAnifile = null; //自定义点击效果Ani路径
|
||||
CustomButtonName = null; //自定义点击效果名称
|
||||
CustomClickFrame = null; //自定义点击效果Ani编号
|
||||
CustomClickx = null; //自定义点击效果X坐标
|
||||
CustomClicky = null; //自定义点击效果Y坐标
|
||||
|
||||
|
||||
RectEnble = false; //悬停效果
|
||||
RectButtonName = null; //悬停名称
|
||||
RectBaseAnifile = null; //悬停Ani路径
|
||||
RectFrame = null; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = null; //悬停X坐标
|
||||
Recty = null; //悬停Y坐标
|
||||
|
||||
|
||||
ButtonName = null; //按钮名称
|
||||
x = null; //X坐标
|
||||
y = null; //Y坐标
|
||||
BaseAnifile = null; //调用Ani路径
|
||||
width = null; //可点击宽度
|
||||
length = null; //可点击高度
|
||||
//构造函数
|
||||
constructor(gObj, gButtonName, gX, gY, gAnifile, gWidth, gLength, gIndex) {
|
||||
obj = gObj;
|
||||
ButtonName = gButtonName;
|
||||
x = gX;
|
||||
y = gY;
|
||||
BaseAnifile = gAnifile;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
Index = gIndex;
|
||||
}
|
||||
//绘制按钮
|
||||
function Show() {
|
||||
isLBDown();
|
||||
isRBDown();
|
||||
if (ClickEnble) //是否开启点击效果
|
||||
{
|
||||
if (isLBDown() && State == 0) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 1; //按键进入按下状态
|
||||
++y;
|
||||
}
|
||||
if (!isLBDown() && State == 1) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 0; //按键进入弹起状态
|
||||
--y;
|
||||
}
|
||||
}
|
||||
|
||||
if (CustomClickEnble) //是否开启自定义点击效果
|
||||
{
|
||||
if (isLBDown()) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomClickFrame, CustomButtonName);
|
||||
else T_DrawDynamicAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if (RectEnble) //开启悬停效果时
|
||||
{
|
||||
if ((isInRect() && !isLBDown()) || (isInRect() && !CustomClickEnble)) //如果鼠标悬停的时候 并且没有点击的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(44);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, RectBaseAnifile, Rectx, Recty, RectFrame, RectButtonName);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
if (!isInRect()) //如果鼠标没有悬停的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(0);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, BaseAnifile, x, y, Index, ButtonName);
|
||||
else T_DrawDynamicAni(obj, BaseAnifile, x, y, ButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
//设置自定义点击效果
|
||||
function SetCustomClickEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
CustomClickEnble = bool; //自定义点击效果
|
||||
CustomClickAnifile = gAnifile; //自定义点击效果Ani路径
|
||||
CustomButtonName = gButtonName; //自定义点击效果名称
|
||||
CustomClickFrame = gFrame; //自定义点击效果Ani编号
|
||||
CustomClickx = gX; //自定义点击效果X坐标
|
||||
CustomClicky = gY; //自定义点击效果Y坐标
|
||||
}
|
||||
|
||||
//设置悬停效果
|
||||
function SetRectEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
RectEnble = bool; //悬停效果
|
||||
RectButtonName = gButtonName; //悬停名称
|
||||
RectBaseAnifile = gAnifile; //悬停Ani路径
|
||||
RectFrame = gFrame; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = gX; //悬停X坐标
|
||||
Recty = gY; //悬停Y坐标
|
||||
}
|
||||
|
||||
//设置动态按钮
|
||||
function SetClickEnble(bool) {
|
||||
ButtonDynamic = bool;
|
||||
}
|
||||
|
||||
//设置点击效果
|
||||
function SetClickEnble(bool) {
|
||||
ClickEnble = bool;
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown() {
|
||||
if (isInRect() && IMouse.GetLButton() == 1) {
|
||||
obj.getVar(ButtonName).setBool(0, true);
|
||||
return true;
|
||||
} else return false;
|
||||
}
|
||||
//右键按下状态
|
||||
function isRBDown() {
|
||||
if (isInRect() && IMouse.GetRButton() == 2) {
|
||||
obj.getVar(ButtonName).setBool(1, true);
|
||||
return true;
|
||||
} else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp() {
|
||||
if (isInRect() && IMouse.GetLButton() == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键双击状态
|
||||
function IsLBDoubleClick() {
|
||||
if (isInRect() && IMouse.GetLButton() == 64) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键单击状态
|
||||
function isLBActive() {
|
||||
if (isInRect() && IMouse.isButtonUpEvent() && obj.getVar(ButtonName).getBool(0) == true) {
|
||||
obj.getVar(ButtonName).setBool(0, false);
|
||||
return true;
|
||||
} else return false;
|
||||
}
|
||||
//右键单击状态
|
||||
function isRBActive() {
|
||||
if (isInRect() && IMouse.isButtonUpEvent() && obj.getVar(ButtonName).getBool(1) == true) {
|
||||
obj.getVar(ButtonName).setBool(1, false);
|
||||
return true;
|
||||
} else return false;
|
||||
}
|
||||
//别处点击
|
||||
function isNotLBActive() {
|
||||
|
||||
if (!isInRect() && IMouse.isButtonUpEvent()) return true;
|
||||
else return false;
|
||||
}
|
||||
//别处右键点击
|
||||
function isNotRBActive() {
|
||||
if (!isInRect() && IMouse.GetRButton() == 2) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Switch按钮类
|
||||
class LukeSwitchButtonPro extends SwitchButtonPro {
|
||||
obj = null; //Obj对象
|
||||
State = 0; //按钮状态
|
||||
ClickEnble = false; //点击效果
|
||||
ButtonDynamic = false; //动态按钮效果
|
||||
SwitchState = false; //复选框是否选中
|
||||
|
||||
CustomClickEnble = false; //自定义点击效果
|
||||
CustomClickAnifile = null; //自定义点击效果Ani路径
|
||||
CustomButtonName = null; //自定义点击效果名称
|
||||
CustomClickFrame = null; //自定义点击效果Ani编号
|
||||
CustomClickx = null; //自定义点击效果X坐标
|
||||
CustomClicky = null; //自定义点击效果Y坐标
|
||||
|
||||
|
||||
RectEnble = false; //悬停效果
|
||||
RectButtonName = null; //悬停名称
|
||||
RectBaseAnifile = null; //悬停Ani路径
|
||||
RectFrame = null; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = null; //悬停X坐标
|
||||
Recty = null; //悬停Y坐标
|
||||
|
||||
|
||||
ButtonName = null; //按钮名称
|
||||
x = null; //X坐标
|
||||
y = null; //Y坐标
|
||||
BaseAnifile = null; //调用Ani路径
|
||||
BaseAnifileFrame = null; //调用的Ani帧数
|
||||
width = null; //可点击宽度
|
||||
length = null; //可点击高度
|
||||
//构造函数
|
||||
constructor(gObj, gButtonName, gX, gY, gAnifile, gBaseAnifileFrame, gWidth, gLength) {
|
||||
obj = gObj;
|
||||
ButtonName = gButtonName;
|
||||
x = gX;
|
||||
y = gY;
|
||||
BaseAnifile = gAnifile;
|
||||
BaseAnifileFrame = gBaseAnifileFrame;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
}
|
||||
|
||||
//绘制按钮
|
||||
function Show() {
|
||||
|
||||
|
||||
if (ClickEnble) //是否开启点击效果
|
||||
{
|
||||
if (isLBDown() && State == 0) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 1; //按键进入按下状态
|
||||
++y;
|
||||
}
|
||||
if (!isLBDown() && State == 1) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 0; //按键进入弹起状态
|
||||
--y;
|
||||
}
|
||||
}
|
||||
|
||||
if (CustomClickEnble) //是否开启自定义点击效果
|
||||
{
|
||||
if (isLBDown()) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomClickFrame, CustomButtonName);
|
||||
else T_DrawDynamicAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if (RectEnble) //开启悬停效果时
|
||||
{
|
||||
if ((isInRect() && !isLBDown()) || (isInRect() && !CustomClickEnble)) //如果鼠标悬停的时候 并且没有点击的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(44);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, RectBaseAnifile, Rectx, Recty, RectFrame, RectButtonName);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if (!isInRect() && !SwitchState) //如果鼠标没有悬停的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(0);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, BaseAnifile, x, y, BaseAnifileFrame, ButtonName);
|
||||
else T_DrawDynamicAni(obj, BaseAnifile, x, y, ButtonName);
|
||||
}
|
||||
|
||||
if (!isInRect() && SwitchState) {
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, RectBaseAnifile, Rectx, Recty, RectFrame, RectButtonName);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
//设置自定义点击效果
|
||||
function SetCustomClickEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
CustomClickEnble = bool; //自定义点击效果
|
||||
CustomClickAnifile = gAnifile; //自定义点击效果Ani路径
|
||||
CustomButtonName = gButtonName; //自定义点击效果名称
|
||||
CustomClickFrame = gFrame; //自定义点击效果Ani编号
|
||||
CustomClickx = gX; //自定义点击效果X坐标
|
||||
CustomClicky = gY; //自定义点击效果Y坐标
|
||||
}
|
||||
|
||||
//设置悬停效果
|
||||
function SetRectEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
RectEnble = bool; //悬停效果
|
||||
RectButtonName = gButtonName; //悬停名称
|
||||
RectBaseAnifile = gAnifile; //悬停Ani路径
|
||||
RectFrame = gFrame; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = gX; //悬停X坐标
|
||||
Recty = gY; //悬停Y坐标
|
||||
}
|
||||
|
||||
//设置动态按钮
|
||||
function SetClickEnble(bool) {
|
||||
ButtonDynamic = bool;
|
||||
}
|
||||
|
||||
//设置点击效果
|
||||
function SetClickEnble(bool) {
|
||||
ClickEnble = bool;
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown() {
|
||||
if (isInRect() && IMouse.GetLButton() == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp() {
|
||||
if (isInRect() && IMouse.GetLButton() == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键双击状态
|
||||
function IsLBDoubleClick() {
|
||||
if (isInRect() && IMouse.GetLButton() == 64) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键单击状态
|
||||
function isLBActive() {
|
||||
if (isInRect() && IMouse.isButtonUpEvent()) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Luke(obj) {
|
||||
|
||||
//如果不在安图恩区域则不执行
|
||||
if (L_sq_GetTownIndex() != 19 || L_sq_GetRegionIndex() < 2) return;
|
||||
|
||||
//检查自己是否断线重连
|
||||
if (!getroottable().rawin("LukeDConnect")) {
|
||||
local LukeDConnect = Json_STL("LukeDConnect");
|
||||
LukeDConnect.Put("op", 25600175);
|
||||
local str = LukeDConnect.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
LukeDConnect.Delete();
|
||||
getroottable().rawset("LukeDConnect", true);
|
||||
}
|
||||
|
||||
//卢克攻坚队逻辑
|
||||
LukeParty(obj);
|
||||
//卢克城镇攻坚队界面 攻坚队队伍信息部分
|
||||
LukeTownMainControl_PartyInfo(obj);
|
||||
|
||||
//卢克攻坚副本信息
|
||||
LukeDungeonInfoControlFunc(obj);
|
||||
|
||||
|
||||
//安图恩城镇攻坚队界面 攻坚队队伍申请部分
|
||||
LukeTownMainControl_PartyReq(obj);
|
||||
}
|
||||
|
||||
function DrawLukeParty(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("LukePartyObj") && RootTab.rawin("LUKEDUNGEONINFOCONTROL") && RootTab["LUKEDUNGEONINFOCONTROL"].PageState != 1) {
|
||||
RootTab["LukePartyObj"].Draw(obj);
|
||||
|
||||
}
|
||||
if (RootTab.rawin("LukeTOWNCONTROLINFO") && RootTab["LukePartyObj"].NowSelectTeam != null && RootTab["LukePartyObj"].State == 1) {
|
||||
RootTab["LukeTOWNCONTROLINFO"].Run(obj);
|
||||
}
|
||||
|
||||
if (RootTab.rawin("LUKEDUNGEONINFOCONTROL") == false) {} else {
|
||||
RootTab["LUKEDUNGEONINFOCONTROL"].Draw(obj);
|
||||
}
|
||||
|
||||
if (RootTab.rawin("LUKETOWNMAINCONTROLREQ") == false) {} else {
|
||||
RootTab["LUKETOWNMAINCONTROLREQ"].Run(obj);
|
||||
}
|
||||
//如果安图恩主界面开启就绘制申请队伍人信息
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,512 @@
|
|||
/*
|
||||
文件名:MarrySystem.nut
|
||||
路径:Plugins/MarrySystem/MarrySystem.nut
|
||||
创建日期:2023-06-16 10:29
|
||||
文件用途:
|
||||
*/
|
||||
|
||||
class MarrySystemWindow extends BasicsDrawTool {
|
||||
//宽度
|
||||
Width = null;
|
||||
//高度
|
||||
Height = null;
|
||||
//标题高度
|
||||
TitleH = null;
|
||||
|
||||
//X坐标
|
||||
X = null;
|
||||
B_X = null;
|
||||
//Y坐标
|
||||
Y = null;
|
||||
B_Y = null;
|
||||
|
||||
YMouseSw = true;
|
||||
DeBugMode = false;
|
||||
|
||||
Mobj = null;
|
||||
M_Xpos = null;
|
||||
M_Ypos = null;
|
||||
|
||||
|
||||
constructor(gX, gY, gWidth, gHeight, gTitleH) {
|
||||
//宽度
|
||||
Width = gWidth;
|
||||
//高度
|
||||
Height = gHeight;
|
||||
//标题高度
|
||||
TitleH = gTitleH;
|
||||
|
||||
//X坐标
|
||||
X = gX;
|
||||
//Y坐标
|
||||
Y = gY;
|
||||
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
|
||||
//设定鼠标逻辑
|
||||
function LockMouse() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, Width, Height)) {
|
||||
IMouse.LockMouseClick();
|
||||
YMouseSw = false;
|
||||
} else {
|
||||
if (YMouseSw == false && sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, 0, 0, 800, 600)) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
YMouseSw = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//设定窗口拖动逻辑
|
||||
function MoveWindow() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, Width, TitleH)) {
|
||||
|
||||
if (Mobj.Lb == 1) {
|
||||
if (!M_Xpos) M_Xpos = IMouse.GetXPos(); //原始鼠标位置数据
|
||||
if (!M_Ypos) M_Ypos = IMouse.GetYPos();
|
||||
if (!B_X) B_X = X; //原始窗口位置
|
||||
if (!B_Y) B_Y = Y;
|
||||
|
||||
X = B_X - (M_Xpos - IMouse.GetXPos());
|
||||
Y = B_Y - (M_Ypos - IMouse.GetYPos());
|
||||
|
||||
} else if (Mobj.Lb == 0) {
|
||||
M_Xpos = null;
|
||||
M_Ypos = null;
|
||||
B_X = null;
|
||||
B_Y = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
if (DeBugMode) sq_DrawBox(X, Y, Width, Height, 0xffffffff);
|
||||
|
||||
//设定鼠标逻辑
|
||||
LockMouse();
|
||||
|
||||
//设定窗口拖动逻辑
|
||||
MoveWindow();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class MarrySystemC extends BasicsDrawTool {
|
||||
WindowObj = null; //窗口对象
|
||||
MainState = false; //主状态
|
||||
X = 235;
|
||||
Y = 52;
|
||||
|
||||
Avatar = null;
|
||||
LevelInfo = null;
|
||||
NameInfo = null;
|
||||
|
||||
TabName = [
|
||||
"力量 +",
|
||||
"体力 +",
|
||||
"智力 +",
|
||||
"精神 +",
|
||||
"独立攻击力 +",
|
||||
"物理攻击力 +",
|
||||
"魔法攻击力 +",
|
||||
"物理防御 +",
|
||||
"魔法防御 +",
|
||||
"移动速度 +",
|
||||
"攻击速度 +",
|
||||
"释放速度 +",
|
||||
"物理暴击 +",
|
||||
"魔法暴击 +",
|
||||
"命中率 +",
|
||||
"光属性强化 +",
|
||||
"暗属性强化 +",
|
||||
"水属性强化 +",
|
||||
"火属性强化 +",
|
||||
"全属性强化 +"
|
||||
]
|
||||
PrintAbTab = null;
|
||||
AbTab = null;
|
||||
|
||||
DgnAddBuff = false;
|
||||
|
||||
|
||||
|
||||
function PleaseMarryMe(gname) {
|
||||
local T = {
|
||||
op = 20019101,
|
||||
name = gname
|
||||
}
|
||||
local str = Json.Encode(T);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
|
||||
function PleaseDivorceMe(gname) {
|
||||
local T = {
|
||||
op = 20019103,
|
||||
name = gname
|
||||
}
|
||||
local str = Json.Encode(T);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
|
||||
function CheckOtherPlayerMarryInfo(gname) {
|
||||
local T = {
|
||||
op = 20019011,
|
||||
name = gname
|
||||
}
|
||||
local str = Json.Encode(T);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
|
||||
function CheckPlayerMarryInfo() {
|
||||
local T = {
|
||||
op = 20019009
|
||||
}
|
||||
local str = Json.Encode(T);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
|
||||
function CheckPlayerMarryInfoCallBack(Chunk) {
|
||||
local Buffer = Json_STL("CheckPlayerMarryInfoCallBackBuffer");
|
||||
Buffer.Parse(Chunk, 0, false);
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("MarrySystemCObj")) {
|
||||
local Tobj = RootTab["MarrySystemCObj"];
|
||||
|
||||
|
||||
Tobj.Avatar = {
|
||||
Player1 = Buffer.Get("job"),
|
||||
Player2 = Buffer.Get("partnerJob"),
|
||||
}
|
||||
|
||||
Tobj.LevelInfo = {
|
||||
level = Buffer.Get("lv"),
|
||||
nexp = Buffer.Get("experience"),
|
||||
mexp = Buffer.Get("experienceMax"),
|
||||
}
|
||||
|
||||
Tobj.NameInfo = {
|
||||
Player1 = Buffer.Get("name"),
|
||||
Player2 = Buffer.Get("partnerName"),
|
||||
}
|
||||
|
||||
Tobj.PrintAbTab = null;
|
||||
Tobj.PrintAbTab = [];
|
||||
Tobj.AbTab = null;
|
||||
Tobj.AbTab = [];
|
||||
for (local i = 0; i < 20; i++) {
|
||||
local buf = Buffer.Get("attribute->" + i);
|
||||
if (!buf && i == 0) break;
|
||||
Tobj.PrintAbTab.append(buf);
|
||||
Tobj.AbTab.append(buf);
|
||||
}
|
||||
|
||||
local EventTab = null;
|
||||
if (RootTab.rawin("YosinPlayerEachSystem")) {
|
||||
EventTab = RootTab["YosinPlayerEachSystem"];
|
||||
local pos1 = null;
|
||||
local pos2 = null;
|
||||
foreach(pos, value in EventTab) {
|
||||
if (value.Name == "邀请结婚") {
|
||||
pos1 = pos;
|
||||
}
|
||||
if (value.Name == "我要离婚") {
|
||||
pos2 = pos;
|
||||
}
|
||||
}
|
||||
if (pos1) EventTab.remove(pos1);
|
||||
if (pos2) EventTab.remove(pos2);
|
||||
if (Tobj.PrintAbTab == null) PlayerEachIcon("邀请结婚", Tobj.PleaseMarryMe);
|
||||
else PlayerEachIcon("我要离婚", Tobj.PleaseDivorceMe);
|
||||
}
|
||||
if (EventTab) {
|
||||
RootTab.rawdelete("YosinPlayerEachSystem");
|
||||
RootTab.rawset("YosinPlayerEachSystem", EventTab);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function CheckOtherPlayerMarryInfoCallBack(Chunk) {
|
||||
local Buffer = Json_STL("CheckOtherPlayerMarryInfoCallBackBuffer");
|
||||
Buffer.Parse(Chunk, 0, false);
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("MarrySystemCObj")) {
|
||||
local Tobj = RootTab["MarrySystemCObj"];
|
||||
Tobj.MainState = true;
|
||||
L_NewWindows("Lenheart", 170, 0x65535);
|
||||
local W = sq_GetPopupWindowMainCotrol(170);
|
||||
W.SetVisible(false);
|
||||
W.SetEnable(false);
|
||||
// BandObject.OpenClassCallBack();
|
||||
|
||||
Tobj.Avatar = null;
|
||||
if (Buffer.Get("job")) {
|
||||
Tobj.Avatar = {
|
||||
Player1 = Buffer.Get("job"),
|
||||
Player2 = Buffer.Get("partnerJob"),
|
||||
}
|
||||
}
|
||||
|
||||
Tobj.LevelInfo = null;
|
||||
if (Buffer.Get("lv")) {
|
||||
Tobj.LevelInfo = {
|
||||
level = Buffer.Get("lv"),
|
||||
nexp = Buffer.Get("experience"),
|
||||
mexp = Buffer.Get("experienceMax"),
|
||||
}
|
||||
}
|
||||
|
||||
Tobj.NameInfo = null;
|
||||
if (Buffer.Get("name")) {
|
||||
Tobj.NameInfo = {
|
||||
Player1 = Buffer.Get("name"),
|
||||
Player2 = Buffer.Get("partnerName"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Tobj.PrintAbTab = null;
|
||||
Tobj.PrintAbTab = [];
|
||||
for (local i = 0; i < 20; i++) {
|
||||
local buf = Buffer.Get("attribute->" + i);
|
||||
if (!buf && i == 0) break;
|
||||
Tobj.PrintAbTab.append(buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function DivorceCallBack(Chunk) {
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("MarrySystemCObj")) {
|
||||
RootTab.rawdelete("MarrySystemCObj");
|
||||
}
|
||||
}
|
||||
|
||||
constructor() {
|
||||
|
||||
|
||||
Pack_Control.rawset(20019010, CheckPlayerMarryInfoCallBack);
|
||||
Pack_Control.rawset(20019012, CheckOtherPlayerMarryInfoCallBack);
|
||||
Pack_Control.rawset(20019106, DivorceCallBack);
|
||||
|
||||
|
||||
CheckPlayerMarryInfo();
|
||||
}
|
||||
|
||||
function T_DrawDynamicAni(obj, aniFileName, x, y, aniname) {
|
||||
local ani = obj.getVar().GetAnimationMap(aniname, aniFileName);
|
||||
sq_AnimationProc(ani);
|
||||
sq_drawCurrentFrame(ani, x, y, true);
|
||||
return ani;
|
||||
}
|
||||
|
||||
function T_DrawDynamicAni_Fx(obj, aniFileName, x, y, aniname) {
|
||||
local ani = obj.getVar().GetAnimationMap(aniname, aniFileName);
|
||||
ani.setImageRateFromOriginal(-1.0, 1.0);
|
||||
sq_AnimationProc(ani);
|
||||
sq_drawCurrentFrame(ani, x, y, true);
|
||||
return ani;
|
||||
}
|
||||
|
||||
//绘制等级相关信息
|
||||
function DrawLevelInfo(obj) {
|
||||
if (Avatar && LevelInfo) {
|
||||
local PosArr = [
|
||||
[40, 75],
|
||||
[40, 75],
|
||||
[54, 24],
|
||||
[60, 86],
|
||||
[40, 45],
|
||||
[50, 50],
|
||||
[50, 50],
|
||||
[50, 45],
|
||||
[55, 70],
|
||||
[40, 75],
|
||||
[60, 86],
|
||||
];
|
||||
//绘制职业
|
||||
// for (local i = 0; i < 10; i++) {
|
||||
// local SSS = Avatar.Player1 + i;
|
||||
// T_DrawDynamicAni(obj, "common/marrysystem/avatar/" + SSS + ".ani", X + PosArr[SSS][0], Y + PosArr[SSS][1], "MarrySystem_player" + SSS);
|
||||
// }
|
||||
T_DrawDynamicAni(obj, "common/marrysystem/avatar/" + Avatar.Player1 + ".ani", X + PosArr[Avatar.Player1][0], Y + PosArr[Avatar.Player1][1], "MarrySystem_player1" + Avatar.Player1);
|
||||
T_DrawDynamicAni_Fx(obj, "common/marrysystem/avatar/" + Avatar.Player2 + ".ani", X + 215 + PosArr[Avatar.Player2][0], Y + PosArr[Avatar.Player2][1], "MarrySystem_player2" + Avatar.Player2);
|
||||
|
||||
//婚姻名字
|
||||
L_sq_DrawCode(NameInfo.Player1, X + 68, Y + 190, sq_RGBA(230, 200, 155, 250), 1, 1);
|
||||
L_sq_DrawCode(NameInfo.Player2, X + 68 + 158, Y + 190, sq_RGBA(230, 200, 155, 250), 1, 1);
|
||||
|
||||
//婚戒等级
|
||||
T_DrawStayAni(obj, "common/marrysystem/coupleinfopopupui.ani", X + 14, Y + 221, 1 + LevelInfo.level, "MarrySystem_LEVEL_c");
|
||||
|
||||
//婚姻等级
|
||||
L_sq_DrawCode("Lv . " + LevelInfo.level, X + 80, Y + 236, sq_RGBA(230, 200, 155, 250), 1, 1);
|
||||
|
||||
//婚姻经验
|
||||
L_sq_DrawCode(LevelInfo.nexp + " / " + LevelInfo.mexp, X + 208, Y + 220, sq_RGBA(230, 200, 155, 250), 1, 1);
|
||||
//进度条
|
||||
T_DrawStayAni(obj, "common/marrysystem/main.ani", X + 144, Y + 228, 1, "MarrySystem_Now_Main");
|
||||
setClip(X + 144, Y + 228, X + 144 + ((LevelInfo.nexp.tofloat() / LevelInfo.mexp.tofloat()) * 174.0).tointeger(), Y + 228 + 23); //开始裁切
|
||||
T_DrawStayAni(obj, "common/marrysystem/main.ani", X + 144, Y + 228, 2, "MarrySystem_Max_Main");
|
||||
releaseClip(); //裁切结束
|
||||
}
|
||||
}
|
||||
|
||||
//附加属性
|
||||
function AddAb(obj) {
|
||||
if (sq_GetCurrentModuleType() == 3) {
|
||||
if (!AbTab) return;
|
||||
|
||||
if (DgnAddBuff == false) {
|
||||
DgnAddBuff = true;
|
||||
|
||||
local appendage = CNSquirrelAppendage.sq_AppendAppendage(obj, obj, -1, false, "appendage/marry/marry.nut", true);
|
||||
CNSquirrelAppendage.sq_Append(appendage, obj, obj);
|
||||
|
||||
local change_appendage = appendage.sq_getChangeStatus("Yosin_MarryDgnBuff");
|
||||
if (!change_appendage) {
|
||||
change_appendage = appendage.sq_AddChangeStatusAppendageID(obj, obj, 0,
|
||||
CHANGE_STATUS_TYPE_COOLTIME_DECLINE,
|
||||
false, 0, 114515);
|
||||
}
|
||||
if (change_appendage) {
|
||||
change_appendage.clearParameter();
|
||||
//print(WearSlotM.Item.TabName[0]);
|
||||
|
||||
foreach(Key, Value in AbTab) {
|
||||
if (Key == 0) change_appendage.addParameter(0, false, Value.tofloat());
|
||||
else if (Key == 1) change_appendage.addParameter(3, false, Value.tofloat());
|
||||
else if (Key == 2) change_appendage.addParameter(2, false, Value.tofloat());
|
||||
else if (Key == 3) change_appendage.addParameter(1, false, Value.tofloat());
|
||||
else if (Key == 4) change_appendage.addParameter(53, false, Value.tofloat());
|
||||
else if (Key == 5) change_appendage.addParameter(4, false, Value.tofloat());
|
||||
else if (Key == 6) change_appendage.addParameter(31, false, Value.tofloat());
|
||||
else if (Key == 7) change_appendage.addParameter(5, false, Value.tofloat());
|
||||
else if (Key == 8) change_appendage.addParameter(32, false, Value.tofloat());
|
||||
else if (Key == 9) change_appendage.addParameter(11, false, Value.tofloat());
|
||||
else if (Key == 10) change_appendage.addParameter(10, false, Value.tofloat());
|
||||
else if (Key == 11) change_appendage.addParameter(12, false, Value.tofloat());
|
||||
else if (Key == 12) change_appendage.addParameter(15, false, Value.tofloat() / 10.0);
|
||||
else if (Key == 13) change_appendage.addParameter(16, false, Value.tofloat() / 10.0);
|
||||
else if (Key == 14) change_appendage.addParameter(33, false, 0 - (Value.tofloat() / 10.0));
|
||||
|
||||
else if (Key == 15) change_appendage.addParameter(45, false, Value.tofloat());
|
||||
else if (Key == 16) change_appendage.addParameter(44, false, Value.tofloat());
|
||||
else if (Key == 17) change_appendage.addParameter(43, false, Value.tofloat());
|
||||
else if (Key == 18) change_appendage.addParameter(42, false, Value.tofloat());
|
||||
else if (Key == 19) change_appendage.addParameter(46, false, Value.tofloat());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
DgnAddBuff = false;
|
||||
}
|
||||
}
|
||||
|
||||
//绘制属性
|
||||
function DrawAttribute(obj) {
|
||||
if (PrintAbTab) {
|
||||
for (local i = 0; i < 20; i++) {
|
||||
L_sq_DrawCode(TabName[i] + " " + PrintAbTab[i], X + 20 + ((i / 10) * 170), Y + 264 + ((i % 10) * 17), sq_RGBA(255, 255, 255, 250), 1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
//窗口
|
||||
T_DrawStayAni(obj, "common/marrysystem/main.ani", X, Y, 0, "MarrySystemMain");
|
||||
|
||||
//绘制等级相关信息
|
||||
if (LevelInfo) DrawLevelInfo(obj);
|
||||
//绘制属性相关信息
|
||||
DrawAttribute(obj);
|
||||
}
|
||||
|
||||
//开启界面回调
|
||||
function OpenClassCallBack() {
|
||||
|
||||
L_NewWindows("Lenheart", 170, 0x65535);
|
||||
local W = sq_GetPopupWindowMainCotrol(170);
|
||||
W.SetVisible(false);
|
||||
W.SetEnable(false);
|
||||
|
||||
CheckPlayerMarryInfo();
|
||||
}
|
||||
|
||||
//绘制入口
|
||||
function Draw(obj) {
|
||||
if (MainState) {
|
||||
if (WindowObj) {
|
||||
DrawMain(obj);
|
||||
WindowObj.Show(obj);
|
||||
X = WindowObj.X;
|
||||
Y = WindowObj.Y;
|
||||
} else {
|
||||
WindowObj = MarrySystemWindow(X, Y, 329, 404, 28); //坐标 大小 标题栏高度
|
||||
// WindowObj.DeBugMode = true;
|
||||
}
|
||||
} else {
|
||||
if (WindowObj && WindowObj.YMouseSw == false) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
WindowObj.YMouseSw = true;
|
||||
WindowObj = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
//附加属性
|
||||
AddAb(obj);
|
||||
if (KeyPressNB.isKeyPress(48, "MarrySystemCloseKey")) {
|
||||
MainState = false;
|
||||
}
|
||||
|
||||
if(obj.isDead()){
|
||||
DgnAddBuff = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function MarrySystem(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("MarrySystemCObj")) {
|
||||
local Cobj = MarrySystemC();
|
||||
RootTab.rawset("MarrySystemCObj", Cobj);
|
||||
EventIcon("婚姻殿堂", 31, 31, Cobj);
|
||||
PlayerEachIcon("查看婚姻信息", Cobj.CheckOtherPlayerMarryInfo);
|
||||
// PlayerEachIcon("我要离婚", PleaseDivorceMe);
|
||||
if (RootTab.rawin("YosinPlayerEachSystem")) {
|
||||
local EventTab = RootTab["YosinPlayerEachSystem"];
|
||||
local pos1 = null;
|
||||
local pos2 = null;
|
||||
foreach(pos, value in EventTab) {
|
||||
if (value.Name == "邀请结婚") {
|
||||
pos1 = pos;
|
||||
}
|
||||
if (value.Name == "我要离婚") {
|
||||
pos2 = pos;
|
||||
}
|
||||
}
|
||||
if (pos1) EventTab.remove(pos1);
|
||||
if (pos2) EventTab.remove(pos2);
|
||||
if (Cobj.PrintAbTab == null) PlayerEachIcon("邀请结婚", Cobj.PleaseMarryMe);
|
||||
else PlayerEachIcon("我要离婚", Cobj.PleaseDivorceMe);
|
||||
}
|
||||
} else {
|
||||
RootTab["MarrySystemCObj"].Proc(obj);
|
||||
RootTab["MarrySystemCObj"].Draw(obj);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,380 @@
|
|||
/*
|
||||
文件名:MidsummerParty.nut
|
||||
路径:Plugins/MidsummerParty/MidsummerParty.nut
|
||||
创建日期:2023-10-28 17:40
|
||||
文件用途:
|
||||
*/
|
||||
|
||||
class MidsummerPartyC extends BasicsDrawTool {
|
||||
WindowObj = null; //窗口对象
|
||||
MainState = false; //主状态
|
||||
X = 0;
|
||||
Y = 0;
|
||||
|
||||
InitState = false;
|
||||
|
||||
ItemInfoObject = null;
|
||||
RewardItemObject = null;
|
||||
UseItemInfo = null;
|
||||
ExRewardSchedule = null;
|
||||
|
||||
function GetInfoCallBack(Chunk) {
|
||||
// Sout("收到包 : \n %L", Chunk);
|
||||
local Jso = Json.Decode(Chunk);
|
||||
foreach(Value in Jso.items) {
|
||||
if (Value.Name2.len() == 0)
|
||||
Value.Name2 = "Rindro-Team";
|
||||
ItemInfoObject[Value.Id] <- Value;
|
||||
}
|
||||
}
|
||||
|
||||
function GetInfo() {
|
||||
local T = {
|
||||
op = 20061001
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
EndRewardFlag = false;
|
||||
|
||||
function GetRewardInfoCallBack(Chunk) {
|
||||
// Sout("收到包 : \n %L", Chunk);
|
||||
local Jso = Json.Decode(Chunk);
|
||||
//常规奖励
|
||||
foreach(Value in Jso.items) {
|
||||
RewardItemObject[Value.index] <- Value;
|
||||
// if (Value.ifhas == 0) EndRewardFlag = false;
|
||||
}
|
||||
//最终奖励
|
||||
RewardItemObject["ExReward"] <- Jso.endItem;
|
||||
//是否已经集齐
|
||||
EndRewardFlag = Jso.endani;
|
||||
//消耗道具
|
||||
UseItemInfo.Id <- Jso.useItem;
|
||||
//消耗道具数量
|
||||
UseItemInfo.Count <- Jso.usrItemNum;
|
||||
if (UseItemInfo.Count > 16) UseItemInfo.Count = 16;
|
||||
//特殊奖励均衡器
|
||||
ExRewardSchedule = Jso.plusNum;
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
switch (ExRewardSchedule) {
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
obj.sq_PlaySound("SUMMERLISTEN_PLAY_01");
|
||||
break;
|
||||
case 2:
|
||||
obj.sq_PlaySound("SUMMERLISTEN_PLAY_02");
|
||||
break;
|
||||
case 3:
|
||||
obj.sq_PlaySound("SUMMERLISTEN_PLAY_03");
|
||||
break;
|
||||
case 4:
|
||||
obj.sq_PlaySound("SUMMERLISTEN_PLAY_04");
|
||||
break;
|
||||
}
|
||||
|
||||
InitState = true;
|
||||
}
|
||||
|
||||
function GetRewardInfo() {
|
||||
local T = {
|
||||
op = 20061003
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
|
||||
AnimotionState = 0;
|
||||
AnimotionEndFlag = 0;
|
||||
NowReawrdObject = null;
|
||||
|
||||
function LotteryPackCallBack(Chunk) {
|
||||
// Sout("收到包 : \n %L", Chunk);
|
||||
local Jso = Json.Decode(Chunk);
|
||||
NowReawrdObject = Jso.item;
|
||||
AnimotionState = 1;
|
||||
AnimotionEndFlag = Jso.endani;
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
obj.sq_PlaySound("SUMMERLISTEN_START");
|
||||
}
|
||||
|
||||
//抽奖包
|
||||
function LotteryPack() {
|
||||
local T = {
|
||||
op = 20061005
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function EndRewardPackCallBack(Chunk) {
|
||||
GetRewardInfo();
|
||||
}
|
||||
|
||||
|
||||
//最终奖励包
|
||||
function EndRewardPack() {
|
||||
local T = {
|
||||
op = 20061009
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
|
||||
constructor() {
|
||||
ItemInfoObject = {};
|
||||
RewardItemObject = {};
|
||||
UseItemInfo = {};
|
||||
|
||||
//获取基础配置回调包
|
||||
Pack_Control.rawset(20061002, GetInfoCallBack.bindenv(this));
|
||||
//获取奖励配置回调包
|
||||
Pack_Control.rawset(20061004, GetRewardInfoCallBack.bindenv(this));
|
||||
//抽奖回调包
|
||||
Pack_Control.rawset(20061008, LotteryPackCallBack.bindenv(this));
|
||||
//最终奖励回包
|
||||
Pack_Control.rawset(20061010, EndRewardPackCallBack.bindenv(this));
|
||||
|
||||
//获取基础配置
|
||||
GetInfo();
|
||||
//获取奖励配置
|
||||
GetRewardInfo();
|
||||
}
|
||||
|
||||
function DrawRewardAnimotion(obj) {
|
||||
if (AnimotionState == 1) {
|
||||
local Ani = T_DrawDynamicAni(obj, "common/midsummerpartypackage/main_play.ani", X, Y, "MidsummerPartyCR1Effect");
|
||||
if (sq_IsEnd(Ani)) {
|
||||
sq_Rewind(Ani);
|
||||
AnimotionState = 2;
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
obj.sq_PlaySound("SUMMERLISTEN_RESULT");
|
||||
}
|
||||
} else if (AnimotionState == 2) {
|
||||
local Ani = T_DrawDynamicAni(obj, "common/midsummerpartypackage/main_slotchange.ani", X + 81 + ((NowReawrdObject.index % 4) * 132), Y + 102 + ((NowReawrdObject.index / 4) * 70), "MidsummerPartyCR2Effect");
|
||||
if (sq_IsEnd(Ani)) {
|
||||
sq_Rewind(Ani);
|
||||
AnimotionState = 3;
|
||||
}
|
||||
} else if (AnimotionState == 3) {
|
||||
local path = "normal";
|
||||
if (NowReawrdObject.typ == 1) path = "special";
|
||||
local Ani = T_DrawDynamicAni(obj, "common/midsummerpartypackage/reward_" + path + "_00.ani", X, Y, "MidsummerPartyCREffect" + NowReawrdObject.typ);
|
||||
//特殊奖励
|
||||
DrawItemEx(X + 382, Y + 285, NowReawrdObject.itemid, NowReawrdObject.num);
|
||||
|
||||
local OkButton = LenheartBaseButton(X + 362, Y + 344, 68, 35, "interface2/cs_shop/cs_packageevent/2021_summer/hearoursummer.img", 11);
|
||||
OkButton.Show();
|
||||
if (OkButton.isLBActive()) {
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
obj.sq_PlaySound("SUMMERLISTEN_CLICK");
|
||||
|
||||
if (AnimotionEndFlag) {
|
||||
AnimotionState = 4;
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
obj.sq_PlaySound("SUMMERLISTEN_RESULT_02");
|
||||
} else {
|
||||
AnimotionState = 0;
|
||||
}
|
||||
|
||||
GetRewardInfo();
|
||||
}
|
||||
} else if (AnimotionState == 4) {
|
||||
local Ani = T_DrawDynamicAni(obj, "common/midsummerpartypackage/main_slotchange_all.ani", X, Y, "MidsummerPartyCR6Effect");
|
||||
if (sq_IsEnd(Ani)) {
|
||||
sq_Rewind(Ani);
|
||||
AnimotionState = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
if (!InitState) return;
|
||||
//绘制主界面
|
||||
L_sq_DrawImg("interface2/cs_shop/cs_packageevent/2021_summer/hearoursummer.img", 0, X, Y);
|
||||
L_sq_SetDrawImgModel(2, 0);
|
||||
L_sq_DrawImg("interface2/cs_shop/cs_packageevent/2021_summer/hearoursummer.img", 44, X + 242, Y + 22, 0, sq_RGBA(255, 255, 255, 250), 1.0, 1.0, 1);
|
||||
L_sq_ReleaseDrawImgModel();
|
||||
T_DrawDynamicAni(obj, "common/midsummerpartypackage/main_loop.ani", X, Y, "MidsummerPartyCMainEffect");
|
||||
|
||||
if (EndRewardFlag) {
|
||||
L_sq_DrawImg("interface2/cs_shop/cs_packageevent/2021_summer/hearoursummer.img", 39, X + 92, Y + 114);
|
||||
|
||||
local OkButton = LenheartBaseButton(X + 652, Y + 239, 68, 35, "interface2/cs_shop/cs_packageevent/2021_summer/hearoursummer.img", 11);
|
||||
OkButton.Show();
|
||||
if (OkButton.isLBActive()) {
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
obj.sq_PlaySound("SUMMERLISTEN_CLICK");
|
||||
EndRewardPack();
|
||||
}
|
||||
} else {
|
||||
//常规奖励
|
||||
foreach(Value in RewardItemObject) {
|
||||
if ("index" in Value) {
|
||||
if (Value.ifhas) {
|
||||
L_sq_DrawImg("interface2/cs_shop/cs_packageevent/2021_summer/hearoursummer.img", 23 + Value.index, X + 81 + ((Value.index % 4) * 132), Y + 102 + ((Value.index / 4) * 70));
|
||||
} else {
|
||||
DrawItemEx(X + 142 + ((Value.index % 4) * 132), Y + 134 + ((Value.index / 4) * 70), Value.itemid, Value.num);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//特殊奖励
|
||||
DrawItemEx(X + 672, Y + 204, RewardItemObject.ExReward, 1);
|
||||
|
||||
//消耗道具信息绘制
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X + 271, Y + 448, 24, 24)) {
|
||||
ItemInfoDrawS = {};
|
||||
ItemInfoDrawS.X <- X + 271;
|
||||
ItemInfoDrawS.Y <- Y + 448;
|
||||
ItemInfoDrawS.ItemId <- UseItemInfo.Id;
|
||||
}
|
||||
|
||||
//消耗道具数量绘制
|
||||
L_sq_DrawImg("interface2/cs_shop/cs_packageevent/2021_summer/num_blue.img", 10, X + 258, Y + 465);
|
||||
DrawSmallNumber(UseItemInfo.Count);
|
||||
|
||||
//特殊奖励均衡器
|
||||
L_sq_DrawImg("interface2/cs_shop/cs_packageevent/2021_summer/hearoursummer.img", 5 + ExRewardSchedule, X + 459, Y + 431);
|
||||
|
||||
|
||||
|
||||
//启动按钮
|
||||
local PlayButton = LenheartBaseButton(X + 338, Y + 410, 121, 86, "interface2/cs_shop/cs_packageevent/2021_summer/hearoursummer.img", 1);
|
||||
PlayButton.Show();
|
||||
if (PlayButton.isLBActive()) {
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
obj.sq_PlaySound("SUMMERLISTEN_TAG");
|
||||
LotteryPack();
|
||||
}
|
||||
|
||||
//购买按钮
|
||||
local ShopButton = LenheartBaseButton(X + 352, Y + 500, 121, 86, "interface2/cs_shop/cs_packageevent/2021_summer/hearoursummer.img", 40);
|
||||
ShopButton.Show();
|
||||
if (ShopButton.isLBActive()) {
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
obj.sq_PlaySound("SUMMERLISTEN_CLICK");
|
||||
L_sq_UseSkill(DIK_F5);
|
||||
MainState = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//开启界面回调
|
||||
function OpenClassCallBack() {
|
||||
|
||||
L_NewWindows("Lenheart", 170, 0x65535);
|
||||
local W = sq_GetPopupWindowMainCotrol(170);
|
||||
W.SetVisible(false);
|
||||
W.SetEnable(false);
|
||||
|
||||
|
||||
//获取奖励配置
|
||||
GetRewardInfo();
|
||||
}
|
||||
|
||||
|
||||
//绘制道具相信信息
|
||||
ItemObject = null;
|
||||
|
||||
function DrawItemInfo(obj) {
|
||||
if (ItemInfoDrawS && ItemInfoObject) {
|
||||
if (!ItemObject) {
|
||||
local ItemId = ItemInfoDrawS.ItemId;
|
||||
if (ItemInfoObject.rawin(ItemId)) {
|
||||
ItemObject = ItemInfoClass(ItemInfoObject[ItemId]);
|
||||
}
|
||||
}
|
||||
ItemObject.Show(ItemInfoDrawS.X, ItemInfoDrawS.Y - ItemObject.PageLength);
|
||||
} else {
|
||||
ItemObject = null;
|
||||
}
|
||||
}
|
||||
|
||||
ItemInfoDrawS = null;
|
||||
//绘制入口
|
||||
function Draw(obj) {
|
||||
ItemInfoDrawS = null;
|
||||
|
||||
if (MainState) {
|
||||
if (WindowObj) {
|
||||
DrawMain(obj);
|
||||
DrawRewardAnimotion(obj);
|
||||
WindowObj.Show(obj);
|
||||
X = WindowObj.X;
|
||||
Y = WindowObj.Y;
|
||||
|
||||
DrawItemInfo(obj);
|
||||
} else {
|
||||
WindowObj = LenheartWindow(X, Y, 800, 600, 28); //坐标 大小 标题栏高度
|
||||
// WindowObj.DeBugMode = true;
|
||||
}
|
||||
} else {
|
||||
if (WindowObj && WindowObj.YMouseSw == false) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
WindowObj.YMouseSw = true;
|
||||
WindowObj = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
if (KeyPressNB.isKeyPress(48, "MidsummerPartyCloseKey")) {
|
||||
MainState = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//绘制道具带道具信息
|
||||
function DrawItemEx(X, Y, Id, Count) {
|
||||
L_Sq_DrawItem(X, Y, Id, Count, 0, 0, 0);
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, 24, 24)) {
|
||||
ItemInfoDrawS = {};
|
||||
ItemInfoDrawS.X <- X;
|
||||
ItemInfoDrawS.Y <- Y;
|
||||
ItemInfoDrawS.ItemId <- Id;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//绘制等级数字
|
||||
function DrawSmallNumber(num) {
|
||||
num = num.tostring();
|
||||
local x = X + 284;
|
||||
local y = Y + 465;
|
||||
if (num.len() == 2) x = X + 276;
|
||||
for (local i = 0; i< num.len(); i++) {
|
||||
local n = num.slice(i, i + 1);
|
||||
n = n.tointeger();
|
||||
local Img = "interface2/cs_shop/cs_packageevent/2021_summer/num_blue.img";
|
||||
L_sq_DrawImg(Img, n, x + (i * 9), y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function MidsummerParty(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("MidsummerPartyCObj")) {
|
||||
local Cobj = MidsummerPartyC();
|
||||
RootTab.rawset("MidsummerPartyCObj", Cobj);
|
||||
EventIcon("希曼音乐会", 133, 133, Cobj);
|
||||
} else {
|
||||
RootTab["MidsummerPartyCObj"].Proc(obj);
|
||||
RootTab["MidsummerPartyCObj"].Draw(obj);
|
||||
}
|
||||
}
|
||||
if (getroottable().rawin("LenheartFuncTab")) {
|
||||
getroottable()["LenheartFuncTab"].rawset("MidsummerParty_LenheartFunc", MidsummerParty);
|
||||
} else {
|
||||
local T = {};
|
||||
T.rawset("MidsummerParty_LenheartFunc", MidsummerParty);
|
||||
getroottable().rawset("LenheartFuncTab", T);
|
||||
}
|
||||
|
|
@ -0,0 +1,446 @@
|
|||
/*
|
||||
文件名:NewUpgrade.nut
|
||||
路径:Plugins/NewUpgrade/NewUpgrade.nut
|
||||
创建日期:2023-03-06 13:14
|
||||
文件用途:新版强化系统
|
||||
*/
|
||||
|
||||
//HudPro按钮类
|
||||
class UpgradeButtonPro extends BasicsDrawTool // obj -- 按钮名称 -- X坐标 -- Y坐标 -- Ani调用路径 -- 宽度 -- 高度
|
||||
{
|
||||
obj = null; //Obj对象
|
||||
State = 0; //按钮状态
|
||||
ClickEnble = false; //点击效果
|
||||
ButtonDynamic = false; //动态按钮效果
|
||||
BaseFrame = null;
|
||||
|
||||
CustomClickEnble = false; //自定义点击效果
|
||||
CustomClickAnifile = null; //自定义点击效果Ani路径
|
||||
CustomButtonName = null; //自定义点击效果名称
|
||||
CustomClickFrame = null; //自定义点击效果Ani编号
|
||||
CustomClickx = null; //自定义点击效果X坐标
|
||||
CustomClicky = null; //自定义点击效果Y坐标
|
||||
|
||||
|
||||
RectEnble = false; //悬停效果
|
||||
RectButtonName = null; //悬停名称
|
||||
RectBaseAnifile = null; //悬停Ani路径
|
||||
RectFrame = null; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = null; //悬停X坐标
|
||||
Recty = null; //悬停Y坐标
|
||||
|
||||
|
||||
ButtonName = null; //按钮名称
|
||||
x = null; //X坐标
|
||||
y = null; //Y坐标
|
||||
BaseAnifile = null; //调用Ani路径
|
||||
width = null; //可点击宽度
|
||||
length = null; //可点击高度
|
||||
|
||||
Mobj = null; //鼠标对象
|
||||
//构造函数
|
||||
constructor(gObj, gButtonName, gX, gY, gAnifile, gWidth, gLength, gBaseFrame) {
|
||||
obj = gObj;
|
||||
ButtonName = gButtonName;
|
||||
x = gX;
|
||||
y = gY;
|
||||
BaseAnifile = gAnifile;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
BaseFrame = gBaseFrame;
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
//绘制按钮
|
||||
function Show() {
|
||||
if (ClickEnble) //是否开启点击效果
|
||||
{
|
||||
if (isLBDown() && State == 0) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 1; //按键进入按下状态
|
||||
++y;
|
||||
}
|
||||
if (!isLBDown() && State == 1) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 0; //按键进入弹起状态
|
||||
--y;
|
||||
}
|
||||
}
|
||||
|
||||
if (CustomClickEnble) //是否开启自定义点击效果
|
||||
{
|
||||
if (isLBDown()) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomClickFrame, CustomButtonName);
|
||||
else T_DrawDynamicAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if (RectEnble) //开启悬停效果时
|
||||
{
|
||||
if ((isInRect() && !isLBDown()) || (isInRect() && !CustomClickEnble)) //如果鼠标悬停的时候 并且没有点击的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(44);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, RectBaseAnifile, Rectx, Recty, RectFrame, RectButtonName);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
if (!isInRect()) //如果鼠标没有悬停的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(0);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, BaseAnifile, x, y, BaseFrame, ButtonName);
|
||||
else T_DrawDynamicAni(obj, BaseAnifile, x, y, ButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
//设置自定义点击效果
|
||||
function SetCustomClickEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
CustomClickEnble = bool; //自定义点击效果
|
||||
CustomClickAnifile = gAnifile; //自定义点击效果Ani路径
|
||||
CustomButtonName = gButtonName; //自定义点击效果名称
|
||||
CustomClickFrame = gFrame; //自定义点击效果Ani编号
|
||||
CustomClickx = gX; //自定义点击效果X坐标
|
||||
CustomClicky = gY; //自定义点击效果Y坐标
|
||||
}
|
||||
|
||||
//设置悬停效果
|
||||
function SetRectEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
RectEnble = bool; //悬停效果
|
||||
RectButtonName = gButtonName; //悬停名称
|
||||
RectBaseAnifile = gAnifile; //悬停Ani路径
|
||||
RectFrame = gFrame; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = gX; //悬停X坐标
|
||||
Recty = gY; //悬停Y坐标
|
||||
}
|
||||
|
||||
//设置动态按钮
|
||||
function SetClickEnble(bool) {
|
||||
ButtonDynamic = bool;
|
||||
}
|
||||
|
||||
//设置点击效果
|
||||
function SetClickEnble(bool) {
|
||||
ClickEnble = bool;
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown() {
|
||||
if (isInRect() && Mobj.Lb == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp() {
|
||||
if (isInRect() && Mobj.Lb == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
//左键单击状态
|
||||
function isLBActive() {
|
||||
if (isInRect() && Mobj.LbEvent) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class UpgradeWindow 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 && sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, 0, 0, 800, 600)) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
YMouseSw = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
//sq_DrawBox(X, Y, Width, Height, 0xffffffff);
|
||||
|
||||
//设定鼠标逻辑
|
||||
LockMouse();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class UpgradeC extends BasicsDrawTool {
|
||||
BaseX = 0;
|
||||
BaseY = 0;
|
||||
State = false;
|
||||
Sw = false;
|
||||
WindowObj = null;
|
||||
|
||||
EquObj = null;
|
||||
//所需材料组
|
||||
NedItemArr = null;
|
||||
//幸运值
|
||||
Lucky_Value = 0;
|
||||
|
||||
//幸运值回调
|
||||
function GetLuckyValue(Chunk) {
|
||||
local Buffer = Json_STL("UpgradeGetEquInfo");
|
||||
Buffer.Parse(Chunk, 0, false);
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("UpgradeObj")) {
|
||||
RootTab["UpgradeObj"].Lucky_Value = Buffer.Get("lucky_value");
|
||||
}
|
||||
}
|
||||
|
||||
//当前对象信息回调
|
||||
function GetEquInfo(Chunk) {
|
||||
local Buffer = Json_STL("UpgradeGetEquInfo");
|
||||
Buffer.Parse(Chunk, 0, false);
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("UpgradeObj")) {
|
||||
RootTab["UpgradeObj"].EquObj = null;
|
||||
RootTab["UpgradeObj"].NedItemArr = [];
|
||||
|
||||
if (Buffer.Get("ok")) {
|
||||
RootTab["UpgradeObj"].EquObj = {
|
||||
id = Buffer.Get("id"),
|
||||
name = Buffer.Get("name"),
|
||||
grade = Buffer.Get("grade"),
|
||||
upgrade = Buffer.Get("upgrade"),
|
||||
pos = Buffer.Get("pos"),
|
||||
}
|
||||
|
||||
local Size = Buffer.Get("size");
|
||||
if (Size && Size > 0) {
|
||||
for (local i = 0; i < Size; i++) {
|
||||
local barr = {
|
||||
name = Buffer.Get("upgradeitem->" + i + "->name"),
|
||||
id = Buffer.Get("upgradeitem->" + i + "->id"),
|
||||
count = Buffer.Get("upgradeitem->" + i + "->count"),
|
||||
rarity = Buffer.Get("upgradeitem->" + i + "->rarity"),
|
||||
}
|
||||
RootTab["UpgradeObj"].NedItemArr.append(barr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
constructor() {
|
||||
//注册装备信息回调
|
||||
Pack_Control.rawset(20018006, GetEquInfo);
|
||||
Pack_Control.rawset(20018008, GetLuckyValue);
|
||||
|
||||
NedItemArr = [];
|
||||
}
|
||||
|
||||
//获取汉字偏移
|
||||
function GetOffserFromLen(char, offset) {
|
||||
return (char.len() * offset)
|
||||
}
|
||||
|
||||
//获取装备名称颜色
|
||||
function GetEquColor(rarity) {
|
||||
switch (rarity) {
|
||||
case 0:
|
||||
return 0xFFFFFFFF;
|
||||
case 1:
|
||||
return 0xFFEDD568;
|
||||
case 2:
|
||||
return 0xFFFF6BB3;
|
||||
case 3:
|
||||
return 0xFFF000FF;
|
||||
case 4:
|
||||
return 0xFF00B1FF;
|
||||
}
|
||||
}
|
||||
|
||||
function CallBack(x, y) {
|
||||
//同步坐标
|
||||
BaseX = x;
|
||||
BaseY = y;
|
||||
|
||||
//背包打开时才绘制
|
||||
State = true;
|
||||
|
||||
//开关绘制
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
local OpenButton = UpgradeButtonPro(obj, "UpgradeOpenButton", BaseX - 550, BaseY - 300, "common/buffswitching/main.ani", 26, 26, 11);
|
||||
OpenButton.SetRectEnble(true, "UpgradeOpenButtonr", BaseX - 550 - 4, BaseY - 300 - 4, "common/buffswitching/main.ani", 12);
|
||||
OpenButton.SetCustomClickEnble(true, "UpgradeOpenButtonc", BaseX - 550 - 4, BaseY - 300 - 4, "common/buffswitching/main.ani", 13);
|
||||
OpenButton.Show();
|
||||
//开关按钮
|
||||
if (OpenButton.isLBActive()) {
|
||||
if (Sw == false) {
|
||||
Sw = true;
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar("{\"op\":20018007}");
|
||||
L_sq_SendPack();
|
||||
} else {
|
||||
Sw = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Encode(Table) {
|
||||
local Size = Table.len();
|
||||
local Pos = 0;
|
||||
local Str = "{";
|
||||
foreach(Key, Value in Table) {
|
||||
++Pos;
|
||||
Str += "\"";
|
||||
Str += Key.tostring();
|
||||
Str += "\"";
|
||||
Str += ":";
|
||||
if (typeof(Value) == "string") {
|
||||
Str += "\"";
|
||||
Str += Value;
|
||||
Str += "\"";
|
||||
} else Str += Value;
|
||||
if (Pos != Size) Str += ",";
|
||||
}
|
||||
Str += "}";
|
||||
return Str;
|
||||
}
|
||||
|
||||
function DrawMain(obj) {
|
||||
local BX = BaseX - 550 - 710;
|
||||
local BY = BaseY + 86 - 420;
|
||||
|
||||
|
||||
{ //底图层绘制
|
||||
//窗口
|
||||
T_DrawStayAni(obj, "common/new_upgrade/main.ani", BX, BY, 0, "UpgradeSystemMain");
|
||||
//窗口标题
|
||||
L_sq_DrawCode("强化系统", BX + 200, BY + 3, sq_RGBA(230, 200, 155, 250), 0, 0);
|
||||
}
|
||||
|
||||
|
||||
{ //装备信息绘制
|
||||
if (EquObj) {
|
||||
local CodeColor = GetEquColor(EquObj.grade);
|
||||
L_Sq_DrawItem(BX + 211, BY + 73, EquObj.id, 1, 0, 0, 0);
|
||||
L_sq_DrawCode(EquObj.name.tostring(), BX + 224 - GetOffserFromLen(EquObj.name.tostring(), 2), BY + 56, CodeColor, 0, 0);
|
||||
L_sq_DrawCode("当前等级:" + EquObj.upgrade.tostring(), BX + 196, BY + 107, sq_RGBA(230, 200, 155, 250), 0, 0);
|
||||
}
|
||||
|
||||
if (NedItemArr) {
|
||||
foreach(Pos, ItemObject in NedItemArr) {
|
||||
L_Sq_DrawItem(BX + 28 + (230 * (Pos % 2)), BY + 190 + ((35 * (Pos / 2))), ItemObject.id, ItemObject.count, 0, 0, 0);
|
||||
local ICodeColor = GetEquColor(ItemObject.rarity);
|
||||
L_sq_DrawCode(ItemObject.name, BX + 62 + (230 * (Pos % 2)), BY + 198 + ((35 * (Pos / 2))), ICodeColor, 0, 0);
|
||||
//Sout("名称: %L" , ItemObject.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
{ //幸运值绘制
|
||||
L_sq_DrawCode("当前幸运值: " + Lucky_Value + " / 100", BX + 170, BY + 370, 0xFF00B1FF, 0, 0);
|
||||
}
|
||||
|
||||
{ //强化按钮
|
||||
local UpGradeButton = UpgradeButtonPro(obj, "UpGradeButton", BX + 193, BY + 393, "common/new_upgrade/main.ani", 58, 24, 1);
|
||||
UpGradeButton.SetRectEnble(true, "UpGradeButtonr", BX + 193, BY + 393, "common/new_upgrade/main.ani", 2);
|
||||
UpGradeButton.SetCustomClickEnble(true, "UpGradeButtonc", BX + 193, BY + 394, "common/new_upgrade/main.ani", 2);
|
||||
UpGradeButton.Show();
|
||||
|
||||
if (UpGradeButton.isLBActive()) {
|
||||
if (EquObj && NedItemArr) {
|
||||
local GoUpGradePack = Json_STL("GoUpGradePack");
|
||||
GoUpGradePack.Put("op", 20018011);
|
||||
local EquInfo = Encode(EquObj);
|
||||
GoUpGradePack.Put("EquInfo", EquInfo);
|
||||
|
||||
local NedItemInfoPack = Json_STL("NedItemInfoPack");
|
||||
foreach(Pos, ItemObject in NedItemArr) {
|
||||
NedItemInfoPack.Put("NedItemInfo" + Pos, Encode(ItemObject));
|
||||
}
|
||||
//local NedItemInfo = Json_STL.Encode(NedItemArr);
|
||||
GoUpGradePack.Put("NedItemInfo", NedItemInfoPack.GetString());
|
||||
GoUpGradePack.Put("Luckyvalue", Lucky_Value);
|
||||
NedItemInfoPack.Delete();
|
||||
|
||||
local str = GoUpGradePack.GetString();
|
||||
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
GoUpGradePack.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Proc(obj) {
|
||||
//绘制主界面
|
||||
if (State && Sw) {
|
||||
if (WindowObj) {
|
||||
DrawMain(obj);
|
||||
WindowObj.Show(obj);
|
||||
} else {
|
||||
WindowObj = UpgradeWindow(0, 0, 800, 600, 10);
|
||||
}
|
||||
} else {
|
||||
if (WindowObj && WindowObj.YMouseSw == false) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
WindowObj.YMouseSw = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//强化系统
|
||||
function UpgradeSystem(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("UpgradeObj")) {
|
||||
local Cobj = UpgradeC();
|
||||
RootTab.rawset("UpgradeObj", Cobj);
|
||||
} else {
|
||||
RootTab["UpgradeObj"].Proc(obj);
|
||||
RootTab["UpgradeObj"].State = false;
|
||||
}
|
||||
}
|
||||
|
||||
//回调函数
|
||||
function Sq_UpgradeCallBack(x, y) {
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("UpgradeObj")) {
|
||||
RootTab["UpgradeObj"].CallBack(x, y);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,491 @@
|
|||
/*
|
||||
文件名:OnlineEvent.nut
|
||||
路径:Plugins/OnlineEvent/OnlineEvent.nut
|
||||
创建日期:2023-05-28 09:54
|
||||
文件用途:
|
||||
*/
|
||||
|
||||
//HudPro按钮类
|
||||
class OnlineEventPro extends BasicsDrawTool // obj -- 按钮名称 -- X坐标 -- Y坐标 -- Ani调用路径 -- 宽度 -- 高度
|
||||
{
|
||||
obj = null; //Obj对象
|
||||
State = 0; //按钮状态
|
||||
ClickEnble = false; //点击效果
|
||||
ButtonDynamic = false; //动态按钮效果
|
||||
BaseFrame = null;
|
||||
|
||||
CustomClickEnble = false; //自定义点击效果
|
||||
CustomClickAnifile = null; //自定义点击效果Ani路径
|
||||
CustomButtonName = null; //自定义点击效果名称
|
||||
CustomClickFrame = null; //自定义点击效果Ani编号
|
||||
CustomClickx = null; //自定义点击效果X坐标
|
||||
CustomClicky = null; //自定义点击效果Y坐标
|
||||
|
||||
|
||||
RectEnble = false; //悬停效果
|
||||
RectButtonName = null; //悬停名称
|
||||
RectBaseAnifile = null; //悬停Ani路径
|
||||
RectFrame = null; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = null; //悬停X坐标
|
||||
Recty = null; //悬停Y坐标
|
||||
|
||||
|
||||
ButtonName = null; //按钮名称
|
||||
x = null; //X坐标
|
||||
y = null; //Y坐标
|
||||
BaseAnifile = null; //调用Ani路径
|
||||
width = null; //可点击宽度
|
||||
length = null; //可点击高度
|
||||
|
||||
Mobj = null; //鼠标对象
|
||||
//构造函数
|
||||
constructor(gObj, gButtonName, gX, gY, gAnifile, gWidth, gLength, gBaseFrame) {
|
||||
obj = gObj;
|
||||
ButtonName = gButtonName;
|
||||
x = gX;
|
||||
y = gY;
|
||||
BaseAnifile = gAnifile;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
BaseFrame = gBaseFrame;
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
//绘制按钮
|
||||
function Show() {
|
||||
if (ClickEnble) //是否开启点击效果
|
||||
{
|
||||
if (isLBDown() && State == 0) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 1; //按键进入按下状态
|
||||
++y;
|
||||
}
|
||||
if (!isLBDown() && State == 1) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 0; //按键进入弹起状态
|
||||
--y;
|
||||
}
|
||||
}
|
||||
|
||||
if (CustomClickEnble) //是否开启自定义点击效果
|
||||
{
|
||||
if (isLBDown()) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomClickFrame, CustomButtonName);
|
||||
else T_DrawDynamicAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if (RectEnble) //开启悬停效果时
|
||||
{
|
||||
if ((isInRect() && !isLBDown()) || (isInRect() && !CustomClickEnble)) //如果鼠标悬停的时候 并且没有点击的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(44);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, RectBaseAnifile, Rectx, Recty, RectFrame, RectButtonName);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
if (!isInRect()) //如果鼠标没有悬停的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(0);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, BaseAnifile, x, y, BaseFrame, ButtonName);
|
||||
else T_DrawDynamicAni(obj, BaseAnifile, x, y, ButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
//设置自定义点击效果
|
||||
function SetCustomClickEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
CustomClickEnble = bool; //自定义点击效果
|
||||
CustomClickAnifile = gAnifile; //自定义点击效果Ani路径
|
||||
CustomButtonName = gButtonName; //自定义点击效果名称
|
||||
CustomClickFrame = gFrame; //自定义点击效果Ani编号
|
||||
CustomClickx = gX; //自定义点击效果X坐标
|
||||
CustomClicky = gY; //自定义点击效果Y坐标
|
||||
}
|
||||
|
||||
//设置悬停效果
|
||||
function SetRectEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
RectEnble = bool; //悬停效果
|
||||
RectButtonName = gButtonName; //悬停名称
|
||||
RectBaseAnifile = gAnifile; //悬停Ani路径
|
||||
RectFrame = gFrame; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = gX; //悬停X坐标
|
||||
Recty = gY; //悬停Y坐标
|
||||
}
|
||||
|
||||
//设置动态按钮
|
||||
function SetClickEnble(bool) {
|
||||
ButtonDynamic = bool;
|
||||
}
|
||||
|
||||
//设置点击效果
|
||||
function SetClickEnble(bool) {
|
||||
ClickEnble = bool;
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown() {
|
||||
if (isInRect() && Mobj.Lb == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp() {
|
||||
if (isInRect() && Mobj.Lb == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
//左键单击状态
|
||||
function isLBActive() {
|
||||
if (isInRect() && Mobj.LbEvent) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class OnlineEventC extends BasicsDrawTool {
|
||||
WindowObj = null; //窗口对象
|
||||
MainState = false; //主状态
|
||||
X = 136;
|
||||
Y = 130;
|
||||
|
||||
TimeObj = null;
|
||||
|
||||
reward = null;
|
||||
NextRewardTime = null;
|
||||
StaticNowTime = null;
|
||||
NowTime = null;
|
||||
NowDay = null;
|
||||
|
||||
|
||||
//ItemInfo
|
||||
ItemInfoObject = null;
|
||||
ItemInfoDrawS = null;
|
||||
|
||||
|
||||
//查询 玩家信息
|
||||
function GetPlayerInfo() {
|
||||
local T = {
|
||||
op = 20052001,
|
||||
}
|
||||
local str = Json.Encode(T);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
|
||||
//回调 查询 玩家信息
|
||||
function GetPlayerInfoCallBack(Chunk) {
|
||||
// Sout("收到包内容为 \n %L", Chunk);
|
||||
local Buffer = Json_STL("OnlineEvent_GetPlayerInfo_Pack_CallBack");
|
||||
Buffer.Parse(Chunk, 0, false);
|
||||
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("OnlineEventCObj")) {
|
||||
reward = null;
|
||||
reward = [];
|
||||
StaticNowTime = null;
|
||||
NowDay = null;
|
||||
|
||||
StaticNowTime = Buffer.Get("time");
|
||||
NowDay = Buffer.Get("currentCumulative");
|
||||
|
||||
for (local i = 0; i< 10; i++) {
|
||||
local gNormalItemId = Buffer.Get("reward->" + i + "->itemId");
|
||||
local gNormalItemCount = Buffer.Get("reward->" + i + "->itemNum");
|
||||
local gNormalNeedTime = Buffer.Get("reward->" + i + "->time");
|
||||
local gNormalComplete = Buffer.Get("timeReward->" + i);
|
||||
|
||||
local gExItemId = Buffer.Get("reward->" + i + "->cumulativeId");
|
||||
local gExItemCount = Buffer.Get("reward->" + i + "->cumulativeNum");
|
||||
local gExNeedTime = Buffer.Get("reward->" + i + "->cumulative");
|
||||
local gExComplete = Buffer.Get("accumulateReward->" + i);
|
||||
|
||||
local T = {
|
||||
NormalItemId = gNormalItemId,
|
||||
NormalItemCount = gNormalItemCount,
|
||||
NormalNeedTime = gNormalNeedTime,
|
||||
NormalComplete = gNormalComplete,
|
||||
|
||||
ExItemId = gExItemId,
|
||||
ExItemCount = gExItemCount,
|
||||
ExNeedTime = gExNeedTime,
|
||||
ExNeedTime = gExNeedTime,
|
||||
ExComplete = gExComplete,
|
||||
}
|
||||
reward.append(T);
|
||||
}
|
||||
|
||||
local ItemGetArray = {};
|
||||
foreach(P, V in reward) {
|
||||
local ItemId = V.NormalItemId;
|
||||
if (!ItemInfoObject.rawin(ItemId)) {
|
||||
if (!ItemGetArray.rawin(ItemId))
|
||||
ItemGetArray.rawset(ItemId, true);
|
||||
}
|
||||
ItemId = V.ExItemId;
|
||||
if (!ItemInfoObject.rawin(ItemId)) {
|
||||
if (!ItemGetArray.rawin(ItemId))
|
||||
ItemGetArray.rawset(ItemId, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (ItemGetArray.len() > 0) {
|
||||
local arr = [];
|
||||
foreach(Key, Value in ItemGetArray) {
|
||||
arr.append(Key);
|
||||
}
|
||||
local T = {
|
||||
op = 20231010,
|
||||
realop = 20052004,
|
||||
itemId = arr,
|
||||
Type = 2,
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
OnlineEventTimeReset();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function CheckItemInfoCallBack(Chunk) {
|
||||
// Sout("收到包内容为 \n %L", Chunk);
|
||||
local Jso = Json.Decode(Chunk);
|
||||
foreach(Pos, Value in Jso.itemInfo) {
|
||||
if (Value.Name2.len() == 0)
|
||||
Value.Name2 = "Yosin-Team";
|
||||
ItemInfoObject.rawset(Jso.itemId[Pos], Value);
|
||||
}
|
||||
}
|
||||
|
||||
//刷新时间容器
|
||||
function OnlineEventTimeReset() {
|
||||
if (TimeObj) TimeObj.Delete();
|
||||
TimeObj = null;
|
||||
TimeObj = TimeSTL("OnlineEventTimeObj", 90000000);
|
||||
TimeObj.Reset();
|
||||
TimeObj.Start();
|
||||
}
|
||||
|
||||
constructor() {
|
||||
if (TimeObj) TimeObj.Delete();
|
||||
TimeObj = null;
|
||||
TimeObj = TimeSTL("OnlineEventTimeObj", 90000000);
|
||||
TimeObj.Delete();
|
||||
TimeObj = null;
|
||||
|
||||
ItemInfoObject = {};
|
||||
|
||||
Pack_Control.rawset(20052002, GetPlayerInfoCallBack.bindenv(this));
|
||||
|
||||
//查询道具信息回调
|
||||
Pack_Control.rawset(20052004, CheckItemInfoCallBack.bindenv(this));
|
||||
|
||||
|
||||
GetPlayerInfo();
|
||||
}
|
||||
|
||||
//绘制在线时间
|
||||
function DrawNowOnlineTime(obj) {
|
||||
if (TimeObj) NowTime = StaticNowTime + (TimeObj.Get() / 1000).tointeger();
|
||||
//当前时间
|
||||
if (NowTime) {
|
||||
L_sq_DrawCode(NowTime + "秒", X + 94, Y + 39, sq_RGBA(255, 255, 184, 250), 0, 1);
|
||||
//下个奖励的可领取时间
|
||||
if (NextRewardTime) {
|
||||
local AniNowTime = (StaticNowTime * 1000) + TimeObj.Get();
|
||||
local AniNextTime = NextRewardTime * 1000;
|
||||
T_DrawStayAni(obj, "common/onlineevent/yosin/zaixianhuodong.ani", X + 310, Y + 33, 1, "OnlineEvent_NextRewardTime_Main");
|
||||
setClip(X + 310, Y + 33, X + 310 + ((AniNowTime.tofloat() / AniNextTime.tofloat()) * 174.0).tointeger(), Y + 56); //开始裁切
|
||||
T_DrawStayAni(obj, "common/onlineevent/yosin/zaixianhuodong.ani", X + 310, Y + 33, 2, "OnlineEvent_NextRewardTime_Main");
|
||||
releaseClip(); //裁切结束
|
||||
} else {
|
||||
T_DrawStayAni(obj, "common/onlineevent/yosin/zaixianhuodong.ani", X + 310, Y + 33, 1, "OnlineEvent_NextRewardTime_Main");
|
||||
T_DrawStayAni(obj, "common/onlineevent/yosin/zaixianhuodong.ani", X + 310, Y + 33, 2, "OnlineEvent_NextRewardTime_Main");
|
||||
}
|
||||
}
|
||||
if (NowDay) {
|
||||
L_sq_DrawCode(NowDay + "天", X + 94 + 40, Y + 39 + 104, sq_RGBA(255, 255, 184, 250), 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//绘制道具带道具信息
|
||||
function DrawItemEx(X, Y, Id, Count) {
|
||||
L_Sq_DrawItem(X, Y, Id, Count, 0, 0, 0);
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, 24, 24)) {
|
||||
ItemInfoDrawS = {};
|
||||
ItemInfoDrawS.X <- X;
|
||||
ItemInfoDrawS.Y <- Y;
|
||||
ItemInfoDrawS.ItemId <- Id;
|
||||
}
|
||||
}
|
||||
|
||||
//绘制道具相信信息
|
||||
ItemObject = null;
|
||||
|
||||
function DrawItemInfo(obj) {
|
||||
if (ItemInfoDrawS) {
|
||||
if (!ItemObject) {
|
||||
local ItemId = ItemInfoDrawS.ItemId;
|
||||
if (ItemInfoObject.rawin(ItemId)) {
|
||||
ItemObject = ItemInfoClass(ItemInfoObject[ItemId]);
|
||||
}
|
||||
}
|
||||
ItemObject.Show(ItemInfoDrawS.X, ItemInfoDrawS.Y - ItemObject.PageLength);
|
||||
} else {
|
||||
ItemObject = null;
|
||||
}
|
||||
}
|
||||
|
||||
//绘制奖励
|
||||
function DrawReward(obj) {
|
||||
if (reward) {
|
||||
//下次奖励可领取时间销毁
|
||||
NextRewardTime = null;
|
||||
ItemInfoDrawS = null;
|
||||
for (local i = 0; i< 10; i++) {
|
||||
//绘制普通奖励
|
||||
DrawItemEx(X + 13 + 3 + (52 * i), Y + 43 + 24, reward[i].NormalItemId, reward[i].NormalItemCount);
|
||||
//绘制是否可领取
|
||||
if (reward[i].NormalNeedTime< NowTime) {
|
||||
if (reward[i].NormalComplete) {
|
||||
T_DrawStayAni(obj, "common/onlineevent/yosin/zaixianhuodong.ani", X + 12 + 4 + (52 * i), Y + 42 + 24 + 30, 6, "OnlineEvent_Reward_Complete");
|
||||
} else {
|
||||
//TODO 达到领取条件 但是还未领取
|
||||
local Button = OnlineEventPro(obj, "OnlineEvent_Reward_Button" + i, X + 12 + 4 + (52 * i), Y + 42 + 24 + 30, "common/onlineevent/yosin/zaixianhuodong.ani", 28, 18, 3);
|
||||
Button.SetRectEnble(true, "OnlineEvent_Reward_Buttonr" + i, X + 12 + 4 + (52 * i), Y + 42 + 24 + 30, "common/onlineevent/yosin/zaixianhuodong.ani", 4);
|
||||
Button.SetCustomClickEnble(true, "OnlineEvent_Reward_Buttonc" + i, X + 12 + 4 + (52 * i), Y + 42 + 24 + 30, "common/onlineevent/yosin/zaixianhuodong.ani", 5);
|
||||
Button.Show();
|
||||
if (Button.isLBActive()) {
|
||||
local T = {
|
||||
op = 20052007,
|
||||
rewardIndex = i,
|
||||
}
|
||||
local str = Json.Encode(T);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
|
||||
GetPlayerInfo();
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
//只记录最短的一个可领取时间差
|
||||
if (!NextRewardTime) NextRewardTime = reward[i].NormalNeedTime;
|
||||
//绘制剩余所需时间
|
||||
L_sq_DrawCode((reward[i].NormalNeedTime - NowTime).tostring() + "s", X + 13 + 5 + (52 * i), Y + 43 + 24 + 32, sq_RGBA(255, 255, 184, 250), 0, 1);
|
||||
}
|
||||
|
||||
//绘制累计奖励
|
||||
DrawItemEx(X + 13 + 3 + (52 * i), Y + 43 + 128, reward[i].ExItemId, reward[i].ExItemCount);
|
||||
|
||||
if (reward[i].ExNeedTime< NowDay) {
|
||||
if (reward[i].ExComplete) {
|
||||
T_DrawStayAni(obj, "common/onlineevent/yosin/zaixianhuodong.ani", X + 12 + 4 + (52 * i), Y + 42 + 128 + 30, 6, "OnlineEvent_Reward_Ex_Complete");
|
||||
} else {
|
||||
//TODO 达到领取条件 但是还未领取
|
||||
local ExButton = OnlineEventPro(obj, "OnlineEvent_Reward_Ex_Button" + i, X + 12 + 4 + (52 * i), Y + 42 + 128 + 30, "common/onlineevent/yosin/zaixianhuodong.ani", 28, 18, 3);
|
||||
ExButton.SetRectEnble(true, "OnlineEvent_Reward_Ex_Buttonr" + i, X + 12 + 4 + (52 * i), Y + 42 + 128 + 30, "common/onlineevent/yosin/zaixianhuodong.ani", 4);
|
||||
ExButton.SetCustomClickEnble(true, "OnlineEvent_Reward_Ex_Buttonc" + i, X + 12 + 4 + (52 * i), Y + 42 + 128 + 30, "common/onlineevent/yosin/zaixianhuodong.ani", 5);
|
||||
ExButton.Show();
|
||||
if (ExButton.isLBActive()) {
|
||||
local T = {
|
||||
op = 20052007,
|
||||
rewardIndex = i + 10,
|
||||
}
|
||||
local str = Json.Encode(T);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
|
||||
GetPlayerInfo();
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
//绘制剩余所需时间
|
||||
L_sq_DrawCode((reward[i].ExNeedTime - NowDay).tostring() + "天", X + 13 + 5 + (52 * i), Y + 43 + 128 + 32, sq_RGBA(255, 255, 184, 250), 0, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
T_DrawStayAni(obj, "common/onlineevent/yosin/zaixianhuodong.ani", X, Y, 0, "OnlineEvent_Main");
|
||||
//绘制在线时间
|
||||
DrawNowOnlineTime(obj);
|
||||
//绘制奖励
|
||||
DrawReward(obj);
|
||||
|
||||
DrawItemInfo(obj);
|
||||
}
|
||||
|
||||
//开启界面回调
|
||||
function OpenClassCallBack() {
|
||||
|
||||
L_NewWindows("Lenheart", 170, 0x65535);
|
||||
local W = sq_GetPopupWindowMainCotrol(170);
|
||||
W.SetVisible(false);
|
||||
W.SetEnable(false);
|
||||
|
||||
GetPlayerInfo();
|
||||
}
|
||||
|
||||
//绘制入口
|
||||
function Draw(obj) {
|
||||
if (MainState) {
|
||||
if (WindowObj) {
|
||||
DrawMain(obj);
|
||||
WindowObj.Show(obj);
|
||||
X = WindowObj.X;
|
||||
Y = WindowObj.Y;
|
||||
} else {
|
||||
WindowObj = LenheartWindow(X, Y, 527, 258, 28); //坐标 大小 标题栏高度
|
||||
//WindowObj.DeBugMode = true;
|
||||
}
|
||||
} else {
|
||||
if (WindowObj && WindowObj.YMouseSw == false) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
WindowObj.YMouseSw = true;
|
||||
WindowObj = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
if (KeyPressNB.isKeyPress(48, "OnlineEventCloseKey")) {
|
||||
MainState = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function OnlineEvent_New_Lenheart(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("OnlineEventCObj")) {
|
||||
local Cobj = OnlineEventC();
|
||||
RootTab.rawset("OnlineEventCObj", Cobj);
|
||||
EventIcon("在线活动", 28, 4, Cobj);
|
||||
} else {
|
||||
RootTab["OnlineEventCObj"].Proc(obj);
|
||||
RootTab["OnlineEventCObj"].Draw(obj);
|
||||
}
|
||||
}
|
||||
|
||||
if (getroottable().rawin("LenheartFuncTab")) {
|
||||
getroottable()["LenheartFuncTab"].rawset("OnlineEvent_New_LenheartFunc", OnlineEvent_New_Lenheart);
|
||||
} else {
|
||||
local T = {};
|
||||
T.rawset("OnlineEvent_New_LenheartFunc", OnlineEvent_New_Lenheart);
|
||||
getroottable().rawset("LenheartFuncTab", T);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,186 @@
|
|||
/*
|
||||
文件名:Ptst_Func.nut
|
||||
路径:Plugins/Ptst/Ptst_Func.nut
|
||||
创建日期:2023-07-08 15:47
|
||||
文件用途:
|
||||
*/
|
||||
|
||||
function AddTalismanIntData(obj, SkillId, Idx, Value) {
|
||||
local Root = getroottable();
|
||||
local RootTab;
|
||||
if (!Root.rawin("LenheartTalismanSkillManager")) {
|
||||
local T = {};
|
||||
Root.rawset("LenheartTalismanSkillManager", T);
|
||||
}
|
||||
RootTab = Root["LenheartTalismanSkillManager"];
|
||||
local objAddress = L_Sq_GetObjectAddress(obj);
|
||||
local SkillAddress = L_Sq_GetSkillAddress(SkillId);
|
||||
local Key = "LJ" + objAddress + "SkillAddress" + SkillAddress + "Idx" + Idx;
|
||||
if (RootTab.rawin(Key)) {
|
||||
local basedata = RootTab[Key];
|
||||
basedata += Value;
|
||||
RootTab.rawset(Key, basedata);
|
||||
} else RootTab.rawset(Key, Value);
|
||||
}
|
||||
|
||||
function AddTalismanLevelData(obj, SkillId, Idx, Value) {
|
||||
local Root = getroottable();
|
||||
local RootTab;
|
||||
if (!Root.rawin("LenheartTalismanSkillManager")) {
|
||||
local T = {};
|
||||
Root.rawset("LenheartTalismanSkillManager", T);
|
||||
}
|
||||
RootTab = Root["LenheartTalismanSkillManager"];
|
||||
local objAddress = L_Sq_GetObjectAddress(obj);
|
||||
local SkillAddress = L_Sq_GetSkillAddress(SkillId);
|
||||
local Key = "EX_LJ" + "SkillAddress" + SkillAddress + "Idx" + Idx;
|
||||
if (RootTab.rawin(Key)) {
|
||||
local basedata = RootTab[Key];
|
||||
basedata += Value;
|
||||
RootTab.rawset(Key, basedata);
|
||||
} else RootTab.rawset(Key, Value);
|
||||
}
|
||||
|
||||
function AddTalismanSkillCoolTime(obj, SkillId, Value) {
|
||||
local Root = getroottable();
|
||||
local RootTab;
|
||||
if (!Root.rawin("LenheartTalismanSkillManager")) {
|
||||
local T = {};
|
||||
Root.rawset("LenheartTalismanSkillManager", T);
|
||||
}
|
||||
RootTab = Root["LenheartTalismanSkillManager"];
|
||||
local objAddress = L_Sq_GetObjectAddress(obj);
|
||||
local SkillAddress = L_Sq_GetSkillAddress(SkillId);
|
||||
local Key = "CT_LJ" + "SkillAddress" + SkillAddress;
|
||||
if (RootTab.rawin(Key)) {
|
||||
local basedata = RootTab[Key];
|
||||
basedata += Value;
|
||||
RootTab.rawset(Key, basedata);
|
||||
} else RootTab.rawset(Key, Value);
|
||||
}
|
||||
|
||||
function ClearTalismanData() {
|
||||
local Root = getroottable();
|
||||
if (Root.rawin("LenheartTalismanSkillManager")) {
|
||||
Root.rawdelete("LenheartTalismanSkillManager");
|
||||
}
|
||||
}
|
||||
//获取原始静态数据
|
||||
function GetTalismanBaseIntData(obj, SkillId, Idx) {
|
||||
local Root = getroottable();
|
||||
local RootTab;
|
||||
if (!Root.rawin("LenheartTalismanSkillManager")) {
|
||||
local T = {};
|
||||
Root.rawset("LenheartTalismanSkillManager", T);
|
||||
}
|
||||
RootTab = Root["LenheartTalismanSkillManager"];
|
||||
local objAddress = L_Sq_GetObjectAddress(obj);
|
||||
local SkillAddress = L_Sq_GetSkillAddress(SkillId);
|
||||
local Key = "LJ" + objAddress + "SkillAddress" + SkillAddress + "Idx" + Idx;
|
||||
if (RootTab.rawin(Key)) {
|
||||
local basedata = RootTab[Key];
|
||||
return obj.sq_GetIntData(SkillId, Idx) - basedata;
|
||||
} else return obj.sq_GetIntData(SkillId, Idx);
|
||||
}
|
||||
|
||||
//获取原始静态数据
|
||||
function GetTalismanBaseLevelData(obj, SkillId, Idx) {
|
||||
local Root = getroottable();
|
||||
local RootTab;
|
||||
if (!Root.rawin("LenheartTalismanSkillManager")) {
|
||||
local T = {};
|
||||
Root.rawset("LenheartTalismanSkillManager", T);
|
||||
}
|
||||
RootTab = Root["LenheartTalismanSkillManager"];
|
||||
local objAddress = L_Sq_GetObjectAddress(obj);
|
||||
local SkillAddress = L_Sq_GetSkillAddress(SkillId);
|
||||
local Key = "EX_LJ" + "SkillAddress" + SkillAddress + "Idx" + Idx;
|
||||
if (RootTab.rawin(Key)) {
|
||||
local basedata = RootTab[Key];
|
||||
return obj.sq_GetLevelData(SkillId, Idx, sq_GetSkillLevel(obj, SkillId)) - basedata;
|
||||
} else return obj.sq_GetLevelData(SkillId, Idx, sq_GetSkillLevel(obj, SkillId));
|
||||
}
|
||||
|
||||
//获取原始冷却时间
|
||||
function GetTalismanBaseCoolTime(obj, SkillId) {
|
||||
local Root = getroottable();
|
||||
local RootTab;
|
||||
if (!Root.rawin("LenheartTalismanSkillManager")) {
|
||||
local T = {};
|
||||
Root.rawset("LenheartTalismanSkillManager", T);
|
||||
}
|
||||
RootTab = Root["LenheartTalismanSkillManager"];
|
||||
local objAddress = L_Sq_GetObjectAddress(obj);
|
||||
local SkillAddress = L_Sq_GetSkillAddress(SkillId);
|
||||
local Key = "CT_LJ" + "SkillAddress" + SkillAddress;
|
||||
if (RootTab.rawin(Key)) {
|
||||
local basedata = RootTab[Key];
|
||||
return sq_GetSkill(obj,SkillId).getCoolTime(obj, -1) - basedata;
|
||||
} else return sq_GetSkill(obj,SkillId).getCoolTime(obj, -1);
|
||||
}
|
||||
|
||||
//光芒圣痕拔刀奥义
|
||||
function LenheartTalisman_100401044(obj) {
|
||||
//准备动作时间
|
||||
AddTalismanIntData(obj, 9, 0, -((GetTalismanBaseIntData(obj, 9, 0) * 0.3).tointeger()));
|
||||
//拔刀伤害
|
||||
AddTalismanLevelData(obj, 9, 0, ((GetTalismanBaseLevelData(obj, 9, 0) * 0.28).tointeger()));
|
||||
}
|
||||
|
||||
//光芒圣痕:无形剑舞
|
||||
function LenheartTalisman_100401046(obj) {
|
||||
//攻击范围
|
||||
AddTalismanIntData(obj, 73, 13, -((GetTalismanBaseIntData(obj, 73, 13) * 0.25).tointeger()));
|
||||
AddTalismanIntData(obj, 73, 14, -((GetTalismanBaseIntData(obj, 73, 14) * 0.25).tointeger()));
|
||||
//多段攻击次数
|
||||
AddTalismanIntData(obj, 73, 1, 8);
|
||||
AddTalismanIntData(obj, 73, 2, 8);
|
||||
AddTalismanIntData(obj, 73, 3, 8);
|
||||
AddTalismanIntData(obj, 73, 4, 8);
|
||||
AddTalismanIntData(obj, 73, 5, 8);
|
||||
AddTalismanIntData(obj, 73, 6, 8);
|
||||
AddTalismanIntData(obj, 73, 7, 8);
|
||||
AddTalismanIntData(obj, 73, 8, 8);
|
||||
AddTalismanIntData(obj, 73, 11, 8);
|
||||
AddTalismanIntData(obj, 73, 12, 8);
|
||||
}
|
||||
|
||||
//光芒圣痕:猛龙过江
|
||||
function LenheartTalisman_100401045(obj) {
|
||||
//多段攻击次数上限
|
||||
AddTalismanIntData(obj, 72, 1, 5);
|
||||
//攻击力
|
||||
AddTalismanLevelData(obj, 72, 0, -((GetTalismanBaseLevelData(obj, 72, 0) * 0.57).tointeger()));
|
||||
AddTalismanLevelData(obj, 72, 1, -((GetTalismanBaseLevelData(obj, 72, 1) * 0.57).tointeger()));
|
||||
}
|
||||
|
||||
//光芒圣痕:流星审判
|
||||
function LenheartTalisman_100401047(obj) {
|
||||
//流星剑间隔
|
||||
AddTalismanLevelData(obj, 235, 7, -((GetTalismanBaseLevelData(obj, 235, 7) * 0.2).tointeger()));
|
||||
//流星剑数量
|
||||
AddTalismanLevelData(obj, 235, 6, 9);
|
||||
}
|
||||
|
||||
//光芒圣痕:一合残像
|
||||
function LenheartTalisman_100401049(obj) {
|
||||
//爆炸攻击力
|
||||
AddTalismanLevelData(obj, 234, 2, ((GetTalismanBaseLevelData(obj, 234, 2) * 0.21).tointeger()));
|
||||
}
|
||||
|
||||
//光芒圣痕:破空一刀
|
||||
function LenheartTalisman_100401048(obj) {
|
||||
//准备动作时间
|
||||
AddTalismanLevelData(obj, 97, 2, -((GetTalismanBaseLevelData(obj, 97, 2) * 0.4).tointeger()));
|
||||
|
||||
AddTalismanSkillCoolTime(obj,97,-((GetTalismanBaseCoolTime(obj,97) * 0.1).tointeger()));
|
||||
}
|
||||
|
||||
|
||||
//光芒圣痕:最后一斩
|
||||
function LenheartTalisman_100401050(obj) {
|
||||
//攻击力
|
||||
AddTalismanLevelData(obj, 236, 1, -((GetTalismanBaseLevelData(obj, 236, 1) * 0.13).tointeger()));
|
||||
AddTalismanLevelData(obj, 236, 2, -((GetTalismanBaseLevelData(obj, 236, 2) * 0.13).tointeger()));
|
||||
AddTalismanLevelData(obj, 236, 4, -((GetTalismanBaseLevelData(obj, 236, 4) * 0.13).tointeger()));
|
||||
}
|
||||
|
|
@ -0,0 +1,438 @@
|
|||
/*
|
||||
文件名:RaidAuction.nut
|
||||
路径:Plugins/RaidAuction/RaidAuction.nut
|
||||
创建日期:2023-04-24 15:43
|
||||
文件用途:团本竞拍
|
||||
*/
|
||||
|
||||
//HudPro按钮类
|
||||
class RAIDAUCTIONButtonPro extends BasicsDrawTool // obj -- 按钮名称 -- X坐标 -- Y坐标 -- Ani调用路径 -- 宽度 -- 高度
|
||||
{
|
||||
obj = null; //Obj对象
|
||||
State = 0; //按钮状态
|
||||
ClickEnble = false; //点击效果
|
||||
ButtonDynamic = false; //动态按钮效果
|
||||
BaseFrame = null;
|
||||
|
||||
CustomClickEnble = false; //自定义点击效果
|
||||
CustomClickAnifile = null; //自定义点击效果Ani路径
|
||||
CustomButtonName = null; //自定义点击效果名称
|
||||
CustomClickFrame = null; //自定义点击效果Ani编号
|
||||
CustomClickx = null; //自定义点击效果X坐标
|
||||
CustomClicky = null; //自定义点击效果Y坐标
|
||||
|
||||
|
||||
RectEnble = false; //悬停效果
|
||||
RectButtonName = null; //悬停名称
|
||||
RectBaseAnifile = null; //悬停Ani路径
|
||||
RectFrame = null; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = null; //悬停X坐标
|
||||
Recty = null; //悬停Y坐标
|
||||
|
||||
|
||||
ButtonName = null; //按钮名称
|
||||
x = null; //X坐标
|
||||
y = null; //Y坐标
|
||||
BaseAnifile = null; //调用Ani路径
|
||||
width = null; //可点击宽度
|
||||
length = null; //可点击高度
|
||||
|
||||
Mobj = null; //鼠标对象
|
||||
//构造函数
|
||||
constructor(gObj, gButtonName, gX, gY, gAnifile, gWidth, gLength, gBaseFrame) {
|
||||
obj = gObj;
|
||||
ButtonName = gButtonName;
|
||||
x = gX;
|
||||
y = gY;
|
||||
BaseAnifile = gAnifile;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
BaseFrame = gBaseFrame;
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
//绘制按钮
|
||||
function Show() {
|
||||
if (ClickEnble) //是否开启点击效果
|
||||
{
|
||||
if (isLBDown() && State == 0) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 1; //按键进入按下状态
|
||||
++y;
|
||||
}
|
||||
if (!isLBDown() && State == 1) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 0; //按键进入弹起状态
|
||||
--y;
|
||||
}
|
||||
}
|
||||
|
||||
if (CustomClickEnble) //是否开启自定义点击效果
|
||||
{
|
||||
if (isLBDown()) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomClickFrame, CustomButtonName);
|
||||
else T_DrawDynamicAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if (RectEnble) //开启悬停效果时
|
||||
{
|
||||
if ((isInRect() && !isLBDown()) || (isInRect() && !CustomClickEnble)) //如果鼠标悬停的时候 并且没有点击的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(44);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, RectBaseAnifile, Rectx, Recty, RectFrame, RectButtonName);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
if (!isInRect()) //如果鼠标没有悬停的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(0);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, BaseAnifile, x, y, BaseFrame, ButtonName);
|
||||
else T_DrawDynamicAni(obj, BaseAnifile, x, y, ButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
//设置自定义点击效果
|
||||
function SetCustomClickEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
CustomClickEnble = bool; //自定义点击效果
|
||||
CustomClickAnifile = gAnifile; //自定义点击效果Ani路径
|
||||
CustomButtonName = gButtonName; //自定义点击效果名称
|
||||
CustomClickFrame = gFrame; //自定义点击效果Ani编号
|
||||
CustomClickx = gX; //自定义点击效果X坐标
|
||||
CustomClicky = gY; //自定义点击效果Y坐标
|
||||
}
|
||||
|
||||
//设置悬停效果
|
||||
function SetRectEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
RectEnble = bool; //悬停效果
|
||||
RectButtonName = gButtonName; //悬停名称
|
||||
RectBaseAnifile = gAnifile; //悬停Ani路径
|
||||
RectFrame = gFrame; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = gX; //悬停X坐标
|
||||
Recty = gY; //悬停Y坐标
|
||||
}
|
||||
|
||||
//设置动态按钮
|
||||
function SetClickEnble(bool) {
|
||||
ButtonDynamic = bool;
|
||||
}
|
||||
|
||||
//设置点击效果
|
||||
function SetClickEnble(bool) {
|
||||
ClickEnble = bool;
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown() {
|
||||
if (isInRect() && Mobj.Lb == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp() {
|
||||
if (isInRect() && Mobj.Lb == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
//左键单击状态
|
||||
function isLBActive() {
|
||||
if (isInRect() && Mobj.LbEvent) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
class RAIDAUCTIONWindow extends BasicsDrawTool {
|
||||
//宽度
|
||||
Width = null;
|
||||
//高度
|
||||
Height = null;
|
||||
//标题高度
|
||||
TitleH = null;
|
||||
|
||||
//X坐标
|
||||
X = null;
|
||||
//Y坐标
|
||||
Y = null;
|
||||
|
||||
YMouseSw = true;
|
||||
Mobj = null; //鼠标对象
|
||||
|
||||
constructor(gX, gY, gWidth, gHeight, gTitleH) {
|
||||
//宽度
|
||||
Width = gWidth;
|
||||
//高度
|
||||
Height = gHeight;
|
||||
//标题高度
|
||||
TitleH = gTitleH;
|
||||
|
||||
//X坐标
|
||||
X = gX;
|
||||
//Y坐标
|
||||
Y = gY;
|
||||
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
|
||||
//设定鼠标逻辑
|
||||
function LockMouse() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, Width, Height)) {
|
||||
IMouse.LockMouseClick();
|
||||
YMouseSw = false;
|
||||
} else {
|
||||
if (YMouseSw == false && sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, 0, 0, 800, 600)) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
YMouseSw = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
//sq_DrawBox(X, Y, Width, Height, 0xffffffff);
|
||||
|
||||
//设定鼠标逻辑
|
||||
LockMouse();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class RAIDAUCTIONC extends BasicsDrawTool {
|
||||
|
||||
Window = null;
|
||||
WindowName = null;
|
||||
X = 235;
|
||||
Y = 109;
|
||||
State = 0;
|
||||
|
||||
AuctionPack = null;
|
||||
Cost = null;
|
||||
NowPrice = null;
|
||||
|
||||
TimeObj = null;
|
||||
|
||||
|
||||
function Raid_Auction_Item_Pack_CallBack(Chunk) {
|
||||
//Sout("收到包内容为 \n %L", Chunk);
|
||||
local Buffer = Json_STL("Raid_Auction_Item_Pack_CallBack");
|
||||
Buffer.Parse(Chunk, 0, false);
|
||||
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("RAIDAUCTIONObj")) {
|
||||
RootTab["RAIDAUCTIONObj"].State = 1;
|
||||
RootTab["RAIDAUCTIONObj"].Cost = Buffer.Get("cost");
|
||||
RootTab["RAIDAUCTIONObj"].WindowName = Buffer.Get("PDungeon_Name");
|
||||
RootTab["RAIDAUCTIONObj"].AuctionTimeReset();
|
||||
|
||||
RootTab["RAIDAUCTIONObj"].AuctionPack = null;
|
||||
RootTab["RAIDAUCTIONObj"].AuctionPack = [];
|
||||
|
||||
for (local i = 0; i < 5; i++) {
|
||||
local Gid = Buffer.Get("auctionpack->" + i + "->id");
|
||||
if (Gid == false) break;
|
||||
local Gcount = Buffer.Get("auctionpack->" + i + "->count");
|
||||
local Gname = Buffer.Get("auctionpack->" + i + "->name");
|
||||
local Grarity = Buffer.Get("auctionpack->" + i + "->rarity");
|
||||
local Gprice = Buffer.Get("auctionpack->" + i + "->price");
|
||||
|
||||
// local Gnow = i == 0 ? true : false;
|
||||
local Gnow = Buffer.Get("auctionpack->" + i + "->now");
|
||||
local Gover = Buffer.Get("auctionpack->" + i + "->over");
|
||||
local Gplayer = Buffer.Get("auctionpack->" + i + "->playername");
|
||||
local T = {
|
||||
id = Gid,
|
||||
count = Gcount,
|
||||
name = Gname,
|
||||
rarity = Grarity,
|
||||
price = Gprice,
|
||||
now = Gnow,
|
||||
over = Gover,
|
||||
player = Gplayer,
|
||||
}
|
||||
RootTab["RAIDAUCTIONObj"].AuctionPack.append(T);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function Raid_Auction_Close_Window_CallBack(Chunk) {
|
||||
////Sout("收到包内容为 \n %L", Chunk);
|
||||
//local Buffer = Json_STL("Raid_Auction_Item_Pack_CallBack");
|
||||
//Buffer.Parse(Chunk, 0, false);
|
||||
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("RAIDAUCTIONObj")) {
|
||||
RootTab["RAIDAUCTIONObj"].State = 0;
|
||||
RootTab["RAIDAUCTIONObj"].Cost = null;
|
||||
RootTab["RAIDAUCTIONObj"].WindowName = null;
|
||||
RootTab["RAIDAUCTIONObj"].AuctionPack = null;
|
||||
}
|
||||
}
|
||||
|
||||
constructor() {
|
||||
AuctionPack = [];
|
||||
|
||||
|
||||
|
||||
|
||||
//注册装备信息回调
|
||||
Pack_Control.rawset(25700002, Raid_Auction_Item_Pack_CallBack);
|
||||
//关闭窗口回调
|
||||
Pack_Control.rawset(25700008, Raid_Auction_Close_Window_CallBack);
|
||||
}
|
||||
|
||||
|
||||
function AuctionTimeReset() {
|
||||
if (TimeObj) TimeObj.Delete();
|
||||
TimeObj = null;
|
||||
TimeObj = TimeSTL("AuctionTimeObj", 15000);
|
||||
TimeObj.Start();
|
||||
}
|
||||
|
||||
function Proc(obj) {
|
||||
//窗口打开生成窗口
|
||||
if (!this.Window && State == 1) {
|
||||
this.Window = RAIDAUCTIONWindow(235, 109, 329, 382, 24);
|
||||
} else if (this.Window && State == 1) {
|
||||
this.Window.Show(obj);
|
||||
} else if (State == 0) {
|
||||
if (this.Window && this.Window.YMouseSw == false) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
this.Window.YMouseSw = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (KeyPressNB.isKeyPress(48, "RaidAuction")) {
|
||||
State = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
//主界面背景
|
||||
T_DrawStayAni(obj, "common/raid_auction/yosin/tbjp.ani", X, Y, 4, "Raid_AuctionSystemMain");
|
||||
|
||||
//绘制窗口名字
|
||||
L_sq_DrawCode("副本: 【" + WindowName + "】 的竞拍", X + 112, Y + 7, sq_RGBA(255, 255, 184, 250), 0, 1);
|
||||
}
|
||||
|
||||
//绘制竞拍项目
|
||||
function DrawItem(obj) {
|
||||
foreach(Pos, Item in AuctionPack) {
|
||||
|
||||
if (Item.now == true) {
|
||||
T_DrawStayAni(obj, "common/raid_auction/yosin/tbjp.ani", X + 38 + (Pos * 50), Y + 40, 3, "Raid_AuctionSystemSlotLight");
|
||||
T_DrawStayAni(obj, "common/raid_auction/yosin/tbjp.ani", X + 38 + (Pos * 50), Y + 40, 7, "Raid_AuctionSystemSlotLight + 1");
|
||||
//绘制竞拍物品名字
|
||||
L_sq_DrawCode("【" + Item.name + "】", X + 52, Y + 230 - 35, sq_RGBA(255, 255, 184, 250), 0, 1);
|
||||
//绘制竞拍者名字
|
||||
L_sq_DrawCode("【" + Item.player + "】", X + 52, Y + 230, sq_RGBA(255, 255, 184, 250), 0, 1);
|
||||
//绘制当前价格
|
||||
L_sq_DrawCode(Item.price.tostring(), X + 52 + 172, Y + 230, sq_RGBA(255, 255, 184, 250), 0, 1);
|
||||
NowPrice = Item.price;
|
||||
}
|
||||
L_Sq_DrawItem(X + 51 + (Pos * 50), Y + 53, Item.id, Item.count, 0, 0, 0);
|
||||
if (Item.over == true) {
|
||||
T_DrawStayAni(obj, "common/raid_auction/yosin/tbjp.ani", X + 48 + (Pos * 50), Y + 50, 5, "Raid_AuctionSystemSlotOver");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制进度条
|
||||
function DrawTimeP(obj) {
|
||||
if (TimeObj == null) return;
|
||||
|
||||
local Time = TimeObj.Get();
|
||||
local NTime = ((15000 - Time).tofloat() / 1000.0).tostring();
|
||||
local HRate = Time.tofloat() / 15000.0;
|
||||
|
||||
|
||||
//进度条
|
||||
setClip(X + 29, Y + 119, X + 29 + 272 - (272.0 * HRate).tointeger(), Y + 119 + 12); //开始裁切
|
||||
T_DrawStayAni(obj, "common/raid_auction/yosin/tbjp.ani", X + 29, Y + 119, 6, "Raid_AuctionSystemTimeP");
|
||||
releaseClip(); //裁切结束
|
||||
|
||||
//剩余时间
|
||||
L_sq_DrawCode("剩余时间: " + NTime + "s", X + 128, Y + 119, sq_RGBA(21, 187, 255, 250), 0, 1);
|
||||
}
|
||||
|
||||
|
||||
function GetNum(count) {
|
||||
local a = 1;
|
||||
if (count == 0) return a;
|
||||
local b = 10;
|
||||
for (local i = 0; i < count - 1; i++) {
|
||||
b *= b;
|
||||
}
|
||||
return a * b;
|
||||
}
|
||||
//绘制按钮
|
||||
function DrawAuctionButton(obj) {
|
||||
|
||||
for (local i = 0; i < 3; i++) {
|
||||
local Button = RAIDAUCTIONButtonPro(obj, "Raid_AuctionButton" + i, X + 28 + (i * 98), Y + 266, "common/raid_auction/yosin/tbjp.ani", 77, 24, 0);
|
||||
Button.SetRectEnble(true, "Raid_AuctionButtonr" + i, X + 28 + (i * 98), Y + 266, "common/raid_auction/yosin/tbjp.ani", 1);
|
||||
Button.SetCustomClickEnble(true, "Raid_AuctionButtonc" + i, X + 28 + (i * 98), Y + 266, "common/raid_auction/yosin/tbjp.ani", 2);
|
||||
Button.Show();
|
||||
|
||||
L_sq_DrawCode("+" + GetNum(i), X + 60 + (i * 98), Y + 272, sq_RGBA(21, 187, 255, 250), 0, 1);
|
||||
if (Button.isLBActive()) {
|
||||
//print(i);
|
||||
local T = {
|
||||
op = 25700003,
|
||||
price = NowPrice + GetNum(i),
|
||||
cost = this.Cost,
|
||||
addcost = GetNum(i),
|
||||
}
|
||||
|
||||
local str = Json.Encode(T);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function Draw(obj) {
|
||||
if (State == 1) {
|
||||
DrawMain(obj); //绘制主界面
|
||||
|
||||
DrawItem(obj); //绘制竞拍项目
|
||||
|
||||
DrawTimeP(obj); //绘制进度条
|
||||
|
||||
DrawAuctionButton(obj); //绘制按钮
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Raid_Auction(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("RAIDAUCTIONObj")) {
|
||||
local Cobj = RAIDAUCTIONC();
|
||||
RootTab.rawset("RAIDAUCTIONObj", Cobj);
|
||||
} else {
|
||||
RootTab["RAIDAUCTIONObj"].Proc(obj);
|
||||
RootTab["RAIDAUCTIONObj"].Draw(obj);
|
||||
}
|
||||
// print(11);
|
||||
}
|
||||
|
|
@ -0,0 +1,328 @@
|
|||
class New_RotersC extends BasicsDrawTool {
|
||||
//世界BOSS是否打开
|
||||
EventState = false;
|
||||
//活动开启的动画是否播放过
|
||||
EventAnimationPlayFlag = false;
|
||||
//活动开启动画Timer
|
||||
EventAnimationTimer = null;
|
||||
|
||||
|
||||
//基础奖励道具信息
|
||||
RewardInfo = null;
|
||||
ItemInfoObject = null;
|
||||
ItemInfoDrawS = null;
|
||||
//排名信息
|
||||
RankInfo = null;
|
||||
|
||||
//BOSS血量
|
||||
BOSS_HP_RATE = 1;
|
||||
|
||||
WindowObj = null; //窗口对象
|
||||
MainState = false; //主状态
|
||||
X = 124;
|
||||
Y = 16;
|
||||
|
||||
|
||||
//收包逻辑
|
||||
function GetWolrdBossEventStateCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
switch (Jso.State) {
|
||||
//未开启
|
||||
case 0: {
|
||||
|
||||
}
|
||||
break;
|
||||
//开启中
|
||||
case 1: {
|
||||
if (EventState == false) {
|
||||
EventState = true;
|
||||
EventAnimationPlayFlag = true;
|
||||
EventIcon("世界BOSS ", 232, 232, this);
|
||||
}
|
||||
}
|
||||
break;
|
||||
//结算中
|
||||
case 2: {
|
||||
if (EventState == false) {
|
||||
EventState = true;
|
||||
EventAnimationPlayFlag = true;
|
||||
EventIcon("世界BOSS ", 232, 232, this);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//获取排名信息
|
||||
function GetWorldBossEventRankInfoCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
RankInfo = Jso.RankInfo;
|
||||
BOSS_HP_RATE = Jso.BossHpRate;
|
||||
if (BOSS_HP_RATE == 0) BOSS_HP_RATE = 0.01;
|
||||
}
|
||||
|
||||
//获取基础信息包
|
||||
function GetWorldBossEventBaseInfoCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
RewardInfo = Jso.RewardInfo;
|
||||
local GetItemInfoArr = [];
|
||||
foreach(Value in RewardInfo) {
|
||||
if (!(ItemInfoObject.rawin(Value))) {
|
||||
GetItemInfoArr.append(Value);
|
||||
}
|
||||
}
|
||||
if (GetItemInfoArr.len() > 0) {
|
||||
local T = {
|
||||
op = 20231010,
|
||||
realop = 20060020,
|
||||
itemId = RewardInfo,
|
||||
Type = 2,
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
}
|
||||
|
||||
function GetWorldBossEventBaseItemInfoCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
foreach(Pos, Value in Jso.itemInfo) {
|
||||
if (Value.Name2.len() == 0)
|
||||
Value.Name2 = "Yosin-Team";
|
||||
ItemInfoObject.rawset(Jso.itemId[Pos], Value);
|
||||
}
|
||||
}
|
||||
//收包逻辑
|
||||
|
||||
|
||||
|
||||
|
||||
//发包逻辑
|
||||
function GetWolrdBossEventState() {
|
||||
local T = {
|
||||
op = 20060001
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
function GetWorldBossEventRankInfo() {
|
||||
local T = {
|
||||
op = 20060003,
|
||||
Page = 0
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
function GetWorldBossEventBaseInfo() {
|
||||
local T = {
|
||||
op = 20060009,
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
//发包逻辑
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
constructor() {
|
||||
ItemInfoObject = {};
|
||||
//判断活动是否开启
|
||||
Pack_Control.rawset(20060002, GetWolrdBossEventStateCallBack.bindenv(this));
|
||||
//获取排名信息
|
||||
Pack_Control.rawset(20060004, GetWorldBossEventRankInfoCallBack.bindenv(this));
|
||||
//获取基础信息包
|
||||
Pack_Control.rawset(20060010, GetWorldBossEventBaseInfoCallBack.bindenv(this));
|
||||
//获取道具信息
|
||||
Pack_Control.rawset(20060020, GetWorldBossEventBaseItemInfoCallBack.bindenv(this));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
GetWolrdBossEventState();
|
||||
GetWorldBossEventRankInfo();
|
||||
GetWorldBossEventBaseInfo();
|
||||
}
|
||||
|
||||
|
||||
//绘制道具带道具信息
|
||||
function DrawItemEx(X, Y, Id, Count) {
|
||||
L_sq_DrawImg("roters/rankmain.img", 9, X - 4, Y - 2);
|
||||
L_Sq_DrawItem(X, Y, Id, Count, 0, 0, 0);
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, 24, 24)) {
|
||||
ItemInfoDrawS = {};
|
||||
ItemInfoDrawS.X <- X;
|
||||
ItemInfoDrawS.Y <- Y;
|
||||
ItemInfoDrawS.ItemId <- Id;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//绘制世界Boss渐出动画
|
||||
function ShowEventOpenAnimation(obj) {
|
||||
if (!EventAnimationPlayFlag) return;
|
||||
if (EventAnimationTimer == null) EventAnimationTimer = Clock();
|
||||
|
||||
local A = 60;
|
||||
if (EventAnimationTimer) {
|
||||
if (Clock() - EventAnimationTimer <= 2000) {
|
||||
A = sq_GetUniformVelocity(60, 255, Clock() - EventAnimationTimer, 2000);
|
||||
}
|
||||
if (Clock() - EventAnimationTimer <= 4000 && Clock() - EventAnimationTimer > 2000) {
|
||||
A = sq_GetUniformVelocity(255, 0, Clock() - EventAnimationTimer - 2000, 2000);
|
||||
}
|
||||
if (Clock() - EventAnimationTimer > 4000) {
|
||||
EventAnimationTimer = null;
|
||||
EventAnimationPlayFlag = false;
|
||||
} else {
|
||||
L_sq_DrawImg("roters/rankmain.img", 1, 80, 20, 0, sq_RGBA(255, 255, 255, A), 1.0, 1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
//Item信息框一般为211的宽度
|
||||
L_sq_DrawWindow(X, Y, 540, 470, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
|
||||
L_sq_DrawImg("roters/rankmain.img", 0, X + 9, Y + 6);
|
||||
|
||||
//Boss血量
|
||||
setClip(X + 15, Y + 30, X + 15 + (532 * BOSS_HP_RATE).tointeger(), Y + 30 + 17); //开始裁切
|
||||
L_sq_DrawImg("roters/rankmain.img", 8, X + 15, Y + 30);
|
||||
releaseClip(); //裁切结束
|
||||
|
||||
//TODO 要判断这次攻坚是否成功了 成功了就不绘制
|
||||
L_sq_DrawImg("roters/rankmaineff.img", 0, X + 13, Y + 50);
|
||||
|
||||
|
||||
|
||||
//绘制奖励
|
||||
if (RewardInfo) {
|
||||
L_sq_DrawWindow(X + 10, Y + 228, 100, 48, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
L_sq_DrawCode("活动奖励预览", X + 24, Y + 240, sq_RGBA(251, 251, 181, 250), 1, 1);
|
||||
foreach(Pos, Value in RewardInfo) {
|
||||
DrawItemEx(X + 22 + (Pos * 34), Y + 264, Value, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//绘制排名
|
||||
if (RankInfo) {
|
||||
foreach(Pos, Value in RankInfo) {
|
||||
if (Pos< 10) {
|
||||
L_sq_DrawCode(Value.RankTop.tostring(), X + 46 - LenheartTextClass.GetStringLength(Value.RankTop.tostring()) / 2, Y + 324 + (Pos * 16), sq_RGBA(251, 251, 181, 250), 1, 1);
|
||||
L_sq_DrawCode(Value.Name.tostring(), X + 158 - LenheartTextClass.GetStringLength(Value.Name.tostring()) / 2, Y + 324 + (Pos * 16), sq_RGBA(251, 251, 181, 250), 1, 1);
|
||||
L_sq_DrawCode(Value.Job.tostring(), X + 310 - LenheartTextClass.GetStringLength(Value.Job.tostring()) / 2, Y + 324 + (Pos * 16), sq_RGBA(251, 251, 181, 250), 1, 1);
|
||||
L_sq_DrawCode(Value.Damage.tostring(), X + 466 - LenheartTextClass.GetStringLength(Value.Damage.tostring()) / 2, Y + 324 + (Pos * 16), sq_RGBA(251, 251, 181, 250), 1, 1);
|
||||
} else {
|
||||
L_sq_DrawCode(Value.RankTop.tostring(), X + 46 - LenheartTextClass.GetStringLength(Value.RankTop.tostring()) / 2, Y + 486, sq_RGBA(251, 251, 181, 250), 1, 1);
|
||||
L_sq_DrawCode(Value.Name.tostring(), X + 158 - LenheartTextClass.GetStringLength(Value.Name.tostring()) / 2, Y + 486, sq_RGBA(251, 251, 181, 250), 1, 1);
|
||||
L_sq_DrawCode(Value.Job.tostring(), X + 310 - LenheartTextClass.GetStringLength(Value.Job.tostring()) / 2, Y + 486, sq_RGBA(251, 251, 181, 250), 1, 1);
|
||||
L_sq_DrawCode(Value.Damage.tostring(), X + 466 - LenheartTextClass.GetStringLength(Value.Damage.tostring()) / 2, Y + 486, sq_RGBA(251, 251, 181, 250), 1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
local AttackButton = LenheartTabbars(X + 11 + 50, Y + 215, 50, 17);
|
||||
AttackButton.SetFrame("roters/rankmain.img", 2);
|
||||
AttackButton.SyncPos(X + 499, Y + 501);
|
||||
AttackButton.Show();
|
||||
if (AttackButton.isLBActive()) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//开启界面回调
|
||||
function OpenClassCallBack() {
|
||||
|
||||
L_NewWindows("Lenheart", 170, 0x65535);
|
||||
local W = sq_GetPopupWindowMainCotrol(170);
|
||||
W.SetVisible(false);
|
||||
W.SetEnable(false);
|
||||
|
||||
|
||||
GetWorldBossEventRankInfo();
|
||||
}
|
||||
|
||||
|
||||
//绘制道具相信信息
|
||||
ItemObject = null;
|
||||
|
||||
function DrawItemInfo(obj) {
|
||||
if (ItemInfoDrawS && ItemInfoObject) {
|
||||
if (!ItemObject) {
|
||||
local ItemId = ItemInfoDrawS.ItemId;
|
||||
if (ItemInfoObject.rawin(ItemId)) {
|
||||
ItemObject = ItemInfoClass(ItemInfoObject[ItemId]);
|
||||
}
|
||||
}
|
||||
ItemObject.Show(ItemInfoDrawS.X, ItemInfoDrawS.Y - ItemObject.PageLength);
|
||||
} else {
|
||||
ItemObject = null;
|
||||
}
|
||||
}
|
||||
|
||||
//绘制入口
|
||||
function Draw(obj) {
|
||||
ItemInfoDrawS = null;
|
||||
|
||||
if (MainState) {
|
||||
if (WindowObj) {
|
||||
DrawMain(obj);
|
||||
WindowObj.Show(obj);
|
||||
X = WindowObj.X;
|
||||
Y = WindowObj.Y;
|
||||
|
||||
DrawItemInfo(obj);
|
||||
} else {
|
||||
WindowObj = LenheartWindow(X, Y, 558, 470, 15); //坐标 大小 标题栏高度
|
||||
// WindowObj.DeBugMode = true;
|
||||
}
|
||||
} else {
|
||||
if (WindowObj && WindowObj.YMouseSw == false) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
WindowObj.YMouseSw = true;
|
||||
WindowObj = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//播放活动开启过场动画
|
||||
// ShowEventOpenAnimation(obj);
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
if (KeyPressNB.isKeyPress(48, "New_RotersCloseKey")) {
|
||||
MainState = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function New_Roters(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("New_RotersCObj")) {
|
||||
local Cobj = New_RotersC();
|
||||
RootTab.rawset("New_RotersCObj", Cobj);
|
||||
} else {
|
||||
RootTab["New_RotersCObj"].Proc(obj);
|
||||
RootTab["New_RotersCObj"].Draw(obj);
|
||||
}
|
||||
}
|
||||
if (getroottable().rawin("LenheartFuncTab")) {
|
||||
getroottable()["LenheartFuncTab"].rawset("New_Roters_LenheartFunc", New_Roters);
|
||||
} else {
|
||||
local T = {};
|
||||
T.rawset("New_Roters_LenheartFunc", New_Roters);
|
||||
getroottable().rawset("LenheartFuncTab", T);
|
||||
}
|
||||
|
|
@ -0,0 +1,624 @@
|
|||
/*
|
||||
文件名:Roters.nut
|
||||
路径:Plugins/Roters/Roters.nut
|
||||
创建日期:2022-11-02 12:27
|
||||
文件用途:罗特斯世界BOSS
|
||||
*/
|
||||
RotersControl <- null
|
||||
RotersRankControl <- null
|
||||
RotersDgnIndex <- 18081
|
||||
RotersMapIndex <- 48502
|
||||
RotersMonIndex <- 8865646
|
||||
SpiritBarrierNum <- 9
|
||||
SpiritBarrierHit_MaxNum <- 100
|
||||
SpiritBarrierHit_Damage <- 0.01
|
||||
class RotersHudButton extends BasicsDrawTool {
|
||||
obj = null;
|
||||
buttonName = null;
|
||||
x = null;
|
||||
y = null;
|
||||
yoffset = 0;
|
||||
BaseAnifile = null;
|
||||
width = null;
|
||||
length = null;
|
||||
|
||||
constructor(gObj, gButtonName, gX, gY, gAnifile, gWidth, gLength) {
|
||||
obj = gObj;
|
||||
buttonName = gButtonName;
|
||||
x = gX;
|
||||
y = gY;
|
||||
BaseAnifile = gAnifile;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
}
|
||||
|
||||
function DrawButton() {
|
||||
if (isDown() && yoffset == 0) {
|
||||
yoffset = 1;
|
||||
y++;
|
||||
}
|
||||
|
||||
T_DrawStayAni(obj, BaseAnifile, x, y, 0, buttonName);
|
||||
if (isInRect()) {
|
||||
T_DrawStayAni(obj, BaseAnifile, x, y, 1, buttonName);
|
||||
}
|
||||
}
|
||||
|
||||
function isInRect() {
|
||||
local mouseX = IMouse.GetXPos();
|
||||
local mouseY = IMouse.GetYPos();
|
||||
if (sq_IsIntersectRect(mouseX, mouseY, 5, 5, x, y, width, length))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function isDown() {
|
||||
if (isInRect() && IMouse.IsLBDown()) {
|
||||
obj.getVar(buttonName).setBool(0, true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function isActive() {
|
||||
if (isInRect() && IMouse.IsLBUp() && obj.getVar(buttonName).getBool(0)) {
|
||||
obj.getVar(buttonName).setBool(0, false);
|
||||
yoffset = 0;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class Roters_Control extends BasicsDrawTool {
|
||||
//类状态
|
||||
STATE = 0;
|
||||
|
||||
Monster_obj = null;
|
||||
Time_obj = null;
|
||||
ID_Object = null; //怪物的ID
|
||||
GR_Object = null; //怪物组
|
||||
AP_Chr = null; //人物的AP
|
||||
|
||||
Boss_StaticHp = null;
|
||||
Boss_LastHp = 1.0;
|
||||
Boss_RealHp = null;
|
||||
EndBoss_HP = null;
|
||||
|
||||
SpiritBarrier = SpiritBarrierNum;
|
||||
Hit_Num = 0;
|
||||
Hit_MaxNum = SpiritBarrierHit_MaxNum;
|
||||
Rem_Time = null;
|
||||
|
||||
BossHpMainAni = null;
|
||||
BossHpAni = null;
|
||||
BossHpRdcT_obj = null;
|
||||
BossHpEffT_obj = null;
|
||||
|
||||
BackTown = null;
|
||||
GoTownTime = null;
|
||||
|
||||
//构造函数
|
||||
constructor() {
|
||||
//构造时间容器
|
||||
Time_obj = TimeSTL("RotersDgn", 160000);
|
||||
}
|
||||
|
||||
function exit() {
|
||||
STATE = -1;
|
||||
Time_obj.Reset();
|
||||
Time_obj.Delete();
|
||||
}
|
||||
|
||||
function GetWorldIndex() {
|
||||
local stage = sq_GetGlobaludpModuleStage();
|
||||
local MapIndex = sq_GetMapIndex(stage);
|
||||
return MapIndex;
|
||||
}
|
||||
//初始化Boss基础代码
|
||||
function InitBossStatic(obj) {
|
||||
//类状态为0时
|
||||
if (STATE == 0) {
|
||||
//还没有给怪物附加AP时
|
||||
if (ID_Object == null) {
|
||||
local objectManager = obj.getObjectManager();
|
||||
if (!objectManager) return;
|
||||
local CollisionObjectNumber = objectManager.getCollisionObjectNumber();
|
||||
for (local i = 0; i < CollisionObjectNumber; ++i) {
|
||||
local Monobject = objectManager.getCollisionObject(i);
|
||||
local MonIndex = Monobject.getCollisionObjectIndex();
|
||||
//罗特斯 附加以后类状态写入1
|
||||
if (MonIndex == RotersMonIndex) {
|
||||
Monobject.setObjectHeight(6666);
|
||||
sq_ChangeDrawLayer(Monobject, ENUM_DRAWLAYER_BOTTOM);
|
||||
//Ap_Object = CNSquirrelAppendage.sq_AppendAppendage(Monobject, obj, -1, false, "appendage/roters/ap_roters.nut", true);
|
||||
ID_Object = sq_GetUniqueId(Monobject);
|
||||
GR_Object = sq_GetGroup(Monobject);
|
||||
Time_obj.Start();
|
||||
STATE = 1;
|
||||
}
|
||||
//门
|
||||
if (MonIndex == 5718) {
|
||||
sq_ChangeDrawLayer(Monobject, 7);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//初始化人物基础代码
|
||||
function InitChrStatic(obj) {
|
||||
//如果类状态为1时
|
||||
if (STATE == 1) {
|
||||
//如果人物AP不存在时
|
||||
if (AP_Chr == null) {
|
||||
//附加人物AP 并将类状态写入2
|
||||
AP_Chr = CNSquirrelAppendage.sq_AppendAppendage(obj, obj, -1, false, "appendage/roters/ap_chr.nut", true);
|
||||
STATE = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
//罗特斯Ap proc 执行代码
|
||||
function proc_Roters_M(obj) {
|
||||
if (!ID_Object || !GR_Object) return;
|
||||
local sourceObj = sq_GetObject(obj, GR_Object, ID_Object); //得到源对象 -- 施加AP的人
|
||||
sourceObj = sq_GetCNRDObjectToActiveObject(sourceObj);
|
||||
//如果附加Ap的人不存在了直接返回城镇
|
||||
if (sourceObj.isDead()) {
|
||||
L_sq_GoTown();
|
||||
return;
|
||||
}
|
||||
//如果Ap源对象不是我 则直接返回 只需要一个人来操作机制
|
||||
if (!sourceObj.isMyControlObject()) return;
|
||||
|
||||
//如果Boss的基准生命值为空时 赋值给Boss最大生命值
|
||||
if (Boss_StaticHp == null) Boss_StaticHp = sourceObj.getHpMax();
|
||||
//如果Boss对象为空时 赋值给对象
|
||||
//if (Monster_obj == null) Monster_obj = sourceObj;
|
||||
//Boss当前真实生命值赋值
|
||||
Boss_RealHp = sourceObj.getHp();
|
||||
//判断时间写入Boss蓝耗机制
|
||||
if (Rem_Time > 12000 && Rem_Time < 15000) {
|
||||
sourceObj.sendSetMpPacket(((sourceObj.getMpMax() * 0.9) - 15.0).tointeger());
|
||||
if (STATE == 2) STATE = 3;
|
||||
}
|
||||
if (Rem_Time > 8000 && Rem_Time < 12000) {
|
||||
sourceObj.sendSetMpPacket(((sourceObj.getMpMax() * 0.7) - 15.0).tointeger());
|
||||
if (STATE == 3) STATE = 4;
|
||||
}
|
||||
if (Rem_Time > 0 && Rem_Time < 8000) {
|
||||
sourceObj.sendSetMpPacket(((sourceObj.getMpMax() * 0.5) - 15.0).tointeger());
|
||||
if (STATE == 4) STATE = 5;
|
||||
}
|
||||
}
|
||||
//人物AP执行代码
|
||||
function onAttack_chr_M(appendage, realAttacker, damager, boundingBox, isStuck) {
|
||||
local ParentObj = appendage.getParent(); //得到源对象 -- 施加AP的人
|
||||
if (!ID_Object || !GR_Object) return;
|
||||
local sourceObj = sq_GetObject(ParentObj, GR_Object, ID_Object); //得到源对象 -- 施加AP的人
|
||||
sourceObj = sq_GetCNRDObjectToActiveObject(sourceObj);
|
||||
|
||||
//如果Ap父对象不是我 则直接返回 不增加其他人的连击数
|
||||
if (!ParentObj.isMyControlObject()) return;
|
||||
//如果攻击到的是罗特斯本体不增加连击数
|
||||
if (damager.getCollisionObjectIndex() == RotersMonIndex) return;
|
||||
//如果连击数小于100 每次攻击+1
|
||||
if (Hit_Num < 100) ++Hit_Num;
|
||||
//如果连击数大于等于100 并且壁障数大于0
|
||||
if (Hit_Num >= 100 && SpiritBarrier > 0) {
|
||||
//清空连击数 壁障数设置-1
|
||||
Hit_Num = 0;
|
||||
--SpiritBarrier;
|
||||
sourceObj.setHp(sourceObj.getHp() - (sourceObj.getHpMax().tofloat() * SpiritBarrierHit_Damage).tointeger(), null, true);
|
||||
CallBossHp(1);
|
||||
}
|
||||
|
||||
}
|
||||
//绘制精神屏障主界面
|
||||
function drawSpiritBarrier(obj) {
|
||||
T_DrawStayAni(obj, "common/dungeon/roters/bz/main.ani", 650, 25, 0, "精神屏障主界面");
|
||||
setClip(659, 50, 659 + (97 * (Hit_Num.tofloat() / Hit_MaxNum.tofloat())).tointeger(), 54);
|
||||
T_DrawStayAni(obj, "common/dungeon/roters/bz/main.ani", 659, 50, 1, "精神屏障进度条");
|
||||
releaseClip();
|
||||
T_DrawCustomNum(obj, 736, 26, SpiritBarrier, "common/dungeon/roters/bz/", 0);
|
||||
}
|
||||
//绘制时间
|
||||
function drawTime(obj) {
|
||||
if (!Time_obj.Get()) return;
|
||||
Rem_Time = (160000 - Time_obj.Get()) / 10;
|
||||
local Offset_Xpos = 0;
|
||||
if (Rem_Time < 10000) Offset_Xpos = -9;
|
||||
if (Rem_Time < 1000) Offset_Xpos = -18;
|
||||
if (IMouse.GetXPos() < 205 && IMouse.GetYPos() < 49 && IMouse.GetXPos() >= 0 && IMouse.GetYPos() >= 0) T_DrawStayAni(obj, "common/dungeon/roters/time/main.ani", 0, 2, 1, "倒计时主界面背景");
|
||||
T_DrawStayAni(obj, "common/dungeon/roters/time/main.ani", 0, 2, 0, "倒计时主界面");
|
||||
T_DrawStayAni(obj, "common/dungeon/roters/time/d.ani", 101 + Offset_Xpos, 9, 0, "时间点");
|
||||
T_DrawStayAni(obj, "common/dungeon/roters/time/d.ani", 101 + Offset_Xpos, 18, 0, "时间点2");
|
||||
T_DrawCustomTimeNum(obj, 132 + Offset_Xpos, 23, Rem_Time, "common/dungeon/roters/time/", 18, 0);
|
||||
}
|
||||
//绘制Boss血条动画
|
||||
function drawBossHp(obj) {
|
||||
if (BossHpRdcT_obj) {
|
||||
local nowhun = Boss_RealHp.tofloat() / Boss_StaticHp.tofloat();
|
||||
BossHpMainAni = T_DrawStayAni(obj, "common/dungeon/roters/hp/main.ani", 106, 67, 0, "Boss血条主界面");
|
||||
local v = sq_GetUniformVelocity((Boss_LastHp * 493.0).tointeger(), (nowhun * 493.0).tointeger(), BossHpRdcT_obj.Get(), 1000);
|
||||
setClip(154, 88, 154 + v, 109);
|
||||
BossHpAni = T_DrawStayAni(obj, "common/dungeon/roters/hp/main.ani", 154, 88, 1, "Boss血条");
|
||||
releaseClip();
|
||||
BossHpMainAni.setRGBA(255, 255, 255, 250);
|
||||
BossHpAni.setRGBA(255, 255, 255, 250);
|
||||
if (BossHpRdcT_obj.Get() >= 2000) {
|
||||
BossHpRdcT_obj.Delete();
|
||||
BossHpRdcT_obj = null;
|
||||
CallBossHp(2);
|
||||
}
|
||||
} else if (BossHpEffT_obj) {
|
||||
local nowhun = Boss_RealHp.tofloat() / Boss_StaticHp.tofloat();
|
||||
BossHpMainAni = T_DrawStayAni(obj, "common/dungeon/roters/hp/main.ani", 106, 67, 0, "Boss血条主界面");
|
||||
setClip(154, 88, 154 + (nowhun * 493.0).tointeger(), 109);
|
||||
BossHpAni = T_DrawStayAni(obj, "common/dungeon/roters/hp/main.ani", 154, 88, 1, "Boss血条");
|
||||
releaseClip();
|
||||
local v = sq_GetUniformVelocity(250, 0, BossHpEffT_obj.Get(), 1000);
|
||||
BossHpMainAni.setRGBA(255, 255, 255, v);
|
||||
BossHpAni.setRGBA(255, 255, 255, v);
|
||||
if (BossHpEffT_obj.Get() >= 1000) {
|
||||
BossHpEffT_obj.Delete();
|
||||
BossHpEffT_obj = null;
|
||||
Boss_LastHp = nowhun;
|
||||
}
|
||||
}
|
||||
}
|
||||
//绘制Boss血条动画
|
||||
function CallBossHp(Type) {
|
||||
switch (Type) {
|
||||
case 1:
|
||||
if (BossHpRdcT_obj == null) BossHpRdcT_obj = TimeSTL("RotersBossHpRdc", 2000);
|
||||
BossHpRdcT_obj.Reset();
|
||||
BossHpRdcT_obj.Start();
|
||||
break;
|
||||
case 2:
|
||||
if (BossHpEffT_obj == null) BossHpEffT_obj = TimeSTL("RotersBossHpEff", 1000);
|
||||
BossHpEffT_obj.Reset();
|
||||
BossHpEffT_obj.Start();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function DrawMain(obj) {
|
||||
if (STATE >= 6) return;
|
||||
//绘制精神屏障主界面
|
||||
drawSpiritBarrier(obj);
|
||||
//绘制时间
|
||||
drawTime(obj);
|
||||
drawBossHp(obj);
|
||||
}
|
||||
|
||||
function ProcDgn(obj) {
|
||||
//初始化BOSS基础代码
|
||||
InitBossStatic(obj);
|
||||
//初始化角色基础代码
|
||||
InitChrStatic(obj);
|
||||
|
||||
//罗特斯循环函数
|
||||
proc_Roters_M(obj);
|
||||
|
||||
|
||||
//如果时间结束
|
||||
if (Rem_Time == 0 && STATE >= 3) {
|
||||
if (EndBoss_HP == null) EndBoss_HP = Boss_StaticHp - Boss_RealHp;
|
||||
if (BackTown == null) BackTown = RotersHudButton(obj, "rotersbacktown", 371, 245, "common/dungeon/roters/damage/back.ani", 66, 19);
|
||||
local Offset_Xpos = ((EndBoss_HP.tostring().len() - 1) * -5);
|
||||
T_DrawStayAni(obj, "common/dungeon/roters/damage/main.ani", 249, 115, 0, "结算主界面");
|
||||
T_DrawCustomNum(obj, 395 + Offset_Xpos, 171, EndBoss_HP, "common/dungeon/roters/damage/num/", 10);
|
||||
|
||||
if (STATE == 5) {
|
||||
local WorldBossUpdateDamage = Json_STL("WorldBossUpdateDamage");
|
||||
WorldBossUpdateDamage.Put("op", 13);
|
||||
WorldBossUpdateDamage.Put("hurt", EndBoss_HP);
|
||||
local str = WorldBossUpdateDamage.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
WorldBossUpdateDamage.Delete();
|
||||
|
||||
STATE = 6;
|
||||
}
|
||||
|
||||
|
||||
BackTown.DrawButton();
|
||||
if (BackTown.isActive()) {
|
||||
L_sq_GoTown();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Roters(obj) {
|
||||
//如果在副本中
|
||||
if (sq_GetCurrentModuleType() == 3) {
|
||||
//如果获取当前地图ID 等于 罗特斯地图ID
|
||||
if (Roters_Control.GetWorldIndex() == RotersMapIndex) {
|
||||
//如果罗特斯对象为空 则实例化
|
||||
if (RotersControl == null) {
|
||||
RotersControl = Roters_Control();
|
||||
}
|
||||
//执行逻辑主函数
|
||||
RotersControl.ProcDgn(obj);
|
||||
//执行绘制主函数
|
||||
RotersControl.DrawMain(obj);
|
||||
} else {
|
||||
//如果罗特斯对象不为空 则销毁他
|
||||
if (RotersControl != null) {
|
||||
RotersControl.exit();
|
||||
RotersControl = null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//如果罗特斯对象不为空 则销毁他
|
||||
if (RotersControl != null) {
|
||||
RotersControl.exit();
|
||||
RotersControl = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//罗特斯排行榜界面类
|
||||
class Roters_RankControl extends BasicsDrawTool {
|
||||
State = -2; //世界BOSS当前状态
|
||||
End = 0;
|
||||
Windows_Object = null;
|
||||
AnimotionState = 0;
|
||||
BufferTimeSTL = null;
|
||||
Page = 0;
|
||||
|
||||
MainSwitchButton = null;
|
||||
|
||||
//OP模式
|
||||
ThisOp = null;
|
||||
//类JsonBuffer
|
||||
ThisJsonBuffer = null;
|
||||
|
||||
function RotersRankCallBack(chunk) {
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("ROTERSRANKCONTROL") == false) return;
|
||||
|
||||
local RotersRankPack = Json_STL("RotersRankPack");
|
||||
RotersRankPack.Parse(chunk, 0, false);
|
||||
local op = RotersRankPack.Get("op");
|
||||
switch (op) {
|
||||
//开界面
|
||||
case 12: {
|
||||
RootTab["ROTERSRANKCONTROL"].ThisOp = 12;
|
||||
if (RootTab["ROTERSRANKCONTROL"].ThisJsonBuffer) RootTab["ROTERSRANKCONTROL"].ThisJsonBuffer.Delete();
|
||||
RootTab["ROTERSRANKCONTROL"].ThisJsonBuffer = Json_STL("ThisJsonBuffer");
|
||||
RootTab["ROTERSRANKCONTROL"].ThisJsonBuffer.Parse(chunk, 0, false);
|
||||
}
|
||||
break;
|
||||
//开启世界BOSS
|
||||
case 14:
|
||||
RootTab["ROTERSRANKCONTROL"].ThisOp = 14;
|
||||
break;
|
||||
//打赢了
|
||||
case 16:
|
||||
RootTab["ROTERSRANKCONTROL"].ThisOp = 16;
|
||||
break;
|
||||
//没打赢
|
||||
case 18:
|
||||
RootTab["ROTERSRANKCONTROL"].ThisOp = 18;
|
||||
break;
|
||||
//彻底结束
|
||||
case 20:
|
||||
RootTab["ROTERSRANKCONTROL"].ThisOp = 20;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
RotersRankPack.Delete();
|
||||
}
|
||||
|
||||
constructor() {
|
||||
Pack_Control.rawset(12, RotersRankCallBack);
|
||||
Pack_Control.rawset(14, RotersRankCallBack);
|
||||
Pack_Control.rawset(16, RotersRankCallBack);
|
||||
Pack_Control.rawset(18, RotersRankCallBack);
|
||||
Pack_Control.rawset(20, RotersRankCallBack);
|
||||
BufferTimeSTL = TimeSTL("RotersBufferTimeSTL", 3000);
|
||||
}
|
||||
|
||||
|
||||
//绘制排名信息
|
||||
function DrawRankInfo(obj) {
|
||||
//如果信息表不存在 或数据不正确 则返回
|
||||
if (!ThisJsonBuffer || ThisJsonBuffer.tostring().len() < 1) return;
|
||||
local Y_Pos_Offset = 0;
|
||||
for (local i = 0; i < 11; i++) {
|
||||
if (i == 10) Y_Pos_Offset = 3;
|
||||
L_Code_STL(ThisJsonBuffer.Get("result->" + i + "->rank"), 163, 325 + (i * 16) + Y_Pos_Offset, 0xFF99D7FF, 1);
|
||||
L_Code_STL(ThisJsonBuffer.Get("result->" + i + "->cName"), 257, 325 + (i * 16) + Y_Pos_Offset, 0xFF00D7FF, 1);
|
||||
L_Code_STL(ThisJsonBuffer.Get("result->" + i + "->job"), 409, 325 + (i * 16) + Y_Pos_Offset, 0xB79260FF, 1);
|
||||
L_Code_STL(ThisJsonBuffer.Get("result->" + i + "->hurt"), 535, 325 + (i * 16) + Y_Pos_Offset, 0xFFFF00FF, 1);
|
||||
}
|
||||
}
|
||||
|
||||
//绘制主界面框
|
||||
function DrawRankMain(obj) {
|
||||
//如果信息表不存在 或数据不正确 则返回
|
||||
if (!ThisJsonBuffer || ThisJsonBuffer.tostring().len() < 1) return;
|
||||
|
||||
T_DrawStayAni(obj, "common/dungeon/roters/main/main.ani", 129, 8, 0, "罗特斯Rank主界面");
|
||||
//T_DrawDynamicAni(obj, "common/dungeon/roters/main/maineff.ani", 133, 52, "罗特斯Rankeff主界面");
|
||||
|
||||
local HpPoi = ThisJsonBuffer.Get("hppercentage").tofloat() / 100.0;
|
||||
setClip(130, 28, 130 + (542.0 * HpPoi).tointeger(), 68);
|
||||
T_DrawStayAni(obj, "common/dungeon/roters/main/mainhp.ani", 130, 28, 0, "罗特斯Rank生命值");
|
||||
releaseClip();
|
||||
|
||||
local AttackButton = ButtonPro(obj, "AttackButton", 542, 270, "common/dungeon/roters/main/attackbutton.ani", 120, 20);
|
||||
AttackButton.SetRectEnble(true, "AttackButton", 542, 270, "common/dungeon/roters/main/attackbutton.ani", 1);
|
||||
AttackButton.SetCustomClickEnble(true, "AttackButton", 542, 270 + 1, "common/dungeon/roters/main/attackbutton.ani", 1);
|
||||
if (End != 1) AttackButton.Show();
|
||||
if (AttackButton.isLBActive()) {
|
||||
L_sq_GoDungeon(RotersDgnIndex);
|
||||
}
|
||||
|
||||
local RightSwitchButton = ButtonPro(obj, "RightSwitchButton", 460, 504, "common/dungeon/roters/main/rightbutton.ani", 11, 13);
|
||||
RightSwitchButton.SetRectEnble(true, "RightSwitchButton", 460, 504, "common/dungeon/roters/main/rightbutton.ani", 1);
|
||||
RightSwitchButton.SetCustomClickEnble(true, "RightSwitchButton", 460, 504 + 1, "common/dungeon/roters/main/rightbutton.ani", 1);
|
||||
RightSwitchButton.Show();
|
||||
if (RightSwitchButton.isLBActive()) {
|
||||
if (Page < 4) ++Page;
|
||||
local Test = Json_STL("WorldBossBuffer");
|
||||
Test.Put("op", 11);
|
||||
Test.Put("page", Page);
|
||||
local str = Test.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
Test.Delete();
|
||||
}
|
||||
|
||||
local LeftSwitchButton = ButtonPro(obj, "LeftSwitchButton", 336, 504, "common/dungeon/roters/main/leftbutton.ani", 11, 13);
|
||||
LeftSwitchButton.SetRectEnble(true, "LeftSwitchButton", 336, 504, "common/dungeon/roters/main/leftbutton.ani", 1);
|
||||
LeftSwitchButton.SetCustomClickEnble(true, "LeftSwitchButton", 336, 504 + 1, "common/dungeon/roters/main/leftbutton.ani", 1);
|
||||
LeftSwitchButton.Show();
|
||||
if (LeftSwitchButton.isLBActive()) {
|
||||
if (Page > 0) --Page;
|
||||
local Test = Json_STL("WorldBossBuffer");
|
||||
Test.Put("op", 11);
|
||||
Test.Put("page", Page);
|
||||
local str = Test.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
Test.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
//绘制主界面开启按钮
|
||||
function DrawMainButton(obj) {
|
||||
T_DrawDynamicAni(obj, "common/dungeon/roters/main/mainbuttoneff.ani", -30, 35, "罗特斯Rank按钮特效");
|
||||
|
||||
if (MainSwitchButton == null) {
|
||||
MainSwitchButton = ButtonPro(obj, "MainSwitchButton", 15, 70, "common/dungeon/roters/main/mainbutton.ani", 65, 65);
|
||||
}
|
||||
MainSwitchButton.SetRectEnble(true, "MainSwitchButtonr", 15, 70, "common/dungeon/roters/main/mainbutton.ani", 1);
|
||||
MainSwitchButton.SetCustomClickEnble(true, "MainSwitchButtonc", 15, 70, "common/dungeon/roters/main/mainbutton.ani", 2);
|
||||
MainSwitchButton.Show();
|
||||
|
||||
if (MainSwitchButton.isLBActive()) {
|
||||
if (!sq_GetPopupWindowMainCotrol(267)) L_NewWindows("Lenheart", 267, 0x65535);
|
||||
local Test = Json_STL("WorldBossBuffer");
|
||||
Test.Put("op", 11);
|
||||
Test.Put("page", Page);
|
||||
local str = Test.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
Test.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Run主执行函数
|
||||
function Run(obj) {
|
||||
//初始状态
|
||||
if (State == -2) {
|
||||
//构造 嗅探包 请求世界Boss是否开启
|
||||
local WordBossSwitchReqPack = Json_STL("WordBossSwitchReqPack");
|
||||
WordBossSwitchReqPack.Put("op", 15);
|
||||
local StrBuffer = WordBossSwitchReqPack.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(StrBuffer);
|
||||
L_sq_SendPack();
|
||||
WordBossSwitchReqPack.Delete();
|
||||
State = -1;
|
||||
}
|
||||
//等待开启信号状态
|
||||
if (State == -1) {
|
||||
//如果OP状态等于14
|
||||
if (ThisOp == 14) {
|
||||
if (AnimotionState == 0) {
|
||||
BufferTimeSTL.Reset();
|
||||
BufferTimeSTL.Start();
|
||||
AnimotionState = 1;
|
||||
}
|
||||
if (AnimotionState == 1) {
|
||||
local MainStartAni = T_DrawStayAni(obj, "common/dungeon/roters/main/mainstart.ani", 80, 50, 0, "RotersMainStartAni");
|
||||
local v = sq_GetUniformVelocity(0, 250, BufferTimeSTL.Get(), 3000);
|
||||
MainStartAni.setRGBA(255, 255, 255, v);
|
||||
if (BufferTimeSTL.Get() >= 2900) {
|
||||
BufferTimeSTL.Reset();
|
||||
BufferTimeSTL.Start();
|
||||
AnimotionState = 2;
|
||||
}
|
||||
}
|
||||
if (AnimotionState == 2) {
|
||||
local MainStartAni = T_DrawStayAni(obj, "common/dungeon/roters/main/mainstart.ani", 80, 50, 0, "RotersMainStartAni");
|
||||
local v = sq_GetUniformVelocity(250, 0, BufferTimeSTL.Get(), 3000);
|
||||
MainStartAni.setRGBA(255, 255, 255, v);
|
||||
if (BufferTimeSTL.Get() >= 2900) {
|
||||
BufferTimeSTL.Reset();
|
||||
BufferTimeSTL.Delete();
|
||||
BufferTimeSTL = null;
|
||||
AnimotionState = 3;
|
||||
}
|
||||
}
|
||||
if (AnimotionState == 3) {
|
||||
End = 0; //是否结束写入0
|
||||
State = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
//绘制世界BOSS面板按钮
|
||||
if (State == 0) {
|
||||
DrawMainButton(obj);
|
||||
//如果收到 op 12号包 打开了面板 state写入1
|
||||
if (ThisOp == 12) {
|
||||
State = 1;
|
||||
ThisOp = 0;
|
||||
}
|
||||
}
|
||||
//绘制面板
|
||||
if (State == 1) {
|
||||
//如果窗口开启绘制面板 绘制排名
|
||||
if (sq_GetPopupWindowMainCotrol(267)) {
|
||||
Windows_Object = sq_GetPopupWindowMainCotrol(267);
|
||||
DrawRankMain(obj);
|
||||
DrawRankInfo(obj);
|
||||
}
|
||||
//窗口关闭状态写回0
|
||||
else {
|
||||
State = 0;
|
||||
}
|
||||
}
|
||||
//检测到 打赢或者打输了的 包 是否结束写入1
|
||||
if (ThisOp == 16 || ThisOp == 18) {
|
||||
State = 0;
|
||||
End = 1;
|
||||
}
|
||||
//世界BOSS彻底结束 状态回归-2
|
||||
if (ThisOp == 20) {
|
||||
State = -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function RotersRank(obj) {
|
||||
//只在城镇中执行
|
||||
if (sq_GetCurrentModuleType() != 1) return;
|
||||
|
||||
local RootTab = getroottable();
|
||||
|
||||
//如果不在西海岸主干道不执行
|
||||
if (L_sq_GetTownIndex() != 3 || L_sq_GetRegionIndex() != 0) {
|
||||
if (RootTab.rawin("ROTERSRANKCONTROL"))RootTab.rawdelete("ROTERSRANKCONTROL");
|
||||
return;
|
||||
}
|
||||
|
||||
//如果对象不存在 实例化对象
|
||||
if (RootTab.rawin("ROTERSRANKCONTROL") == false) {
|
||||
local ROTERSRANKCONTROLOBJ = Roters_RankControl();
|
||||
RootTab.rawset("ROTERSRANKCONTROL", ROTERSRANKCONTROLOBJ);
|
||||
} else {
|
||||
RootTab["ROTERSRANKCONTROL"].Run(obj);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,495 @@
|
|||
/*
|
||||
文件名:ServerAuction.nut
|
||||
路径:Plugins/ServerAuction/ServerAuction.nut
|
||||
创建日期:2023-05-12 10:27
|
||||
文件用途:
|
||||
*/
|
||||
|
||||
//HudPro按钮类
|
||||
class ServerAuctionPro extends BasicsDrawTool // obj -- 按钮名称 -- X坐标 -- Y坐标 -- Ani调用路径 -- 宽度 -- 高度
|
||||
{
|
||||
obj = null; //Obj对象
|
||||
State = 0; //按钮状态
|
||||
ClickEnble = false; //点击效果
|
||||
ButtonDynamic = false; //动态按钮效果
|
||||
BaseFrame = null;
|
||||
|
||||
CustomClickEnble = false; //自定义点击效果
|
||||
CustomClickAnifile = null; //自定义点击效果Ani路径
|
||||
CustomButtonName = null; //自定义点击效果名称
|
||||
CustomClickFrame = null; //自定义点击效果Ani编号
|
||||
CustomClickx = null; //自定义点击效果X坐标
|
||||
CustomClicky = null; //自定义点击效果Y坐标
|
||||
|
||||
|
||||
RectEnble = false; //悬停效果
|
||||
RectButtonName = null; //悬停名称
|
||||
RectBaseAnifile = null; //悬停Ani路径
|
||||
RectFrame = null; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = null; //悬停X坐标
|
||||
Recty = null; //悬停Y坐标
|
||||
|
||||
|
||||
ButtonName = null; //按钮名称
|
||||
x = null; //X坐标
|
||||
y = null; //Y坐标
|
||||
BaseAnifile = null; //调用Ani路径
|
||||
width = null; //可点击宽度
|
||||
length = null; //可点击高度
|
||||
|
||||
Mobj = null; //鼠标对象
|
||||
//构造函数
|
||||
constructor(gObj, gButtonName, gX, gY, gAnifile, gWidth, gLength, gBaseFrame) {
|
||||
obj = gObj;
|
||||
ButtonName = gButtonName;
|
||||
x = gX;
|
||||
y = gY;
|
||||
BaseAnifile = gAnifile;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
BaseFrame = gBaseFrame;
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
//绘制按钮
|
||||
function Show() {
|
||||
if (ClickEnble) //是否开启点击效果
|
||||
{
|
||||
if (isLBDown() && State == 0) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 1; //按键进入按下状态
|
||||
++y;
|
||||
}
|
||||
if (!isLBDown() && State == 1) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 0; //按键进入弹起状态
|
||||
--y;
|
||||
}
|
||||
}
|
||||
|
||||
if (CustomClickEnble) //是否开启自定义点击效果
|
||||
{
|
||||
if (isLBDown()) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomClickFrame, CustomButtonName);
|
||||
else T_DrawDynamicAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if (RectEnble) //开启悬停效果时
|
||||
{
|
||||
if ((isInRect() && !isLBDown()) || (isInRect() && !CustomClickEnble)) //如果鼠标悬停的时候 并且没有点击的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(44);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, RectBaseAnifile, Rectx, Recty, RectFrame, RectButtonName);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
if (!isInRect()) //如果鼠标没有悬停的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(0);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, BaseAnifile, x, y, BaseFrame, ButtonName);
|
||||
else T_DrawDynamicAni(obj, BaseAnifile, x, y, ButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
//设置自定义点击效果
|
||||
function SetCustomClickEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
CustomClickEnble = bool; //自定义点击效果
|
||||
CustomClickAnifile = gAnifile; //自定义点击效果Ani路径
|
||||
CustomButtonName = gButtonName; //自定义点击效果名称
|
||||
CustomClickFrame = gFrame; //自定义点击效果Ani编号
|
||||
CustomClickx = gX; //自定义点击效果X坐标
|
||||
CustomClicky = gY; //自定义点击效果Y坐标
|
||||
}
|
||||
|
||||
//设置悬停效果
|
||||
function SetRectEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
RectEnble = bool; //悬停效果
|
||||
RectButtonName = gButtonName; //悬停名称
|
||||
RectBaseAnifile = gAnifile; //悬停Ani路径
|
||||
RectFrame = gFrame; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = gX; //悬停X坐标
|
||||
Recty = gY; //悬停Y坐标
|
||||
}
|
||||
|
||||
//设置动态按钮
|
||||
function SetClickEnble(bool) {
|
||||
ButtonDynamic = bool;
|
||||
}
|
||||
|
||||
//设置点击效果
|
||||
function SetClickEnble(bool) {
|
||||
ClickEnble = bool;
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown() {
|
||||
if (isInRect() && Mobj.Lb == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp() {
|
||||
if (isInRect() && Mobj.Lb == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
//左键单击状态
|
||||
function isLBActive() {
|
||||
if (isInRect() && Mobj.LbEvent) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
class ServerAuctionWindow extends BasicsDrawTool {
|
||||
//宽度
|
||||
Width = null;
|
||||
//高度
|
||||
Height = null;
|
||||
//标题高度
|
||||
TitleH = null;
|
||||
|
||||
//X坐标
|
||||
X = null;
|
||||
B_X = null;
|
||||
//Y坐标
|
||||
Y = null;
|
||||
B_Y = null;
|
||||
|
||||
YMouseSw = true;
|
||||
DeBugMode = false;
|
||||
|
||||
Mobj = null;
|
||||
M_Xpos = null;
|
||||
M_Ypos = null;
|
||||
|
||||
|
||||
constructor(gX, gY, gWidth, gHeight, gTitleH) {
|
||||
//宽度
|
||||
Width = gWidth;
|
||||
//高度
|
||||
Height = gHeight;
|
||||
//标题高度
|
||||
TitleH = gTitleH;
|
||||
|
||||
//X坐标
|
||||
X = gX;
|
||||
//Y坐标
|
||||
Y = gY;
|
||||
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
|
||||
//设定鼠标逻辑
|
||||
function LockMouse() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, Width, Height)) {
|
||||
IMouse.LockMouseClick();
|
||||
YMouseSw = false;
|
||||
} else {
|
||||
if (YMouseSw == false && sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, 0, 0, 800, 600)) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
YMouseSw = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//设定窗口拖动逻辑
|
||||
function MoveWindow() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, Width, TitleH)) {
|
||||
|
||||
if (Mobj.Lb == 1) {
|
||||
if (!M_Xpos) M_Xpos = IMouse.GetXPos(); //原始鼠标位置数据
|
||||
if (!M_Ypos) M_Ypos = IMouse.GetYPos();
|
||||
if (!B_X) B_X = X; //原始窗口位置
|
||||
if (!B_Y) B_Y = Y;
|
||||
|
||||
X = B_X - (M_Xpos - IMouse.GetXPos());
|
||||
Y = B_Y - (M_Ypos - IMouse.GetYPos());
|
||||
|
||||
} else if (Mobj.Lb == 0) {
|
||||
M_Xpos = null;
|
||||
M_Ypos = null;
|
||||
B_X = null;
|
||||
B_Y = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
if (DeBugMode) sq_DrawBox(X, Y, Width, Height, 0xffffffff);
|
||||
|
||||
//设定鼠标逻辑
|
||||
LockMouse();
|
||||
|
||||
//设定窗口拖动逻辑
|
||||
MoveWindow();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class ServerAuctionC extends BasicsDrawTool {
|
||||
|
||||
WindowObj = null; //窗口对象
|
||||
MainState = false; //主状态
|
||||
X = 235;
|
||||
Y = 109;
|
||||
|
||||
WindowName = "暂无拍卖会";
|
||||
|
||||
AuctionPack = null;
|
||||
Cost = null;
|
||||
NowPrice = null;
|
||||
|
||||
TimeObj = null;
|
||||
TimeMax = 15000;
|
||||
TimeNow = 10000;
|
||||
ReqFrame = false;
|
||||
|
||||
//查询拍卖回包
|
||||
function Raid_Auction_Item_Pack_CallBack(Chunk) {
|
||||
// Sout("收到包内容为 \n %L", Chunk);
|
||||
local Buffer = Json_STL("Raid_Auction_Item_Pack_CallBack");
|
||||
Buffer.Parse(Chunk, 0, false);
|
||||
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("ServerAuctionCObj")) {
|
||||
RootTab["ServerAuctionCObj"].Cost = Buffer.Get("cost");
|
||||
RootTab["ServerAuctionCObj"].WindowName = Buffer.Get("preset_name");
|
||||
|
||||
RootTab["ServerAuctionCObj"].TimeMax = Buffer.Get("auction_await_max");
|
||||
RootTab["ServerAuctionCObj"].TimeNow = Buffer.Get("auction_await_now");
|
||||
RootTab["ServerAuctionCObj"].ReqFrame = false;
|
||||
RootTab["ServerAuctionCObj"].AuctionTimeReset();
|
||||
|
||||
RootTab["ServerAuctionCObj"].AuctionPack = null;
|
||||
RootTab["ServerAuctionCObj"].AuctionPack = [];
|
||||
|
||||
for (local i = 0; i < 5; i++) {
|
||||
local Gid = Buffer.Get("auctionpack->" + i + "->id");
|
||||
if (Gid == false) break;
|
||||
local Gcount = Buffer.Get("auctionpack->" + i + "->count");
|
||||
local Gname = Buffer.Get("auctionpack->" + i + "->name");
|
||||
local Grarity = Buffer.Get("auctionpack->" + i + "->rarity");
|
||||
local Gprice = Buffer.Get("auctionpack->" + i + "->price");
|
||||
|
||||
// local Gnow = i == 0 ? true : false;
|
||||
local Gnow = Buffer.Get("auctionpack->" + i + "->now");
|
||||
local Gover = Buffer.Get("auctionpack->" + i + "->over");
|
||||
local Gplayer = Buffer.Get("auctionpack->" + i + "->playername");
|
||||
local Gcost_id = Buffer.Get("auctionpack->" + i + "->cost_id");
|
||||
local Gcost_name = Buffer.Get("auctionpack->" + i + "->cost_name");
|
||||
local T = {
|
||||
id = Gid,
|
||||
count = Gcount,
|
||||
name = Gname,
|
||||
rarity = Grarity,
|
||||
price = Gprice,
|
||||
now = Gnow,
|
||||
over = Gover,
|
||||
player = Gplayer,
|
||||
cost_id = Gcost_id,
|
||||
cost_name = Gcost_name,
|
||||
}
|
||||
RootTab["ServerAuctionCObj"].AuctionPack.append(T);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
constructor() {
|
||||
//注册装备信息回调
|
||||
Pack_Control.rawset(25701002, Raid_Auction_Item_Pack_CallBack);
|
||||
}
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
//主界面背景
|
||||
T_DrawStayAni(obj, "common/server_auction/qfjp.ani", X, Y, 4, "Server_AuctionSystemMain");
|
||||
|
||||
//绘制窗口名字
|
||||
L_sq_DrawCode("【" + WindowName + "】", X + 155 - (WindowName.len() * 2), Y + 7, sq_RGBA(255, 255, 184, 250), 0, 1);
|
||||
}
|
||||
|
||||
|
||||
//绘制竞拍项目
|
||||
function DrawItem(obj) {
|
||||
if (!AuctionPack) return;
|
||||
foreach(Pos, Item in AuctionPack) {
|
||||
|
||||
if (Item.now == true) {
|
||||
T_DrawStayAni(obj, "common/server_auction/qfjp.ani", X + 38 + (Pos * 50), Y + 40, 3, "Server_AuctionSystemSlotLight");
|
||||
T_DrawStayAni(obj, "common/server_auction/qfjp.ani", X + 38 + (Pos * 50), Y + 40, 7, "Server_AuctionSystemSlotLight + 1");
|
||||
//绘制竞拍物品名字
|
||||
L_sq_DrawCode("【" + Item.name + "】", X + 155, Y + 207, sq_RGBA(255, 255, 184, 250), 0, 1);
|
||||
//绘制竞拍者名字
|
||||
L_sq_DrawCode("【" + Item.player + "】", X + 155, Y + 229, sq_RGBA(255, 255, 184, 250), 0, 1);
|
||||
//绘制当前价格
|
||||
L_sq_DrawCode(Item.price.tostring(), X + 155, Y + 251, sq_RGBA(255, 255, 184, 250), 0, 1);
|
||||
|
||||
|
||||
//绘制货币
|
||||
L_Sq_DrawItem(X + 40, Y + 284, Item.cost_id, 1, 0, 0, 0);
|
||||
//绘制货币名字
|
||||
L_sq_DrawCode("【" + Item.cost_name + "】", X + 79, Y + 299, sq_RGBA(255, 255, 184, 250), 0, 1);
|
||||
NowPrice = Item.price;
|
||||
}
|
||||
L_Sq_DrawItem(X + 51 + (Pos * 50), Y + 53, Item.id, Item.count, 0, 0, 0);
|
||||
if (Item.over == true) {
|
||||
T_DrawStayAni(obj, "common/server_auction/qfjp.ani", X + 48 + (Pos * 50), Y + 50, 5, "Server_AuctionSystemSlotOver");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function AuctionTimeReset() {
|
||||
if (TimeObj) TimeObj.Delete();
|
||||
TimeObj = null;
|
||||
TimeObj = TimeSTL("AuctionTimeObj", TimeNow);
|
||||
TimeObj.Reset();
|
||||
TimeObj.Start();
|
||||
}
|
||||
|
||||
//绘制进度条
|
||||
function DrawTimeP(obj) {
|
||||
if (TimeObj == null) return;
|
||||
|
||||
local Time = TimeObj.Get();
|
||||
local NTime = ((TimeNow - Time).tofloat() / 1000.0).tostring();
|
||||
local HRate = (Time.tofloat() + (TimeMax.tofloat() - TimeNow.tofloat())) / TimeMax.tofloat();
|
||||
|
||||
|
||||
|
||||
setClip(X + 29, Y + 119, X + 29 + 272 - (272.0 * HRate).tointeger(), Y + 119 + 12); //开始裁切
|
||||
T_DrawStayAni(obj, "common/server_auction/qfjp.ani", X + 29, Y + 119, 6, "Server_AuctionSystemTimeP");
|
||||
releaseClip(); //裁切结束
|
||||
|
||||
|
||||
L_sq_DrawCode("剩余时间: " + NTime + "s", X + 128, Y + 119, sq_RGBA(21, 187, 255, 250), 0, 1);
|
||||
|
||||
/*
|
||||
//时间走到以后需要重新请求数据包
|
||||
if (HRate == 0 && ReqFrame == false) {
|
||||
local T = {
|
||||
op = 25701001
|
||||
}
|
||||
|
||||
local str = Json.Encode(T);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
ReqFrame = true;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
function GetNum(count) {
|
||||
local a = 1;
|
||||
if (count == 0) return a;
|
||||
local b = 10;
|
||||
for (local i = 0; i < count - 1; i++) {
|
||||
b *= b;
|
||||
}
|
||||
return a * b;
|
||||
}
|
||||
//绘制按钮
|
||||
function DrawAuctionButton(obj) {
|
||||
|
||||
for (local i = 0; i < 3; i++) {
|
||||
local Button = ServerAuctionPro(obj, "Server_AuctionButton" + i, X + 28 + (i * 98), Y + 266 + 68, "common/server_auction/qfjp.ani", 77, 24, 0);
|
||||
Button.SetRectEnble(true, "Server_AuctionButtonr" + i, X + 28 + (i * 98), Y + 266 + 68, "common/server_auction/qfjp.ani", 1);
|
||||
Button.SetCustomClickEnble(true, "Server_AuctionButtonc" + i, X + 28 + (i * 98), Y + 266 + 68, "common/server_auction/qfjp.ani", 2);
|
||||
Button.Show();
|
||||
|
||||
L_sq_DrawCode("+" + GetNum(i), X + 60 + (i * 98), Y + 272 + 68, sq_RGBA(21, 187, 255, 250), 0, 1);
|
||||
if (Button.isLBActive()) {
|
||||
|
||||
local T = {
|
||||
op = 25701005,
|
||||
price = NowPrice + GetNum(i),
|
||||
cost = this.Cost,
|
||||
addcost = GetNum(i),
|
||||
}
|
||||
|
||||
local str = Json.Encode(T);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//开启界面回调
|
||||
function OpenClassCallBack() {
|
||||
|
||||
L_NewWindows("Lenheart", 170, 0x65535);
|
||||
local W = sq_GetPopupWindowMainCotrol(170);
|
||||
W.SetVisible(false);
|
||||
W.SetEnable(false);
|
||||
|
||||
|
||||
local T = {
|
||||
op = 25701001
|
||||
}
|
||||
|
||||
local str = Json.Encode(T);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
|
||||
}
|
||||
|
||||
//绘制入口
|
||||
function Draw(obj) {
|
||||
if (MainState) {
|
||||
if (WindowObj) {
|
||||
DrawMain(obj); //绘制主界面
|
||||
|
||||
DrawItem(obj); //绘制竞拍项目
|
||||
|
||||
DrawTimeP(obj); //绘制进度条
|
||||
|
||||
DrawAuctionButton(obj); //绘制按钮
|
||||
|
||||
WindowObj.Show(obj);
|
||||
X = WindowObj.X;
|
||||
Y = WindowObj.Y;
|
||||
} else {
|
||||
WindowObj = ServerAuctionWindow(X, Y, 329, 382, 28); //坐标 大小 标题栏高度
|
||||
// WindowObj.DeBugMode = true;
|
||||
}
|
||||
} else {
|
||||
if (WindowObj && WindowObj.YMouseSw == false) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
WindowObj.YMouseSw = true;
|
||||
WindowObj = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
if (KeyPressNB.isKeyPress(48, "SeverAuctionCloseKey")) {
|
||||
MainState = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function ServerAuction(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("ServerAuctionCObj")) {
|
||||
local Cobj = ServerAuctionC();
|
||||
RootTab.rawset("ServerAuctionCObj", Cobj);
|
||||
EventIcon("全服拍卖", 118, 118, Cobj);
|
||||
} else {
|
||||
RootTab["ServerAuctionCObj"].Proc(obj);
|
||||
RootTab["ServerAuctionCObj"].Draw(obj);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
function LenheartSeverNotiAnimotionCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
|
||||
getroottable().rawset("LenheartSeverNotiAnimotionSw", Jso.Ani);
|
||||
}
|
||||
|
||||
Pack_Control.rawset(30060, LenheartSeverNotiAnimotionCallBack);
|
||||
|
||||
function LenheartSeverNotiAnimotion(obj) {
|
||||
// getroottable().rawset("LenheartSeverNotiAnimotionSw", "common/announcement/leveche_cutscene.ani");
|
||||
if (getroottable().rawin("LenheartSeverNotiAnimotionSw")) {
|
||||
if (getroottable()["LenheartSeverNotiAnimotionSw"]) {
|
||||
//LenheartSeverNotiAnimotionSwmain.img
|
||||
if (sq_GetCurrentModuleType() == 1) {
|
||||
L_sq_DrawImg("lenheartsevernotianimotionswmain.img", 0, -1, 0);
|
||||
obj = sq_GetCNRDObjectToSQRCharacter(obj);
|
||||
local Ani = obj.sq_GetRestAni();
|
||||
sq_AnimationProc(Ani);
|
||||
sq_drawCurrentFrame(Ani, 400, 350, true);
|
||||
|
||||
local TAni = BasicsDrawTool.T_DrawDynamicAni(obj, getroottable()["LenheartSeverNotiAnimotionSw"], 0, 0, getroottable()["LenheartSeverNotiAnimotionSw"]);
|
||||
if (sq_IsEnd(TAni)) {
|
||||
sq_Rewind(TAni);
|
||||
getroottable().rawdelete("LenheartSeverNotiAnimotionSw");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,447 @@
|
|||
/*
|
||||
文件名:SignIn.nut
|
||||
路径:Plugins/SignIn/SignIn.nut
|
||||
创建日期:2023-05-06 15:28
|
||||
文件用途:
|
||||
*/
|
||||
|
||||
//HudPro按钮类
|
||||
class SIGNINButtonPro extends BasicsDrawTool // obj -- 按钮名称 -- X坐标 -- Y坐标 -- Ani调用路径 -- 宽度 -- 高度
|
||||
{
|
||||
obj = null; //Obj对象
|
||||
State = 0; //按钮状态
|
||||
ClickEnble = false; //点击效果
|
||||
ButtonDynamic = false; //动态按钮效果
|
||||
BaseFrame = null;
|
||||
|
||||
CustomClickEnble = false; //自定义点击效果
|
||||
CustomClickAnifile = null; //自定义点击效果Ani路径
|
||||
CustomButtonName = null; //自定义点击效果名称
|
||||
CustomClickFrame = null; //自定义点击效果Ani编号
|
||||
CustomClickx = null; //自定义点击效果X坐标
|
||||
CustomClicky = null; //自定义点击效果Y坐标
|
||||
|
||||
|
||||
RectEnble = false; //悬停效果
|
||||
RectButtonName = null; //悬停名称
|
||||
RectBaseAnifile = null; //悬停Ani路径
|
||||
RectFrame = null; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = null; //悬停X坐标
|
||||
Recty = null; //悬停Y坐标
|
||||
|
||||
|
||||
ButtonName = null; //按钮名称
|
||||
x = null; //X坐标
|
||||
y = null; //Y坐标
|
||||
BaseAnifile = null; //调用Ani路径
|
||||
width = null; //可点击宽度
|
||||
length = null; //可点击高度
|
||||
|
||||
Mobj = null; //鼠标对象
|
||||
//构造函数
|
||||
constructor(gObj, gButtonName, gX, gY, gAnifile, gWidth, gLength, gBaseFrame) {
|
||||
obj = gObj;
|
||||
ButtonName = gButtonName;
|
||||
x = gX;
|
||||
y = gY;
|
||||
BaseAnifile = gAnifile;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
BaseFrame = gBaseFrame;
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
//绘制按钮
|
||||
function Show() {
|
||||
if (ClickEnble) //是否开启点击效果
|
||||
{
|
||||
if (isLBDown() && State == 0) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 1; //按键进入按下状态
|
||||
++y;
|
||||
}
|
||||
if (!isLBDown() && State == 1) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 0; //按键进入弹起状态
|
||||
--y;
|
||||
}
|
||||
}
|
||||
|
||||
if (CustomClickEnble) //是否开启自定义点击效果
|
||||
{
|
||||
if (isLBDown()) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomClickFrame, CustomButtonName);
|
||||
else T_DrawDynamicAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if (RectEnble) //开启悬停效果时
|
||||
{
|
||||
if ((isInRect() && !isLBDown()) || (isInRect() && !CustomClickEnble)) //如果鼠标悬停的时候 并且没有点击的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(44);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, RectBaseAnifile, Rectx, Recty, RectFrame, RectButtonName);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
if (!isInRect()) //如果鼠标没有悬停的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(0);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, BaseAnifile, x, y, BaseFrame, ButtonName);
|
||||
else T_DrawDynamicAni(obj, BaseAnifile, x, y, ButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
//设置自定义点击效果
|
||||
function SetCustomClickEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
CustomClickEnble = bool; //自定义点击效果
|
||||
CustomClickAnifile = gAnifile; //自定义点击效果Ani路径
|
||||
CustomButtonName = gButtonName; //自定义点击效果名称
|
||||
CustomClickFrame = gFrame; //自定义点击效果Ani编号
|
||||
CustomClickx = gX; //自定义点击效果X坐标
|
||||
CustomClicky = gY; //自定义点击效果Y坐标
|
||||
}
|
||||
|
||||
//设置悬停效果
|
||||
function SetRectEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
RectEnble = bool; //悬停效果
|
||||
RectButtonName = gButtonName; //悬停名称
|
||||
RectBaseAnifile = gAnifile; //悬停Ani路径
|
||||
RectFrame = gFrame; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = gX; //悬停X坐标
|
||||
Recty = gY; //悬停Y坐标
|
||||
}
|
||||
|
||||
//设置动态按钮
|
||||
function SetClickEnble(bool) {
|
||||
ButtonDynamic = bool;
|
||||
}
|
||||
|
||||
//设置点击效果
|
||||
function SetClickEnble(bool) {
|
||||
ClickEnble = bool;
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown() {
|
||||
if (isInRect() && Mobj.Lb == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp() {
|
||||
if (isInRect() && Mobj.Lb == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
//左键单击状态
|
||||
function isLBActive() {
|
||||
if (isInRect() && Mobj.LbEvent) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
class SIGNINC extends BasicsDrawTool {
|
||||
WindowObj = null; //窗口对象
|
||||
MainState = false; //主状态
|
||||
X = 124;
|
||||
Y = 66;
|
||||
|
||||
NowClearanceCount = 0;
|
||||
RewardDayCount = 0;
|
||||
TodayState = 0;
|
||||
ExSignDate = null;
|
||||
BaseItemArr = null;
|
||||
ExItemArr = null;
|
||||
|
||||
|
||||
|
||||
//ItemInfo
|
||||
ItemInfoObject = null;
|
||||
ItemInfoDrawS = null;
|
||||
|
||||
//查询玩家信息
|
||||
function CheckPlayerInfo() {
|
||||
local T = {
|
||||
op = 20051001,
|
||||
}
|
||||
|
||||
local str = Json.Encode(T);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
|
||||
//玩家信息收包回调
|
||||
function CheckPlayerInfoCallBack(Chunk) {
|
||||
// Sout("收到包内容为 \n %L", Chunk);
|
||||
local Buffer = Json_STL("SignIn_Item_CheckPlayerInfo_CallBack");
|
||||
Buffer.Parse(Chunk, 0, false);
|
||||
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("SIGNINCObj")) {
|
||||
|
||||
//通关次数
|
||||
NowClearanceCount = Buffer.Get("PlayerInfo->NowClearanceCount");
|
||||
//已签到天数
|
||||
RewardDayCount = Buffer.Get("PlayerInfo->RewardDayCount");
|
||||
//今日是否签到
|
||||
TodayState = Buffer.Get("PlayerInfo->TodayState");
|
||||
//特殊签到天数信息
|
||||
ExSignDate = null;
|
||||
ExSignDate = [];
|
||||
for (local q = 0; q< 3; q++) {
|
||||
ExSignDate.append(Buffer.Get("ExSignDate->" + q));
|
||||
}
|
||||
//常规道具数组
|
||||
BaseItemArr = null;
|
||||
BaseItemArr = [];
|
||||
for (local i = 0; i< 28; i++) {
|
||||
local a = Buffer.Get("BaseItemArr->" + i + "->id");
|
||||
local b = Buffer.Get("BaseItemArr->" + i + "->num");
|
||||
local T = {
|
||||
id = a,
|
||||
count = b,
|
||||
}
|
||||
BaseItemArr.append(T);
|
||||
}
|
||||
|
||||
//特殊道具数组
|
||||
ExItemArr = null;
|
||||
ExItemArr = [];
|
||||
for (local z = 0; z< 3; z++) {
|
||||
local a = Buffer.Get("ExItemArr->" + z + "->id");
|
||||
local b = Buffer.Get("ExItemArr->" + z + "->num");
|
||||
local T = {
|
||||
id = a,
|
||||
count = b,
|
||||
}
|
||||
ExItemArr.append(T);
|
||||
}
|
||||
|
||||
|
||||
local ItemGetArray = {};
|
||||
foreach(P, V in BaseItemArr) {
|
||||
local ItemId = V.id;
|
||||
if (!ItemInfoObject.rawin(ItemId)) {
|
||||
if (!ItemGetArray.rawin(ItemId))
|
||||
ItemGetArray.rawset(ItemId, true);
|
||||
}
|
||||
}
|
||||
foreach(P, V in ExItemArr) {
|
||||
local ItemId = V.id;
|
||||
if (!ItemInfoObject.rawin(ItemId)) {
|
||||
if (!ItemGetArray.rawin(ItemId))
|
||||
ItemGetArray.rawset(ItemId, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (ItemGetArray.len() > 0) {
|
||||
local arr = [];
|
||||
foreach(Key, Value in ItemGetArray) {
|
||||
arr.append(Key);
|
||||
}
|
||||
local T = {
|
||||
op = 20231010,
|
||||
realop = 20051004,
|
||||
itemId = arr,
|
||||
Type = 2,
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function CheckItemInfoCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
foreach(Pos, Value in Jso.itemInfo) {
|
||||
if (Value.Name2.len() == 0)
|
||||
Value.Name2 = "Yosin-Team";
|
||||
ItemInfoObject.rawset(Jso.itemId[Pos], Value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
constructor() {
|
||||
//查询玩家信息回调
|
||||
Pack_Control.rawset(20051002, CheckPlayerInfoCallBack.bindenv(this));
|
||||
//查询道具信息回调
|
||||
Pack_Control.rawset(20051004, CheckItemInfoCallBack.bindenv(this));
|
||||
|
||||
ItemInfoObject = {};
|
||||
|
||||
//查询玩家信息
|
||||
CheckPlayerInfo();
|
||||
}
|
||||
|
||||
//绘制道具带道具信息
|
||||
function DrawItemEx(X, Y, Id, Count) {
|
||||
L_Sq_DrawItem(X, Y, Id, Count, 0, 0, 0);
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, 24, 24)) {
|
||||
ItemInfoDrawS = {};
|
||||
ItemInfoDrawS.X <- X;
|
||||
ItemInfoDrawS.Y <- Y;
|
||||
ItemInfoDrawS.ItemId <- Id;
|
||||
}
|
||||
}
|
||||
|
||||
//绘制道具相信信息
|
||||
ItemObject = null;
|
||||
|
||||
function DrawItemInfo(obj) {
|
||||
if (ItemInfoDrawS) {
|
||||
if (!ItemObject) {
|
||||
local ItemId = ItemInfoDrawS.ItemId;
|
||||
if (ItemInfoObject.rawin(ItemId)) {
|
||||
ItemObject = ItemInfoClass(ItemInfoObject[ItemId]);
|
||||
}
|
||||
}
|
||||
ItemObject.Show(ItemInfoDrawS.X, ItemInfoDrawS.Y - ItemObject.PageLength);
|
||||
} else {
|
||||
ItemObject = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
//主界面背景框
|
||||
T_DrawStayAni(obj, "common/signin/main.ani", X - 6, Y - 28, 9, "SignInSystemMainBackGround");
|
||||
|
||||
//主界面背景
|
||||
T_DrawStayAni(obj, "common/signin/main.ani", X, Y, 0, "SignInSystemMain");
|
||||
|
||||
//通关次数Max
|
||||
T_DrawStayAni(obj, "common/signin/main.ani", X + 194, Y + 101, 4, "SignInSystemMainMax");
|
||||
|
||||
//当前通关次数
|
||||
T_DrawStayAni(obj, "common/signin/main.ani", X + 167, Y + 101, NowClearanceCount + 2, "SignInSystemMainNow");
|
||||
|
||||
|
||||
ItemInfoDrawS = null;
|
||||
//绘制奖励道具
|
||||
if (BaseItemArr) {
|
||||
for (local z = 0; z< 28; z++) {
|
||||
local Item = BaseItemArr[z];
|
||||
DrawItemEx(X + 22 + ((z % 7) * 55), Y + 154 + ((z / 7) * 65), Item.id, Item.count);
|
||||
}
|
||||
}
|
||||
if (ExItemArr) {
|
||||
for (local y = 0; y< 3; y++) {
|
||||
local Item = ExItemArr[y];
|
||||
DrawItemEx(X + 457, Y + 166 + (y * 72), Item.id, Item.count);
|
||||
}
|
||||
}
|
||||
|
||||
if (TodayState == 0 && NowClearanceCount == 2) {
|
||||
local Button = SIGNINButtonPro(obj, "SignIn", X + 401, Y + 397, "common/signin/main.ani", 140, 40, 5);
|
||||
Button.SetRectEnble(true, "SignInr", X + 401, Y + 397, "common/signin/main.ani", 6);
|
||||
Button.SetCustomClickEnble(true, "SignInc", X + 401, Y + 397, "common/signin/main.ani", 7);
|
||||
|
||||
Button.Show();
|
||||
//签到按钮按下
|
||||
if (Button.isLBActive()) {
|
||||
local T = {
|
||||
op = 20051005,
|
||||
}
|
||||
|
||||
local str = Json.Encode(T);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
}
|
||||
|
||||
//签到绘制标签
|
||||
for (local i = 0; i< RewardDayCount; i++) {
|
||||
T_DrawStayAni(obj, "common/signin/main.ani", X + 13 + ((i % 7) * 55), Y + 145 + ((i / 7) * 66), 1, "SignInSystemMainSignDay" + i);
|
||||
for (local p = 0; p< 3; p++) {
|
||||
if (i == ExSignDate[p] - 1) {
|
||||
T_DrawStayAni(obj, "common/signin/main.ani", X + 450, Y + 159 + (p * 72), 1, "SignInSystemMainSignDay" + i + p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//绘制累计签到日期
|
||||
if (ExSignDate) {
|
||||
for (local r = 0; r< 3; r++) {
|
||||
local Date = ExSignDate[r];
|
||||
local len = Date.tostring().len();
|
||||
if (len == 1) {
|
||||
T_DrawStayAni(obj, "common/signin/num.ani", X + 484, Y + 144 + (r * 72), Date, "SignInSystemMainExSignDay" + r);
|
||||
} else {
|
||||
T_DrawStayAni(obj, "common/signin/num.ani", X + 480, Y + 144 + (r * 72), Date.tostring().slice(0, 1).tointeger(), "SignInSystemMainExSignDay" + r);
|
||||
T_DrawStayAni(obj, "common/signin/num.ani", X + 488, Y + 144 + (r * 72), Date.tostring().slice(1, 2).tointeger(), "SignInSystemMainExSignDay" + r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function OpenClassCallBack() {
|
||||
|
||||
L_NewWindows("Lenheart", 170, 0x65535);
|
||||
local W = sq_GetPopupWindowMainCotrol(170);
|
||||
W.SetVisible(false);
|
||||
W.SetEnable(false);
|
||||
|
||||
//查询玩家信息
|
||||
CheckPlayerInfo();
|
||||
}
|
||||
|
||||
function Draw(obj) {
|
||||
if (MainState) {
|
||||
if (WindowObj) {
|
||||
DrawMain(obj);
|
||||
WindowObj.Show(obj);
|
||||
X = WindowObj.X + 6;
|
||||
Y = WindowObj.Y + 28;
|
||||
DrawItemInfo(obj);
|
||||
} else {
|
||||
WindowObj = LenheartWindow(X - 6, Y - 28, 631 - 70, 535 - 48, 28); //坐标 大小 标题栏高度
|
||||
//WindowObj.DeBugMode = true;
|
||||
}
|
||||
} else {
|
||||
if (WindowObj && WindowObj.YMouseSw == false) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
WindowObj.YMouseSw = true;
|
||||
WindowObj = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Proc(obj) {
|
||||
if (KeyPressNB.isKeyPress(48, "SignIn")) {
|
||||
MainState = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function SignIn_New_Lenheart(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("SIGNINCObj")) {
|
||||
local Cobj = SIGNINC();
|
||||
RootTab.rawset("SIGNINCObj", Cobj);
|
||||
EventIcon("签到活动", 91, 1, Cobj);
|
||||
} else {
|
||||
RootTab["SIGNINCObj"].Proc(obj);
|
||||
RootTab["SIGNINCObj"].Draw(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (getroottable().rawin("LenheartFuncTab")) {
|
||||
getroottable()["LenheartFuncTab"].rawset("SignIn_New_LenheartFunc", SignIn_New_Lenheart);
|
||||
} else {
|
||||
local T = {};
|
||||
T.rawset("SignIn_New_LenheartFunc", SignIn_New_Lenheart);
|
||||
getroottable().rawset("LenheartFuncTab", T);
|
||||
}
|
||||
|
|
@ -0,0 +1,282 @@
|
|||
/*
|
||||
文件名:Tomb.nut
|
||||
路径:Plugins/Tomb/Tomb.nut
|
||||
创建日期:2023-10-28 17:40
|
||||
文件用途:
|
||||
*/
|
||||
|
||||
|
||||
class TombC extends BasicsDrawTool {
|
||||
WindowObj = null; //窗口对象
|
||||
MainState = false; //主状态
|
||||
X = 300;
|
||||
Y = 160;
|
||||
|
||||
//层数
|
||||
Index = 0;
|
||||
//总层数
|
||||
MaxIndex = 0;
|
||||
//道具
|
||||
ItemInfoObject = null;
|
||||
//需要的道具名字
|
||||
ItemName = null;
|
||||
//需要的道具数量
|
||||
ItemCount = null;
|
||||
|
||||
UseFlag = false;
|
||||
EndFlag = false;
|
||||
|
||||
function GetInfoCallBack(Chunk) {
|
||||
Sout("收到包 : \n %L", Chunk);
|
||||
ItemInfoObject = null;
|
||||
local Jso = Json.Decode(Chunk);
|
||||
Index = Jso.index;
|
||||
MaxIndex = Jso.endSize;
|
||||
|
||||
ItemName = Jso.useItemInfo.Name;
|
||||
ItemCount = Jso.useNum;
|
||||
|
||||
EndFlag = !Jso.end;
|
||||
|
||||
ItemInfoObject = Jso.itemInfo;
|
||||
if (ItemInfoObject.Name2.len() == 0)
|
||||
ItemInfoObject.Name2 = "Rindro-Team";
|
||||
}
|
||||
|
||||
function GetInfo() {
|
||||
local T = {
|
||||
op = 20062013
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
//失败
|
||||
function OpenTombCallBack_L(Chunk) {
|
||||
// Sout("收到包 : \n %L", Chunk);
|
||||
}
|
||||
//成功
|
||||
function OpenTombCallBack_S(Chunk) {
|
||||
// Sout("收到包 : \n %L", Chunk);
|
||||
}
|
||||
|
||||
//拔剑
|
||||
function OpenTomb() {
|
||||
local T = {
|
||||
op = 20062003,
|
||||
index = Index
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
function GetMyStkFlagCallBack(Chunk) {
|
||||
// Sout("收到包 : \n %L", Chunk);
|
||||
local Jso = Json.Decode(Chunk);
|
||||
UseFlag = Jso.useFlag;
|
||||
}
|
||||
|
||||
//获取自身材料
|
||||
function GetMyStkFlag() {
|
||||
local T = {
|
||||
op = 20062019
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
|
||||
constructor() {
|
||||
//获取基础配置回调包
|
||||
Pack_Control.rawset(20062014, GetInfoCallBack.bindenv(this));
|
||||
//拔剑结果包
|
||||
Pack_Control.rawset(20062008, OpenTombCallBack_L.bindenv(this));
|
||||
Pack_Control.rawset(20062006, OpenTombCallBack_S.bindenv(this));
|
||||
//自身材料是否足够回调包
|
||||
Pack_Control.rawset(20062020, GetMyStkFlagCallBack.bindenv(this));
|
||||
//获取自身材料是否足够
|
||||
|
||||
|
||||
GetInfo();
|
||||
GetMyStkFlag();
|
||||
}
|
||||
|
||||
QuestTips = false;
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
// if (!ItemInfoObject) return;
|
||||
//Item信息框一般为211的宽度
|
||||
L_sq_DrawWindow(X, Y, 210, 200, "interface/lenheartwindowcommon.img", 0, 11, 12, 11, 13);
|
||||
|
||||
//绘制背景
|
||||
L_sq_DrawImg("interface2/event/chn_event_2015/chn_tomb_ui.img", 0, X + 10, Y + 16);
|
||||
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X + 150, Y + 196, 16, 16)) {
|
||||
L_sq_DrawImg("interface/lenheartwindowcommon.img", 240, X + 150, Y + 196);
|
||||
QuestTips = true;
|
||||
} else {
|
||||
L_sq_DrawImg("interface/lenheartwindowcommon.img", 239, X + 150, Y + 196);
|
||||
QuestTips = false;
|
||||
}
|
||||
|
||||
|
||||
//关闭按钮
|
||||
local CloseButton = LenheartBaseButton(X + 206, Y + 1, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
||||
CloseButton.Show();
|
||||
if (CloseButton.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON2");
|
||||
L_sq_UseSkill(DIK_ESCAPE);
|
||||
MainState = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!UseFlag || !EndFlag) {
|
||||
local Str = "材料不足";
|
||||
if (UseFlag && !EndFlag) Str = "活动结束";
|
||||
local OpenButton = LenheartButtonText(X + 70, Y + 120 + 20 + 31 + 20, 22, Str);
|
||||
OpenButton.SetFrame(null, 323);
|
||||
OpenButton.SetTextOffset(-3, 1);
|
||||
OpenButton.Show();
|
||||
} else {
|
||||
//拔剑按钮
|
||||
local OpenButton = LenheartButtonText(X + 70, Y + 120 + 20 + 31 + 20, 22, "拔 剑");
|
||||
OpenButton.SetFrame(null, 323);
|
||||
OpenButton.SetTextOffset(6, 1);
|
||||
OpenButton.Show();
|
||||
if (OpenButton.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON2");
|
||||
AniState = 1;
|
||||
}
|
||||
|
||||
}
|
||||
DrawAni(obj);
|
||||
|
||||
|
||||
if (AniState == 0) T_DrawDynamicAni(obj, "common/tomb/stay.ani", X + 113, Y + 179, "TombEffectStay");
|
||||
|
||||
//特殊奖励
|
||||
if (ItemInfoObject) DrawItemEx(X + 96, Y + 120, ItemInfoObject.Id, 1);
|
||||
}
|
||||
|
||||
AniState = 0;
|
||||
|
||||
function DrawAni(obj) {
|
||||
if (AniState == 1) {
|
||||
local Ani = T_DrawDynamicAni(obj, "common/tomb/pick.ani", X + 113, Y + 179, "TombEffect");
|
||||
if (sq_IsEnd(Ani)) {
|
||||
sq_Rewind(Ani);
|
||||
AniState = 0;
|
||||
OpenTomb();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//开启界面回调
|
||||
function OpenClassCallBack() {
|
||||
|
||||
L_NewWindows("Lenheart", 170, 0x65535);
|
||||
local W = sq_GetPopupWindowMainCotrol(170);
|
||||
W.SetVisible(false);
|
||||
W.SetEnable(false);
|
||||
GetInfo();
|
||||
GetMyStkFlag();
|
||||
}
|
||||
|
||||
|
||||
//绘制道具相信信息
|
||||
ItemObject = null;
|
||||
ItemInfoDrawS = null;
|
||||
|
||||
function DrawItemInfo(obj) {
|
||||
if (ItemInfoDrawS && ItemInfoObject) {
|
||||
if (!ItemObject) {
|
||||
local ItemId = ItemInfoDrawS.ItemId;
|
||||
// if (ItemInfoObject.rawin(ItemId)) {
|
||||
ItemObject = ItemInfoClass(ItemInfoObject);
|
||||
// }
|
||||
}
|
||||
ItemObject.Show(ItemInfoDrawS.X, ItemInfoDrawS.Y - ItemObject.PageLength);
|
||||
} else {
|
||||
ItemObject = null;
|
||||
}
|
||||
}
|
||||
|
||||
//绘制入口
|
||||
function Draw(obj) {
|
||||
ItemInfoDrawS = null;
|
||||
if (MainState) {
|
||||
if (WindowObj) {
|
||||
DrawMain(obj);
|
||||
DrawSuspensionLayer(obj);
|
||||
WindowObj.Show(obj);
|
||||
X = WindowObj.X;
|
||||
Y = WindowObj.Y;
|
||||
|
||||
DrawItemInfo(obj);
|
||||
} else {
|
||||
WindowObj = LenheartWindow(X, Y, 224, 228, 28); //坐标 大小 标题栏高度
|
||||
// WindowObj.DeBugMode = true;
|
||||
}
|
||||
} else {
|
||||
if (WindowObj && WindowObj.YMouseSw == false) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
WindowObj.YMouseSw = true;
|
||||
WindowObj = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
if (KeyPressNB.isKeyPress(48, "TombCloseKey")) {
|
||||
MainState = false;
|
||||
}
|
||||
}
|
||||
|
||||
ItemInfoDrawS = null;
|
||||
//绘制道具带道具信息
|
||||
function DrawItemEx(X, Y, Id, Count) {
|
||||
L_Sq_DrawItem(X, Y, Id, Count, 0, 0, 0);
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, 24, 24)) {
|
||||
ItemInfoDrawS = {};
|
||||
ItemInfoDrawS.X <- X;
|
||||
ItemInfoDrawS.Y <- Y;
|
||||
ItemInfoDrawS.ItemId <- Id;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//悬浮层
|
||||
function DrawSuspensionLayer(obj) {
|
||||
//任务提示
|
||||
if (QuestTips) {
|
||||
L_sq_DrawWindow(X + 40, Y + 150, 224, 40, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
local QuestTipsStr = "背包在存在道具 [ " + ItemName + " ] x" + ItemCount + "个时,可参与拔剑活动。\n当前拔剑层数为 [ " + (Index + 1) + " ]层,总层数为 [ " + (MaxIndex + 1) + " ]层。";
|
||||
local QuestTipsArray = L_sq_GetStringDrawArray(QuestTipsStr, 251);
|
||||
foreach(Pos, va in QuestTipsArray) {
|
||||
// Sout("文本内容嗯: %L", va);
|
||||
L_sq_DrawCode(va, X + 40 + 7, Y + 7 + 150 + (Pos * 16), 0xFFFFFFFF, 1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Tomb(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("TombCObj")) {
|
||||
local Cobj = TombC();
|
||||
RootTab.rawset("TombCObj", Cobj);
|
||||
EventIcon("拔剑挑战", 271, 271, Cobj);
|
||||
} else {
|
||||
RootTab["TombCObj"].Proc(obj);
|
||||
RootTab["TombCObj"].Draw(obj);
|
||||
}
|
||||
}
|
||||
if (getroottable().rawin("LenheartFuncTab")) {
|
||||
getroottable()["LenheartFuncTab"].rawset("Tomb_LenheartFunc", Tomb);
|
||||
} else {
|
||||
local T = {};
|
||||
T.rawset("Tomb_LenheartFunc", Tomb);
|
||||
getroottable().rawset("LenheartFuncTab", T);
|
||||
}
|
||||
|
|
@ -0,0 +1,445 @@
|
|||
/*
|
||||
文件名:TownMove.nut
|
||||
路径:Plugins/TownMove/TownMove.nut
|
||||
创建日期:2023-05-17 18:02
|
||||
文件用途:
|
||||
*/
|
||||
|
||||
//HudPro按钮类
|
||||
class TownMovePro extends BasicsDrawTool // obj -- 按钮名称 -- X坐标 -- Y坐标 -- Ani调用路径 -- 宽度 -- 高度
|
||||
{
|
||||
obj = null; //Obj对象
|
||||
State = 0; //按钮状态
|
||||
ClickEnble = false; //点击效果
|
||||
ButtonDynamic = false; //动态按钮效果
|
||||
BaseFrame = null;
|
||||
|
||||
CustomClickEnble = false; //自定义点击效果
|
||||
CustomClickAnifile = null; //自定义点击效果Ani路径
|
||||
CustomButtonName = null; //自定义点击效果名称
|
||||
CustomClickFrame = null; //自定义点击效果Ani编号
|
||||
CustomClickx = null; //自定义点击效果X坐标
|
||||
CustomClicky = null; //自定义点击效果Y坐标
|
||||
|
||||
|
||||
RectEnble = false; //悬停效果
|
||||
RectButtonName = null; //悬停名称
|
||||
RectBaseAnifile = null; //悬停Ani路径
|
||||
RectFrame = null; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = null; //悬停X坐标
|
||||
Recty = null; //悬停Y坐标
|
||||
|
||||
|
||||
ButtonName = null; //按钮名称
|
||||
x = null; //X坐标
|
||||
y = null; //Y坐标
|
||||
BaseAnifile = null; //调用Ani路径
|
||||
width = null; //可点击宽度
|
||||
length = null; //可点击高度
|
||||
|
||||
Mobj = null; //鼠标对象
|
||||
//构造函数
|
||||
constructor(gButtonName, gX, gY, gAnifile, gWidth, gLength, gBaseFrame) {
|
||||
ButtonName = gButtonName;
|
||||
x = gX;
|
||||
y = gY;
|
||||
BaseAnifile = gAnifile;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
BaseFrame = gBaseFrame;
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
//绘制按钮
|
||||
function Show() {
|
||||
if (ClickEnble) //是否开启点击效果
|
||||
{
|
||||
if (isLBDown() && State == 0) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 1; //按键进入按下状态
|
||||
++y;
|
||||
}
|
||||
if (!isLBDown() && State == 1) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 0; //按键进入弹起状态
|
||||
--y;
|
||||
}
|
||||
}
|
||||
|
||||
if (CustomClickEnble) //是否开启自定义点击效果
|
||||
{
|
||||
if (isLBDown()) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
if (!ButtonDynamic) L_sq_DrawImg(CustomClickAnifile, CustomClickFrame, CustomClickx, CustomClicky);
|
||||
else T_DrawDynamicAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if (RectEnble) //开启悬停效果时
|
||||
{
|
||||
if ((isInRect() && !isLBDown()) || (isInRect() && !CustomClickEnble)) //如果鼠标悬停的时候 并且没有点击的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(44);
|
||||
if (!ButtonDynamic) L_sq_DrawImg(RectBaseAnifile, RectFrame, Rectx, Recty);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
if (!isInRect()) //如果鼠标没有悬停的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(0);
|
||||
if (!ButtonDynamic) L_sq_DrawImg(BaseAnifile, BaseFrame, x, y);
|
||||
else T_DrawDynamicAni(obj, BaseAnifile, x, y, ButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
//设置自定义点击效果
|
||||
function SetCustomClickEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
CustomClickEnble = bool; //自定义点击效果
|
||||
CustomClickAnifile = gAnifile; //自定义点击效果Ani路径
|
||||
CustomButtonName = gButtonName; //自定义点击效果名称
|
||||
CustomClickFrame = gFrame; //自定义点击效果Ani编号
|
||||
CustomClickx = gX; //自定义点击效果X坐标
|
||||
CustomClicky = gY; //自定义点击效果Y坐标
|
||||
}
|
||||
|
||||
//设置悬停效果
|
||||
function SetRectEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
RectEnble = bool; //悬停效果
|
||||
RectButtonName = gButtonName; //悬停名称
|
||||
RectBaseAnifile = gAnifile; //悬停Ani路径
|
||||
RectFrame = gFrame; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = gX; //悬停X坐标
|
||||
Recty = gY; //悬停Y坐标
|
||||
}
|
||||
|
||||
//设置动态按钮
|
||||
function SetClickEnble(bool) {
|
||||
ButtonDynamic = bool;
|
||||
}
|
||||
|
||||
//设置点击效果
|
||||
function SetClickEnble(bool) {
|
||||
ClickEnble = bool;
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown() {
|
||||
if (isInRect() && Mobj.Lb == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp() {
|
||||
if (isInRect() && Mobj.Lb == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
//左键单击状态
|
||||
function isLBActive() {
|
||||
if (isInRect() && Mobj.LbEvent) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class TownMoveWindow extends BasicsDrawTool {
|
||||
//宽度
|
||||
Width = null;
|
||||
//高度
|
||||
Height = null;
|
||||
//标题高度
|
||||
TitleH = null;
|
||||
|
||||
//X坐标
|
||||
X = null;
|
||||
B_X = null;
|
||||
//Y坐标
|
||||
Y = null;
|
||||
B_Y = null;
|
||||
|
||||
YMouseSw = true;
|
||||
DeBugMode = false;
|
||||
|
||||
Mobj = null;
|
||||
M_Xpos = null;
|
||||
M_Ypos = null;
|
||||
|
||||
|
||||
constructor(gX, gY, gWidth, gHeight, gTitleH) {
|
||||
//宽度
|
||||
Width = gWidth;
|
||||
//高度
|
||||
Height = gHeight;
|
||||
//标题高度
|
||||
TitleH = gTitleH;
|
||||
|
||||
//X坐标
|
||||
X = gX;
|
||||
//Y坐标
|
||||
Y = gY;
|
||||
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
|
||||
//设定鼠标逻辑
|
||||
function LockMouse() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, Width, Height)) {
|
||||
IMouse.LockMouseClick();
|
||||
YMouseSw = false;
|
||||
} else {
|
||||
if (YMouseSw == false && sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, 0, 0, 800, 600)) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
YMouseSw = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//设定窗口拖动逻辑
|
||||
function MoveWindow() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, Width, TitleH)) {
|
||||
|
||||
if (Mobj.Lb == 1) {
|
||||
if (!M_Xpos) M_Xpos = IMouse.GetXPos(); //原始鼠标位置数据
|
||||
if (!M_Ypos) M_Ypos = IMouse.GetYPos();
|
||||
if (!B_X) B_X = X; //原始窗口位置
|
||||
if (!B_Y) B_Y = Y;
|
||||
|
||||
X = B_X - (M_Xpos - IMouse.GetXPos());
|
||||
Y = B_Y - (M_Ypos - IMouse.GetYPos());
|
||||
|
||||
} else if (Mobj.Lb == 0) {
|
||||
M_Xpos = null;
|
||||
M_Ypos = null;
|
||||
B_X = null;
|
||||
B_Y = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
if (DeBugMode) sq_DrawBox(X, Y, Width, Height, 0xffffffff);
|
||||
|
||||
//设定鼠标逻辑
|
||||
LockMouse();
|
||||
|
||||
//设定窗口拖动逻辑
|
||||
MoveWindow();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class TownMoveC extends BasicsDrawTool {
|
||||
|
||||
//基准时间
|
||||
BaseTime = null;
|
||||
//闪光模式
|
||||
FlashMode = false;
|
||||
//按钮信息
|
||||
ButtonInfo = null;
|
||||
//移动信息
|
||||
MoveInfo = null;
|
||||
//页数
|
||||
Page = 0;
|
||||
//当前显示
|
||||
PageInfo = null;
|
||||
|
||||
WindowObj = null; //窗口对象
|
||||
MainState = false; //主状态
|
||||
X = 253;
|
||||
Y = 55;
|
||||
|
||||
|
||||
function GetTownMoveInfo() {
|
||||
local T = {
|
||||
op = 31013
|
||||
}
|
||||
local str = Json.Encode(T);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
|
||||
local T = {
|
||||
op = 31011
|
||||
}
|
||||
local str = Json.Encode(T);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
|
||||
}
|
||||
|
||||
function GetTownMoveInfoCallBack(Chunk) {
|
||||
// Sout("收到包内容为 \n %L", Chunk);
|
||||
local Buffer = Json_STL("TownMoveJsonObj");
|
||||
Buffer.Parse(Chunk, 0, false);
|
||||
|
||||
ButtonInfo = {};
|
||||
ButtonInfo.x <- Buffer.Get("ButtonXpos");
|
||||
ButtonInfo.y <- Buffer.Get("ButtonYpos");
|
||||
ButtonInfo.sx <- Buffer.Get("ButtonSizeX");
|
||||
ButtonInfo.sy <- Buffer.Get("ButtonSizeY");
|
||||
|
||||
MoveInfo = [];
|
||||
for (local i = 0; i< 50; i++) {
|
||||
local TownIndex = Buffer.Get("MoveInfo->" + i + "->TownIndex");
|
||||
if (TownIndex == false) break;
|
||||
local AreaIndex = Buffer.Get("MoveInfo->" + i + "->AreaIndex");
|
||||
local Xpos = Buffer.Get("MoveInfo->" + i + "->Xpos");
|
||||
local Ypos = Buffer.Get("MoveInfo->" + i + "->Ypos");
|
||||
local ImgPath = Buffer.Get("MoveInfo->" + i + "->ImgPath");
|
||||
local ImgFrame = Buffer.Get("MoveInfo->" + i + "->ImgFrame");
|
||||
local Title = Buffer.Get("MoveInfo->" + i + "->Title");
|
||||
local T = {};
|
||||
T.TownIndex <- TownIndex;
|
||||
T.AreaIndex <- AreaIndex;
|
||||
T.Xpos <- Xpos;
|
||||
T.Ypos <- Ypos;
|
||||
T.ImgPath <- ImgPath;
|
||||
T.ImgFrame <- ImgFrame;
|
||||
T.Title <- Title;
|
||||
MoveInfo.append(T);
|
||||
}
|
||||
|
||||
PageInfo = ScrollControl(MoveInfo, 7, 1);
|
||||
}
|
||||
|
||||
constructor() {
|
||||
//注册装备信息回调
|
||||
Pack_Control.rawset(31012, GetTownMoveInfoCallBack.bindenv(this));
|
||||
|
||||
GetTownMoveInfo();
|
||||
|
||||
BaseTime = Clock();
|
||||
}
|
||||
|
||||
//绘制按钮
|
||||
function DrawButton(obj) {
|
||||
//如果有信息绘制按钮
|
||||
if (ButtonInfo && !MainState) {
|
||||
//绘制镶嵌按钮
|
||||
local Button = TownMovePro("传送功能打开按钮", ButtonInfo.x, ButtonInfo.y, "interface2/hud/hud.img", ButtonInfo.sx, ButtonInfo.sy, 221);
|
||||
Button.SetRectEnble(true, "传送功能打开按钮", ButtonInfo.x, ButtonInfo.y, "interface2/hud/hud.img", 222);
|
||||
Button.SetCustomClickEnble(true, "传送功能打开按钮", ButtonInfo.x, ButtonInfo.y, "interface2/hud/hud.img", 223);
|
||||
Button.Show();
|
||||
if (Button.isLBActive()) {
|
||||
MainState = !MainState;
|
||||
OpenClassCallBack();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
//绘制主界面
|
||||
L_sq_DrawImg("interface2/ui/warpportal/warpportal_cn.img", 0, X, Y);
|
||||
|
||||
if (PageInfo) {
|
||||
if (IMouse.IsWheelUp()) {
|
||||
PageInfo.M();
|
||||
}
|
||||
if (IMouse.IsWheelDown()) {
|
||||
PageInfo.A();
|
||||
}
|
||||
|
||||
foreach(Pos, Value in PageInfo.FocusList[0]) {
|
||||
//绘制传送按钮
|
||||
local Button = TownMovePro("传送功能传送按钮" + Pos, X + 25, Y + 78 + (Pos * 52), "interface2/ui/warpportal/warpportal.img", 244, 45, Value.ImgFrame);
|
||||
Button.SetRectEnble(true, "传送功能传送按钮" + Pos, X + 25, Y + 78 + (Pos * 52), "interface2/ui/warpportal/warpportal.img", Value.ImgFrame + 1);
|
||||
Button.SetCustomClickEnble(true, "传送功能传送按钮" + Pos, X + 25, Y + 78 + (Pos * 52), "interface2/ui/warpportal/warpportal.img", Value.ImgFrame + 2);
|
||||
Button.Show();
|
||||
if (Button.isInRect()) {
|
||||
local NowTime = Clock() - BaseTime;
|
||||
if (NowTime >= 1000) {
|
||||
FlashMode = !FlashMode;
|
||||
BaseTime = Clock();
|
||||
}
|
||||
local A;
|
||||
if (!FlashMode) {
|
||||
A = sq_GetUniformVelocity(10, 250, NowTime, 1000);
|
||||
} else {
|
||||
A = sq_GetUniformVelocity(250, 10, NowTime, 1000);
|
||||
}
|
||||
//绘制特殊光效
|
||||
L_sq_DrawImg("interface2/ui/warpportal/warpportal.img", 1, X + 25, Y + 78 + (Pos * 52), 0, sq_RGBA(255, 255, 255, A), 1.0, 1.0);
|
||||
}
|
||||
|
||||
L_sq_DrawCode(Value.Title, X + 25 + 10, Y + 78 + (Pos * 52) + 14, sq_RGBA(243, 223, 197, 250), 2, 1);
|
||||
if (Button.isLBActive()) {
|
||||
L_sq_MoveTown(Value.TownIndex, Value.AreaIndex, Value.Xpos, Value.Ypos);
|
||||
MainState = !MainState;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (PageInfo) {
|
||||
|
||||
L_sq_DrawCode((PageInfo.Controller.Value + 1).tostring(), X + 124, Y + 438, sq_RGBA(150, 255, 30, 250), 0, 1);
|
||||
L_sq_DrawCode(" / " + (PageInfo.Controller.MaxValue + 1).tostring(), X + 124, Y + 438, sq_RGBA(150, 255, 30, 250), 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
//开启界面回调
|
||||
function OpenClassCallBack() {
|
||||
|
||||
L_NewWindows("Lenheart", 170, 0x65535);
|
||||
local W = sq_GetPopupWindowMainCotrol(170);
|
||||
W.SetVisible(false);
|
||||
W.SetEnable(false);
|
||||
|
||||
}
|
||||
|
||||
//绘制入口
|
||||
function Draw(obj) {
|
||||
DrawButton(obj);
|
||||
|
||||
if (MainState) {
|
||||
if (WindowObj) {
|
||||
DrawMain(obj);
|
||||
WindowObj.Show(obj);
|
||||
X = WindowObj.X;
|
||||
Y = WindowObj.Y;
|
||||
} else {
|
||||
WindowObj = LenheartWindow(X, Y, 294, 459, 24); //坐标 大小 标题栏高度
|
||||
// WindowObj.DeBugMode = true;
|
||||
}
|
||||
} else {
|
||||
if (WindowObj && WindowObj.YMouseSw == false) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
WindowObj.YMouseSw = true;
|
||||
WindowObj = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
if (KeyPressNB.isKeyPress(48, "TownMoveCloseKey")) {
|
||||
MainState = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function TownMove(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("TownMoveCObj")) {
|
||||
local Cobj = TownMoveC();
|
||||
RootTab.rawset("TownMoveCObj", Cobj);
|
||||
} else {
|
||||
RootTab["TownMoveCObj"].Proc(obj);
|
||||
RootTab["TownMoveCObj"].Draw(obj);
|
||||
}
|
||||
}
|
||||
|
||||
// if (getroottable().rawin("LenheartFuncTab")) {
|
||||
// getroottable()["LenheartFuncTab"].rawset("TownMoveFunc", TownMove);
|
||||
// } else {
|
||||
// local T = {};
|
||||
// T.rawset("TownMoveFunc", TownMove);
|
||||
// getroottable().rawset("LenheartFuncTab", T);
|
||||
// }
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,705 @@
|
|||
/*
|
||||
文件名:Tuguan.nut
|
||||
路径:Plugins/Tuguan/Tuguan.nut
|
||||
创建日期:2022-12-15 07:09
|
||||
文件用途:土罐的袖珍罐
|
||||
*/
|
||||
class TuguanButton // obj -- 按钮名称 -- 鼠标对象 -- X坐标 -- Y坐标 -- 宽度 -- 高度 -- Ani调用路径 -- Ani宽度 -- Ani高度 -- AniRGB --
|
||||
{
|
||||
obj = null;
|
||||
buttonName = null;
|
||||
IMouse = null;
|
||||
x = null;
|
||||
y = null;
|
||||
width = null;
|
||||
length = null;
|
||||
aniFileName = null;
|
||||
BoxStetu = null;
|
||||
Mobj = null; //鼠标对象
|
||||
|
||||
constructor(gObj, gButtonName, gIMouse, gX, gY, gWidth, gLength, ganiFileName) {
|
||||
obj = gObj;
|
||||
buttonName = gButtonName;
|
||||
IMouse = gIMouse;
|
||||
x = gX;
|
||||
y = gY;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
aniFileName = ganiFileName;
|
||||
BoxStetu = BoxStetu;
|
||||
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
|
||||
function drawButtonImage() {
|
||||
if (isDown())
|
||||
y++;
|
||||
|
||||
if (isInRect()) {
|
||||
local buttonAniEff = obj.getVar().GetAnimationMap(buttonName + "rect", aniFileName.tostring() + "_2.ani");
|
||||
sq_AnimationProc(buttonAniEff);
|
||||
sq_drawCurrentFrame(buttonAniEff, x, y, true);
|
||||
}
|
||||
if (!isInRect()) {
|
||||
local buttonAni = obj.getVar().GetAnimationMap(buttonName, aniFileName.tostring() + "_1.ani");
|
||||
sq_AnimationProc(buttonAni);
|
||||
sq_drawCurrentFrame(buttonAni, x, y, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//悬停状态
|
||||
function isInRect() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isDown() {
|
||||
if (isInRect() && Mobj.Lb == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp() {
|
||||
if (isInRect() && Mobj.Lb == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
//左键单击状态
|
||||
function isActive() {
|
||||
if (isInRect() && Mobj.LbEvent) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class TuguanTextButton // obj -- 按钮名称 -- 鼠标对象 -- X坐标 -- Y坐标 -- 宽度 -- 高度 -- Ani调用路径 -- Ani宽度 -- Ani高度 -- AniRGB --
|
||||
{
|
||||
obj = null;
|
||||
IMouse = null;
|
||||
x = null;
|
||||
y = null;
|
||||
width = null;
|
||||
length = null;
|
||||
BoxStetu = null;
|
||||
str = null;
|
||||
type = null;
|
||||
mb = null;
|
||||
rgb = null;
|
||||
irgb = null;
|
||||
Mobj = null; //鼠标对象
|
||||
|
||||
constructor(gObj, gIMouse, gX, gY, gWidth, gLength, gstr, grgba, girgba, gtype, gmb) {
|
||||
obj = gObj;
|
||||
IMouse = gIMouse;
|
||||
x = gX;
|
||||
y = gY;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
BoxStetu = BoxStetu;
|
||||
str = gstr;
|
||||
type = gtype;
|
||||
mb = gmb;
|
||||
rgb = grgba;
|
||||
irgb = girgba;
|
||||
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
|
||||
function draw() {
|
||||
if (isDown())
|
||||
y++;
|
||||
|
||||
if (isInRect()) {
|
||||
L_sq_DrawCode(str, x, y, irgb, type, mb);
|
||||
}
|
||||
if (!isInRect()) {
|
||||
L_sq_DrawCode(str, x, y, rgb, type, mb);
|
||||
}
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isDown() {
|
||||
if (isInRect() && Mobj.Lb == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp() {
|
||||
if (isInRect() && Mobj.Lb == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
//左键单击状态
|
||||
function isActive() {
|
||||
if (isInRect() && Mobj.LbEvent) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
class TuguanSystem extends BasicsDrawTool {
|
||||
|
||||
State = 0;
|
||||
MainSoundsSw = 0;
|
||||
ASoundSw = 0;
|
||||
SSoundSw = 0;
|
||||
|
||||
SelectModel = 0;
|
||||
BoxName = null;
|
||||
BoxId = null;
|
||||
BoxNameXpos = null;
|
||||
BoxNameYpos = null;
|
||||
BoxCount = null;
|
||||
ProbabilityTab = null;
|
||||
AniType = null;
|
||||
|
||||
//Ani对象
|
||||
P1_01 = null;
|
||||
P2_01 = null;
|
||||
P3_01 = null;
|
||||
P4_02 = null;
|
||||
MainEffAni = null;
|
||||
MainEffAniArr = null;
|
||||
|
||||
|
||||
//奖励包对象
|
||||
RewardObj = null;
|
||||
|
||||
RewardObjTen = null;
|
||||
|
||||
SendBackChunk = null;
|
||||
|
||||
|
||||
//ItemInfo
|
||||
ItemInfoObject = null;
|
||||
ItemInfoDrawS = null;
|
||||
|
||||
//界面回包
|
||||
function TuguanOpenCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
if (State == 0) {
|
||||
BoxName = Jso.BoxName;
|
||||
BoxId = Jso.BoxId;
|
||||
BoxNameXpos = Jso.BoxNameXpos;
|
||||
BoxNameYpos = Jso.BoxNameYpos;
|
||||
BoxCount = Jso.BoxCount;
|
||||
ProbabilityTab = Jso.ProbabilityTab;
|
||||
State = 1;
|
||||
}
|
||||
|
||||
if (!ItemInfoObject.rawin(BoxId)) {
|
||||
local arr = [BoxId];
|
||||
local T = {
|
||||
op = 20231010,
|
||||
realop = 20008668,
|
||||
itemId = arr,
|
||||
Type = 2,
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//抽奖回包
|
||||
function TuguanRewardCallBack(Chunk) {
|
||||
|
||||
local Jso = Json.Decode(Chunk);
|
||||
|
||||
AniType = Jso.AniType;
|
||||
BoxCount = Jso.BoxCount;
|
||||
RewardObj = Jso.RewardObj;
|
||||
State = 3;
|
||||
|
||||
local ItemGetArray = {};
|
||||
foreach(P, V in RewardObj.ItemBuffer) {
|
||||
for (local i = 0; i< 2; i++) {
|
||||
local ItemId = V["itemid" + i];
|
||||
if (!ItemInfoObject.rawin(ItemId)) {
|
||||
if (!ItemGetArray.rawin(ItemId))
|
||||
ItemGetArray.rawset(ItemId, true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (ItemGetArray.len() > 0) {
|
||||
local arr = [];
|
||||
foreach(Key, Value in ItemGetArray) {
|
||||
arr.append(Key);
|
||||
}
|
||||
local T = {
|
||||
op = 20231010,
|
||||
realop = 20008668,
|
||||
itemId = arr,
|
||||
Type = 2,
|
||||
}
|
||||
SendPack(T);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function SendCallBackChunk(Chunk) {
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("TuguanObj")) {
|
||||
local Tobj = RootTab["TuguanObj"];
|
||||
Tobj.SendBackChunk = Chunk;
|
||||
Tobj.State = 3;
|
||||
}
|
||||
}
|
||||
|
||||
function GetItemInfoCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
|
||||
foreach(Pos, Value in Jso.itemInfo) {
|
||||
if (Value.Name2.len() == 0)
|
||||
Value.Name2 = "Yosin-Team";
|
||||
ItemInfoObject.rawset(Jso.itemId[Pos], Value);
|
||||
}
|
||||
}
|
||||
|
||||
constructor() {
|
||||
MainEffAniArr = {};
|
||||
ItemInfoObject = {};
|
||||
|
||||
Pack_Control.rawset(20008002, TuguanOpenCallBack.bindenv(this));
|
||||
Pack_Control.rawset(20008004, TuguanRewardCallBack.bindenv(this));
|
||||
Pack_Control.rawset(20008666, SendCallBackChunk.bindenv(this));
|
||||
Pack_Control.rawset(20008668, GetItemInfoCallBack.bindenv(this));
|
||||
}
|
||||
|
||||
//退出
|
||||
function Exit() {
|
||||
State = 0;
|
||||
MainEffAniArr.rawset("P1_01", P1_01);
|
||||
MainEffAniArr.rawset("P2_01", P2_01);
|
||||
MainEffAniArr.rawset("P3_01", P3_01);
|
||||
MainEffAniArr.rawset("P4_02", P4_02);
|
||||
ResetRewardMainAni();
|
||||
}
|
||||
|
||||
//打开窗口
|
||||
function OpenWindow(obj) {
|
||||
//窗口关闭
|
||||
if (!sq_GetPopupWindowMainCotrol(267)) {
|
||||
L_NewWindows("Lenheart", 267, 0x65535); //打开土罐窗口
|
||||
State = 2;
|
||||
}
|
||||
}
|
||||
|
||||
//重置特效Ani
|
||||
function ResetRewardMainAni() {
|
||||
foreach(Pos, value in MainEffAniArr) {
|
||||
sq_Rewind(value);
|
||||
}
|
||||
MainEffAniArr = null;
|
||||
MainEffAniArr = {};
|
||||
|
||||
}
|
||||
|
||||
//绘制抽奖动画
|
||||
function DrawRewardAni(obj) {
|
||||
|
||||
//停止斗篷风声
|
||||
obj.stopSound(2022121701);
|
||||
|
||||
P1_01 = T_DrawDynamicAni(obj, "common/tuguan/0510_danjinjar/" + AniType + "/" + AniType + "1_01.ani", X + 20, Y + 30, "TuguanSystemDrawReward" + AniType + "1_01");
|
||||
//土罐眼睛闪光
|
||||
if (P1_01 && sq_GetAnimationFrameIndex(P1_01) == 13) {
|
||||
if (AniType == "a" || AniType == "s") obj.sq_PlaySound("DANJIN_START_AS");
|
||||
else obj.sq_PlaySound("DANJIN_START_N");
|
||||
}
|
||||
|
||||
if (P1_01 && sq_IsEnd(P1_01)) P2_01 = T_DrawDynamicAni(obj, "common/tuguan/0510_danjinjar/" + AniType + "/" + AniType + "2_01.ani", X + 20, Y + 30, "TuguanSystemDrawReward" + AniType + "2_01");
|
||||
if (P2_01 && sq_GetAnimationFrameIndex(P2_01) == 0) {
|
||||
if (AniType == "b") obj.sq_PlaySound("DANJIN_SUMMON_B");
|
||||
else if (AniType == "a") obj.sq_PlaySound("DANJIN_SUMMON_A");
|
||||
else if (AniType == "s") obj.sq_PlaySound("DANJIN_SUMMON_S");
|
||||
}
|
||||
if (P2_01 && sq_GetAnimationFrameIndex(P2_01) == 8) {
|
||||
if (AniType == "b") obj.sq_PlaySound("DANJIN_GAMBLE_B");
|
||||
else if (AniType == "a") obj.sq_PlaySound("DANJIN_GAMBLE_A");
|
||||
else if (AniType == "s") obj.sq_PlaySound("DANJIN_GAMBLE_S");
|
||||
}
|
||||
|
||||
if (P2_01 && sq_IsEnd(P2_01)) P3_01 = T_DrawDynamicAni(obj, "common/tuguan/0510_danjinjar/" + AniType + "/" + AniType + "3_01.ani", X + 20, Y + 30, "TuguanSystemDrawReward" + AniType + "3_01");
|
||||
if (P3_01 && sq_IsEnd(P3_01)) P4_02 = T_DrawDynamicAni(obj, "common/tuguan/0510_danjinjar/" + AniType + "/" + AniType + "4_02.ani", X + 20, Y + 30, "TuguanSystemDrawReward" + AniType + "4_02");
|
||||
|
||||
if (P4_02 && sq_IsEnd(P4_02)) {
|
||||
|
||||
MainEffAniArr.rawset("P1_01", P1_01);
|
||||
MainEffAniArr.rawset("P2_01", P2_01);
|
||||
MainEffAniArr.rawset("P3_01", P3_01);
|
||||
MainEffAniArr.rawset("P4_02", P4_02);
|
||||
|
||||
sq_Rewind(P1_01);
|
||||
sq_Rewind(P2_01);
|
||||
sq_Rewind(P3_01);
|
||||
sq_Rewind(P4_02);
|
||||
// ResetRewardMainAni();
|
||||
|
||||
obj.sq_PlaySound("DANJIN_GAMBLE_FIN");
|
||||
|
||||
State = 4;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//绘制奖励列表
|
||||
function DrawRewardItem(obj) {
|
||||
//单抽
|
||||
if (SelectModel == 1) {
|
||||
T_DrawStayAni(obj, "common/tuguan/main.ani", X + 20, Y + 30, 5, "TuguanRewardMain");
|
||||
L_sq_DrawCode("最后结果", (X - 195) + 377, (Y - 100) + 182, sq_RGBA(255, 177, 0, 250), 1, 1);
|
||||
T_DrawStayAni(obj, "common/tuguan/main.ani", X + 20 + 141, Y + 30 + 91, 7, "TuguanRewardMainOneX");
|
||||
|
||||
for (local z = 0; z< 2; z++) {
|
||||
//绘制槽
|
||||
T_DrawStayAni(obj, "common/tuguan/main.ani", X + 20 + 141 + 9 + (z * 34), Y + 30 + 91 + 9, 8, "TuguanRewardMainOneXx");
|
||||
}
|
||||
for (local x = 0; x< 2; x++) {
|
||||
//品级背景光
|
||||
local Rarity = RewardObj.ItemBuffer[0]["itemrarity" + x];
|
||||
switch (Rarity) {
|
||||
case 2:
|
||||
T_DrawDynamicAni(obj, "common/tuguan/0510_danjinjar/light_iconslot.ani", X + 20 + 141 + 9 + (x * 34), Y + 30 + 91 + 9, "TuguanRewardMainoieff" + Rarity);
|
||||
break;
|
||||
case 3:
|
||||
T_DrawDynamicAni(obj, "common/tuguan/0510_danjinjar/light_iconslot_1.ani", X + 20 + 141 + 9 + (x * 34), Y + 30 + 91 + 9, "TuguanRewardMainoieff" + Rarity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ItemInfoDrawS = null;
|
||||
for (local i = 0; i< 2; i++) {
|
||||
local ItemId = RewardObj.ItemBuffer[0]["itemid" + i];
|
||||
local ItemCount = RewardObj.ItemBuffer[0]["itemcount" + i];
|
||||
//绘制物品
|
||||
L_Sq_DrawItem(X + 20 + 141 + 9 + (i * 34) + 3, Y + 30 + 91 + 9 + 3, ItemId, ItemCount, 0, 0, 0);
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X + 20 + 141 + 9 + (i * 34) + 3, Y + 30 + 91 + 9 + 3, 24, 24)) {
|
||||
ItemInfoDrawS = {};
|
||||
ItemInfoDrawS.X <- X + 20 + 141 + 9 + (i * 34) + 3;
|
||||
ItemInfoDrawS.Y <- Y + 30 + 91 + 9 + 3;
|
||||
ItemInfoDrawS.ItemId <- ItemId;
|
||||
}
|
||||
|
||||
//物品刷新光
|
||||
local Ani = T_DrawDynamicAni(obj, "common/tuguan/0510_danjinjar/common_excute_icon_front_a.ani", X + 20 + 141 + 13 + (i * 34), Y + 30 + 91 + 12, "TuguanRewardMainoieff" + i);
|
||||
MainEffAniArr.rawset("TuguanRewardMainoieff" + i, Ani);
|
||||
|
||||
//品级闪烁光
|
||||
local Rarity = RewardObj.ItemBuffer[0]["itemrarity" + i];
|
||||
switch (Rarity) {
|
||||
case 2:
|
||||
if (ASoundSw == 0) {
|
||||
obj.sq_PlaySound("DANJIN_GAMBLE_CLASS_A");
|
||||
ASoundSw = 1;
|
||||
}
|
||||
local RAni = T_DrawDynamicAni(obj, "common/tuguan/0510_danjinjar/iconslot_00.ani", X + 20 + 141 + 13 + (i * 34), Y + 30 + 91 + 12, "TuguanRewardMainoreff" + 2);
|
||||
MainEffAniArr.rawset("TuguanRewardMainoreff" + 2, RAni);
|
||||
break;
|
||||
case 3:
|
||||
if (SSoundSw == 0) {
|
||||
obj.sq_PlaySound("DANJIN_GAMBLE_FANFARE");
|
||||
SSoundSw = 1;
|
||||
}
|
||||
local RAni = T_DrawDynamicAni(obj, "common/tuguan/0510_danjinjar/iconslot_01.ani", X + 20 + 141 + 13 + (i * 34), Y + 30 + 91 + 12, "TuguanRewardMainoreff" + 3);
|
||||
MainEffAniArr.rawset("TuguanRewardMainoreff" + 3, RAni);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
L_sq_DrawCode("祝你发大财!", (X - 195) + 371, (Y - 100) + 320, sq_RGBA(255, 177, 0, 250), 1, 1);
|
||||
}
|
||||
//10连抽
|
||||
else if (SelectModel == 10) {
|
||||
T_DrawStayAni(obj, "common/tuguan/main.ani", X + 20, Y + 30, 6, "TuguanRewardMainT");
|
||||
L_sq_DrawCode("最后结果", (X - 195) + 377, (Y - 100) + 142, sq_RGBA(255, 177, 0, 250), 1, 1);
|
||||
//T_DrawStayAni(obj, "common/tuguan/main.ani", X + 20 + 141, Y + 30 + 91, 7, "TuguanRewardMainTenX");
|
||||
ItemInfoDrawS = null;
|
||||
for (local i = 0; i< 10; i++) {
|
||||
local ofs = i;
|
||||
if (i > 7) ofs += 1;
|
||||
T_DrawStayAni(obj, "common/tuguan/main.ani", (X - 195) + 198 + 30 + ((ofs % 4) * 86), Y + 62 + ((ofs / 4) * 50), 7, "TuguanRewardMainTenX");
|
||||
|
||||
for (local y = 0; y< 2; y++) {
|
||||
//绘制槽
|
||||
T_DrawStayAni(obj, "common/tuguan/main.ani", (X - 195) + 198 + 30 + 9 + ((ofs % 4) * 86) + (y * 34), Y + 62 + 9 + ((ofs / 4) * 50), 8, "TuguanRewardMainOneXx");
|
||||
}
|
||||
|
||||
for (local x = 0; x< 2; x++) {
|
||||
//品级背景光
|
||||
local Rarity = RewardObj.ItemBuffer[i]["itemrarity" + x];
|
||||
switch (Rarity) {
|
||||
case 2:
|
||||
T_DrawDynamicAni(obj, "common/tuguan/0510_danjinjar/light_iconslot.ani", (X - 195) + 198 + 30 + 10 + ((ofs % 4) * 86) + (x * 34), Y + 62 + 10 + ((ofs / 4) * 50), "TuguanRewardMainoieff" + Rarity);
|
||||
break;
|
||||
case 3:
|
||||
T_DrawDynamicAni(obj, "common/tuguan/0510_danjinjar/light_iconslot_1.ani", (X - 195) + 198 + 30 + 10 + ((ofs % 4) * 86) + (x * 34), Y + 62 + 10 + ((ofs / 4) * 50), "TuguanRewardMainoieff" + Rarity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (local z = 0; z< 2; z++) {
|
||||
local ItemId = RewardObj.ItemBuffer[i]["itemid" + z];
|
||||
local ItemCount = RewardObj.ItemBuffer[i]["itemcount" + z];
|
||||
//绘制物品
|
||||
L_Sq_DrawItem((X - 195) + 198 + 30 + 9 + ((ofs % 4) * 86) + (z * 34) + 3, Y + 62 + 9 + ((ofs / 4) * 50) + 3, ItemId, ItemCount, 0, 0, 0);
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, (X - 195) + 198 + 30 + 9 + ((ofs % 4) * 86) + (z * 34) + 3, Y + 62 + 9 + ((ofs / 4) * 50) + 3, 24, 24)) {
|
||||
ItemInfoDrawS = {};
|
||||
ItemInfoDrawS.X <- (X - 195) + 198 + 30 + 9 + ((ofs % 4) * 86) + (z * 34) + 3;
|
||||
ItemInfoDrawS.Y <- Y + 62 + 9 + ((ofs / 4) * 50) + 3;
|
||||
ItemInfoDrawS.ItemId <- ItemId;
|
||||
}
|
||||
|
||||
//物品刷新光
|
||||
local Ani = T_DrawDynamicAni(obj, "common/tuguan/0510_danjinjar/common_excute_icon_front_a.ani", (X - 195) + 198 + 30 + 13 + ((ofs % 4) * 86) + (z * 34), Y + 62 + 12 + ((ofs / 4) * 50), "TuguanRewardMainoieff" + z);
|
||||
MainEffAniArr.rawset("TuguanRewardMainoieff" + z, Ani);
|
||||
|
||||
//品级闪烁光
|
||||
local Rarity = RewardObj.ItemBuffer[i]["itemrarity" + z];
|
||||
switch (Rarity) {
|
||||
case 2:
|
||||
if (ASoundSw == 0) {
|
||||
obj.sq_PlaySound("DANJIN_GAMBLE_CLASS_A");
|
||||
ASoundSw = 1;
|
||||
}
|
||||
local RAni = T_DrawDynamicAni(obj, "common/tuguan/0510_danjinjar/iconslot_00.ani", (X - 195) + 198 + 30 + 13 + ((ofs % 4) * 86) + (z * 34), Y + 62 + 12 + ((ofs / 4) * 50), "TuguanRewardMainoreff" + 2);
|
||||
MainEffAniArr.rawset("TuguanRewardMainoreff" + 2, RAni);
|
||||
break;
|
||||
case 3:
|
||||
if (SSoundSw == 0) {
|
||||
obj.sq_PlaySound("DANJIN_GAMBLE_FANFARE");
|
||||
SSoundSw = 1;
|
||||
}
|
||||
local RAni = T_DrawDynamicAni(obj, "common/tuguan/0510_danjinjar/iconslot_01.ani", (X - 195) + 198 + 30 + 13 + ((ofs % 4) * 86) + (z * 34), Y + 62 + 12 + ((ofs / 4) * 50), "TuguanRewardMainoreff" + 3);
|
||||
MainEffAniArr.rawset("TuguanRewardMainoreff" + 3, RAni);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
L_sq_DrawCode("祝你发大财!", (X - 195) + 371, (Y - 100) + 336, sq_RGBA(255, 177, 0, 250), 1, 1);
|
||||
}
|
||||
MainEffAni = T_DrawDynamicAni(obj, "common/tuguan/0510_danjinjar/background_excute_front_supreme.ani", X + 20, Y + 30, "TuguanSystemDrawRewardMainAniL");
|
||||
MainEffAniArr.rawset("TuguanSystemDrawRewardMainAniL", MainEffAni);
|
||||
}
|
||||
|
||||
//播放主界面音效
|
||||
function PlayMainSounds(obj) {
|
||||
if (State == 2 && MainSoundsSw == 0) {
|
||||
obj.sq_PlaySound("DANJIN_START_LOOP", 2022121701);
|
||||
MainSoundsSw = 1;
|
||||
}
|
||||
if (State != 2 && State != 3) {
|
||||
obj.stopSound(2022121701);
|
||||
MainSoundsSw = 0;
|
||||
}
|
||||
if (State != 4) {
|
||||
SSoundSw = 0;
|
||||
ASoundSw = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
//窗口
|
||||
T_DrawStayAni(obj, "common/tuguan/main.ani", X, Y, 0, "TuguanSystemMain");
|
||||
//标题
|
||||
L_sq_DrawCode(BoxName, X + BoxNameXpos, Y + BoxNameYpos, sq_RGBA(230, 200, 155, 250), 1, 1);
|
||||
//动画
|
||||
if (State == 2) T_DrawDynamicAni(obj, "common/tuguan/0510_danjinjar/lobby/lobby_wait_rank_1step_1_step_common_0510_danjin_body.ani", X + 20, Y + 30, "TuguanSystemMainbackgroundeff");
|
||||
//抽奖动画
|
||||
if (State == 3) {
|
||||
|
||||
DrawRewardAni(obj);
|
||||
|
||||
}
|
||||
//奖励列表
|
||||
if (State == 4) {
|
||||
DrawRewardItem(obj);
|
||||
if (SendBackChunk) {
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(SendBackChunk);
|
||||
L_sq_SendPack();
|
||||
SendBackChunk = null;
|
||||
}
|
||||
}
|
||||
//遮罩
|
||||
T_DrawStayAni(obj, "common/tuguan/main.ani", X + 17, Y + 26, 1, "TuguanSystemMainbackgroundblack");
|
||||
//图标框
|
||||
T_DrawStayAni(obj, "common/tuguan/main.ani", X + 187, Y + 26 + 250, 3, "TuguanSystemMainbackgrounditem");
|
||||
//盒子数量
|
||||
L_Sq_DrawItem(X + 187 + 3, Y + 26 + 250 + 3, BoxId, BoxCount, 0, 0, 0);
|
||||
if (State == 2) ItemInfoDrawS = null;
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X + 187 + 3, Y + 26 + 250, 24, 24)) {
|
||||
ItemInfoDrawS = {};
|
||||
ItemInfoDrawS.X <- X + 187 + 3;
|
||||
ItemInfoDrawS.Y <- Y + 26 + 250;
|
||||
ItemInfoDrawS.ItemId <- BoxId;
|
||||
}
|
||||
|
||||
//绘制模式字体
|
||||
L_sq_DrawCode("开启1个", X + 90, Y + 287, sq_RGBA(230, 200, 155, 250), 0, 1);
|
||||
L_sq_DrawCode("开启10个", X + 90 + 200, Y + 287, sq_RGBA(230, 200, 155, 250), 0, 1);
|
||||
|
||||
|
||||
//单抽按钮
|
||||
local OneButton = TuguanButton(obj, "TuguanOneButton", IMouse, X + 68, Y + 286, 72, 20, "common/tuguan/db_newani_sel");
|
||||
OneButton.drawButtonImage();
|
||||
if (OneButton.isActive() && (State == 2 || State == 4)) //单抽按钮按下
|
||||
{
|
||||
SelectModel = 1;
|
||||
State = 2;
|
||||
}
|
||||
|
||||
//单抽按钮
|
||||
local TenButton = TuguanButton(obj, "TuguanTenButton", IMouse, X + 68 + 201, Y + 286, 72, 20, "common/tuguan/db_newani_sel");
|
||||
TenButton.drawButtonImage();
|
||||
if (TenButton.isActive() && (State == 2 || State == 4)) //单抽按钮按下
|
||||
{
|
||||
SelectModel = 10;
|
||||
State = 2;
|
||||
}
|
||||
|
||||
if (SelectModel != 0) {
|
||||
local Box_Statu_Button_Offset = 0;
|
||||
if (SelectModel == 10) Box_Statu_Button_Offset = 201;
|
||||
T_DrawStayAni(obj, "common/tuguan/db_newani_sel_3.ani", X + 68 + Box_Statu_Button_Offset, Y + 286, 0, "TuguanSelectModelp");
|
||||
T_DrawStayAni(obj, "common/tuguan/main.ani", X + 68 + Box_Statu_Button_Offset - 41, Y + 286 - 6, 4, "TuguanSystemMainbackgrounditem");
|
||||
}
|
||||
|
||||
local ProbabilityButton = TuguanTextButton(obj, IMouse, X + 68 - 46, Y + 286 + 40, 62, 18, "※查看概率", sq_RGBA(230, 200, 155, 150), sq_RGBA(230, 200, 155, 250), 1, 1);
|
||||
ProbabilityButton.draw();
|
||||
if (ProbabilityButton.isActive()) {
|
||||
L_Cmd(ProbabilityTab);
|
||||
}
|
||||
|
||||
local doselectbutton = TuguanButton(obj, "Tuguandoselectbutton", IMouse, X + 68 + 98, Y + 347, 72, 20, "common/tuguan/open");
|
||||
doselectbutton.drawButtonImage();
|
||||
if (doselectbutton.isActive()) {
|
||||
if (SelectModel != 0 && (State == 2 || State == 4)) {
|
||||
//抽奖包
|
||||
local TuguanDoselectPack = Json_STL("TuguanDoselectPack");
|
||||
TuguanDoselectPack.Put("op", 20008003);
|
||||
TuguanDoselectPack.Put("doselect", SelectModel);
|
||||
TuguanDoselectPack.Put("itemindex", BoxId);
|
||||
local str = TuguanDoselectPack.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
TuguanDoselectPack.Delete();
|
||||
} else if (State == 3) {
|
||||
MainEffAniArr.rawset("P1_01", P1_01);
|
||||
MainEffAniArr.rawset("P2_01", P2_01);
|
||||
MainEffAniArr.rawset("P3_01", P3_01);
|
||||
MainEffAniArr.rawset("P4_02", P4_02);
|
||||
ResetRewardMainAni();
|
||||
State = 4;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ItemObject = null;
|
||||
|
||||
function DrawItemInfo(obj) {
|
||||
if (ItemInfoDrawS) {
|
||||
if (!ItemInfoObject.rawin(ItemInfoDrawS.ItemId)) return;
|
||||
if (!ItemObject) {
|
||||
local ItemId = ItemInfoDrawS.ItemId;
|
||||
ItemObject = ItemInfoClass(ItemInfoObject[ItemId]);
|
||||
}
|
||||
ItemObject.Show(ItemInfoDrawS.X, ItemInfoDrawS.Y - ItemObject.PageLength);
|
||||
} else {
|
||||
ItemObject = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function DrawAMain(obj) {
|
||||
//如果是打开状态
|
||||
if (State >= 2) {
|
||||
//窗口被关闭类状态写回未开启
|
||||
if (KeyPressNB.isKeyPress(48, "TuguanFucCloseKey")) {
|
||||
MainState = false;
|
||||
Exit();
|
||||
}
|
||||
//播放主界面音效
|
||||
PlayMainSounds(obj);
|
||||
//绘制主界面
|
||||
DrawMain(obj);
|
||||
//绘制道具信息
|
||||
DrawItemInfo(obj);
|
||||
}
|
||||
}
|
||||
|
||||
X = 195;
|
||||
Y = 100;
|
||||
MainState = false;
|
||||
WindowObj = null;
|
||||
//运行主函数
|
||||
function Run(obj) {
|
||||
if (State == 1) {
|
||||
MainState = true;
|
||||
State = 2;
|
||||
}
|
||||
|
||||
if (MainState) {
|
||||
if (WindowObj) {
|
||||
|
||||
DrawAMain(obj);
|
||||
WindowObj.Show(obj);
|
||||
X = WindowObj.X;
|
||||
Y = WindowObj.Y;
|
||||
} else {
|
||||
WindowObj = LenheartWindow(X, Y, 405, 372, 28); //坐标 大小 标题栏高度
|
||||
// WindowObj.DeBugMode = true;
|
||||
|
||||
L_NewWindows("Lenheart", 170, 0x65535);
|
||||
local W = sq_GetPopupWindowMainCotrol(170);
|
||||
W.SetVisible(false);
|
||||
W.SetEnable(false);
|
||||
}
|
||||
} else {
|
||||
if (WindowObj && WindowObj.YMouseSw == false) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
WindowObj.YMouseSw = true;
|
||||
WindowObj = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function TuguanFuc(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (sq_GetCurrentModuleType() == 1) {
|
||||
if (!RootTab.rawin("TuguanObj")) {
|
||||
local Cobj = TuguanSystem();
|
||||
RootTab.rawset("TuguanObj", Cobj);
|
||||
} else {
|
||||
RootTab["TuguanObj"].Run(obj);
|
||||
}
|
||||
} else {
|
||||
if (RootTab.rawin("TuguanObj")) {
|
||||
RootTab.rawdelete("TuguanObj");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (getroottable().rawin("LenheartFuncTab")) {
|
||||
getroottable()["LenheartFuncTab"].rawset("TuguanFucFunc", TuguanFuc);
|
||||
} else {
|
||||
local T = {};
|
||||
T.rawset("TuguanFucFunc", TuguanFuc);
|
||||
getroottable().rawset("LenheartFuncTab", T);
|
||||
}
|
||||
|
|
@ -0,0 +1,314 @@
|
|||
/*
|
||||
文件名:WorldTower.nut
|
||||
路径:Plugins/WorldTower/WorldTower.nut
|
||||
创建日期:2023-06-20 06:33
|
||||
文件用途:
|
||||
*/
|
||||
|
||||
//HudPro按钮类
|
||||
class WorldTowerPro extends BasicsDrawTool // obj -- 按钮名称 -- X坐标 -- Y坐标 -- Ani调用路径 -- 宽度 -- 高度
|
||||
{
|
||||
obj = null; //Obj对象
|
||||
State = 0; //按钮状态
|
||||
ClickEnble = false; //点击效果
|
||||
ButtonDynamic = false; //动态按钮效果
|
||||
BaseFrame = null;
|
||||
|
||||
CustomClickEnble = false; //自定义点击效果
|
||||
CustomClickAnifile = null; //自定义点击效果Ani路径
|
||||
CustomButtonName = null; //自定义点击效果名称
|
||||
CustomClickFrame = null; //自定义点击效果Ani编号
|
||||
CustomClickx = null; //自定义点击效果X坐标
|
||||
CustomClicky = null; //自定义点击效果Y坐标
|
||||
|
||||
|
||||
RectEnble = false; //悬停效果
|
||||
RectButtonName = null; //悬停名称
|
||||
RectBaseAnifile = null; //悬停Ani路径
|
||||
RectFrame = null; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = null; //悬停X坐标
|
||||
Recty = null; //悬停Y坐标
|
||||
|
||||
|
||||
ButtonName = null; //按钮名称
|
||||
x = null; //X坐标
|
||||
y = null; //Y坐标
|
||||
BaseAnifile = null; //调用Ani路径
|
||||
width = null; //可点击宽度
|
||||
length = null; //可点击高度
|
||||
|
||||
Mobj = null; //鼠标对象
|
||||
//构造函数
|
||||
constructor(gObj, gButtonName, gX, gY, gAnifile, gWidth, gLength, gBaseFrame) {
|
||||
obj = gObj;
|
||||
ButtonName = gButtonName;
|
||||
x = gX;
|
||||
y = gY;
|
||||
BaseAnifile = gAnifile;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
BaseFrame = gBaseFrame;
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
//绘制按钮
|
||||
function Show() {
|
||||
if (ClickEnble) //是否开启点击效果
|
||||
{
|
||||
if (isLBDown() && State == 0) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 1; //按键进入按下状态
|
||||
++y;
|
||||
}
|
||||
if (!isLBDown() && State == 1) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 0; //按键进入弹起状态
|
||||
--y;
|
||||
}
|
||||
}
|
||||
|
||||
if (CustomClickEnble) //是否开启自定义点击效果
|
||||
{
|
||||
if (isLBDown()) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomClickFrame, CustomButtonName);
|
||||
else T_DrawDynamicAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if (RectEnble) //开启悬停效果时
|
||||
{
|
||||
if ((isInRect() && !isLBDown()) || (isInRect() && !CustomClickEnble)) //如果鼠标悬停的时候 并且没有点击的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(44);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, RectBaseAnifile, Rectx, Recty, RectFrame, RectButtonName);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
if (!isInRect()) //如果鼠标没有悬停的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(0);
|
||||
if (!ButtonDynamic) T_DrawStayAni(obj, BaseAnifile, x, y, BaseFrame, ButtonName);
|
||||
else T_DrawDynamicAni(obj, BaseAnifile, x, y, ButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
//设置自定义点击效果
|
||||
function SetCustomClickEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
CustomClickEnble = bool; //自定义点击效果
|
||||
CustomClickAnifile = gAnifile; //自定义点击效果Ani路径
|
||||
CustomButtonName = gButtonName; //自定义点击效果名称
|
||||
CustomClickFrame = gFrame; //自定义点击效果Ani编号
|
||||
CustomClickx = gX; //自定义点击效果X坐标
|
||||
CustomClicky = gY; //自定义点击效果Y坐标
|
||||
}
|
||||
|
||||
//设置悬停效果
|
||||
function SetRectEnble(bool, gButtonName, gX, gY, gAnifile, gFrame) {
|
||||
RectEnble = bool; //悬停效果
|
||||
RectButtonName = gButtonName; //悬停名称
|
||||
RectBaseAnifile = gAnifile; //悬停Ani路径
|
||||
RectFrame = gFrame; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = gX; //悬停X坐标
|
||||
Recty = gY; //悬停Y坐标
|
||||
}
|
||||
|
||||
//设置动态按钮
|
||||
function SetClickEnble(bool) {
|
||||
ButtonDynamic = bool;
|
||||
}
|
||||
|
||||
//设置点击效果
|
||||
function SetClickEnble(bool) {
|
||||
ClickEnble = bool;
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown() {
|
||||
if (isInRect() && Mobj.Lb == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp() {
|
||||
if (isInRect() && Mobj.Lb == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
//左键单击状态
|
||||
function isLBActive() {
|
||||
if (isInRect() && Mobj.LbEvent) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
class WorldTowerWindow extends BasicsDrawTool {
|
||||
//宽度
|
||||
Width = null;
|
||||
//高度
|
||||
Height = null;
|
||||
//标题高度
|
||||
TitleH = null;
|
||||
|
||||
//X坐标
|
||||
X = null;
|
||||
B_X = null;
|
||||
//Y坐标
|
||||
Y = null;
|
||||
B_Y = null;
|
||||
|
||||
YMouseSw = true;
|
||||
DeBugMode = false;
|
||||
|
||||
Mobj = null;
|
||||
M_Xpos = null;
|
||||
M_Ypos = null;
|
||||
|
||||
|
||||
constructor(gX, gY, gWidth, gHeight, gTitleH) {
|
||||
//宽度
|
||||
Width = gWidth;
|
||||
//高度
|
||||
Height = gHeight;
|
||||
//标题高度
|
||||
TitleH = gTitleH;
|
||||
|
||||
//X坐标
|
||||
X = gX;
|
||||
//Y坐标
|
||||
Y = gY;
|
||||
|
||||
if (getroottable().rawin("MouseObject")) Mobj = getroottable()["MouseObject"];
|
||||
}
|
||||
|
||||
//设定鼠标逻辑
|
||||
function LockMouse() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, Width, Height)) {
|
||||
IMouse.LockMouseClick();
|
||||
YMouseSw = false;
|
||||
} else {
|
||||
if (YMouseSw == false && sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, 0, 0, 800, 600)) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
YMouseSw = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//设定窗口拖动逻辑
|
||||
function MoveWindow() {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, Width, TitleH)) {
|
||||
|
||||
if (Mobj.Lb == 1) {
|
||||
if (!M_Xpos) M_Xpos = IMouse.GetXPos(); //原始鼠标位置数据
|
||||
if (!M_Ypos) M_Ypos = IMouse.GetYPos();
|
||||
if (!B_X) B_X = X; //原始窗口位置
|
||||
if (!B_Y) B_Y = Y;
|
||||
|
||||
X = B_X - (M_Xpos - IMouse.GetXPos());
|
||||
Y = B_Y - (M_Ypos - IMouse.GetYPos());
|
||||
|
||||
} else if (Mobj.Lb == 0) {
|
||||
M_Xpos = null;
|
||||
M_Ypos = null;
|
||||
B_X = null;
|
||||
B_Y = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
if (DeBugMode) sq_DrawBox(X, Y, Width, Height, 0xffffffff);
|
||||
|
||||
//设定鼠标逻辑
|
||||
LockMouse();
|
||||
|
||||
//设定窗口拖动逻辑
|
||||
MoveWindow();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class WorldTowerC extends BasicsDrawTool {
|
||||
WindowObj = null; //窗口对象
|
||||
MainState = false; //主状态
|
||||
X = 6;
|
||||
Y = 30;
|
||||
|
||||
constructor() {
|
||||
|
||||
}
|
||||
|
||||
//绘制功能按钮
|
||||
function DrawTabButton(obj) {
|
||||
local Btn = WorldTowerPro(obj, "WorldTowerMain1", X + 21, Y + 29, "common/worldtower/new/btn.ani", 29, 23, 150);
|
||||
Btn.SetRectEnble(true, "WorldTowerMain2", X + 21, Y + 29, "common/worldtower/new/btn.ani", 151);
|
||||
Btn.SetCustomClickEnble(true, "WorldTowerMain3", X + 21, Y + 30, "common/worldtower/new/btn.ani", 152);
|
||||
Btn.Show();
|
||||
}
|
||||
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
//窗口
|
||||
T_DrawStayAni(obj, "common/worldtower/new/resource.ani", X, Y, 0, "WorldTowerSystemMaina");
|
||||
setClip(X + 2, Y + 65, X + 727, Y + 378);
|
||||
T_DrawDynamicAni(obj, "common/worldtower/new/title_bg_001.ani", X + 3, Y + 24, "WorldTowerSystemMainb");
|
||||
releaseClip(); //裁切结束
|
||||
|
||||
DrawTabButton(obj);
|
||||
}
|
||||
|
||||
//开启界面回调
|
||||
function OpenClassCallBack() {
|
||||
|
||||
L_NewWindows("Lenheart", 170, 0x65535);
|
||||
local W = sq_GetPopupWindowMainCotrol(170);
|
||||
W.SetVisible(false);
|
||||
W.SetEnable(false);
|
||||
|
||||
}
|
||||
|
||||
//绘制入口
|
||||
function Draw(obj) {
|
||||
if (MainState) {
|
||||
if (WindowObj) {
|
||||
DrawMain(obj);
|
||||
WindowObj.Show(obj);
|
||||
X = WindowObj.X;
|
||||
Y = WindowObj.Y;
|
||||
} else {
|
||||
WindowObj = WorldTowerWindow(X, Y, 788, 468, 28); //坐标 大小 标题栏高度
|
||||
//WindowObj.DeBugMode = true;
|
||||
}
|
||||
} else {
|
||||
if (WindowObj && WindowObj.YMouseSw == false) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
WindowObj.YMouseSw = true;
|
||||
WindowObj = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
if (KeyPressNB.isKeyPress(48, "WorldTowerCloseKey")) {
|
||||
MainState = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function WorldTower(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("WorldTowerCObj")) {
|
||||
local Cobj = WorldTowerC();
|
||||
RootTab.rawset("WorldTowerCObj", Cobj);
|
||||
EventIcon("世界之塔", 52, 52, Cobj);
|
||||
} else {
|
||||
RootTab["WorldTowerCObj"].Proc(obj);
|
||||
RootTab["WorldTowerCObj"].Draw(obj);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
文件名:ProcPassiveSkill_ATGunner.nut
|
||||
路径:ProcPassiveSkill/ProcPassiveSkill_ATGunner.nut
|
||||
创建日期:2022-09-09 19:11
|
||||
文件用途:女枪手被动技能
|
||||
*/
|
||||
if (!getroottable().rawin("ProcPassiveSkill_ATGunner_Table")) ProcPassiveSkill_ATGunner_Table <- {}
|
||||
|
||||
function ProcPassiveSkill_ATGunner(obj, Index, Level) {
|
||||
ProcPassiveSkill_All(obj, Index, Level);
|
||||
|
||||
if (ProcPassiveSkill_ATGunner_Table.rawin(Index) == true) {
|
||||
ProcPassiveSkill_ATGunner_Table[Index](obj, Index, Level);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
文件名:ProcPassiveSkill_All.nut
|
||||
路径:ProcPassiveSkill/ProcPassiveSkill_All.nut
|
||||
创建日期:2022-09-09 19:11
|
||||
文件用途:全职业被动技能
|
||||
*/
|
||||
|
||||
|
||||
function ProcPassiveSkill_All(obj, Index, Level) {
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
文件名:SetState_ATFighter.nut
|
||||
路径:SetState/SetState_ATFighter.nut
|
||||
创建日期:2022-09-04 20:18
|
||||
文件用途:男格斗设置状态函数
|
||||
*/
|
||||
function setState_ATFighter(obj, state, datas, isResetTimer) {
|
||||
if (!obj)
|
||||
return;
|
||||
setState_All(obj, state, datas, isResetTimer);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
文件名:SetState_ATGunner.nut
|
||||
路径:SetState/SetState_ATGunner.nut
|
||||
创建日期:2022-09-04 20:19
|
||||
文件用途:女枪手设置状态函数
|
||||
*/
|
||||
|
||||
if (!getroottable().rawin("setState_ATGunner_Table")) setState_ATGunner_Table <- {}
|
||||
function setState_ATGunner(obj, state, datas, isResetTimer) {
|
||||
if (!obj)
|
||||
return;
|
||||
setState_All(obj, state, datas, isResetTimer);
|
||||
|
||||
//根据主状态判断执行函数
|
||||
if (setState_ATGunner_Table.rawin(state) == true) {
|
||||
foreach (Flag,Func in setState_ATGunner_Table[state]) {
|
||||
Func(obj, state, datas, isResetTimer);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
文件名:SetState_ATMage.nut
|
||||
路径:SetState/SetState_ATMage.nut
|
||||
创建日期:2022-09-04 20:19
|
||||
文件用途:男法师设置状态函数
|
||||
*/
|
||||
function setState_ATMage(obj, state, datas, isResetTimer) {
|
||||
if (!obj)
|
||||
return;
|
||||
setState_All(obj, state, datas, isResetTimer);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
文件名:SetState_All.nut
|
||||
路径:SetState/SetState_All.nut
|
||||
创建日期:2022-09-04 20:15
|
||||
文件用途:全职业设置状态函数
|
||||
*/
|
||||
|
||||
|
||||
dofile("sqr/SetState/SetState_ATFighter.nut");
|
||||
dofile("sqr/SetState/SetState_ATGunner.nut");
|
||||
dofile("sqr/SetState/SetState_ATMage.nut");
|
||||
dofile("sqr/SetState/SetState_CreatorMage.nut");
|
||||
dofile("sqr/SetState/SetState_DemonicSwordman.nut");
|
||||
dofile("sqr/SetState/SetState_Fighter.nut");
|
||||
dofile("sqr/SetState/SetState_Gunner.nut");
|
||||
dofile("sqr/SetState/SetState_Mage.nut");
|
||||
dofile("sqr/SetState/SetState_Priest.nut");
|
||||
dofile("sqr/SetState/SetState_Swordman.nut");
|
||||
dofile("sqr/SetState/SetState_Thief.nut");
|
||||
|
||||
if (!getroottable().rawin("Chr_State_Table")) Chr_State_Table <- {}
|
||||
|
||||
function setState_All(obj, state, datas, isResetTimer) {
|
||||
Chr_State_Table.rawset(15, state);
|
||||
for (local i = 0; i < 12; i++) //将12位子状态push进 储存器的对应号位中
|
||||
{
|
||||
Chr_State_Table.rawset(i, obj.sq_GetVectorData(datas, i));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
文件名:SetState_CreatorMage.nut
|
||||
路径:SetState/SetState_CreatorMage.nut
|
||||
创建日期:2022-09-04 20:19
|
||||
文件用途:缔造者设置状态函数
|
||||
*/
|
||||
function setState_CreatorMage(obj, state, datas, isResetTimer) {
|
||||
if (!obj)
|
||||
return;
|
||||
setState_All(obj, state, datas, isResetTimer);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
文件名:SetState_DemonicSwordman.nut
|
||||
路径:SetState/SetState_DemonicSwordman.nut
|
||||
创建日期:2022-09-04 20:19
|
||||
文件用途:黑暗武士设置状态函数
|
||||
*/
|
||||
function setState_DemonicSwordman(obj, state, datas, isResetTimer) {
|
||||
if (!obj)
|
||||
return;
|
||||
setState_All(obj, state, datas, isResetTimer);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
文件名:SetState_Fighter.nut
|
||||
路径:SetState/SetState_Fighter.nut
|
||||
创建日期:2022-09-04 20:19
|
||||
文件用途:女格斗设置状态函数
|
||||
*/
|
||||
function setState_Fighter(obj, state, datas, isResetTimer) {
|
||||
if (!obj)
|
||||
return;
|
||||
setState_All(obj, state, datas, isResetTimer);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
文件名:SetState_Gunner.nut
|
||||
路径:SetState/SetState_Gunner.nut
|
||||
创建日期:2022-09-04 20:19
|
||||
文件用途:男枪手设置状态函数
|
||||
*/
|
||||
function setState_Gunner(obj, state, datas, isResetTimer) {
|
||||
if (!obj)
|
||||
return;
|
||||
setState_All(obj, state, datas, isResetTimer);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
文件名:SetState_Mage.nut
|
||||
路径:SetState/SetState_Mage.nut
|
||||
创建日期:2022-09-04 20:20
|
||||
文件用途:女法师设置状态函数
|
||||
*/
|
||||
function setState_Mage(obj, state, datas, isResetTimer) {
|
||||
if (!obj)
|
||||
return;
|
||||
setState_All(obj, state, datas, isResetTimer);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
文件名:SetState_Priest.nut
|
||||
路径:SetState/SetState_Priest.nut
|
||||
创建日期:2022-09-04 20:20
|
||||
文件用途:圣职者设置状态函数
|
||||
*/
|
||||
function setState_Priest(obj, state, datas, isResetTimer) {
|
||||
if (!obj)
|
||||
return;
|
||||
setState_All(obj, state, datas, isResetTimer);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
文件名:SetState_Swordman.nut
|
||||
路径:SetState/SetState_Swordman.nut
|
||||
创建日期:2022-09-04 20:15
|
||||
文件用途:鬼剑士绘制界面回调函数(原生)
|
||||
*/
|
||||
|
||||
function setState_Swordman(obj, state, datas, isResetTimer) {
|
||||
if (!obj)
|
||||
return;
|
||||
setState_All(obj, state, datas, isResetTimer);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
文件名:SetState_Thief.nut
|
||||
路径:SetState/SetState_Thief.nut
|
||||
创建日期:2022-09-04 20:20
|
||||
文件用途:暗夜使者设置状态函数
|
||||
*/
|
||||
function setState_Thief(obj, state, datas, isResetTimer) {
|
||||
if (!obj)
|
||||
return;
|
||||
setState_All(obj, state, datas, isResetTimer);
|
||||
return 1;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
文件名:DebugInfo.nut
|
||||
路径:Tool/DebugInfo.nut
|
||||
创建日期:2022-09-06 19:08
|
||||
文件用途:输出必要信息在屏幕上
|
||||
*/
|
||||
|
||||
function DebugInfo() {
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
local stage = sq_GetGlobaludpModuleStage();
|
||||
local dungeon = sq_GetDungeonByStage(stage);
|
||||
local dungeonIndex = sq_GetDuegonIndex(dungeon);
|
||||
local MapIndex = sq_GetMapIndex(stage);
|
||||
//if(dungeonIndex != 6000)return;
|
||||
local Color = 0xFF00B1FF;
|
||||
local Color1 = 0xFFACFF08;
|
||||
local X = 0;
|
||||
local Y = 0;
|
||||
|
||||
L_Code_STL("副本编号 : ", X + 15, Y + 155, Color, 2);
|
||||
L_Code_STL("" + dungeonIndex, X + 80, Y + 155, Color1, 2);
|
||||
|
||||
L_Code_STL("地图编号 : ", X + 115, Y + 155, Color, 2);
|
||||
L_Code_STL("" + MapIndex, X + 180, Y + 155, Color1, 2);
|
||||
|
||||
L_Code_STL("世界类型 : ", X + 215, Y + 155, Color, 2);
|
||||
L_Code_STL("未完成", X + 275, Y + 155, Color1, 2);
|
||||
|
||||
L_Code_STL("------------------------------------------", X + 15, Y + 180, Color, 2);
|
||||
|
||||
L_Code_STL("主状态 : ", X + 15, Y + 200, Color, 2);
|
||||
L_Code_STL("" + Chr_State_Table[15], X + 62, Y + 200, Color1, 2);
|
||||
|
||||
L_Code_STL("转职编号 : ", X + 83, Y + 200, Color, 2);
|
||||
L_Code_STL("" + sq_getGrowType(obj), X + 143, Y + 200, Color1, 2);
|
||||
|
||||
L_Code_STL("技能编号 : ", X + 156, Y + 200, Color, 2);
|
||||
L_Code_STL("" + obj.getCurrentSkillIndex(), X + 216, Y + 200, Color1, 2);
|
||||
|
||||
L_Code_STL("动画编号 : ", X + 240, Y + 200, Color, 2);
|
||||
for (local i = 0; i < 200; i++) {
|
||||
if (obj.isCurrentCutomAniIndex(i) == true) L_Code_STL("" + i, X + 300, Y + 200, Color1, 2);
|
||||
//else L_Code_STL("无", X + 300, Y + 200, Color1, 2);
|
||||
}
|
||||
|
||||
for (local z = 0; z < 12; z++) {
|
||||
L_Code_STL("子状态" + z + " : ", X + 15, Y + 223 + (z * 20), 0xFF9AFA00, 2);
|
||||
L_Code_STL("" + Chr_State_Table[z], X + 85, Y + 223 + (z * 20), 0xFF0045FF, 2);
|
||||
|
||||
}
|
||||
|
||||
L_Code_STL("人物坐标X : ", X + 165, Y + 260, Color, 2);
|
||||
L_Code_STL("" + obj.getXPos(), X + 235, Y + 260, Color1, 2);
|
||||
|
||||
L_Code_STL("人物坐标Y : ", X + 165, Y + 280, Color, 2);
|
||||
L_Code_STL("" + obj.getYPos(), X + 235, Y + 280, Color1, 2);
|
||||
|
||||
L_Code_STL("人物坐标Z : ", X + 165, Y + 300, Color, 2);
|
||||
L_Code_STL("" + obj.getZPos(), X + 235, Y + 300, Color1, 2);
|
||||
|
||||
L_Code_STL("鼠标坐标X : ", X + 165, Y + 340, Color, 2);
|
||||
//L_Code_STL("" + Chr_State_Table[13], X + 235, Y + 340, Color1, 2);
|
||||
|
||||
L_Code_STL("鼠标坐标Y : ", X + 165, Y + 360, Color, 2);
|
||||
//L_Code_STL("" + Chr_State_Table[14], X + 235, Y + 360, Color1, 2);
|
||||
}
|
||||
|
||||
function SyncMousePos() {
|
||||
Chr_State_Table.rawset(13, sq_GetMouseXPos());
|
||||
Chr_State_Table.rawset(14, sq_GetMouseYPos());
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,343 @@
|
|||
class UnderBaseDraw
|
||||
{
|
||||
//绘制函数
|
||||
function T_DrawDynamicAni(AniFileName, Xpos, Ypos, AniName)
|
||||
{
|
||||
if(CreatChrTable.rawin(AniName) == false) CreatChrTable.rawset(AniName, sq_CreateAnimation("", AniFileName));
|
||||
else
|
||||
{
|
||||
sq_AnimationProc(CreatChrTable[AniName]);
|
||||
sq_drawCurrentFrame(CreatChrTable[AniName], Xpos, Ypos, true);
|
||||
}
|
||||
}
|
||||
|
||||
function T_DrawStayAni(AniFileName, Xpos, Ypos, Index, AniName)
|
||||
{
|
||||
if(CreatChrTable.rawin(AniName) == false) CreatChrTable.rawset(AniName, sq_CreateAnimation("", AniFileName));
|
||||
else
|
||||
{
|
||||
sq_DrawSpecificFrame(CreatChrTable[AniName], Xpos, Ypos, false, Index, false, 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
function T_DrawStayAniAlpha(AniFileName, Xpos, Ypos, Index, AniName, Alpha)
|
||||
{
|
||||
if(CreatChrTable.rawin(AniName) == false) CreatChrTable.rawset(AniName, sq_CreateAnimation("", AniFileName));
|
||||
else
|
||||
{
|
||||
CreatChrTable[AniName].setRGBA(255, 255, 255, Alpha);
|
||||
sq_DrawSpecificFrame(CreatChrTable[AniName], Xpos, Ypos, false, Index, false, 1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class UnderButton extends UnderBaseDraw
|
||||
{
|
||||
State = 0; //按钮状态
|
||||
ClickEnble = false; //点击效果
|
||||
ButtonDynamic = false; //动态按钮效果
|
||||
|
||||
CustomClickEnble = false; //自定义点击效果
|
||||
CustomClickAnifile = null; //自定义点击效果Ani路径
|
||||
CustomButtonName = null; //自定义点击效果名称
|
||||
CustomClickFrame = null; //自定义点击效果Ani编号
|
||||
CustomClickx = null; //自定义点击效果X坐标
|
||||
CustomClicky = null; //自定义点击效果Y坐标
|
||||
|
||||
|
||||
RectEnble = false; //悬停效果
|
||||
RectButtonName = null; //悬停名称
|
||||
RectBaseAnifile = null; //悬停Ani路径
|
||||
RectFrame = null; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = null; //悬停X坐标
|
||||
Recty = null; //悬停Y坐标
|
||||
|
||||
|
||||
ButtonName = null; //按钮名称
|
||||
x = null; //X坐标
|
||||
y = null; //Y坐标
|
||||
BaseAnifile = null; //调用Ani路径
|
||||
width = null; //可点击宽度
|
||||
length = null; //可点击高度
|
||||
//构造函数
|
||||
constructor(gButtonName, gX, gY, gAnifile, gWidth, gLength)
|
||||
{
|
||||
ButtonName = gButtonName;
|
||||
x = gX;
|
||||
y = gY;
|
||||
BaseAnifile = gAnifile;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
}
|
||||
//绘制按钮
|
||||
function Show()
|
||||
{
|
||||
if(ClickEnble) //是否开启点击效果
|
||||
{
|
||||
if(isLBDown() && State == 0) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 1; //按键进入按下状态
|
||||
//++y;
|
||||
}
|
||||
if(!isLBDown() && State == 1) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 0; //按键进入弹起状态
|
||||
//--y;
|
||||
}
|
||||
}
|
||||
|
||||
if(CustomClickEnble) //是否开启自定义点击效果
|
||||
{
|
||||
if(isLBDown()) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
if(!ButtonDynamic) T_DrawStayAni(CustomClickAnifile, CustomClickx, CustomClicky, CustomClickFrame, CustomButtonName);
|
||||
else T_DrawDynamicAni(CustomClickAnifile, CustomClickx, CustomClicky, CustomButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if(RectEnble) //开启悬停效果时
|
||||
{
|
||||
if((isInRect() && !isLBDown()) || (isInRect() && !CustomClickEnble)) //如果鼠标悬停的时候 并且没有点击的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(44);
|
||||
if(!ButtonDynamic) T_DrawStayAni(RectBaseAnifile, Rectx, Recty, RectFrame, RectButtonName);
|
||||
else T_DrawDynamicAni(RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
if(!isInRect()) //如果鼠标没有悬停的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(0);
|
||||
if(!ButtonDynamic) T_DrawStayAni(BaseAnifile, x, y, 0, ButtonName);
|
||||
else T_DrawDynamicAni(BaseAnifile, x, y, ButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
//设置自定义点击效果
|
||||
function SetCustomClickEnble(bool, gButtonName, gX, gY, gAnifile, gFrame)
|
||||
{
|
||||
CustomClickEnble = bool; //自定义点击效果
|
||||
CustomClickAnifile = gAnifile; //自定义点击效果Ani路径
|
||||
CustomButtonName = gButtonName; //自定义点击效果名称
|
||||
CustomClickFrame = gFrame; //自定义点击效果Ani编号
|
||||
CustomClickx = gX; //自定义点击效果X坐标
|
||||
CustomClicky = gY; //自定义点击效果Y坐标
|
||||
}
|
||||
|
||||
//设置悬停效果
|
||||
function SetRectEnble(bool, gButtonName, gX, gY, gAnifile, gFrame)
|
||||
{
|
||||
RectEnble = bool; //悬停效果
|
||||
RectButtonName = gButtonName; //悬停名称
|
||||
RectBaseAnifile = gAnifile; //悬停Ani路径
|
||||
RectFrame = gFrame; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = gX; //悬停X坐标
|
||||
Recty = gY; //悬停Y坐标
|
||||
}
|
||||
|
||||
//设置动态按钮
|
||||
function SetClickEnble(bool)
|
||||
{
|
||||
ButtonDynamic = bool;
|
||||
}
|
||||
|
||||
//设置点击效果
|
||||
function SetClickEnble(bool)
|
||||
{
|
||||
ClickEnble = bool;
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect()
|
||||
{
|
||||
if(sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown()
|
||||
{
|
||||
if(isInRect() && IMouse.GetLButton() == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp()
|
||||
{
|
||||
if(isInRect() && IMouse.GetLButton() == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键双击状态
|
||||
function IsLBDoubleClick()
|
||||
{
|
||||
if(isInRect() && IMouse.GetLButton() == 64) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键单击状态
|
||||
function isLBActive()
|
||||
{
|
||||
if(isInRect() && IMouse.isButtonUpEvent()) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class CreatChrC extends UnderBaseDraw
|
||||
{
|
||||
Job = 0; //当前职业
|
||||
ChrJobDrawState = 0; //职业绘制状态
|
||||
DrawChrAniEffTimer = null; //职业绘制Timer
|
||||
ChrJobDrawAlpha = []; //职业绘制Alpha数组
|
||||
SelectSwitch = false; //选择职业开关
|
||||
|
||||
NowChrSelectPos = 0; //当前角色职业选择位置
|
||||
|
||||
constructor()
|
||||
{
|
||||
ChrJobDrawAlpha.resize(16); //初始化职业绘制Alpha数组
|
||||
for(local i = 0; i < 16; ++i)
|
||||
{
|
||||
ChrJobDrawAlpha[i] = 0;
|
||||
}
|
||||
DrawChrAniEffTimer = TimeSTL("DrawChrAniEffTimer", 3000); //初始化职业绘制Timer
|
||||
}
|
||||
|
||||
//同步角色职业选择位置
|
||||
function SyncChrSelectPos()
|
||||
{
|
||||
NowChrSelectPos = L_sq_RA(0x1A5E258, "0xA8+0xC0+");
|
||||
}
|
||||
|
||||
//绘制角色信息
|
||||
function DrawChrJobInfo()
|
||||
{
|
||||
T_DrawStayAni("common/creatchr/chrbackground/background.ani", 0, 0, NowChrSelectPos, "BMain0");
|
||||
T_DrawDynamicAni("common/creatchr/chrjobani/" + NowChrSelectPos + ".ani", -160, 0, "DrawChrJobInfo" + NowChrSelectPos);
|
||||
T_DrawDynamicAni("common/creatchr/base/0.ani", 0, 0, "BackGround0");
|
||||
|
||||
T_DrawDynamicAni("common/creatchr/base/" + (NowChrSelectPos % 2 + 1) + ".ani", 0, 0, "BackGround1" + (NowChrSelectPos % 2 + 1));
|
||||
//T_DrawDynamicAni( "common/creatchr/base/1.ani", 0, 0,"BackGround1");
|
||||
//T_DrawDynamicAni( "common/creatchr/base/2.ani", -267, 0,"BackGround2");
|
||||
T_DrawDynamicAni("common/creatchr/base/3.ani", -267, 0, "BackGround3");
|
||||
}
|
||||
|
||||
function DrawSelectButton()
|
||||
{
|
||||
for(local i = 0; i < 16; ++i)
|
||||
{
|
||||
if(i == NowChrSelectPos) continue;
|
||||
local SelectButton = UnderButton("SelectChrJob" + i, 40 + (i % 4 * 70), 40 + (i / 4 * 70), "common/creatchr/jobbutton/0.ani", 66, 66);
|
||||
SelectButton.SetRectEnble(true, "SelectChrJob" + i, 40 + (i % 4 * 70), 40 + (i / 4 * 70), "common/creatchr/jobbutton/0.ani", 1);
|
||||
SelectButton.SetCustomClickEnble(true, "SelectChrJob" + i, 40 + (i % 4 * 70), 40 + (i / 4 * 70), "common/creatchr/jobbutton/0.ani", 1);
|
||||
SelectButton.Show();
|
||||
if(SelectButton.isLBActive())
|
||||
{
|
||||
L_sq_WA(0x1A5E258, "0xA8+0xC0+", i);
|
||||
}
|
||||
}
|
||||
//角色职业按钮动画完毕以后才显示当前选中
|
||||
if(ChrJobDrawAlpha[15] == 250) T_DrawStayAni("common/creatchr/jobbutton/0.ani", 40 + (NowChrSelectPos % 4 * 70), 40 + (NowChrSelectPos / 4 * 70), 2, "DrawChrJobInfoSelectPos");
|
||||
}
|
||||
|
||||
function DrawJobButton()
|
||||
{
|
||||
DrawChrJobInfo();
|
||||
for(local i = 0; i < 16; ++i)
|
||||
{
|
||||
T_DrawStayAniAlpha("common/creatchr/jobbutton/0.ani", 40 + (i % 4 * 70), 40 + (i / 4 * 70), 3 + (i * 2), "JobAni" + i, ChrJobDrawAlpha[i]);
|
||||
}
|
||||
|
||||
local MainButton = UnderButton("MainButton", 50, 530, "common/training/main/maintab.ani", 38, 35);
|
||||
MainButton.SetRectEnble(true, "MainButton", 50, 530, "common/training/main/maintab.ani", 0);
|
||||
MainButton.SetCustomClickEnble(true, "MainButton", 50, 530 + 1, "common/training/main/maintab.ani", 0);
|
||||
MainButton.Show();
|
||||
|
||||
if(MainButton.isLBActive())
|
||||
{
|
||||
DrawChrAniEffTimer.Reset();
|
||||
DrawChrAniEffTimer.Start();
|
||||
if(ChrJobDrawState == 0) ++ChrJobDrawState;
|
||||
else ChrJobDrawState = ChrJobDrawState * -1;
|
||||
}
|
||||
|
||||
//绘制阶段
|
||||
if(ChrJobDrawState == 1)
|
||||
{
|
||||
//最后一个角色头像的Alpha值等于250之前
|
||||
if(ChrJobDrawAlpha[15] < 250)
|
||||
{
|
||||
if(DrawChrAniEffTimer.Get() >= 15)
|
||||
{
|
||||
DrawChrAniEffTimer.Reset();
|
||||
DrawChrAniEffTimer.Start();
|
||||
for(local i = 0; i < 16; ++i)
|
||||
{
|
||||
local AddAlpha = (20 - i) * 1;
|
||||
if(ChrJobDrawAlpha[i] + AddAlpha < 250) ChrJobDrawAlpha[i] += AddAlpha;
|
||||
else ChrJobDrawAlpha[i] = 250;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectSwitch = true;
|
||||
}
|
||||
}
|
||||
if(ChrJobDrawState == -1)
|
||||
{
|
||||
//第一个角色的Alpha值等于0之前
|
||||
if(ChrJobDrawAlpha[0] > 0)
|
||||
{
|
||||
if(DrawChrAniEffTimer.Get() >= 15)
|
||||
{
|
||||
DrawChrAniEffTimer.Reset();
|
||||
DrawChrAniEffTimer.Start();
|
||||
for(local i = 0; i < 16; ++i)
|
||||
{
|
||||
local AddAlpha = (4 + i) * 1;
|
||||
if(ChrJobDrawAlpha[i] - AddAlpha > 0) ChrJobDrawAlpha[i] -= AddAlpha;
|
||||
else ChrJobDrawAlpha[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectSwitch = false;
|
||||
}
|
||||
}
|
||||
//绘制选择角色职业按钮
|
||||
if((SelectSwitch == true && ChrJobDrawAlpha[0] >= 35) || ChrJobDrawState == 1) DrawSelectButton();
|
||||
}
|
||||
|
||||
function Run()
|
||||
{
|
||||
SyncChrSelectPos();
|
||||
DrawJobButton();
|
||||
}
|
||||
}
|
||||
|
||||
CreatChrTable <- {}
|
||||
function CreatChr()
|
||||
{
|
||||
/*
|
||||
if(sq_IsKeyDown(7, ENUM_SUBKEY_TYPE_ALL))
|
||||
{
|
||||
if(CreatChrTable.rawin("CreatChrCObject") == true) CreatChrTable.rawdelete("CreatChrCObject");
|
||||
}
|
||||
*/
|
||||
if(CreatChrTable.rawin("CreatChrCObject") == false) CreatChrTable.rawset("CreatChrCObject", CreatChrC());
|
||||
else CreatChrTable["CreatChrCObject"].Run();
|
||||
|
||||
//CreatChrC.T_DrawDynamicAni("BackGround0", "common/creatchr/base/0.ani", -267, 0);
|
||||
/*
|
||||
if(CreatChrTable.rawin("BackGround0") == false) CreatChrTable.rawset("BackGround0", sq_CreateAnimation("", "common/creatchr/base/0.ani"));
|
||||
if(CreatChrTable.rawin("BackGround1") == false) CreatChrTable.rawset("BackGround1", sq_CreateAnimation("", "common/creatchr/base/0.ani"));
|
||||
if(CreatChrTable.rawin("BackGround2") == false) CreatChrTable.rawset("BackGround2", sq_CreateAnimation("", "common/creatchr/base/0.ani"));
|
||||
if(CreatChrTable.rawin("BackGround3") == false) CreatChrTable.rawset("BackGround3", sq_CreateAnimation("", "common/creatchr/base/0.ani"));
|
||||
sq_AnimationProc(CreatChrTable["Test"]);
|
||||
sq_drawCurrentFrame(CreatChrTable["Test"], -267, 0, true);
|
||||
//T_DrawDynamicAni(obj, "common/dps/maintop.ani", 0, 0, "maintop"); //绘制Dps上边栏
|
||||
//print(666);
|
||||
//local mouseX = IMouse.GetXPos();
|
||||
//local mouseY = IMouse.GetYPos();
|
||||
//print(mouseX);
|
||||
//print(mouseY);
|
||||
*/
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
文件名:Init_CodeDraw.nut
|
||||
路径:UI/Init_CodeDraw/Init_CodeDraw.nut
|
||||
创建日期:2022-11-14 07:25
|
||||
文件用途:修改文字颜色
|
||||
*/
|
||||
L_RegisterCodeDraw_STL("权御九界 - 最终伤害+20%",sq_RGBA(255,177,0,250),"最终伤害+20%");
|
||||
L_RegisterCodeDraw_STL("权御九界 - 冷却-6%",sq_RGBA(255,177,0,250),"冷却-6%");
|
||||
L_RegisterCodeDraw_STL("权御九界 - 强化增幅几率+30%",sq_RGBA(255,177,0,250),"强化增幅几率+30%");
|
||||
|
|
@ -0,0 +1,314 @@
|
|||
/*
|
||||
文件名:Init_ItemColor.nut
|
||||
路径:UI/Init_ItemColor/Init_ItemColor.nut
|
||||
创建日期:2022-11-01 02:06
|
||||
文件用途:修改Item颜色
|
||||
*/
|
||||
|
||||
//权御九界称号
|
||||
L_RegisterItemColor_STL(2019185, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(2022110703, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(2022110704, 0xFF0055FF);
|
||||
//特殊物品
|
||||
L_RegisterItemColor_STL(2022111302, 0xFFACFF08);
|
||||
L_RegisterItemColor_STL(2022111301, 0xFFACFF08);
|
||||
L_RegisterItemColor_STL(2022111311, 0xFF00008B);
|
||||
L_RegisterItemColor_STL(2022111312, 0xFF00008B);
|
||||
L_RegisterItemColor_STL(2022111313, 0xFF00008B);
|
||||
L_RegisterItemColor_STL(2022111314, 0xFF00008B);
|
||||
L_RegisterItemColor_STL(2022111315, 0xFF00008B);
|
||||
L_RegisterItemColor_STL(2022111316, 0xFF00008B);
|
||||
L_RegisterItemColor_STL(2022111317, 0xFF00008B);
|
||||
//传说
|
||||
L_RegisterItemColor_STL(100300079, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100300080, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100300081, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100300082, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100300083, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100300329, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100300330, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100300331, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100300333, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100300334, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100300497, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100300505, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100300506, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100300507, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100310804, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100310805, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100310806, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100310807, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100310813, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100310814, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100200490, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100230410, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100220442, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100210442, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100050074, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100080019, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100080435, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100080437, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100070023, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100060029, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100060476, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100090020, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100350107, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100350108, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100350109, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100350110, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100350111, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100350112, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100350696, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100350697, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100350698, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100350699, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100352608, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100352611, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100352612, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100352613, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100352614, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100352615, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100352616, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100352617, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100352618, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100352619, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100100138, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100100533, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100130135, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100130427, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100120153, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100110122, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100110465, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100140071, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100320084, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100320085, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100320086, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100320087, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100320088, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100320089, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100320090, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100320091, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100320618, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100320619, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100320620, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100320625, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100320626, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100322054, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100322055, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100322056, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100322057, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100322058, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100322059, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100322060, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100322061, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100322062, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100322063, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100322064, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100322065, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100322066, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100322067, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100322068, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100322069, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100322070, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100322071, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100250113, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100280112, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100270136, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100260113, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100260449, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100290067, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100290300, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100150515, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100180411, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100170449, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100190287, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100340349, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100340350, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100340351, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100340352, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100340353, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100340354, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100340355, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100340356, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100341603, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100341604, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100341605, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100341606, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100341607, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100341608, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100341613, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100341614, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100341619, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100344252, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100344253, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100344254, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100344255, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100344256, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100344257, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100344258, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100344259, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100344260, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100344262, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100310072, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100310073, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100310074, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100310546, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100310547, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100310548, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100310553, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100310554, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100312195, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100312196, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100312198, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100312199, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100312200, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100312201, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100312202, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100312204, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(100312205, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102030398, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102030399, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102040048, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102020052, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102020368, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102020371, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102010229, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102010463, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102010464, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102000176, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102000399, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102000400, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102030048, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102040435, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102040436, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104010043, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104010449, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104010452, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104040164, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104040468, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104040469, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104030155, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104030454, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104030455, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104040047, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104020232, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104020450, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104020453, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104000049, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104000468, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104000469, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106040050, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106040363, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106040366, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106010136, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106010384, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106010387, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106010046, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106020446, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106020449, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106000047, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106000357, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106000358, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106030137, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106030479, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106030482, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108030043, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108040343, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108040344, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108000112, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108000382, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108000383, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108010100, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108010352, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108010353, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108030386, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108030387, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108040044, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108020044, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108020095, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108020333, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108020336, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101040156, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101040405, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101040406, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101020543, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101020544, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101030044, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101010047, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101030598, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101030599, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101010731, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101010732, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101020049, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101000030, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101000574, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101000575, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(109000045, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(109000333, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(109000334, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(109010044, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(109010318, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(109010321, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(109020042, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(109030217, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(109030220, 0xFF0055FF);
|
||||
|
||||
|
||||
//以下为镇魂 释魂
|
||||
L_RegisterItemColor_STL(102040045, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102020049, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102010113, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102000056, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102030045, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104010040, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104020042, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104040044, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104030049, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104000046, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106040047, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106020041, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106010043, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106000044, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106030043, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108030040, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108000044, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108010042, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108040041, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108020041, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101040045, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101030041, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101010044, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101020046, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101000027, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(109000042, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(109010041, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(109020039, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102040046, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102020050, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102010114, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102000057, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(102030046, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104010041, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104020043, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104040045, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104030050, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(104000047, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106040048, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106020042, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106010044, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106000045, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(106030044, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108030041, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108000045, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108010043, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108040042, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(108020042, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101040046, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101030042, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101010045, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101020047, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(101000028, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(109000043, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(109010042, 0xFF0055FF);
|
||||
L_RegisterItemColor_STL(109020040, 0xFF0055FF);
|
||||
//传说
|
||||
|
|
@ -0,0 +1,237 @@
|
|||
/*
|
||||
文件名:MonsterBloodUi.nut
|
||||
路径:UI/MonsterBloodUi/MonsterBloodUi.nut
|
||||
创建日期:2022-10-14 18:19
|
||||
文件用途:
|
||||
*/
|
||||
NowHitMonsterId <- null
|
||||
BOSSOpenDraw <- false
|
||||
class NewMonsterBlood extends BasicsDrawTool {
|
||||
Id = null;
|
||||
OldHp = null;
|
||||
NowHp = null;
|
||||
|
||||
HpArr = null;
|
||||
MonsterBloodUiEffTimer = null;
|
||||
|
||||
constructor(id) {
|
||||
HpArr = [];
|
||||
Id = id;
|
||||
//构造血条Timer
|
||||
MonsterBloodUiEffTimer = TimeSTL("MonsterBloodUiEffTimerid" + id, 2000);
|
||||
}
|
||||
|
||||
function Delete() {
|
||||
MonsterBloodUiEffTimer.Delete();
|
||||
}
|
||||
|
||||
function SetDate(MonObject, Hp) {
|
||||
if (!MonObject || MonObject.isDead()) return;
|
||||
//if(MonsterBloodUiEffTimer.Get() >= 300 || MonsterBloodUiEffTimer.Get() == 0)
|
||||
//{
|
||||
if (MonObject.getHp() > Hp)
|
||||
HpArr.append(Hp);
|
||||
//}
|
||||
}
|
||||
|
||||
function Run(object) {
|
||||
if (!object || object.isDead()) return;
|
||||
if (!OldHp) {
|
||||
OldHp = object.getHp();
|
||||
HpArr.append(OldHp);
|
||||
HpArr.append(OldHp);
|
||||
//重置时间容器
|
||||
MonsterBloodUiEffTimer.Reset();
|
||||
//开始计时
|
||||
MonsterBloodUiEffTimer.Start();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//绘制简易静态Ani // obj -- ani路径 -- X -- Y -- 第几帧 -- ani名字
|
||||
function DrawStayAni(obj, aniFileName, x, y, index, aniname, R, G, B, A) {
|
||||
if (!obj) return;
|
||||
local SelectAni = obj.getVar().GetAnimationMap(aniname, aniFileName);
|
||||
if (SelectAni) {
|
||||
SelectAni.setRGBA(R, G, B, A);
|
||||
//sq_AnimationProc(SelectAni);
|
||||
sq_DrawSpecificFrame(SelectAni, x, y, false, index, false, 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
//绘制跟随血条
|
||||
function DrawF_MonsterHp(obj, OldRate, BloodRate, Time, ArrCount, Xpos, Ypos, MonObject) {
|
||||
|
||||
local color = 0xFFffffff;
|
||||
if (MonObject.isObjectType(OBJECTTYPE_CHARACTER) && MonObject.getTeam() == 0) color = 0xFF4990aa; //角色对象
|
||||
else if (MonObject.isObjectType(OBJECTTYPE_CHARACTER) && MonObject.getTeam() != 0) color = 0xFF0000CC; //敌对角色对象
|
||||
else if (!MonObject.isObjectType(OBJECTTYPE_CHARACTER) && MonObject.getTeam() == 0) color = 0xFF00ff00; //友方对象
|
||||
|
||||
L_sq_DrawCode("Lv." + MonObject.GetLevel().tostring(), Xpos - 49, Ypos + 16, color, 0, 1);
|
||||
L_sq_DrawCode(MonObject.GetName(), Xpos - 17, Ypos + 16, color, 0, 1);
|
||||
|
||||
local R = 0xff;
|
||||
local G = 0x00;
|
||||
local B = 0x00;
|
||||
if (MonObject.getTeam() == 0) {
|
||||
R = 0x00;
|
||||
G = 0xff;
|
||||
} else if (MonObject.getTeam() == 200) {
|
||||
R = 0xFF;
|
||||
G = 0x66;
|
||||
}
|
||||
|
||||
local MR = 0x00;
|
||||
local MG = 0x99;
|
||||
local MB = 0xFF;
|
||||
|
||||
T_DrawStayAni(obj, "common/monsterbloodui/new/normain.ani", Xpos - 47, Ypos + 30, 0, "怪物血槽nor底");
|
||||
|
||||
//绘制血槽特效
|
||||
local v = sq_GetUniformVelocity((OldRate * 96.0).tointeger(), (BloodRate * 96.0).tointeger(), Time * (ArrCount - 1), 300);
|
||||
local av = sq_GetUniformVelocity(250, 100, Time * (ArrCount - 1), 300);
|
||||
if (v < 0) v = 0;
|
||||
setClip(Xpos - 47 + 2, Ypos + 30 + 1, Xpos - 47 + 3 + v, Ypos + 30 + 1 + 6);
|
||||
DrawStayAni(obj, "common/monsterbloodui/new/noreff.ani", Xpos - 47 + 3, Ypos + 30 + 2, 0, "怪物血槽nor", 255, 255, 255, av);
|
||||
releaseClip(); //裁切结束
|
||||
//绘制血槽
|
||||
setClip(Xpos - 47 + 2, Ypos + 30 + 1, Xpos - 47 + 3 + (BloodRate * 96.0).tointeger(), Ypos + 30 + 1 + 6);
|
||||
DrawStayAni(obj, "common/monsterbloodui/new/noreff.ani", Xpos - 47 + 3, Ypos + 30 + 2, 0, "怪物血槽norEFf", R, G, B, 250);
|
||||
releaseClip();
|
||||
|
||||
|
||||
//如果需要绘制蓝槽
|
||||
if (MonObject.isObjectType(OBJECTTYPE_CHARACTER) /*|| sq_IsMyControlObject(MonObject)*/ ) {
|
||||
T_DrawStayAni(obj, "common/monsterbloodui/new/normain.ani", Xpos - 47, Ypos + 38, 0, "怪物蓝槽nor底");
|
||||
local m = ((MonObject.getMp().tofloat() / MonObject.getMpMax().tofloat()) * 96.0).tointeger();
|
||||
setClip(Xpos - 47 + 2, Ypos + 38 + 1, Xpos - 47 + 3 + m, Ypos + 30 + 1 + 6);
|
||||
DrawStayAni(obj, "common/monsterbloodui/new/noreff.ani", Xpos - 47 + 3, Ypos + 38 + 2, 0, "怪物蓝槽nor", MR, MG, MB, 250);
|
||||
releaseClip(); //裁切结束
|
||||
}
|
||||
}
|
||||
|
||||
//绘制固定血条 基础坐标 血槽框补全坐标 血条偏移坐标 血条高度
|
||||
function DrawFX_MonsterHp(obj, OldRate, BloodRate, Time, ArrCount, Type, X, Y, XF, YF, XS, YS, YM) {
|
||||
|
||||
local v = sq_GetUniformVelocity((OldRate * 538.0).tointeger(), (BloodRate * 538.0).tointeger(), Time * (ArrCount - 1), 1000);
|
||||
local av = sq_GetUniformVelocity(250, 100, Time * (ArrCount - 1), 1000);
|
||||
if (v < 0) v = 0;
|
||||
|
||||
|
||||
//绘制血槽底
|
||||
T_DrawStayAni(obj, "common/monsterbloodui/zh/normain.ani", X, Y, 0, 0 + "BOSSNewMonsterBloodUi_Main");
|
||||
|
||||
|
||||
//绘制生命值
|
||||
setClip(X, Y, X + v, Y + YM);
|
||||
local BloodEffAni = obj.getVar().GetAnimationMap(2 + "_NewMonsterBloodUi_BloodEff", "common/monsterbloodui/zh/normain.ani");
|
||||
BloodEffAni.setRGBA(255, 255, 255, av);
|
||||
sq_DrawSpecificFrame(BloodEffAni, X, Y, false, 2, false, 1.0);
|
||||
releaseClip();
|
||||
|
||||
setClip(X, Y, X + (BloodRate * 538).tointeger(), Y + YM);
|
||||
T_DrawStayAni(obj, "common/monsterbloodui/zh/normain.ani", X, Y, 1, 1 + "_NewMonsterBloodUi_Blood");
|
||||
releaseClip();
|
||||
|
||||
}
|
||||
|
||||
|
||||
function Draw(obj, MonObject) {
|
||||
if (!MonObject || !obj || MonObject.isDead() || obj.isDead()) return;
|
||||
|
||||
local Xpos = sq_GetScreenXPos(MonObject);
|
||||
local Ypos = sq_GetScreenYPos(MonObject);
|
||||
//local Zpos = sq_GetHeightObject(MonObject);
|
||||
|
||||
//Ypos -= (Zpos * 1.50).tointeger();
|
||||
|
||||
local ArrCount = HpArr.len();
|
||||
if (ArrCount > 1) {
|
||||
///print(11111);
|
||||
local Time = MonsterBloodUiEffTimer.Get();
|
||||
if (Time == false) return;
|
||||
if ((Time * (ArrCount - 1)) >= 300 && ArrCount > 2) {
|
||||
HpArr.remove(0);
|
||||
//重置时间容器
|
||||
MonsterBloodUiEffTimer.Reset();
|
||||
//开始计时
|
||||
MonsterBloodUiEffTimer.Start();
|
||||
|
||||
}
|
||||
|
||||
OldHp = HpArr[0];
|
||||
NowHp = HpArr[1];
|
||||
local OldRate = OldHp.tofloat() / MonObject.getHpMax().tofloat();
|
||||
local BloodRate = NowHp.tofloat() / MonObject.getHpMax().tofloat();
|
||||
|
||||
//普通怪物血条
|
||||
//DrawFX_MonsterHp(obj, OldRate, BloodRate, Time, ArrCount, 0, 0, 110, 626, 15, 29, 17, 27);
|
||||
|
||||
if (getroottable().rawin("S_MonsterBloodSB") && getroottable()["S_MonsterBloodSB"] == true) {
|
||||
//Boss血条
|
||||
if (sq_IsBoss(MonObject)) {
|
||||
//DrawFX_MonsterHp(obj, OldRate, BloodRate, Time, ArrCount, 8, 0, 110, 628, 0, 34, 4, 50);
|
||||
}
|
||||
//普通怪物血条
|
||||
else if (!sq_IsBoss(MonObject)) DrawF_MonsterHp(obj, OldRate, BloodRate, Time, ArrCount, Xpos, Ypos, MonObject);
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
//Boss血条
|
||||
if (sq_GetObjectId(MonObject) == NowHitMonsterId && sq_IsBoss(MonObject) && BOSSOpenDraw == true) {
|
||||
DrawFX_MonsterHp(obj, OldRate, BloodRate, Time, ArrCount, 8, 34, 130, 628, 0, 34, 4, 50);
|
||||
BOSSOpenDraw = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function NewMonsterBloodUi(obj) {
|
||||
local RootTab = getroottable();
|
||||
|
||||
if (sq_GetCurrentModuleType() == 3 || sq_GetCurrentModuleType() == 10 || sq_GetCurrentModuleType() == 12 || sq_GetCurrentModuleType() == 13) {
|
||||
if (RootTab.rawin("MonBloodUI") == false) {
|
||||
local Map = {};
|
||||
RootTab.rawset("MonBloodUI", Map);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Hook获取是否要使用新版血条
|
||||
function Sq_GetDrawMonBloodSw() {
|
||||
if (getroottable().rawin("S_MonsterBloodSB")) return getroottable()["S_MonsterBloodSB"];
|
||||
else return false;
|
||||
}
|
||||
|
||||
//新版怪物血条回调
|
||||
function Sq_DrawMonsterBlood(Object, X, Y) {
|
||||
BOSSOpenDraw = true;
|
||||
//Sout("X: %L" , X);
|
||||
//Sout("Y: %L" , Y);
|
||||
}
|
||||
|
||||
//附加Ap
|
||||
function MonsterBlood_ApAdd(obj) {
|
||||
local objectManager = obj.getObjectManager();
|
||||
if (!objectManager) return;
|
||||
local CollisionObjectNumber = objectManager.getCollisionObjectNumber();
|
||||
for (local i = 0; i < CollisionObjectNumber; i += 1) {
|
||||
local object = objectManager.getCollisionObject(i);
|
||||
|
||||
if (object && object.isObjectType(OBJECTTYPE_ACTIVE)) {
|
||||
local activeObj = sq_GetCNRDObjectToActiveObject(object); //活動類
|
||||
//沒死亡
|
||||
if (!activeObj.isDead()) {
|
||||
if (!CNSquirrelAppendage.sq_IsAppendAppendage(activeObj, "appendage/currency_monster.nut")) {
|
||||
local append = CNSquirrelAppendage.sq_AppendAppendage(activeObj, obj, -1, true, "appendage/currency_monster.nut", false);
|
||||
CNSquirrelAppendage.sq_AppendAppendageID(append, activeObj, obj, 255, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,235 @@
|
|||
/*
|
||||
文件名:TeamDps.nut
|
||||
路径:UI/TeamDps/TeamDps.nut
|
||||
创建日期:2023-01-26 05:15
|
||||
文件用途:团队DPS
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function onSetHp_appendage_dps(appendage, hp, attacker) {
|
||||
if (!appendage) {
|
||||
return hp;
|
||||
}
|
||||
local parentObj = appendage.getParent();
|
||||
local sourceObj = appendage.getSource();
|
||||
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("TEAMDPSCONTROLOBJECT")) RootTab["TEAMDPSCONTROLOBJECT"].onSetHp(appendage, hp, attacker);
|
||||
|
||||
return hp;
|
||||
}
|
||||
|
||||
|
||||
class TeamDps extends BasicsDrawTool {
|
||||
MyDamage = 0;
|
||||
TeamDpsTimer = null;
|
||||
GetTeamDpsTimer = null;
|
||||
PackSize = 0;
|
||||
DPSSTL = {};
|
||||
|
||||
function TeamDpsPack(chunk) {
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("TEAMDPSCONTROLOBJECT") == false)return;
|
||||
local TObj = RootTab["TEAMDPSCONTROLOBJECT"];
|
||||
|
||||
local TeamDpsPack = Json_STL("TeamDpsPack");
|
||||
TeamDpsPack.Parse(chunk, 0, false);
|
||||
TObj.PackSize = TeamDpsPack.Get("PACKSIZE");
|
||||
for (local i = 0; i < TObj.PackSize; ++i) {
|
||||
local tab = ["Player", "0", "0%", "0.0"];
|
||||
tab[0] = TeamDpsPack.Get("PACK->" + i + "->NAME");
|
||||
tab[1] = TeamDpsPack.Get("PACK->" + i + "->DAMAGE");
|
||||
tab[2] = TeamDpsPack.Get("PACK->" + i + "->RATE");
|
||||
tab[3] = TeamDpsPack.Get("PACK->" + i + "->RATENUM");
|
||||
if (tab[0] != false && tab[1] != false && tab[2] != false && tab[3] != false)
|
||||
TObj.DPSSTL.rawset(i, tab);
|
||||
}
|
||||
|
||||
TeamDpsPack.Delete();
|
||||
}
|
||||
|
||||
|
||||
constructor() {
|
||||
//构造同步Timer
|
||||
TeamDpsTimer = TimeSTL("TeamDpsTimer", 5000);
|
||||
TeamDpsTimer.Start();
|
||||
GetTeamDpsTimer = TimeSTL("GetTeamDpsTimer", 5000);
|
||||
GetTeamDpsTimer.Start();
|
||||
Pack_Control.rawset(614, TeamDpsPack);
|
||||
}
|
||||
|
||||
//AP成员函数
|
||||
function onSetHp(Append, Hp, Attacker) {
|
||||
if (!Append) return Hp;
|
||||
|
||||
local MonsterObj = sq_GetCNRDObjectToActiveObject(Append.getParent()); //获取怪物
|
||||
local Chr = sq_GetCNRDObjectToSQRCharacter(sq_getMyCharacter()); //获取我自己
|
||||
if (!MonsterObj || !Chr) //如果怪物或者我自己不存在设置AP销毁
|
||||
{
|
||||
Append.setValid(false);
|
||||
return Hp;
|
||||
}
|
||||
|
||||
|
||||
//if(!MonsterObj.isMyControlObject()) return Hp; //如果怪物对象是我的角色直接返回
|
||||
local MonsterHp = MonsterObj.getHp(); //获取怪物当前生命值
|
||||
if (Attacker == null && MonsterHp > Hp) //如果攻击者为空 并且 当前生命值大于要设置的生命值
|
||||
{
|
||||
if (!Chr.isEnemy(MonsterObj)) return Hp; //如果怪物和我不是敌对直接返回
|
||||
local DamageHp = MonsterHp - Hp; //得到这次掉的血
|
||||
if (DamageHp < 2147483647) {
|
||||
//MyDamage += DamageHp;
|
||||
return Hp;
|
||||
}
|
||||
}
|
||||
if (Attacker != null && sq_IsMyControlObject(Attacker) && MonsterHp > Hp) //如果攻击者是我自己 并且 当前生命值大于要设置的生命值
|
||||
{
|
||||
if (!Chr.isEnemy(MonsterObj)) return Hp; //如果怪物和我不是敌对直接返回
|
||||
local DamageHp = MonsterHp - Hp; //得到这次掉的血
|
||||
if (DamageHp < 2147483647) {
|
||||
MyDamage += DamageHp;
|
||||
return Hp;
|
||||
}
|
||||
}
|
||||
return Hp;
|
||||
}
|
||||
|
||||
//绘制函数
|
||||
function DrawDpsFunc(obj) {
|
||||
//print(TEAMDPSCONTROL.DPSSTL[0][0]);
|
||||
//print(TEAMDPSCONTROL.DPSSTL[0][1]);
|
||||
local Psize = 4;
|
||||
|
||||
local Base_X = 20;
|
||||
local Base_Y = 120;
|
||||
T_DrawDynamicAni(obj, "common/dps/maintop.ani", Base_X, Base_Y, "maintop"); //绘制Dps上边栏
|
||||
for (local i = 0; i < PackSize; i++) {
|
||||
T_DrawDynamicAni(obj, "common/dps/main.ani", Base_X, Base_Y + 41 + (i * 22), "main"); //绘制Dps中间栏
|
||||
if (DPSSTL.rawin(i)) {
|
||||
T_DrawDynamicAni(obj, "common/dps/dps.ani", Base_X + 8, Base_Y + 22 + (i * 28), "mainslot" + i); //绘制Dps中间槽底
|
||||
|
||||
local Rate = DPSSTL[i][3].tofloat();
|
||||
setClip(Base_X + 8, Base_Y + 22 + (i * 28), Base_X + 8 + (160.0 * Rate).tointeger(), Base_Y + 22 + (i * 28) + 18); //开始裁切
|
||||
T_DrawDynamicAni(obj, "common/dps/dps" + (i + 1) + ".ani", Base_X + 8, Base_Y + 22 + (i * 28), "mainslotc" + i); //绘制Dps中间槽
|
||||
releaseClip(); //裁切结束
|
||||
|
||||
L_Code_STL(DPSSTL[i][0], Base_X + 10, Base_Y + 24 + (i * 28), 0xFFFFFFFF, 0);
|
||||
L_Code_STL(DPSSTL[i][1].tostring(), Base_X + 94, Base_Y + 24 + (i * 28), 0xFFFFFFFF, 0);
|
||||
|
||||
local RateStr = DPSSTL[i][2].tostring();
|
||||
local RateStrLen = RateStr.len();
|
||||
L_Code_STL(RateStr, Base_X + 164 - (RateStrLen * 5), Base_Y + 24 + (i * 28), 0xFFFFFFFF, 0);
|
||||
}
|
||||
}
|
||||
T_DrawDynamicAni(obj, "common/dps/mainbotton.ani", Base_X, Base_Y + 41 + (PackSize * 22), "mainbotton"); //绘制Dps下边栏
|
||||
|
||||
|
||||
//T_DrawDynamicAni(obj, "common/dps/maintop.ani", Base_X, Base_Y, "maintop");
|
||||
|
||||
/*
|
||||
for(local i = 0; i < 4; ++i)
|
||||
{
|
||||
if(DPSSTL.rawin(i))
|
||||
{
|
||||
L_Code_STL(DPSSTL[i][0], 28, 110 + (i * 24), 0xFFFFFFFF, 1);
|
||||
L_Code_STL(DPSSTL[i][1].tostring() + " " + DPSSTL[i][2].tostring(), 148, 110 + (i * 24), 0xFFFFFFFF, 1);
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
//常规成员函数
|
||||
function exit() {
|
||||
TeamDpsTimer.Reset();
|
||||
TeamDpsTimer.Delete();
|
||||
GetTeamDpsTimer.Reset();
|
||||
GetTeamDpsTimer.Delete();
|
||||
|
||||
DPSSTL.rawdelete(0);
|
||||
DPSSTL.rawdelete(1);
|
||||
DPSSTL.rawdelete(2);
|
||||
DPSSTL.rawdelete(3);
|
||||
}
|
||||
|
||||
function Run(obj) {
|
||||
if (TeamDpsTimer.Get() >= 1700) {
|
||||
local TeamDpsBuffer = Json_STL("TeamDpsBuffer");
|
||||
TeamDpsBuffer.Put("op", 611);
|
||||
TeamDpsBuffer.Put("DAMAGE", MyDamage);
|
||||
local str = TeamDpsBuffer.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
TeamDpsBuffer.Delete();
|
||||
MyDamage = 0;
|
||||
TeamDpsTimer.Reset();
|
||||
TeamDpsTimer.Start();
|
||||
}
|
||||
|
||||
if (GetTeamDpsTimer.Get() >= 3000) {
|
||||
local TeamDpsBuffer = Json_STL("GetTeamDpsBuffer");
|
||||
TeamDpsBuffer.Put("op", 613);
|
||||
local str = TeamDpsBuffer.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
TeamDpsBuffer.Delete();
|
||||
|
||||
GetTeamDpsTimer.Reset();
|
||||
GetTeamDpsTimer.Start();
|
||||
}
|
||||
|
||||
DrawDpsFunc(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function TeamDPS(obj) {
|
||||
if (!obj) return false; //如果人物不存在则返回
|
||||
local RootTab = getroottable();
|
||||
|
||||
//建立时间容器
|
||||
if (RootTab.rawin("TeamDpsMonTimer") == false) {
|
||||
local Buf = TimeSTL("TeamDpsMonTimer", 500);
|
||||
Buf.Start();
|
||||
RootTab.rawset("TeamDpsMonTimer", Buf);
|
||||
}
|
||||
|
||||
if (sq_GetCurrentModuleType() != 3 && sq_GetCurrentModuleType() != 10 && sq_GetCurrentModuleType() != 12 && sq_GetCurrentModuleType() != 13) {
|
||||
if (RootTab.rawin("TEAMDPSCONTROLOBJECT")) {
|
||||
RootTab["TEAMDPSCONTROLOBJECT"].exit();
|
||||
RootTab.rawdelete("TEAMDPSCONTROLOBJECT");
|
||||
|
||||
}
|
||||
return false; //如果不是处于副本中则返回
|
||||
}
|
||||
|
||||
if (RootTab["TeamDpsMonTimer"].Get() >= 500) {
|
||||
RootTab["TeamDpsMonTimer"].Reset();
|
||||
RootTab["TeamDpsMonTimer"].Start();
|
||||
local objectManager = obj.getObjectManager();
|
||||
if (objectManager) {
|
||||
local CollisionObjectNumber = objectManager.getCollisionObjectNumber();
|
||||
for (local i = 0; i < CollisionObjectNumber; ++i) {
|
||||
local Monobject = objectManager.getCollisionObject(i);
|
||||
Monobject = sq_GetCNRDObjectToActiveObject(Monobject);
|
||||
if (Monobject && Monobject.isObjectType(OBJECTTYPE_ACTIVE) && obj.isEnemy(Monobject)) {
|
||||
if (!CNSquirrelAppendage.sq_IsAppendAppendage(Monobject, "appendage/teamdps/dps.nut")) {
|
||||
CNSquirrelAppendage.sq_AppendAppendage(Monobject, obj, -1, false, "appendage/teamdps/dps.nut", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!RootTab.rawin("TEAMDPSCONTROLOBJECT")) {
|
||||
local Buffer = TeamDps();
|
||||
RootTab.rawset("TEAMDPSCONTROLOBJECT", Buffer);
|
||||
}
|
||||
RootTab["TEAMDPSCONTROLOBJECT"].Run(obj);
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,144 @@
|
|||
|
||||
function sq_AddFunctionName(appendage)
|
||||
{
|
||||
appendage.sq_AddFunctionName("proc", "proc_appendage_atmage_effect")
|
||||
appendage.sq_AddFunctionName("prepareDraw", "prepareDraw_appendage_atmage_effect")
|
||||
appendage.sq_AddFunctionName("onStart", "onStart_appendage_atmage_effect")
|
||||
appendage.sq_AddFunctionName("onEnd", "onEnd_appendage_atmage_effect")
|
||||
appendage.sq_AddFunctionName("drawAppend", "drawAppend_appendage_atmage_effect")
|
||||
appendage.sq_AddFunctionName("isEnd", "isEnd_appendage_atmage_effect")
|
||||
}
|
||||
|
||||
|
||||
function sq_AddEffect(appendage)
|
||||
{
|
||||
//appendage.sq_AddEffectFront("Character/Priest/Effect/Animation/ScytheMastery/1_aura_normal.ani")
|
||||
}
|
||||
|
||||
function proc_appendage_atmage_effect(appendage)
|
||||
{
|
||||
if(!appendage) {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function onStart_appendage_atmage_effect(appendage)
|
||||
{
|
||||
if(!appendage) {
|
||||
return;
|
||||
}
|
||||
|
||||
local obj = appendage.getParent();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function prepareDraw_appendage_atmage_effect(appendage)
|
||||
{
|
||||
if(!appendage) {
|
||||
return;
|
||||
}
|
||||
|
||||
local obj = appendage.getParent();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function onEnd_appendage_atmage_effect(appendage)
|
||||
{
|
||||
if(!appendage) {
|
||||
return;
|
||||
}
|
||||
|
||||
local obj = appendage.getParent();
|
||||
}
|
||||
|
||||
function drawAppend_appendage_atmage_effect(appendage, isOver, x, y, isFlip)
|
||||
{
|
||||
if(!appendage) {
|
||||
return;
|
||||
}
|
||||
|
||||
local obj = appendage.getParent();
|
||||
|
||||
if(!obj) {
|
||||
appendage.setValid(false);
|
||||
return;
|
||||
}
|
||||
|
||||
local pAni = sq_GetCurrentAnimation(obj);
|
||||
|
||||
if(!pAni) {
|
||||
appendage.setValid(false);
|
||||
return;
|
||||
}
|
||||
|
||||
local currentT = sq_GetCurrentTime(pAni);
|
||||
|
||||
local startT = 150;
|
||||
local endT = 250;
|
||||
local effectT = 500;
|
||||
local effectType = GRAPHICEFFECT_DODGE;
|
||||
local rgb = sq_RGB(0, 90, 255);
|
||||
|
||||
if(appendage.sq_GetSkillIndex() == SKILL_FLAMECIRCLE) {
|
||||
startT = 50;
|
||||
endT = 250;
|
||||
effectT = 500;
|
||||
effectType = GRAPHICEFFECT_DODGE;
|
||||
rgb = sq_RGB(0, 0, 0);
|
||||
}
|
||||
else if(appendage.sq_GetSkillIndex() == SKILL_BROKENARROW)
|
||||
{
|
||||
startT = 100;
|
||||
endT = 200;
|
||||
effectT = 100;
|
||||
effectType = GRAPHICEFFECT_LINEARDODGE;
|
||||
rgb = sq_RGB(0, 75, 255);
|
||||
}
|
||||
|
||||
|
||||
local targetV = endT;
|
||||
|
||||
local al = sq_GetUniformVelocity(startT, targetV, appendage.getTimer().Get(), effectT);
|
||||
|
||||
local alpha = sq_ALPHA(al);
|
||||
pAni.setEffectLayer(true, effectType, true, rgb, alpha, true, false);
|
||||
|
||||
|
||||
local size = sq_AniLayerListSize(pAni);
|
||||
|
||||
if(appendage.sq_GetSkillIndex() != SKILL_FLAMECIRCLE) {
|
||||
if(size > 0) {
|
||||
for(local i=0;i<size;i+=1) {
|
||||
local aniL = sq_getAniLayerListObject(pAni, i);
|
||||
|
||||
if(aniL) {
|
||||
local effect = aniL.GetCurrentFrame().GetGraphicEffect();
|
||||
|
||||
if(effect != GRAPHICEFFECT_LINEARDODGE) {
|
||||
aniL.setEffectLayer(true, effectType, true, rgb, alpha, true, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(al == targetV) {
|
||||
appendage.setValid(false);
|
||||
}
|
||||
}
|
||||
|
||||
// 横渐螳 陕撩 渗褐暧 部睡碟
|
||||
function isEnd_appendage_atmage_effect(appendage)
|
||||
{
|
||||
if(!appendage) return false;
|
||||
|
||||
local T = appendage.getTimer().Get();
|
||||
|
||||
return false;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue