This commit is contained in:
2024-03-18 21:37:40 +08:00
commit c4aef8f3a3
313 changed files with 74071 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
function Sq_CreatChr(chunk) {
CreatChr();
}

View File

@@ -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");
}

View File

@@ -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()); //同步储存器缓冲时间
}
}

View File

@@ -0,0 +1,11 @@
function Sq_DrawMainTopLayerCustomUI(pack) {
local obj = sq_GetMyMasterCharacter();
// DrawWorldTower(obj);//世界之塔
}

View File

@@ -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;
}

View File

@@ -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;
}
}

View File

@@ -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();
}

View File

@@ -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);
}
}
}

View File

@@ -0,0 +1,3 @@
function Sq_SelectCharacter(Chunk) {
//CreatChr(pack);
}

View File

@@ -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
*/

View File

@@ -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);